Module: deluge
Branch: master
Commit: 2ce62bf19bee9d8fe0ae8fd2f667425821bc6fe2

Author: Andrew Resch <[email protected]>
Date:   Mon Mar  1 17:53:33 2010 -0800

Fix #1161 ask the user if they want to switch to Full allocation if
trying to change file priorities in the add torrent dialog while using
Compact.

---

 deluge/ui/gtkui/addtorrentdialog.py |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/deluge/ui/gtkui/addtorrentdialog.py 
b/deluge/ui/gtkui/addtorrentdialog.py
index 44980c4..be975e8 100644
--- a/deluge/ui/gtkui/addtorrentdialog.py
+++ b/deluge/ui/gtkui/addtorrentdialog.py
@@ -480,7 +480,14 @@ class AddTorrentDialog(component.Component):
         # Check to see if we can change file priorities
         (model, row) = self.listview_torrents.get_selection().get_selected()
         if self.options[model[row][0]]["compact_allocation"]:
-            dialogs.InformationDialog(_("Unable to set file priority!"), 
_("File prioritization is unavailable when using Compact allocation."), 
self.dialog).run()
+            def on_answer(response):
+                if response == gtk.RESPONSE_YES:
+                    self.options[model[row][0]]["compact_allocation"] = False
+                    self.update_torrent_options(model[row][0])
+                
+            d = dialogs.YesNoDialog(_("Unable to set file priority!"), _("File 
prioritization is unavailable when using Compact allocation.  Would you like to 
switch to Full allocation?"), self.dialog).run()
+            d.addCallback(on_answer)
+            
             return
         (model, paths) = 
self.listview_files.get_selection().get_selected_rows()
         if len(paths) > 1:

-- 
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en.

Reply via email to