MenuEditor.st
changeset 414 116cf2acebe3
parent 412 330bf61c53b5
child 416 d28e8c5f25f3
equal deleted inserted replaced
413:ac37b2a972ff 414:116cf2acebe3
   610      
   610      
   611        #(#FullSpec
   611        #(#FullSpec
   612           #'window:' 
   612           #'window:' 
   613            #(#WindowSpec
   613            #(#WindowSpec
   614               #'name:' 'Menu Builder'
   614               #'name:' 'Menu Builder'
   615               #'layout:' #(#LayoutFrame 284 0 261 0 863 0 644 0)
   615               #'layout:' #(#LayoutFrame 171 0 270 0 750 0 653 0)
   616               #'label:' 'Menu Builder'
   616               #'label:' 'Menu Builder'
   617               #'min:' #(#Point 10 10)
   617               #'min:' #(#Point 10 10)
   618               #'max:' #(#Point 1152 900)
   618               #'max:' #(#Point 1152 900)
   619               #'bounds:' #(#Rectangle 284 261 864 645)
   619               #'bounds:' #(#Rectangle 171 270 751 654)
   620               #'menu:' #menu
   620               #'menu:' #menu
   621               #'usePreferredExtent:' false
   621               #'usePreferredExtent:' false
   622           )
   622           )
   623           #'component:' 
   623           #'component:' 
   624            #(#SpecCollection
   624            #(#SpecCollection
   625               #'collection:' 
   625               #'collection:' 
   626                #(
   626                #(
   627                  #(#MenuPanelSpec
   627                  #(#MenuPanelSpec
   628                     #'name:' 'menuToolbarView'
   628                     #'name:' 'menuToolbarView'
   629                     #'layout:' #(#LayoutFrame 0 0.0 0 0 0 1.0 34 0)
   629                     #'layout:' #(#LayoutFrame 0 0.0 0 0 0 1.0 32 0)
   630                     #'menu:' #menuToolbar
   630                     #'menu:' #menuToolbar
   631                     #'showSeparatingLines:' true
   631                     #'showSeparatingLines:' true
   632                 )
   632                 )
   633                  #(#VariableHorizontalPanelSpec
   633                  #(#VariableHorizontalPanelSpec
   634                     #'name:' 'variableHorizontalPanel1'
   634                     #'name:' 'variableHorizontalPanel1'
   635                     #'layout:' #(#LayoutFrame 0 0.0 36 0.0 0 1.0 -22 1.0)
   635                     #'layout:' #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -22 1.0)
   636                     #'component:' 
   636                     #'component:' 
   637                      #(#SpecCollection
   637                      #(#SpecCollection
   638                         #'collection:' 
   638                         #'collection:' 
   639                          #(
   639                          #(
   640                            #(#ArbitraryComponentSpec
   640                            #(#ArbitraryComponentSpec
  1603     [
  1603     [
  1604         ((YesNoBox title:'Menu item was modified!!\Save it?\' withCRs)        
  1604         ((YesNoBox title:'Menu item was modified!!\Save it?\' withCRs)        
  1605             noText:'No';
  1605             noText:'No';
  1606             yesText:'Yes';
  1606             yesText:'Yes';
  1607             showAtPointer;
  1607             showAtPointer;
  1608             accepted) ifFalse: [self modifiedChannel value: false. ^true].
  1608             accepted) 
       
  1609         ifFalse: 
       
  1610         [
       
  1611             self modifiedChannel value: false. 
       
  1612             isModified := false.
       
  1613             ^true
       
  1614         ].
  1609         self accept
  1615         self accept
  1610     ].
  1616     ].
  1611     ^true
  1617     ^true
  1612 !
  1618 !
  1613 
  1619 
  1834     holder addDependent:self.
  1840     holder addDependent:self.
  1835 !
  1841 !
  1836 
  1842 
  1837 loadFromMessage: aMessage
  1843 loadFromMessage: aMessage
  1838 
  1844 
  1839     ((aMessage size > 0) and: [self checkModified])
  1845     (((aMessage size > 0) and: [self checkMenuItemModified]) and: [self checkModified])
  1840     ifTrue:
  1846     ifTrue:
  1841     [
  1847     [
  1842         |readStream aClass aSelector|
  1848         |readStream aClass aSelector|
  1843         readStream := aMessage readStream.
  1849         readStream := aMessage readStream.
  1844         aClass := Smalltalk at: (readStream upTo: $ ) asSymbol.
  1850         aClass := Smalltalk at: (readStream upTo: $ ) asSymbol.
  1922     [
  1928     [
  1923         self helpTool helpKey:(self helpKey).
  1929         self helpTool helpKey:(self helpKey).
  1924         aspects do:[:anAspect| anAspect value:nil].
  1930         aspects do:[:anAspect| anAspect value:nil].
  1925         node contents toAspects:aspects
  1931         node contents toAspects:aspects
  1926     ].
  1932     ].
  1927     self modifiedChannel value: false
  1933     self modifiedChannel value: false.
  1928 
  1934     isModified := false
  1929 !
  1935 !
  1930 
  1936 
  1931 doBrowseAppClass
  1937 doBrowseAppClass
  1932     "open a browser on the class"
  1938     "open a browser on the class"
  1933 
  1939