Use a define for the default theme name

This commit is contained in:
William Jon McCann 2014-01-24 08:04:04 -05:00
parent 6fa703b506
commit 974e930fb8
3 changed files with 7 additions and 5 deletions

View File

@ -34,6 +34,7 @@
#include "gtkcssselectorprivate.h" #include "gtkcssselectorprivate.h"
#include "gtkcssshorthandpropertyprivate.h" #include "gtkcssshorthandpropertyprivate.h"
#include "gtkcssstylefuncsprivate.h" #include "gtkcssstylefuncsprivate.h"
#include "gtksettingsprivate.h"
#include "gtkstyleprovider.h" #include "gtkstyleprovider.h"
#include "gtkstylecontextprivate.h" #include "gtkstylecontextprivate.h"
#include "gtkstylepropertiesprivate.h" #include "gtkstylepropertiesprivate.h"
@ -2838,9 +2839,9 @@ _gtk_css_provider_load_named (GtkCssProvider *provider,
} }
else else
{ {
/* Worst case, fall back to Raleigh */ /* Worst case, fall back to the default */
g_return_if_fail (!g_str_equal (name, "Raleigh")); /* infloop protection */ g_return_if_fail (!g_str_equal (name, DEFAULT_THEME_NAME)); /* infloop protection */
_gtk_css_provider_load_named (provider, "Raleigh", NULL); _gtk_css_provider_load_named (provider, DEFAULT_THEME_NAME, NULL);
} }
} }
} }

View File

@ -435,7 +435,7 @@ gtk_settings_class_init (GtkSettingsClass *class)
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
_gtk_win32_theme_get_default (), _gtk_win32_theme_get_default (),
#else #else
"Raleigh", DEFAULT_THEME_NAME,
#endif #endif
GTK_PARAM_READWRITE), GTK_PARAM_READWRITE),
NULL); NULL);
@ -2984,7 +2984,7 @@ get_theme_name (GtkSettings *settings)
return theme_name; return theme_name;
g_free (theme_name); g_free (theme_name);
return g_strdup ("Raleigh"); return g_strdup (DEFAULT_THEME_NAME);
} }
static void static void

View File

@ -22,6 +22,7 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#define DEFAULT_THEME_NAME "Raleigh"
void _gtk_settings_set_property_value_from_rc (GtkSettings *settings, void _gtk_settings_set_property_value_from_rc (GtkSettings *settings,
const gchar *name, const gchar *name,