Try to load css themes from the XDG config directory first
Will fall back to previous locations. https://bugzilla.gnome.org/show_bug.cgi?id=646631
This commit is contained in:
parent
bbb7b2987e
commit
9f5e580821
@ -2719,7 +2719,6 @@ gtk_css_provider_get_named (const gchar *name,
|
|||||||
|
|
||||||
if (!provider)
|
if (!provider)
|
||||||
{
|
{
|
||||||
const gchar *home_dir;
|
|
||||||
gchar *subpath, *path = NULL;
|
gchar *subpath, *path = NULL;
|
||||||
|
|
||||||
if (variant)
|
if (variant)
|
||||||
@ -2727,8 +2726,21 @@ gtk_css_provider_get_named (const gchar *name,
|
|||||||
else
|
else
|
||||||
subpath = g_strdup ("gtk-3.0" G_DIR_SEPARATOR_S "gtk.css");
|
subpath = g_strdup ("gtk-3.0" G_DIR_SEPARATOR_S "gtk.css");
|
||||||
|
|
||||||
/* First look in the users home directory
|
/* First look in the user's config directory
|
||||||
*/
|
*/
|
||||||
|
path = g_build_filename (g_get_user_data_dir (), "themes", name, subpath, NULL);
|
||||||
|
if (!g_file_test (path, G_FILE_TEST_EXISTS))
|
||||||
|
{
|
||||||
|
g_free (path);
|
||||||
|
path = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Next look in the user's home directory
|
||||||
|
*/
|
||||||
|
if (!path)
|
||||||
|
{
|
||||||
|
const gchar *home_dir;
|
||||||
|
|
||||||
home_dir = g_get_home_dir ();
|
home_dir = g_get_home_dir ();
|
||||||
if (home_dir)
|
if (home_dir)
|
||||||
{
|
{
|
||||||
@ -2740,6 +2752,7 @@ gtk_css_provider_get_named (const gchar *name,
|
|||||||
path = NULL;
|
path = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!path)
|
if (!path)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user