[gnome-builder] libide: relax context property requirements



commit 1e97f09ca3ce131b14c86450fefbe3519cdf5c9d
Author: Christian Hergert <chergert redhat com>
Date:   Fri Mar 10 13:51:42 2017 -0800

    libide: relax context property requirements
    
    We don't need to require IdeObject for a bunch of things, we can just rely
    on GObject + the context property.
    
    This will let us work around some language breaking checks in Vala.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=779891

 libide/buildsystem/ide-build-pipeline-addin.c |    2 +-
 libide/buildsystem/ide-build-pipeline-addin.h |    1 -
 libide/diagnostics/ide-diagnostic-provider.c  |    2 +-
 libide/diagnostics/ide-diagnostic-provider.h  |    2 +-
 libide/symbols/ide-symbol-resolver.c          |    2 +-
 libide/symbols/ide-symbol-resolver.h          |    8 +++++---
 6 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/libide/buildsystem/ide-build-pipeline-addin.c b/libide/buildsystem/ide-build-pipeline-addin.c
index df9ca67..c8b176d 100644
--- a/libide/buildsystem/ide-build-pipeline-addin.c
+++ b/libide/buildsystem/ide-build-pipeline-addin.c
@@ -32,7 +32,7 @@ ide_build_pipeline_addin_default_init (IdeBuildPipelineAddinInterface *iface)
                                                             NULL,
                                                             NULL,
                                                             IDE_TYPE_CONTEXT,
-                                                            (G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | 
G_PARAM_STATIC_STRINGS)));
+                                                            (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 0eb5535..a7c0c7c 100644
--- a/libide/buildsystem/ide-build-pipeline-addin.h
+++ b/libide/buildsystem/ide-build-pipeline-addin.h
@@ -39,7 +39,6 @@ struct _IdeBuildPipelineAddinInterface
                   IdeBuildPipeline      *pipeline);
 
   /* Pacify vala, these are unnecessary */
-  IdeContext *(*get_context) (IdeBuildPipelineAddin *self);
   void        (*set_context) (IdeBuildPipelineAddin *self,
                               IdeContext            *context);
 };
diff --git a/libide/diagnostics/ide-diagnostic-provider.c b/libide/diagnostics/ide-diagnostic-provider.c
index cf4dd7d..52cf62d 100644
--- a/libide/diagnostics/ide-diagnostic-provider.c
+++ b/libide/diagnostics/ide-diagnostic-provider.c
@@ -26,7 +26,7 @@
 #include "diagnostics/ide-diagnostics.h"
 #include "files/ide-file.h"
 
-G_DEFINE_INTERFACE (IdeDiagnosticProvider, ide_diagnostic_provider, IDE_TYPE_OBJECT)
+G_DEFINE_INTERFACE (IdeDiagnosticProvider, ide_diagnostic_provider, G_TYPE_OBJECT)
 
 enum {
   INVALIDATED,
diff --git a/libide/diagnostics/ide-diagnostic-provider.h b/libide/diagnostics/ide-diagnostic-provider.h
index 919c765..5e746ad 100644
--- a/libide/diagnostics/ide-diagnostic-provider.h
+++ b/libide/diagnostics/ide-diagnostic-provider.h
@@ -25,7 +25,7 @@ G_BEGIN_DECLS
 
 #define IDE_TYPE_DIAGNOSTIC_PROVIDER (ide_diagnostic_provider_get_type())
 
-G_DECLARE_INTERFACE (IdeDiagnosticProvider, ide_diagnostic_provider, IDE, DIAGNOSTIC_PROVIDER, IdeObject)
+G_DECLARE_INTERFACE (IdeDiagnosticProvider, ide_diagnostic_provider, IDE, DIAGNOSTIC_PROVIDER, GObject)
 
 struct _IdeDiagnosticProviderInterface
 {
diff --git a/libide/symbols/ide-symbol-resolver.c b/libide/symbols/ide-symbol-resolver.c
index 0da4a20..ddf5f0b 100644
--- a/libide/symbols/ide-symbol-resolver.c
+++ b/libide/symbols/ide-symbol-resolver.c
@@ -24,7 +24,7 @@
 #include "files/ide-file.h"
 #include "symbols/ide-symbol-resolver.h"
 
-G_DEFINE_INTERFACE (IdeSymbolResolver, ide_symbol_resolver, IDE_TYPE_OBJECT)
+G_DEFINE_INTERFACE (IdeSymbolResolver, ide_symbol_resolver, G_TYPE_OBJECT)
 
 static void
 ide_symbol_resolver_real_get_symbol_tree_async (IdeSymbolResolver   *self,
diff --git a/libide/symbols/ide-symbol-resolver.h b/libide/symbols/ide-symbol-resolver.h
index f7bd84f..8a5ac36 100644
--- a/libide/symbols/ide-symbol-resolver.h
+++ b/libide/symbols/ide-symbol-resolver.h
@@ -26,14 +26,12 @@ G_BEGIN_DECLS
 
 #define IDE_TYPE_SYMBOL_RESOLVER (ide_symbol_resolver_get_type())
 
-G_DECLARE_INTERFACE (IdeSymbolResolver, ide_symbol_resolver, IDE, SYMBOL_RESOLVER, IdeObject)
+G_DECLARE_INTERFACE (IdeSymbolResolver, ide_symbol_resolver, IDE, SYMBOL_RESOLVER, GObject)
 
 struct _IdeSymbolResolverInterface
 {
   GTypeInterface parent_interface;
 
-  void           (*set_context)            (IdeSymbolResolver    *self,
-                                            IdeContext           *context);
   void           (*lookup_symbol_async)    (IdeSymbolResolver    *self,
                                             IdeSourceLocation    *location,
                                             GCancellable         *cancellable,
@@ -52,6 +50,10 @@ struct _IdeSymbolResolverInterface
                                             GAsyncResult         *result,
                                             GError              **error);
   void           (*load)                   (IdeSymbolResolver    *self);
+
+  /* Pacify vala, ideally we wouldn't have this vfunc */
+  void           (*set_context)            (IdeSymbolResolver    *self,
+                                            IdeContext           *context);
 };
 
 void           ide_symbol_resolver_load                   (IdeSymbolResolver    *self);


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