[gnumeric] Move plugin init code
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Move plugin init code
- Date: Fri, 18 May 2018 11:43:14 +0000 (UTC)
commit 9ba3a3d37863255df06f689464f7f67e1c3e3f46
Author: Morten Welinder <terra gnome org>
Date: Fri May 18 07:42:35 2018 -0400
Move plugin init code
src/gnm-plugin.c | 16 ++++++++++++++++
src/gnm-plugin.h | 1 +
src/libgnumeric.c | 9 ++-------
3 files changed, 19 insertions(+), 7 deletions(-)
---
diff --git a/src/gnm-plugin.c b/src/gnm-plugin.c
index 18bed12..b78aa52 100644
--- a/src/gnm-plugin.c
+++ b/src/gnm-plugin.c
@@ -976,6 +976,22 @@ GSF_CLASS_FULL (GnmPluginLoaderModule, gnm_plugin_loader_module,
/****************************************************************************/
+/**
+ * gnm_plugins_service_init: (skip)
+ */
+void
+gnm_plugins_service_init (void)
+{
+ go_plugin_service_define ("function_group",
+ &gnm_plugin_service_function_group_get_type);
+ go_plugin_service_define ("ui",
+ &gnm_plugin_service_ui_get_type);
+ go_plugin_service_define ("solver",
+ &gnm_plugin_service_solver_get_type);
+ go_plugin_loader_module_register_version ("gnumeric", GNM_VERSION_FULL);
+}
+
+
void
gnm_plugins_init (GOCmdContext *context)
{
diff --git a/src/gnm-plugin.h b/src/gnm-plugin.h
index afd90cf..d15ba79 100644
--- a/src/gnm-plugin.h
+++ b/src/gnm-plugin.h
@@ -67,6 +67,7 @@ G_MODULE_EXPORT GOPluginModuleHeader const go_plugin_header = \
/**************************************************************************/
+void gnm_plugins_service_init (void);
void gnm_plugins_init (GOCmdContext *c);
G_END_DECLS
diff --git a/src/libgnumeric.c b/src/libgnumeric.c
index b13a527..98ad276 100644
--- a/src/libgnumeric.c
+++ b/src/libgnumeric.c
@@ -295,13 +295,8 @@ gnm_init (void)
gtk_icon_theme_add_resource_path (gtk_icon_theme_get_default (),
"/org/gnumeric/gnumeric/icons");
}
- go_plugin_service_define ("function_group",
- &gnm_plugin_service_function_group_get_type);
- go_plugin_service_define ("ui",
- &gnm_plugin_service_ui_get_type);
- go_plugin_service_define ("solver",
- &gnm_plugin_service_solver_get_type);
- go_plugin_loader_module_register_version ("gnumeric", GNM_VERSION_FULL);
+
+ gnm_plugins_service_init ();
g_object_new (GNM_APP_TYPE, NULL);
mathfunc_init ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]