Launcher.st
changeset 582 aca73c710a3b
parent 580 71a1b9e1ee81
child 589 ce36a65f07a1
--- a/Launcher.st	Wed May 29 13:23:56 1996 +0200
+++ b/Launcher.st	Wed May 29 15:18:11 1996 +0200
@@ -558,68 +558,75 @@
 "/    box width:(400 min:(box device width * 2 // 3)); 
 "/        height:(450 min:(box device height - 50)); 
 "/        sizeFixed:true.
-    box showAtPointer.
+    box open.
+
     box destroy.
 
     "Modified: 17.9.1995 / 16:47:50 / claus"
-    "Modified: 6.4.1996 / 23:56:46 / cg"
+    "Modified: 29.5.1996 / 14:17:07 / cg"
 !
 
 snapshot
-    |saveBox|
-
-    saveBox := EnterBox title:(resources at:'filename for image:') withCRs.
-    saveBox okText:(resources at:'save').
-    saveBox action:[:fileName | 
-        (ObjectMemory snapShotOn:fileName) ifFalse:[
-            "
-             snapshot failed for some reason (disk full, no permission etc.)
-            "
-            self warn:(resources string:'failed to save snapshot image (disk full or not writable)').
+    |fileName|
+
+    fileName := DialogBox
+                    request:(resources at:'filename for image:') withCRs
+              initialAnswer:(ObjectMemory nameForSnapshot) 
+                    okLabel:(resources at:'save')
+                      title:(resources string:'save image')
+                   onCancel:nil.
+
+    fileName notNil ifTrue:[
+        self withCursor:Cursor write do:[
+            (ObjectMemory snapShotOn:fileName) ifFalse:[
+                "
+                 snapshot failed for some reason (disk full, no permission etc.)
+                "
+                self warn:(resources string:'failed to save snapshot image (disk full or not writable)').
+            ]
         ]
     ].
 
-    saveBox initialText:(ObjectMemory nameForSnapshot).
-    saveBox label:(resources string:'save image').
-    saveBox showAtPointer
-
-    "Modified: 27.2.1996 / 01:15:44 / cg"
+    "Modified: 29.5.1996 / 15:02:39 / cg"
 !
 
 snapshotAndExit
-    |saveBox|
-
-    saveBox := EnterBox title:(resources at:'filename for image:') withCRs.
-    saveBox okText:(resources at:'save & exit').
-    saveBox action:[:fileName | 
-        (ObjectMemory snapShotOn:fileName) ifFalse:[
-            "
-             snapshot failed for some reason (disk full, no permission etc.)
-             Do NOT exit in this case.
-            "
-            self warn:(resources string:'failed to save snapshot image (disk full or not writable)').
-        ] ifTrue:[
-            "
-             saveAllViews tells all views to shutdown neatly 
-             (i.e. offer a chance to save the contents to a file).
-
-             This is NOT required - all data should be in the snapshot ...
-             ... however, if remote disks/mountable filesystems are involved,
-             which may not be present the next time, it may make sense to 
-             uncomment it and query for saving - time will show which is better.
-            "
-"
-            self saveAllViews.
-"
-            Smalltalk exit
+    |fileName|
+
+    fileName := DialogBox
+                    request:(resources at:'filename for image:') withCRs
+              initialAnswer:(ObjectMemory nameForSnapshot) 
+                    okLabel:(resources at:'save & exit')
+                      title:(resources string:'save image & exit')
+                   onCancel:nil.
+
+    fileName notNil ifTrue:[
+        self withCursor:Cursor write do:[
+            (ObjectMemory snapShotOn:fileName) ifFalse:[
+                "
+                 snapshot failed for some reason (disk full, no permission etc.)
+                 Do NOT exit in this case.
+                "
+                self warn:(resources string:'failed to save snapshot image (disk full or not writable)').
+            ] ifTrue:[
+                "
+                 saveAllViews tells all views to shutdown neatly 
+                 (i.e. offer a chance to save the contents to a file).
+
+                 This is NOT required - all data should be in the snapshot ...
+                 ... however, if remote disks/mountable filesystems are involved,
+                 which may not be present the next time, it may make sense to 
+                 uncomment it and query for saving - time will show which is better.
+                "
+    "
+                self saveAllViews.
+    "
+                Smalltalk exit
+            ]
         ]
     ].
 
-    saveBox initialText:(ObjectMemory nameForSnapshot).
-    saveBox label:(resources string:'save image & exit').
-    saveBox showAtPointer
-
-    "Modified: 27.2.1996 / 01:14:15 / cg"
+    "Modified: 29.5.1996 / 15:03:10 / cg"
 ! !
 
 !NewLauncher methodsFor:'actions - goodies'!
@@ -853,7 +860,7 @@
         addOkButton.
 
     warnEnabler check.
-    box showAtPointer.
+    box open.
 
     box accepted ifTrue:[
         HistoryManager notNil ifTrue:[
@@ -883,7 +890,7 @@
     box destroy
 
     "Modified: 10.9.1995 / 19:19:18 / claus"
-    "Modified: 13.4.1996 / 13:51:37 / cg"
+    "Modified: 29.5.1996 / 14:16:44 / cg"
 !
 
 fontSettings
@@ -1018,14 +1025,14 @@
     macroTextView topInset:(l preferredExtent y + 5).
     macroTextView bottomInset:(box preferredExtent y - y).
 
-    box showAtPointer.
+    box open.
 
     box accepted ifTrue:[
         "no action yet ..."
     ].
     box destroy
 
-    "Modified: 26.5.1996 / 12:28:09 / cg"
+    "Modified: 29.5.1996 / 14:16:35 / cg"
 !
 
 languageSetting 
@@ -1057,10 +1064,10 @@
     ].    
     box
         addHelpButtonFor:'NewLauncher/languageSetting.html'.
-    box showAtPointer.
+    box open.
     box destroy
 
-    "Modified: 18.5.1996 / 15:43:17 / cg"
+    "Modified: 29.5.1996 / 14:16:29 / cg"
 !
 
 memorySettings
@@ -1174,7 +1181,7 @@
     "/
     "/ show the box ...
     "/
-    box showAtPointer.
+    box open.
 
     "/
     "/ update system settings
@@ -1201,7 +1208,7 @@
     ].
     box destroy
 
-    "Modified: 13.4.1996 / 13:51:23 / cg"
+    "Modified: 29.5.1996 / 14:16:24 / cg"
 !
 
 messageSettings
@@ -1224,15 +1231,17 @@
     box addCheckBox:(resources string:'Other info messages') on:classInfos.
 
     box addAbortButton; addOkButton.
-    box showAtPointer.
+    box open.
 
     box accepted ifTrue:[
-	ObjectMemory infoPrinting:vmInfo value.
-	ObjectMemory debugPrinting:vmErrors value.
-	Object infoPrinting:classInfos value.
-	DeviceWorkstation errorPrinting:displayErrors value.
+        ObjectMemory infoPrinting:vmInfo value.
+        ObjectMemory debugPrinting:vmErrors value.
+        Object infoPrinting:classInfos value.
+        DeviceWorkstation errorPrinting:displayErrors value.
     ].
     box destroy
+
+    "Modified: 29.5.1996 / 14:16:19 / cg"
 !
 
 miscSettings
@@ -1332,7 +1341,7 @@
     "/
     "/ show the box ...
     "/
-    box showAtPointer.
+    box open.
 
     "/
     "/ update system settings
@@ -1374,7 +1383,7 @@
     ].
     box destroy
 
-    "Modified: 30.4.1996 / 09:23:12 / cg"
+    "Modified: 29.5.1996 / 14:16:14 / cg"
 !
 
 printerSettings
@@ -1420,7 +1429,7 @@
     box addVerticalSpace.
 
     box addAbortButton; addOkButton.
-    box showAtPointer.
+    box open.
 
     box accepted ifTrue:[
         Printer printCommand:printCommand value.
@@ -1428,7 +1437,7 @@
     ].
     box destroy
 
-    "Modified: 23.4.1996 / 18:23:47 / cg"
+    "Modified: 29.5.1996 / 14:15:46 / cg"
 !
 
 viewStyleSetting 
@@ -1499,7 +1508,7 @@
 
     box stickAtBottomWithVariableHeight:scrView.
     box stickAtBottomWithFixHeight:infoLabel.
-    box showAtPointer.
+    box open.
 
     box accepted ifTrue:[
         newStyle := list selection.
@@ -1513,7 +1522,7 @@
     ].
     box destroy
 
-    "Modified: 26.5.1996 / 12:27:44 / cg"
+    "Modified: 29.5.1996 / 14:16:04 / cg"
 ! !
 
 !NewLauncher methodsFor:'actions - tools'!
@@ -2622,5 +2631,5 @@
 !NewLauncher class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.130 1996-05-28 19:05:11 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.131 1996-05-29 13:18:11 cg Exp $'
 ! !