Author: andar

Revision: 5590

Log:
        Fix saving column widths when quitting from the tray with the window 
hidden

Diff:
Modified: trunk/deluge/ui/gtkui/mainwindow.py
===================================================================
--- trunk/deluge/ui/gtkui/mainwindow.py 2009-07-30 23:14:12 UTC (rev 5589)
+++ trunk/deluge/ui/gtkui/mainwindow.py 2009-07-30 23:23:16 UTC (rev 5590)
@@ -120,6 +120,7 @@
 
     def hide(self):
         component.pause("TorrentView")
+        component.get("TorrentView").save_state()
         component.pause("StatusBar")
         component.pause("TorrentDetails")
         # Store the x, y positions for when we restore the window

Modified: trunk/deluge/ui/gtkui/torrentview.py
===================================================================
--- trunk/deluge/ui/gtkui/torrentview.py        2009-07-30 23:14:12 UTC (rev 
5589)
+++ trunk/deluge/ui/gtkui/torrentview.py        2009-07-30 23:23:16 UTC (rev 
5590)
@@ -253,8 +253,15 @@
 
     def shutdown(self):
         """Called when GtkUi is exiting"""
-        self.save_state("torrentview.state")
+        if self.window.visible():
+            self.save_state()
 
+    def save_state(self):
+        """
+        Saves the state of the torrent view.
+        """
+        listview.ListView.save_state(self, "torrentview.state")
+                
     def set_filter(self, filter_dict):
         """Sets filters for the torrentview..
         see: core.get_torrents_status



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