Author: andar

Revision: 5143

Log:
        Fix freezing in create torrent dialog in Windows

Diff:
Modified: branches/1.1.0_RC/ChangeLog
===================================================================
--- branches/1.1.0_RC/ChangeLog 2009-04-23 18:16:38 UTC (rev 5142)
+++ branches/1.1.0_RC/ChangeLog 2009-04-23 20:18:17 UTC (rev 5143)
@@ -9,6 +9,9 @@
   * Fix starting the daemon in OS X
   * Fix loading improperly created torrents with mismatched encodings
 
+==== Windows ====
+  * Fix freezing in create torrent dialog
+
 === Deluge 1.1.6 - (06 April 2009) ===
 ==== Core ====
   * Fix udp trackers being classified as DHT source

Modified: branches/1.1.0_RC/deluge/ui/gtkui/createtorrentdialog.py
===================================================================
--- branches/1.1.0_RC/deluge/ui/gtkui/createtorrentdialog.py    2009-04-23 
18:16:38 UTC (rev 5142)
+++ branches/1.1.0_RC/deluge/ui/gtkui/createtorrentdialog.py    2009-04-23 
20:18:17 UTC (rev 5143)
@@ -331,10 +331,14 @@
             private=private,
             created_by=created_by,
             httpseeds=httpseeds)
-        self.glade.get_widget("progress_dialog").hide_all()
-        if add_to_session:
-            client.add_torrent_file([target])
 
+        def finish_up(target):
+            self.glade.get_widget("progress_dialog").hide_all()
+            if add_to_session:
+                client.add_torrent_file([target])
+
+        gobject.idle_add(finish_up, target)
+
     def _on_create_torrent_progress(self, value, num_pieces):
         percent = float(value)/float(num_pieces)
         pbar = self.glade.get_widget("progressbar")
@@ -392,5 +396,3 @@
         log.debug("_on_button_remove_clicked")
         row = 
self.glade.get_widget("tracker_treeview").get_selection().get_selected()[1]
         self.trackers_liststore.remove(row)
-
-



--~--~---------~--~----~------------~-------~--~----~
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