Commit d990356b authored by Christian Hergert's avatar Christian Hergert

plugins: port remaining plugins to IdeTask

This converts the rest of plugin files that are not using DzlTaskCache to
IdeTask. Those modules will have to be converted on a per-function basis.
parent 660af6cc
......@@ -43,16 +43,16 @@ ide_autotools_autogen_stage_wait_check_cb (GObject *object,
gpointer user_data)
{
IdeSubprocess *subprocess = (IdeSubprocess *)object;
g_autoptr(GTask) task = user_data;
g_autoptr(IdeTask) task = user_data;
g_autoptr(GError) error = NULL;
g_assert (IDE_IS_SUBPROCESS (subprocess));
g_assert (G_IS_TASK (task));
g_assert (IDE_IS_TASK (task));
if (!ide_subprocess_wait_check_finish (subprocess, result, &error))
g_task_return_error (task, g_steal_pointer (&error));
ide_task_return_error (task, g_steal_pointer (&error));
else
g_task_return_boolean (task, TRUE);
ide_task_return_boolean (task, TRUE);
}
static void
......@@ -66,14 +66,14 @@ ide_autotools_autogen_stage_execute_async (IdeBuildStage *stage,
g_autofree gchar *autogen_path = NULL;
g_autoptr(IdeSubprocessLauncher) launcher = NULL;
g_autoptr(IdeSubprocess) subprocess = NULL;
g_autoptr(GTask) task = NULL;
g_autoptr(IdeTask) task = NULL;
g_autoptr(GError) error = NULL;
g_assert (IDE_IS_AUTOTOOLS_AUTOGEN_STAGE (self));
g_assert (!cancellable || G_IS_CANCELLABLE (cancellable));
task = g_task_new (self, cancellable, callback, user_data);
g_task_set_source_tag (task, ide_autotools_autogen_stage_execute_async);
task = ide_task_new (self, cancellable, callback, user_data);
ide_task_set_source_tag (task, ide_autotools_autogen_stage_execute_async);
autogen_path = g_build_filename (self->srcdir, "autogen.sh", NULL);
......@@ -81,7 +81,7 @@ ide_autotools_autogen_stage_execute_async (IdeBuildStage *stage,
if (launcher == NULL)
{
g_task_return_error (task, g_steal_pointer (&error));
ide_task_return_error (task, g_steal_pointer (&error));
return;
}
......@@ -102,7 +102,7 @@ ide_autotools_autogen_stage_execute_async (IdeBuildStage *stage,
if (subprocess == NULL)
{
g_task_return_error (task, g_steal_pointer (&error));
ide_task_return_error (task, g_steal_pointer (&error));
return;
}
......@@ -120,9 +120,9 @@ ide_autotools_autogen_stage_execute_finish (IdeBuildStage *stage,
GError **error)
{
g_assert (IDE_IS_AUTOTOOLS_AUTOGEN_STAGE (stage));
g_assert (G_IS_TASK (result));
g_assert (IDE_IS_TASK (result));
return g_task_propagate_boolean (G_TASK (result), error);
return ide_task_propagate_boolean (IDE_TASK (result), error);
}
static void
......
......@@ -48,7 +48,7 @@ ide_autotools_build_target_provider_get_targets_cb (GObject *object,
gpointer user_data)
{
IdeMakecache *makecache = (IdeMakecache *)object;
g_autoptr(GTask) task = user_data;
g_autoptr(IdeTask) task = user_data;
g_autoptr(GPtrArray) ret = NULL;
g_autoptr(GError) error = NULL;
......@@ -56,14 +56,14 @@ ide_autotools_build_target_provider_get_targets_cb (GObject *object,
g_assert (IDE_IS_MAKECACHE (makecache));
g_assert (G_IS_ASYNC_RESULT (result));
g_assert (G_IS_TASK (task));
g_assert (IDE_IS_TASK (task));
ret = ide_makecache_get_build_targets_finish (makecache, result, &error);
if (ret == NULL)
g_task_return_error (task, g_steal_pointer (&error));
ide_task_return_error (task, g_steal_pointer (&error));
else
g_task_return_pointer (task, g_steal_pointer (&ret), (GDestroyNotify)g_ptr_array_unref);
ide_task_return_pointer (task, g_steal_pointer (&ret), (GDestroyNotify)g_ptr_array_unref);
IDE_EXIT;
}
......@@ -75,7 +75,7 @@ ide_autotools_build_target_provider_get_targets_async (IdeBuildTargetProvider *p
gpointer user_data)
{
IdeAutotoolsBuildTargetProvider *self = (IdeAutotoolsBuildTargetProvider *)provider;
g_autoptr(GTask) task = NULL;
g_autoptr(IdeTask) task = NULL;
g_autoptr(GFile) builddir_file = NULL;
IdeBuildPipeline *pipeline;
IdeBuildManager *build_manager;
......@@ -89,19 +89,19 @@ ide_autotools_build_target_provider_get_targets_async (IdeBuildTargetProvider *p
g_assert (IDE_IS_AUTOTOOLS_BUILD_TARGET_PROVIDER (self));
g_assert (!cancellable || G_IS_CANCELLABLE (cancellable));
task = g_task_new (self, cancellable, callback, user_data);
g_task_set_source_tag (task, ide_autotools_build_target_provider_get_targets_async);
g_task_set_priority (task, G_PRIORITY_LOW);
task = ide_task_new (self, cancellable, callback, user_data);
ide_task_set_source_tag (task, ide_autotools_build_target_provider_get_targets_async);
ide_task_set_priority (task, G_PRIORITY_LOW);
context = ide_object_get_context (IDE_OBJECT (self));
build_system = ide_context_get_build_system (context);
if (!IDE_IS_AUTOTOOLS_BUILD_SYSTEM (build_system))
{
g_task_return_new_error (task,
G_IO_ERROR,
G_IO_ERROR_NOT_SUPPORTED,
"Not an autotools build system, ignoring");
ide_task_return_new_error (task,
G_IO_ERROR,
G_IO_ERROR_NOT_SUPPORTED,
"Not an autotools build system, ignoring");
IDE_EXIT;
}
......@@ -121,10 +121,10 @@ ide_autotools_build_target_provider_get_targets_async (IdeBuildTargetProvider *p
if (makecache == NULL)
{
g_task_return_new_error (task,
G_IO_ERROR,
G_IO_ERROR_NOT_SUPPORTED,
"Failed to locate makecache");
ide_task_return_new_error (task,
G_IO_ERROR,
G_IO_ERROR_NOT_SUPPORTED,
"Failed to locate makecache");
IDE_EXIT;
}
......@@ -147,10 +147,10 @@ ide_autotools_build_target_provider_get_targets_finish (IdeBuildTargetProvider
IDE_ENTRY;
g_assert (IDE_IS_AUTOTOOLS_BUILD_TARGET_PROVIDER (provider));
g_assert (G_IS_TASK (result));
g_assert (g_task_is_valid (G_TASK (result), provider));
g_assert (IDE_IS_TASK (result));
g_assert (ide_task_is_valid (IDE_TASK (result), provider));
ret = g_task_propagate_pointer (G_TASK (result), error);
ret = ide_task_propagate_pointer (IDE_TASK (result), error);
IDE_RETURN (ret);
}
......
......@@ -152,7 +152,7 @@ ide_autotools_make_stage_wait_cb (GObject *object,
gpointer user_data)
{
IdeSubprocess *subprocess = (IdeSubprocess *)object;
g_autoptr(GTask) task = user_data;
g_autoptr(IdeTask) task = user_data;
g_autoptr(GError) error = NULL;
IDE_ENTRY;
......@@ -161,9 +161,9 @@ ide_autotools_make_stage_wait_cb (GObject *object,
g_assert (G_IS_ASYNC_RESULT (result));
if (!ide_subprocess_wait_check_finish (subprocess, result, &error))
g_task_return_error (task, g_steal_pointer (&error));
ide_task_return_error (task, g_steal_pointer (&error));
else
g_task_return_boolean (task, TRUE);
ide_task_return_boolean (task, TRUE);
IDE_EXIT;
}
......@@ -178,7 +178,7 @@ ide_autotools_make_stage_execute_async (IdeBuildStage *stage,
IdeAutotoolsMakeStage *self = (IdeAutotoolsMakeStage *)stage;
g_autoptr(IdeSubprocessLauncher) launcher = NULL;
g_autoptr(IdeSubprocess) subprocess = NULL;
g_autoptr(GTask) task = NULL;
g_autoptr(IdeTask) task = NULL;
g_autoptr(GError) error = NULL;
g_autofree gchar *message = NULL;
const gchar * const *argv;
......@@ -190,8 +190,8 @@ ide_autotools_make_stage_execute_async (IdeBuildStage *stage,
g_assert (IDE_IS_BUILD_PIPELINE (pipeline));
g_assert (!cancellable || G_IS_CANCELLABLE (cancellable));
task = g_task_new (self, cancellable, callback, user_data);
g_task_set_source_tag (task, ide_autotools_make_stage_execute_async);
task = ide_task_new (self, cancellable, callback, user_data);
ide_task_set_source_tag (task, ide_autotools_make_stage_execute_async);
/* If we have a chained target, we just execute that instead */
if (self->chained_target)
......@@ -202,7 +202,7 @@ ide_autotools_make_stage_execute_async (IdeBuildStage *stage,
if (target == NULL)
{
g_warning ("Improperly configured IdeAutotoolsMakeStage, no target set");
g_task_return_boolean (task, TRUE);
ide_task_return_boolean (task, TRUE);
IDE_EXIT;
}
......@@ -210,7 +210,7 @@ ide_autotools_make_stage_execute_async (IdeBuildStage *stage,
if (launcher == NULL)
{
g_task_return_error (task, g_steal_pointer (&error));
ide_task_return_error (task, g_steal_pointer (&error));
IDE_EXIT;
}
......@@ -226,7 +226,7 @@ ide_autotools_make_stage_execute_async (IdeBuildStage *stage,
if (subprocess == NULL)
{
g_task_return_error (task, g_steal_pointer (&error));
ide_task_return_error (task, g_steal_pointer (&error));
IDE_EXIT;
}
......@@ -250,9 +250,9 @@ ide_autotools_make_stage_execute_finish (IdeBuildStage *stage,
IDE_ENTRY;
g_assert (IDE_IS_BUILD_STAGE (stage));
g_assert (G_IS_TASK (result));
g_assert (IDE_IS_TASK (result));
ret = g_task_propagate_boolean (G_TASK (result), error);
ret = ide_task_propagate_boolean (IDE_TASK (result), error);
IDE_RETURN (ret);
}
......@@ -267,7 +267,7 @@ ide_autotools_make_stage_clean_async (IdeBuildStage *stage,
IdeAutotoolsMakeStage *self = (IdeAutotoolsMakeStage *)stage;
g_autoptr(IdeSubprocessLauncher) launcher = NULL;
g_autoptr(IdeSubprocess) subprocess = NULL;
g_autoptr(GTask) task = NULL;
g_autoptr(IdeTask) task = NULL;
g_autoptr(GError) error = NULL;
g_autofree gchar *message = NULL;
const gchar * const *argv;
......@@ -278,12 +278,12 @@ ide_autotools_make_stage_clean_async (IdeBuildStage *stage,
g_assert (IDE_IS_BUILD_PIPELINE (pipeline));
g_assert (!cancellable || G_IS_CANCELLABLE (cancellable));
task = g_task_new (self, cancellable, callback, user_data);
g_task_set_source_tag (task, ide_autotools_make_stage_clean_async);
task = ide_task_new (self, cancellable, callback, user_data);
ide_task_set_source_tag (task, ide_autotools_make_stage_clean_async);
if (self->clean_target == NULL)
{
g_task_return_boolean (task, TRUE);
ide_task_return_boolean (task, TRUE);
IDE_EXIT;
}
......@@ -291,7 +291,7 @@ ide_autotools_make_stage_clean_async (IdeBuildStage *stage,
if (launcher == NULL)
{
g_task_return_error (task, g_steal_pointer (&error));
ide_task_return_error (task, g_steal_pointer (&error));
IDE_EXIT;
}
......@@ -304,7 +304,7 @@ ide_autotools_make_stage_clean_async (IdeBuildStage *stage,
if (subprocess == NULL)
{
g_task_return_error (task, g_steal_pointer (&error));
ide_task_return_error (task, g_steal_pointer (&error));
IDE_EXIT;
}
......@@ -328,9 +328,9 @@ ide_autotools_make_stage_clean_finish (IdeBuildStage *stage,
IDE_ENTRY;
g_assert (IDE_IS_BUILD_STAGE (stage));
g_assert (G_IS_TASK (result));
g_assert (IDE_IS_TASK (result));
ret = g_task_propagate_boolean (G_TASK (result), error);
ret = ide_task_propagate_boolean (IDE_TASK (result), error);
IDE_RETURN (ret);
}
......
......@@ -38,7 +38,7 @@ ide_autotools_makecache_stage_makecache_cb (GObject *object,
GAsyncResult *result,
gpointer user_data)
{
g_autoptr(GTask) task = user_data;
g_autoptr(IdeTask) task = user_data;
g_autoptr(IdeMakecache) makecache = NULL;
g_autoptr(GError) error = NULL;
IdeAutotoolsMakecacheStage *self;
......@@ -46,23 +46,23 @@ ide_autotools_makecache_stage_makecache_cb (GObject *object,
IDE_ENTRY;
g_assert (G_IS_ASYNC_RESULT (result));
g_assert (G_IS_TASK (task));
g_assert (IDE_IS_TASK (task));
makecache = ide_makecache_new_for_cache_file_finish (result, &error);
if (makecache == NULL)
{
g_task_return_error (task, g_steal_pointer (&error));
ide_task_return_error (task, g_steal_pointer (&error));
IDE_EXIT;
}
self = g_task_get_source_object (task);
self = ide_task_get_source_object (task);
g_assert (IDE_IS_AUTOTOOLS_MAKECACHE_STAGE (self));
g_clear_object (&self->makecache);
self->makecache = g_steal_pointer (&makecache);
g_task_return_boolean (task, TRUE);
ide_task_return_boolean (task, TRUE);
IDE_EXIT;
}
......@@ -74,7 +74,7 @@ ide_autotools_makecache_stage_execute_cb (GObject *object,
{
IdeAutotoolsMakecacheStage *self = (IdeAutotoolsMakecacheStage *)object;
IdeBuildStage *stage = (IdeBuildStage *)object;
g_autoptr(GTask) task = user_data;
g_autoptr(IdeTask) task = user_data;
g_autoptr(GError) error = NULL;
GCancellable *cancellable;
......@@ -83,16 +83,16 @@ ide_autotools_makecache_stage_execute_cb (GObject *object,
g_assert (IDE_IS_AUTOTOOLS_MAKECACHE_STAGE (stage));
g_assert (IDE_IS_AUTOTOOLS_MAKECACHE_STAGE (self));
g_assert (G_IS_ASYNC_RESULT (result));
g_assert (G_IS_TASK (task));
g_assert (IDE_IS_TASK (task));
if (!IDE_BUILD_STAGE_CLASS (ide_autotools_makecache_stage_parent_class)->execute_finish (stage, result, &error))
{
g_warning ("%s", error->message);
g_task_return_error (task, g_steal_pointer (&error));
ide_task_return_error (task, g_steal_pointer (&error));
IDE_EXIT;
}
cancellable = g_task_get_cancellable (task);
cancellable = ide_task_get_cancellable (task);
g_assert (!cancellable || G_IS_CANCELLABLE (cancellable));
/*
......@@ -117,7 +117,7 @@ ide_autotools_makecache_stage_execute_async (IdeBuildStage *stage,
gpointer user_data)
{
IdeAutotoolsMakecacheStage *self = (IdeAutotoolsMakecacheStage *)stage;
g_autoptr(GTask) task = NULL;
g_autoptr(IdeTask) task = NULL;
IDE_ENTRY;
......@@ -125,8 +125,8 @@ ide_autotools_makecache_stage_execute_async (IdeBuildStage *stage,
g_assert (IDE_IS_BUILD_PIPELINE (pipeline));
g_assert (!cancellable || G_IS_CANCELLABLE (cancellable));
task = g_task_new (self, cancellable, callback, user_data);
g_task_set_source_tag (task, ide_autotools_makecache_stage_execute_async);
task = ide_task_new (self, cancellable, callback, user_data);
ide_task_set_source_tag (task, ide_autotools_makecache_stage_execute_async);
/*
* First we need to execute our launcher (performed by our parent class).
......@@ -153,9 +153,9 @@ ide_autotools_makecache_stage_execute_finish (IdeBuildStage *stage,
IDE_ENTRY;
g_assert (IDE_IS_AUTOTOOLS_MAKECACHE_STAGE (stage));
g_assert (G_IS_TASK (result));
g_assert (IDE_IS_TASK (result));
ret = g_task_propagate_boolean (G_TASK (result), error);
ret = ide_task_propagate_boolean (IDE_TASK (result), error);
IDE_RETURN (ret);
}
......
......@@ -147,22 +147,22 @@ gb_beautifier_helper_create_tmp_file_cb (GObject *object,
{
GFile *file = (GFile *)object;
g_autoptr(GError) error = NULL;
g_autoptr(GTask) task = (GTask *)user_data;
g_autoptr(IdeTask) task = (IdeTask *)user_data;
g_assert (G_IS_FILE (file));
g_assert (G_IS_ASYNC_RESULT (result));
g_assert (G_IS_TASK (task));
g_assert (IDE_IS_TASK (task));
if (!g_file_replace_contents_finish (file, result, NULL, &error))
{
g_task_return_error (task, g_steal_pointer (&error));
ide_task_return_error (task, g_steal_pointer (&error));
return;
}
if (g_task_return_error_if_cancelled (task))
if (ide_task_return_error_if_cancelled (task))
g_file_delete (file, NULL, NULL);
else
g_task_return_pointer (task, g_object_ref (file), g_object_unref);
ide_task_return_pointer (task, g_object_ref (file), g_object_unref);
}
void
......@@ -172,7 +172,7 @@ gb_beautifier_helper_create_tmp_file_async (GbBeautifierEditorAddin *self,
GCancellable *cancellable,
gpointer user_data)
{
g_autoptr(GTask) task = NULL;
g_autoptr(IdeTask) task = NULL;
g_autoptr(GFile) file = NULL;
g_autoptr(GBytes) bytes = NULL;
g_autofree gchar *tmp_path = NULL;
......@@ -183,16 +183,16 @@ gb_beautifier_helper_create_tmp_file_async (GbBeautifierEditorAddin *self,
g_assert (!cancellable || G_IS_CANCELLABLE (cancellable));
g_assert (callback != NULL);
task = g_task_new (self, cancellable, callback, user_data);
g_task_set_source_tag (task, gb_beautifier_helper_create_tmp_file_async);
task = ide_task_new (self, cancellable, callback, user_data);
ide_task_set_source_tag (task, gb_beautifier_helper_create_tmp_file_async);
tmp_path = g_build_filename (self->tmp_dir, "XXXXXX.txt", NULL);
if (-1 == (fd = g_mkstemp (tmp_path)))
{
g_task_return_new_error (task,
G_IO_ERROR,
G_IO_ERROR_FAILED,
"Failed to create temporary file for the Beautifier plugin");
ide_task_return_new_error (task,
G_IO_ERROR,
G_IO_ERROR_FAILED,
"Failed to create temporary file for the Beautifier plugin");
return;
}
......@@ -217,10 +217,10 @@ gb_beautifier_helper_create_tmp_file_finish (GbBeautifierEditorAddin *self,
GError **error)
{
g_assert (GB_IS_BEAUTIFIER_EDITOR_ADDIN (self));
g_assert (G_IS_TASK (result));
g_assert (g_task_is_valid (G_TASK (result), self));
g_assert (IDE_IS_TASK (result));
g_assert (ide_task_is_valid (IDE_TASK (result), self));
return g_task_propagate_pointer (G_TASK (result), error);
return ide_task_propagate_pointer (IDE_TASK (result), error);
}
gchar *
......
......@@ -224,7 +224,7 @@ process_communicate_utf8_cb (GObject *object,
gpointer user_data)
{
g_autoptr(GSubprocess) process = (GSubprocess *)object;
g_autoptr(GTask) task = (GTask *)user_data;
g_autoptr(IdeTask) task = (IdeTask *)user_data;
g_autoptr(GBytes) stdout_gb = NULL;
g_autoptr(GBytes) stderr_gb = NULL;
const gchar *stdout_str = NULL;
......@@ -238,18 +238,18 @@ process_communicate_utf8_cb (GObject *object,
g_assert (G_IS_SUBPROCESS (process));
g_assert (G_IS_ASYNC_RESULT (result));
g_assert (G_IS_TASK (task));
g_assert (IDE_IS_TASK (task));
if (!g_subprocess_communicate_finish (process, result, &stdout_gb, &stderr_gb, &error))
{
g_task_return_error (task, g_steal_pointer (&error));
ide_task_return_error (task, g_steal_pointer (&error));
return;
}
if (g_task_return_error_if_cancelled (task))
if (ide_task_return_error_if_cancelled (task))
return;
state = (ProcessState *)g_task_get_task_data (task);
state = (ProcessState *)ide_task_get_task_data (task);
if (stderr_gb != NULL &&
NULL != (stderr_str = g_bytes_get_data (stderr_gb, NULL)) &&
!dzl_str_empty0 (stderr_str) &&
......@@ -293,7 +293,7 @@ process_communicate_utf8_cb (GObject *object,
gtk_text_buffer_end_user_action (buffer);
gtk_source_completion_unblock_interactive (completion);
g_task_return_boolean (task, TRUE);
ide_task_return_boolean (task, TRUE);
}
else
ide_object_warning (state->self,_("Beautify plugin: the output is not a valid UTF-8 text"));
......@@ -305,7 +305,7 @@ create_text_tmp_file_cb (GObject *object,
gpointer user_data)
{
GbBeautifierEditorAddin *self = (GbBeautifierEditorAddin *)object;
g_autoptr (GTask) task = (GTask *)user_data;
g_autoptr (IdeTask) task = (IdeTask *)user_data;
g_autoptr(GError) error = NULL;
ProcessState *state;
GSubprocess *process;
......@@ -313,9 +313,9 @@ create_text_tmp_file_cb (GObject *object,
g_assert (GB_IS_BEAUTIFIER_EDITOR_ADDIN (self));
g_assert (G_IS_ASYNC_RESULT (result));
g_assert (G_IS_TASK (task));
g_assert (IDE_IS_TASK (task));
state = (ProcessState *)g_task_get_task_data (task);
state = (ProcessState *)ide_task_get_task_data (task);
if (NULL == (state->src_file = gb_beautifier_helper_create_tmp_file_finish (self, result, &error)))
goto fail;
......@@ -326,11 +326,11 @@ create_text_tmp_file_cb (GObject *object,
if (process != NULL)
{
if (g_task_return_error_if_cancelled (task))
if (ide_task_return_error_if_cancelled (task))
g_object_unref (process);
else
{
cancellable = g_task_get_cancellable (task);
cancellable = ide_task_get_cancellable (task);
g_subprocess_communicate_async (process,
NULL,
cancellable,
......@@ -342,7 +342,7 @@ create_text_tmp_file_cb (GObject *object,
}
fail:
g_task_return_error (task, g_steal_pointer (&error));
ide_task_return_error (task, g_steal_pointer (&error));
return;
}
......@@ -379,7 +379,7 @@ gb_beautifier_process_launch_async (GbBeautifierEditorAddin *self,
{
GtkTextBuffer *buffer;
ProcessState *state;
g_autoptr(GTask) task = NULL;
g_autoptr(IdeTask) task = NULL;
const gchar *lang_id;
g_assert (GB_IS_BEAUTIFIER_EDITOR_ADDIN (self));
......@@ -417,10 +417,10 @@ gb_beautifier_process_launch_async (GbBeautifierEditorAddin *self,
if (entry->command_args != NULL)
state->command_args_strs = command_args_copy (entry->command_args);
task = g_task_new (self, cancellable, callback, user_data);
g_task_set_source_tag (task, gb_beautifier_process_launch_async);
g_task_set_priority (task, G_PRIORITY_LOW);
g_task_set_task_data (task, state, process_state_free);
task = ide_task_new (self, cancellable, callback, user_data);
ide_task_set_source_tag (task, gb_beautifier_process_launch_async);
ide_task_set_priority (task, G_PRIORITY_LOW);
ide_task_set_task_data (task, state, process_state_free);
gb_beautifier_helper_create_tmp_file_async (self,
state->text,
......@@ -435,7 +435,7 @@ gb_beautifier_process_launch_finish (GbBeautifierEditorAddin *self,
GError **error)
{
g_assert (GB_IS_BEAUTIFIER_EDITOR_ADDIN (self));
g_assert (g_task_is_valid (result, self));
g_assert (ide_task_is_valid (result, self));
return g_task_propagate_boolean (G_TASK (result), error);
return ide_task_propagate_boolean (IDE_TASK (result), error);
}
......@@ -164,17 +164,17 @@ gbp_create_project_genesis_addin_run_cb (GObject *object,
gpointer user_data)
{
GbpCreateProjectWidget *widget = (GbpCreateProjectWidget *)object;
g_autoptr(GTask) task = user_data;
g_autoptr(IdeTask) task = user_data;
g_autoptr(GError) error = NULL;
g_assert (G_IS_TASK (task));
g_assert (IDE_IS_TASK (task));
g_assert (G_IS_ASYNC_RESULT (result));
g_assert (GBP_IS_CREATE_PROJECT_WIDGET (widget));
if (!gbp_create_project_widget_create_finish (widget, result, &error))
g_task_return_error (task, g_steal_pointer (&error));
ide_task_return_error (task, g_steal_pointer (&error));
else
g_task_return_boolean (task, TRUE);
ide_task_return_boolean (task, TRUE);
}
static void
......@@ -184,11 +184,11 @@ gbp_create_project_genesis_addin_run_async (IdeGenesisAddin *addin,
gpointer user_data)