[gtk+/gtk-style-context: 371/533] GtkSettings: Keep right refcount of the theme provider.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-style-context: 371/533] GtkSettings: Keep right refcount of the theme provider.
- Date: Wed, 1 Dec 2010 02:37:00 +0000 (UTC)
commit fd992b64a159fdaa2686055aa9204c2c4d6608c3
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Nov 13 22:36:22 2010 +0100
GtkSettings: Keep right refcount of the theme provider.
gtk/gtksettings.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c
index eb541f9..f699dec 100644
--- a/gtk/gtksettings.c
+++ b/gtk/gtksettings.c
@@ -2636,12 +2636,15 @@ settings_update_theme (GtkSettings *settings)
GTK_STYLE_PROVIDER (provider));
if (new_provider)
- gtk_style_context_add_provider_for_screen (settings->screen,
- GTK_STYLE_PROVIDER (new_provider),
- GTK_STYLE_PROVIDER_PRIORITY_SETTINGS + 1);
+ {
+ gtk_style_context_add_provider_for_screen (settings->screen,
+ GTK_STYLE_PROVIDER (new_provider),
+ GTK_STYLE_PROVIDER_PRIORITY_SETTINGS + 1);
+ g_object_ref (new_provider);
+ }
g_object_set_qdata_full (G_OBJECT (settings), quark_theme_name,
- new_provider, (GDestroyNotify) g_object_unref);
+ new_provider, (GDestroyNotify) g_object_unref);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]