Fix #535 fix saving column widths

This commit is contained in:
Andrew Resch 2009-06-26 05:29:48 +00:00
parent abf6de8462
commit 790a10e317
2 changed files with 7 additions and 5 deletions

View File

@ -215,6 +215,12 @@ class GtkUI:
def shutdown(self, *args, **kwargs): def shutdown(self, *args, **kwargs):
log.debug("gtkui shutting down..") log.debug("gtkui shutting down..")
component.stop()
# Process any pending gtk events since the mainloop has been quit
while gtk.events_pending():
gtk.main_iteration(False)
# Shutdown all components # Shutdown all components
component.shutdown() component.shutdown()
if self.started_in_classic: if self.started_in_classic:

View File

@ -200,9 +200,7 @@ class ListView:
state = [] state = []
# Get the list of TreeViewColumns from the TreeView # Get the list of TreeViewColumns from the TreeView
treeview_columns = self.treeview.get_columns() for counter, column in enumerate(self.treeview.get_columns()):
counter = 0
for column in treeview_columns:
sort = None sort = None
id, order = self.model_filter.get_sort_column_id() id, order = self.model_filter.get_sort_column_id()
if self.get_column_name(id) == column.get_title(): if self.get_column_name(id) == column.get_title():
@ -211,8 +209,6 @@ class ListView:
state.append(ListViewColumnState(column.get_title(), counter, state.append(ListViewColumnState(column.get_title(), counter,
column.get_width(), column.get_visible(), column.get_width(), column.get_visible(),
sort, int(column.get_sort_order()))) sort, int(column.get_sort_order())))
# Increase the counter because this is how we determine position
counter += 1
# Get the config location for saving the state file # Get the config location for saving the state file
config_location = deluge.configmanager.get_config_dir() config_location = deluge.configmanager.get_config_dir()