NewLauncher.st
changeset 3883 f14dd955891d
parent 3878 f773c6af5742
child 3885 436e7008bd59
--- a/NewLauncher.st	Thu Sep 19 11:05:29 2002 +0200
+++ b/NewLauncher.st	Thu Sep 19 11:12:10 2002 +0200
@@ -3490,6 +3490,9 @@
     SystemBrowser checkClassHistory.
 
     classHistory := SystemBrowser classHistory.
+    classHistory isEmpty ifTrue:[
+        ^ nil
+    ].
 
     menu := Menu new receiver: self.
     menu addItemGroup: 
@@ -3500,14 +3503,13 @@
                 activeHelpKey: #classesSystemBrowserOnClass
         ]
     ).
-    classHistory notEmpty ifTrue:[
-        menu addItem: (MenuItem new 
-                            label: 'Clear History'; 
-                            value: [classHistory removeAll]; 
-                            translateLabel: true;
-                            enabled:(classHistory notEmpty);
-                            activeHelpKey: #historyEmptyMenu).
-    ].
+    menu addItem: (MenuItem new 
+                        label: 'Clear History'; 
+                        value: [classHistory removeAll]; 
+                        translateLabel: true;
+                        enabled:(classHistory notEmpty);
+                        activeHelpKey: #historyEmptyMenu).
+
     menu findGuiResourcesIn:self.
     ^menu
 
@@ -3520,6 +3522,7 @@
     |menu dirHistory|
 
     dirHistory := FileBrowser directoryHistory.
+    dirHistory isEmpty ifTrue:[^nil].
 
     menu := Menu new receiver: self.
     menu addItemGroup: 
@@ -3530,14 +3533,13 @@
                 activeHelpKey: #FileBrowserOnDirectory
         ]
     ).
-    dirHistory notEmpty ifTrue:[
-        menu addItem: (MenuItem new 
-                            label: 'Clear History'; 
-                            value: [dirHistory removeAll]; 
-                            translateLabel: true;
-                            enabled:(dirHistory notEmpty);
-                            activeHelpKey: #historyEmptyMenu).
-    ].
+    menu addItem: (MenuItem new 
+                        label: 'Clear History'; 
+                        value: [dirHistory removeAll]; 
+                        translateLabel: true;
+                        enabled:(dirHistory notEmpty);
+                        activeHelpKey: #historyEmptyMenu).
+
     menu findGuiResourcesIn:self.
     ^menu
 ! !
@@ -4028,5 +4030,5 @@
 !NewLauncher class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/NewLauncher.st,v 1.260 2002-09-19 08:39:36 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/NewLauncher.st,v 1.261 2002-09-19 09:11:48 cg Exp $'
 ! !