Commit 48f0e18f authored by Christian Hergert's avatar Christian Hergert
Browse files

plugins: use ide_extension_new and ide_extension_set_new

Instead of using peas for creating the extension sets, use our wrapper so
that we can handle the case where the property comes from the
pre-requisite class instead of the interface.

https://bugzilla.gnome.org/show_bug.cgi?id=779891
parent 08310b69
......@@ -162,16 +162,16 @@ ide_extension_adapter_reload (IdeExtensionAdapter *self)
IdeContext *context = ide_object_get_context (IDE_OBJECT (self));
if (g_type_is_a (self->interface_type, IDE_TYPE_OBJECT))
extension = peas_engine_create_extension (self->engine,
best_match,
self->interface_type,
"context", context,
NULL);
extension = ide_extension_new (self->engine,
best_match,
self->interface_type,
"context", context,
NULL);
else
extension = peas_engine_create_extension (self->engine,
best_match,
self->interface_type,
NULL);
extension = ide_extension_new (self->engine,
best_match,
self->interface_type,
NULL);
}
ide_extension_adapter_set_extension (self, best_match, extension);
......
......@@ -176,11 +176,18 @@ ide_extension_set_adapter_reload (IdeExtensionSetAdapter *self)
{
PeasExtension *exten;
exten = peas_engine_create_extension (self->engine,
plugin_info,
self->interface_type,
"context", context,
NULL);
if (g_type_is_a (self->interface_type, IDE_TYPE_OBJECT))
exten = ide_extension_new (self->engine,
plugin_info,
self->interface_type,
"context", context,
NULL);
else
exten = ide_extension_new (self->engine,
plugin_info,
self->interface_type,
NULL);
add_extension (self, plugin_info, exten);
}
}
......
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