comparison src/gtkconv.c @ 11338:17142948653e

[gaim-migrate @ 13551] Change the GAIM_CONV_IM and GAIM_CONV_CHAT enums to GAIM_CONV_TYPE_IM and GAIM_CONV_TYPE_CHAT. This touched A LOT of files. Also combined two oscar header files (one of them was small and dorky). committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 25 Aug 2005 02:33:44 +0000
parents 772d086e9067
children ef6e94bdda08
comparison
equal deleted inserted replaced
11337:1462b64f8fc9 11338:17142948653e
201 /* If there are unread messages then show a warning dialog */ 201 /* If there are unread messages then show a warning dialog */
202 for (l = gaim_conv_window_get_conversations(win); 202 for (l = gaim_conv_window_get_conversations(win);
203 l != NULL; l = l->next) 203 l != NULL; l = l->next)
204 { 204 {
205 GaimConversation *conv = l->data; 205 GaimConversation *conv = l->data;
206 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM && 206 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM &&
207 gaim_conversation_get_unseen(conv) == GAIM_UNSEEN_TEXT) 207 gaim_conversation_get_unseen(conv) == GAIM_UNSEEN_TEXT)
208 { 208 {
209 build_warn_close_dialog(win); 209 build_warn_close_dialog(win);
210 gtk_widget_show_all(warn_close_dialog); 210 gtk_widget_show_all(warn_close_dialog);
211 211
265 265
266 /* I find that I resize the window when it has a bunch of conversations in it, mostly so that the tab bar 266 /* I find that I resize the window when it has a bunch of conversations in it, mostly so that the tab bar
267 * will fit, but then I don't want new windows taking up the entire screen. I check to see if there is only one 267 * will fit, but then I don't want new windows taking up the entire screen. I check to see if there is only one
268 * conversation in the window. This way we'll be setting new windows to the size of the last resized new window. */ 268 * conversation in the window. This way we'll be setting new windows to the size of the last resized new window. */
269 269
270 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) 270 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM)
271 { 271 {
272 if (w == gtkconv->imhtml && (gaim_conv_window_get_conversation_count(win) == 1)) 272 if (w == gtkconv->imhtml && (gaim_conv_window_get_conversation_count(win) == 1))
273 { 273 {
274 gaim_prefs_set_int("/gaim/gtk/conversations/im/default_width", allocation->width); 274 gaim_prefs_set_int("/gaim/gtk/conversations/im/default_width", allocation->width);
275 gaim_prefs_set_int("/gaim/gtk/conversations/im/default_height", allocation->height); 275 gaim_prefs_set_int("/gaim/gtk/conversations/im/default_height", allocation->height);
276 } 276 }
277 if (w == gtkconv->entry) 277 if (w == gtkconv->entry)
278 gaim_prefs_set_int("/gaim/gtk/conversations/im/entry_height", allocation->height); 278 gaim_prefs_set_int("/gaim/gtk/conversations/im/entry_height", allocation->height);
279 } 279 }
280 else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) 280 else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT)
281 { 281 {
282 if (w == gtkconv->imhtml && (gaim_conv_window_get_conversation_count(win) == 1)) 282 if (w == gtkconv->imhtml && (gaim_conv_window_get_conversation_count(win) == 1))
283 { 283 {
284 gaim_prefs_set_int("/gaim/gtk/conversations/chat/default_width", allocation->width); 284 gaim_prefs_set_int("/gaim/gtk/conversations/chat/default_width", allocation->width);
285 gaim_prefs_set_int("/gaim/gtk/conversations/chat/default_height", allocation->height); 285 gaim_prefs_set_int("/gaim/gtk/conversations/chat/default_height", allocation->height);
378 378
379 static GaimCmdRet 379 static GaimCmdRet
380 say_command_cb(GaimConversation *conv, 380 say_command_cb(GaimConversation *conv,
381 const char *cmd, char **args, char **error, void *data) 381 const char *cmd, char **args, char **error, void *data)
382 { 382 {
383 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) 383 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM)
384 gaim_conv_im_send(GAIM_CONV_IM(conv), args[0]); 384 gaim_conv_im_send(GAIM_CONV_IM(conv), args[0]);
385 else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) 385 else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT)
386 gaim_conv_chat_send(GAIM_CONV_CHAT(conv), args[0]); 386 gaim_conv_chat_send(GAIM_CONV_CHAT(conv), args[0]);
387 387
388 return GAIM_CMD_RET_OK; 388 return GAIM_CMD_RET_OK;
389 } 389 }
390 390
394 { 394 {
395 char *tmp; 395 char *tmp;
396 396
397 tmp = g_strdup_printf("/me %s", args[0]); 397 tmp = g_strdup_printf("/me %s", args[0]);
398 398
399 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) 399 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM)
400 gaim_conv_im_send(GAIM_CONV_IM(conv), tmp); 400 gaim_conv_im_send(GAIM_CONV_IM(conv), tmp);
401 else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) 401 else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT)
402 gaim_conv_chat_send(GAIM_CONV_CHAT(conv), tmp); 402 gaim_conv_chat_send(GAIM_CONV_CHAT(conv), tmp);
403 403
404 g_free(tmp); 404 g_free(tmp);
405 return GAIM_CMD_RET_OK; 405 return GAIM_CMD_RET_OK;
406 } 406 }
550 GAIM_MESSAGE_NO_LOG, time(NULL)); 550 GAIM_MESSAGE_NO_LOG, time(NULL));
551 if(error) 551 if(error)
552 g_free(error); 552 g_free(error);
553 return TRUE; 553 return TRUE;
554 case GAIM_CMD_STATUS_WRONG_TYPE: 554 case GAIM_CMD_STATUS_WRONG_TYPE:
555 if(gaim_conversation_get_type(conv) == GAIM_CONV_IM) 555 if(gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM)
556 gaim_conversation_write(conv, "", _("That command only works in chats, not IMs."), 556 gaim_conversation_write(conv, "", _("That command only works in chats, not IMs."),
557 GAIM_MESSAGE_NO_LOG, time(NULL)); 557 GAIM_MESSAGE_NO_LOG, time(NULL));
558 else 558 else
559 gaim_conversation_write(conv, "", _("That command only works in IMs, not chats."), 559 gaim_conversation_write(conv, "", _("That command only works in IMs, not chats."),
560 GAIM_MESSAGE_NO_LOG, time(NULL)); 560 GAIM_MESSAGE_NO_LOG, time(NULL));
581 account = gaim_conversation_get_account(conv); 581 account = gaim_conversation_get_account(conv);
582 582
583 if (!gaim_account_is_connected(account)) 583 if (!gaim_account_is_connected(account))
584 return; 584 return;
585 585
586 if ((gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) && 586 if ((gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) &&
587 gaim_conv_chat_has_left(GAIM_CONV_CHAT(conv))) 587 gaim_conv_chat_has_left(GAIM_CONV_CHAT(conv)))
588 return; 588 return;
589 589
590 if (check_for_and_do_command(conv)) { 590 if (check_for_and_do_command(conv)) {
591 gtk_imhtml_clear(GTK_IMHTML(gtkconv->entry)); 591 gtk_imhtml_clear(GTK_IMHTML(gtkconv->entry));
608 int i; 608 int i;
609 609
610 bufs = gtk_imhtml_get_markup_lines(GTK_IMHTML(gtkconv->entry)); 610 bufs = gtk_imhtml_get_markup_lines(GTK_IMHTML(gtkconv->entry));
611 for (i = 0; bufs[i]; i++) { 611 for (i = 0; bufs[i]; i++) {
612 send_history_add(conv, bufs[i]); 612 send_history_add(conv, bufs[i]);
613 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) 613 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM)
614 gaim_conv_im_send(GAIM_CONV_IM(conv), bufs[i]); 614 gaim_conv_im_send(GAIM_CONV_IM(conv), bufs[i]);
615 else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) 615 else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT)
616 gaim_conv_chat_send(GAIM_CONV_CHAT(conv), bufs[i]); 616 gaim_conv_chat_send(GAIM_CONV_CHAT(conv), bufs[i]);
617 } 617 }
618 618
619 g_strfreev(bufs); 619 g_strfreev(bufs);
620 620
621 } else { 621 } else {
622 send_history_add(conv, buf); 622 send_history_add(conv, buf);
623 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) 623 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM)
624 gaim_conv_im_send(GAIM_CONV_IM(conv), buf); 624 gaim_conv_im_send(GAIM_CONV_IM(conv), buf);
625 else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) 625 else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT)
626 gaim_conv_chat_send(GAIM_CONV_CHAT(conv), buf); 626 gaim_conv_chat_send(GAIM_CONV_CHAT(conv), buf);
627 } 627 }
628 628
629 g_free(clean); 629 g_free(clean);
630 g_free(buf); 630 g_free(buf);
640 GaimConversation *conv = gtkconv->active_conv; 640 GaimConversation *conv = gtkconv->active_conv;
641 641
642 account = gaim_conversation_get_account(conv); 642 account = gaim_conversation_get_account(conv);
643 name = gaim_conversation_get_name(conv); 643 name = gaim_conversation_get_name(conv);
644 644
645 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) { 645 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) {
646 GaimBuddy *b; 646 GaimBuddy *b;
647 647
648 b = gaim_find_buddy(account, name); 648 b = gaim_find_buddy(account, name);
649 if (b != NULL) 649 if (b != NULL)
650 gaim_gtkdialogs_remove_buddy(b); 650 gaim_gtkdialogs_remove_buddy(b);
651 else if (account != NULL && gaim_account_is_connected(account)) 651 else if (account != NULL && gaim_account_is_connected(account))
652 gaim_blist_request_add_buddy(account, (char *)name, NULL, NULL); 652 gaim_blist_request_add_buddy(account, (char *)name, NULL, NULL);
653 } else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) { 653 } else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) {
654 GaimChat *c; 654 GaimChat *c;
655 655
656 c = gaim_blist_find_chat(account, name); 656 c = gaim_blist_find_chat(account, name);
657 if (c != NULL) 657 if (c != NULL)
658 gaim_gtkdialogs_remove_chat(c); 658 gaim_gtkdialogs_remove_chat(c);
690 static void 690 static void
691 info_cb(GtkWidget *widget, GaimGtkConversation *gtkconv) 691 info_cb(GtkWidget *widget, GaimGtkConversation *gtkconv)
692 { 692 {
693 GaimConversation *conv = gtkconv->active_conv; 693 GaimConversation *conv = gtkconv->active_conv;
694 694
695 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) { 695 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) {
696 serv_get_info(gaim_conversation_get_gc(conv), 696 serv_get_info(gaim_conversation_get_gc(conv),
697 gaim_conversation_get_name(conv)); 697 gaim_conversation_get_name(conv));
698 698
699 gtk_widget_grab_focus(gtkconv->entry); 699 gtk_widget_grab_focus(gtkconv->entry);
700 } else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) { 700 } else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) {
701 /* Get info of the person currently selected in the GtkTreeView */ 701 /* Get info of the person currently selected in the GtkTreeView */
702 GaimGtkChatPane *gtkchat; 702 GaimGtkChatPane *gtkchat;
703 GtkTreeIter iter; 703 GtkTreeIter iter;
704 GtkTreeModel *model; 704 GtkTreeModel *model;
705 GtkTreeSelection *sel; 705 GtkTreeSelection *sel;
1035 GaimAccount *account; 1035 GaimAccount *account;
1036 GSList *buddies, *cur; 1036 GSList *buddies, *cur;
1037 1037
1038 conv = gaim_conv_window_get_active_conversation(win); 1038 conv = gaim_conv_window_get_active_conversation(win);
1039 1039
1040 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) 1040 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM)
1041 type = GAIM_LOG_IM; 1041 type = GAIM_LOG_IM;
1042 else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) 1042 else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT)
1043 type = GAIM_LOG_CHAT; 1043 type = GAIM_LOG_CHAT;
1044 else 1044 else
1045 return; 1045 return;
1046 1046
1047 name = gaim_conversation_get_name(conv); 1047 name = gaim_conversation_get_name(conv);
1165 menu_send_file_cb(gpointer data, guint action, GtkWidget *widget) 1165 menu_send_file_cb(gpointer data, guint action, GtkWidget *widget)
1166 { 1166 {
1167 GaimConvWindow *win = (GaimConvWindow *)data; 1167 GaimConvWindow *win = (GaimConvWindow *)data;
1168 GaimConversation *conv = gaim_conv_window_get_active_conversation(win); 1168 GaimConversation *conv = gaim_conv_window_get_active_conversation(win);
1169 1169
1170 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) { 1170 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) {
1171 serv_send_file(gaim_conversation_get_gc(conv), gaim_conversation_get_name(conv), NULL); 1171 serv_send_file(gaim_conversation_get_gc(conv), gaim_conversation_get_name(conv), NULL);
1172 } 1172 }
1173 1173
1174 } 1174 }
1175 1175
1227 1227
1228 conv = gaim_conv_window_get_active_conversation(win); 1228 conv = gaim_conv_window_get_active_conversation(win);
1229 account = gaim_conversation_get_account(conv); 1229 account = gaim_conversation_get_account(conv);
1230 name = gaim_conversation_get_name(conv); 1230 name = gaim_conversation_get_name(conv);
1231 1231
1232 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) { 1232 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) {
1233 GaimBuddy *b; 1233 GaimBuddy *b;
1234 1234
1235 b = gaim_find_buddy(account, name); 1235 b = gaim_find_buddy(account, name);
1236 if (b != NULL) 1236 if (b != NULL)
1237 gaim_gtkdialogs_alias_buddy(b); 1237 gaim_gtkdialogs_alias_buddy(b);
1238 } else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) { 1238 } else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) {
1239 GaimChat *c; 1239 GaimChat *c;
1240 1240
1241 c = gaim_blist_find_chat(account, name); 1241 c = gaim_blist_find_chat(account, name);
1242 if (c != NULL) 1242 if (c != NULL)
1243 gaim_gtkdialogs_alias_chat(c); 1243 gaim_gtkdialogs_alias_chat(c);
2406 name = gaim_conversation_get_name(conv); 2406 name = gaim_conversation_get_name(conv);
2407 2407
2408 g_return_val_if_fail(account != NULL, NULL); 2408 g_return_val_if_fail(account != NULL, NULL);
2409 g_return_val_if_fail(name != NULL, NULL); 2409 g_return_val_if_fail(name != NULL, NULL);
2410 2410
2411 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) { 2411 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) {
2412 GaimBuddy *b = gaim_find_buddy(account, name); 2412 GaimBuddy *b = gaim_find_buddy(account, name);
2413 if (b != NULL) { 2413 if (b != NULL) {
2414 status = gaim_gtk_blist_get_status_icon((GaimBlistNode*)b, 2414 status = gaim_gtk_blist_get_status_icon((GaimBlistNode*)b,
2415 (small_icon ? GAIM_STATUS_ICON_SMALL : GAIM_STATUS_ICON_LARGE)); 2415 (small_icon ? GAIM_STATUS_ICON_SMALL : GAIM_STATUS_ICON_LARGE));
2416 } 2416 }
2456 2456
2457 if (status != NULL) 2457 if (status != NULL)
2458 g_object_unref(status); 2458 g_object_unref(status);
2459 2459
2460 if (gaim_conv_window_get_active_conversation(win) == conv && 2460 if (gaim_conv_window_get_active_conversation(win) == conv &&
2461 (gaim_conversation_get_type(conv) != GAIM_CONV_IM || 2461 (gaim_conversation_get_type(conv) != GAIM_CONV_TYPE_IM ||
2462 gtkconv->u.im->anim == NULL)) 2462 gtkconv->u.im->anim == NULL))
2463 { 2463 {
2464 status = get_tab_icon(conv, FALSE); 2464 status = get_tab_icon(conv, FALSE);
2465 2465
2466 gtk_window_set_icon(GTK_WINDOW(GAIM_GTK_WINDOW(win)->window), status); 2466 gtk_window_set_icon(GTK_WINDOW(GAIM_GTK_WINDOW(win)->window), status);
2706 conv = gaim_conv_window_get_active_conversation(win); 2706 conv = gaim_conv_window_get_active_conversation(win);
2707 2707
2708 if (!conv) 2708 if (!conv)
2709 return; 2709 return;
2710 2710
2711 g_return_if_fail(gaim_conversation_get_type(conv) == GAIM_CONV_IM); 2711 g_return_if_fail(gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM);
2712 2712
2713 gtkconv = GAIM_GTK_CONVERSATION(conv); 2713 gtkconv = GAIM_GTK_CONVERSATION(conv);
2714 2714
2715 active = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)); 2715 active = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget));
2716 gtkconv->u.im->show_icon = active; 2716 gtkconv->u.im->show_icon = active;
2760 * conversations. Stuff that Gaim chats support in general should be 2760 * conversations. Stuff that Gaim chats support in general should be
2761 * shown for chat conversations. It doesn't matter whether the PRPL 2761 * shown for chat conversations. It doesn't matter whether the PRPL
2762 * supports it or not--that only affects if the button or menu item 2762 * supports it or not--that only affects if the button or menu item
2763 * is sensitive or not. 2763 * is sensitive or not.
2764 */ 2764 */
2765 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) { 2765 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) {
2766 /* Show stuff that applies to IMs, hide stuff that applies to chats */ 2766 /* Show stuff that applies to IMs, hide stuff that applies to chats */
2767 2767
2768 /* Deal with menu items */ 2768 /* Deal with menu items */
2769 gtk_widget_show(gtkwin->menu.view_log); 2769 gtk_widget_show(gtkwin->menu.view_log);
2770 gtk_widget_show(gtkwin->menu.send_file); 2770 gtk_widget_show(gtkwin->menu.send_file);
2783 } 2783 }
2784 2784
2785 gtk_widget_show(gtkwin->menu.insert_link); 2785 gtk_widget_show(gtkwin->menu.insert_link);
2786 gtk_widget_show(gtkwin->menu.insert_image); 2786 gtk_widget_show(gtkwin->menu.insert_image);
2787 gtk_widget_show(gtkwin->menu.show_icon); 2787 gtk_widget_show(gtkwin->menu.show_icon);
2788 } else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) { 2788 } else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) {
2789 /* Show stuff that applies to Chats, hide stuff that applies to IMs */ 2789 /* Show stuff that applies to Chats, hide stuff that applies to IMs */
2790 2790
2791 /* Deal with menu items */ 2791 /* Deal with menu items */
2792 gtk_widget_show(gtkwin->menu.view_log); 2792 gtk_widget_show(gtkwin->menu.view_log);
2793 gtk_widget_hide(gtkwin->menu.send_file); 2793 gtk_widget_hide(gtkwin->menu.send_file);
2815 /* 2815 /*
2816 * Handle graying stuff out based on whether an account is connected 2816 * Handle graying stuff out based on whether an account is connected
2817 * and what features that account supports. 2817 * and what features that account supports.
2818 */ 2818 */
2819 if ((gc != NULL) && 2819 if ((gc != NULL) &&
2820 ( (gaim_conversation_get_type(conv) != GAIM_CONV_CHAT) || 2820 ( (gaim_conversation_get_type(conv) != GAIM_CONV_TYPE_CHAT) ||
2821 !gaim_conv_chat_has_left(GAIM_CONV_CHAT(conv)) )) { 2821 !gaim_conv_chat_has_left(GAIM_CONV_CHAT(conv)) )) {
2822 /* Account is online */ 2822 /* Account is online */
2823 /* Deal with the toolbar */ 2823 /* Deal with the toolbar */
2824 if (conv->features & GAIM_CONNECTION_HTML) { 2824 if (conv->features & GAIM_CONNECTION_HTML) {
2825 buttons = GTK_IMHTML_ALL; /* Everything on */ 2825 buttons = GTK_IMHTML_ALL; /* Everything on */
2847 gtk_widget_set_sensitive(gtkwin->menu.invite, (prpl_info->chat_invite != NULL)); 2847 gtk_widget_set_sensitive(gtkwin->menu.invite, (prpl_info->chat_invite != NULL));
2848 gtk_widget_set_sensitive(gtkwin->menu.block, (prpl_info->add_deny != NULL)); 2848 gtk_widget_set_sensitive(gtkwin->menu.block, (prpl_info->add_deny != NULL));
2849 gtk_widget_set_sensitive(gtkwin->menu.insert_link, (conv->features & GAIM_CONNECTION_HTML)); 2849 gtk_widget_set_sensitive(gtkwin->menu.insert_link, (conv->features & GAIM_CONNECTION_HTML));
2850 gtk_widget_set_sensitive(gtkwin->menu.insert_image, (prpl_info->options & OPT_PROTO_IM_IMAGE)); 2850 gtk_widget_set_sensitive(gtkwin->menu.insert_image, (prpl_info->options & OPT_PROTO_IM_IMAGE));
2851 2851
2852 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) { 2852 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) {
2853 gtk_widget_set_sensitive(gtkwin->menu.add, (prpl_info->add_buddy != NULL)); 2853 gtk_widget_set_sensitive(gtkwin->menu.add, (prpl_info->add_buddy != NULL));
2854 gtk_widget_set_sensitive(gtkwin->menu.remove, (prpl_info->remove_buddy != NULL)); 2854 gtk_widget_set_sensitive(gtkwin->menu.remove, (prpl_info->remove_buddy != NULL));
2855 gtk_widget_set_sensitive(gtkwin->menu.send_file, 2855 gtk_widget_set_sensitive(gtkwin->menu.send_file,
2856 (prpl_info->send_file != NULL && (!prpl_info->can_receive_file || 2856 (prpl_info->send_file != NULL && (!prpl_info->can_receive_file ||
2857 prpl_info->can_receive_file(gc, gaim_conversation_get_name(conv))))); 2857 prpl_info->can_receive_file(gc, gaim_conversation_get_name(conv)))));
2858 gtk_widget_set_sensitive(gtkwin->menu.alias, 2858 gtk_widget_set_sensitive(gtkwin->menu.alias,
2859 (gaim_find_buddy(account, gaim_conversation_get_name(conv)) != NULL)); 2859 (gaim_find_buddy(account, gaim_conversation_get_name(conv)) != NULL));
2860 } else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) { 2860 } else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) {
2861 gtk_widget_set_sensitive(gtkwin->menu.add, (prpl_info->join_chat != NULL)); 2861 gtk_widget_set_sensitive(gtkwin->menu.add, (prpl_info->join_chat != NULL));
2862 gtk_widget_set_sensitive(gtkwin->menu.remove, (prpl_info->join_chat != NULL)); 2862 gtk_widget_set_sensitive(gtkwin->menu.remove, (prpl_info->join_chat != NULL));
2863 gtk_widget_set_sensitive(gtkwin->menu.alias, 2863 gtk_widget_set_sensitive(gtkwin->menu.alias,
2864 (gaim_blist_find_chat(account, gaim_conversation_get_name(conv)) != NULL)); 2864 (gaim_blist_find_chat(account, gaim_conversation_get_name(conv)) != NULL));
2865 } 2865 }
2866 2866
2867 /* Deal with chat userlist buttons */ 2867 /* Deal with chat userlist buttons */
2868 if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) 2868 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT)
2869 { 2869 {
2870 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_im, TRUE); 2870 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_im, TRUE);
2871 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_ignore, TRUE); 2871 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_ignore, TRUE);
2872 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_info, (prpl_info->get_info != NULL)); 2872 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_info, (prpl_info->get_info != NULL));
2873 } 2873 }
2887 gtk_widget_set_sensitive(gtkwin->menu.remove, FALSE); 2887 gtk_widget_set_sensitive(gtkwin->menu.remove, FALSE);
2888 gtk_widget_set_sensitive(gtkwin->menu.insert_link, TRUE); 2888 gtk_widget_set_sensitive(gtkwin->menu.insert_link, TRUE);
2889 gtk_widget_set_sensitive(gtkwin->menu.insert_image, FALSE); 2889 gtk_widget_set_sensitive(gtkwin->menu.insert_image, FALSE);
2890 2890
2891 /* Deal with chat userlist buttons */ 2891 /* Deal with chat userlist buttons */
2892 if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) 2892 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT)
2893 { 2893 {
2894 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_im, FALSE); 2894 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_im, FALSE);
2895 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_ignore, FALSE); 2895 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_ignore, FALSE);
2896 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_info, FALSE); 2896 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_info, FALSE);
2897 } 2897 }
2898 } 2898 }
2899 2899
2900 /* 2900 /*
2901 * Update the window's icon 2901 * Update the window's icon
2902 */ 2902 */
2903 if ((gaim_conversation_get_type(conv) == GAIM_CONV_IM) && 2903 if ((gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) &&
2904 (gtkconv->u.im->anim)) 2904 (gtkconv->u.im->anim))
2905 { 2905 {
2906 window_icon = 2906 window_icon =
2907 gdk_pixbuf_animation_get_static_image(gtkconv->u.im->anim); 2907 gdk_pixbuf_animation_get_static_image(gtkconv->u.im->anim);
2908 g_object_ref(window_icon); 2908 g_object_ref(window_icon);
2925 win = (GaimConvWindow *)user_data; 2925 win = (GaimConvWindow *)user_data;
2926 conv = gaim_conv_window_get_active_conversation(win); 2926 conv = gaim_conv_window_get_active_conversation(win);
2927 2927
2928 g_return_if_fail(conv != NULL); 2928 g_return_if_fail(conv != NULL);
2929 2929
2930 if (gaim_conversation_get_type(conv) != GAIM_CONV_IM) 2930 if (gaim_conversation_get_type(conv) != GAIM_CONV_TYPE_IM)
2931 return; 2931 return;
2932 2932
2933 gtkconv = GAIM_GTK_CONVERSATION(conv); 2933 gtkconv = GAIM_GTK_CONVERSATION(conv);
2934 2934
2935 stop_anim(NULL, gtkconv); 2935 stop_anim(NULL, gtkconv);
2974 gaim_prefs_get_bool("/gaim/gtk/conversations/show_formatting_toolbar")); 2974 gaim_prefs_get_bool("/gaim/gtk/conversations/show_formatting_toolbar"));
2975 2975
2976 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(gtkwin->menu.show_timestamps), 2976 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(gtkwin->menu.show_timestamps),
2977 gtkconv->show_timestamps); 2977 gtkconv->show_timestamps);
2978 2978
2979 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) 2979 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM)
2980 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(gtkwin->menu.show_icon), 2980 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(gtkwin->menu.show_icon),
2981 gtkconv->u.im->show_icon); 2981 gtkconv->u.im->show_icon);
2982 /* 2982 /*
2983 * We pause icons when they are not visible. If this icon should 2983 * We pause icons when they are not visible. If this icon should
2984 * be animated then start it back up again. 2984 * be animated then start it back up again.
2985 */ 2985 */
2986 if ((gaim_conversation_get_type(conv) == GAIM_CONV_IM) && 2986 if ((gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) &&
2987 (gtkconv->u.im->animate)) 2987 (gtkconv->u.im->animate))
2988 start_anim(NULL, gtkconv); 2988 start_anim(NULL, gtkconv);
2989 2989
2990 gtk_window_set_title(GTK_WINDOW(gtkwin->window), 2990 gtk_window_set_title(GTK_WINDOW(gtkwin->window),
2991 gtk_label_get_text(GTK_LABEL(gtkconv->tab_label))); 2991 gtk_label_get_text(GTK_LABEL(gtkconv->tab_label)));
3034 GaimConvIm *im = NULL; 3034 GaimConvIm *im = NULL;
3035 GaimConversation *conv = gtkconv->active_conv; 3035 GaimConversation *conv = gtkconv->active_conv;
3036 3036
3037 gtkwin = GAIM_GTK_WINDOW(gaim_conversation_get_window(conv)); 3037 gtkwin = GAIM_GTK_WINDOW(gaim_conversation_get_window(conv));
3038 3038
3039 if(gaim_conversation_get_type(conv) == GAIM_CONV_IM) 3039 if(gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM)
3040 im = GAIM_CONV_IM(conv); 3040 im = GAIM_CONV_IM(conv);
3041 3041
3042 if(gtkwin->menu.typing_icon) { 3042 if(gtkwin->menu.typing_icon) {
3043 gtk_widget_destroy(gtkwin->menu.typing_icon); 3043 gtk_widget_destroy(gtkwin->menu.typing_icon);
3044 gtkwin->menu.typing_icon = NULL; 3044 gtkwin->menu.typing_icon = NULL;
3452 3452
3453 word_start = cursor; 3453 word_start = cursor;
3454 3454
3455 /* if there's nothing there just return */ 3455 /* if there's nothing there just return */
3456 if (!gtk_text_iter_compare(&cursor, &start_buffer)) 3456 if (!gtk_text_iter_compare(&cursor, &start_buffer))
3457 return (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) ? TRUE : FALSE; 3457 return (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) ? TRUE : FALSE;
3458 3458
3459 text = gtk_text_buffer_get_text(gtkconv->entry_buffer, &start_buffer, 3459 text = gtk_text_buffer_get_text(gtkconv->entry_buffer, &start_buffer,
3460 &cursor, FALSE); 3460 &cursor, FALSE);
3461 3461
3462 /* if we're at the end of ": " we need to move back 2 spaces */ 3462 /* if we're at the end of ": " we need to move back 2 spaces */
3484 entered = gtk_text_buffer_get_text(gtkconv->entry_buffer, &word_start, 3484 entered = gtk_text_buffer_get_text(gtkconv->entry_buffer, &word_start,
3485 &cursor, FALSE); 3485 &cursor, FALSE);
3486 3486
3487 if (!g_utf8_strlen(entered, -1)) { 3487 if (!g_utf8_strlen(entered, -1)) {
3488 g_free(entered); 3488 g_free(entered);
3489 return (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) ? TRUE : FALSE; 3489 return (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) ? TRUE : FALSE;
3490 } 3490 }
3491 3491
3492 nick_partial = g_malloc(strlen(entered)+1); 3492 nick_partial = g_malloc(strlen(entered)+1);
3493 3493
3494 if (command) { 3494 if (command) {
3495 list = gaim_cmd_list(conv); 3495 list = gaim_cmd_list(conv);
3496 } else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) { 3496 } else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) {
3497 chat = GAIM_CONV_CHAT(conv); 3497 chat = GAIM_CONV_CHAT(conv);
3498 list = gaim_conv_chat_get_users(chat); 3498 list = gaim_conv_chat_get_users(chat);
3499 } else { 3499 } else {
3500 g_free(nick_partial); 3500 g_free(nick_partial);
3501 g_free(entered); 3501 g_free(entered);
3553 if (!matches) { 3553 if (!matches) {
3554 /* if matches isn't set partials won't be either */ 3554 /* if matches isn't set partials won't be either */
3555 g_free(entered); 3555 g_free(entered);
3556 if (command) 3556 if (command)
3557 g_list_free(list); 3557 g_list_free(list);
3558 return (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) ? TRUE : FALSE; 3558 return (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) ? TRUE : FALSE;
3559 } 3559 }
3560 3560
3561 gtk_text_buffer_delete(gtkconv->entry_buffer, &word_start, &cursor); 3561 gtk_text_buffer_delete(gtkconv->entry_buffer, &word_start, &cursor);
3562 3562
3563 if (!matches->next) { 3563 if (!matches->next) {
4206 /* 4206 /*
4207 * If we already have an open conversation with this buddy, then 4207 * If we already have an open conversation with this buddy, then
4208 * just move the conv to this window. Otherwise, create a new 4208 * just move the conv to this window. Otherwise, create a new
4209 * conv and add it to this window. 4209 * conv and add it to this window.
4210 */ 4210 */
4211 c = gaim_find_conversation_with_account(GAIM_CONV_IM, b->name, b->account); 4211 c = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, b->name, b->account);
4212 if (c != NULL) { 4212 if (c != NULL) {
4213 GaimConvWindow *oldwin; 4213 GaimConvWindow *oldwin;
4214 oldwin = gaim_conversation_get_window(c); 4214 oldwin = gaim_conversation_get_window(c);
4215 if (oldwin != win) { 4215 if (oldwin != win) {
4216 gaim_conv_window_remove_conversation(oldwin, c); 4216 gaim_conv_window_remove_conversation(oldwin, c);
4217 gaim_conv_window_add_conversation(win, c); 4217 gaim_conv_window_add_conversation(win, c);
4218 } 4218 }
4219 } else { 4219 } else {
4220 c = gaim_conversation_new(GAIM_CONV_IM, b->account, b->name); 4220 c = gaim_conversation_new(GAIM_CONV_TYPE_IM, b->account, b->name);
4221 gaim_conv_window_add_conversation(win, c); 4221 gaim_conv_window_add_conversation(win, c);
4222 } 4222 }
4223 4223
4224 /* Make this conversation the active conversation */ 4224 /* Make this conversation the active conversation */
4225 gaim_conv_window_switch_conversation(win, c); 4225 gaim_conv_window_switch_conversation(win, c);
4241 _("You are not currently signed on with an account that " 4241 _("You are not currently signed on with an account that "
4242 "can add that buddy."), NULL); 4242 "can add that buddy."), NULL);
4243 } 4243 }
4244 else 4244 else
4245 { 4245 {
4246 c = gaim_conversation_new(GAIM_CONV_IM, account, username); 4246 c = gaim_conversation_new(GAIM_CONV_TYPE_IM, account, username);
4247 gaim_conv_window_add_conversation(win, c); 4247 gaim_conv_window_add_conversation(win, c);
4248 } 4248 }
4249 } 4249 }
4250 4250
4251 if (username != NULL) g_free(username); 4251 if (username != NULL) g_free(username);
4252 if (protocol != NULL) g_free(protocol); 4252 if (protocol != NULL) g_free(protocol);
4253 4253
4254 gtk_drag_finish(dc, TRUE, (dc->action == GDK_ACTION_MOVE), t); 4254 gtk_drag_finish(dc, TRUE, (dc->action == GDK_ACTION_MOVE), t);
4255 } 4255 }
4256 else if (sd->target == gdk_atom_intern("text/uri-list", FALSE)) { 4256 else if (sd->target == gdk_atom_intern("text/uri-list", FALSE)) {
4257 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) 4257 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM)
4258 gaim_dnd_file_manage(sd, gaim_conversation_get_account(conv), gaim_conversation_get_name(conv)); 4258 gaim_dnd_file_manage(sd, gaim_conversation_get_account(conv), gaim_conversation_get_name(conv));
4259 gtk_drag_finish(dc, TRUE, (dc->action == GDK_ACTION_MOVE), t); 4259 gtk_drag_finish(dc, TRUE, (dc->action == GDK_ACTION_MOVE), t);
4260 } 4260 }
4261 else 4261 else
4262 gtk_drag_finish(dc, FALSE, FALSE, t); 4262 gtk_drag_finish(dc, FALSE, FALSE, t);
4404 return NULL; 4404 return NULL;
4405 4405
4406 cn = (GaimBlistNode *)c; 4406 cn = (GaimBlistNode *)c;
4407 for (b = (GaimBuddy *)cn->child; b; b = (GaimBuddy *) ((GaimBlistNode *)b)->next) { 4407 for (b = (GaimBuddy *)cn->child; b; b = (GaimBuddy *) ((GaimBlistNode *)b)->next) {
4408 GaimConversation *conv; 4408 GaimConversation *conv;
4409 if ((conv = gaim_find_conversation_with_account(GAIM_CONV_IM, b->name, b->account))) { 4409 if ((conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, b->name, b->account))) {
4410 if (conv->ui_data) 4410 if (conv->ui_data)
4411 return conv->ui_data; 4411 return conv->ui_data;
4412 } 4412 }
4413 } 4413 }
4414 4414
4438 gtkconv = (GaimGtkConversation *)conv->ui_data; 4438 gtkconv = (GaimGtkConversation *)conv->ui_data;
4439 4439
4440 tab_cont = gtkconv->tab_cont; 4440 tab_cont = gtkconv->tab_cont;
4441 4441
4442 new_ui = FALSE; 4442 new_ui = FALSE;
4443 } else if (conv_type == GAIM_CONV_IM && (gtkconv = gaim_gtk_conv_find_gtkconv(conv))) { 4443 } else if (conv_type == GAIM_CONV_TYPE_IM && (gtkconv = gaim_gtk_conv_find_gtkconv(conv))) {
4444 conv->ui_data = gtkconv; 4444 conv->ui_data = gtkconv;
4445 gtkconv->active_conv = conv; 4445 gtkconv->active_conv = conv;
4446 if (!g_list_find(gtkconv->convs, conv)) 4446 if (!g_list_find(gtkconv->convs, conv))
4447 gtkconv->convs = g_list_prepend(gtkconv->convs, conv); 4447 gtkconv->convs = g_list_prepend(gtkconv->convs, conv);
4448 return; 4448 return;
4454 4454
4455 /* Setup some initial variables. */ 4455 /* Setup some initial variables. */
4456 gtkconv->sg = gtk_size_group_new(GTK_SIZE_GROUP_BOTH); 4456 gtkconv->sg = gtk_size_group_new(GTK_SIZE_GROUP_BOTH);
4457 gtkconv->tooltips = gtk_tooltips_new(); 4457 gtkconv->tooltips = gtk_tooltips_new();
4458 4458
4459 if (conv_type == GAIM_CONV_IM) { 4459 if (conv_type == GAIM_CONV_TYPE_IM) {
4460 gtkconv->u.im = g_malloc0(sizeof(GaimGtkImPane)); 4460 gtkconv->u.im = g_malloc0(sizeof(GaimGtkImPane));
4461 gtkconv->u.im->a_virgin = TRUE; 4461 gtkconv->u.im->a_virgin = TRUE;
4462 4462
4463 pane = setup_im_pane(gtkconv); 4463 pane = setup_im_pane(gtkconv);
4464 } 4464 }
4465 else if (conv_type == GAIM_CONV_CHAT) { 4465 else if (conv_type == GAIM_CONV_TYPE_CHAT) {
4466 gtkconv->u.chat = g_malloc0(sizeof(GaimGtkChatPane)); 4466 gtkconv->u.chat = g_malloc0(sizeof(GaimGtkChatPane));
4467 4467
4468 pane = setup_chat_pane(gtkconv); 4468 pane = setup_chat_pane(gtkconv);
4469 } 4469 }
4470 4470
4471 if (pane == NULL) { 4471 if (pane == NULL) {
4472 if (conv_type == GAIM_CONV_CHAT) g_free(gtkconv->u.chat); 4472 if (conv_type == GAIM_CONV_TYPE_CHAT) g_free(gtkconv->u.chat);
4473 else if (conv_type == GAIM_CONV_IM) g_free(gtkconv->u.im); 4473 else if (conv_type == GAIM_CONV_TYPE_IM) g_free(gtkconv->u.im);
4474 4474
4475 g_free(gtkconv); 4475 g_free(gtkconv);
4476 conv->ui_data = NULL; 4476 conv->ui_data = NULL;
4477 4477
4478 return; 4478 return;
4599 gtk_widget_show(gtkconv->close); 4599 gtk_widget_show(gtkconv->close);
4600 4600
4601 gtk_widget_show(tabby); 4601 gtk_widget_show(tabby);
4602 gtk_widget_show(menu_tabby); 4602 gtk_widget_show(menu_tabby);
4603 4603
4604 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) 4604 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM)
4605 gaim_gtkconv_update_buddy_icon(conv); 4605 gaim_gtkconv_update_buddy_icon(conv);
4606 4606
4607 /* Add this pane to the conversation's notebook. */ 4607 /* Add this pane to the conversation's notebook. */
4608 gtk_notebook_append_page_menu(GTK_NOTEBOOK(gtkwin->notebook), tab_cont, tabby, menu_tabby); 4608 gtk_notebook_append_page_menu(GTK_NOTEBOOK(gtkwin->notebook), tab_cont, tabby, menu_tabby);
4609 gtk_notebook_set_tab_label_packing(GTK_NOTEBOOK(gtkwin->notebook), tab_cont, TRUE, TRUE, GTK_PACK_START); 4609 gtk_notebook_set_tab_label_packing(GTK_NOTEBOOK(gtkwin->notebook), tab_cont, TRUE, TRUE, GTK_PACK_START);
4657 gaim_prefs_get_bool("/gaim/gtk/conversations/tabs")); 4657 gaim_prefs_get_bool("/gaim/gtk/conversations/tabs"));
4658 } 4658 }
4659 4659
4660 4660
4661 /* If this window is setup with an inactive gc, regenerate the menu. */ 4661 /* If this window is setup with an inactive gc, regenerate the menu. */
4662 if (conv_type == GAIM_CONV_IM && 4662 if (conv_type == GAIM_CONV_TYPE_IM &&
4663 gaim_conversation_get_gc(conv) == NULL) { 4663 gaim_conversation_get_gc(conv) == NULL) {
4664 4664
4665 generate_send_as_items(win, conv); 4665 generate_send_as_items(win, conv);
4666 } 4666 }
4667 } 4667 }
4750 gaim_request_close_with_handle(conv); 4750 gaim_request_close_with_handle(conv);
4751 4751
4752 gtk_widget_destroy(gtkconv->tab_cont); 4752 gtk_widget_destroy(gtkconv->tab_cont);
4753 g_object_unref(gtkconv->tab_cont); 4753 g_object_unref(gtkconv->tab_cont);
4754 4754
4755 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) { 4755 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) {
4756 if (gtkconv->u.im->icon_timer != 0) 4756 if (gtkconv->u.im->icon_timer != 0)
4757 g_source_remove(gtkconv->u.im->icon_timer); 4757 g_source_remove(gtkconv->u.im->icon_timer);
4758 4758
4759 if (gtkconv->u.im->anim != NULL) 4759 if (gtkconv->u.im->anim != NULL)
4760 g_object_unref(G_OBJECT(gtkconv->u.im->anim)); 4760 g_object_unref(G_OBJECT(gtkconv->u.im->anim));
4761 4761
4762 g_free(gtkconv->u.im); 4762 g_free(gtkconv->u.im);
4763 } 4763 }
4764 else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) { 4764 else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) {
4765 g_free(gtkconv->u.chat); 4765 g_free(gtkconv->u.chat);
4766 } 4766 }
4767 4767
4768 gtk_object_sink(GTK_OBJECT(gtkconv->tooltips)); 4768 gtk_object_sink(GTK_OBJECT(gtkconv->tooltips));
4769 4769
5105 "<B>%s</B></FONT> ", 5105 "<B>%s</B></FONT> ",
5106 color, sml_attrib ? sml_attrib : "", mdate, str); 5106 color, sml_attrib ? sml_attrib : "", mdate, str);
5107 5107
5108 gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), buf2, 0); 5108 gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), buf2, 0);
5109 5109
5110 if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) { 5110 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) {
5111 GtkTextIter start, end; 5111 GtkTextIter start, end;
5112 GtkTextTag *buddytag = get_buddy_tag(conv, who); 5112 GtkTextTag *buddytag = get_buddy_tag(conv, who);
5113 5113
5114 gtk_text_buffer_get_end_iter( 5114 gtk_text_buffer_get_end_iter(
5115 GTK_IMHTML(gtkconv->imhtml)->text_buffer, 5115 GTK_IMHTML(gtkconv->imhtml)->text_buffer,
5532 5532
5533 if (type == GAIM_CONV_UPDATE_ACCOUNT) 5533 if (type == GAIM_CONV_UPDATE_ACCOUNT)
5534 { 5534 {
5535 gaim_conversation_autoset_title(conv); 5535 gaim_conversation_autoset_title(conv);
5536 5536
5537 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) 5537 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM)
5538 gaim_gtkconv_update_buddy_icon(conv); 5538 gaim_gtkconv_update_buddy_icon(conv);
5539 5539
5540 gaim_gtkconv_update_buttons_by_protocol(conv); 5540 gaim_gtkconv_update_buttons_by_protocol(conv);
5541 5541
5542 g_timeout_add(0, (GSourceFunc)update_send_as_selection, win); 5542 g_timeout_add(0, (GSourceFunc)update_send_as_selection, win);
5552 char *title; 5552 char *title;
5553 GaimConvIm *im = NULL; 5553 GaimConvIm *im = NULL;
5554 GaimConnection *gc = gaim_conversation_get_gc(conv); 5554 GaimConnection *gc = gaim_conversation_get_gc(conv);
5555 char color[8]; 5555 char color[8];
5556 5556
5557 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) 5557 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM)
5558 im = GAIM_CONV_IM(conv); 5558 im = GAIM_CONV_IM(conv);
5559 5559
5560 if (!gc || ((gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) 5560 if (!gc || ((gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT)
5561 && gaim_conv_chat_has_left(GAIM_CONV_CHAT(conv)))) 5561 && gaim_conv_chat_has_left(GAIM_CONV_CHAT(conv))))
5562 title = g_strdup_printf("(%s)", gaim_conversation_get_title(conv)); 5562 title = g_strdup_printf("(%s)", gaim_conversation_get_title(conv));
5563 5563
5564 else 5564 else
5565 title = g_strdup(gaim_conversation_get_title(conv)); 5565 title = g_strdup(gaim_conversation_get_title(conv));
5712 5712
5713 GaimBuddyIcon *icon; 5713 GaimBuddyIcon *icon;
5714 5714
5715 g_return_if_fail(conv != NULL); 5715 g_return_if_fail(conv != NULL);
5716 g_return_if_fail(GAIM_IS_GTK_CONVERSATION(conv)); 5716 g_return_if_fail(GAIM_IS_GTK_CONVERSATION(conv));
5717 g_return_if_fail(gaim_conversation_get_type(conv) == GAIM_CONV_IM); 5717 g_return_if_fail(gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM);
5718 5718
5719 gtkconv = GAIM_GTK_CONVERSATION(conv); 5719 gtkconv = GAIM_GTK_CONVERSATION(conv);
5720 5720
5721 if (!gtkconv->u.im->show_icon) 5721 if (!gtkconv->u.im->show_icon)
5722 return; 5722 return;
6071 GList *l; 6071 GList *l;
6072 6072
6073 for (l = gaim_get_conversations(); l != NULL; l = l->next) { 6073 for (l = gaim_get_conversations(); l != NULL; l = l->next) {
6074 GaimConversation *conv = l->data; 6074 GaimConversation *conv = l->data;
6075 6075
6076 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) 6076 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM)
6077 gaim_conversation_foreach(gaim_gtkconv_update_buddy_icon); 6077 gaim_conversation_foreach(gaim_gtkconv_update_buddy_icon);
6078 } 6078 }
6079 } 6079 }
6080 6080
6081 static void 6081 static void