changeset 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 e5661daa66ea
children fc09679bffbe
files src/buddy.c
diffstat 1 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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, "<Branch>" },
 	{ N_("/Buddies/New _Instant Message..."), "<CTL>I", show_im_dialog, 0, "<StockItem>", GAIM_STOCK_IM },
 	{ N_("/Buddies/Join a _Chat..."), "<CTL>C", join_chat, 0, "<StockItem>", GAIM_STOCK_CHAT },
-	{ N_("/Buddies/Get _User Info..."), "<CTL>J", show_info_dialog, 0, "<StockItem>", GAIM_STOCK_INFO },
+	{ N_("/Buddies/Get _User Info..."), "<CTL>J", show_info_dialog_from_menu, 0, "<StockItem>", GAIM_STOCK_INFO },
 	{ "/Buddies/sep1", NULL, NULL, 0, "<Separator>" },
 	{ N_("/Buddies/_Show Offline Buddies"), NULL, gaim_gtk_blist_edit_mode_cb, 1, "<CheckItem>"},
 	{ N_("/Buddies/Show _Empty Groups"), NULL, gaim_gtk_blist_show_empty_groups_cb, 1, "<CheckItem>"},