[nautilus/freedesktop-dbus] Implement ShowItems() vs. ShowFolders() from the DBus interface
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/freedesktop-dbus] Implement ShowItems() vs. ShowFolders() from the DBus interface
- Date: Wed, 14 Dec 2011 00:18:38 +0000 (UTC)
commit 08c2044e7056a9d6113dbf3613ea6303b6f0180d
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Dec 13 17:53:37 2011 -0600
Implement ShowItems() vs. ShowFolders() from the DBus interface
We use the new nautilus_application_open_location() to do this;
now we can distinguish 'open a location and select something inside it',
vs. 'show a location'.
Signed-off-by: Federico Mena Quintero <federico gnome org>
src/nautilus-freedesktop-dbus.c | 25 +++++++------------------
1 files changed, 7 insertions(+), 18 deletions(-)
---
diff --git a/src/nautilus-freedesktop-dbus.c b/src/nautilus-freedesktop-dbus.c
index 3aa85f0..ce17edc 100644
--- a/src/nautilus-freedesktop-dbus.c
+++ b/src/nautilus-freedesktop-dbus.c
@@ -81,17 +81,15 @@ skeleton_handle_show_items_cb (NautilusFreedesktopFileManager1 *object,
for (i = 0; uris[i] != NULL; i++) {
GFile *file;
- GFile *files[1];
+ GFile *parent;
file = g_file_new_for_uri (uris[i]);
- files[0] = file;
+ parent = g_file_get_parent (file);
+
+ nautilus_application_open_location (fdb->application, parent, file, startup_id);
- /* FIXME: we are not using the startup_id. This is not
- * what g_application_open() expects, and neither does
- * NautilusApplication internally.
- */
- g_application_open (G_APPLICATION (fdb->application), files, 1, "");
g_object_unref (file);
+ g_object_unref (parent);
}
nautilus_freedesktop_file_manager1_complete_show_items (object, invocation);
@@ -105,25 +103,16 @@ skeleton_handle_show_folders_cb (NautilusFreedesktopFileManager1 *object,
const gchar *startup_id,
gpointer data)
{
- /* FIXME: NautilusApplication makes no distinction between showing
- * files vs. folders. For now we will just use the same
- * implementation.
- */
NautilusFreedesktopDBus *fdb = data;
int i;
for (i = 0; uris[i] != NULL; i++) {
GFile *file;
- GFile *files[1];
file = g_file_new_for_uri (uris[i]);
- files[0] = file;
- /* FIXME: we are not using the startup_id. This is not
- * what g_application_open() expects, and neither does
- * NautilusApplication internally.
- */
- g_application_open (G_APPLICATION (fdb->application), files, 1, "");
+ nautilus_application_open_location (fdb->application, file, NULL, startup_id);
+
g_object_unref (file);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]