Fix saving column widths when quitting from the tray with the window hidden
This commit is contained in:
parent
2447ed4425
commit
e6cf3a2fd9
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue