Skip to content

Commit

Permalink
Exit when name org.freedesktop.filemanager1 lost on message-dbus
Browse files Browse the repository at this point in the history
(Bug #15088)
  • Loading branch information
Alexander Schwinn committed Jan 27, 2019
1 parent 380162b commit 1300101
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions thunar/thunar-application.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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)
{
Expand All @@ -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
Expand All @@ -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);

Expand All @@ -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);
}
Expand Down

0 comments on commit 1300101

Please sign in to comment.