MenuEditor.st
changeset 738 ebc4a399f4dc
parent 734 9fdcc26c458f
child 748 03bc27132916
--- a/MenuEditor.st	Fri Mar 20 19:08:02 1998 +0100
+++ b/MenuEditor.st	Fri Mar 20 19:09:34 1998 +0100
@@ -1,10 +1,10 @@
 "
- COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger
+ COPYRIGHT (c) 1997 by eXept Software AG
               All Rights Reserved
 
  This software is furnished under a license and may be used
  only in accordance with the terms of that license and with the
- inclusion of the above copyright notice.   This software may not
+ inclusion of the above copyright notice. This software may not
  be provided or otherwise made available to, or used by, any
  other person.  No title to or ownership of the software is
  hereby transferred.
@@ -12,7 +12,7 @@
 
 
 
-ListSpecEditor subclass:#MenuEditor
+ResourceSpecEditor subclass:#MenuEditor
 	instanceVariableNames:'specCanvas helpCanvas slices'
 	classVariableNames:''
 	poolDictionaries:''
@@ -39,12 +39,12 @@
 
 copyright
 "
- COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger
+ COPYRIGHT (c) 1997 by eXept Software AG
               All Rights Reserved
 
  This software is furnished under a license and may be used
  only in accordance with the terms of that license and with the
- inclusion of the above copyright notice.   This software may not
+ inclusion of the above copyright notice. This software may not
  be provided or otherwise made available to, or used by, any
  other person.  No title to or ownership of the software is
  hereby transferred.
@@ -74,29 +74,11 @@
 
 !MenuEditor class methodsFor:'instance creation'!
 
-openModalOnClass:aClass andSelector:aSelector
-    "Open modal a MenuEditor on aClass and aSelector"
-    "self openModalOnClass:self andSelector:#menu"
-
-    ^self new openModalOnClass:aClass andSelector:aSelector
-
-
-!
-
 openModalOnMenu: aMenu
     "Open a MenuEditor modal on aMenu"
     "self openModalOnMenu: (self perform: #menu) decodeAsLiteralArray"
 
     ^self new openModalOnMenu: aMenu
-!
-
-openOnClass:aClass andSelector:aSelector
-    "Open a MenuEditor on aClass and aSelector"
-    "self openOnClass:self andSelector:#menu"
-
-    ^self new openOnClass:aClass andSelector:aSelector
-
-
 ! !
 
 !MenuEditor class methodsFor:'accessing'!
@@ -149,14 +131,19 @@
 !MenuEditor class methodsFor:'help specs'!
 
 helpSpec
-    "return a dictionary filled with helpKey -> helptext associations.
-     These are used by the activeHelp tool."
+    "This resource specification was automatically generated
+     by the UIHelpTool of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the UIHelpTool may not be able to read the specification."
 
     "
-    UIHelpTool openOnClass:MenuEditor    
+     UIHelpTool openOnClass:MenuEditor    
     "
 
-  ^ super helpSpec addPairsFrom:#(
+    <resource: #help>
+
+    ^super helpSpec addPairsFrom:#(
 
 #addMenuItem
 'Adds a new menu item.'
@@ -248,9 +235,14 @@
 !MenuEditor class methodsFor:'image specs'!
 
 linkSubmenuImage
-    "Generated by the Image Editor"
+    "This resource specification was automatically generated
+     by the ImageEditor of ST/X."
+
+    "Do not manually edit this!!!! If it is corrupted,
+     the ImageEditor may not be able to read the specification."
+
     "
-    ImageEditor openOnClass:self andSelector:#linkSubmenuImage
+     ImageEditor openOnClass:self andSelector:#linkSubmenuImage
     "
 
     <resource: #image>
