From c87ec9a27f2d70c7c6449ed1cadc58d003f6b0c0 Mon Sep 17 00:00:00 2001 From: necoro <> Date: Mon, 7 May 2007 07:30:41 +0000 Subject: added the ability of sorting the pkglist by installation status --- portato/gui/gtk/windows.py | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'portato/gui/gtk') diff --git a/portato/gui/gtk/windows.py b/portato/gui/gtk/windows.py index ffeb01f..2f06bc0 100644 --- a/portato/gui/gtk/windows.py +++ b/portato/gui/gtk/windows.py @@ -108,16 +108,20 @@ class AboutWindow (AbstractDialog): AbstractDialog.__init__(self, parent) - label = self.tree.get_widget("aboutLabel") - label.set_markup(""" + img = self.tree.get_widget("portatoImage") + img.set_from_file(APP_ICON) + + hlabel = self.tree.get_widget("highAboutLabel") + hlabel.set_markup(""" Portato v.%s -A Portage-GUI - -This software is licensed under the terms of the GPLv2. +A Portage-GUI""" % VERSION) + + llabel = self.tree.get_widget("lowAboutLabel") + llabel.set_markup("""This software is licensed under the terms of the GPLv2. Copyright (C) 2006-2007 René 'Necoro' Neumann <necoro@necoro.net> Icon created by wolfden -""" % VERSION) +""") view = self.tree.get_widget("pluginList") store = gtk.ListStore(str,str) @@ -776,6 +780,7 @@ class MainWindow (Window): vpaned.set_position(mHeight/2) # cat and pkg list + self.sortPkgListByName = True self.catList = self.tree.get_widget("catList") self.pkgList = self.tree.get_widget("pkgList") self.build_cat_list() @@ -876,6 +881,8 @@ class MainWindow (Window): self.pkgList.set_model(store) col = gtk.TreeViewColumn("Packages") + col.set_clickable(True) + col.connect("clicked", self.cb_pkg_list_header_clicked) # adding the pixbuf cell = gtk.CellRendererPixbuf() @@ -900,7 +907,7 @@ class MainWindow (Window): @rtype: gtk.ListStore""" if name: - for pkg, is_inst in self.db.get_cat(name): + for pkg, is_inst in self.db.get_cat(name, self.sortPkgListByName): if is_inst: icon = self.instPixbuf else: @@ -947,6 +954,12 @@ class MainWindow (Window): self.show_package(self.selCatName+"/"+package, self.queue) return True + def cb_pkg_list_header_clicked(self, col): + self.sortPkgListByName = not self.sortPkgListByName + self.pkgList.get_model().clear() + self.fill_pkg_store(self.pkgList.get_model(), self.selCatName) + return True + def cb_row_activated (self, view, path, *args): """Callback for an activated row in the emergeQueue. Opens a package window.""" store = self.queueTree -- cgit v1.2.3-54-g00ecf