comparison src/buddy.c @ 5144:eb0de4f49d15

[gaim-migrate @ 5508] Bjoern Voigt writes: "If I select "/Buddies/Get _User Info..." from main menu, gaim always shows the dialog show_info_dialog. The user must fill in the screenname and his protocol. This is ok, if no buddy in the tree is selected. But if the user selected a buddy, he probably expects no dialog, but the info dialog for the selected buddy. I have prepared a patch, which solves the problem. Please check the patch, because I don't know, if comply with the gaim's programming style." committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Wed, 16 Apr 2003 23:13:08 +0000
parents 94f11800cac5
children fc09679bffbe
comparison
equal deleted inserted replaced
5143:e5661daa66ea 5144:eb0de4f49d15
200 serv_get_info(((struct buddy*)node)->account->gc, ((struct buddy*)node)->name); 200 serv_get_info(((struct buddy*)node)->account->gc, ((struct buddy*)node)->name);
201 return; 201 return;
202 } 202 }
203 } 203 }
204 show_info_dialog(); 204 show_info_dialog();
205 }
206
207 /*------------------------------------------------------------------------*/
208 /* The dialog for getting buddy info from main menu */
209 /*------------------------------------------------------------------------*/
210
211 void show_info_dialog_from_menu()
212 {
213 GtkTreeView *tv = GTK_TREE_VIEW(gtkblist->treeview);
214
215 gtk_blist_button_info_cb(NULL, tv);
205 } 216 }
206 217
207 static void gtk_blist_button_chat_cb(GtkWidget *w, gpointer data) 218 static void gtk_blist_button_chat_cb(GtkWidget *w, gpointer data)
208 { 219 {
209 /* FIXME: someday, we can check to see if we've selected a chat node */ 220 /* FIXME: someday, we can check to see if we've selected a chat node */
674 { 685 {
675 /* Buddies menu */ 686 /* Buddies menu */
676 { N_("/_Buddies"), NULL, NULL, 0, "<Branch>" }, 687 { N_("/_Buddies"), NULL, NULL, 0, "<Branch>" },
677 { N_("/Buddies/New _Instant Message..."), "<CTL>I", show_im_dialog, 0, "<StockItem>", GAIM_STOCK_IM }, 688 { N_("/Buddies/New _Instant Message..."), "<CTL>I", show_im_dialog, 0, "<StockItem>", GAIM_STOCK_IM },
678 { N_("/Buddies/Join a _Chat..."), "<CTL>C", join_chat, 0, "<StockItem>", GAIM_STOCK_CHAT }, 689 { N_("/Buddies/Join a _Chat..."), "<CTL>C", join_chat, 0, "<StockItem>", GAIM_STOCK_CHAT },
679 { N_("/Buddies/Get _User Info..."), "<CTL>J", show_info_dialog, 0, "<StockItem>", GAIM_STOCK_INFO }, 690 { N_("/Buddies/Get _User Info..."), "<CTL>J", show_info_dialog_from_menu, 0, "<StockItem>", GAIM_STOCK_INFO },
680 { "/Buddies/sep1", NULL, NULL, 0, "<Separator>" }, 691 { "/Buddies/sep1", NULL, NULL, 0, "<Separator>" },
681 { N_("/Buddies/_Show Offline Buddies"), NULL, gaim_gtk_blist_edit_mode_cb, 1, "<CheckItem>"}, 692 { N_("/Buddies/_Show Offline Buddies"), NULL, gaim_gtk_blist_edit_mode_cb, 1, "<CheckItem>"},
682 { N_("/Buddies/Show _Empty Groups"), NULL, gaim_gtk_blist_show_empty_groups_cb, 1, "<CheckItem>"}, 693 { N_("/Buddies/Show _Empty Groups"), NULL, gaim_gtk_blist_show_empty_groups_cb, 1, "<CheckItem>"},
683 { N_("/Buddies/_Add a Buddy..."), NULL, gaim_gtk_blist_add_buddy_cb, 0, "<StockItem>", GTK_STOCK_ADD }, 694 { N_("/Buddies/_Add a Buddy..."), NULL, gaim_gtk_blist_add_buddy_cb, 0, "<StockItem>", GTK_STOCK_ADD },
684 { N_("/Buddies/Add a _Group..."), NULL, show_add_group, 0, NULL}, 695 { N_("/Buddies/Add a _Group..."), NULL, show_add_group, 0, NULL},