From bb4e7e38ae89078a1ee41c52f8db9b92926df324 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Mon, 29 Dec 2008 17:10:11 +0000 Subject: [PATCH] Fix gtkwarning regarding column width --- deluge/ui/gtkui/files_tab.py | 2 +- deluge/ui/gtkui/peers_tab.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deluge/ui/gtkui/files_tab.py b/deluge/ui/gtkui/files_tab.py index 3d3b1d75d..8c484eebd 100644 --- a/deluge/ui/gtkui/files_tab.py +++ b/deluge/ui/gtkui/files_tab.py @@ -257,7 +257,7 @@ class FilesTab(Tab): if state["columns"].has_key(cname): cstate = state["columns"][cname] column.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED) - column.set_fixed_width(cstate["width"]) + column.set_fixed_width(cstate["width"] if cstate["width"] > 0 else 10) if state["sort_id"] == index: column.set_sort_indicator(True) column.set_sort_order(state["sort_order"]) diff --git a/deluge/ui/gtkui/peers_tab.py b/deluge/ui/gtkui/peers_tab.py index dc678cb23..9a3cd1752 100644 --- a/deluge/ui/gtkui/peers_tab.py +++ b/deluge/ui/gtkui/peers_tab.py @@ -215,7 +215,7 @@ class PeersTab(Tab): if state["columns"].has_key(cname): cstate = state["columns"][cname] column.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED) - column.set_fixed_width(cstate["width"]) + column.set_fixed_width(cstate["width"] if cstate["width"] > 0 else 10) if state["sort_id"] == index: column.set_sort_indicator(True) column.set_sort_order(state["sort_order"])