File tree 1 file changed +6
-7
lines changed
files/usr/share/cinnamon/cinnamon-settings/modules
1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 11
11
from ExtensionCore import DownloadSpicesPage
12
12
from Spices import Spice_Harvester
13
13
14
- import glob
14
+ from pathlib import Path
15
15
16
16
ICON_SIZE = 48
17
17
@@ -402,13 +402,12 @@ def _load_gtk_themes(self):
402
402
return res
403
403
404
404
def filter_func_gtk_dir (self , directory ):
405
- # returns whether a directory is a valid GTK theme
406
- if os .path .exists (os .path .join (directory , "gtk-2.0" )):
407
- if os .path .exists (os .path .join (directory , "gtk-3.0" )):
405
+ theme_dir = Path (directory )
406
+
407
+ for gtk3_dir in theme_dir .glob ("gtk-3.*" ):
408
+ # Skip gtk key themes
409
+ if os .path .exists (os .path .join (gtk3_dir , "gtk.css" )):
408
410
return True
409
- else :
410
- for subdir in glob .glob ("%s/gtk-3.*" % directory ):
411
- return True
412
411
return False
413
412
414
413
def _load_icon_themes (self ):
You can’t perform that action at this time.
0 commit comments