[gnome-builder] util: use dzl_clear_signal_handler()
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] util: use dzl_clear_signal_handler()
- Date: Sun, 26 Nov 2017 23:26:47 +0000 (UTC)
commit a19e7d466e24a790ac413fc001afc12147af2d8b
Author: Christian Hergert <chergert redhat com>
Date: Sun Nov 26 15:26:10 2017 -0800
util: use dzl_clear_signal_handler()
This needs a recent change in libdazzle, so make sure you update.
src/libide/buffers/ide-buffer.c | 4 ++--
src/libide/ide-macros.h | 8 --------
.../sourceview/ide-word-completion-provider.c | 3 ++-
src/libide/workbench/ide-omni-bar.c | 4 ++--
.../gbp-documentation-card-view-addin.c | 2 +-
.../flatpak/gbp-flatpak-preferences-addin.c | 2 +-
.../gnome-code-assistance/ide-gca-service.c | 5 +++--
7 files changed, 11 insertions(+), 17 deletions(-)
---
diff --git a/src/libide/buffers/ide-buffer.c b/src/libide/buffers/ide-buffer.c
index 383eb0e..996a347 100644
--- a/src/libide/buffers/ide-buffer.c
+++ b/src/libide/buffers/ide-buffer.c
@@ -634,7 +634,7 @@ ide_buffer_reload_change_monitor (IdeBuffer *self)
if (priv->change_monitor)
{
- ide_clear_signal_handler (priv->change_monitor, &priv->change_monitor_changed_handler);
+ dzl_clear_signal_handler (priv->change_monitor, &priv->change_monitor_changed_handler);
g_clear_object (&priv->change_monitor);
}
@@ -1421,7 +1421,7 @@ ide_buffer_dispose (GObject *object)
if (priv->change_monitor != NULL)
{
- ide_clear_signal_handler (priv->change_monitor, &priv->change_monitor_changed_handler);
+ dzl_clear_signal_handler (priv->change_monitor, &priv->change_monitor_changed_handler);
g_clear_object (&priv->change_monitor);
}
diff --git a/src/libide/ide-macros.h b/src/libide/ide-macros.h
index a9ecf01..93fa5a1 100644
--- a/src/libide/ide-macros.h
+++ b/src/libide/ide-macros.h
@@ -23,14 +23,6 @@
G_BEGIN_DECLS
-#define ide_clear_signal_handler(obj,ptr) \
- G_STMT_START { \
- if (*(ptr) != 0) { \
- g_signal_handler_disconnect((obj), *(ptr)); \
- *(ptr) = 0; \
- } \
- } G_STMT_END
-
/* strlen() generally gets hoisted out automatically */
#define IDE_LITERAL_LENGTH(s) (strlen(s))
diff --git a/src/libide/sourceview/ide-word-completion-provider.c
b/src/libide/sourceview/ide-word-completion-provider.c
index d0255bc..f539ebe 100644
--- a/src/libide/sourceview/ide-word-completion-provider.c
+++ b/src/libide/sourceview/ide-word-completion-provider.c
@@ -18,6 +18,7 @@
#define G_LOG_DOMAIN "ide-word-completion-provider"
+#include <dazzle.h>
#include <glib/gi18n.h>
#include <string.h>
@@ -314,7 +315,7 @@ completion_cleanup (IdeWordCompletionProvider *self)
if (priv->context != NULL)
{
- ide_clear_signal_handler (priv->context, &priv->cancel_id);
+ dzl_clear_signal_handler (priv->context, &priv->cancel_id);
g_clear_object (&priv->context);
}
diff --git a/src/libide/workbench/ide-omni-bar.c b/src/libide/workbench/ide-omni-bar.c
index 96280c7..8b10d5b 100644
--- a/src/libide/workbench/ide-omni-bar.c
+++ b/src/libide/workbench/ide-omni-bar.c
@@ -456,7 +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);
- ide_clear_signal_handler (build_pipeline, &self->message_handler);
+ dzl_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");
@@ -474,7 +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);
- ide_clear_signal_handler (build_pipeline, &self->message_handler);
+ dzl_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");
diff --git a/src/plugins/documentation-card/gbp-documentation-card-view-addin.c
b/src/plugins/documentation-card/gbp-documentation-card-view-addin.c
index 7ee45fe..e02fd65 100644
--- a/src/plugins/documentation-card/gbp-documentation-card-view-addin.c
+++ b/src/plugins/documentation-card/gbp-documentation-card-view-addin.c
@@ -296,7 +296,7 @@ gbp_documentation_card_view_addin_unload (IdeEditorViewAddin *addin,
source_view = ide_editor_view_get_view (view);
dzl_clear_source (&self->timeout_id);
- ide_clear_signal_handler (self->editor_view, &self->motion_handler_id);
+ dzl_clear_signal_handler (self->editor_view, &self->motion_handler_id);
g_free (self->previous_text);
gtk_widget_destroy (GTK_WIDGET (self->popover));
diff --git a/src/plugins/flatpak/gbp-flatpak-preferences-addin.c
b/src/plugins/flatpak/gbp-flatpak-preferences-addin.c
index dc8456c..13d6531 100644
--- a/src/plugins/flatpak/gbp-flatpak-preferences-addin.c
+++ b/src/plugins/flatpak/gbp-flatpak-preferences-addin.c
@@ -424,7 +424,7 @@ gbp_flatpak_preferences_addin_unload (IdePreferencesAddin *addin,
self->preferences = NULL;
app_addin = gbp_flatpak_application_addin_get_default ();
- ide_clear_signal_handler (app_addin, &self->reload_handler);
+ dzl_clear_signal_handler (app_addin, &self->reload_handler);
g_cancellable_cancel (self->cancellable);
g_clear_object (&self->cancellable);
diff --git a/src/plugins/gnome-code-assistance/ide-gca-service.c
b/src/plugins/gnome-code-assistance/ide-gca-service.c
index 89d3fd0..fbc708a 100644
--- a/src/plugins/gnome-code-assistance/ide-gca-service.c
+++ b/src/plugins/gnome-code-assistance/ide-gca-service.c
@@ -18,6 +18,7 @@
#define G_LOG_DOMAIN "ide-gca-service"
+#include <dazzle.h>
#include <glib/gi18n.h>
#include "ide-gca-service.h"
@@ -48,7 +49,7 @@ on_bus_closed (GDBusConnection *bus,
g_assert (IDE_IS_GCA_SERVICE (self));
if (self->bus_closed_handler != 0)
- ide_clear_signal_handler (bus, &self->bus_closed_handler);
+ dzl_clear_signal_handler (bus, &self->bus_closed_handler);
g_clear_object (&self->bus);
g_hash_table_remove_all (self->proxy_cache);
@@ -237,7 +238,7 @@ ide_gca_service_finalize (GObject *object)
if (self->bus != NULL)
{
- ide_clear_signal_handler (self->bus, &self->bus_closed_handler);
+ dzl_clear_signal_handler (self->bus, &self->bus_closed_handler);
g_clear_object (&self->bus);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]