mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-30 05:43:28 +02:00
gio: Use g_steal_handle_id() with signal unsubscriptions
This makes no functional changes, but does tidy the code up a bit and means `g_steal_handle_id()` gets a bit more testing. Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
@@ -544,10 +544,7 @@ g_application_impl_attempt_primary (GApplicationImpl *impl,
|
||||
impl->primary = (rval != DBUS_REQUEST_NAME_REPLY_EXISTS);
|
||||
|
||||
if (!impl->primary && impl->name_lost_signal)
|
||||
{
|
||||
g_dbus_connection_signal_unsubscribe (impl->session_bus, impl->name_lost_signal);
|
||||
impl->name_lost_signal = 0;
|
||||
}
|
||||
g_dbus_connection_signal_unsubscribe (impl->session_bus, g_steal_handle_id (&impl->name_lost_signal));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -592,10 +589,7 @@ g_application_impl_stop_primary (GApplicationImpl *impl)
|
||||
}
|
||||
|
||||
if (impl->name_lost_signal)
|
||||
{
|
||||
g_dbus_connection_signal_unsubscribe (impl->session_bus, impl->name_lost_signal);
|
||||
impl->name_lost_signal = 0;
|
||||
}
|
||||
g_dbus_connection_signal_unsubscribe (impl->session_bus, g_steal_handle_id (&impl->name_lost_signal));
|
||||
|
||||
if (impl->primary && impl->bus_name)
|
||||
{
|
||||
|
Reference in New Issue
Block a user