Commit 1e97f09c authored by Christian Hergert's avatar Christian Hergert
Browse files

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
parent fbfc7a26
......@@ -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
......
......@@ -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);
};
......
......@@ -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,
......
......@@ -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
{
......
......@@ -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,
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment