Changeset 129:18ca5d3c6dfc
- Timestamp:
- 02/12/08 18:56:11 (10 months ago)
- Files:
-
- README.txt (modified) (1 diff)
- dwt/widgets/MessageBox.d (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
README.txt
r102 r129 43 43 44 44 45 Changes/Additions to SWT 46 ======================== 47 o MessageBox can be instantiated without parent. Use the Ctor "this( int style )", 48 calling the other ctors will still force a non-null parent. 45 49 46 50 dwt/widgets/MessageBox.d
r117 r129 43 43 public class MessageBox : Dialog { 44 44 char[] message = ""; 45 private bool allowNullParent = false; 45 46 46 47 /** … … 87 88 super (parent, checkStyle (style)); 88 89 checkSubclass (); 90 } 91 92 /** 93 * DWT extension, a MessageBox with no parent 94 */ 95 public this (int style) { 96 allowNullParent = true; 97 super (parent, checkStyle (style)); 98 checkSubclass (); 99 } 100 // PORT 101 // actually, the parent can be null 102 override void checkParent (Shell parent){ 103 if( !allowNullParent ){ 104 super.checkParent( parent ); 105 } 89 106 } 90 107 … … 186 203 Display display = null; 187 204 if ((bits & OS.MB_TASKMODAL) !is 0) { 188 display = parent.getDisplay ();205 display = ( allowNullParent && parent is null ) ? Display.getCurrent() : parent.getDisplay (); 189 206 oldModal = display.getModalDialogShell (); 190 207 display.setModalDialogShell (parent);
