Commit 54b4c077 authored by Jean Bréfort's avatar Jean Bréfort

Call pygobject_init() if needed. [#368]

parent f83cebe4
......@@ -2,6 +2,7 @@ Gnumeric 1.12.44
Jean:
* Fix document properties types. [#367]
* Call pygobject_init() if needed. [#368]
Morten:
* Fix SWITCH's default argument. [#354]
......
2018-11-20 Jean Brefort <jean.brefort@normalesup.org>
* python-loader.c (gplp_func_file_probe), (gplp_func_file_open),
(gplp_func_file_save), (gplp_func_exec_action),
(gplp_service_unload): call pygobject_init() if needed. [#368]
2018-08-19 Morten Welinder <terra@gnome.org>
* Release 1.12.43
......
......@@ -222,7 +222,10 @@ gplp_func_file_probe (G_GNUC_UNUSED GOFileOpener const *fo, GOPluginService *ser
g_return_val_if_fail (GO_IS_PLUGIN_SERVICE_FILE_OPENER (service), FALSE);
g_return_val_if_fail (input != NULL, FALSE);
g_return_val_if_fail (_PyGObject_API != NULL, FALSE);
if (_PyGObject_API == NULL) {
pygobject_init (3, 0, 0);
g_return_if_fail (_PyGObject_API != NULL);
}
loader_data = g_object_get_data (G_OBJECT (service), "loader_data");
SWITCH_TO_PLUGIN (go_plugin_service_get_plugin (service));
......@@ -265,7 +268,10 @@ gplp_func_file_open (G_GNUC_UNUSED GOFileOpener const *fo,
g_return_if_fail (GO_IS_PLUGIN_SERVICE_FILE_OPENER (service));
g_return_if_fail (input != NULL);
g_return_if_fail (_PyGObject_API != NULL);
if (_PyGObject_API == NULL) {
pygobject_init (3, 0, 0);
g_return_if_fail (_PyGObject_API != NULL);
}
old_sheet = wb_view_cur_sheet (wb_view);
......@@ -374,6 +380,10 @@ gplp_func_file_save (G_GNUC_UNUSED GOFileSaver const *fs, GOPluginService *servi
g_return_if_fail (GO_IS_PLUGIN_SERVICE_FILE_SAVER (service));
g_return_if_fail (output != NULL);
if (_PyGObject_API == NULL) {
pygobject_init (3, 0, 0);
g_return_if_fail (_PyGObject_API != NULL);
}
g_return_if_fail (_PyGObject_API != NULL);
saver_data = g_object_get_data (G_OBJECT (service), "loader_data");
......@@ -788,7 +798,10 @@ gplp_func_exec_action (GOPluginService *service,
ServiceLoaderDataUI *loader_data;
PyObject *fn, *ret;
g_return_if_fail (_PyGObject_API != NULL);
if (_PyGObject_API == NULL) {
pygobject_init (3, 0, 0);
g_return_if_fail (_PyGObject_API != NULL);
}
GO_INIT_RET_ERROR_INFO (ret_error);
loader_data = g_object_get_data (G_OBJECT (service), "loader_data");
......@@ -880,9 +893,9 @@ static gboolean
gplp_service_unload (GOPluginLoader *l, GOPluginService *s, GOErrorInfo **err)
{
if (GNM_IS_PLUGIN_SERVICE_FUNCTION_GROUP (s))
;
else if (GNM_IS_PLUGIN_SERVICE_UI (s))
gplp_unload_service_function_group (l, s, err);
else if (GNM_IS_PLUGIN_SERVICE_UI (s))
;
else
return FALSE;
return TRUE;
......
2018-11-19 Jean Brefort <jean.brefort@normalesup.org>
reviewed by: <delete if not using a buddy>
* doc-meta-data.ui:
* doc-meta-data.ui: fix dataid type, a better fix for #367.
2018-11-18 Jean Brefort <jean.brefort@normalesup.org>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment