File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
files/usr/share/cinnamon/cinnamon-settings/modules Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 1111from ExtensionCore import DownloadSpicesPage
1212from Spices import Spice_Harvester
1313
14- import glob
14+ from pathlib import Path
1515
1616ICON_SIZE = 48
1717
@@ -402,13 +402,12 @@ def _load_gtk_themes(self):
402402 return res
403403
404404 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" )):
408410 return True
409- else :
410- for subdir in glob .glob ("%s/gtk-3.*" % directory ):
411- return True
412411 return False
413412
414413 def _load_icon_themes (self ):
You can’t perform that action at this time.
0 commit comments