diff plugins/perl/perl.c @ 12988:b457aa723bab

[gaim-migrate @ 15341] Perl plugins can now have more than one plugin action. This isn't exactly the nicest way to have done this, as it requires a "global" plugin_actions hash to work, but I couldn't get the cleaner way to work and this is better than nothing. committer: Tailor Script <tailor@pidgin.im>
author Etan Reisner <pidgin@unreliablesource.net>
date Sun, 22 Jan 2006 10:29:34 +0000
parents d1e6890ed062
children
line wrap: on
line diff
--- a/plugins/perl/perl.c	Sun Jan 22 07:37:22 2006 +0000
+++ b/plugins/perl/perl.c	Sun Jan 22 10:29:34 2006 +0000
@@ -376,28 +376,12 @@
 				info->ui_info = &gtk_ui_info;
 			}
 
-		/********************************************************/
-		/*                                                      */
-		/* plugin_action - This is given to the plugin info     */
-		/*                 as the action GList.  There are two  */
-		/*                 parts so the user can set the title  */
-		/*                 as it will appear in the plugin      */
-		/*                 action menu.  The name is extracted  */
-		/*                 and then the callback perl sub's     */
-		/*                 name both of which then are handled  */
-		/*                 by an internal gaim_perl function    */
-		/*                 that sets up the single cb function  */
-		/*                 which is then inserted into 'info'.  */
-		/********************************************************/
-			if ((key = hv_fetch(plugin_info, "plugin_action_label",
-			                    strlen("plugin_action_label"), 0))) {
-				gaim_perl_plugin_action_label = g_strdup(SvPV(*key, len));
-			}
-
-			if ((key = hv_fetch(plugin_info, "plugin_action",
-			                    strlen("plugin_action"), 0))) {
-				gaim_perl_plugin_action_callback_sub = g_strdup_printf("%s::%s", gps->package, SvPV(*key, len));
-				info->actions = gaim_perl_plugin_action;
+			if ((key = hv_fetch(plugin_info, "plugin_action_sub",
+			                    strlen("plugin_action_sub"), 0))) {
+				gps->plugin_action_sub = g_strdup_printf("%s::%s",
+				                                         gps->package,
+				                                         SvPV(*key, len));
+				info->actions = gaim_perl_plugin_actions;
 			}
 
 			plugin->info = info;