--- a/TextView.st Thu May 12 17:30:15 2016 +0200
+++ b/TextView.st Thu May 12 21:27:28 2016 +0200
@@ -2238,8 +2238,18 @@
^ self
].
- modal := (UserPreferences current searchDialogIsModal). "/ thats experimental
-
+ modal := (UserPreferences current searchDialogIsModal). "/ that's experimental
+
+ (searchBox := self objectAttributeAt:#currentModelessSearchBox) notNil ifTrue:[
+ (modal not
+ and:[ searchBox created ]) ifTrue:[
+ "/ reuse it.
+ searchBox raiseDeiconified.
+ ^ self.
+ ].
+ searchBox closeRequest.
+ ].
+
ign := lastSearchIgnoredCase "? LastSearchIgnoredCase " ? true.
caseHolder := ign not asValue.
@@ -2342,7 +2352,7 @@
].
].
- replaceAction := [ self replace:replacement ].
+ replaceAction := [ self replace:replacement ]. "/ not implemented here, but in subclasses
replacePreserveCaseBooleanHolder value ifTrue:[
replaceAction := [
self selectionAsString isUppercaseFirst ifTrue:[
@@ -2464,6 +2474,7 @@
] ifFalse:[
searchBox := ApplicationModel new.
searchBox createBuilder.
+ bindings at:#cancel put:[ searchBox closeRequest ].
].
searchBox resources:(self resources).
@@ -2489,10 +2500,11 @@
self topView beMaster.
searchBox window
beSlave;
- openInGroup:(self windowGroup).
-
- "/ searchBox window open.
- searchBox window assignKeyboardFocusToFirstKeyboardConsumer.
+ openInGroup:(self windowGroup);
+ waitUntilVisible;
+ assignKeyboardFocusToFirstKeyboardConsumer.
+ "/ remember this box for me.
+ self objectAttributeAt:#currentModelessSearchBox put:searchBox.
]
"Modified: / 11-07-2006 / 11:18:38 / fm"