[gnome-builder/wip/gtk4-port: 1577/1774] libide/foundry: ensure we initialize all subsystems
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 1577/1774] libide/foundry: ensure we initialize all subsystems
- Date: Mon, 11 Jul 2022 22:31:50 +0000 (UTC)
commit 02263abe759a6da9bb3890775a57b80bbd1b1a81
Author: Christian Hergert <chergert redhat com>
Date: Sun Jun 19 22:34:42 2022 -0700
libide/foundry: ensure we initialize all subsystems
Even if they were created, they only get initialized here.
src/libide/foundry/ide-foundry-init.c | 26 +++++++++++++++++++-------
1 file changed, 19 insertions(+), 7 deletions(-)
---
diff --git a/src/libide/foundry/ide-foundry-init.c b/src/libide/foundry/ide-foundry-init.c
index be3d82042..1ad3af7f8 100644
--- a/src/libide/foundry/ide-foundry-init.c
+++ b/src/libide/foundry/ide-foundry-init.c
@@ -74,6 +74,8 @@ ide_foundry_init_async_cb (GObject *init_object,
if (G_IS_ASYNC_INITABLE (object))
{
+ g_debug ("Initializing %s asynchronously",
+ G_OBJECT_TYPE_NAME (object));
g_async_initable_init_async (G_ASYNC_INITABLE (object),
G_PRIORITY_DEFAULT,
cancellable,
@@ -83,7 +85,11 @@ ide_foundry_init_async_cb (GObject *init_object,
}
if (G_IS_INITABLE (object))
- g_initable_init (G_INITABLE (object), NULL, NULL);
+ {
+ g_debug ("Initializing %s synchronously",
+ G_OBJECT_TYPE_NAME (object));
+ g_initable_init (G_INITABLE (object), NULL, NULL);
+ }
}
ide_task_return_boolean (task, TRUE);
@@ -120,12 +126,12 @@ _ide_foundry_init_async (IdeContext *context,
{
g_autoptr(IdeObject) object = NULL;
- /* Skip if plugins already forced this subsystem to load */
- if ((object = ide_object_get_child_typed (IDE_OBJECT (context), foundry_types[i])))
- continue;
+ if (!(object = ide_object_get_child_typed (IDE_OBJECT (context), foundry_types[i])))
+ {
+ object = g_object_new (foundry_types[i], NULL);
+ ide_object_append (IDE_OBJECT (context), object);
+ }
- object = g_object_new (foundry_types[i], NULL);
- ide_object_append (IDE_OBJECT (context), object);
g_queue_push_tail (&state->to_init, g_steal_pointer (&object));
}
@@ -135,6 +141,8 @@ _ide_foundry_init_async (IdeContext *context,
if (G_IS_ASYNC_INITABLE (object))
{
+ g_debug ("Initializing %s asynchronously",
+ G_OBJECT_TYPE_NAME (object));
g_async_initable_init_async (G_ASYNC_INITABLE (object),
G_PRIORITY_DEFAULT,
NULL,
@@ -144,7 +152,11 @@ _ide_foundry_init_async (IdeContext *context,
}
if (G_IS_INITABLE (object))
- g_initable_init (G_INITABLE (object), NULL, NULL);
+ {
+ g_debug ("Initializing %s synchronously",
+ G_OBJECT_TYPE_NAME (object));
+ g_initable_init (G_INITABLE (object), NULL, NULL);
+ }
}
ide_task_return_boolean (task, TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]