GNOME Bugzilla – Bug 791709
Respect XDG_DATA_DIRS
Last modified: 2018-01-24 15:28:42 UTC
Themes and stuff can be actually distributed in several directories, listed in XDG_DATA_DIRS. GNOME Tweaks should use `GLib.get_system_data_dirs()` to get the directories.
Created attachment 365642 [details] [review] Search for GSettings schemas in system data dirs
Created attachment 365643 [details] [review] Search for themes and icons in system data dirs
Created attachment 365644 [details] [review] Don't show multiple entries for a single theme
Do you happen to have a test case for this bug so that I can verify that the patches work?
Review of attachment 365644 [details] [review]: As far as I can tell, this patch is not needed since it just replaces the new set() fix for this issue introduced in 3.26.4.
(In reply to Jeremy Bicha from comment #5) > Review of attachment 365644 [details] [review] [review]: > > As far as I can tell, this patch is not needed since it just replaces the > new set() fix for this issue introduced in 3.26.4. You are right, I thought the walk_directories function returns absolute paths since the patch applies os.path.basename to them but apparently it is not the case. The patch from https://bugzilla.gnome.org/show_bug.cgi?id=762789 will suffice, then. (In reply to Jeremy Bicha from comment #4) > Do you happen to have a test case for this bug so that I can verify that the > patches work? mkdir -p foodir/themes/FooTheme/gtk-3.0 touch foodir/themes/FooTheme/gtk-3.0/gtk.css mkdir -p foodir/icons/FooTheme/cursors touch foodir/icons/FooTheme/index.theme env XDG_DATA_DIRS=foodir:$XDG_DATA_DIRS result/bin/gnome-tweak-tool
Testing the gsettings patch would be harder, on FHS systems, to prepare, you need to meddle with files managed by package manager: mkdir -p foodir/glib-2.0/schemas sudo mv /usr/share/glib-2.0/schemas/org.gnome.mutter{,.wayland}.gschema.xml foodir/glib-2.0/schemas sudo mv /usr/share/glib-2.0/schemas/gschemas.compiled foodir glib-compile-schemas foodir/glib-2.0/schemas sudo glib-compile-schemas /usr/share/foodir/glib-2.0/schemas Then you can test it the same way as with the themes: env XDG_DATA_DIRS=foodir:$XDG_DATA_DIRS result/bin/gnome-tweak-tool If the patch works, the application will start, otherwise you will get `gtweak.gsettings.GSettingsMissingError: org.gnome.mutter`. Finally, to revert the changes: sudo mv foodir/glib-2.0/schemas/org.gnome.mutter{,.wayland}.gschema.xml /usr/share/glib-2.0/schemas sudo mv foodir /usr/share/glib-2.0/schemas/gschemas.compiled
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-tweaks/issues/114.