[nautilus/wip/csoriano/destktop-split2] f with dbus



commit 749ab05797bdd9ad241742e5fc2511bf0518c61a
Author: Carlos Soriano <csoriano gnome org>
Date:   Wed Mar 16 18:08:06 2016 +0100

    f with dbus

 src/nautilus-desktop-application.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/src/nautilus-desktop-application.c b/src/nautilus-desktop-application.c
index 9102e79..2783ea3 100644
--- a/src/nautilus-desktop-application.c
+++ b/src/nautilus-desktop-application.c
@@ -40,11 +40,11 @@ struct _NautilusDesktopApplication
 G_DEFINE_TYPE (NautilusDesktopApplication, nautilus_desktop_application, NAUTILUS_TYPE_APPLICATION)
 
 static void
-on_show_items (GObject      *source_object,
+on_show_folders (GObject      *source_object,
                GAsyncResult *res,
                gpointer      user_data)
 {
-  GError *error;
+  GError *error = NULL;
 
   nautilus_freedesktop_file_manager1_call_show_items_finish (freedesktop_proxy,
                                                              res,
@@ -69,7 +69,7 @@ open_location_on_dbus (NautilusDesktopApplication *self,
                                                         uris,
                                                         "",
                                                         self->freedesktop_cancellable,
-                                                        on_show_items,
+                                                        on_show_folders,
                                                         self);
 }
 
@@ -79,9 +79,9 @@ on_freedesktop_bus_proxy_created (GObject      *source_object,
                                   GAsyncResult *res,
                                   gpointer      user_data)
 {
-  GError *error;
+  GError *error = NULL;
 
-  freedesktop_proxy = nautilus_freedesktop_file_manager1_proxy_new_finish (res, &error);
+  freedesktop_proxy = nautilus_freedesktop_file_manager1_proxy_new_for_bus_finish (res, &error);
 
   if (error != NULL)
     {
@@ -194,10 +194,11 @@ nautilus_desktop_application_startup (GApplication *app)
 
   g_print ("startup desktop\n");
   nautilus_application_startup_common (NAUTILUS_APPLICATION (app));
+  self->freedesktop_cancellable = g_cancellable_new ();
   nautilus_freedesktop_file_manager1_proxy_new_for_bus (G_BUS_TYPE_SESSION,
                                                         G_DBUS_PROXY_FLAGS_NONE,
-                                                        "org.freedesktop.FileManager1.ShowItems",
-                                                        "/org/freedesktop/FileManager1/ShowItems",
+                                                        "org.freedesktop.FileManager1",
+                                                        "/org/freedesktop/FileManager1",
                                                         self->freedesktop_cancellable,
                                                         on_freedesktop_bus_proxy_created,
                                                         self);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]