seahorse r2495 - in trunk: . daemon
- From: nnielsen svn gnome org
- To: svn-commits-list gnome org
- Subject: seahorse r2495 - in trunk: . daemon
- Date: Sat, 13 Sep 2008 21:50:49 +0000 (UTC)
Author: nnielsen
Date: Sat Sep 13 21:50:49 2008
New Revision: 2495
URL: http://svn.gnome.org/viewvc/seahorse?rev=2495&view=rev
Log:
* daemon/seahorse-service-crypto.c:
* daemon/seahorse-service.h: Return a 'cancelled' error when
from the daemon crypto dbus methods when a user cancels
out of a password prompt. Fixes bug #520119
Modified:
trunk/ChangeLog
trunk/daemon/seahorse-service-crypto.c
trunk/daemon/seahorse-service.h
Modified: trunk/daemon/seahorse-service-crypto.c
==============================================================================
--- trunk/daemon/seahorse-service-crypto.c (original)
+++ trunk/daemon/seahorse-service-crypto.c Sat Sep 13 21:50:49 2008
@@ -79,7 +79,12 @@
/* Wait for it to finish (can run main loop stuff) */
seahorse_operation_wait (SEAHORSE_OPERATION (pop));
- if (seahorse_operation_is_successful (SEAHORSE_OPERATION (pop))) {
+ if (seahorse_operation_is_cancelled (SEAHORSE_OPERATION (pop))) {
+
+ g_set_error (error, SEAHORSE_DBUS_CANCELLED, 0, "%s", "");
+ return FALSE;
+
+ } else if (seahorse_operation_is_successful (SEAHORSE_OPERATION (pop))) {
data = gpgme_data_release_and_get_mem (cryptdata, &len);
*result = g_strndup (data, len);
Modified: trunk/daemon/seahorse-service.h
==============================================================================
--- trunk/daemon/seahorse-service.h (original)
+++ trunk/daemon/seahorse-service.h Sat Sep 13 21:50:49 2008
@@ -31,12 +31,14 @@
/* TODO: This needs to be refined */
enum {
+ SEAHORSE_DBUS_ERROR_CANCELLED = -1,
SEAHORSE_DBUS_ERROR_INVALID = 1,
SEAHORSE_DBUS_ERROR_CRYPTO = 2,
SEAHORSE_DBUS_ERROR_NOTIMPLEMENTED = 100
};
-#define SEAHORSE_DBUS_ERROR g_quark_from_static_string ("seahorse")
+#define SEAHORSE_DBUS_ERROR g_quark_from_static_string ("org.gnome.seahorse.Error.Failed")
+#define SEAHORSE_DBUS_CANCELLED g_quark_from_static_string ("org.gnome.seahorse.Error.Cancelled")
typedef struct _SeahorseService SeahorseService;
typedef struct _SeahorseServiceClass SeahorseServiceClass;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]