[seahorse-nautilus] Don't use g_atexit now that its deprecated
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seahorse-nautilus] Don't use g_atexit now that its deprecated
- Date: Fri, 29 Jun 2012 07:36:27 +0000 (UTC)
commit d673c20a6d376300accbec3f0da91b0d581fc465
Author: Stef Walter <stefw gnome org>
Date: Fri Jun 29 08:43:42 2012 +0200
Don't use g_atexit now that its deprecated
tool/seahorse-libdialogs.h | 2 ++
tool/seahorse-notification.c | 17 ++++++++---------
tool/seahorse-tool.c | 2 ++
3 files changed, 12 insertions(+), 9 deletions(-)
---
diff --git a/tool/seahorse-libdialogs.h b/tool/seahorse-libdialogs.h
index d1aaa94..a46f015 100644
--- a/tool/seahorse-libdialogs.h
+++ b/tool/seahorse-libdialogs.h
@@ -45,4 +45,6 @@ void seahorse_notification_display (const gchar *summary,
gboolean seahorse_notification_have (void);
+void seahorse_notification_cleanup (void);
+
#endif /* __SEAHORSE_LIBDIALOGS_H__ */
diff --git a/tool/seahorse-notification.c b/tool/seahorse-notification.c
index 7d5caea..6fcc1b6 100644
--- a/tool/seahorse-notification.c
+++ b/tool/seahorse-notification.c
@@ -411,14 +411,6 @@ keys_start_element (GMarkupParseContext *ctx, const gchar *element_name,
}
-static void
-free_keyset (void)
-{
- if (keyset)
- g_object_unref (keyset);
- keyset = NULL;
-}
-
/* -----------------------------------------------------------------------------
* OBJECT
*/
@@ -429,7 +421,6 @@ seahorse_notification_init (SeahorseNotification *snotif)
if (!keyset) {
keyset = cryptui_keyset_new ("openpgp", TRUE);
g_return_if_fail (keyset);
- g_atexit (free_keyset);
}
g_signal_connect (keyset, "changed", G_CALLBACK (key_changed), snotif);
@@ -687,3 +678,11 @@ seahorse_notify_signatures (const gchar* data, gpgme_verify_result_t status)
g_free (title);
g_free (body);
}
+
+void
+seahorse_notification_cleanup (void)
+{
+ if (keyset)
+ g_object_unref (keyset);
+ keyset = NULL;
+}
diff --git a/tool/seahorse-tool.c b/tool/seahorse-tool.c
index bb840ce..4fbdd6f 100644
--- a/tool/seahorse-tool.c
+++ b/tool/seahorse-tool.c
@@ -773,6 +773,8 @@ main (int argc, char **argv)
g_object_unref (seahorse_tool_settings);
seahorse_tool_settings = NULL;
+ seahorse_notification_cleanup ();
+
g_strfreev (uris);
return ret;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]