@@ -260,9 +252,14 @@
         ifAbsentPut:[(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@ADQDQDQDQDQDQH@D"H"H"H"H"H"K0@RH"H"H"H"H"H/@A????????????<@D@@@@@@@@@@@C0@PL3L0DQDQDQD_@A@3L3LBH"H"H"<@DCL3L3@"H"H"K0@PL3L3L0??????@A@@@@L3L@@@@@<@DQDQDCL3@PLAG0@RH"H"@3L0@3@/@AH"H"H L3L3L0<@G?????<CL3L3L@@P@@@@@@@3L3LO@ADQDQDQDP@CLA<@D"H"H"H"H LBK0@RH"H"H"H"@BH/@B????????????<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127 127 127 127]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]!
 
 menuItemImage
-    "Generated by the Image Editor"
+    "This resource specification was automatically generated
+     by the ImageEditor of ST/X."
+
+    "Do not manually edit this!!!! If it is corrupted,
+     the ImageEditor may not be able to read the specification."
+
     "
-    ImageEditor openOnClass:self andSelector:#menuItemImage
+     ImageEditor openOnClass:self andSelector:#menuItemImage
     "
 
     <resource: #image>
@@ -272,9 +269,14 @@
         ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUUQUUUUUUUPUUUUUUU_UUUUUUUPUUUUUUUP@@@@@@@@EUUUUUVAF*****+HF:?+::;@F:.+*?;@F:.+::;@F:.+*:;@F:.+::;@F*****+DK??????A@@@@@@@@UUUUUUUPUUUUUUUXUUUUUUUPUUUUUUUPUUUUUUUPUUUUUUUX') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@???<???<???<???<???<???<???<???<???<???<???<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]!
 
 menuSeparatorImage
-    "Generated by the Image Editor"
+    "This resource specification was automatically generated
+     by the ImageEditor of ST/X."
+
+    "Do not manually edit this!!!! If it is corrupted,
+     the ImageEditor may not be able to read the specification."
+
     "
-    ImageEditor openOnClass:self andSelector:#menuSeparatorImage
+     ImageEditor openOnClass:self andSelector:#menuSeparatorImage
     "
 
     <resource: #image>
@@ -284,9 +286,14 @@
         ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUURUUUUUUUPUUUUUUUPUUUUUUUPUUUUUUUP@@@@@@@@EUUUUUV@F*****+DF*****+CF?????+@F0@@@@[@F%UUUU[HF*****+@F*****+@K??????N@@@@@@@HUUUUUUUPUUUUUUUPUUUUUUUWUUUUUUUXUUUUUUUPUUUUUUUP') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@???<???<???<???<???<???<???<???<???<???<???<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]!
 
 submenuImage
-    "Generated by the Image Editor"
+    "This resource specification was automatically generated
+     by the ImageEditor of ST/X."
+
+    "Do not manually edit this!!!! If it is corrupted,
+     the ImageEditor may not be able to read the specification."
+
     "
-    ImageEditor openOnClass:self andSelector:#submenuImage
+     ImageEditor openOnClass:self andSelector:#submenuImage
     "
 
     <resource: #image>
@@ -298,10 +305,11 @@
 !MenuEditor class methodsFor:'interface specs'!
 
 basicsItemSpec
-    "this window spec was automatically generated by the ST/X UIPainter"
-
-    "do not manually edit this - the painter/builder may not be able to
-     handle the specification if its corrupted."
+    "This resource specification was automatically generated
+     by the UIPainter of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the UIPainter may not be able to read the specification."
 
     "
      UIPainter new openOnClass:MenuEditor andSelector:#basicsItemSpec
@@ -316,11 +324,11 @@
           #window: 
            #(#WindowSpec
               #name: 'Basics Item'
-              #layout: #(#LayoutFrame 184 0 332 0 450 0 650 0)
+              #layout: #(#LayoutFrame 473 0 301 0 739 0 619 0)
               #label: 'Basics Item'
               #min: #(#Point 10 10)
               #max: #(#Point 1160 870)
-              #bounds: #(#Rectangle 184 332 451 651)
+              #bounds: #(#Rectangle 473 301 740 620)
               #usePreferredExtent: false
           )
           #component: 
@@ -432,10 +440,11 @@
 !
 
 basicsLinkSpec
-    "this window spec was automatically generated by the ST/X UIPainter"
-
-    "do not manually edit this - the painter/builder may not be able to
-     handle the specification if its corrupted."
+    "This resource specification was automatically generated
+     by the UIPainter of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the UIPainter may not be able to read the specification."
 
     "
      UIPainter new openOnClass:MenuEditor andSelector:#basicsLinkSpec
@@ -450,11 +459,11 @@
           #window: 
            #(#WindowSpec
               #name: 'Basics Link'
-              #layout: #(#LayoutFrame 212 0 351 0 478 0 669 0)
+              #layout: #(#LayoutFrame 473 0 301 0 739 0 619 0)
               #label: 'Basics Link'
               #min: #(#Point 10 10)
               #max: #(#Point 1280 1024)
-              #bounds: #(#Rectangle 212 351 479 670)
+              #bounds: #(#Rectangle 473 301 740 620)
               #usePreferredExtent: false
           )
           #component: 
@@ -539,10 +548,11 @@
 !
 
 basicsMenuSpec
-    "this window spec was automatically generated by the ST/X UIPainter"
-
-    "do not manually edit this - the painter/builder may not be able to
-     handle the specification if its corrupted."
+    "This resource specification was automatically generated
+     by the UIPainter of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the UIPainter may not be able to read the specification."
 
     "
      UIPainter new openOnClass:MenuEditor andSelector:#basicsMenuSpec
@@ -557,11 +567,11 @@
           #window: 
            #(#WindowSpec
               #name: 'Basics Menu'
-              #layout: #(#LayoutFrame 212 0 351 0 478 0 669 0)
+              #layout: #(#LayoutFrame 473 0 301 0 739 0 619 0)
               #label: 'Basics Menu'
               #min: #(#Point 10 10)
               #max: #(#Point 1280 1024)
-              #bounds: #(#Rectangle 212 351 479 670)
+              #bounds: #(#Rectangle 473 301 740 620)
               #usePreferredExtent: false
           )
           #component: 
@@ -615,10 +625,11 @@
 !
 
 basicsRootSpec
-    "this window spec was automatically generated by the ST/X UIPainter"
-
-    "do not manually edit this - the painter/builder may not be able to
-     handle the specification if its corrupted."
+    "This resource specification was automatically generated
+     by the UIPainter of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the UIPainter may not be able to read the specification."
 
     "
      UIPainter new openOnClass:MenuEditor andSelector:#basicsRootSpec
@@ -633,11 +644,11 @@
           #window: 
            #(#WindowSpec
               #name: 'Basics Root'
-              #layout: #(#LayoutFrame 424 0 293 0 690 0 611 0)
+              #layout: #(#LayoutFrame 473 0 301 0 739 0 619 0)
               #label: 'Basics Root'
               #min: #(#Point 10 10)
               #max: #(#Point 1280 1024)
-              #bounds: #(#Rectangle 424 293 691 612)
+              #bounds: #(#Rectangle 473 301 740 620)
               #usePreferredExtent: false
           )
           #component: 
@@ -666,10 +677,11 @@
 !
 
 basicsSeparatorSpec
-    "this window spec was automatically generated by the ST/X UIPainter"
-
-    "do not manually edit this - the painter/builder may not be able to
-     handle the specification if its corrupted."
+    "This resource specification was automatically generated
+     by the UIPainter of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the UIPainter may not be able to read the specification."
 
     "
      UIPainter new openOnClass:MenuEditor andSelector:#basicsSeparatorSpec
@@ -684,11 +696,11 @@
           #window: 
            #(#WindowSpec
               #name: 'Basics Separator'
-              #layout: #(#LayoutFrame 297 0 354 0 563 0 672 0)
+              #layout: #(#LayoutFrame 473 0 301 0 739 0 619 0)
               #label: 'Basics Separator'
               #min: #(#Point 10 10)
               #max: #(#Point 1160 870)
-              #bounds: #(#Rectangle 297 354 564 673)
+              #bounds: #(#Rectangle 473 301 740 620)
               #usePreferredExtent: false
           )
           #component: 
@@ -733,10 +745,11 @@
 !
 
 detailsEditSpec
-    "this window spec was automatically generated by the ST/X UIPainter"
-
-    "do not manually edit this - the painter/builder may not be able to
-     handle the specification if its corrupted."
+    "This resource specification was automatically generated
+     by the UIPainter of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the UIPainter may not be able to read the specification."
 
     "
      UIPainter new openOnClass:MenuEditor andSelector:#detailsEditSpec
@@ -751,11 +764,11 @@
           #window: 
            #(#WindowSpec
               #name: 'Details Edit'
-              #layout: #(#LayoutFrame 263 0 364 0 521 0 651 0)
+              #layout: #(#LayoutFrame 332 0 374 0 590 0 661 0)
               #label: 'Details Edit'
               #min: #(#Point 10 10)
               #max: #(#Point 1280 1024)
-              #bounds: #(#Rectangle 263 364 522 652)
+              #bounds: #(#Rectangle 332 374 591 662)
               #usePreferredExtent: false
           )
           #component: 
@@ -824,6 +837,7 @@
                     #name: 'StartGroupPopUp'
                     #layout: #(#LayoutFrame 110 0 100 0 -5 1.0 122 0)
                     #label: 'PopUpList'
+                    #tabable: true
                     #model: #startGroup
                     #menu: 
                      #(nil
@@ -854,10 +868,11 @@
 !
 
 imageEditSpec
-    "this window spec was automatically generated by the ST/X UIPainter"
-
-    "do not manually edit this - the painter/builder may not be able to
-     handle the specification if its corrupted."
+    "This resource specification was automatically generated
+     by the UIPainter of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the UIPainter may not be able to read the specification."
 
     "
      UIPainter new openOnClass:MenuEditor andSelector:#imageEditSpec
@@ -872,11 +887,11 @@
           #window: 
            #(#WindowSpec
               #name: 'Image Item'
-              #layout: #(#LayoutFrame 263 0 364 0 507 0 505 0)
+              #layout: #(#LayoutFrame 473 0 301 0 717 0 442 0)
               #label: 'Image Item'
               #min: #(#Point 10 10)
               #max: #(#Point 1280 1024)
-              #bounds: #(#Rectangle 263 364 508 506)
+              #bounds: #(#Rectangle 473 301 718 443)
               #usePreferredExtent: false
           )
           #component: 
@@ -939,16 +954,17 @@
 !
 
 windowSpec
-    "this window spec was automatically generated by the ST/X UIPainter"
-
-    "do not manually edit this - the painter/builder may not be able to
-     handle the specification if its corrupted."
+    "This resource specification was automatically generated
+     by the UIPainter of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the UIPainter may not be able to read the specification."
 
     "
      UIPainter new openOnClass:MenuEditor andSelector:#windowSpec
      MenuEditor new openInterface:#windowSpec
+     MenuEditor open
     "
-    "MenuEditor open"
 
     <resource: #canvas>
 
@@ -958,11 +974,11 @@
           #window: 
            #(#WindowSpec
               #name: 'Menu Editor'
-              #layout: #(#LayoutFrame 100 0 374 0 679 0 757 0)
+              #layout: #(#LayoutFrame 473 0 301 0 1052 0 684 0)
               #label: 'Menu Editor'
               #min: #(#Point 10 10)
               #max: #(#Point 1152 900)
-              #bounds: #(#Rectangle 100 374 680 758)
+              #bounds: #(#Rectangle 473 301 1053 685)
               #menu: #menu
               #usePreferredExtent: false
           )
