summaryrefslogtreecommitdiff
path: root/capplets/common/gtkrc-utils.c
diff options
context:
space:
mode:
authorJosé Romildo Malaquias <[email protected]>2019-12-25 18:48:38 -0300
committerlukefromdc <[email protected]>2019-12-27 07:14:52 +0000
commit0734ed62a91179fa17598e672253ce5718620afc (patch)
tree3d2c4b967241ddd94f484d56254f1de1513ef27f /capplets/common/gtkrc-utils.c
parentef2f71866bf51f3e778246db789d119af36276d4 (diff)
downloadmate-control-center-0734ed62a91179fa17598e672253ce5718620afc.tar.bz2
mate-control-center-0734ed62a91179fa17598e672253ce5718620afc.tar.xz
Search system themes in system data dirs
Diffstat (limited to 'capplets/common/gtkrc-utils.c')
-rw-r--r--capplets/common/gtkrc-utils.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/capplets/common/gtkrc-utils.c b/capplets/common/gtkrc-utils.c
index 011c8a11..27e01dae 100644
--- a/capplets/common/gtkrc-utils.c
+++ b/capplets/common/gtkrc-utils.c
@@ -60,15 +60,19 @@ gchar* gtkrc_find_named(const gchar* name)
if (!path)
{
- gchar* theme_dir = gtk_rc_get_theme_dir();
- path = g_build_filename(theme_dir, name, subpath, NULL);
- g_free(theme_dir);
+ const gchar * const * dirs = g_get_system_data_dirs();
- if (!g_file_test(path, G_FILE_TEST_EXISTS))
- {
- g_free (path);
- path = NULL;
- }
+ if (dirs != NULL)
+ for (; !path && *dirs != NULL; ++dirs)
+ {
+ path = g_build_filename(*dirs, "themes", name, subpath, NULL);
+
+ if (!g_file_test(path, G_FILE_TEST_EXISTS))
+ {
+ g_free (path);
+ path = NULL;
+ }
+ }
}
return path;