diff options
author | Benjamin Otte <otte@redhat.com> | 2011-03-02 17:18:49 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2011-03-02 17:18:49 +0100 |
commit | 172f894120810f8e1bf2048adff5174018af72e1 (patch) | |
tree | 13acf48befe3c4d576e5588eb1237d915c2edf19 /gtk/gtksettings.c | |
parent | e69badbcd1667de6999363f44b098ffd63077483 (diff) | |
download | gtk+-172f894120810f8e1bf2048adff5174018af72e1.tar.gz |
settings: Always use the same default values
Set the Mac key theme when creating a Quartz settings object instead of
having it the default when quartz is enabled.
This keeps compatibility with the GTK2 behavior that the Mac key theme
is not used for the X11 backend, which could now happen for a
multi-backend build.
Diffstat (limited to 'gtk/gtksettings.c')
-rw-r--r-- | gtk/gtksettings.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c index 9aab920bd7..c25db4bd4f 100644 --- a/gtk/gtksettings.c +++ b/gtk/gtksettings.c @@ -82,12 +82,6 @@ */ -#ifdef GDK_WINDOWING_QUARTZ -#define DEFAULT_KEY_THEME "Mac" -#else -#define DEFAULT_KEY_THEME NULL -#endif - #define DEFAULT_TIMEOUT_INITIAL 200 #define DEFAULT_TIMEOUT_REPEAT 20 #define DEFAULT_TIMEOUT_EXPAND 500 @@ -419,7 +413,7 @@ gtk_settings_class_init (GtkSettingsClass *class) g_param_spec_string ("gtk-key-theme-name", P_("Key Theme Name"), P_("Name of key theme to load"), - DEFAULT_KEY_THEME, + NULL, GTK_PARAM_READWRITE), NULL); g_assert (result == PROP_KEY_THEME_NAME); @@ -1454,7 +1448,12 @@ gtk_settings_get_for_screen (GdkScreen *screen) settings = g_object_get_data (G_OBJECT (screen), "gtk-settings"); if (!settings) { - settings = g_object_new (GTK_TYPE_SETTINGS, NULL); +#ifdef GDK_WINDOWING_QUARTZ + if (GDK_IS_QUARTZ_SCREEN (screen)) + settings = g_object_new (GTK_TYPE_SETTINGS, "gtk-key-theme-name", "Mac", NULL); + else +#endif + settings = g_object_new (GTK_TYPE_SETTINGS, NULL); settings->priv->screen = screen; g_object_set_data_full (G_OBJECT (screen), I_("gtk-settings"), settings, g_object_unref); |