[kupfer: 27/53] preferences: Allow selecting multiple folders when adding directories



commit c72a4f85cffb46090b5e9b30440e14a652c7754e
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Thu Mar 24 17:22:37 2011 +0100

    preferences: Allow selecting multiple folders when adding directories

 kupfer/ui/preferences.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/kupfer/ui/preferences.py b/kupfer/ui/preferences.py
index 865031e..c7682dc 100644
--- a/kupfer/ui/preferences.py
+++ b/kupfer/ui/preferences.py
@@ -681,9 +681,10 @@ class PreferencesWindowController (pretty.OutputMixin):
 				action=gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER,
 				buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT,
 					gtk.STOCK_OK, gtk.RESPONSE_ACCEPT))
+		chooser_dialog.set_select_multiple(True)
 		if chooser_dialog.run() == gtk.RESPONSE_ACCEPT:
-			selected_dir = chooser_dialog.get_filename()
-			self.add_directory_model(selected_dir, store=True)
+			for selected_dir in chooser_dialog.get_filenames():
+				self.add_directory_model(selected_dir, store=True)
 		chooser_dialog.hide()
 
 	def on_buttonremovedirectory_clicked(self, widget):



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]