Commit 1209d737 authored by Mohammed Sadiq's avatar Mohammed Sadiq

window: Use g_clear_handle_id to remove source

parent a91da3f8
Pipeline #53668 passed with stages
in 10 minutes and 10 seconds
......@@ -226,23 +226,12 @@ show_message (CallsCallWindow *self,
}
static inline void
stop_info_timeout (CallsCallWindow *self)
{
if (self->info_timeout)
{
g_source_remove (self->info_timeout);
self->info_timeout = 0;
}
}
static void
info_response_cb (GtkInfoBar *infobar,
gint response_id,
CallsCallWindow *self)
{
stop_info_timeout (self);
g_clear_handle_id (&self->info_timeout, g_source_remove);
gtk_revealer_set_reveal_child (self->info_revealer, FALSE);
}
......@@ -672,7 +661,7 @@ dispose (GObject *object)
}
g_clear_object (&self->call_holders);
stop_info_timeout (self);
g_clear_handle_id (&self->info_timeout, g_source_remove);
G_OBJECT_CLASS (calls_call_window_parent_class)->dispose (object);
}
......
......@@ -151,23 +151,12 @@ show_message (CallsMainWindow *self, const gchar *text, GtkMessageType type)
}
static inline void
stop_info_timeout (CallsMainWindow *self)
{
if (self->info_timeout)
{
g_source_remove (self->info_timeout);
self->info_timeout = 0;
}
}
static void
info_response_cb (GtkInfoBar *infobar,
gint response_id,
CallsMainWindow *self)
{
stop_info_timeout (self);
g_clear_handle_id (&self->info_timeout, g_source_remove);
gtk_revealer_set_reveal_child (self->info_revealer, FALSE);
}
......@@ -318,7 +307,7 @@ dispose (GObject *object)
{
CallsMainWindow *self = CALLS_MAIN_WINDOW (object);
stop_info_timeout (self);
g_clear_handle_id (&self->info_timeout, g_source_remove);
g_clear_object (&self->contacts);
g_clear_object (&self->record_store);
g_clear_object (&self->provider);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment