changed: #recentlyOpenedApplicationsMenu
authorClaus Gittinger <cg@exept.de>
Thu, 12 Nov 2009 19:05:50 +0100
changeset 9254 f3c13516fdaa
parent 9253 684c9ecf8d17
child 9255 53183b7ac2ab
changed: #recentlyOpenedApplicationsMenu care for no longer existing classes
NewLauncher.st
--- a/NewLauncher.st	Thu Nov 12 17:25:59 2009 +0100
+++ b/NewLauncher.st	Thu Nov 12 19:05:50 2009 +0100
@@ -4188,10 +4188,24 @@
     menu := Menu new receiver: self.
     menu addItemGroup: 
         (appHistory collect:[:appClassName|
-            MenuItem new 
-                label: (Smalltalk classNamed:appClassName) nameWithoutPrefix; 
+            |item appClass label|
+
+            appClass := Smalltalk classNamed:appClassName.
+            appClass isNil ifTrue:[
+                label := appClassName.
+            ] ifFalse:[
+                label := appClass nameWithoutPrefix
+            ].
+            item := MenuItem new 
+                label: label; 
                 value: #openApplication:; 
                 argument: appClassName. 
+
+            appClass isNil ifTrue:[
+                item enabled:false.
+                item label:(LabelAndIcon icon:(ToolbarIconLibrary erase16x16Icon2) string:appClassName)
+            ].
+            item
         ]
     ).
     menu addItem: (MenuItem new 
@@ -4724,9 +4738,9 @@
 !NewLauncher class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/NewLauncher.st,v 1.399 2009-11-07 13:34:17 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/NewLauncher.st,v 1.400 2009-11-12 18:05:50 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/NewLauncher.st,v 1.399 2009-11-07 13:34:17 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/NewLauncher.st,v 1.400 2009-11-12 18:05:50 cg Exp $'
 ! !