Hardcode 3.0 version for style files and paths.

It's about time to start using the right paths.
This commit is contained in:
Carlos Garnacho 2010-11-13 22:33:34 +01:00
parent 37f9f491d2
commit a185954d7c
2 changed files with 4 additions and 7 deletions

View File

@ -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
*/

View File

@ -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);