Fix gtkwarning regarding column width

This commit is contained in:
Andrew Resch 2008-12-29 17:10:11 +00:00
parent e415829a68
commit bb4e7e38ae
2 changed files with 2 additions and 2 deletions

View File

@ -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"])

View File

@ -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"])