[gnome-calendar] providers: remove from screen on app::finalize
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] providers: remove from screen on app::finalize
- Date: Fri, 9 Jan 2015 14:34:21 +0000 (UTC)
commit 4832f5e79ef379e775ab97dfa858304be81788ec
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Thu Jan 8 22:35:47 2015 -0500
providers: remove from screen on app::finalize
This fixes the quirks of decreasing the refcount after attaching the
providers to the default screen.
src/gcal-application.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/gcal-application.c b/src/gcal-application.c
index 3143a82..e3a3890 100644
--- a/src/gcal-application.c
+++ b/src/gcal-application.c
@@ -186,6 +186,9 @@ gcal_application_finalize (GObject *object)
priv = gcal_application_get_instance_private (GCAL_APPLICATION (object));
+ gtk_style_context_remove_provider_for_screen (gdk_screen_get_default (), GTK_STYLE_PROVIDER
(priv->colors_provider));
+ gtk_style_context_remove_provider_for_screen (gdk_screen_get_default (), GTK_STYLE_PROVIDER
(priv->provider));
+
g_clear_object (&(priv->settings));
g_clear_object (&(priv->colors_provider));
g_clear_object (&(priv->provider));
@@ -259,7 +262,6 @@ gcal_application_startup (GApplication *app)
g_object_set (gtk_settings_get_default (), "gtk-application-prefer-dark-theme", FALSE, NULL);
g_object_unref (css_file);
- g_object_unref (priv->provider);
}
if (priv->colors_provider != NULL)
@@ -267,7 +269,6 @@ gcal_application_startup (GApplication *app)
gtk_style_context_add_provider_for_screen (gdk_screen_get_default (),
GTK_STYLE_PROVIDER (priv->colors_provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION + 2);
- g_object_unref (priv->colors_provider);
}
priv->manager = gcal_manager_new_with_settings (priv->settings);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]