[nautilus/freedesktop-dbus: 9/9] Implement ShowItemProperties()
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/freedesktop-dbus: 9/9] Implement ShowItemProperties()
- Date: Tue, 6 Dec 2011 23:48:35 +0000 (UTC)
commit ecf70ad6a66cc1450935e54ebffd95660ebc05a4
Author: Akshay Gupta <kitallis gmail com>
Date: Tue Dec 6 15:54:00 2011 -0600
Implement ShowItemProperties()
src/nautilus-freedesktop-dbus.c | 31 ++++++++++++++++++++++++++++++-
1 files changed, 30 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-freedesktop-dbus.c b/src/nautilus-freedesktop-dbus.c
index dde3d6c..4a09928 100644
--- a/src/nautilus-freedesktop-dbus.c
+++ b/src/nautilus-freedesktop-dbus.c
@@ -28,7 +28,9 @@
#define DEBUG_FLAG NAUTILUS_DEBUG_DBUS
#include "nautilus-debug.h"
-#include "gio/gio.h"
+#include "nautilus-properties-window.h"
+
+#include <gio/gio.h>
/* Parent application */
@@ -104,6 +106,31 @@ skeleton_handle_show_folders_cb (NautilusFreedesktopFileManager1 *object,
return TRUE;
}
+static gboolean
+skeleton_handle_show_item_properties_cb (NautilusFreedesktopFileManager1 *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *const *uris,
+ const gchar *startup_id)
+{
+ GList *files;
+ int i;
+
+ files = NULL;
+
+ for (i = 0; uris[i] != NULL; i++)
+ files = g_list_prepend (files, nautilus_file_get_by_uri (uris[i]));
+
+ files = g_list_reverse (files);
+
+ /* FIXME: we are not using the startup_id */
+ nautilus_properties_window_present (files, NULL);
+
+ nautilus_file_list_free (files);
+
+ nautilus_freedesktop_file_manager1_complete_show_item_properties (object, invocation);
+ return TRUE;
+}
+
static void
bus_acquired_cb (GDBusConnection *conn,
const gchar *name,
@@ -120,6 +147,8 @@ bus_acquired_cb (GDBusConnection *conn,
G_CALLBACK (skeleton_handle_show_items_cb), NULL);
g_signal_connect (skeleton, "handle-show-folders",
G_CALLBACK (skeleton_handle_show_folders_cb), NULL);
+ g_signal_connect (skeleton, "handle-show-item-properties",
+ G_CALLBACK (skeleton_handle_show_item_properties_cb), NULL);
g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (skeleton), connection, "/org/freedesktop/FileManager1", NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]