Mercurial > pidgin
diff plugins/gevolution/gevolution.c @ 9051:826013efffcb
[gaim-migrate @ 9827]
" - Makes (gaim_gtk_)append_blist_node_extended_menu and
(gaim_gtk_)append_blist_node_proto_menu public so that
plugins can use them to duplicate the right-click menus
(Guifications needs this for right-clicking on the
notification)
- Adds extended menu support for Contacts
- Removes the "drawing-menu" signal (It was UI
specific, and no-one except the gevolution plugin used it)
- Updates the gevolution plugin to use the new
blist-node-extended-menu signal (I can't compile the
gevolution plugin here, so my changes should be checked
by someone who can :) )
- Updates the blist signals documentation with the new
blist-node-extended-menu signal
- Updates the signals-test.c plugin to handle
blist-node-extended-menu, wrote/writing-im/chat-msg and
fixes displayed-im/chat-msg handling" --Stu Tomlinson
this moves a string but doesn't change it.
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Mon, 24 May 2004 15:17:49 +0000 |
parents | 294ae6548d4e |
children | a243d688c93c |
line wrap: on
line diff
--- a/plugins/gevolution/gevolution.c Mon May 24 15:15:09 2004 +0000 +++ b/plugins/gevolution/gevolution.c Mon May 24 15:17:49 2004 +0000 @@ -199,23 +199,29 @@ } static void -menu_item_activate_cb(GtkWidget *item, GaimBuddy *buddy) +menu_item_activate_cb(GaimBlistNode *node) { + GaimBuddy *buddy = (GaimBuddy *)node; gevo_associate_buddy_dialog_new(buddy); } static void -drawing_menu_cb(GtkWidget *menu, GaimBuddy *buddy) +blist_node_extended_menu_cb(GaimBlistNode *node, GList **menu) { + GaimBlistNodeAction *act; + GaimBuddy *buddy; GtkWidget *item; + if (!GAIM_BLIST_NODE_IS_BUDDY(node)) + return; + + buddy = (GaimBuddy *)node; + if (gevo_prpl_is_supported(buddy->account, buddy)) { - item = gtk_menu_item_new_with_label(_("Add to Address Book")); - gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); - - g_signal_connect(G_OBJECT(item), "activate", - G_CALLBACK(menu_item_activate_cb), buddy); + act = gaim_blist_node_action_new(_("Add to Address Book"), + menu_item_activate_cb, NULL); + *menu = g_list_append(*menu, act); } } @@ -237,8 +243,8 @@ e_book_query_unref(query); - gaim_signal_connect(GAIM_GTK_BLIST(gaim_get_blist()), "drawing-menu", - plugin, GAIM_CALLBACK(drawing_menu_cb), NULL); + gaim_signal_connect(gaim_blist_get_handle(), "blist-node-extended-menu", + plugin, GAIM_CALLBACK(blist_node_extended_menu_cb), NULL); return FALSE; }