[gnome-builder] omnibar: use ide_clear_signal_handler()
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] omnibar: use ide_clear_signal_handler()
- Date: Thu, 23 Nov 2017 12:00:58 +0000 (UTC)
commit fededaa3ed090b643961015308df65750077e199
Author: Christian Hergert <chergert redhat com>
Date: Thu Nov 23 03:59:38 2017 -0800
omnibar: use ide_clear_signal_handler()
Cleaner and safer against disconnecting 0.
src/libide/workbench/ide-omni-bar.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/libide/workbench/ide-omni-bar.c b/src/libide/workbench/ide-omni-bar.c
index 84fa8ff..96280c7 100644
--- a/src/libide/workbench/ide-omni-bar.c
+++ b/src/libide/workbench/ide-omni-bar.c
@@ -456,8 +456,7 @@ ide_omni_bar__build_manager__build_failed (IdeOmniBar *self,
g_assert (IDE_IS_BUILD_MANAGER (build_manager));
gtk_label_set_label (self->popover_build_message, NULL);
- g_signal_handler_disconnect (build_pipeline, self->message_handler);
- self->message_handler = 0;
+ ide_clear_signal_handler (build_pipeline, &self->message_handler);
gtk_label_set_label (self->popover_build_result_label, _("Failed"));
dzl_gtk_widget_add_style_class (GTK_WIDGET (self->popover_build_result_label), "error");
@@ -475,8 +474,7 @@ ide_omni_bar__build_manager__build_finished (IdeOmniBar *self,
g_assert (IDE_IS_BUILD_MANAGER (build_manager));
gtk_label_set_label (self->popover_build_message, NULL);
- g_signal_handler_disconnect (build_pipeline, self->message_handler);
- self->message_handler = 0;
+ ide_clear_signal_handler (build_pipeline, &self->message_handler);
gtk_label_set_label (self->popover_build_result_label, _("Success"));
dzl_gtk_widget_add_style_class (GTK_WIDGET (self->popover_build_result_label), "success");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]