changed:
authorClaus Gittinger <cg@exept.de>
Mon, 04 Jul 2011 15:57:00 +0200
changeset 10122 72f78f096b3d
parent 10121 9ffc433015ec
child 10123 0d5b88705337
changed: #addFirst: #canGoBack
Tools__NavigationHistory.st
--- a/Tools__NavigationHistory.st	Mon Jul 04 15:52:25 2011 +0200
+++ b/Tools__NavigationHistory.st	Mon Jul 04 15:57:00 2011 +0200
@@ -103,6 +103,9 @@
     "backward compatible list protocol"
 
     items addFirst:anEntry.
+    items size > 30 ifTrue:[
+        items removeLast
+    ].
     self changed: #value with: anEntry.
 
     "Created: / 03-07-2011 / 13:26:48 / cg"
@@ -248,8 +251,11 @@
 !NavigationHistory methodsFor:'queries'!
 
 canGoBack
+    isGlobalHistory ifTrue:[
+        ^ items size > 2
+    ].
 
-    ^position > 1
+    ^ position > 1
 
     "Created: / 21-02-2008 / 16:40:48 / janfrog"
 !
@@ -264,7 +270,7 @@
 !NavigationHistory class methodsFor:'documentation'!
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__NavigationHistory.st,v 1.6 2011-07-04 13:52:25 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__NavigationHistory.st,v 1.7 2011-07-04 13:57:00 cg Exp $'
 !
 
 version_CVS_jvrany