[gtk/wip/exalm/inspector: 2/2] inspector: Register extension on startup
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/exalm/inspector: 2/2] inspector: Register extension on startup
- Date: Tue, 28 Dec 2021 23:13:48 +0000 (UTC)
commit dbf5fe729446352f4774301caf0a71eb78d201cf
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Wed Dec 29 04:14:03 2021 +0500
inspector: Register extension on startup
gtk/inspector/init.c | 12 ++++++++----
gtk/inspector/init.h | 3 ++-
2 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/gtk/inspector/init.c b/gtk/inspector/init.c
index c951fe30fc..addd6631ef 100644
--- a/gtk/inspector/init.c
+++ b/gtk/inspector/init.c
@@ -58,8 +58,6 @@
void
gtk_inspector_init (void)
{
- static GIOExtensionPoint *extension_point = NULL;
-
g_type_ensure (G_TYPE_LIST_STORE);
g_type_ensure (GTK_TYPE_CELL_RENDERER_GRAPH);
@@ -89,6 +87,14 @@ gtk_inspector_init (void)
g_type_ensure (GTK_TYPE_INSPECTOR_VISUAL);
g_type_ensure (GTK_TYPE_INSPECTOR_WINDOW);
+ gtk_css_provider_set_keep_css_sections ();
+}
+
+void
+gtk_inspector_register_extension (void)
+{
+ static GIOExtensionPoint *extension_point = NULL;
+
if (extension_point == NULL)
{
GIOModuleScope *scope;
@@ -107,8 +113,6 @@ gtk_inspector_init (void)
g_strfreev (paths);
g_io_module_scope_free (scope);
}
-
- gtk_css_provider_set_keep_css_sections ();
}
// vim: set et sw=2 ts=2:
diff --git a/gtk/inspector/init.h b/gtk/inspector/init.h
index 7fe6745fd8..04d3789bb6 100644
--- a/gtk/inspector/init.h
+++ b/gtk/inspector/init.h
@@ -20,7 +20,8 @@
G_BEGIN_DECLS
-void gtk_inspector_init (void);
+void gtk_inspector_init (void);
+void gtk_inspector_register_extension (void);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]