comparison src/protocols/yahoo/yahoo.c @ 10662:54ac161a876e

[gaim-migrate @ 12199] Plugins can now add submenus to the right-click menu of a blist node by passing a GList of actions to gaim_blist_node_action_new. I'm thinking about making GaimBlistNodeActions more like plugin prefs so that plugins can create radio and check menu items as well. We'll see if I can do that and not make it ugly/suck. committer: Tailor Script <tailor@pidgin.im>
author Etan Reisner <pidgin@unreliablesource.net>
date Mon, 07 Mar 2005 02:19:09 +0000
parents 6895c4212362
children 72a5babfa8b4
comparison
equal deleted inserted replaced
10661:f02873d475dc 10662:54ac161a876e
2597 2597
2598 f = yahoo_friend_find(gc, buddy->name); 2598 f = yahoo_friend_find(gc, buddy->name);
2599 2599
2600 if (!f && !yd->wm) { 2600 if (!f && !yd->wm) {
2601 act = gaim_blist_node_action_new(_("Add Buddy"), 2601 act = gaim_blist_node_action_new(_("Add Buddy"),
2602 yahoo_addbuddyfrommenu_cb, NULL); 2602 yahoo_addbuddyfrommenu_cb, NULL, NULL);
2603 m = g_list_append(m, act); 2603 m = g_list_append(m, act);
2604 2604
2605 return m; 2605 return m;
2606 2606
2607 } else if (f->status == YAHOO_STATUS_OFFLINE) { 2607 } else if (f->status == YAHOO_STATUS_OFFLINE) {
2608 return NULL; 2608 return NULL;
2609 } 2609 }
2610 2610
2611 if (!yd->wm) { 2611 if (!yd->wm) {
2612 act = gaim_blist_node_action_new(_("Join in Chat"), 2612 act = gaim_blist_node_action_new(_("Join in Chat"),
2613 yahoo_chat_goto_menu, NULL); 2613 yahoo_chat_goto_menu, NULL, NULL);
2614 m = g_list_append(m, act); 2614 m = g_list_append(m, act);
2615 } 2615 }
2616 2616
2617 act = gaim_blist_node_action_new(_("Initiate Conference"), 2617 act = gaim_blist_node_action_new(_("Initiate Conference"),
2618 yahoo_initiate_conference, NULL); 2618 yahoo_initiate_conference, NULL, NULL);
2619 m = g_list_append(m, act); 2619 m = g_list_append(m, act);
2620 2620
2621 if (yahoo_friend_get_game(f)) { 2621 if (yahoo_friend_get_game(f)) {
2622 const char *game = yahoo_friend_get_game(f); 2622 const char *game = yahoo_friend_get_game(f);
2623 char *room; 2623 char *room;
2631 while (*t != '\n') 2631 while (*t != '\n')
2632 t++; /* replace the \n with a space */ 2632 t++; /* replace the \n with a space */
2633 *t = ' '; 2633 *t = ' ';
2634 g_snprintf(buf2, sizeof buf2, "%s", room); 2634 g_snprintf(buf2, sizeof buf2, "%s", room);
2635 2635
2636 act = gaim_blist_node_action_new(buf2, yahoo_game, NULL); 2636 act = gaim_blist_node_action_new(buf2, yahoo_game, NULL, NULL);
2637 m = g_list_append(m, act); 2637 m = g_list_append(m, act);
2638 } 2638 }
2639 2639
2640 return m; 2640 return m;
2641 } 2641 }