summaryrefslogtreecommitdiff
path: root/gtk/gtksettings.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2006-07-21 16:12:44 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2006-07-21 16:12:44 +0000
commitfee9accbd15097a392d8ce615741f5d4481003ec (patch)
tree8c85950b47d8bac29f9921aa1b38ee352da4a9ea /gtk/gtksettings.c
parenta0cdff6cca323407cc62b06c0765babaf9f6cb96 (diff)
downloadgtk+-fee9accbd15097a392d8ce615741f5d4481003ec.tar.gz
New function to destroy an rc context.
2006-07-21 Matthias Clasen <mclasen@redhat.com> * gtk/gtkrc.h: * gtk/gtkrc.c (_gtk_rc_context_destroy): New function to destroy an rc context. * gtk/gtksettings.c (gtk_settings_finalize): Destroy the rc context. (gtk_settings_get_for_screen): Unref the settings when the screen goes away. (#348096, Chris Wilson)
Diffstat (limited to 'gtk/gtksettings.c')
-rw-r--r--gtk/gtksettings.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c
index 2b038f9c20..80e3102f11 100644
--- a/gtk/gtksettings.c
+++ b/gtk/gtksettings.c
@@ -524,6 +524,8 @@ gtk_settings_finalize (GObject *object)
g_value_unset (&settings->property_values[i].value);
g_free (settings->property_values);
+ _gtk_rc_context_destroy (settings);
+
g_datalist_clear (&settings->queued_settings);
G_OBJECT_CLASS (gtk_settings_parent_class)->finalize (object);
@@ -551,7 +553,8 @@ gtk_settings_get_for_screen (GdkScreen *screen)
{
settings = g_object_new (GTK_TYPE_SETTINGS, NULL);
settings->screen = screen;
- g_object_set_data (G_OBJECT (screen), I_("gtk-settings"), settings);
+ g_object_set_data_full (G_OBJECT (screen), I_("gtk-settings"),
+ settings, g_object_unref);
gtk_rc_reparse_all_for_settings (settings, TRUE);
settings_update_double_click (settings);