sortable columns

This commit is contained in:
Zach Tibbitts 2007-02-08 23:52:01 +00:00
parent 80e06502f6
commit b091500124
3 changed files with 7 additions and 4 deletions

View File

@ -89,7 +89,8 @@ setup(name="deluge", fullname="Deluge BitTorrent Client", version="0.5.0",
packages=['deluge'], packages=['deluge'],
package_dir = {'deluge': 'src'}, package_dir = {'deluge': 'src'},
data_files=[("share/deluge/glade", ["glade/delugegtk.glade", "glade/dgtkpopups.glade", "glade/dgtkpref.glade"]), 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_package='deluge',
ext_modules=[deluge_core] ext_modules=[deluge_core]
) )

View File

@ -117,8 +117,8 @@ class DelugeGTK(dbus.service.Object):
self.abt.set_artists(["Andrew Wedderburn"]) self.abt.set_artists(["Andrew Wedderburn"])
self.abt.set_website("http://deluge-torrent.org") self.abt.set_website("http://deluge-torrent.org")
self.abt.set_icon_from_file(dcommon.get_pixmap("deluge32.png")) self.abt.set_icon_from_file(dcommon.get_pixmap("deluge32.png"))
#self.abt.set_logo(gtk.gdk.pixbuf_new_from_file( self.abt.set_logo(gtk.gdk.pixbuf_new_from_file(
# dcommon.get_pixmap("deluge256.png"))) dcommon.get_pixmap("deluge32.png")))
def build_pref_dialog(self): def build_pref_dialog(self):
self.prf_glade = gtk.glade.XML(dcommon.get_glade_file("dgtkpref.glade")) 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.store = gtk.ListStore(int, int, str, str, float, str, str, str, str, str, str, str)
self.view.set_model(self.store) self.view.set_model(self.store)
self.view.set_rules_hint(True) self.view.set_rules_hint(True)
self.view.set_reorderable(True)
## Initializes the columns for the torrent_view ## Initializes the columns for the torrent_view
#Just found out there are built-in pygtk methods with similar functionality #Just found out there are built-in pygtk methods with similar functionality

View File

@ -65,6 +65,7 @@ def add_text_column(view, header, cid):
render = gtk.CellRendererText() render = gtk.CellRendererText()
column = gtk.TreeViewColumn(header, render, text=cid) column = gtk.TreeViewColumn(header, render, text=cid)
column.set_clickable(True) column.set_clickable(True)
column.set_sort_column_id(cid)
column.set_resizable(True) column.set_resizable(True)
column.set_expand(False) column.set_expand(False)
view.append_column(column) view.append_column(column)
@ -74,6 +75,7 @@ def add_progress_column(view, header, pid, mid):
render = gtk.CellRendererProgress() render = gtk.CellRendererProgress()
column = gtk.TreeViewColumn(header, render, value=pid, text=mid) column = gtk.TreeViewColumn(header, render, value=pid, text=mid)
column.set_clickable(True) column.set_clickable(True)
column.set_sort_column_id(pid)
column.set_resizable(True) column.set_resizable(True)
column.set_expand(False) column.set_expand(False)
view.append_column(column) view.append_column(column)