diff --git a/deluge/ui/gtkui/listview.py b/deluge/ui/gtkui/listview.py index f708c503e..869f970ad 100644 --- a/deluge/ui/gtkui/listview.py +++ b/deluge/ui/gtkui/listview.py @@ -272,6 +272,9 @@ class ListView: # A list of ListViewColumnStates state = [] + # Workaround for all zero widths after removing column on shutdown + if not any(c.get_width() for c in self.treeview.get_columns()): return + # Get the list of TreeViewColumns from the TreeView for counter, column in enumerate(self.treeview.get_columns()): # Append a new column state to the state list diff --git a/deluge/ui/gtkui/torrentview.py b/deluge/ui/gtkui/torrentview.py index cf636772f..d84b2308c 100644 --- a/deluge/ui/gtkui/torrentview.py +++ b/deluge/ui/gtkui/torrentview.py @@ -474,6 +474,11 @@ class TorrentView(listview.ListView, component.Component): """ listview.ListView.save_state(self, "torrentview.state") + def remove_column(self, header): + """Removes the column with the name 'header' from the torrentview""" + self.save_state() + listview.ListView.remove_column(self, header) + def set_filter(self, filter_dict): """ Sets filters for the torrentview..