Mercurial > pidgin.yaz
comparison src/gtkconv.c @ 8256:1d86096ae0f4
[gaim-migrate @ 8979]
Tim Ringenbach says this shouldn't have gotten into 0.76, because 0.76
should have been release two weeks ago. He also doesn't have a good
description, so I'll just say it fixed a bunch of idiot mistakes and ugly
hacks on my part regarding the removing of users from the chat lists and
parting chats/channels. Thanks Tim.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sat, 14 Feb 2004 21:07:29 +0000 |
parents | 0c5977fd3101 |
children | 84ec38c3efcc |
comparison
equal
deleted
inserted
replaced
8255:4de49af535b3 | 8256:1d86096ae0f4 |
---|---|
2464 | 2464 |
2465 /* | 2465 /* |
2466 * Handle graying stuff out based on whether an account is connected | 2466 * Handle graying stuff out based on whether an account is connected |
2467 * and what features that account supports. | 2467 * and what features that account supports. |
2468 */ | 2468 */ |
2469 if (gc != NULL) { | 2469 if ((gc != NULL) && |
2470 ( (gaim_conversation_get_type(conv) != GAIM_CONV_CHAT) || | |
2471 !gaim_conv_chat_has_left(GAIM_CONV_CHAT(conv)) )) { | |
2470 /* Account is online */ | 2472 /* Account is online */ |
2471 | 2473 |
2472 /* Deal with buttons */ | 2474 /* Deal with buttons */ |
2473 gtk_widget_set_sensitive(gtkconv->add, TRUE); | 2475 gtk_widget_set_sensitive(gtkconv->add, TRUE); |
2474 gtk_widget_set_sensitive(gtkconv->remove, TRUE); | 2476 gtk_widget_set_sensitive(gtkconv->remove, TRUE); |
2521 gtk_widget_set_sensitive(gtkwin->menu.insert_link, TRUE); | 2523 gtk_widget_set_sensitive(gtkwin->menu.insert_link, TRUE); |
2522 gtk_widget_set_sensitive(gtkwin->menu.insert_image, | 2524 gtk_widget_set_sensitive(gtkwin->menu.insert_image, |
2523 (prpl_info->options & OPT_PROTO_IM_IMAGE)); | 2525 (prpl_info->options & OPT_PROTO_IM_IMAGE)); |
2524 } else { | 2526 } else { |
2525 /* Account is offline */ | 2527 /* Account is offline */ |
2528 /* Or it's a chat where we left. */ | |
2526 | 2529 |
2527 /* Deal with buttons */ | 2530 /* Deal with buttons */ |
2528 gtk_widget_set_sensitive(gtkconv->add, FALSE); | 2531 gtk_widget_set_sensitive(gtkconv->add, FALSE); |
2529 gtk_widget_set_sensitive(gtkconv->remove, FALSE); | 2532 gtk_widget_set_sensitive(gtkconv->remove, FALSE); |
2530 gtk_widget_set_sensitive(gtkconv->info, FALSE); | 2533 gtk_widget_set_sensitive(gtkconv->info, FALSE); |
5243 GtkTreeModel *model; | 5246 GtkTreeModel *model; |
5244 GList *names = NULL; | 5247 GList *names = NULL; |
5245 GList *l; | 5248 GList *l; |
5246 char tmp[BUF_LONG]; | 5249 char tmp[BUF_LONG]; |
5247 int num_users; | 5250 int num_users; |
5248 int f = 1; | 5251 gboolean f; |
5249 | 5252 |
5250 chat = GAIM_CONV_CHAT(conv); | 5253 chat = GAIM_CONV_CHAT(conv); |
5251 gtkconv = GAIM_GTK_CONVERSATION(conv); | 5254 gtkconv = GAIM_GTK_CONVERSATION(conv); |
5252 gtkchat = gtkconv->u.chat; | 5255 gtkchat = gtkconv->u.chat; |
5253 | 5256 |
5266 | 5269 |
5267 if (!gtk_tree_model_get_iter_first(GTK_TREE_MODEL(model), | 5270 if (!gtk_tree_model_get_iter_first(GTK_TREE_MODEL(model), |
5268 &iter)) | 5271 &iter)) |
5269 break; | 5272 break; |
5270 | 5273 |
5271 while (f != 0) { | 5274 do { |
5272 char *val; | 5275 char *val; |
5273 | 5276 |
5274 gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, | 5277 gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, |
5275 1, &val, -1); | 5278 1, &val, -1); |
5276 | 5279 |
5278 gtk_list_store_remove(GTK_LIST_STORE(model), &iter); | 5281 gtk_list_store_remove(GTK_LIST_STORE(model), &iter); |
5279 | 5282 |
5280 f = gtk_tree_model_iter_next(GTK_TREE_MODEL(model), &iter); | 5283 f = gtk_tree_model_iter_next(GTK_TREE_MODEL(model), &iter); |
5281 | 5284 |
5282 g_free(val); | 5285 g_free(val); |
5283 } | 5286 } while (f); |
5284 | 5287 |
5285 break; | 5288 break; |
5286 } | 5289 } |
5287 } | 5290 } |
5288 } | 5291 } |
5408 else if (type == GAIM_CONV_UPDATE_AWAY) | 5411 else if (type == GAIM_CONV_UPDATE_AWAY) |
5409 { | 5412 { |
5410 if (gaim_prefs_get_bool("/gaim/gtk/conversations/icons_on_tabs")) | 5413 if (gaim_prefs_get_bool("/gaim/gtk/conversations/icons_on_tabs")) |
5411 update_tab_icon(conv); | 5414 update_tab_icon(conv); |
5412 } | 5415 } |
5413 else if (type == GAIM_CONV_UPDATE_ADD || type == GAIM_CONV_UPDATE_REMOVE) | 5416 else if (type == GAIM_CONV_UPDATE_ADD || type == GAIM_CONV_UPDATE_REMOVE || |
5417 type == GAIM_CONV_UPDATE_CHATLEFT) | |
5414 { | 5418 { |
5415 gray_stuff_out(conv); | 5419 gray_stuff_out(conv); |
5416 } | 5420 } |
5417 else if (type == GAIM_CONV_UPDATE_ICON) | 5421 else if (type == GAIM_CONV_UPDATE_ICON) |
5418 { | 5422 { |