[gnome-keyring/dbus-api] Response is empty if window was closed.



commit ca70d157dd143cb48c6531cdec3b68cbd8ad6a4d
Author: Stef Walter <stef memberwebs com>
Date:   Fri Nov 6 02:33:17 2009 +0000

    Response is empty if window was closed.
    
    When prompt window is closed, the response is empty.

 daemon/prompt/gkd-prompt-tool.c |    4 +++-
 daemon/prompt/gkd-prompt.c      |    2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/daemon/prompt/gkd-prompt-tool.c b/daemon/prompt/gkd-prompt-tool.c
index 259a137..c46a232 100644
--- a/daemon/prompt/gkd-prompt-tool.c
+++ b/daemon/prompt/gkd-prompt-tool.c
@@ -305,9 +305,11 @@ gather_response (gint response)
 		value = "ok";
 		break;
 	case GTK_RESPONSE_CANCEL:
-	case GTK_RESPONSE_DELETE_EVENT:
 		value = "no";
 		break;
+	case GTK_RESPONSE_DELETE_EVENT:
+		value = "";
+		break;
 	case GTK_RESPONSE_APPLY:
 		value = "other";
 		break;
diff --git a/daemon/prompt/gkd-prompt.c b/daemon/prompt/gkd-prompt.c
index 193d313..4d12f13 100644
--- a/daemon/prompt/gkd-prompt.c
+++ b/daemon/prompt/gkd-prompt.c
@@ -618,7 +618,7 @@ gkd_prompt_get_response (GkdPrompt *self)
 	g_return_val_if_fail (self->pv->output, GKD_RESPONSE_FAILURE);
 
 	response = g_key_file_get_value (self->pv->output, "prompt", "response", NULL);
-	if (!response) {
+	if (!response || g_str_equal (response, "")) {
 		ret = GKD_RESPONSE_NONE;
 	} else if (g_str_equal (response, "ok")) {
 		ret = GKD_RESPONSE_OK;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]