summaryrefslogtreecommitdiff
path: root/portato/gui/qt/windows.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--portato/gui/qt/windows.py9
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):