Mercurial > pidgin
annotate 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 |
| rev | line source |
|---|---|
| 960 | 1 /* |
| 2 * gaim | |
| 3 * | |
| 8046 | 4 * Gaim is the legal property of its developers, whose names are too numerous |
| 5 * to list here. Please refer to the COPYRIGHT file distributed with this | |
| 6 * source distribution. | |
| 960 | 7 * |
| 8 * This program is free software; you can redistribute it and/or modify | |
| 9 * it under the terms of the GNU General Public License as published by | |
| 10 * the Free Software Foundation; either version 2 of the License, or | |
| 11 * (at your option) any later version. | |
| 12 * | |
| 13 * This program is distributed in the hope that it will be useful, | |
| 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 16 * GNU General Public License for more details. | |
| 17 * | |
| 18 * You should have received a copy of the GNU General Public License | |
| 19 * along with this program; if not, write to the Free Software | |
| 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 21 * | |
| 22 */ | |
| 23 | |
|
2417
5473c8c5378d
[gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2402
diff
changeset
|
24 #ifndef _MULTI_H_ |
|
5473c8c5378d
[gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2402
diff
changeset
|
25 #define _MULTI_H_ |
| 960 | 26 |
|
5563
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5469
diff
changeset
|
27 #include "account.h" |
|
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
28 #include "plugin.h" |
| 960 | 29 |
| 4333 | 30 struct proto_actions_menu { |
| 31 char *label; | |
|
5563
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5469
diff
changeset
|
32 void (*callback)(GaimConnection *); |
|
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5469
diff
changeset
|
33 GaimConnection *gc; |
| 4333 | 34 }; |
| 35 | |
| 8986 | 36 struct plugin_actions_menu { |
| 37 char *label; | |
| 38 void (*callback)(GaimPlugin *); | |
| 39 GaimPlugin *plugin; | |
| 40 }; | |
| 41 | |
|
2170
c24595d3c364
[gaim-migrate @ 2180]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2154
diff
changeset
|
42 struct proto_buddy_menu { |
|
c24595d3c364
[gaim-migrate @ 2180]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2154
diff
changeset
|
43 char *label; |
|
5563
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5469
diff
changeset
|
44 void (*callback)(GaimConnection *, const char *); |
|
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5469
diff
changeset
|
45 GaimConnection *gc; |
|
2170
c24595d3c364
[gaim-migrate @ 2180]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2154
diff
changeset
|
46 }; |
|
c24595d3c364
[gaim-migrate @ 2180]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2154
diff
changeset
|
47 |
| 8586 | 48 struct proto_chat_menu { |
| 49 char *label; | |
| 50 void (*callback)(GaimConnection *, GHashTable *); | |
| 51 GaimConnection *gc; | |
| 52 }; | |
| 53 | |
| 8952 | 54 struct proto_group_menu { |
| 55 char *label; | |
| 56 void (*callback)(GaimGroup *); | |
| 57 }; | |
| 58 | |
|
2204
5014b802eb41
[gaim-migrate @ 2214]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2197
diff
changeset
|
59 struct proto_chat_entry { |
|
5014b802eb41
[gaim-migrate @ 2214]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2197
diff
changeset
|
60 char *label; |
| 5234 | 61 char *identifier; |
|
2205
cff4fbe01c7b
[gaim-migrate @ 2215]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2204
diff
changeset
|
62 char *def; |
|
2204
5014b802eb41
[gaim-migrate @ 2214]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2197
diff
changeset
|
63 gboolean is_int; |
|
5014b802eb41
[gaim-migrate @ 2214]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2197
diff
changeset
|
64 int min; |
|
5014b802eb41
[gaim-migrate @ 2214]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2197
diff
changeset
|
65 int max; |
| 5925 | 66 gboolean secret; |
|
2204
5014b802eb41
[gaim-migrate @ 2214]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2197
diff
changeset
|
67 }; |
|
5014b802eb41
[gaim-migrate @ 2214]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2197
diff
changeset
|
68 |
|
2417
5473c8c5378d
[gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2402
diff
changeset
|
69 #endif /* _MULTI_H_ */ |
|
5910
211760926728
[gaim-migrate @ 6342]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
70 |
|
211760926728
[gaim-migrate @ 6342]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
71 /* A big line. */ |
|
211760926728
[gaim-migrate @ 6342]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
72 /* -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */ |
