Author: andar

Revision: 5418

Log:
        Fix #535 fix saving column widths

Diff:
Modified: trunk/deluge/ui/gtkui/gtkui.py
===================================================================
--- trunk/deluge/ui/gtkui/gtkui.py      2009-06-25 23:58:54 UTC (rev 5417)
+++ trunk/deluge/ui/gtkui/gtkui.py      2009-06-26 05:29:48 UTC (rev 5418)
@@ -215,6 +215,12 @@
     def shutdown(self, *args, **kwargs):
         log.debug("gtkui shutting down..")
 
+        component.stop()
+
+        # Process any pending gtk events since the mainloop has been quit
+        while gtk.events_pending():
+            gtk.main_iteration(False)
+
         # Shutdown all components
         component.shutdown()
         if self.started_in_classic:

Modified: trunk/deluge/ui/gtkui/listview.py
===================================================================
--- trunk/deluge/ui/gtkui/listview.py   2009-06-25 23:58:54 UTC (rev 5417)
+++ trunk/deluge/ui/gtkui/listview.py   2009-06-26 05:29:48 UTC (rev 5418)
@@ -200,9 +200,7 @@
         state = []
 
         # Get the list of TreeViewColumns from the TreeView
-        treeview_columns = self.treeview.get_columns()
-        counter = 0
-        for column in treeview_columns:
+        for counter, column in enumerate(self.treeview.get_columns()):
             sort = None
             id, order = self.model_filter.get_sort_column_id()
             if self.get_column_name(id) == column.get_title():
@@ -211,8 +209,6 @@
             state.append(ListViewColumnState(column.get_title(), counter,
                 column.get_width(), column.get_visible(),
                 sort, int(column.get_sort_order())))
-            # Increase the counter because this is how we determine position
-            counter += 1
 
         # Get the config location for saving the state file
         config_location = deluge.configmanager.get_config_dir()



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