Merge pull request #129 from GLolol/sort-themes

Sort available themes in Menu preferences->Theme
This commit is contained in:
Clement Lefebvre 2015-06-12 16:29:52 +02:00
commit 6e5e849d05

View File

@ -285,7 +285,7 @@ class mintMenuConfig( object ):
model = Gtk.ListStore(str, str) model = Gtk.ListStore(str, str)
self.builder.get_object("themesCombo").set_model(model) self.builder.get_object("themesCombo").set_model(model)
selected_theme = model.append([_("Desktop theme"), "default"]) selected_theme = model.append([_("Desktop theme"), "default"])
for theme in themes: for theme in sorted(themes):
if theme.startswith("/usr/share/themes") and theme.endswith("/gtk-2.0/gtkrc"): if theme.startswith("/usr/share/themes") and theme.endswith("/gtk-2.0/gtkrc"):
theme = theme.replace("/usr/share/themes/", "") theme = theme.replace("/usr/share/themes/", "")
theme = theme.replace("gtk-2.0", "") theme = theme.replace("gtk-2.0", "")