[gnome-tweak-tool] appearance: Don't duplicate the theme name
- From: Jeremy Bicha <jbicha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweak-tool] appearance: Don't duplicate the theme name
- Date: Fri, 3 Nov 2017 18:35:01 +0000 (UTC)
commit 06be203d06b74376519becc7677b17e7e26f9495
Author: Jeremy Bicha <jbicha ubuntu com>
Date: Fri Nov 3 14:31:08 2017 -0400
appearance: Don't duplicate the theme name
A theme name should not be listed more than once
https://bugzilla.gnome.org/show_bug.cgi?id=762789
gtweak/tweaks/tweak_group_appearance.py | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)
---
diff --git a/gtweak/tweaks/tweak_group_appearance.py b/gtweak/tweaks/tweak_group_appearance.py
index be79891..84dd120 100644
--- a/gtweak/tweaks/tweak_group_appearance.py
+++ b/gtweak/tweaks/tweak_group_appearance.py
@@ -53,16 +53,11 @@ class GtkThemeSwitcher(GSettingsComboTweak):
dirs = ( os.path.join(gtweak.DATA_DIR, "themes"),
os.path.join(GLib.get_user_data_dir(), "themes"),
os.path.join(os.path.expanduser("~"), ".themes"))
- valid = walk_directories(dirs, lambda d:
+ valid = ['Adwaita', 'HighContrast']
+ valid += walk_directories(dirs, lambda d:
os.path.exists(os.path.join(d, "gtk-3.0", "gtk.css")) or \
os.path.exists(os.path.join(d, "gtk-3.{}".format(gtk_ver))))
-
- if 'Adwaita' not in valid:
- valid += ['Adwaita']
- if 'HighContrast' not in valid:
- valid += ['HighContrast']
-
- return valid
+ return set(valid)
class IconThemeSwitcher(GSettingsComboTweak):
def __init__(self, **options):
@@ -80,7 +75,7 @@ class IconThemeSwitcher(GSettingsComboTweak):
valid = walk_directories(dirs, lambda d:
os.path.isdir(d) and \
os.path.exists(os.path.join(d, "index.theme")))
- return valid
+ return set(valid)
class CursorThemeSwitcher(GSettingsComboTweak):
def __init__(self, **options):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]