comparison src/dialogs.c @ 3082:71c88f2343a6

[gaim-migrate @ 3096] Protocol name in the buddy pounce dialog. Thanks, Jay Guerette. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Tue, 19 Mar 2002 07:15:43 +0000
parents 955f52bbcf8a
children 8b0d58f74d3f
comparison
equal deleted inserted replaced
3081:eb364675bbe4 3082:71c88f2343a6
1160 GtkWidget *optmenu; 1160 GtkWidget *optmenu;
1161 GtkWidget *menu; 1161 GtkWidget *menu;
1162 GtkWidget *opt; 1162 GtkWidget *opt;
1163 GSList *u = aim_users; 1163 GSList *u = aim_users;
1164 struct aim_user *a; 1164 struct aim_user *a;
1165 struct prpl *p;
1165 int count = 0; 1166 int count = 0;
1166 int place = 0; 1167 int place = 0;
1168 char buf[2048];
1167 1169
1168 optmenu = gtk_option_menu_new(); 1170 optmenu = gtk_option_menu_new();
1169 1171
1170 menu = gtk_menu_new(); 1172 menu = gtk_menu_new();
1171 1173
1172 while (u) { 1174 while (u) {
1173 a = (struct aim_user *)u->data; 1175 a = (struct aim_user *)u->data;
1174 opt = gtk_menu_item_new_with_label(a->username); 1176 p = (struct prpl *)find_prpl(a->protocol);
1177 g_snprintf(buf, sizeof buf, "%s (%s)", a->username, (p && p->name)?p->name():"Unknown");
1178 opt = gtk_menu_item_new_with_label(buf);
1175 gtk_object_set_user_data(GTK_OBJECT(opt), a); 1179 gtk_object_set_user_data(GTK_OBJECT(opt), a);
1176 gtk_signal_connect(GTK_OBJECT(opt), "activate", GTK_SIGNAL_FUNC(pounce_choose), b); 1180 gtk_signal_connect(GTK_OBJECT(opt), "activate", GTK_SIGNAL_FUNC(pounce_choose), b);
1177 gtk_menu_append(GTK_MENU(menu), opt); 1181 gtk_menu_append(GTK_MENU(menu), opt);
1178 gtk_widget_show(opt); 1182 gtk_widget_show(opt);
1179 1183