[gnome-tweak-tool] Enable cursor theme selection
- From: John Stowers <jstowers src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweak-tool] Enable cursor theme selection
- Date: Tue, 12 Apr 2011 19:55:12 +0000 (UTC)
commit 0c74781e1450facc21f0ad27c7f54ef9e14d9daf
Author: Andrea Fagiani <andfagiani gmail com>
Date: Sun Apr 10 13:12:50 2011 +0200
Enable cursor theme selection
https://bugzilla.gnome.org/show_bug.cgi?id=647358
gtweak/tweaks/tweak_interface.py | 24 +++++++++++++++++++++++-
1 files changed, 23 insertions(+), 1 deletions(-)
---
diff --git a/gtweak/tweaks/tweak_interface.py b/gtweak/tweaks/tweak_interface.py
index 7d14d6d..24c5e32 100644
--- a/gtweak/tweaks/tweak_interface.py
+++ b/gtweak/tweaks/tweak_interface.py
@@ -41,13 +41,34 @@ class ThemeSwitcher(GSettingsComboTweak):
class IconThemeSwitcher(GSettingsComboTweak):
def __init__(self, **options):
+ valid_icon_themes = []
iconthemedir = os.path.join(gtweak.DATA_DIR, "icons")
+ for t in os.listdir(iconthemedir):
+ if os.path.isdir(os.path.join(thdir, t)) and \
+ not os.path.exists(os.path.join(thdir, t, "cursors")):
+ valid.append(t)
+
GSettingsComboTweak.__init__(self,
"org.gnome.desktop.interface",
"icon-theme",
[(t, t) for t in os.listdir(iconthemedir)],
**options)
+class CursorThemeSwitcher(GSettingsComboTweak):
+ def __init__(self, **options):
+ valid_cursor_themes = []
+ cursorthemedir = os.path.join(gtweak.DATA_DIR, "icons")
+ for t in os.listdir(cursorthemedir):
+ if os.path.isdir(os.path.join(thdir, t)) and \
+ os.path.exists(os.path.join(thdir, t, "cursors")):
+ valid.append(t)
+
+ GSettingsComboTweak.__init__(self,
+ "org.gnome.desktop.interface",
+ "cursor-theme",
+ [(t, t) for t in valid_cursor_themes],
+ **options)
+
sg = build_horizontal_sizegroup()
TWEAK_GROUPS = (
@@ -56,5 +77,6 @@ TWEAK_GROUPS = (
GSettingsSwitchTweak("org.gnome.desktop.interface", "menus-have-icons"),
GSettingsSwitchTweak("org.gnome.desktop.interface", "buttons-have-icons"),
ThemeSwitcher(size_group=sg),
- IconThemeSwitcher(size_group=sg)),
+ IconThemeSwitcher(size_group=sg),
+ CursorThemeSwitcher(size_group=sg)),
)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]