changed:
authorClaus Gittinger <cg@exept.de>
Thu, 01 Oct 2009 18:21:26 +0200
changeset 8840 ce75492303ff
parent 8839 792607726eb6
child 8841 1d68b729187c
changed: #codeView #scrollableCodeView #setUpScrollableCodeView slight refactoring
Tools_NavigationState.st
--- a/Tools_NavigationState.st	Thu Oct 01 15:44:55 2009 +0200
+++ b/Tools_NavigationState.st	Thu Oct 01 18:21:26 2009 +0200
@@ -337,7 +337,7 @@
 
 codeView
     codeView isNil ifTrue:[
-        self setUpScrollableCodeView
+        codeView := self scrollableCodeView scrolledView
     ].
     ^ codeView
 !
@@ -359,43 +359,41 @@
 
 scrollableCodeView
     scrollableCodeView isNil ifTrue:[
-        self setUpScrollableCodeView.
+        scrollableCodeView := self setUpScrollableCodeView.
     ].
     ^ scrollableCodeView
 !
 
 setUpScrollableCodeView
-    |v|
+    |v aScrollableCodeView codeView|
 
-    scrollableCodeView isNil ifTrue:[
-        scrollableCodeView := HVScrollableView for:CodeView.
-        scrollableCodeView name:'CodeView'.
-        scrollableCodeView horizontalMini:true.
-        codeView := scrollableCodeView scrolledView.
-        codeView modifiedChannel:self codeModifiedHolder.
-        codeView model: self codeHolder.
-        codeView canTab:true.
+    aScrollableCodeView := HVScrollableView for:CodeView.
+    aScrollableCodeView name:'CodeView'.
+    aScrollableCodeView horizontalMini:true.
+    codeView := aScrollableCodeView scrolledView.
+    codeView modifiedChannel:self codeModifiedHolder.
+    codeView model: self codeHolder.
+    codeView canTab:true.
 
-        UserPreferences current showAcceptCancelBarInBrowser ifTrue:[
-            ViewWithAcceptAndCancelBar notNil ifTrue:[
-                v := ViewWithAcceptAndCancelBar new.
-                v slaveView:scrollableCodeView.
-                v reallyModifiedHolder:self realModifiedStateHolder.
-                v cancelAction:[
-                        codeView setClipboardText:(codeView contents).   "/ for undo
-                        codeView application 
-                            delayedUpdateCodeWithAutoSearch:false checkModified:false.
-                        codeView requestFocus. 
-                    ].
-                v compareAction:[ 
-                        codeView application doCompareIn:self.
-                        codeView requestFocus 
-                    ].
-                scrollableCodeView := v.
-            ]
-        ].
+    UserPreferences current showAcceptCancelBarInBrowser ifTrue:[
+        ViewWithAcceptAndCancelBar notNil ifTrue:[
+            v := ViewWithAcceptAndCancelBar new.
+            v slaveView:aScrollableCodeView.
+            v reallyModifiedHolder:self realModifiedStateHolder.
+            v cancelAction:[
+                    codeView setClipboardText:(codeView contents).   "/ for undo
+                    codeView application 
+                        delayedUpdateCodeWithAutoSearch:false checkModified:false.
+                    codeView requestFocus. 
+                ].
+            v compareAction:[ 
+                    codeView application doCompareIn:self.
+                    codeView requestFocus 
+                ].
+            aScrollableCodeView := v.
+        ]
     ].
-    ^ scrollableCodeView
+    ^ aScrollableCodeView
 
     "Modified: / 15-03-2007 / 16:26:33 / cg"
 !
@@ -1285,5 +1283,9 @@
 !NavigationState class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools_NavigationState.st,v 1.28 2009-09-21 20:47:21 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools_NavigationState.st,v 1.29 2009-10-01 16:21:26 cg Exp $'
+!
+
+version_CVS
+    ^ '$Header: /cvs/stx/stx/libtool/Tools_NavigationState.st,v 1.29 2009-10-01 16:21:26 cg Exp $'
 ! !