From a438817e9d70e8abbc2dd15b17aa20b100ace91b Mon Sep 17 00:00:00 2001 From: Jussi Laako Date: Tue, 10 Jun 2014 14:57:23 +0300 Subject: [PATCH] identity: emit signal when identity is removed --- libgsignon-glib/signon-identity.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/libgsignon-glib/signon-identity.c b/libgsignon-glib/signon-identity.c index e8c0092..3040012 100644 --- a/libgsignon-glib/signon-identity.c +++ b/libgsignon-glib/signon-identity.c @@ -178,6 +178,7 @@ struct _SignonIdentityPrivate enum { SIGNEDOUT_SIGNAL, + REMOVED_SIGNAL, LAST_SIGNAL }; @@ -457,6 +458,20 @@ signon_identity_class_init (SignonIdentityClass *klass) g_cclosure_marshal_VOID__VOID, G_TYPE_NONE /* return_type */, 0); + /** + * SignonIdentity:removed: + * + * Emitted when the identity was removed (deleted). + */ + signals[REMOVED_SIGNAL] = g_signal_new("removed", + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS, + 0, + NULL, + NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, + 0); object_class->dispose = signon_identity_dispose; object_class->finalize = signon_identity_finalize; @@ -1216,6 +1231,7 @@ identity_process_removed (SignonIdentity *self) g_object_set (self, "id", 0, NULL); priv->id = 0; + g_signal_emit(G_OBJECT(self), signals[REMOVED_SIGNAL], 0); } static void -- 2.34.1