[gtk+/gtk-style-context: 368/540] Hardcode 3.0 version for style files and paths.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-style-context: 368/540] Hardcode 3.0 version for style files and paths.
- Date: Fri, 3 Dec 2010 03:07:04 +0000 (UTC)
commit 97ad4809fcfd7b64d77a00a835db5a69c2c22dec
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Nov 13 22:33:34 2010 +0100
Hardcode 3.0 version for style files and paths.
It's about time to start using the right paths.
gtk/gtkcssprovider.c | 4 ++--
gtk/gtksettings.c | 7 ++-----
2 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index a2ba362..bfda526 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -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
*/
diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c
index ea55a53..9593299 100644
--- a/gtk/gtksettings.c
+++ b/gtk/gtksettings.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]