Mercurial > pidgin
comparison plugins/gevolution/gevolution.c @ 12919:248b8b39c671
[gaim-migrate @ 15272]
Replace GaimBlistNodeAction with the more generic GaimMenuAction, this is in
preparation for letting the chat room user list have extensible menus like the
blist entries do. (I know it's not exactly the prettiest, and the callback
isn't exactly type-safe, when we eventually gobjectify everything we can get
some safety back by using (GObject, gpointer) but that's for later.)
I'm planning to look into merging GaimPluginActions into GaimMenuActions as
well.
committer: Tailor Script <tailor@pidgin.im>
| author | Etan Reisner <pidgin@unreliablesource.net> |
|---|---|
| date | Tue, 17 Jan 2006 23:22:19 +0000 |
| parents | f23ebb7b2dfd |
| children | 0aa231ebbfd5 |
comparison
equal
deleted
inserted
replaced
| 12918:a05fbd9dcc31 | 12919:248b8b39c671 |
|---|---|
| 271 } | 271 } |
| 272 | 272 |
| 273 static void | 273 static void |
| 274 blist_node_extended_menu_cb(GaimBlistNode *node, GList **menu) | 274 blist_node_extended_menu_cb(GaimBlistNode *node, GList **menu) |
| 275 { | 275 { |
| 276 GaimBlistNodeAction *act; | 276 GaimMenuAction *act; |
| 277 GaimBuddy *buddy; | 277 GaimBuddy *buddy; |
| 278 | 278 |
| 279 if (!GAIM_BLIST_NODE_IS_BUDDY(node)) | 279 if (!GAIM_BLIST_NODE_IS_BUDDY(node)) |
| 280 return; | 280 return; |
| 281 | 281 |
| 282 buddy = (GaimBuddy *)node; | 282 buddy = (GaimBuddy *)node; |
| 283 | 283 |
| 284 if (gevo_prpl_is_supported(buddy->account, buddy)) | 284 if (gevo_prpl_is_supported(buddy->account, buddy)) |
| 285 { | 285 { |
| 286 act = gaim_blist_node_action_new(_("Add to Address Book"), | 286 act = gaim_menu_action_new(_("Add to Address Book"), |
| 287 menu_item_activate_cb, | 287 GAIM_CALLBACK(menu_item_activate_cb), |
| 288 NULL, NULL); | 288 NULL, NULL); |
| 289 *menu = g_list_append(*menu, act); | 289 *menu = g_list_append(*menu, act); |
| 290 act = gaim_blist_node_action_new(_("Send E-Mail"), | 290 act = gaim_menu_action_new(_("Send E-Mail"), |
| 291 menu_item_send_mail_activate_cb, | 291 GAIM_CALLBACK(menu_item_send_mail_activate_cb), |
| 292 NULL, NULL); | 292 NULL, NULL); |
| 293 *menu = g_list_append(*menu, act); | 293 *menu = g_list_append(*menu, act); |
| 294 } | 294 } |
| 295 } | 295 } |
| 296 | 296 |
| 297 /* TODO: Something in here leaks 1 reference to a bonobo object! */ | 297 /* TODO: Something in here leaks 1 reference to a bonobo object! */ |
