Commit f9ad8cb6 authored by Chyla Zbigniew's avatar Chyla Zbigniew

Replaced PLUGIN_MESSAGE macro with plugin_message function to avoid


* src/plugin.[ch]: Replaced PLUGIN_MESSAGE macro with plugin_message
function to avoid portability problems (some compilers don't support
vararg macros), added "level" argument.

* src/plugin-loader.c (gnumeric_plugin_loader_load,
gnumeric_plugin_loader_unload): Adjusted to plugin.h.
parent 186ac28d
2001-03-31 Zbigniew Chyla <cyba@gnome.pl>
* src/plugin.[ch]: Replaced PLUGIN_MESSAGE macro with plugin_message
function to avoid portability problems (some compilers don't support
vararg macros), added "level" argument.
* src/plugin-loader.c (gnumeric_plugin_loader_load,
gnumeric_plugin_loader_unload): Adjusted to plugin.h.
2001-03-30 Jody Goldberg <jgoldberg@home.com>
* src/workbook-control-gui.c (wbcg_sheet_remove_all) : clear the
......
2001-03-31 Zbigniew Chyla <cyba@gnome.pl>
* src/plugin.[ch]: Replaced PLUGIN_MESSAGE macro with plugin_message
function to avoid portability problems (some compilers don't support
vararg macros), added "level" argument.
* src/plugin-loader.c (gnumeric_plugin_loader_load,
gnumeric_plugin_loader_unload): Adjusted to plugin.h.
2001-03-30 Jody Goldberg <jgoldberg@home.com>
* src/workbook-control-gui.c (wbcg_sheet_remove_all) : clear the
......
2001-03-31 Zbigniew Chyla <cyba@gnome.pl>
* src/plugin.[ch]: Replaced PLUGIN_MESSAGE macro with plugin_message
function to avoid portability problems (some compilers don't support
vararg macros), added "level" argument.
* src/plugin-loader.c (gnumeric_plugin_loader_load,
gnumeric_plugin_loader_unload): Adjusted to plugin.h.
2001-03-30 Jody Goldberg <jgoldberg@home.com>
* src/workbook-control-gui.c (wbcg_sheet_remove_all) : clear the
......
2001-03-31 Zbigniew Chyla <cyba@gnome.pl>
* src/plugin.[ch]: Replaced PLUGIN_MESSAGE macro with plugin_message
function to avoid portability problems (some compilers don't support
vararg macros), added "level" argument.
* src/plugin-loader.c (gnumeric_plugin_loader_load,
gnumeric_plugin_loader_unload): Adjusted to plugin.h.
2001-03-30 Jody Goldberg <jgoldberg@home.com>
* src/workbook-control-gui.c (wbcg_sheet_remove_all) : clear the
......
2001-03-31 Zbigniew Chyla <cyba@gnome.pl>
* src/plugin.[ch]: Replaced PLUGIN_MESSAGE macro with plugin_message
function to avoid portability problems (some compilers don't support
vararg macros), added "level" argument.
* src/plugin-loader.c (gnumeric_plugin_loader_load,
gnumeric_plugin_loader_unload): Adjusted to plugin.h.
2001-03-30 Jody Goldberg <jgoldberg@home.com>
* src/workbook-control-gui.c (wbcg_sheet_remove_all) : clear the
......
......@@ -205,7 +205,7 @@ gnumeric_plugin_loader_load (GnumericPluginLoader *loader, ErrorInfo **ret_error
if (error == NULL) {
loader->is_loaded = TRUE;
plugin_dependencies_inc_dependants (loader->plugin, DEPENDENCY_LOAD);
PLUGIN_MESSAGE ("Loaded plugin \"%s\".\n", plugin_info_peek_id (loader->plugin));
plugin_message (0, "Loaded plugin \"%s\".\n", plugin_info_peek_id (loader->plugin));
} else {
*ret_error = error;
}
......@@ -235,7 +235,7 @@ gnumeric_plugin_loader_unload (GnumericPluginLoader *loader, ErrorInfo **ret_err
if (error == NULL) {
loader->is_loaded = FALSE;
plugin_dependencies_dec_dependants (loader->plugin, DEPENDENCY_LOAD);
PLUGIN_MESSAGE ("Unloaded plugin \"%s\".\n", plugin_info_peek_id (loader->plugin));
plugin_message (0, "Unloaded plugin \"%s\".\n", plugin_info_peek_id (loader->plugin));
} else {
*ret_error = error;
}
......
......@@ -1556,3 +1556,17 @@ plugins_shutdown (void)
error_info_free (ignored_error);
gnome_config_sync ();
}
void
plugin_message (gint level, const gchar *format, ...)
{
#ifdef PLUGIN_DEBUG
va_list args;
if (level <= PLUGIN_DEBUG) {
va_start (args, format);
vprintf (format, args);
va_end (args);
}
#endif
}
......@@ -95,10 +95,6 @@ gboolean plugin_info_is_loaded (PluginInfo *pinfo);
struct _PluginServicesData *plugin_info_peek_services_data (PluginInfo *pinfo);
struct _GnumericPluginLoader *plugin_info_get_loader (PluginInfo *pinfo);
#ifdef PLUGIN_DEBUG
#define PLUGIN_MESSAGE(format, args...) g_print (format, ##args)
#else
#define PLUGIN_MESSAGE(format, args...)
#endif
void plugin_message (gint level, const gchar *format, ...);
#endif /* GNUMERIC_PLUGIN_H */
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