GTK UI un-select row on torrentview shutdown and filter change.
This is specially useful when multiple torrents are selected. This way, the "changed" signal won't be triggered for every row.
This commit is contained in:
parent
59f9d4e5cc
commit
66e8b34a54
|
@ -450,6 +450,7 @@ class TorrentView(listview.ListView, component.Component):
|
|||
def stop(self):
|
||||
"""Stops the torrentview"""
|
||||
# We need to clear the liststore
|
||||
self.treeview.unselect_all()
|
||||
self.liststore.clear()
|
||||
self.prev_status = {}
|
||||
self.filter = None
|
||||
|
@ -467,9 +468,12 @@ class TorrentView(listview.ListView, component.Component):
|
|||
listview.ListView.save_state(self, "torrentview.state")
|
||||
|
||||
def set_filter(self, filter_dict):
|
||||
"""Sets filters for the torrentview..
|
||||
"""
|
||||
Sets filters for the torrentview..
|
||||
|
||||
see: core.get_torrents_status
|
||||
"""
|
||||
self.treeview.unselect_all()
|
||||
search_filter = self.filter and self.filter.get('name', None) or None
|
||||
self.filter = dict(filter_dict) #copied version of filter_dict.
|
||||
if search_filter and 'name' not in filter_dict:
|
||||
|
|
Loading…
Reference in New Issue