summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2008-10-26 18:39:15 +0100
committerTomas Bzatek <tbzatek@users.sourceforge.net>2008-10-26 18:39:15 +0100
commitc4db474055a604156e1acf162991e625fd340fa5 (patch)
tree237ebb6df66b2b06c2fb58c8b38dc0e0e1973b7a
parent0f7bc5aa0395856a875a3f2e7dc5bce7b5cf612f (diff)
downloadtuxcmd-modules-c4db474055a604156e1acf162991e625fd340fa5.tar.xz
Plugin interface: pass cancellation button id in ask_question callback
-rw-r--r--common/vfs_types.h1
-rw-r--r--gvfs/gvfs.c3
2 files changed, 3 insertions, 1 deletions
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) {