Author: johannes
Date: 2007-02-28 07:01:19 -0600 (Wed, 28 Feb 2007)
New Revision: 9417
Modified:
trunk/gnue-forms/src/uidrivers/qt3/widgets/form.py
Log:
Added directory selection
issue152 in-progress
Modified: trunk/gnue-forms/src/uidrivers/qt3/widgets/form.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/qt3/widgets/form.py 2007-02-28 10:57:48 UTC
(rev 9416)
+++ trunk/gnue-forms/src/uidrivers/qt3/widgets/form.py 2007-02-28 13:01:19 UTC
(rev 9417)
@@ -403,7 +403,25 @@
return result
+ # -------------------------------------------------------------------------
+ def _ui_select_dir_(self, title, default_dir, new_dir):
+ """
+ Bring up a dialog for selecting a directory path.
+
+ @param title: Message to show on the dialog
+ @param default_dir: the default directory, or the empty string
+ @param new_dir: Has no effect in QT3, since the "Create new directory"
+ Button is allways available here.
+
+ @returns: a path or None if the dialog has been cancelled.
+ """
+
+ result = qt.QFileDialog.getExistingDirectory(default_dir,
+ self.main_window, "Directory Dialog", title, True)
+ return unicode(result) or None
+
+
# -------------------------------------------------------------------------
def _ui_show_about_(self, name, version, author, description):
_______________________________________________
commit-gnue mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-gnue