comparison src/plugin.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 c61be128dff3
children c209e287bb6e
comparison
equal deleted inserted replaced
8985:8abc99ed5d93 8986:8cf32769ba1b
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 */ 24 */
25 #ifndef _GAIM_PLUGIN_H_ 25 #ifndef _GAIM_PLUGIN_H_
26 #define _GAIM_PLUGIN_H_ 26 #define _GAIM_PLUGIN_H_
27 27
28 #include <glib/glist.h>
28 #include <gmodule.h> 29 #include <gmodule.h>
29 #include "signals.h" 30 #include "signals.h"
30 #include "value.h" 31 #include "value.h"
31 32
32 typedef struct _GaimPlugin GaimPlugin; 33 typedef struct _GaimPlugin GaimPlugin;
86 void (*destroy)(GaimPlugin *plugin); 87 void (*destroy)(GaimPlugin *plugin);
87 88
88 void *ui_info; 89 void *ui_info;
89 void *extra_info; 90 void *extra_info;
90 GaimPluginUiInfo *prefs_info; 91 GaimPluginUiInfo *prefs_info;
92 GList *(*actions)(GaimPlugin *plugin);
91 }; 93 };
92 94
93 /** 95 /**
94 * Extra information for loader plugins. 96 * Extra information for loader plugins.
95 */ 97 */
158 160
159 #ifdef __cplusplus 161 #ifdef __cplusplus
160 extern "C" { 162 extern "C" {
161 #endif 163 #endif
162 164
165
166 void *gaim_plugins_get_handle(void);
167
168
163 /**************************************************************************/ 169 /**************************************************************************/
164 /** @name Plugin API */ 170 /** @name Plugin API */
165 /**************************************************************************/ 171 /**************************************************************************/
166 /*@{*/ 172 /*@{*/
167 173