diff options
author | infirit <[email protected]> | 2015-09-12 12:03:15 +0200 |
---|---|---|
committer | infirit <[email protected]> | 2015-09-12 12:03:15 +0200 |
commit | b06d4ae63fc95f50870510ca0acbaf049ba6dbb2 (patch) | |
tree | ddb78b27eba1719843015ee5adafc57a9a008315 /src/polkitmateauthenticator.c | |
parent | 0160a96e5630d84b92e3e87fc072d3558b03baab (diff) | |
download | mate-polkit-b06d4ae63fc95f50870510ca0acbaf049ba6dbb2.tar.bz2 mate-polkit-b06d4ae63fc95f50870510ca0acbaf049ba6dbb2.tar.xz |
Return error when authentication dialog is dismissed
This allows PolicyKit applications to disambiguate between when the
authentication dialog is dismissed versus when authentication fails
(e.g. the wrong password has been entered).
From polkit-gnome,
commit: 2511afae6b72fe3b4714d07ab6373c93c2923a5e
From: David Zeuthen <[email protected]>
Gnome bug: https://bugs.freedesktop.org/show_bug.cgi?id=30653
Diffstat (limited to 'src/polkitmateauthenticator.c')
-rw-r--r-- | src/polkitmateauthenticator.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/polkitmateauthenticator.c b/src/polkitmateauthenticator.c index e5fd4c4..93440cd 100644 --- a/src/polkitmateauthenticator.c +++ b/src/polkitmateauthenticator.c @@ -127,6 +127,7 @@ polkit_mate_authenticator_class_init (PolkitMateAuthenticatorClass *klass) * PolkitMateAuthenticator::completed: * @authenticator: A #PolkitMateAuthenticator. * @gained_authorization: Whether the authorization was gained. + * @dismissed: Whether the dialog was dismissed. * * Emitted when the authentication is completed. The user is supposed to dispose of @authenticator * upon receiving this signal. @@ -137,9 +138,10 @@ polkit_mate_authenticator_class_init (PolkitMateAuthenticatorClass *klass) 0, /* class offset */ NULL, /* accumulator */ NULL, /* accumulator data */ - g_cclosure_marshal_VOID__BOOLEAN, + g_cclosure_marshal_generic, G_TYPE_NONE, - 1, + 2, + G_TYPE_BOOLEAN, G_TYPE_BOOLEAN); } @@ -473,7 +475,10 @@ do_initiate (gpointer user_data) } out: - g_signal_emit_by_name (authenticator, "completed", authenticator->gained_authorization); + g_signal_emit_by_name (authenticator, + "completed", + authenticator->gained_authorization, + authenticator->was_cancelled); g_object_unref (authenticator); |