# HG changeset patch # User Stefan Vogel # Date 1384869195 -3600 # Node ID 2e041c36645ddd491235f8f914716703d2cfea35 # Parent 324a18e15064284d6f219590e939e25d30fa9aae class: NewLauncher changed: #addMenuItem:from:in:position:space: message as infoPrint instead of Transcript message diff -r 324a18e15064 -r 2e041c36645d NewLauncher.st --- a/NewLauncher.st Fri Nov 15 04:26:19 2013 +0000 +++ b/NewLauncher.st Tue Nov 19 14:53:15 2013 +0100 @@ -985,57 +985,57 @@ and:[ Transcript isView and:[ (launcherApp := Transcript application) notNil and:[ launcherApp isKindOf:self]]]) ifTrue:[ - "/ add to instance - launcherApp addMenuItem:newItem from:anApplicationWhichProvidesResourcesOrNil in:where position:positionSpecOrNilArg space:space. - ^ self + "/ add to instance + launcherApp addMenuItem:newItem from:anApplicationWhichProvidesResourcesOrNil in:where position:positionSpecOrNilArg space:space. + ^ self ]. positionSpecOrNil := positionSpecOrNilArg. positionSpecOrNil isArray ifTrue:[ - positionSpecOrNil size > 1 ifTrue:[ - itemNameOrNil := positionSpecOrNil at:2. - ]. - positionSpecOrNil := positionSpecOrNil at:1. + positionSpecOrNil size > 1 ifTrue:[ + itemNameOrNil := positionSpecOrNil at:2. + ]. + positionSpecOrNil := positionSpecOrNil at:1. ]. before := (positionSpecOrNil == #first) or:[positionSpecOrNil == #before]. (where isNil or: [where = 'toolbar']) ifTrue:[ - UserAddedToolBarItems isNil ifTrue: [UserAddedToolBarItems := Dictionary new]. - (UserAddedToolBarItems contains:[:info | info item nameKey = newItem nameKey]) - ifTrue:[ - Transcript show:'NewLauncher class: menu item already present:'; showCR:newItem nameKey. - ] - ifFalse:[ - UserAddedToolBarItems - at:newItem put:(AddedToolInfo new - item:newItem; - resourceProvider:anApplicationWhichProvidesResourcesOrNil; - where:where; - positionSpec:positionSpecOrNilArg; - space:space; - before:before; - menuWithNewItem:nil; - yourself) - ] + UserAddedToolBarItems isNil ifTrue: [UserAddedToolBarItems := Dictionary new]. + (UserAddedToolBarItems contains:[:info | info item nameKey = newItem nameKey]) + ifTrue:[ + 'NewLauncher class: menu item already present:' infoPrint. newItem nameKey infoPrintCR. + ] + ifFalse:[ + UserAddedToolBarItems + at:newItem put:(AddedToolInfo new + item:newItem; + resourceProvider:anApplicationWhichProvidesResourcesOrNil; + where:where; + positionSpec:positionSpecOrNilArg; + space:space; + before:before; + menuWithNewItem:nil; + yourself) + ] ]. (where isNil or:[where startsWith:'menu']) ifTrue:[ - UserAddedMenuItems isNil ifTrue: [UserAddedMenuItems := Dictionary new]. - (UserAddedMenuItems contains:[:info | info item nameKey = newItem nameKey]) - ifTrue:[ - Transcript show:'NewLauncher class: menu item already present:'; showCR:newItem nameKey. - ] - ifFalse:[ - UserAddedMenuItems - at:newItem put:(AddedToolInfo new - item:newItem; - resourceProvider:anApplicationWhichProvidesResourcesOrNil; - where:where; - positionSpec:positionSpecOrNilArg; - space:space; - before:before; - menuWithNewItem:nil; - yourself) - ] + UserAddedMenuItems isNil ifTrue: [UserAddedMenuItems := Dictionary new]. + (UserAddedMenuItems contains:[:info | info item nameKey = newItem nameKey]) + ifTrue:[ + Transcript show:'NewLauncher class: menu item already present:'; showCR:newItem nameKey. + ] + ifFalse:[ + UserAddedMenuItems + at:newItem put:(AddedToolInfo new + item:newItem; + resourceProvider:anApplicationWhichProvidesResourcesOrNil; + where:where; + positionSpec:positionSpecOrNilArg; + space:space; + before:before; + menuWithNewItem:nil; + yourself) + ] ] "Modified: / 09-08-2011 / 22:39:44 / cg" @@ -3811,7 +3811,7 @@ "/ look if not already in the toolBar (self findItem:newItem inMenuPanel:menuPanel) ~~ 0 ifTrue:[ "item already exists - do nothing" - Transcript show:'NewLauncher: menu item already present:'; showCR:newItem nameKey. + 'NewLauncher: menu item already present:' infoPrint. newItem nameKey infoPrintCR. ^ self. ]. @@ -5077,14 +5077,14 @@ !NewLauncher class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libtool/NewLauncher.st,v 1.481 2013-10-30 08:49:51 cg Exp $' + ^ '$Header: /cvs/stx/stx/libtool/NewLauncher.st,v 1.482 2013-11-19 13:53:15 stefan Exp $' ! version_CVS - ^ '$Header: /cvs/stx/stx/libtool/NewLauncher.st,v 1.481 2013-10-30 08:49:51 cg Exp $' + ^ '$Header: /cvs/stx/stx/libtool/NewLauncher.st,v 1.482 2013-11-19 13:53:15 stefan Exp $' ! version_SVN - ^ '$Id: NewLauncher.st,v 1.481 2013-10-30 08:49:51 cg Exp $' + ^ '$Id: NewLauncher.st,v 1.482 2013-11-19 13:53:15 stefan Exp $' ! !