From 23a2111650eba67df2c05b3b20094d4dcc9afc77 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Wed, 15 Aug 2007 04:57:50 +0000 Subject: [PATCH] fix files columns --- plugins/TorrentFiles/tab_files.py | 3 ++- src/files.py | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/plugins/TorrentFiles/tab_files.py b/plugins/TorrentFiles/tab_files.py index 3832f52b9..887263437 100644 --- a/plugins/TorrentFiles/tab_files.py +++ b/plugins/TorrentFiles/tab_files.py @@ -29,7 +29,8 @@ class FilesTabManager(FilesBaseManager): percent = float(model.get_value(iter, data)) percent_str = "%.2f%%"%percent cell.set_property("text", percent_str) - dgtk.add_func_column(self.file_view, _("Progress"), percent, 3) + percent_col = dgtk.add_func_column(self.file_view, _("Progress"), percent, 3) + percent_col.set_fixed_width(90) self.file_view.connect("row-activated", self.double_click_file) def set_unique_id(self, unique_id): diff --git a/src/files.py b/src/files.py index 01f639ac7..2fd7a1ff0 100644 --- a/src/files.py +++ b/src/files.py @@ -76,10 +76,11 @@ class FilesBaseManager(object): filename_column = dgtk.add_text_column(self.file_view, _("Filename"), 0) filename_column.set_expand(True) - dgtk.add_func_column(self.file_view, _("Size"), dgtk.cell_data_size, + size_column = dgtk.add_func_column(self.file_view, _("Size"), dgtk.cell_data_size, 1) - dgtk.add_func_column(self.file_view, _("Priority"), priority, 2) - + size_column.set_fixed_width(80) + priority_column = dgtk.add_func_column(self.file_view, _("Priority"), priority, 2) + priority_column.set_fixed_width(115) self.file_view.set_model(self.file_store_sorted) self.file_view.get_selection().set_mode(gtk.SELECTION_MULTIPLE)