# HG changeset patch # User Luke Schierer # Date 1050534788 0 # Node ID eb0de4f49d1567948f4b36d889a9c88eba18db73 # Parent e5661daa66ea2fc6744861d6d09736d22113f239 [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 diff -r e5661daa66ea -r eb0de4f49d15 src/buddy.c --- a/src/buddy.c Wed Apr 16 23:11:42 2003 +0000 +++ b/src/buddy.c Wed Apr 16 23:13:08 2003 +0000 @@ -204,6 +204,17 @@ show_info_dialog(); } +/*------------------------------------------------------------------------*/ +/* The dialog for getting buddy info from main menu */ +/*------------------------------------------------------------------------*/ + +void show_info_dialog_from_menu() +{ + GtkTreeView *tv = GTK_TREE_VIEW(gtkblist->treeview); + + gtk_blist_button_info_cb(NULL, tv); +} + static void gtk_blist_button_chat_cb(GtkWidget *w, gpointer data) { /* FIXME: someday, we can check to see if we've selected a chat node */ @@ -676,7 +687,7 @@ { N_("/_Buddies"), NULL, NULL, 0, "" }, { N_("/Buddies/New _Instant Message..."), "I", show_im_dialog, 0, "", GAIM_STOCK_IM }, { N_("/Buddies/Join a _Chat..."), "C", join_chat, 0, "", GAIM_STOCK_CHAT }, - { N_("/Buddies/Get _User Info..."), "J", show_info_dialog, 0, "", GAIM_STOCK_INFO }, + { N_("/Buddies/Get _User Info..."), "J", show_info_dialog_from_menu, 0, "", GAIM_STOCK_INFO }, { "/Buddies/sep1", NULL, NULL, 0, "" }, { N_("/Buddies/_Show Offline Buddies"), NULL, gaim_gtk_blist_edit_mode_cb, 1, ""}, { N_("/Buddies/Show _Empty Groups"), NULL, gaim_gtk_blist_show_empty_groups_cb, 1, ""},