Mercurial > pidgin.yaz
comparison src/buddy_chat.c @ 5563:9eb5b13fd412
[gaim-migrate @ 5965]
Just a taste of what's coming.
Standard "This won't compile" thing. Plugin authors, you're going to hate
me, but that's okay, because I have friends too!
It's really late. My brain resembles that of fish swimming in jello pudding
with neon lights flying around chanting musicals. I'm not on drugs. I'm
just that tired.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Fri, 30 May 2003 09:38:29 +0000 |
parents | 2c4c975620f0 |
children | 1d140b31d4b3 |
comparison
equal
deleted
inserted
replaced
5562:3c8d34574601 | 5563:9eb5b13fd412 |
---|---|
39 #endif | 39 #endif |
40 | 40 |
41 static GList *chatentries = NULL; | 41 static GList *chatentries = NULL; |
42 static GtkWidget *joinchat = NULL; | 42 static GtkWidget *joinchat = NULL; |
43 static GtkWidget *jc_vbox = NULL; | 43 static GtkWidget *jc_vbox = NULL; |
44 static struct gaim_connection *joinchatgc; | 44 static GaimConnection *joinchatgc; |
45 | 45 |
46 static void | 46 static void |
47 do_join_chat() | 47 do_join_chat() |
48 { | 48 { |
49 if (joinchat) { | 49 if (joinchat) { |
155 | 155 |
156 g_list_free(list); | 156 g_list_free(list); |
157 } | 157 } |
158 | 158 |
159 static void | 159 static void |
160 joinchat_choose(GtkWidget *w, struct gaim_connection *g) | 160 joinchat_choose(GtkWidget *w, GaimConnection *g) |
161 { | 161 { |
162 if (joinchatgc == g) | 162 if (joinchatgc == g) |
163 return; | 163 return; |
164 | 164 |
165 if(joinchatgc->account->protocol == g->account->protocol) { | 165 if(joinchatgc->account->protocol == g->account->protocol) { |
171 } | 171 } |
172 | 172 |
173 static void | 173 static void |
174 create_joinchat_menu(GtkWidget *box) | 174 create_joinchat_menu(GtkWidget *box) |
175 { | 175 { |
176 GaimAccount *account; | |
176 GtkWidget *optmenu; | 177 GtkWidget *optmenu; |
177 GtkWidget *menu; | 178 GtkWidget *menu; |
178 GtkWidget *opt; | 179 GtkWidget *opt; |
179 GSList *c; | 180 GList *c; |
180 struct gaim_connection *g; | 181 GaimConnection *g; |
181 char buf[2048]; | 182 char buf[2048]; |
182 | 183 |
183 optmenu = gtk_option_menu_new(); | 184 optmenu = gtk_option_menu_new(); |
184 gtk_box_pack_start(GTK_BOX(box), optmenu, FALSE, FALSE, 0); | 185 gtk_box_pack_start(GTK_BOX(box), optmenu, FALSE, FALSE, 0); |
185 | 186 |
186 menu = gtk_menu_new(); | 187 menu = gtk_menu_new(); |
187 joinchatgc = NULL; | 188 joinchatgc = NULL; |
188 | 189 |
189 for (c = connections; c != NULL; c = c->next) { | 190 for (c = gaim_connections_get_all(); c != NULL; c = c->next) { |
190 g = (struct gaim_connection *)c->data; | 191 g = (GaimConnection *)c->data; |
191 | 192 |
192 if (!GAIM_PLUGIN_PROTOCOL_INFO(g->prpl)->join_chat) | 193 if (!GAIM_PLUGIN_PROTOCOL_INFO(g->prpl)->join_chat) |
193 continue; | 194 continue; |
194 | 195 |
195 if (!joinchatgc) | 196 if (!joinchatgc) |
196 joinchatgc = g; | 197 joinchatgc = g; |
197 | 198 |
199 account = gaim_connection_get_account(g); | |
200 | |
198 g_snprintf(buf, sizeof(buf), "%s (%s)", | 201 g_snprintf(buf, sizeof(buf), "%s (%s)", |
199 g->username, g->prpl->info->name); | 202 gaim_account_get_username(account), g->prpl->info->name); |
200 opt = gtk_menu_item_new_with_label(buf); | 203 opt = gtk_menu_item_new_with_label(buf); |
201 | 204 |
202 g_object_set_data(G_OBJECT(opt), "gaim_connection", g); | 205 g_object_set_data(G_OBJECT(opt), "gaim_connection", g); |
203 | 206 |
204 g_signal_connect(G_OBJECT(opt), "activate", | 207 g_signal_connect(G_OBJECT(opt), "activate", |
231 GtkWidget *bbox; | 234 GtkWidget *bbox; |
232 GtkWidget *join; | 235 GtkWidget *join; |
233 GtkWidget *cancel; | 236 GtkWidget *cancel; |
234 GtkWidget *label; | 237 GtkWidget *label; |
235 GtkWidget *sep; | 238 GtkWidget *sep; |
236 GSList *c; | 239 GList *c; |
237 struct gaim_connection *gc = NULL; | 240 GaimConnection *gc = NULL; |
238 | 241 |
239 for (c = connections; c != NULL; c = c->next) { | 242 for (c = gaim_connections_get_all(); c != NULL; c = c->next) { |
240 gc = c->data; | 243 gc = c->data; |
241 | 244 |
242 if (GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl)->join_chat) | 245 if (GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl)->join_chat) |
243 break; | 246 break; |
244 | 247 |