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/qt/windows.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'portato/gui/qt/windows.py') diff --git a/portato/gui/qt/windows.py b/portato/gui/qt/windows.py index e131bdd..80e193f 100644 --- a/portato/gui/qt/windows.py +++ b/portato/gui/qt/windows.py @@ -611,6 +611,8 @@ class MainWindow (Window): Qt.QObject.connect(action, Qt.SIGNAL("triggered()"), m.call) # the two lists + self.sortPkgListByName = True + self.pkgList.addAction(self.pkgListSortAction) self.build_cat_list() Qt.QObject.connect(self.selCatListModel, Qt.SIGNAL("currentChanged(QModelIndex, QModelIndex)"), self.cb_cat_list_selected) Qt.QObject.connect(self.pkgList, Qt.SIGNAL("currentItemChanged(QListWidgetItem*, QListWidgetItem*)"), self.cb_pkg_list_selected) @@ -669,7 +671,7 @@ class MainWindow (Window): self.pkgList.clear() - for name, inst in self.db.get_cat(cat): + for name, inst in self.db.get_cat(cat, self.sortPkgListByName): if use_icons: if inst: icon = yes @@ -765,6 +767,11 @@ class MainWindow (Window): self.cfg.set_local(pkg, "oneshot_opt", set) self.queue.append(pkg, update = True, oneshot = set, forceUpdate = True) + @Qt.pyqtSignature("bool") + def on_pkgListSortAction_triggered (self, checked): + self.sortPkgListByName = checked + self.fill_pkg_list(self.selCatName) + @Qt.pyqtSignature("") @Window.watch_cursor def on_searchBtn_clicked (self): -- cgit v1.2.3-54-g00ecf