[gnome-builder/wip/gtk4-port: 604/1774] plugins/meson: get plugin compiling
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 604/1774] plugins/meson: get plugin compiling
- Date: Mon, 11 Jul 2022 22:31:17 +0000 (UTC)
commit 1c94a99b933be6001e75c18aa1324ec9d2454822
Author: Christian Hergert <chergert redhat com>
Date: Mon Apr 18 14:25:40 2022 -0700
plugins/meson: get plugin compiling
This disables all the configuration and preferences addins until we have
time to figure out how to integrate those into the new preferences and
project settings windows.
src/plugins/meson.build | 2 +-
src/plugins/meson/gbp-meson-test-provider.c | 32 +++++++++++++++--------------
src/plugins/meson/meson-plugin.c | 19 ++++++++++++-----
src/plugins/meson/meson.build | 9 ++++----
4 files changed, 37 insertions(+), 25 deletions(-)
---
diff --git a/src/plugins/meson.build b/src/plugins/meson.build
index 6f41faaae..320133a57 100644
--- a/src/plugins/meson.build
+++ b/src/plugins/meson.build
@@ -94,7 +94,7 @@ subdir('jhbuild')
#subdir('ls')
subdir('make')
subdir('maven')
-#subdir('meson')
+subdir('meson')
subdir('meson-templates')
subdir('messages')
subdir('modelines')
diff --git a/src/plugins/meson/gbp-meson-test-provider.c b/src/plugins/meson/gbp-meson-test-provider.c
index 1c235e217..2119167a4 100644
--- a/src/plugins/meson/gbp-meson-test-provider.c
+++ b/src/plugins/meson/gbp-meson-test-provider.c
@@ -20,8 +20,10 @@
#define G_LOG_DOMAIN "gbp-meson-test-provider"
-#include <dazzle.h>
+#include "config.h"
+
#include <json-glib/json-glib.h>
+
#include <libide-threading.h>
#include "gbp-meson-build-system.h"
@@ -31,7 +33,7 @@
struct _GbpMesonTestProvider
{
IdeTestProvider parent_instance;
- DzlSignalGroup *monitor_signals;
+ IdeSignalGroup *monitor_signals;
GFileMonitor *build_ninja_monitor;
guint reload_source;
guint did_initial_load : 1;
@@ -270,7 +272,7 @@ gbp_meson_test_provider_reload (gpointer user_data)
g_assert (GBP_IS_MESON_TEST_PROVIDER (self));
- dzl_clear_source (&self->reload_source);
+ g_clear_handle_id (&self->reload_source, g_source_remove);
/*
* Check that we're working with a meson build system.
@@ -302,12 +304,12 @@ gbp_meson_test_provider_queue_reload (IdeTestProvider *provider)
g_assert (GBP_IS_MESON_TEST_PROVIDER (self));
- dzl_clear_source (&self->reload_source);
- self->reload_source = gdk_threads_add_timeout_full (G_PRIORITY_LOW,
- 2000,
- gbp_meson_test_provider_reload,
- self,
- NULL);
+ if (self->reload_source == 0)
+ self->reload_source = g_timeout_add_full (G_PRIORITY_LOW,
+ 2000,
+ gbp_meson_test_provider_reload,
+ self,
+ NULL);
}
static void
@@ -341,7 +343,7 @@ gbp_meson_test_provider_notify_pipeline (GbpMesonTestProvider *self,
{
g_file_monitor_cancel (self->build_ninja_monitor);
g_clear_object (&self->build_ninja_monitor);
- dzl_signal_group_set_target (self->monitor_signals, NULL);
+ ide_signal_group_set_target (self->monitor_signals, NULL);
}
g_assert (self->build_ninja_monitor == NULL);
@@ -354,7 +356,7 @@ gbp_meson_test_provider_notify_pipeline (GbpMesonTestProvider *self,
build_ninja = ide_pipeline_build_builddir_path (pipeline, "build.ninja", NULL);
file = g_file_new_for_path (build_ninja);
self->build_ninja_monitor = g_file_monitor (file, 0, NULL, NULL);
- dzl_signal_group_set_target (self->monitor_signals, self->build_ninja_monitor);
+ ide_signal_group_set_target (self->monitor_signals, self->build_ninja_monitor);
self->did_initial_load = FALSE;
@@ -603,8 +605,8 @@ gbp_meson_test_provider_dispose (GObject *object)
{
GbpMesonTestProvider *self = (GbpMesonTestProvider *)object;
- dzl_clear_source (&self->reload_source);
- dzl_signal_group_set_target (self->monitor_signals, NULL);
+ g_clear_handle_id (&self->reload_source, g_source_remove);
+ ide_signal_group_set_target (self->monitor_signals, NULL);
if (self->build_ninja_monitor)
{
@@ -645,9 +647,9 @@ gbp_meson_test_provider_class_init (GbpMesonTestProviderClass *klass)
static void
gbp_meson_test_provider_init (GbpMesonTestProvider *self)
{
- self->monitor_signals = dzl_signal_group_new (G_TYPE_FILE_MONITOR);
+ self->monitor_signals = ide_signal_group_new (G_TYPE_FILE_MONITOR);
- dzl_signal_group_connect_object (self->monitor_signals,
+ ide_signal_group_connect_object (self->monitor_signals,
"changed",
G_CALLBACK (build_ninja_changed_cb),
self,
diff --git a/src/plugins/meson/meson-plugin.c b/src/plugins/meson/meson-plugin.c
index 9724ec5e3..5504d70f3 100644
--- a/src/plugins/meson/meson-plugin.c
+++ b/src/plugins/meson/meson-plugin.c
@@ -18,7 +18,12 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/
+#define G_LOG_DOMAIN "meson-plugin"
+
+#include "config.h"
+
#include <libpeas/peas.h>
+
#include <libide-foundry.h>
#include <libide-gui.h>
@@ -29,7 +34,10 @@
#include "gbp-meson-pipeline-addin.h"
#include "gbp-meson-test-provider.h"
#include "gbp-meson-toolchain-provider.h"
+
+#if 0
#include "gbp-meson-toolchain-edition-preferences-addin.h"
+#endif
_IDE_EXTERN void
_gbp_meson_register_types (PeasObjectModule *module)
@@ -37,11 +45,6 @@ _gbp_meson_register_types (PeasObjectModule *module)
/* For in-tree builds of meson projects */
ide_g_file_add_ignored_pattern ("_build");
-#if 0
- peas_object_module_register_extension_type (module,
- IDE_TYPE_CONFIG_VIEW_ADDIN,
- GBP_TYPE_MESON_CONFIG_VIEW_ADDIN);
-#endif
peas_object_module_register_extension_type (module,
IDE_TYPE_PIPELINE_ADDIN,
GBP_TYPE_MESON_PIPELINE_ADDIN);
@@ -60,7 +63,13 @@ _gbp_meson_register_types (PeasObjectModule *module)
peas_object_module_register_extension_type (module,
IDE_TYPE_TOOLCHAIN_PROVIDER,
GBP_TYPE_MESON_TOOLCHAIN_PROVIDER);
+
+#if 0
peas_object_module_register_extension_type (module,
IDE_TYPE_PREFERENCES_ADDIN,
GBP_TYPE_MESON_TOOLCHAIN_EDITION_PREFERENCES_ADDIN);
+ peas_object_module_register_extension_type (module,
+ IDE_TYPE_CONFIG_VIEW_ADDIN,
+ GBP_TYPE_MESON_CONFIG_VIEW_ADDIN);
+#endif
}
diff --git a/src/plugins/meson/meson.build b/src/plugins/meson/meson.build
index 38923ed21..0e583e43c 100644
--- a/src/plugins/meson/meson.build
+++ b/src/plugins/meson/meson.build
@@ -6,17 +6,18 @@ plugins_sources += files([
'gbp-meson-build-system.c',
'gbp-meson-build-target-provider.c',
'gbp-meson-build-target.c',
- 'gbp-meson-config-view-addin.c',
'gbp-meson-pipeline-addin.c',
'gbp-meson-test-provider.c',
'gbp-meson-test.c',
- 'gbp-meson-tool-row.c',
- 'gbp-meson-toolchain-edition-preferences-addin.c',
- 'gbp-meson-toolchain-edition-preferences-row.c',
'gbp-meson-toolchain-provider.c',
'gbp-meson-toolchain.c',
'gbp-meson-utils.c',
'meson-plugin.c',
+
+ # 'gbp-meson-config-view-addin.c',
+ # 'gbp-meson-toolchain-edition-preferences-addin.c',
+ # 'gbp-meson-toolchain-edition-preferences-row.c',
+ # 'gbp-meson-tool-row.c',
])
plugin_meson_resources = gnome.compile_resources(
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]