Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
GNOME
GNOME Tweaks
Commits
f47ba28f
Commit
f47ba28f
authored
Mar 23, 2016
by
Patrick Griffis
💬
Browse files
Support versioned Gtk3 themes
parent
1082bc88
Changes
1
Show whitespace changes
Inline
Side-by-side
gtweak/tweaks/tweak_group_interface.py
View file @
f47ba28f
...
...
@@ -46,12 +46,17 @@ class GtkThemeSwitcher(GSettingsComboTweak):
def
_get_valid_themes
(
self
):
""" Only shows themes that have variations for gtk+-3 and gtk+-2 """
gtk_ver
=
Gtk
.
MINOR_VERSION
if
gtk_ver
%
2
:
# Want even number
gtk_ver
+=
1
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
:
os
.
path
.
exists
(
os
.
path
.
join
(
d
,
"gtk-2.0"
))
and
\
os
.
path
.
exists
(
os
.
path
.
join
(
d
,
"gtk-3.0"
)))
(
os
.
path
.
exists
(
os
.
path
.
join
(
d
,
"gtk-3.0"
))
or
\
os
.
path
.
exists
(
os
.
path
.
join
(
d
,
"gtk-3.{}"
.
format
(
gtk_ver
)))))
return
valid
class
IconThemeSwitcher
(
GSettingsComboTweak
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment