[calls] call-window: Use g_clear_handle_id instead of emulating it



commit 2d18667ee78c84f35f9ad13074affc22cc5f26d0
Author: Evangelos Ribeiro Tzaras <devrtz fortysixandtwo eu>
Date:   Sun Dec 5 16:51:26 2021 +0100

    call-window: Use g_clear_handle_id instead of emulating it

 src/calls-call-window.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/calls-call-window.c b/src/calls-call-window.c
index 1a9677a0..57bc6cb8 100644
--- a/src/calls-call-window.c
+++ b/src/calls-call-window.c
@@ -112,10 +112,8 @@ update_visibility (CallsCallWindow *self)
                              G_SOURCE_FUNC (on_delayed_window_hide),
                              self);
   } else {
-    if (self->hideout_id > 0) {
-      g_source_remove (self->hideout_id);
-      self->hideout_id = 0;
-    }
+    g_clear_handle_id (&self->hideout_id, g_source_remove);
+
     gtk_widget_set_visible (GTK_WIDGET (self), TRUE);
 
     if (calls == 1)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]