MenuEditor.st
changeset 270 1a68f7479932
parent 266 dd70070d6652
child 275 cdecb5b5d356
--- a/MenuEditor.st	Tue Jul 29 16:54:52 1997 +0200
+++ b/MenuEditor.st	Thu Jul 31 14:29:58 1997 +0200
@@ -13,7 +13,7 @@
 
 
 ApplicationModel subclass:#MenuEditor
-	instanceVariableNames:'specClass tabSelection aspects slices activeHelpTool'
+	instanceVariableNames:'specClass tabSelection aspects slices activeHelpTool didInstall'
 	classVariableNames:''
 	poolDictionaries:''
 	category:'Interface-UIPainter'
@@ -1255,6 +1255,12 @@
     ^ self class menuDefaultLink
 !
 
+selectorName
+    ^ self painter selectorName
+
+    "Created: 31.7.1997 / 14:11:28 / cg"
+!
+
 specClass
     ^ specClass
 !
@@ -1314,8 +1320,9 @@
         painter selectedNodeChanged
     ].
     self modifiedChannel value:false.
-
-    "Modified: 28.7.1997 / 12:37:17 / cg"
+    didInstall := true
+
+    "Modified: 31.7.1997 / 14:25:34 / cg"
 !
 
 cancel
@@ -1513,6 +1520,15 @@
 
 !MenuEditor methodsFor:'queries'!
 
+didInstall
+    "returns true if the menu was installed
+    "
+
+    ^ didInstall ? false
+
+    "Created: 31.7.1997 / 14:24:24 / cg"
+!
+
 isHelpToolSelected
     "returns true if current selection is help tool
     "
@@ -1671,6 +1687,20 @@
 
 !MenuEditor methodsFor:'user interactions'!
 
+closeRequest
+    "close the window - confirm if changed without saving
+    "
+    self modifiedChannel value ifTrue:[
+        (self confirm:'quit without without saving your modifications ?') ifFalse:[
+            ^ self
+        ]
+    ].
+
+    super closeRequest.
+
+    "Modified: 31.7.1997 / 14:29:10 / cg"
+!
+
 doBrowseAppClass
     "open a browser on the class"