--- a/AbstractFileBrowser.st Sun Nov 04 11:21:51 2018 +0100
+++ b/AbstractFileBrowser.st Sun Nov 04 14:57:49 2018 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 2002 by eXept Software AG
All Rights Reserved
@@ -1632,6 +1634,11 @@
itemValue: doGotoDesktopDirectory
)
(MenuItem
+ enabled: enableGotoDocumentsDirectory
+ label: 'Documents'
+ itemValue: doGotoDocumentsDirectory
+ )
+ (MenuItem
enabled: enableGotoDownloadsDirectory
label: 'Downloads'
itemValue: doGotoDownloadsDirectory
@@ -3011,7 +3018,7 @@
"/ are perfect here, but usually not available in the font
"/ and we have currently no way of knowing if they are...
"/ (could let the font draw into a bitmap and check if there is something...)
- "/ For now, write a dot.·
+ "/ For now, write a dot.·
"/ charPrinted := (Character value:(byte + 16r2400))
].
].
@@ -3909,6 +3916,12 @@
"Created: / 01-10-2010 / 16:19:17 / cg"
!
+enableGotoDocumentsDirectory
+ ^ self aspectFor:#enableGotoDocumentsDirectory ifAbsent:[ ValueHolder with:true ].
+
+ "Created: / 01-10-2010 / 16:19:17 / cg"
+!
+
enableGotoDownloadsDirectory
^ self aspectFor:#enableGotoDownloadsDirectory ifAbsent:[ ValueHolder with:true ].
@@ -4813,6 +4826,9 @@
(dir := Filename downloadsDirectory) notNil ifTrue:[
self enableGotoDownloadsDirectory value:((newDirectories includes:(dir asAbsoluteFilename))not).
].
+ (dir := Filename documentsDirectory) notNil ifTrue:[
+ self enableGotoDocumentsDirectory value:((newDirectories includes:(dir asAbsoluteFilename))not).
+ ].
(dir := self tempDirectory) notNil ifTrue:[
self enableGotoTempDirectory value:((newDirectories includes:(dir asAbsoluteFilename))not).
].
@@ -5876,6 +5892,8 @@
!
doGoDirectoryUp
+ "navigate up to the parent folder"
+
| upDir directory rootInTreeView|
self enableDirectoryUp value ifFalse:[ ^ self].
@@ -5893,30 +5911,44 @@
!
doGotoDefaultDirectory
+ "navigate to the default folder (is the current directory)"
+
self gotoFile:(Filename defaultDirectory).
!
doGotoDesktopDirectory
+ "navigate to the desktop folder"
+
self gotoFile:(Filename desktopDirectory).
!
doGotoDocumentsDirectory
+ "navigate to the documents folder"
+
self gotoFile:(Filename documentsDirectory).
!
doGotoDownloadsDirectory
+ "navigate to the downloads folder"
+
self gotoFile:(Filename downloadsDirectory).
!
doGotoHomeDirectory
+ "navigate to the home folder"
+
self gotoFile:(Filename homeDirectory).
!
doGotoSmalltalkDirectory
+ "navigate to the smalltalk bin folder (where the stx executable is)"
+
self gotoFile:(self smalltalkDirectory).
!
doGotoSmalltalkWorkspaceDirectory
+ "navigate to the user's smalltalk workspace folder"
+
self gotoFile:(UserPreferences current workspaceDirectory).
!
@@ -8795,7 +8827,7 @@
] ifFalse:[sig == HaltInterrupt ifTrue:[ |sender|
label := msg := 'Breakpoint/Halt in fileIn'.
sender := ex suspendedContext.
- msg := msg , ('\\in %1 » %2' bindWith:(sender receiver class name) with:(sender sender selector))
+ msg := msg , ('\\in %1 » %2' bindWith:(sender receiver class name) with:(sender sender selector))
] ifFalse:[
label := 'Error in fileIn'.
msg := 'error in fileIn: %1'