[evolution] Fix EPluginLib callback signatures.
- From: Matthew Barnes <mbarnes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [evolution] Fix EPluginLib callback signatures.
- Date: Tue, 10 Nov 2009 15:47:25 +0000 (UTC)
commit 54fe7e3b2affbe5fd962460ec5ba6942a77b747c
Author: Matthew Barnes <mbarnes redhat com>
Date: Tue Nov 10 10:45:06 2009 -0500
Fix EPluginLib callback signatures.
Dynamically loaded library plugins do not need to know about EPluginLib
specifically. Passing them an EPlugin pointer is sufficient.
modules/plugin-lib/e-plugin-lib.c | 8 ++++----
modules/plugin-lib/e-plugin-lib.h | 6 +++---
2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/modules/plugin-lib/e-plugin-lib.c b/modules/plugin-lib/e-plugin-lib.c
index c7a0233..7b72053 100644
--- a/modules/plugin-lib/e-plugin-lib.c
+++ b/modules/plugin-lib/e-plugin-lib.c
@@ -57,7 +57,7 @@ plugin_lib_loadmodule (EPlugin *plugin)
}
if (g_module_symbol (plugin_lib->module, "e_plugin_lib_enable", (gpointer)&enable)) {
- if (enable (plugin_lib, TRUE) != 0) {
+ if (enable (plugin, TRUE) != 0) {
plugin->enabled = FALSE;
g_module_close (plugin_lib->module);
plugin_lib->module = NULL;
@@ -87,7 +87,7 @@ plugin_lib_invoke (EPlugin *plugin, const gchar *name, gpointer data)
return NULL;
}
- return cb (plugin_lib, data);
+ return cb (plugin, data);
}
static gpointer
@@ -162,7 +162,7 @@ plugin_lib_get_configure_widget (EPlugin *plugin)
}
if (g_module_symbol (plugin_lib->module, "e_plugin_lib_get_configure_widget", (gpointer)&get_configure_widget)) {
- return (GtkWidget*) get_configure_widget (plugin_lib);
+ return (GtkWidget*) get_configure_widget (plugin);
}
return NULL;
}
@@ -184,7 +184,7 @@ plugin_lib_enable (EPlugin *plugin, gint state)
return;
if (g_module_symbol (plugin_lib->module, "e_plugin_lib_enable", (gpointer) &enable)) {
- if (enable (plugin_lib, state) != 0)
+ if (enable (plugin, state) != 0)
return;
}
}
diff --git a/modules/plugin-lib/e-plugin-lib.h b/modules/plugin-lib/e-plugin-lib.h
index b485d96..6ca7d69 100644
--- a/modules/plugin-lib/e-plugin-lib.h
+++ b/modules/plugin-lib/e-plugin-lib.h
@@ -50,14 +50,14 @@ typedef struct _EPluginLib EPluginLib;
typedef struct _EPluginLibClass EPluginLibClass;
/* The callback signature used for epluginlib methods */
-typedef gpointer (*EPluginLibFunc) (EPluginLib *ep, gpointer data);
+typedef gpointer (*EPluginLibFunc) (EPlugin *ep, gpointer data);
/* The setup method, this will be called when the plugin is
* initialized. In the future it may also be called when the plugin
* is disabled. */
-typedef gint (*EPluginLibEnableFunc) (EPluginLib *ep, gint enable);
+typedef gint (*EPluginLibEnableFunc) (EPlugin *ep, gint enable);
-typedef gpointer (*EPluginLibGetConfigureWidgetFunc) (EPluginLib *ep);
+typedef gpointer (*EPluginLibGetConfigureWidgetFunc) (EPlugin *ep);
/**
* struct _EPluginLib -
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]