[Xfce4-commits] [xfce/thunar] 01/02: Do not exit when dbus name registration fails (Bug #15149)
noreply at xfce.org
noreply at xfce.org
Mon Mar 18 23:17:03 CET 2019
This is an automated email from the git hooks/post-receive script.
a l e x p u s h e d a c o m m i t t o b r a n c h x f c e - 4 . 1 4
in repository xfce/thunar.
commit dc5b10aec192514546f3989fcf010bece676b679
Author: Andre Miranda <andreldm at xfce.org>
Date: Sun Mar 17 20:35:57 2019 -0300
Do not exit when dbus name registration fails (Bug #15149)
---
thunar/thunar-application.c | 29 +++++------------------------
1 file changed, 5 insertions(+), 24 deletions(-)
diff --git a/thunar/thunar-application.c b/thunar/thunar-application.c
index 694db53..dc3cadf 100644
--- a/thunar/thunar-application.c
+++ b/thunar/thunar-application.c
@@ -117,10 +117,7 @@ static void thunar_application_dbus_acquired_cb (GDBusConnection
static void thunar_application_name_acquired_cb (GDBusConnection *connection,
const gchar *name,
gpointer user_data);
-static void thunar_application_dbus_name_lost_crit_cb (GDBusConnection *connection,
- const gchar *name,
- gpointer user_data);
-static void thunar_application_dbus_name_lost_warn_cb (GDBusConnection *connection,
+static void thunar_application_dbus_name_lost_cb (GDBusConnection *connection,
const gchar *name,
gpointer user_data);
static void thunar_application_dbus_init (ThunarApplication *application);
@@ -308,19 +305,7 @@ thunar_application_name_acquired_cb (GDBusConnection *connection,
static void
-thunar_application_dbus_name_lost_crit_cb (GDBusConnection *connection,
- const gchar *name,
- gpointer user_data)
-{
- ThunarApplication *application = user_data;
- g_critical (_("Name '%s' lost on the message dbus, exiting."), name);
- g_application_quit (G_APPLICATION (application));
-}
-
-
-
-static void
-thunar_application_dbus_name_lost_warn_cb (GDBusConnection *connection,
+thunar_application_dbus_name_lost_cb (GDBusConnection *connection,
const gchar *name,
gpointer user_data)
{
@@ -330,20 +315,16 @@ thunar_application_dbus_name_lost_warn_cb (GDBusConnection *connection,
/* TODO: [GTK3 Port] Check if there's a cleaner way to register */
-/* this extra dbus name (besides org.xfce.Thunar) */
+/* these extra dbus names (besides org.xfce.Thunar) */
static void
thunar_application_dbus_init (ThunarApplication *application)
{
- /* Do not atempt to register if running as root */
- if (geteuid() == 0)
- return;
-
application->dbus_owner_id_xfce = g_bus_own_name (G_BUS_TYPE_SESSION,
"org.xfce.FileManager",
G_BUS_NAME_OWNER_FLAGS_NONE,
thunar_application_dbus_acquired_cb,
thunar_application_name_acquired_cb,
- thunar_application_dbus_name_lost_crit_cb,
+ thunar_application_dbus_name_lost_cb,
application,
NULL);
@@ -352,7 +333,7 @@ thunar_application_dbus_init (ThunarApplication *application)
G_BUS_NAME_OWNER_FLAGS_NONE,
thunar_application_dbus_acquired_cb,
thunar_application_name_acquired_cb,
- thunar_application_dbus_name_lost_warn_cb,
+ thunar_application_dbus_name_lost_cb,
application,
NULL);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list