comparison 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
comparison
equal deleted inserted replaced
9050:f5fd42679095 9051:826013efffcb
197 197
198 g_list_free(contacts); 198 g_list_free(contacts);
199 } 199 }
200 200
201 static void 201 static void
202 menu_item_activate_cb(GtkWidget *item, GaimBuddy *buddy) 202 menu_item_activate_cb(GaimBlistNode *node)
203 { 203 {
204 GaimBuddy *buddy = (GaimBuddy *)node;
204 gevo_associate_buddy_dialog_new(buddy); 205 gevo_associate_buddy_dialog_new(buddy);
205 } 206 }
206 207
207 static void 208 static void
208 drawing_menu_cb(GtkWidget *menu, GaimBuddy *buddy) 209 blist_node_extended_menu_cb(GaimBlistNode *node, GList **menu)
209 { 210 {
211 GaimBlistNodeAction *act;
212 GaimBuddy *buddy;
210 GtkWidget *item; 213 GtkWidget *item;
211 214
215 if (!GAIM_BLIST_NODE_IS_BUDDY(node))
216 return;
217
218 buddy = (GaimBuddy *)node;
219
212 if (gevo_prpl_is_supported(buddy->account, buddy)) 220 if (gevo_prpl_is_supported(buddy->account, buddy))
213 { 221 {
214 item = gtk_menu_item_new_with_label(_("Add to Address Book")); 222 act = gaim_blist_node_action_new(_("Add to Address Book"),
215 gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); 223 menu_item_activate_cb, NULL);
216 224 *menu = g_list_append(*menu, act);
217 g_signal_connect(G_OBJECT(item), "activate",
218 G_CALLBACK(menu_item_activate_cb), buddy);
219 } 225 }
220 } 226 }
221 227
222 static gboolean 228 static gboolean
223 load_timeout(gpointer data) 229 load_timeout(gpointer data)
235 book_view_tag = e_book_async_get_book_view(book, query, NULL, -1, 241 book_view_tag = e_book_async_get_book_view(book, query, NULL, -1,
236 got_book_view_cb, NULL); 242 got_book_view_cb, NULL);
237 243
238 e_book_query_unref(query); 244 e_book_query_unref(query);
239 245
240 gaim_signal_connect(GAIM_GTK_BLIST(gaim_get_blist()), "drawing-menu", 246 gaim_signal_connect(gaim_blist_get_handle(), "blist-node-extended-menu",
241 plugin, GAIM_CALLBACK(drawing_menu_cb), NULL); 247 plugin, GAIM_CALLBACK(blist_node_extended_menu_cb), NULL);
242 248
243 return FALSE; 249 return FALSE;
244 } 250 }
245 251
246 static gboolean 252 static gboolean