@@ -1034,10 +1050,11 @@
 !MenuEditor class methodsFor:'menu specs'!
 
 menu
-    "this window spec was automatically generated by the ST/X MenuEditor"
-
-    "do not manually edit this - the builder may not be able to
-     handle the specification if its corrupted."
+    "This resource specification was automatically generated
+     by the MenuEditor of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the MenuEditor may not be able to read the specification."
 
     "
      MenuEditor new openOnClass:MenuEditor andSelector:#menu
@@ -1142,6 +1159,20 @@
                 #submenuChannel: #menuHistory
             )
              #(#MenuItem
+                #label: 'Settings'
+                #submenu: 
+                 #(#Menu
+                    
+                     #(
+                       #(#MenuItem
+                          #label: 'Fonts'
+                          #submenuChannel: #menuFont
+                      )
+                    ) nil
+                    nil
+                )
+            )
+             #(#MenuItem
                 #label: 'Help'
                 #startGroup: #right
                 #activeHelpKey: #help
@@ -1153,10 +1184,11 @@
 !
 
 menuAdd
-    "this window spec was automatically generated by the ST/X MenuEditor"
-
-    "do not manually edit this - the builder may not be able to
-     handle the specification if its corrupted."
+    "This resource specification was automatically generated
+     by the MenuEditor of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the MenuEditor may not be able to read the specification."
 
     "
      MenuEditor new openOnClass:MenuEditor andSelector:#menuAdd
@@ -1203,10 +1235,11 @@
 !
 
 menuDefaultLink
-    "this window spec was automatically generated by the ST/X MenuEditor"
-
-    "do not manually edit this - the builder may not be able to
-     handle the specification if its corrupted."
+    "This resource specification was automatically generated
+     by the MenuEditor of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the MenuEditor may not be able to read the specification."
 
     "
      MenuEditor new openOnClass:MenuEditor andSelector:#menuDefaultLink
@@ -1216,12 +1249,12 @@
     <resource: #menu>
 
     ^
-     
+
        #(#Menu
-          
+
            #(
              #(#MenuItem
-                #'label:' '!! derives from application !!'
+                #'label:' '!!!! derives from application !!!!'
             )
           ) nil
           nil
@@ -1229,10 +1262,11 @@
 !
 
 menuEdit
-    "this window spec was automatically generated by the ST/X MenuEditor"
-
-    "do not manually edit this - the builder may not be able to
-     handle the specification if its corrupted."
+    "This resource specification was automatically generated
+     by the MenuEditor of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the MenuEditor may not be able to read the specification."
 
     "
      MenuEditor new openOnClass:MenuEditor andSelector:#menuEdit
@@ -1264,7 +1298,7 @@
                 #label: 'Paste'
                 #value: #doPaste
                 #activeHelpKey: #editPaste
-                #enabled: #hasAnySingleSelection
+                #enabled: #valueOfCanPaste
                 #shortcutKeyCharacter: #Paste
             )
              #(#MenuItem
@@ -1307,10 +1341,11 @@
 !
 
 menuToolbar
-    "this window spec was automatically generated by the ST/X MenuEditor"
-
-    "do not manually edit this - the builder may not be able to
-     handle the specification if its corrupted."
+    "This resource specification was automatically generated
+     by the MenuEditor of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the MenuEditor may not be able to read the specification."
 
     "
      MenuEditor new openOnClass:MenuEditor andSelector:#menuToolbar
@@ -1369,7 +1404,7 @@
                 #isButton: true
                 #value: #doPaste
                 #activeHelpKey: #editPaste
-                #enabled: #hasAnySingleSelection
+                #enabled: #valueOfCanPaste
                 #labelImage: #(#ResourceRetriever nil #pasteIcon)
             )
              #(#MenuItem
@@ -1602,10 +1637,10 @@
 
 !
 
-buildFromListSpec: aListSpec
+buildFromResourceSpec: aResourceSpec
 
     self buildFromMenu:  
