comment/format in: #imageTool
authorClaus Gittinger <cg@exept.de>
Thu, 08 Oct 2009 10:16:21 +0200
changeset 2593 719725e66005
parent 2592 9f52f9ca9b93
child 2594 2e3885af5ea3
comment/format in: #imageTool changed: #tabChanged
MenuEditor.st
--- a/MenuEditor.st	Thu Oct 08 10:16:05 2009 +0200
+++ b/MenuEditor.st	Thu Oct 08 10:16:21 2009 +0200
@@ -1671,12 +1671,12 @@
 imageTool
     "get the image tool application
     "
-  ^ wizards at:#image ifAbsentPut:[ |tool|
-	tool := ResourceEditor new createBuilder.
-	tool masterApplication:self.
-	tool modifiedChannel: self enablingCommitButtonsHolder.
-	tool builder window:(ApplicationSubView new client:tool).
-	tool
+    ^ wizards at:#image ifAbsentPut:[ |tool|
+        tool := ResourceEditor new createBuilder.
+        tool masterApplication:self.
+        tool modifiedChannel: self enablingCommitButtonsHolder.
+        tool builder window:(ApplicationSubView new client:tool).
+        tool
     ]
 !
 
@@ -1968,32 +1968,45 @@
 !
 
 tabChanged
-    "called if the tab changed
-    "
+    "called if the tab changed"
+
     |tab selector item canvas wizardHolder|
 
     wizardHolder := self wizardHolder.
     item := self selectedItem.
-    item isNil ifTrue:[ ^ wizardHolder value:nil ].
+    item isNil ifTrue:[ 
+        wizardHolder value:nil. 
+        ^ self 
+    ].
 
     tab := tabHolder value.
 
     tab notNil ifTrue:[
-	tab := item slices detect:[:el| el first = tab ] ifNone:nil.
+        tab := item slices detect:[:el| el first = tab ] ifNone:nil.
     ].
     tab isNil ifTrue:[
-	^ tabHolder value:( listOfTabs at:1 ifAbsent:nil )
+        tabHolder value:( listOfTabs at:1 ifAbsent:nil ). 
+        ^ self.
     ].
     selector := tab last.
 
-    selector == #help  ifTrue:[ ^ wizardHolder value:(self helpTool  window) ].
-    selector == #image ifTrue:[ ^ wizardHolder value:(self imageTool window) ].
-
-    canvas := wizards at:(item class name, selector) asSymbol
-	      ifAbsentPut:[ SimpleView new client:self
-					     spec:(item class perform:selector)
-					  builder:(self builder)
-			  ].
+    selector == #help  ifTrue:[ 
+        wizardHolder value:(self helpTool  window). 
+        ^ self 
+    ].
+    selector == #image ifTrue:[ 
+        wizardHolder value:(self imageTool window). 
+        ^ self
+    ].
+
+    canvas := wizards 
+                at:(item class name, selector) asSymbol
+                ifAbsentPut:[ 
+                    SimpleView new 
+                        client:self
+                        spec:(item class perform:selector)
+                        builder:(self builder)
+                ].
 
     wizardHolder value:canvas.
 !
@@ -5323,13 +5336,15 @@
 !
 
 retrieverList
-    |list|
+    |list cls|
 
     list := builder bindingAt:#retrieverList.
-
     list isNil ifTrue:[
-	list := MenuEditor imageRetrieverClasses asList.
-	builder aspectAt:#retrieverList put:list.
+        list := MenuEditor imageRetrieverClasses asList.
+        builder aspectAt:#retrieverList put:list.
+    ].
+    (masterApplication notNil and:[ (cls := masterApplication specClass) notNil]) ifTrue:[
+        ^ (Array with:cls),list
     ].
     ^ list
 !