Mercurial > pidgin
comparison src/buddy_chat.c @ 1793:00c753b86710
[gaim-migrate @ 1803]
neat
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Wed, 02 May 2001 00:10:38 +0000 |
parents | d7cbedd1d651 |
children | c649b63382b7 |
comparison
equal
deleted
inserted
replaced
1792:de88617f542c | 1793:00c753b86710 |
---|---|
97 | 97 |
98 optmenu = gtk_option_menu_new(); | 98 optmenu = gtk_option_menu_new(); |
99 gtk_box_pack_start(GTK_BOX(box), optmenu, FALSE, FALSE, 0); | 99 gtk_box_pack_start(GTK_BOX(box), optmenu, FALSE, FALSE, 0); |
100 | 100 |
101 menu = gtk_menu_new(); | 101 menu = gtk_menu_new(); |
102 joinchatgc = NULL; | |
102 | 103 |
103 while (c) { | 104 while (c) { |
104 g = (struct gaim_connection *)c->data; | 105 g = (struct gaim_connection *)c->data; |
105 c = c->next; | 106 c = c->next; |
106 if (!g->prpl->join_chat) | 107 if (!g->prpl->join_chat) |
107 continue; | 108 continue; |
109 if (!joinchatgc) | |
110 joinchatgc = g; | |
108 g_snprintf(buf, sizeof buf, "%s (%s)", g->username, (*g->prpl->name)()); | 111 g_snprintf(buf, sizeof buf, "%s (%s)", g->username, (*g->prpl->name)()); |
109 opt = gtk_menu_item_new_with_label(buf); | 112 opt = gtk_menu_item_new_with_label(buf); |
110 gtk_object_set_user_data(GTK_OBJECT(opt), g); | 113 gtk_object_set_user_data(GTK_OBJECT(opt), g); |
111 gtk_signal_connect(GTK_OBJECT(opt), "activate", GTK_SIGNAL_FUNC(joinchat_choose), g); | 114 gtk_signal_connect(GTK_OBJECT(opt), "activate", GTK_SIGNAL_FUNC(joinchat_choose), g); |
112 gtk_menu_append(GTK_MENU(menu), opt); | 115 gtk_menu_append(GTK_MENU(menu), opt); |
113 gtk_widget_show(opt); | 116 gtk_widget_show(opt); |
114 } | 117 } |
115 | 118 |
116 gtk_option_menu_set_menu(GTK_OPTION_MENU(optmenu), menu); | 119 gtk_option_menu_set_menu(GTK_OPTION_MENU(optmenu), menu); |
117 gtk_option_menu_set_history(GTK_OPTION_MENU(optmenu), 0); | 120 gtk_option_menu_set_history(GTK_OPTION_MENU(optmenu), 0); |
118 | |
119 joinchatgc = connections->data; | |
120 } | 121 } |
121 | 122 |
122 | 123 |
123 void join_chat() | 124 void join_chat() |
124 { | 125 { |