diff src/multi.h @ 8986:8cf32769ba1b

[gaim-migrate @ 9761] " This patch adds a Plugin Actions menu item after the Account Actions menu. The Plugin Actions menu is populated from the added 'actions' slot in GaimPluginInfo. As a demonstration, the Idle Maker plugin has been converted to no longer require GTK code and the Preferences interface just to perform its actions. Instead, it uses a Plugin Action to spawn a Fields Request. There's also a minor fix for consistency in the menu building for buddy actions. The pre-existing method for instructing a menu list to display a separator was to insert a NULL rather than a proto_buddy_menu into the GList of actions. The code for the buddy menus was instead checking for a proto_buddy_menu with a '-' label. This has been fixed, and it now correctly uses NULL to indicate a separator." "Date: 2004-05-16 02:25 Sender: taliesein Logged In: YES user_id=77326 I need to add a callback to this patch to watch for loading/unloading of plugins (to determine when to rebuild the menu). Since the appropriate way to handle Plugin Actions is still mildly up for debate, I'm holding of on correcting the patch until I know for sure whether I should fix this patch, or scrap it and write a new one using a different method." "Date: 2004-05-18 12:26 Sender: taliesein Logged In: YES user_id=77326 I've completed changes to this patch to also add plugin load and unload signals (it looks like plugin.c actually had pre-signal callbacks in place, but they were never used or converted to signals) This patch now will correctly update the Plugin Action menu as plugins load and unload." I'm not entirely sure i like the ui of a plugins actions menu, but i think that having some way for plugins to add actions on an account is a good thing, and i'm not sure that every viable action fits under the accounts actions menu. we may want to merge the two (the existing accounts actions and this plugins actions), but both times it came up in #gaim no one seemed to want to comment, and on one commented to the gaim-devel post either. committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Thu, 20 May 2004 05:11:44 +0000
parents e3f4657fa555
children 67421e0dc497
line wrap: on
line diff
--- a/src/multi.h	Thu May 20 03:11:52 2004 +0000
+++ b/src/multi.h	Thu May 20 05:11:44 2004 +0000
@@ -33,6 +33,12 @@
 	GaimConnection *gc;
 };
 
+struct plugin_actions_menu {
+	char *label;
+	void (*callback)(GaimPlugin *);
+	GaimPlugin *plugin;
+};
+
 struct proto_buddy_menu {
 	char *label;
 	void (*callback)(GaimConnection *, const char *);