#UI_ENHANCEMENT by cg
class: AbstractFileBrowser
added: #enableGotoDownloadsDirectory
changed: #currentFileNameHolderChangedForCommon
class: AbstractFileBrowser class
changed: #directoryMenu
--- a/AbstractFileBrowser.st Fri Aug 24 13:34:33 2018 +0200
+++ b/AbstractFileBrowser.st Fri Aug 24 14:01:23 2018 +0200
@@ -1627,6 +1627,11 @@
itemValue: doGotoDesktopDirectory
)
(MenuItem
+ enabled: enableGotoDownloadsDirectory
+ label: 'Downloads'
+ itemValue: doGotoDownloadsDirectory
+ )
+ (MenuItem
enabled: enableGotoDefaultDirectory
label: 'Default (Current) Directory'
itemValue: doGotoDefaultDirectory
@@ -3899,6 +3904,12 @@
"Created: / 01-10-2010 / 16:19:17 / cg"
!
+enableGotoDownloadsDirectory
+ ^ self aspectFor:#enableGotoDownloadsDirectory ifAbsent:[ ValueHolder with:true ].
+
+ "Created: / 01-10-2010 / 16:19:17 / cg"
+!
+
enableGotoSmalltalkDirectory
^ self aspectFor:#enableGotoSmalltalkDirectory ifAbsent:[ true asValue ].
!
@@ -4786,6 +4797,7 @@
self enableGotoDefaultDirectory value:((newDirectories includes:(Filename defaultDirectory asAbsoluteFilename))not).
self enableGotoSmalltalkDirectory value:((newDirectories includes:(self smalltalkDirectory asAbsoluteFilename))not).
self enableGotoDesktopDirectory value:((newDirectories includes:(Filename desktopDirectory asAbsoluteFilename))not).
+ self enableGotoDownloadsDirectory value:((newDirectories includes:(Filename downloadsDirectory asAbsoluteFilename))not).
self enableGotoTempDirectory value:((newDirectories includes:(self tempDirectory asAbsoluteFilename))not).
].
self enableGotoDefaultDirectory value:(self currentDirectory isNil or:[self currentDirectory pathName ~= OperatingSystem getCurrentDirectory]).