Launcher.st
changeset 1351 aa03062fd25b
parent 1350 c0fadccd111c
child 1352 4493ea0a2ee2
--- a/Launcher.st	Thu Oct 16 17:05:28 1997 +0200
+++ b/Launcher.st	Tue Oct 21 20:39:32 1997 +0200
@@ -10,7 +10,7 @@
  hereby transferred.
 "
 
-'From Smalltalk/X, Version:3.2.1 on 14-oct-1997 at 11:18:46 pm'                 !
+'From Smalltalk/X, Version:3.2.1 on 20-oct-1997 at 3:34:26 pm'                  !
 
 ApplicationModel subclass:#Launcher
 	instanceVariableNames:'myMenu buttonPanel transcript infoView projectInfoHolder helpIsOn
@@ -909,7 +909,7 @@
     moduleListUpdater value.
 
     box addButton:unloadButton.
-    box addAbortButtonLabelled:(resources string:'close').
+    box addAbortButtonLabelled:(resources string:'dismiss').
 
     y := box yPosition.
     listView2 topInset:(l preferredExtent y + 5).
@@ -923,7 +923,7 @@
     box destroy.
 
     "Modified: 17.9.1995 / 16:47:50 / claus"
-    "Modified: 8.1.1997 / 14:50:15 / cg"
+    "Modified: 18.10.1997 / 03:43:39 / cg"
 !
 
 snapshot
@@ -1773,7 +1773,7 @@
     box
         addHelpButtonFor:'Launcher/keyboardSetting.html';
         "addAbortButton;" 
-        addOkButton.
+        addOkButtonLabelled:(resources string:'dismiss').
 
     macroTextView topInset:(l preferredExtent y + 5).
     macroTextView bottomInset:(box preferredExtent y - y).
@@ -1786,7 +1786,7 @@
     box destroy
 
     "Modified: 9.9.1996 / 22:43:17 / stefan"
-    "Modified: 8.1.1997 / 14:52:55 / cg"
+    "Modified: 18.10.1997 / 03:39:41 / cg"
 !
 
 languageSetting 
@@ -2138,7 +2138,7 @@
 miscSettings
     "open a dialog on misc other settings"
 
-    |box check shadows takeFocus returnFocus
+    |box shadows takeFocus returnFocus
      hostNameInLabel showAccelerators 
      preemptive hostNameInLabelHolder|
 
@@ -2890,14 +2890,14 @@
 
     |listOfStyles resourceDir dir box 
      list listView scrView infoLabel infoForwarder newStyle
-     someRsrcFile|
+     someRsrcFile b|
 
     "
      search resources directory for a list of .style files ...
     "
     someRsrcFile := Smalltalk getSystemFileName:('resources' asFilename constructString:'normal.style').
     someRsrcFile notNil ifTrue:[
-	resourceDir := someRsrcFile asFilename directoryName
+        resourceDir := someRsrcFile asFilename directoryName
     ] ifFalse:[
         resourceDir := Smalltalk getSystemFileName:'resources'.
     ].
@@ -2911,7 +2911,7 @@
     listOfStyles := dir select:[:aFileName | aFileName asFilename hasSuffix:'style'].
     listOfStyles := listOfStyles collect:[:aFileName | aFileName asFilename withoutSuffix name].
     Filename isCaseSensitive ifFalse:[
-	listOfStyles := listOfStyles collect:[:aStyleName | aStyleName asLowercase].
+        listOfStyles := listOfStyles collect:[:aStyleName | aStyleName asLowercase].
     ].
     listOfStyles sort.
 
@@ -2957,7 +2957,10 @@
 
     (infoLabel := box addTextLabel:'\\' withCRs) adjust:#centerLeft.
 
-    box addAbortButton; addOkButton.
+    box addAbortButton.
+    b := box addButton:(Button label:(resources string:'apply')).
+    b action:[self changeViewStyleTo:(list selection)].
+    box addOkButton.
     list selection:(View defaultStyle).
 
     box stickAtBottomWithVariableHeight:scrView.
@@ -2965,19 +2968,11 @@
     box open.
 
     box accepted ifTrue:[
-        newStyle := list selection.
-        newStyle notNil ifTrue:[
-            self withWaitCursorDo:[
-                transcript showCR:'change style to ' , newStyle , ' ...'.
-                View defaultStyle:newStyle asSymbol.
-            ].
-            self reopenLauncher.
-            DebugView newDebugger.
-        ]
+        self changeViewStyleTo:(list selection).
     ].
     box destroy
 
-    "Modified: 24.6.1997 / 16:48:39 / cg"
+    "Modified: 20.10.1997 / 15:30:27 / cg"
 ! !
 
 !Launcher methodsFor:'actions - tools'!
@@ -3243,12 +3238,18 @@
      Even allow destroying non-smalltalk views
      (also for views which I forgot due to some error)"
 
-    |device p v id|
+    |device p v id i c|
 
     (Delay forSeconds:1) wait.
 
     device := Screen current.
-    p :=  device pointFromUser.
+    i := Image fromFile:'bitmaps/xpmBitmaps/cursors/cross2.xpm'.
+    i isNil ifTrue:[
+        c := Cursor crossHair
+    ] ifFalse:[
+        c := Cursor fromImage:i
+    ].
+    p :=  device pointFromUserShowing:c.
     id := device viewIdFromPoint:p.
     v := device viewFromId:id.
     v notNil ifTrue:[
@@ -3264,7 +3265,7 @@
     ].
 
     "Modified: 18.9.1995 / 23:13:32 / claus"
-    "Modified: 14.12.1995 / 22:02:26 / cg"
+    "Modified: 19.10.1997 / 03:09:20 / cg"
 !
 
 viewHardcopy
@@ -3282,7 +3283,7 @@
                       ] 
         afterSeconds:1
 
-    "Modified: 23.9.1996 / 14:36:48 / cg"
+    "Modified: 19.10.1997 / 03:09:34 / cg"
 !
 
 viewInspect
@@ -3873,7 +3874,7 @@
      Extracted into a separate method, to allow subclasses to
      add their own entries"
 
-    |l s icon|
+    |icon|
 
     myMenu labels:(resources array:#(
                                      about
@@ -4526,6 +4527,19 @@
 
 !Launcher methodsFor:'private'!
 
+changeViewStyleTo:newStyle
+    newStyle notNil ifTrue:[
+        self withWaitCursorDo:[
+            transcript showCR:'change style to ' , newStyle , ' ...'.
+            View defaultStyle:newStyle asSymbol.
+        ].
+        self reopenLauncher.
+        DebugView newDebugger.
+    ]
+
+    "Created: 20.10.1997 / 15:28:10 / cg"
+!
+
 findWindow:title
     "a helper for find & destroy and find & raise operations;
      let user choose a view and return it; return nil on cancel"
@@ -4759,7 +4773,8 @@
     ].
     ^ v
 
-    "Modified: 8.1.1997 / 14:59:57 / cg"
+    "Created: 19.10.1997 / 03:04:53 / cg"
+    "Modified: 19.10.1997 / 03:42:00 / cg"
 !
 
 reopenLauncher
@@ -4836,5 +4851,5 @@
 !Launcher class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.296 1997-10-16 15:05:28 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.297 1997-10-21 18:39:32 cg Exp $'
 ! !