fix column width saving
This commit is contained in:
parent
3618b4bfe8
commit
452781a78c
15
src/dgtk.py
15
src/dgtk.py
|
@ -71,7 +71,8 @@ def add_func_column(view, header, func, data, sortid=None, width=None):
|
|||
column.set_clickable(True)
|
||||
column.set_sort_column_id(data)
|
||||
column.set_resizable(True)
|
||||
if width:
|
||||
if width > 0:
|
||||
column.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED)
|
||||
column.set_fixed_width(width)
|
||||
column.set_expand(False)
|
||||
column.set_min_width(10)
|
||||
|
@ -87,7 +88,8 @@ def add_text_column(view, header, cid, width=None):
|
|||
column.set_sort_column_id(cid)
|
||||
column.set_resizable(True)
|
||||
column.set_expand(False)
|
||||
if width:
|
||||
if width > 0:
|
||||
column.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED)
|
||||
column.set_fixed_width(width)
|
||||
column.set_min_width(10)
|
||||
column.set_reorderable(True)
|
||||
|
@ -102,7 +104,8 @@ def add_progress_column(view, header, pid, mid, width=None):
|
|||
column.set_resizable(True)
|
||||
column.set_expand(False)
|
||||
column.set_min_width(10)
|
||||
if width:
|
||||
if width > 0:
|
||||
column.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED)
|
||||
column.set_fixed_width(width)
|
||||
column.set_reorderable(True)
|
||||
view.append_column(column)
|
||||
|
@ -115,7 +118,8 @@ def add_toggle_column(view, header, cid, toggled_signal=None, width=None):
|
|||
column.set_clickable(True)
|
||||
column.set_resizable(True)
|
||||
column.set_expand(False)
|
||||
if width:
|
||||
if width > 0:
|
||||
column.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED)
|
||||
column.set_fixed_width(width)
|
||||
column.set_min_width(10)
|
||||
column.set_reorderable(True)
|
||||
|
@ -129,7 +133,8 @@ def add_texticon_column(view, header, icon_col, text_col, width=None):
|
|||
column.set_clickable(True)
|
||||
column.set_resizable(True)
|
||||
column.set_expand(False)
|
||||
if width:
|
||||
if width > 0:
|
||||
column.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED)
|
||||
column.set_fixed_width(width)
|
||||
column.set_min_width(10)
|
||||
column.set_reorderable(True)
|
||||
|
|
56
src/pref.py
56
src/pref.py
|
@ -136,20 +136,20 @@ if common.windows_check():
|
|||
"window_width" : 640,
|
||||
"window_x_pos" : 0,
|
||||
"window_y_pos" : 0,
|
||||
"availability_width" : 50,
|
||||
"queue_width" : 40,
|
||||
"name_width" : 175,
|
||||
"dl_width" : 110,
|
||||
"ul_width" : 110,
|
||||
"eta_width" : 65,
|
||||
"peer_width" : 85,
|
||||
"seed_width" : 85,
|
||||
"share_width" : 60,
|
||||
"size_width" : 71,
|
||||
"status_width" : 150,
|
||||
"filename_f_width" : 220,
|
||||
"size_f_width" : 90,
|
||||
"priority_f_width" : 140,
|
||||
"availability_width" : -1,
|
||||
"queue_width" : -1,
|
||||
"name_width" : -1,
|
||||
"dl_width" : -1,
|
||||
"ul_width" : -1,
|
||||
"eta_width" : -1,
|
||||
"peer_width" : -1,
|
||||
"seed_width" : -1,
|
||||
"share_width" : -1,
|
||||
"size_width" : -1,
|
||||
"status_width" : -1,
|
||||
"filename_f_width" : -1,
|
||||
"size_f_width" : -1,
|
||||
"priority_f_width" : -1,
|
||||
"start_paused": False,
|
||||
"use_advanced_bar" : True
|
||||
}
|
||||
|
@ -250,20 +250,20 @@ else:
|
|||
"window_width" : 640,
|
||||
"window_x_pos" : 0,
|
||||
"window_y_pos" : 0,
|
||||
"availability_width" : 50,
|
||||
"queue_width" : 40,
|
||||
"name_width" : 175,
|
||||
"dl_width" : 110,
|
||||
"ul_width" : 110,
|
||||
"eta_width" : 65,
|
||||
"peer_width" : 85,
|
||||
"seed_width" : 85,
|
||||
"share_width" : 60,
|
||||
"size_width" : 71,
|
||||
"status_width" : 150,
|
||||
"filename_f_width" : 220,
|
||||
"size_f_width" : 90,
|
||||
"priority_f_width" : 140,
|
||||
"availability_width" : -1,
|
||||
"queue_width" : -1,
|
||||
"name_width" : -1,
|
||||
"dl_width" : -1,
|
||||
"ul_width" : -1,
|
||||
"eta_width" : -1,
|
||||
"peer_width" : -1,
|
||||
"seed_width" : -1,
|
||||
"share_width" : -1,
|
||||
"size_width" : -1,
|
||||
"status_width" : -1,
|
||||
"filename_f_width" : -1,
|
||||
"size_f_width" : -1,
|
||||
"priority_f_width" : -1,
|
||||
"start_paused": False,
|
||||
"use_advanced_bar" : True
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue