Mercurial > pidgin
changeset 12890:e0629444c455
[gaim-migrate @ 15243]
I was working on making plugin prefs more useful from perl and realized this
file was all out of order, so I fixed it. I managed to get plugin prefs
working but gaim was crashing if you quit while a plugin was loaded that used
them so they aren't getting committed, but this is since it's barely real.
committer: Tailor Script <tailor@pidgin.im>
author | Etan Reisner <pidgin@unreliablesource.net> |
---|---|
date | Mon, 16 Jan 2006 09:30:11 +0000 |
parents | bba0faa37f3a |
children | a58540b16f41 |
files | plugins/perl/common/Plugin.xs plugins/perl/perl.c |
diffstat | 2 files changed, 58 insertions(+), 56 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/perl/common/Plugin.xs Mon Jan 16 05:32:36 2006 +0000 +++ b/plugins/perl/common/Plugin.xs Mon Jan 16 09:30:11 2006 +0000 @@ -3,31 +3,6 @@ MODULE = Gaim::Plugin PACKAGE = Gaim::Plugin PREFIX = gaim_plugin_ PROTOTYPES: ENABLE -void -gaim_plugin_destroy(plugin) - Gaim::Plugin plugin - -void -gaim_plugin_ipc_unregister(plugin, command) - Gaim::Plugin plugin - const char *command - -void -gaim_plugin_ipc_unregister_all(plugin) - Gaim::Plugin plugin - -gboolean -gaim_plugin_is_loaded(plugin) - Gaim::Plugin plugin - -gboolean -gaim_plugin_is_unloadable(plugin) - Gaim::Plugin plugin - -gboolean -gaim_plugin_load(plugin) - Gaim::Plugin plugin - Gaim::Plugin gaim_plugin_new(native, path) gboolean native @@ -42,13 +17,29 @@ Gaim::Plugin plugin gboolean -gaim_plugin_reload(plugin) +gaim_plugin_load(plugin) Gaim::Plugin plugin gboolean gaim_plugin_unload(plugin) Gaim::Plugin plugin +gboolean +gaim_plugin_reload(plugin) + Gaim::Plugin plugin + +void +gaim_plugin_destroy(plugin) + Gaim::Plugin plugin + +gboolean +gaim_plugin_is_loaded(plugin) + Gaim::Plugin plugin + +gboolean +gaim_plugin_is_unloadable(plugin) + Gaim::Plugin plugin + const gchar * gaim_plugin_get_id(plugin) Gaim::Plugin plugin @@ -77,6 +68,17 @@ gaim_plugin_get_homepage(plugin) Gaim::Plugin plugin +MODULE = Gaim::Plugin PACKAGE = Gaim::Plugin::IPC PREFIX = gaim_plugin_ipc_ + +void +gaim_plugin_ipc_unregister(plugin, command) + Gaim::Plugin plugin + const char *command + +void +gaim_plugin_ipc_unregister_all(plugin) + Gaim::Plugin plugin + MODULE = Gaim::Plugin PACKAGE = Gaim::Plugins PREFIX = gaim_plugins_ PROTOTYPES: ENABLE @@ -85,38 +87,37 @@ const char *path void +gaim_plugins_unload_all() + +void gaim_plugins_destroy_all() +void +gaim_plugins_load_saved(key) + const char *key + +void +gaim_plugins_probe(ext) + const char *ext + gboolean gaim_plugins_enabled() Gaim::Plugin -gaim_plugins_find_with_basename(basename) - const char *basename +gaim_plugins_find_with_name(name) + const char *name Gaim::Plugin gaim_plugins_find_with_filename(filename) const char *filename Gaim::Plugin -gaim_plugins_find_with_id(id) - const char *id +gaim_plugins_find_with_basename(basename) + const char *basename Gaim::Plugin -gaim_plugins_find_with_name(name) - const char *name - -void -gaim_plugins_get_all() -PREINIT: - GList *l; -PPCODE: - for (l = gaim_plugins_get_all(); l != NULL; l = l->next) { - XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::Plugin"))); - } - -void * -gaim_plugins_get_handle() +gaim_plugins_find_with_id(id) + const char *id void gaim_plugins_get_loaded() @@ -137,18 +138,19 @@ } void +gaim_plugins_get_all() +PREINIT: + GList *l; +PPCODE: + for (l = gaim_plugins_get_all(); l != NULL; l = l->next) { + XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::Plugin"))); + } + +void * +gaim_plugins_get_handle() + +void gaim_plugins_init() void -gaim_plugins_load_saved(key) - const char *key - -void -gaim_plugins_probe(ext) - const char *ext - -void gaim_plugins_uninit() - -void -gaim_plugins_unload_all()
--- a/plugins/perl/perl.c Mon Jan 16 05:32:36 2006 +0000 +++ b/plugins/perl/perl.c Mon Jan 16 09:30:11 2006 +0000 @@ -357,7 +357,7 @@ SvPV(*key, len)); info->prefs_info = &ui_info; } - + if ((key = hv_fetch(plugin_info, "gtk_prefs_info", strlen("gtk_prefs_info"), 0))) { /* key now is the name of the Perl sub that