Freeze property notification. Handle the gtk-color-scheme xsetting being

2007-03-22  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtksettings.c (merge_color_scheme): Freeze property
        notification.
        * gtk/gtksettings.c (_gtk_settings_handle_event): Handle
        the gtk-color-scheme xsetting being unset.

        * gtk/gtkrc.c (gtk_rc_reparse_all_for_settings): Handle
        recursion locally.



svn path=/trunk/; revision=17553
This commit is contained in:
Matthias Clasen 2007-03-22 21:09:08 +00:00 committed by Matthias Clasen
parent 8864f012a5
commit 229999d8a9
3 changed files with 23 additions and 8 deletions

View File

@ -1,3 +1,13 @@
2007-03-22 Matthias Clasen <mclasen@redhat.com>
* gtk/gtksettings.c (merge_color_scheme): Freeze property
notification.
* gtk/gtksettings.c (_gtk_settings_handle_event): Handle
the gtk-color-scheme xsetting being unset.
* gtk/gtkrc.c (gtk_rc_reparse_all_for_settings): Handle
recursion locally.
2007-03-21 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkprintoperation-unix.c: Remove leftover debug spew.

View File

@ -663,8 +663,7 @@ gtk_rc_color_hash_changed (GtkSettings *settings,
g_object_get (settings, "color-hash", &context->color_hash, NULL);
if (!context->reloading)
gtk_rc_reparse_all_for_settings (settings, TRUE);
gtk_rc_reparse_all_for_settings (settings, TRUE);
}
static GtkRcContext *
@ -1717,6 +1716,9 @@ gtk_rc_reparse_all_for_settings (GtkSettings *settings,
context = gtk_rc_context_get (settings);
if (context->reloading)
return FALSE;
if (!force_load)
{
/* Check through and see if any of the RC's have had their

View File

@ -1697,18 +1697,17 @@ _gtk_settings_handle_event (GdkEventSetting *event)
if (pspec)
{
property_id = pspec->param_id;
property_id = pspec->param_id;
if (property_id == PROP_COLOR_SCHEME)
{
GValue value = { 0, };
g_value_init (&value, G_TYPE_STRING);
if (gdk_screen_get_setting (settings->screen, pspec->name, &value))
{
merge_color_scheme (settings, &value, GTK_SETTINGS_SOURCE_XSETTING);
g_value_unset (&value);
}
if (!gdk_screen_get_setting (settings->screen, pspec->name, &value))
g_value_set_static_string (&value, "");
merge_color_scheme (settings, &value, GTK_SETTINGS_SOURCE_XSETTING);
g_value_unset (&value);
}
g_object_notify (G_OBJECT (settings), pspec->name);
@ -2086,6 +2085,8 @@ merge_color_scheme (GtkSettings *settings,
ColorSchemeData *data;
const gchar *colors;
g_object_freeze_notify (G_OBJECT (settings));
colors = g_value_get_string (value);
settings_update_color_scheme (settings);
@ -2095,6 +2096,8 @@ merge_color_scheme (GtkSettings *settings,
if (update_color_hash (data, colors, source))
g_object_notify (G_OBJECT (settings), "color-hash");
g_object_thaw_notify (G_OBJECT (settings));
}
static GHashTable *