[gnome-builder] pipeline-addin: drop :context property



commit 6f80f47380ee593ccb840efcfbb4db6828d34444
Author: Christian Hergert <chergert redhat com>
Date:   Sat Mar 11 01:57:17 2017 -0800

    pipeline-addin: drop :context property
    
    We get this from IdeObject, so we don't need to enforce the property
    directly.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=779891

 libide/buildsystem/ide-build-pipeline-addin.c  |    8 +-------
 libide/buildsystem/ide-build-pipeline-addin.h  |    6 +-----
 libide/buildsystem/ide-build-pipeline.c        |    9 +++++----
 plugins/vala-pack/ide-vala-pipeline-addin.vala |    9 +--------
 4 files changed, 8 insertions(+), 24 deletions(-)
---
diff --git a/libide/buildsystem/ide-build-pipeline-addin.c b/libide/buildsystem/ide-build-pipeline-addin.c
index c8b176d..bf03118 100644
--- a/libide/buildsystem/ide-build-pipeline-addin.c
+++ b/libide/buildsystem/ide-build-pipeline-addin.c
@@ -22,17 +22,11 @@
 
 #include "buildsystem/ide-build-pipeline-addin.h"
 
-G_DEFINE_INTERFACE (IdeBuildPipelineAddin, ide_build_pipeline_addin, G_TYPE_OBJECT)
+G_DEFINE_INTERFACE (IdeBuildPipelineAddin, ide_build_pipeline_addin, IDE_TYPE_OBJECT)
 
 static void
 ide_build_pipeline_addin_default_init (IdeBuildPipelineAddinInterface *iface)
 {
-  g_object_interface_install_property (iface,
-                                       g_param_spec_object ("context",
-                                                            NULL,
-                                                            NULL,
-                                                            IDE_TYPE_CONTEXT,
-                                                            (G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | 
G_PARAM_STATIC_STRINGS)));
 }
 
 void
diff --git a/libide/buildsystem/ide-build-pipeline-addin.h b/libide/buildsystem/ide-build-pipeline-addin.h
index a7c0c7c..91a47e4 100644
--- a/libide/buildsystem/ide-build-pipeline-addin.h
+++ b/libide/buildsystem/ide-build-pipeline-addin.h
@@ -27,7 +27,7 @@ G_BEGIN_DECLS
 
 #define IDE_TYPE_BUILD_PIPELINE_ADDIN (ide_build_pipeline_addin_get_type())
 
-G_DECLARE_INTERFACE (IdeBuildPipelineAddin, ide_build_pipeline_addin, IDE, BUILD_PIPELINE_ADDIN, GObject)
+G_DECLARE_INTERFACE (IdeBuildPipelineAddin, ide_build_pipeline_addin, IDE, BUILD_PIPELINE_ADDIN, IdeObject)
 
 struct _IdeBuildPipelineAddinInterface
 {
@@ -37,10 +37,6 @@ struct _IdeBuildPipelineAddinInterface
                   IdeBuildPipeline      *pipeline);
   void (*unload) (IdeBuildPipelineAddin *self,
                   IdeBuildPipeline      *pipeline);
-
-  /* Pacify vala, these are unnecessary */
-  void        (*set_context) (IdeBuildPipelineAddin *self,
-                              IdeContext            *context);
 };
 
 void ide_build_pipeline_addin_load   (IdeBuildPipelineAddin *self,
diff --git a/libide/buildsystem/ide-build-pipeline.c b/libide/buildsystem/ide-build-pipeline.c
index d309a37..9219feb 100644
--- a/libide/buildsystem/ide-build-pipeline.c
+++ b/libide/buildsystem/ide-build-pipeline.c
@@ -41,6 +41,7 @@
 #include "diagnostics/ide-diagnostic.h"
 #include "diagnostics/ide-source-location.h"
 #include "diagnostics/ide-source-range.h"
+#include "plugins/ide-extension-util.h"
 #include "projects/ide-project.h"
 #include "runtimes/ide-runtime.h"
 #include "util/ide-directory-reaper.h"
@@ -726,10 +727,10 @@ ide_build_pipeline_load (IdeBuildPipeline *self)
 
   context = ide_object_get_context (IDE_OBJECT (self));
 
-  self->addins = peas_extension_set_new (peas_engine_get_default (),
-                                         IDE_TYPE_BUILD_PIPELINE_ADDIN,
-                                         "context", context,
-                                         NULL);
+  self->addins = ide_extension_set_new (peas_engine_get_default (),
+                                        IDE_TYPE_BUILD_PIPELINE_ADDIN,
+                                        "context", context,
+                                        NULL);
 
   g_signal_connect (self->addins,
                     "extension-added",
diff --git a/plugins/vala-pack/ide-vala-pipeline-addin.vala b/plugins/vala-pack/ide-vala-pipeline-addin.vala
index 03daab7..3626ca6 100644
--- a/plugins/vala-pack/ide-vala-pipeline-addin.vala
+++ b/plugins/vala-pack/ide-vala-pipeline-addin.vala
@@ -23,7 +23,7 @@ using Vala;
 
 namespace Ide
 {
-       public class ValaPipelineAddin: GLib.Object, Ide.BuildPipelineAddin
+       public class ValaPipelineAddin: Ide.Object, Ide.BuildPipelineAddin
        {
                // main.vala:24.30-24.30: error: initializer list used for `Gtk.WindowType', which is neither 
array nor struct
                const string ERROR_FORMAT_REGEX =
@@ -44,12 +44,5 @@ namespace Ide
                {
                        pipeline.remove_error_format (this.error_format);
                }
-
-               // This code shouldn't have to exist.
-               // If we can fixup libide+vala to not have such weird interaction that
-               // would be great.
-               Ide.Context? _context;
-               public Ide.Context context { construct { _context = value; } }
-               public void set_context (Ide.Context context) { _context = context; }
        }
 }


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