forked from AuroraMiddleware/gtk
Hardcode 3.0 version for style files and paths.
It's about time to start using the right paths.
This commit is contained in:
parent
37f9f491d2
commit
a185954d7c
@ -3221,9 +3221,9 @@ gtk_css_provider_get_named (const gchar *name,
|
||||
gchar *subpath, *path = NULL;
|
||||
|
||||
if (variant)
|
||||
subpath = g_strdup_printf ("gtk-%d.0" G_DIR_SEPARATOR_S "gtk-%s.css", GTK_MAJOR_VERSION, variant);
|
||||
subpath = g_strdup_printf ("gtk-3.0" G_DIR_SEPARATOR_S "gtk-%s.css", variant);
|
||||
else
|
||||
subpath = g_strdup_printf ("gtk-%d.0" G_DIR_SEPARATOR_S "gtk.css", GTK_MAJOR_VERSION);
|
||||
subpath = g_strdup ("gtk-3.0" G_DIR_SEPARATOR_S "gtk.css");
|
||||
|
||||
/* First look in the users home directory
|
||||
*/
|
||||
|
@ -1354,14 +1354,11 @@ settings_init_style (GtkSettings *settings)
|
||||
if (G_UNLIKELY (!css_provider))
|
||||
{
|
||||
GFile *home_dir, *css_file;
|
||||
gchar *filename;
|
||||
|
||||
css_provider = gtk_css_provider_new ();
|
||||
home_dir = g_file_new_for_path (g_get_home_dir ());
|
||||
|
||||
filename = g_strdup_printf (".gtk-%d.0.css", GTK_MAJOR_VERSION);
|
||||
css_file = g_file_get_child (home_dir, filename);
|
||||
g_free (filename);
|
||||
home_dir = g_file_new_for_path (g_get_home_dir ());
|
||||
css_file = g_file_get_child (home_dir, ".gtk-3.0.css");
|
||||
|
||||
if (g_file_query_exists (css_file, NULL))
|
||||
gtk_css_provider_load_from_file (css_provider, css_file, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user