-        (aListSpec class == Menu ifTrue: [aListSpec] ifFalse: [aListSpec decodeAsLiteralArray])
+        (aResourceSpec class == Menu ifTrue: [aResourceSpec] ifFalse: [aResourceSpec decodeAsLiteralArray])
 ! !
 
 !MenuEditor methodsFor:'change & update'!
@@ -1629,8 +1664,9 @@
             self valueOfEnableMovingUpOrDown value:(parent children size > 1).
             self valueOfEnableMovingOut      value:parent parent notNil.
             self hasValidSingleSelection     value:true.
-            self hasValidSelection           value:true.
-          ^ self
+            self hasValidSelection           value:true.      
+            self valueOfCanPaste             value: true & self valueOfCanPaste value.
+            ^self
         ]
     ]
     ifFalse:
@@ -1645,6 +1681,7 @@
     self valueOfEnableMovingOut      value:false.
     self hasValidSingleSelection     value:false.
     self hasValidSelection           value:state.
+    self valueOfCanPaste             value: false.
 ! !
 
 !MenuEditor methodsFor:'event handling'!
@@ -1670,21 +1707,6 @@
 
 ! !
 
-!MenuEditor methodsFor:'initialization'!
-
-initialize
-    "initialize value holders for the attributes of the menu components"
-
-    |holder|
-
-    super initialize.
-
-    aspects at:#seperatorSelection put:(holder := SelectionInList new).
-    holder list: Item separatorList.
-    holder addDependent:self.   
-
-! !
-
 !MenuEditor methodsFor:'private'!
 
 helpKey
@@ -1803,6 +1825,7 @@
         aspects do: [:holder| holder release].
         specCanvas client:self spec:(self class perform:(slices at:tabSelection) last) builder:builder.
         aspects do: [:holder| holder addDependent:self].
+        self updateFonts.
         specCanvas raise.
     ]    
 
@@ -1810,10 +1833,23 @@
 
 !MenuEditor methodsFor:'startup / release'!
 
+initialize
+    "initialize value holders for the attributes of the menu components"
+
+    |holder|
+
+    super initialize.
+
+    aspects at:#seperatorSelection put:(holder := SelectionInList new).
+    holder list: Item separatorList.
+    holder addDependent:self.   
+
+!
+
 openModalOnMenu: aMenu
     "build a tree from aMenu and open it modal"
 
-    super openModalOnListSpec: aMenu
+    super openModalOnResourceSpec: aMenu
 !
 
 postOpenWith:aBuilder
@@ -1871,12 +1907,7 @@
 
 doNew
 
-    self askForModification
-    ifTrue: 
-    [
-        self isStandAlone ifTrue: [specClass := specSelector := nil].
-        self buildFromClass: nil andSelector: #menu
-    ]
+    super doNew ifTrue: [self helpTool reset]
 !
 
 doPickAMenu
@@ -1920,10 +1951,8 @@
             , BANG , '\\'
 
             , specSelector , '\'
-            , '    "this window spec was automatically generated by the ST/X MenuEditor"\\'
-            , '    "do not manually edit this - the builder may not be able to\'
-            , '     handle the specification if its corrupted."\\'
-            , '    "\'
+            , (self class codeGenerationComment replChar:$!! withString:'!!!!')
+            , '\\    "\'
             , ('     MenuEditor new openOnClass:' , cls name , ' andSelector:#' , specSelector , '\')
             , ('     (Menu new fromLiteralArrayEncoding:(' , cls name , ' ' , specSelector , ')) startUp\')
             , '    "\'.
@@ -2498,7 +2527,6 @@
     self showDirectoryIndicatorForRoot: false.
     self selectConditionBlock: [:i|self application askForItemModification]. 
     self validateDoubleClickBlock: [:node| node ~~ listOfNodes first].
-
     self model iconAction: [:aNode| aNode contents iconFor: aNode].
     self model labelAction: [:aNode| aNode contents treeViewLabel]
 ! !