NewLauncher has got its own (global) active help
authortz
Wed, 28 Jan 1998 15:44:31 +0100
changeset 1429 aa6ce97097dc
parent 1428 180d03d00db4
child 1430 c3a8341ecd43
NewLauncher has got its own (global) active help
NewLauncher.st
--- a/NewLauncher.st	Wed Jan 28 13:33:28 1998 +0100
+++ b/NewLauncher.st	Wed Jan 28 15:44:31 1998 +0100
@@ -13,7 +13,8 @@
 
 
 ToolApplicationModel subclass:#NewLauncher
-	instanceVariableNames:'transcript isMainLauncher settingsSelection settingsAspects'
+	instanceVariableNames:'transcript isMainLauncher settingsSelection settingsAspects
+		helpIsOn'
 	classVariableNames:'OpenLaunchers NotifyingEmergencyHandler'
 	poolDictionaries:''
 	category:'Interface-Advanced-Tools'
@@ -1125,18 +1126,26 @@
           
            #(
              #(#MenuItem
+                #'label:' 'open workspace'
+                #'isButton:' true
+                #'value:' #'openApplication:'
+                #'argument:' 'Workspace'
+                #'labelImage:' #(#ResourceRetriever nil #startWorkspaceIcon)
+            )
+             #(#MenuItem
+                #'label:' 'open file browser'
+                #'isButton:' true
+                #'value:' #'openApplication:'
+                #'argument:' 'FileBrowser'
+                #'labelImage:' #(#ResourceRetriever nil #startFileBrowserIcon)
+            )
+             #(#MenuItem
                 #'label:' 'save image'
                 #'isButton:' true
                 #'value:' #saveImage
                 #'labelImage:' #(#ResourceRetriever nil #saveImageIcon)
             )
              #(#MenuItem
-                #'label:' 'garbage collect'
-                #'isButton:' true
-                #'value:' #compressingGarbageCollect
-                #'labelImage:' #(#ResourceRetriever nil #garbageCollectIcon)
-            )
-             #(#MenuItem
                 #'label:' '-'
             )
              #(#MenuItem
@@ -1148,13 +1157,6 @@
                 #'labelImage:' #(#ResourceRetriever nil #startSystemBrowserIcon)
             )
              #(#MenuItem
-                #'label:' 'open file browser'
-                #'isButton:' true
-                #'value:' #'openApplication:'
-                #'argument:' 'FileBrowser'
-                #'labelImage:' #(#ResourceRetriever nil #startFileBrowserIcon)
-            )
-             #(#MenuItem
                 #'label:' 'open changes browser'
                 #'isButton:' true
                 #'value:' #'openApplication:'
@@ -1162,13 +1164,6 @@
                 #'labelImage:' #(#ResourceRetriever nil #startChangesBrowserIcon)
             )
              #(#MenuItem
-                #'label:' 'open workspace'
-                #'isButton:' true
-                #'value:' #'openApplication:'
-                #'argument:' 'Workspace'
-                #'labelImage:' #(#ResourceRetriever nil #startWorkspaceIcon)
-            )
-             #(#MenuItem
                 #'label:' '-'
             )
              #(#MenuItem
@@ -1192,6 +1187,15 @@
                 #'argument:' 'ImageEditor'
                 #'labelImage:' #(#ResourceRetriever nil #startImageEditorIcon)
             )
+             #(#MenuItem
+                #'label:' '-'
+            )
+             #(#MenuItem
+                #'label:' 'garbage collect'
+                #'isButton:' true
+                #'value:' #compressingGarbageCollect
+                #'labelImage:' #(#ResourceRetriever nil #garbageCollectIcon)
+            )
           ) nil
           nil
       )
@@ -3418,6 +3422,11 @@
 
 !NewLauncher methodsFor:'action - help'!
 
+activeHelp
+
+    ^helpIsOn ? (helpIsOn := false)
+!
+
 showBookPrintDocument
     "open an HTML browser on the 'book'-printing document"
 
@@ -3486,13 +3495,14 @@
 toggleActiveHelp:aBoolean
     "turn on/off active help"
 
-    ActiveHelp notNil 
-    ifTrue:
-    [
-        (activeHelp := aBoolean) 
-            ifTrue: [ActiveHelp start]
-            ifFalse:[ActiveHelp stop]
-    ]
+    ActiveHelp notNil ifTrue:[
+        helpIsOn := aBoolean.
+        helpIsOn ifTrue:[
+            ActiveHelp start
+        ] ifFalse:[
+            ActiveHelp stop
+        ]
+    ].
 
 ! !
 
@@ -4126,7 +4136,7 @@
 
         b action:[
             |f|
-                                self halt.
+
             f := FontPanel 
                 fontFromUserInitial:(model value) 
                               title:(resources string:'font for %1' with:title)
@@ -4136,7 +4146,7 @@
                     models do:[:m | m value:f].
                     labels do:[:l | l font:f]
                 ] ifFalse:[
-                    model value:f.  self halt.
+                    model value:f.  
                     lbl font:f.
                 ].
             ]
@@ -6779,5 +6789,5 @@
 !NewLauncher class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/NewLauncher.st,v 1.12 1998-01-27 16:34:32 tz Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/NewLauncher.st,v 1.13 1998-01-28 14:44:31 tz Exp $'
 ! !