diff options
author | necoro <> | 2007-05-07 07:30:41 +0000 |
---|---|---|
committer | necoro <> | 2007-05-07 07:30:41 +0000 |
commit | c87ec9a27f2d70c7c6449ed1cadc58d003f6b0c0 (patch) | |
tree | d7156245c25f678535ae19018104fdda01f6c8c6 /portato/gui/qt | |
parent | ce3139188ed3f4564d37a1ffb02bb20daff6adb1 (diff) | |
download | portato-c87ec9a27f2d70c7c6449ed1cadc58d003f6b0c0.tar.gz portato-c87ec9a27f2d70c7c6449ed1cadc58d003f6b0c0.tar.bz2 portato-c87ec9a27f2d70c7c6449ed1cadc58d003f6b0c0.zip |
added the ability of sorting the pkglist by installation status
Diffstat (limited to '')
-rw-r--r-- | portato/gui/qt/windows.py | 9 |
1 files changed, 8 insertions, 1 deletions
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): |