E5Gui/E5PathPicker.py

changeset 5070
4e4651e88674
parent 5036
318e879a37fa
child 5106
1ecc6c9abca5
diff -r 3a5e58eeb64a -r 4e4651e88674 E5Gui/E5PathPicker.py
--- a/E5Gui/E5PathPicker.py	Wed Jul 27 15:38:27 2016 +0200
+++ b/E5Gui/E5PathPicker.py	Wed Jul 27 18:10:08 2016 +0200
@@ -38,6 +38,7 @@
     SaveFileEnsureExtensionMode = 3
     SaveFileOverwriteMode = 4
     DirectoryMode = 5
+    DirectoryShowFilesMode=6
     CustomMode = 99
     NoMode = 100
 
@@ -571,6 +572,15 @@
             path = Utilities.toNativeSeparators(path)
             while path.endswith(os.sep):
                 path = path[:-1]
+        elif self.__mode == E5PathPickerModes.DirectoryShowFilesMode:
+            path = E5FileDialog.getExistingDirectory(
+                self,
+                windowTitle,
+                directory,
+                E5FileDialog.Options(E5FileDialog.DontUseNativeDialog))
+            path = Utilities.toNativeSeparators(path)
+            while path.endswith(os.sep):
+                path = path[:-1]
         
         if path:
             self._setEditorText(path)

eric ide

mercurial