# HG changeset patch # User Claus Gittinger # Date 1254989781 -7200 # Node ID 719725e6600595f9cb943ebc7a7386f1ade3b9d2 # Parent 9f52f9ca9b93878efe89ee5d90564ff7728ae943 comment/format in: #imageTool changed: #tabChanged diff -r 9f52f9ca9b93 -r 719725e66005 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 !