[Xfce4-commits] [xfce/thunar] 35/46: Register org.xfce.FileManager name

noreply at xfce.org noreply at xfce.org
Tue Aug 15 02:35:43 CEST 2017


This is an automated email from the git hooks/post-receive script.

a   n   d   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/thunar.

commit ea535c2a2cd21172fee72039a8967cc152f59884
Author: Andre Miranda <andre42m at gmail.com>
Date:   Wed May 17 23:05:50 2017 -0300

    Register org.xfce.FileManager name
---
 thunar/thunar-application.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/thunar/thunar-application.c b/thunar/thunar-application.c
index b9e99f0..e17be50 100644
--- a/thunar/thunar-application.c
+++ b/thunar/thunar-application.c
@@ -198,6 +198,8 @@ struct _ThunarApplication
 #endif
 
   GList                 *files_to_launch;
+
+  guint                  dbus_owner_id;
 };
 
 
@@ -273,6 +275,23 @@ thunar_application_init (ThunarApplication *application)
 
 
 
+/* TODO: [GTK3 Port] Check if there's a cleaner way to register */
+/* this extra dbus name (besides org.xfce.Thunar) */
+static void
+thunar_dbus_init (ThunarApplication *application)
+{
+    application->dbus_owner_id = g_bus_own_name (G_BUS_TYPE_SESSION,
+                               "org.xfce.FileManager",
+                               G_BUS_NAME_OWNER_FLAGS_NONE,
+                               NULL,
+                               NULL,
+                               NULL,
+                               application,
+                               NULL);
+}
+
+
+
 static void
 thunar_application_startup (GApplication *gapp)
 {
@@ -314,6 +333,8 @@ thunar_application_startup (GApplication *gapp)
   /* connect to the session manager */
   application->session_client = thunar_session_client_new (opt_sm_client_id);
 
+  thunar_dbus_init (application);
+
   G_APPLICATION_CLASS (thunar_application_parent_class)->startup (gapp);
 }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list