[gnome-tweak-tool] Support system wide themes
- From: John Stowers <jstowers src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweak-tool] Support system wide themes
- Date: Mon, 2 May 2011 21:48:13 +0000 (UTC)
commit fba9239e5e1c1ebb0885fa2dae5984d92abd09bd
Author: John Stowers <john stowers gmail com>
Date: Tue May 3 09:37:03 2011 +1200
Support system wide themes
NEWS | 2 +-
gtweak/tweaks/tweak_shell.py | 13 +++++++++----
2 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/NEWS b/NEWS
index 8d18c0c..ce5651e 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,5 @@
3.0.4
- *
+ * Support system wide themes
3.0.3
* Autostart nautilus at login if it is configured to show
diff --git a/gtweak/tweaks/tweak_shell.py b/gtweak/tweaks/tweak_shell.py
index 97cc3c2..483270e 100644
--- a/gtweak/tweaks/tweak_shell.py
+++ b/gtweak/tweaks/tweak_shell.py
@@ -98,13 +98,18 @@ class ShellThemeTweak(Tweak):
else:
hb = Gtk.HBox()
- #build a combo box with all the valid theme options
- valid = walk_directories( (ShellThemeTweak.THEME_DIR,), lambda d:
+ #include both system, and user themes
+ #note: the default theme lives in /system/data/dir/gnome-shell/theme
+ # and not themes/, so add it manually later
+ dirs = [os.path.join(d, "themes") for d in GLib.get_system_data_dirs()]
+ dirs += [ShellThemeTweak.THEME_DIR]
+
+ valid = walk_directories(dirs, lambda d:
os.path.exists(os.path.join(d, "gnome-shell")) and \
os.path.exists(os.path.join(d, "gnome-shell", "gnome-shell.css")))
- #manually add Adwiata to represent the default
- #valid.append( ("Adwiata", "") )
+ #build a combo box with all the valid theme options
+ #manually add Adwiata to represent the default
cb = build_combo_box_text(
self._settings.get_string(ShellThemeTweak.THEME_GSETTINGS_NAME),
("", "Adwiata"),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]