#FEATURE by cg
authorClaus Gittinger <cg@exept.de>
Tue, 08 Jan 2019 18:27:21 +0100
changeset 6517 7a141e818635
parent 6516 1df1200a6040
child 6518 7250c2e67839
#FEATURE by cg class: EditTextView only one special character input view class definition changed: #release #specialCharacters
EditTextView.st
--- a/EditTextView.st	Mon Jan 07 18:16:35 2019 +0100
+++ b/EditTextView.st	Tue Jan 08 18:27:21 2019 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
               All Rights Reserved
@@ -27,7 +29,8 @@
 		lastReplacementInfo completionSupport codeAspectHolder'
 	classVariableNames:'DefaultCursorBackgroundColor DefaultCursorForegroundColor
 		DefaultCursorNoFocusForegroundColor DefaultCursorType
-		DefaultCursorTypeNoFocus LastColumnNumberForSort Macros'
+		DefaultCursorTypeNoFocus LastColumnNumberForSort Macros
+		CharacterInputViewSingleton'
 	poolDictionaries:''
 	category:'Views-Text'
 !
@@ -6523,7 +6526,16 @@
     completionSupport notNil ifTrue:[
         completionSupport release
     ].
+    CharacterInputViewSingleton notNil ifTrue:[
+        CharacterInputViewSingleton consumingView == self ifTrue:[
+            CharacterInputViewSingleton closeRequest.
+            CharacterInputViewSingleton := nil
+        ]
+    ].
+
     super release
+
+    "Modified: / 08-01-2019 / 18:16:31 / Claus Gittinger"
 ! !
 
 !EditTextView methodsFor:'macros'!
@@ -7855,10 +7867,22 @@
 !
 
 specialCharacters
-    CharacterSetView
-        openAsInputFor:self
-        label:'Special Character Input'
-        clickLabel:'Click to Insert Character'.
+    "open the special characters input window"
+
+    "CharacterInputViewSingleton := nil"
+    
+    (CharacterInputViewSingleton notNil and:[CharacterInputViewSingleton isOpen]) ifTrue:[
+        CharacterInputViewSingleton consumingView:self.
+        CharacterInputViewSingleton topView raiseDeiconified.
+    ] ifFalse:[
+        CharacterInputViewSingleton :=
+            CharacterSetView
+                openAsInputFor:self
+                label:(resources string:'Special Character Input')
+                clickLabel:(resources string:'Click to Insert Character').
+    ].
+
+    "Modified (comment): / 08-01-2019 / 18:24:13 / Claus Gittinger"
 !
 
 splitLinesAtCharacterOrString