UIPainterView.st
changeset 121 96d6feeeb049
parent 119 39acd704ad51
child 128 9779b7459a1c
--- a/UIPainterView.st	Fri May 23 16:28:06 1997 +0200
+++ b/UIPainterView.st	Sat May 24 05:07:29 1997 +0200
@@ -65,7 +65,7 @@
 defaultMenuMessage   
     "This message is the default yo be sent to the menuHolder to get a menu
     "
-    ^ #menu
+    ^ #showMiddleButtonMenu
 
 
 ! !
@@ -992,12 +992,32 @@
 
 !UIPainterView methodsFor:'menus'!
 
-menu
-    "returns middle-button menu dependent on the selection
+showFontPanel
+    |action theFont fontPanel|
+
+    fontPanel := FontPanel new. 
+
+    selection notNil ifTrue:[
+        action := [:aFontDescription | theFont := aFontDescription].
+        fontPanel action:action.
+        fontPanel showAtPointer.
+        fontPanel destroy.
+        theFont notNil ifTrue:[
+            self changeFont:theFont
+        ]
+    ]
+
+    "Modified: 10.4.1997 / 10:06:15 / cg"
+!
+
+showMiddleButtonMenu
+    "show the middle button menu; this returns nil
     "
     |menu canPaste|
 
-    self enabled ifFalse:[^ nil ].
+    self enabled ifFalse:[
+        ^ nil
+    ].
     menu := MenuPanel fromSpec:(self class menu) receiver:self.
 
     canPaste := self canPaste:(self getSelection).
@@ -1014,28 +1034,11 @@
     ].
 
     menu enabledAt:#undo put:(undoHistory notEmpty).
-  ^ menu
+    menu startUp.
+  ^ nil
 
 
 
-!
-
-showFontPanel
-    |action theFont fontPanel|
-
-    fontPanel := FontPanel new. 
-
-    selection notNil ifTrue:[
-        action := [:aFontDescription | theFont := aFontDescription].
-        fontPanel action:action.
-        fontPanel showAtPointer.
-        fontPanel destroy.
-        theFont notNil ifTrue:[
-            self changeFont:theFont
-        ]
-    ]
-
-    "Modified: 10.4.1997 / 10:06:15 / cg"
 ! !
 
 !UIPainterView methodsFor:'misc'!
@@ -1738,11 +1741,10 @@
     "initialize for a painter
     "
     painter := aPainter.
+    disabledChanged := false.
     self list:(OrderedCollection new).
     propertyList := OrderedCollection new.
     self selection:#().
-    disabledChanged := false.
-    painter := aPainter.
     self addDependent:painter.
 
 ! !