From f190b3d30e66696b45d43bb316b197f0313192e3 Mon Sep 17 00:00:00 2001 From: Joe R Date: Tue, 19 Dec 2023 21:59:58 -0500 Subject: [PATCH] Sorting of favorite games. --- pysollib/ui/tktile/menubar.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pysollib/ui/tktile/menubar.py b/pysollib/ui/tktile/menubar.py index 76e0a0ab0..a831b79de 100644 --- a/pysollib/ui/tktile/menubar.py +++ b/pysollib/ui/tktile/menubar.py @@ -1268,6 +1268,11 @@ def updateFavoriteGamesMenu(self): gi = self.app.getGameInfo(id) if gi: games.append(gi) + + def sort_func(gi): + return gi.name + + games.sort(key=sort_func) self.updateGamesMenu(submenu, games) state = self._getEnabledState in_favor = self.app.game.id in gameids