[gtk+] Use a define for the default theme name



commit 974e930fb8443f45e0c1818f40b158768bb21ca6
Author: William Jon McCann <william jon mccann gmail com>
Date:   Fri Jan 24 08:04:04 2014 -0500

    Use a define for the default theme name

 gtk/gtkcssprovider.c     |    7 ++++---
 gtk/gtksettings.c        |    4 ++--
 gtk/gtksettingsprivate.h |    1 +
 3 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index 0bb2dec..4ea4282 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -34,6 +34,7 @@
 #include "gtkcssselectorprivate.h"
 #include "gtkcssshorthandpropertyprivate.h"
 #include "gtkcssstylefuncsprivate.h"
+#include "gtksettingsprivate.h"
 #include "gtkstyleprovider.h"
 #include "gtkstylecontextprivate.h"
 #include "gtkstylepropertiesprivate.h"
@@ -2838,9 +2839,9 @@ _gtk_css_provider_load_named (GtkCssProvider *provider,
         }
       else
         {
-          /* Worst case, fall back to Raleigh */
-          g_return_if_fail (!g_str_equal (name, "Raleigh")); /* infloop protection */
-          _gtk_css_provider_load_named (provider, "Raleigh", NULL);
+          /* Worst case, fall back to the default */
+          g_return_if_fail (!g_str_equal (name, DEFAULT_THEME_NAME)); /* infloop protection */
+          _gtk_css_provider_load_named (provider, DEFAULT_THEME_NAME, NULL);
         }
     }
 }
diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c
index c90db50..7e7028d 100644
--- a/gtk/gtksettings.c
+++ b/gtk/gtksettings.c
@@ -435,7 +435,7 @@ gtk_settings_class_init (GtkSettingsClass *class)
 #ifdef G_OS_WIN32
                                                                  _gtk_win32_theme_get_default (),
 #else
-                                                                  "Raleigh",
+                                                                  DEFAULT_THEME_NAME,
 #endif
                                                                   GTK_PARAM_READWRITE),
                                              NULL);
@@ -2984,7 +2984,7 @@ get_theme_name (GtkSettings *settings)
     return theme_name;
 
   g_free (theme_name);
-  return g_strdup ("Raleigh");
+  return g_strdup (DEFAULT_THEME_NAME);
 }
 
 static void
diff --git a/gtk/gtksettingsprivate.h b/gtk/gtksettingsprivate.h
index cef7ca6..bb21d9d 100644
--- a/gtk/gtksettingsprivate.h
+++ b/gtk/gtksettingsprivate.h
@@ -22,6 +22,7 @@
 
 G_BEGIN_DECLS
 
+#define DEFAULT_THEME_NAME      "Raleigh"
 
 void                _gtk_settings_set_property_value_from_rc (GtkSettings            *settings,
                                                               const gchar            *name,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]