summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Schwinn <alexxcons@xfce.org>2019-01-27 19:04:32 +0100
committerAlexander Schwinn <alexxcons@xfce.org>2019-01-27 21:00:13 +0100
commit3afc0b486a93908ccd93219a1260f5a52bd75912 (patch)
treebf9581b8be7d76272bd9750472f92a1d0844d707
parent24e76efe502dd3147f1ee6552dd6f82738c30890 (diff)
downloadthunar-3afc0b486a93908ccd93219a1260f5a52bd75912.tar.gz
Exit when name org.freedesktop.filemanager1 lost on message-dbus
(Bug #15088)
-rw-r--r--thunar/thunar-application.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/thunar/thunar-application.c b/thunar/thunar-application.c
index 4e27360b..694db532 100644
--- a/thunar/thunar-application.c
+++ b/thunar/thunar-application.c
@@ -117,7 +117,10 @@ 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_cb (GDBusConnection *connection,
+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,
const gchar *name,
gpointer user_data);
static void thunar_application_dbus_init (ThunarApplication *application);
@@ -305,7 +308,7 @@ thunar_application_name_acquired_cb (GDBusConnection *connection,
static void
-thunar_application_dbus_name_lost_cb (GDBusConnection *connection,
+thunar_application_dbus_name_lost_crit_cb (GDBusConnection *connection,
const gchar *name,
gpointer user_data)
{
@@ -316,6 +319,16 @@ thunar_application_dbus_name_lost_cb (GDBusConnection *connection,
+static void
+thunar_application_dbus_name_lost_warn_cb (GDBusConnection *connection,
+ const gchar *name,
+ gpointer user_data)
+{
+ g_warning (_("Name '%s' lost on the message dbus."), name);
+}
+
+
+
/* TODO: [GTK3 Port] Check if there's a cleaner way to register */
/* this extra dbus name (besides org.xfce.Thunar) */
static void
@@ -330,7 +343,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_cb,
+ thunar_application_dbus_name_lost_crit_cb,
application,
NULL);
@@ -339,7 +352,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_cb,
+ thunar_application_dbus_name_lost_warn_cb,
application,
NULL);
}