[gnome-builder/wip/gtk4-port] plugins/meson: invalidate when reaching configure



commit 208b0afddb683b432fdb7de2e2c46967ab685b61
Author: Christian Hergert <chergert redhat com>
Date:   Thu Jun 30 15:15:42 2022 -0700

    plugins/meson: invalidate when reaching configure
    
    So that we can reload the commands as necessary.

 src/plugins/meson/gbp-meson-run-command-provider.c | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)
---
diff --git a/src/plugins/meson/gbp-meson-run-command-provider.c 
b/src/plugins/meson/gbp-meson-run-command-provider.c
index fdec98b58..2a305a567 100644
--- a/src/plugins/meson/gbp-meson-run-command-provider.c
+++ b/src/plugins/meson/gbp-meson-run-command-provider.c
@@ -133,9 +133,33 @@ run_command_provider_iface (IdeRunCommandProviderInterface *iface)
 G_DEFINE_FINAL_TYPE_WITH_CODE (GbpMesonRunCommandProvider, gbp_meson_run_command_provider, IDE_TYPE_OBJECT,
                                G_IMPLEMENT_INTERFACE (IDE_TYPE_RUN_COMMAND_PROVIDER, 
run_command_provider_iface))
 
+static void
+gbp_meson_run_command_provider_parent_set (IdeObject *object,
+                                           IdeObject *parent)
+{
+  GbpMesonRunCommandProvider *self = (GbpMesonRunCommandProvider *)object;
+
+  IDE_ENTRY;
+
+  g_assert (IDE_IS_MAIN_THREAD ());
+  g_assert (GBP_IS_MESON_RUN_COMMAND_PROVIDER (self));
+  g_assert (!parent || IDE_IS_OBJECT (parent));
+
+  if (parent == NULL)
+    IDE_EXIT;
+
+  ide_run_command_provider_invalidates_at_phase (IDE_RUN_COMMAND_PROVIDER (self),
+                                                 IDE_PIPELINE_PHASE_CONFIGURE);
+
+  IDE_EXIT;
+}
+
 static void
 gbp_meson_run_command_provider_class_init (GbpMesonRunCommandProviderClass *klass)
 {
+  IdeObjectClass *ide_object_class = IDE_OBJECT_CLASS (klass);
+
+  ide_object_class->parent_set = gbp_meson_run_command_provider_parent_set;
 }
 
 static void


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