Skip to content
Snippets Groups Projects
Commit 58310c73 authored by George Kiagiadakis's avatar George Kiagiadakis
Browse files

m-metadata: add callback for wp_object_activate()

A callback is required, NULL is not accepted by GCClosure
parent a7dcd3b7
No related branches found
No related tags found
No related merge requests found
......@@ -24,6 +24,16 @@ wp_metadata_plugin_init (WpMetadataPlugin * self)
{
}
static void
on_metadata_activated (GObject * obj, GAsyncResult * res, gpointer user_data)
{
g_autoptr (GError) error = NULL;
if (!wp_object_activate_finish (WP_OBJECT (obj), res, &error)) {
wp_warning_object (user_data, "failed to activate WpImplMetadata: %s",
error->message);
}
}
static void
wp_metadata_plugin_activate (WpPlugin * plugin)
{
......@@ -33,7 +43,7 @@ wp_metadata_plugin_activate (WpPlugin * plugin)
self->metadata = wp_impl_metadata_new (core);
wp_object_activate (WP_OBJECT (self->metadata),
WP_OBJECT_FEATURES_ALL, NULL, NULL, self);
WP_OBJECT_FEATURES_ALL, NULL, on_metadata_activated, self);
}
static void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment