[gnome-builder/wip/gtk4-port: 68/343] libide/lsp: remove some usage of dazzle
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 68/343] libide/lsp: remove some usage of dazzle
- Date: Mon, 4 Apr 2022 20:02:10 +0000 (UTC)
commit 3d883710a92e38cd95441ba9b28947108c657351
Author: Christian Hergert <chergert redhat com>
Date: Sat Mar 26 23:07:04 2022 -0700
libide/lsp: remove some usage of dazzle
src/libide/lsp/ide-lsp-client.c | 36 +++++++++++++---------------
src/libide/lsp/ide-lsp-diagnostic-provider.c | 10 ++++----
2 files changed, 22 insertions(+), 24 deletions(-)
---
diff --git a/src/libide/lsp/ide-lsp-client.c b/src/libide/lsp/ide-lsp-client.c
index 6c218f1fe..68677e988 100644
--- a/src/libide/lsp/ide-lsp-client.c
+++ b/src/libide/lsp/ide-lsp-client.c
@@ -22,15 +22,13 @@
#include "config.h"
-#include <dazzle.h>
-#include <dazzle.h>
#include <glib/gi18n.h>
#include <jsonrpc-glib.h>
+#include <unistd.h>
+
#include <libide-code.h>
#include <libide-projects.h>
-#include <libide-sourceview.h>
#include <libide-threading.h>
-#include <unistd.h>
#include "ide-lsp-client.h"
#include "ide-lsp-diagnostic.h"
@@ -54,8 +52,8 @@ typedef struct
typedef struct
{
- DzlSignalGroup *buffer_manager_signals;
- DzlSignalGroup *project_signals;
+ IdeSignalGroup *buffer_manager_signals;
+ IdeSignalGroup *project_signals;
JsonrpcClient *rpc_client;
GIOStream *io_stream;
GHashTable *diagnostics_by_file;
@@ -560,14 +558,14 @@ ide_lsp_client_buffer_unloaded (IdeLspClient *self,
static void
ide_lsp_client_buffer_manager_bind (IdeLspClient *self,
IdeBufferManager *buffer_manager,
- DzlSignalGroup *signal_group)
+ IdeSignalGroup *signal_group)
{
guint n_items;
g_assert (IDE_IS_MAIN_THREAD ());
g_assert (IDE_IS_LSP_CLIENT (self));
g_assert (IDE_IS_BUFFER_MANAGER (buffer_manager));
- g_assert (DZL_IS_SIGNAL_GROUP (signal_group));
+ g_assert (IDE_IS_SIGNAL_GROUP (signal_group));
n_items = g_list_model_get_n_items (G_LIST_MODEL (buffer_manager));
@@ -582,10 +580,10 @@ ide_lsp_client_buffer_manager_bind (IdeLspClient *self,
static void
ide_lsp_client_buffer_manager_unbind (IdeLspClient *self,
- DzlSignalGroup *signal_group)
+ IdeSignalGroup *signal_group)
{
g_assert (IDE_IS_LSP_CLIENT (self));
- g_assert (DZL_IS_SIGNAL_GROUP (signal_group));
+ g_assert (IDE_IS_SIGNAL_GROUP (signal_group));
/* TODO: We need to track everything we've notified so that we
* can notify the peer to release its resources.
@@ -1347,19 +1345,19 @@ ide_lsp_client_init (IdeLspClient *self)
g_object_unref,
(GDestroyNotify)g_object_unref);
- priv->buffer_manager_signals = dzl_signal_group_new (IDE_TYPE_BUFFER_MANAGER);
+ priv->buffer_manager_signals = ide_signal_group_new (IDE_TYPE_BUFFER_MANAGER);
- dzl_signal_group_connect_object (priv->buffer_manager_signals,
+ ide_signal_group_connect_object (priv->buffer_manager_signals,
"buffer-loaded",
G_CALLBACK (ide_lsp_client_buffer_loaded),
self,
G_CONNECT_SWAPPED);
- dzl_signal_group_connect_object (priv->buffer_manager_signals,
+ ide_signal_group_connect_object (priv->buffer_manager_signals,
"buffer-saved",
G_CALLBACK (ide_lsp_client_buffer_saved),
self,
G_CONNECT_SWAPPED);
- dzl_signal_group_connect_object (priv->buffer_manager_signals,
+ ide_signal_group_connect_object (priv->buffer_manager_signals,
"buffer-unloaded",
G_CALLBACK (ide_lsp_client_buffer_unloaded),
self,
@@ -1376,14 +1374,14 @@ ide_lsp_client_init (IdeLspClient *self)
self,
G_CONNECT_SWAPPED);
- priv->project_signals = dzl_signal_group_new (IDE_TYPE_PROJECT);
+ priv->project_signals = ide_signal_group_new (IDE_TYPE_PROJECT);
- dzl_signal_group_connect_object (priv->project_signals,
+ ide_signal_group_connect_object (priv->project_signals,
"file-trashed",
G_CALLBACK (ide_lsp_client_project_file_trashed),
self,
G_CONNECT_SWAPPED);
- dzl_signal_group_connect_object (priv->project_signals,
+ ide_signal_group_connect_object (priv->project_signals,
"file-renamed",
G_CALLBACK (ide_lsp_client_project_file_renamed),
self,
@@ -1442,10 +1440,10 @@ ide_lsp_client_initialized_cb (GObject *object,
context = ide_object_get_context (IDE_OBJECT (self));
buffer_manager = ide_buffer_manager_from_context (context);
- dzl_signal_group_set_target (priv->buffer_manager_signals, buffer_manager);
+ ide_signal_group_set_target (priv->buffer_manager_signals, buffer_manager);
project = ide_project_from_context (context);
- dzl_signal_group_set_target (priv->project_signals, project);
+ ide_signal_group_set_target (priv->project_signals, project);
priv->initialized = TRUE;
diff --git a/src/libide/lsp/ide-lsp-diagnostic-provider.c b/src/libide/lsp/ide-lsp-diagnostic-provider.c
index 190d53553..245d6f542 100644
--- a/src/libide/lsp/ide-lsp-diagnostic-provider.c
+++ b/src/libide/lsp/ide-lsp-diagnostic-provider.c
@@ -22,8 +22,8 @@
#include "config.h"
-#include <dazzle.h>
#include <json-glib/json-glib.h>
+
#include <libide-code.h>
#include <libide-threading.h>
@@ -32,7 +32,7 @@
typedef struct
{
IdeLspClient *client;
- DzlSignalGroup *client_signals;
+ IdeSignalGroup *client_signals;
} IdeLspDiagnosticProviderPrivate;
static void diagnostic_provider_iface_init (IdeDiagnosticProviderInterface *iface);
@@ -209,9 +209,9 @@ ide_lsp_diagnostic_provider_init (IdeLspDiagnosticProvider *self)
{
IdeLspDiagnosticProviderPrivate *priv = ide_lsp_diagnostic_provider_get_instance_private (self);
- priv->client_signals = dzl_signal_group_new (IDE_TYPE_LSP_CLIENT);
+ priv->client_signals = ide_signal_group_new (IDE_TYPE_LSP_CLIENT);
- dzl_signal_group_connect_object (priv->client_signals,
+ ide_signal_group_connect_object (priv->client_signals,
"published-diagnostics",
G_CALLBACK (ide_diagnostic_provider_emit_invalidated),
self,
@@ -246,7 +246,7 @@ ide_lsp_diagnostic_provider_set_client (IdeLspDiagnosticProvider *self,
if (g_set_object (&priv->client, client))
{
- dzl_signal_group_set_target (priv->client_signals, client);
+ ide_signal_group_set_target (priv->client_signals, client);
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_CLIENT]);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]