# HG changeset patch # User Claus Gittinger # Date 1546968441 -3600 # Node ID 7a141e8186351b865f2153540f223e06b9cbbe3f # Parent 1df1200a60401a451c7e14f0719c301368ae7760 #FEATURE by cg class: EditTextView only one special character input view class definition changed: #release #specialCharacters diff -r 1df1200a6040 -r 7a141e818635 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