comparison dwtx/jface/dialogs/ProgressMonitorDialog.d @ 83:028aedd523ad

Fix anon class segfault. Thanks yidabu for the report.
author Frank Benoit <benoit@tionex.de>
date Fri, 20 Jun 2008 13:00:15 +0200
parents 46a6e0e6ccd4
children 8d1a6e501ea4
comparison
equal deleted inserted replaced
82:0aafcf6e5217 83:028aedd523ad
289 */ 289 */
290 protected void updateForClearBlocked() { 290 protected void updateForClearBlocked() {
291 progressIndicator.showNormal(); 291 progressIndicator.showNormal();
292 setMessage(task, true); 292 setMessage(task, true);
293 imageLabel.setImage(getImage()); 293 imageLabel.setImage(getImage());
294 294
295 } 295 }
296 296
297 /** 297 /**
298 * Set blocked state from the receiver. 298 * Set blocked state from the receiver.
299 * 299 *
302 */ 302 */
303 protected void updateForSetBlocked(IStatus reason) { 303 protected void updateForSetBlocked(IStatus reason) {
304 progressIndicator.showPaused(); 304 progressIndicator.showPaused();
305 setMessage(reason.getMessage(), true); 305 setMessage(reason.getMessage(), true);
306 imageLabel.setImage(getImage()); 306 imageLabel.setImage(getImage());
307 307
308 } 308 }
309 309
310 /** 310 /**
311 * Creates a progress monitor dialog under the given shell. The dialog has a 311 * Creates a progress monitor dialog under the given shell. The dialog has a
312 * standard title and no image. <code>open</code> is non-blocking. 312 * standard title and no image. <code>open</code> is non-blocking.
410 waitCursor = new Cursor(shell.getDisplay(), DWT.CURSOR_WAIT); 410 waitCursor = new Cursor(shell.getDisplay(), DWT.CURSOR_WAIT);
411 } 411 }
412 shell.setCursor(waitCursor); 412 shell.setCursor(waitCursor);
413 // Add a listener to set the message properly when the dialog becomes 413 // Add a listener to set the message properly when the dialog becomes
414 // visible 414 // visible
415 shell.addListener(DWT.Show, new class Listener { 415 shell.addListener(DWT.Show, new class(shell) Listener {
416 Shell shell_; 416 Shell shell_;
417 this(){ shell_=shell; } 417 this(Shell a){ shell_=a; }
418 public void handleEvent(Event event) { 418 public void handleEvent(Event event) {
419 // We need to async the message update since the Show precedes 419 // We need to async the message update since the Show precedes
420 // visibility 420 // visibility
421 shell_.getDisplay().asyncExec(new class Runnable { 421 shell_.getDisplay().asyncExec(new class Runnable {
422 public void run() { 422 public void run() {