diff options
author | David Zeuthen <davidz@redhat.com> | 2009-06-17 09:49:44 -0400 |
---|---|---|
committer | David Zeuthen <davidz@redhat.com> | 2009-06-17 09:50:35 -0400 |
commit | 4053577a19585c63e23e6c6e85011e2df9910745 (patch) | |
tree | 8c77e6ab423827a8623e7b55ad77ef362eb669af /common | |
parent | 8a72222d454bdf12e88402b2f012667e7c8e9754 (diff) | |
download | gvfs-4053577a19585c63e23e6c6e85011e2df9910745.tar.gz |
Bug 585591 – Starting/stopping drives
This is the GVfs implementation for the new GIO API for
starting/stopping drives. See
http://bugzilla.gnome.org/show_bug.cgi?id=585591
for details.
Diffstat (limited to 'common')
-rw-r--r-- | common/gmountoperationdbus.c | 12 | ||||
-rw-r--r-- | common/gmountsource.c | 6 | ||||
-rw-r--r-- | common/gvfsdaemonprotocol.h | 2 |
3 files changed, 5 insertions, 15 deletions
diff --git a/common/gmountoperationdbus.c b/common/gmountoperationdbus.c index 7700c073..b8ac4f7d 100644 --- a/common/gmountoperationdbus.c +++ b/common/gmountoperationdbus.c @@ -281,10 +281,8 @@ mount_op_ask_question (GMountOperationDBus *op_dbus, const char *message_string; char **choices; int num_choices; - dbus_bool_t handled = FALSE; DBusMessage *reply; DBusError error; - gboolean res; DBusMessageIter iter; reply = NULL; @@ -316,15 +314,7 @@ mount_op_ask_question (GMountOperationDBus *op_dbus, g_signal_emit_by_name (op_dbus->op, "ask_question", message_string, - choices, - &res); - if (!res) - { - _g_dbus_message_append_args (reply, - DBUS_TYPE_BOOLEAN, &handled, - 0); - mount_op_send_reply (op_dbus, reply); - } + choices); dbus_free_string_array (choices); } diff --git a/common/gmountsource.c b/common/gmountsource.c index b2f490d1..ac705fad 100644 --- a/common/gmountsource.c +++ b/common/gmountsource.c @@ -613,7 +613,7 @@ g_mount_source_ask_question_async (GMountSource *source, _g_dbus_message_append_args (message, DBUS_TYPE_STRING, &message_string, DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, - choices, n_choices, + &choices, n_choices, 0); result = g_simple_async_result_new (G_OBJECT (source), callback, user_data, @@ -687,13 +687,12 @@ static gboolean op_ask_question (GMountOperation *op, const char *message, const char **choices, - gint n_choices, GMountSource *mount_source) { g_mount_source_ask_question_async (mount_source, message, choices, - n_choices, + g_strv_length ((gchar **) choices), op_ask_question_reply, g_object_ref (op)); g_signal_stop_emission_by_name (op, "ask_question"); @@ -741,7 +740,6 @@ g_mount_source_get_operation (GMountSource *mount_source) g_object_ref (mount_source), g_object_unref); - g_signal_connect (op, "ask_password", (GCallback)op_ask_password, mount_source); g_signal_connect (op, "ask_question", (GCallback)op_ask_question, mount_source); g_signal_connect (op, "aborted", (GCallback)op_aborted, mount_source); diff --git a/common/gvfsdaemonprotocol.h b/common/gvfsdaemonprotocol.h index 5f70ed3d..ce8b11ea 100644 --- a/common/gvfsdaemonprotocol.h +++ b/common/gvfsdaemonprotocol.h @@ -37,6 +37,8 @@ G_BEGIN_DECLS #define G_VFS_DBUS_MOUNT_OP_MOUNT_MOUNTABLE "MountMountable" #define G_VFS_DBUS_MOUNT_OP_UNMOUNT_MOUNTABLE "UnountMountable" #define G_VFS_DBUS_MOUNT_OP_EJECT_MOUNTABLE "EjectMountable" +#define G_VFS_DBUS_MOUNT_OP_START_MOUNTABLE "StartMountable" +#define G_VFS_DBUS_MOUNT_OP_STOP_MOUNTABLE "StopMountable" #define G_VFS_DBUS_MOUNT_OP_SET_DISPLAY_NAME "SetDisplayName" #define G_VFS_DBUS_MOUNT_OP_DELETE "Delete" #define G_VFS_DBUS_MOUNT_OP_TRASH "Trash" |