#UI_ENHANCEMENT by cg
authorClaus Gittinger <cg@exept.de>
Fri, 24 Aug 2018 14:01:23 +0200
changeset 18352 ee486b3355c7
parent 18351 f6c68b4220d3
child 18353 569d5ec8a6d2
#UI_ENHANCEMENT by cg class: AbstractFileBrowser added: #enableGotoDownloadsDirectory changed: #currentFileNameHolderChangedForCommon class: AbstractFileBrowser class changed: #directoryMenu
AbstractFileBrowser.st
--- 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]).