[gtk+] settings: Always use the same default values
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] settings: Always use the same default values
- Date: Wed, 2 Mar 2011 16:24:08 +0000 (UTC)
commit 172f894120810f8e1bf2048adff5174018af72e1
Author: Benjamin Otte <otte redhat com>
Date: Wed Mar 2 17:18:49 2011 +0100
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.
gtk/gtksettings.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c
index 9aab920..c25db4b 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]