MenuEditor.st
changeset 422 f85de4fc2a2c
parent 418 f47e99ae91bc
child 432 d35dccaa804c
--- a/MenuEditor.st	Sat Jan 17 18:13:47 1998 +0100
+++ b/MenuEditor.st	Sat Jan 17 18:16:05 1998 +0100
@@ -612,11 +612,11 @@
           #'window:' 
            #(#WindowSpec
               #'name:' 'Menu Builder'
-              #'layout:' #(#LayoutFrame 171 0 270 0 750 0 653 0)
+              #'layout:' #(#LayoutFrame 88 0 229 0 667 0 612 0)
               #'label:' 'Menu Builder'
               #'min:' #(#Point 10 10)
               #'max:' #(#Point 1152 900)
-              #'bounds:' #(#Rectangle 171 270 751 654)
+              #'bounds:' #(#Rectangle 88 229 668 613)
               #'menu:' #menu
               #'usePreferredExtent:' false
           )
@@ -660,33 +660,11 @@
                                         #'useIndex:' true
                                         #'canvas:' #noteBookView
                                     )
-                                     #(#HorizontalPanelViewSpec
-                                        #'name:' 'confirmationPanel'
-                                        #'layout:' #(#LayoutFrame 1 0.0 -24 1 0 1.0 0 1.0)
-                                        #'component:' 
-                                         #(#SpecCollection
-                                            #'collection:' 
-                                             #(
-                                               #(#ActionButtonSpec
-                                                  #'name:' 'cancelButton'
-                                                  #'label:' 'Cancel'
-                                                  #'model:' #cancel
-                                                  #'enableChannel:' #modifiedChannel
-                                                  #'extent:' #(#Point 171 24)
-                                              )
-                                               #(#ActionButtonSpec
-                                                  #'name:' 'acceptButton'
-                                                  #'label:' 'OK'
-                                                  #'model:' #accept
-                                                  #'enableChannel:' #modifiedChannel
-                                                  #'extent:' #(#Point 171 24)
-                                              )
-                                            )
-                                        )
-                                        #'horizontalLayout:' #fitSpace
-                                        #'verticalLayout:' #fit
-                                        #'horizontalSpace:' 3
-                                        #'verticalSpace:' 3
+                                     #(#UISubSpecification
+                                        #'name:' 'SubSpecification'
+                                        #'layout:' #(#LayoutFrame 2 0.0 -26 1 -2 1.0 -2 1.0)
+                                        #'majorKey:' #ToolApplicationModel
+                                        #'minorKey:' #windowSpecForCommit
                                     )
                                   )
                               )
@@ -1469,15 +1447,6 @@
     ^builder booleanValueAspectFor: #hasValidSingleSelection
 !
 
-modifiedChannel
-
-    |holder|
-    (holder := builder bindingAt:#modifiedChannel) isNil ifTrue:[
-        builder aspectAt:#modifiedChannel put:(holder :=  false asValue).
-    ].
-    ^ holder
-!
-
 noteBookView
 
     |noteBook helpTool|
@@ -1492,7 +1461,7 @@
 
         helpCanvas client:helpTool.
         helpTool masterApplication:self.
-        helpTool modifiedHolder: self modifiedChannel.
+        helpTool modifiedHolder: self valueOfEnablingCommitButtons.
 
         builder aspectAt:#noteBookView put:noteBook.
     ].
@@ -1538,7 +1507,7 @@
 update:something with:aParameter from:changedObject
     "one of my value holders has changed its value, so let me set the editing menu as modified"            
 
-    self modifiedChannel value: true
+    self valueOfEnablingCommitButtons value: true
 !
 
 updateEnabledChannels
@@ -1598,7 +1567,7 @@
 checkMenuItemModified
     "check menu item modification"
 
-    self modifiedChannel value
+    self valueOfEnablingCommitButtons value
     ifTrue:
     [
         ((YesNoBox title:'Menu item was modified!!\Save it?\' withCRs)        
@@ -1608,7 +1577,7 @@
             accepted) 
         ifFalse: 
         [
-            self modifiedChannel value: false. 
+            self valueOfEnablingCommitButtons value: false. 
             isModified := false.
             ^true
         ].
@@ -1749,7 +1718,7 @@
 
     |oldClass newClass|
 
-    self modifiedChannel value: false.
+    self valueOfEnablingCommitButtons value: false.
     oldClass := self specClass.
     self specClass:aClass.
     newClass := self specClass.
@@ -1917,7 +1886,7 @@
             self treeView updateNode: (node contents buildFromAspects: aspects)
         ]
     ].
-    self modifiedChannel value:false.
+    self valueOfEnablingCommitButtons value:false.
     isModified := true
 !
 
@@ -1932,7 +1901,7 @@
         aspects do:[:anAspect| anAspect value:nil].
         node contents toAspects:aspects
     ].
-    self modifiedChannel value: false.
+    self valueOfEnablingCommitButtons value: false.
     isModified := false
 !
 
@@ -1984,20 +1953,13 @@
         resourceClass := (readStream upTo: $ ) asSymbol.
         resourceSelector := readStream upToEnd asSymbol.
         resourceClass size > 0 ifTrue: [(aspects at:#retriever) value: resourceClass].
-        resourceSelector size > 0 ifTrue: [(aspects at:#icon) value: resourceSelector. self modifiedChannel value: true]
+        resourceSelector size > 0 ifTrue: [(aspects at:#icon) value: resourceSelector. self valueOfEnablingCommitButtons value: true]
     ]
 !
 
 doFromClass
 
-    "aspects at:#classNameChannel  put:(self specClass asValue).
-    aspects at:#methodNameChannel put:(self painter selectorName asValue).
-
-    (self openDialogInterface:#classAndMethodSpec) ifTrue:[
-        self buildFrom:(aspects at:#classNameChannel) value
-           andSelector:(aspects at:#methodNameChannel) value
-    ]."
-    self loadFromInClassesOf:  #Object
+    self loadFromInClassesOf: #Object
 !
 
 doInstallHelp