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

This commit is contained in:
Andrew Resch 2009-07-30 23:23:16 +00:00
parent 2447ed4425
commit e6cf3a2fd9
2 changed files with 9 additions and 1 deletions

View File

@ -120,6 +120,7 @@ class MainWindow(component.Component):
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

View File

@ -253,8 +253,15 @@ class TorrentView(listview.ListView, component.Component):
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