Commit aaa709e0 authored by Michael Meeks's avatar Michael Meeks Committed by Michael Meeks

install plugin.xml

2001-01-26  Michael Meeks  <michael@helixcode.com>

	* Makefile.am (gnum_gb_la_SOURCES): install plugin.xml

	* plugin.c (init_plugin): fix bit rot.
	(can_deactivate_plugin): rename
	(cleanup_plugin): cleanup.
parent 26a47636
2001-01-26 Michael Meeks <michael@helixcode.com>
* Makefile.am (gnum_gb_la_SOURCES): install plugin.xml
* plugin.c (init_plugin): fix bit rot.
(can_deactivate_plugin): rename
(cleanup_plugin): cleanup.
2001-01-08 Jody Goldberg <jgoldberg@home.com>
* excel-gb-interior.c (excel_gb_interior_get_arg) : User
......
......@@ -35,4 +35,7 @@ gnum_gb_la_LIBADD = \
$(EXTRA_GNOME_LIBS) \
-lm @GLIB_LIBS@ -lgb -lgbrun
gnumeric_plugin_gbdir = $(gnumeric_plugindir)/gb
gnumeric_plugin_gb_DATA = plugin.xml
EXTRA_DIST = README main.gba gnumeric.gbp
\ No newline at end of file
......@@ -56,17 +56,19 @@ typedef struct {
int gb_debug = 0;
static int
dont_unload (PluginData *pd)
gboolean
can_deactivate_plugin (PluginInfo *pd)
{
return 0;
return FALSE;
}
static void
cleanup (PluginData *pd)
gboolean
cleanup_plugin (PluginInfo *pd)
{
gbrun_shutdown ();
gb_shutdown ();
return TRUE;
}
static Value *
......@@ -349,24 +351,26 @@ file_provider (GBRunEvalContext *ec,
return ret;
}
PluginInitResult
init_plugin (CommandContext *context, PluginData *pd)
gboolean
init_plugin (PluginInfo *pd, ErrorInfo **err)
{
GBEvalContext *ec;
GBLexerStream *proj_stream;
char *proj_name;
if (plugin_version_mismatch (context, pd, GNUMERIC_VERSION))
return PLUGIN_QUIET_ERROR;
g_return_val_if_fail (err != NULL, FALSE);
*err = NULL;
gb_init ();
ec = gb_eval_context_new ();
gbrun_init (ec);
if (gb_eval_exception (ec)) {
g_warning ("Error initializing gb '%s'",
gb_eval_context_get_text (ec));
return PLUGIN_ERROR;
*err = error_info_new_printf (
_("Error initializing gb '%s'"),
gb_eval_context_get_text (ec));
return FALSE;
}
excel_gb_application_register_types ();
......@@ -379,17 +383,10 @@ init_plugin (CommandContext *context, PluginData *pd)
if (g_file_exists (proj_name)) {
proj_stream = file_to_stream (proj_name);
if (!read_gb (NULL, NULL, proj_stream, file_provider, NULL))
g_warning ("Error in project '%s'", proj_name);
*err = error_info_new_printf (_("Error in project '%s'"), proj_name);
}
g_free (proj_name);
if (plugin_data_init (pd, dont_unload, cleanup,
_("Gnome Basic"),
_("Enables Gnome Basic support")))
return PLUGIN_OK;
else
return PLUGIN_ERROR;
return PLUGIN_OK;
return *err != NULL;
}
<?xml version="1.0"?>
<gnumeric_plugin_group>
<plugin id="Gnumeric_gb">
<information name="Gnome Basic"
description="Enables Gnome Basic support"/>
<activation type="g_module" module_file="gnum_gb.so"/>
</plugin>
</gnumeric_plugin_group>
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