From b0915001244b7eca5b7b6ff6e0b712134ae685b4 Mon Sep 17 00:00:00 2001 From: Zach Tibbitts Date: Thu, 8 Feb 2007 23:52:01 +0000 Subject: [PATCH] sortable columns --- setup.py | 3 ++- src/delugegtk.py | 6 +++--- src/dgtk.py | 2 ++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index eb428c5fa..2144f59bb 100644 --- a/setup.py +++ b/setup.py @@ -89,7 +89,8 @@ setup(name="deluge", fullname="Deluge BitTorrent Client", version="0.5.0", packages=['deluge'], package_dir = {'deluge': 'src'}, data_files=[("share/deluge/glade", ["glade/delugegtk.glade", "glade/dgtkpopups.glade", "glade/dgtkpref.glade"]), - ("share/deluge/pixmaps", ["pixmaps/deluge32.png","pixmaps/deluge128.png", "pixmaps/deluge256.png"])], + ("share/deluge/pixmaps", ["pixmaps/deluge32.png", + "pixmaps/deluge128.png", "pixmaps/deluge256.png"])], ext_package='deluge', ext_modules=[deluge_core] ) diff --git a/src/delugegtk.py b/src/delugegtk.py index 8993893d8..19423e4b8 100755 --- a/src/delugegtk.py +++ b/src/delugegtk.py @@ -117,8 +117,8 @@ class DelugeGTK(dbus.service.Object): self.abt.set_artists(["Andrew Wedderburn"]) self.abt.set_website("http://deluge-torrent.org") self.abt.set_icon_from_file(dcommon.get_pixmap("deluge32.png")) - #self.abt.set_logo(gtk.gdk.pixbuf_new_from_file( - # dcommon.get_pixmap("deluge256.png"))) + self.abt.set_logo(gtk.gdk.pixbuf_new_from_file( + dcommon.get_pixmap("deluge32.png"))) def build_pref_dialog(self): self.prf_glade = gtk.glade.XML(dcommon.get_glade_file("dgtkpref.glade")) @@ -136,7 +136,7 @@ class DelugeGTK(dbus.service.Object): self.store = gtk.ListStore(int, int, str, str, float, str, str, str, str, str, str, str) self.view.set_model(self.store) self.view.set_rules_hint(True) - + self.view.set_reorderable(True) ## Initializes the columns for the torrent_view #Just found out there are built-in pygtk methods with similar functionality diff --git a/src/dgtk.py b/src/dgtk.py index 044669954..f9a788bdd 100644 --- a/src/dgtk.py +++ b/src/dgtk.py @@ -65,6 +65,7 @@ def add_text_column(view, header, cid): render = gtk.CellRendererText() column = gtk.TreeViewColumn(header, render, text=cid) column.set_clickable(True) + column.set_sort_column_id(cid) column.set_resizable(True) column.set_expand(False) view.append_column(column) @@ -74,6 +75,7 @@ def add_progress_column(view, header, pid, mid): render = gtk.CellRendererProgress() column = gtk.TreeViewColumn(header, render, value=pid, text=mid) column.set_clickable(True) + column.set_sort_column_id(pid) column.set_resizable(True) column.set_expand(False) view.append_column(column)