From c4db474055a604156e1acf162991e625fd340fa5 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Sun, 26 Oct 2008 18:39:15 +0100 Subject: Plugin interface: pass cancellation button id in ask_question callback --- common/vfs_types.h | 1 + gvfs/gvfs.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/common/vfs_types.h b/common/vfs_types.h index aa9981b..99334f9 100644 --- a/common/vfs_types.h +++ b/common/vfs_types.h @@ -57,6 +57,7 @@ typedef void (* TVFSAskQuestionCallback) (const char *message, const char *choices[], int *choice, + int cancel_choice, void *user_data); typedef int (* TVFSAskPasswordCallback) diff --git a/gvfs/gvfs.c b/gvfs/gvfs.c index 2e42bea..557f08c 100644 --- a/gvfs/gvfs.c +++ b/gvfs/gvfs.c @@ -216,7 +216,8 @@ ask_question_cb (GMountOperation *op, choice = -1; if (globs->callback_ask_question) { fprintf (stderr, " (II) Spawning callback_ask_question (0x%.16llX)...\n", (unsigned long long) globs->callback_ask_question); - globs->callback_ask_question (message, choices, &choice, globs->callbacks_data); + /* At this moment, only SFTP uses ask_question and the second button is cancellation */ + globs->callback_ask_question (message, choices, &choice, 1, globs->callbacks_data); fprintf (stderr, " (II) Received choice = %d\n", choice); if (choice >= 0) { -- cgit v1.2.3