# HG changeset patch # User Mark Doliner # Date 1124937224 0 # Node ID 17142948653e946e2994f0766dc88debee79e86f # Parent 1462b64f8fc9f9b6a853c2de433a6fd0d71e5e98 [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 diff -r 1462b64f8fc9 -r 17142948653e plugins/crazychat/cc_network.c --- a/plugins/crazychat/cc_network.c Thu Aug 25 00:27:12 2005 +0000 +++ b/plugins/crazychat/cc_network.c Thu Aug 25 02:33:44 2005 +0000 @@ -104,9 +104,9 @@ if (session) return; /* already have a session with this guy */ session = cc_add_session(cc, name); session->state = INVITE; - conv = gaim_find_conversation_with_account(GAIM_CONV_ANY, name, account); + conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_ANY, name, account); if (!conv) { - conv = gaim_conversation_new(GAIM_CONV_IM, account, name); + conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, account, name); } im = gaim_conversation_get_im_data(conv); snprintf(buf, BUFSIZ, "%s%s!%d", CRAZYCHAT_INVITE_CODE, @@ -131,7 +131,7 @@ session = cc_find_session(cc, name); if (!session) { Debug("Creating a CrazyChat session invite dialog box!\n"); - conv = gaim_find_conversation_with_account(GAIM_CONV_ANY, name, account); + conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_ANY, name, account); if (conv) convwin = gaim_conversation_get_window(conv); else convwin = NULL; /* pop gtk window asking if want to accept */ @@ -208,9 +208,9 @@ GaimConversation *conv; GaimConvIm *im; - conv = gaim_find_conversation_with_account(GAIM_CONV_ANY, session->name, account); + conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_ANY, session->name, account); if (!conv) { - conv = gaim_conversation_new(GAIM_CONV_IM, account, + conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, account, session->name); } im = gaim_conversation_get_im_data(conv); @@ -272,10 +272,10 @@ session->peer_port = args->peer_port; snprintf(buf, BUFSIZ, "%s%s", CRAZYCHAT_ACCEPT_CODE, gaim_network_get_my_ip(-1)); - conv = gaim_find_conversation_with_account(GAIM_CONV_ANY, args->name, + conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_ANY, args->name, args->account); if (!conv) { - conv = gaim_conversation_new(GAIM_CONV_IM, + conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, args->account, args->name); } im = gaim_conversation_get_im_data(conv); diff -r 1462b64f8fc9 -r 17142948653e plugins/filectl.c --- a/plugins/filectl.c Thu Aug 25 00:27:12 2005 +0000 +++ b/plugins/filectl.c Thu Aug 25 02:33:44 2005 +0000 @@ -92,7 +92,7 @@ arg1 = getarg(buffer, 1, 0); arg2 = getarg(buffer, 2, 1); - conv = gaim_find_conversation(GAIM_CONV_ANY, arg1); + conv = gaim_find_conversation(GAIM_CONV_TYPE_ANY, arg1); if (conv != NULL) { /* diff -r 1462b64f8fc9 -r 17142948653e plugins/gaim-remote/remote.c --- a/plugins/gaim-remote/remote.c Thu Aug 25 00:27:12 2005 +0000 +++ b/plugins/gaim-remote/remote.c Thu Aug 25 02:33:44 2005 +0000 @@ -121,7 +121,7 @@ g_string_free(str, TRUE); } - c = gaim_conversation_new(GAIM_CONV_IM, gc->account, who); + c = gaim_conversation_new(GAIM_CONV_TYPE_IM, gc->account, who); g_free(who); if (what) { @@ -566,8 +566,8 @@ /* end acct find */ /* gaim_debug_info("cui", "g-r>To: %s; From: %s; Protocol: %s; Message: %s; Quiet: %d\n",who,from,proto,msg,quiet); */ - conv = gaim_conversation_new(GAIM_CONV_IM, gaim_connection_get_account(gc), who); - gaim_conv_im_send(GAIM_CONV_IM(conv), msg); + conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, gaim_connection_get_account(gc), who); + gaim_conv_im_send(GAIM_CONV_IM(conv), msg); /* likely to be used for quiet: serv_send_im(gc, who, msg, -1, 0); diff -r 1462b64f8fc9 -r 17142948653e plugins/gaiminc.c --- a/plugins/gaiminc.c Thu Aug 25 00:27:12 2005 +0000 +++ b/plugins/gaiminc.c Thu Aug 25 02:33:44 2005 +0000 @@ -49,7 +49,7 @@ bud(GaimBuddy *who) { GaimAccount *acct = who->account; - GaimConversation *conv = gaim_conversation_new(GAIM_CONV_IM, acct, who->name); + GaimConversation *conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, acct, who->name); gaim_conv_im_send(GAIM_CONV_IM(conv), "Hello!"); } diff -r 1462b64f8fc9 -r 17142948653e plugins/gevolution/gevo-util.c --- a/plugins/gevolution/gevo-util.c Thu Aug 25 00:27:12 2005 +0000 +++ b/plugins/gevolution/gevo-util.c Thu Aug 25 02:33:44 2005 +0000 @@ -33,7 +33,7 @@ GaimBuddy *buddy; GaimGroup *group; - conv = gaim_find_conversation_with_account(GAIM_CONV_IM, screenname, account); + conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, screenname, account); if ((group = gaim_find_group(group_name)) == NULL) { diff -r 1462b64f8fc9 -r 17142948653e plugins/history.c --- a/plugins/history.c Thu Aug 25 00:27:12 2005 +0000 +++ b/plugins/history.c Thu Aug 25 02:33:44 2005 +0000 @@ -45,7 +45,7 @@ char *header; convtype = gaim_conversation_get_type(c); - if (convtype == GAIM_CONV_IM) + if (convtype == GAIM_CONV_TYPE_IM) { GSList *buddies; GSList *cur; @@ -92,7 +92,7 @@ else logs = g_list_sort(logs, gaim_log_compare); } - else if (convtype == GAIM_CONV_CHAT) + else if (convtype == GAIM_CONV_TYPE_CHAT) { /* If we're not logging, don't show anything. * Otherwise, we might show a very old log. */ diff -r 1462b64f8fc9 -r 17142948653e plugins/notify.c --- a/plugins/notify.c Thu Aug 25 00:27:12 2005 +0000 +++ b/plugins/notify.c Thu Aug 25 02:33:44 2005 +0000 @@ -169,9 +169,9 @@ gaimwin = gaim_conversation_get_window(conv); /* If we aren't doing notifications for this type of conversation, return */ - if (((gaim_conversation_get_type(conv) == GAIM_CONV_IM) && + if (((gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) && !gaim_prefs_get_bool("/plugins/gtk/X11/notify/type_im")) || - ((gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) && + ((gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) && !gaim_prefs_get_bool("/plugins/gtk/X11/notify/type_chat"))) return 0; @@ -268,7 +268,7 @@ GaimConversation *conv = NULL; if (gaim_prefs_get_bool("/plugins/gtk/X11/notify/notify_send")) { - conv = gaim_find_conversation_with_account(GAIM_CONV_IM, receiver, account); + conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, receiver, account); unnotify(conv, TRUE); } } diff -r 1462b64f8fc9 -r 17142948653e plugins/statenotify.c --- a/plugins/statenotify.c Thu Aug 25 00:27:12 2005 +0000 +++ b/plugins/statenotify.c Thu Aug 25 02:33:44 2005 +0000 @@ -20,7 +20,7 @@ char buf[256]; char *escaped; - conv = gaim_find_conversation_with_account(GAIM_CONV_IM, + conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, buddy->name, buddy->account); if (conv == NULL) diff -r 1462b64f8fc9 -r 17142948653e plugins/tcl/tcl_cmds.c --- a/plugins/tcl/tcl_cmds.c Thu Aug 25 00:27:12 2005 +0000 +++ b/plugins/tcl/tcl_cmds.c Thu Aug 25 02:33:44 2005 +0000 @@ -488,7 +488,7 @@ return error; if (!tcl_validate_account(account, interp)) return TCL_ERROR; - convo = gaim_find_conversation_with_account(GAIM_CONV_ANY, + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_ANY, Tcl_GetString(objv[3]), account); Tcl_SetIntObj(result, (int)convo); @@ -514,7 +514,7 @@ return TCL_ERROR; } argsused = 2; - type = GAIM_CONV_IM; + type = GAIM_CONV_TYPE_IM; while (argsused < objc) { opt = Tcl_GetString(objv[argsused]); if (*opt == '-') { @@ -524,10 +524,10 @@ argsused++; switch (newopt) { case CMD_CONV_NEW_CHAT: - type = GAIM_CONV_CHAT; + type = GAIM_CONV_TYPE_CHAT; break; case CMD_CONV_NEW_IM: - type = GAIM_CONV_IM; + type = GAIM_CONV_TYPE_IM; break; } } else { @@ -570,7 +570,7 @@ flags = GAIM_MESSAGE_SYSTEM; break; } - if (gaim_conversation_get_type(convo) == GAIM_CONV_CHAT) + if (gaim_conversation_get_type(convo) == GAIM_CONV_TYPE_CHAT) gaim_conv_chat_write(GAIM_CONV_CHAT(convo), from, what, flags, time(NULL)); else gaim_conv_im_write(GAIM_CONV_IM(convo), from, what, flags, time(NULL)); diff -r 1462b64f8fc9 -r 17142948653e plugins/ticker/ticker.c --- a/plugins/ticker/ticker.c Thu Aug 25 00:27:12 2005 +0000 +++ b/plugins/ticker/ticker.c Thu Aug 25 02:33:44 2005 +0000 @@ -89,7 +89,7 @@ static gboolean buddy_click_cb(GtkWidget *widget, GdkEventButton *event, gpointer user_data) { GaimBuddy *b = user_data; - gaim_conversation_new(GAIM_CONV_IM, b->account, b->name); + gaim_conversation_new(GAIM_CONV_TYPE_IM, b->account, b->name); return TRUE; } diff -r 1462b64f8fc9 -r 17142948653e plugins/win32/winprefs/winprefs.c --- a/plugins/win32/winprefs/winprefs.c Thu Aug 25 00:27:12 2005 +0000 +++ b/plugins/win32/winprefs/winprefs.c Thu Aug 25 02:33:44 2005 +0000 @@ -285,7 +285,7 @@ if (gaim_prefs_get_bool(PREF_IM_BLINK) == FALSE) return; - GaimConversation *conv = gaim_find_conversation_with_account(GAIM_CONV_IM, sender, account); + GaimConversation *conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, sender, account); if (conv == NULL) { gaim_debug_info("winprefs", "gar!\n"); return; diff -r 1462b64f8fc9 -r 17142948653e src/blist.c --- a/src/blist.c Thu Aug 25 00:27:12 2005 +0000 +++ b/src/blist.c Thu Aug 25 02:33:44 2005 +0000 @@ -731,7 +731,7 @@ if (ops && ops->update) ops->update(gaimbuddylist, (GaimBlistNode*)buddy); - conv = gaim_find_conversation_with_account(GAIM_CONV_IM, buddy->name, + conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, buddy->name, buddy->account); if (conv) { if (buddy->present == GAIM_BUDDY_ONLINE) @@ -882,7 +882,7 @@ if (ops && ops->update) ops->update(gaimbuddylist, (GaimBlistNode *)buddy); - conv = gaim_find_conversation_with_account(GAIM_CONV_IM, buddy->name, + conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, buddy->name, buddy->account); if (conv) gaim_conversation_autoset_title(conv); @@ -906,7 +906,7 @@ if (ops && ops->update) ops->update(gaimbuddylist, (GaimBlistNode *)buddy); - conv = gaim_find_conversation_with_account(GAIM_CONV_IM, buddy->name, + conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, buddy->name, buddy->account); if (conv) gaim_conversation_autoset_title(conv); diff -r 1462b64f8fc9 -r 17142948653e src/buddyicon.c --- a/src/buddyicon.c Thu Aug 25 00:27:12 2005 +0000 +++ b/src/buddyicon.c Thu Aug 25 02:33:44 2005 +0000 @@ -105,7 +105,7 @@ account = gaim_buddy_icon_get_account(icon); username = gaim_buddy_icon_get_username(icon); - conv = gaim_find_conversation_with_account(GAIM_CONV_IM, username, account); + conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, username, account); if (conv != NULL) gaim_conv_im_set_icon(GAIM_CONV_IM(conv), NULL); @@ -190,7 +190,7 @@ g_slist_free(list); - conv = gaim_find_conversation_with_account(GAIM_CONV_IM, username, account); + conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, username, account); if (conv != NULL) gaim_conv_im_set_icon(GAIM_CONV_IM(conv), icon); diff -r 1462b64f8fc9 -r 17142948653e src/cmds.c --- a/src/cmds.c Thu Aug 25 00:27:12 2005 +0000 +++ b/src/cmds.c Thu Aug 25 02:33:44 2005 +0000 @@ -216,9 +216,9 @@ *error = NULL; prpl_id = gaim_account_get_protocol_id(gaim_conversation_get_account(conv)); - if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) + if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) is_im = TRUE; - else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) + else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) is_im = FALSE; else return GAIM_CMD_STATUS_FAILED; @@ -317,10 +317,10 @@ for (l = cmds; l; l = l->next) { c = l->data; - if (conv && (gaim_conversation_get_type(conv) == GAIM_CONV_IM)) + if (conv && (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM)) if (!(c->flags & GAIM_CMD_FLAG_IM)) continue; - if (conv && (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT)) + if (conv && (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT)) if (!(c->flags & GAIM_CMD_FLAG_CHAT)) continue; @@ -347,10 +347,10 @@ if (cmd && (strcmp(cmd, c->cmd) != 0)) continue; - if (conv && (gaim_conversation_get_type(conv) == GAIM_CONV_IM)) + if (conv && (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM)) if (!(c->flags & GAIM_CMD_FLAG_IM)) continue; - if (conv && (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT)) + if (conv && (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT)) if (!(c->flags & GAIM_CMD_FLAG_CHAT)) continue; diff -r 1462b64f8fc9 -r 17142948653e src/conversation.c --- a/src/conversation.c Thu Aug 25 00:27:12 2005 +0000 +++ b/src/conversation.c Thu Aug 25 02:33:44 2005 +0000 @@ -147,7 +147,7 @@ plugin_return = GPOINTER_TO_INT(gaim_signal_emit_return_1( gaim_conversations_get_handle(), - (type == GAIM_CONV_IM ? "writing-im-msg" : "writing-chat-msg"), + (type == GAIM_CONV_TYPE_IM ? "writing-im-msg" : "writing-chat-msg"), account, conv, &displayed)); if (displayed == NULL) @@ -159,14 +159,14 @@ } gaim_signal_emit(gaim_conversations_get_handle(), - (type == GAIM_CONV_IM ? "wrote-im-msg" : "wrote-chat-msg"), + (type == GAIM_CONV_TYPE_IM ? "wrote-im-msg" : "wrote-chat-msg"), account, conv, displayed); sent = g_strdup(displayed); plugin_return = GPOINTER_TO_INT(gaim_signal_emit_return_1( - gaim_conversations_get_handle(), (type == GAIM_CONV_IM ? + gaim_conversations_get_handle(), (type == GAIM_CONV_TYPE_IM ? "displaying-im-msg" : "displaying-chat-msg"), account, conv, &displayed)); @@ -175,11 +175,11 @@ displayed = NULL; } else { gaim_signal_emit(gaim_conversations_get_handle(), - (type == GAIM_CONV_IM ? "displayed-im-msg" : "displayed-chat-msg"), + (type == GAIM_CONV_TYPE_IM ? "displayed-im-msg" : "displayed-chat-msg"), account, conv, displayed); } - if (type == GAIM_CONV_IM) { + if (type == GAIM_CONV_TYPE_IM) { GaimConvIm *im = GAIM_CONV_IM(conv); gaim_signal_emit(gaim_conversations_get_handle(), "sending-im-msg", @@ -564,7 +564,7 @@ GaimConvWindow *win; GaimConversation *conv; - if (type == GAIM_CONV_UNKNOWN) + if (type == GAIM_CONV_TYPE_UNKNOWN) return NULL; for (wins = gaim_get_windows(); wins != NULL; wins = wins->next) { @@ -591,7 +591,7 @@ GaimConvWindow *win; GaimConversation *conv; - if (type == GAIM_CONV_UNKNOWN) + if (type == GAIM_CONV_TYPE_UNKNOWN) return NULL; for (wins = g_list_last(gaim_get_windows()); @@ -654,17 +654,17 @@ GaimConversation *conv; GaimConnection *gc; - g_return_val_if_fail(type != GAIM_CONV_UNKNOWN, NULL); + g_return_val_if_fail(type != GAIM_CONV_TYPE_UNKNOWN, NULL); g_return_val_if_fail(account != NULL, NULL); g_return_val_if_fail(name != NULL, NULL); /* Check if this conversation already exists. */ if ((conv = gaim_find_conversation_with_account(type, name, account)) != NULL) { - if (gaim_conversation_get_type(conv) != GAIM_CONV_CHAT || + if (gaim_conversation_get_type(conv) != GAIM_CONV_TYPE_CHAT || gaim_conv_chat_has_left(GAIM_CONV_CHAT(conv))) { - if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) + if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) gaim_conversation_chat_cleanup_for_rejoin(conv); return conv; @@ -684,14 +684,14 @@ conv->send_history = g_list_append(NULL, NULL); conv->data = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL); - conv->log = gaim_log_new(type == GAIM_CONV_CHAT ? GAIM_LOG_CHAT : + conv->log = gaim_log_new(type == GAIM_CONV_TYPE_CHAT ? GAIM_LOG_CHAT : GAIM_LOG_IM, conv->name, account, conv, time(NULL)); /* copy features from the connection. */ conv->features = gc->flags; - if (type == GAIM_CONV_IM) + if (type == GAIM_CONV_TYPE_IM) { GaimBuddyIcon *icon; conv->u.im = g_new0(GaimConvIm, 1); @@ -705,7 +705,7 @@ gaim_conversation_set_logging(conv, gaim_prefs_get_bool("/core/logging/log_ims")); } - else if (type == GAIM_CONV_CHAT) + else if (type == GAIM_CONV_TYPE_CHAT) { const char *disp; @@ -791,7 +791,7 @@ /* Still connected */ prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl); - if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) + if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) { if (gaim_prefs_get_bool("/core/conversations/im/send_typing")) serv_send_typing(gc, name, GAIM_NOT_TYPING); @@ -799,7 +799,7 @@ if (gc && prpl_info->convo_closed != NULL) prpl_info->convo_closed(gc, name); } - else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) + else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) { int chat_id = gaim_conv_chat_get_id(GAIM_CONV_CHAT(conv)); #if 0 @@ -867,7 +867,7 @@ conversations = g_list_remove(conversations, conv); - if (conv->type == GAIM_CONV_IM) { + if (conv->type == GAIM_CONV_TYPE_IM) { gaim_conv_im_stop_typing_timeout(conv->u.im); gaim_conv_im_stop_type_again_timeout(conv->u.im); @@ -881,7 +881,7 @@ ims = g_list_remove(ims, conv); } - else if (conv->type == GAIM_CONV_CHAT) { + else if (conv->type == GAIM_CONV_TYPE_CHAT) { for (node = conv->u.chat->in_room; node != NULL; node = node->next) { if (node->data != NULL) @@ -962,7 +962,7 @@ GaimConversationType gaim_conversation_get_type(const GaimConversation *conv) { - g_return_val_if_fail(conv != NULL, GAIM_CONV_UNKNOWN); + g_return_val_if_fail(conv != NULL, GAIM_CONV_TYPE_UNKNOWN); return conv->type; } @@ -1068,10 +1068,10 @@ account = gaim_conversation_get_account(conv); name = gaim_conversation_get_name(conv); - if(gaim_conversation_get_type(conv) == GAIM_CONV_IM) { + if(gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) { if(account && ((b = gaim_find_buddy(account, name)) != NULL)) text = gaim_buddy_get_alias(b); - } else if(gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) { + } else if(gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) { if(account && ((chat = gaim_blist_find_chat(account, name)) != NULL)) text = chat->alias; } @@ -1176,7 +1176,7 @@ { g_return_val_if_fail(conv != NULL, NULL); - if (gaim_conversation_get_type(conv) != GAIM_CONV_IM) + if (gaim_conversation_get_type(conv) != GAIM_CONV_TYPE_IM) return NULL; return conv->u.im; @@ -1187,7 +1187,7 @@ { g_return_val_if_fail(conv != NULL, NULL); - if (gaim_conversation_get_type(conv) != GAIM_CONV_CHAT) + if (gaim_conversation_get_type(conv) != GAIM_CONV_TYPE_CHAT) return NULL; return conv->u.chat; @@ -1249,7 +1249,7 @@ c = (GaimConversation *)cnv->data; name2 = gaim_normalize(account, gaim_conversation_get_name(c)); - if (((type == GAIM_CONV_ANY) || (type == gaim_conversation_get_type(c))) && + if (((type == GAIM_CONV_TYPE_ANY) || (type == gaim_conversation_get_type(c))) && (account == gaim_conversation_get_account(c)) && !gaim_utf8_strcasecmp(name1, name2)) { @@ -1291,25 +1291,25 @@ if (account != NULL) gc = gaim_account_get_connection(account); - if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT && + if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT && (gc == NULL || !g_slist_find(gc->buddy_chats, conv))) return; - if (gaim_conversation_get_type(conv) == GAIM_CONV_IM && + if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM && !g_list_find(gaim_get_conversations(), conv)) return; if (account != NULL) { prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gaim_find_prpl(gaim_account_get_protocol_id(account))); - if (gaim_conversation_get_type(conv) == GAIM_CONV_IM || + if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM || !(prpl_info->options & OPT_PROTO_UNIQUE_CHATNAME)) { if (who == NULL) { if (flags & GAIM_MESSAGE_SEND) { b = gaim_find_buddy(account, gaim_account_get_username(account)); - if (gaim_conversation_get_type(conv) != GAIM_CONV_CHAT) { + if (gaim_conversation_get_type(conv) != GAIM_CONV_TYPE_CHAT) { if (gaim_account_get_alias(account) != NULL) who = account->alias; else if (b != NULL && strcmp(b->name, gaim_buddy_get_contact_alias(b))) @@ -1326,13 +1326,13 @@ b = gaim_find_buddy(account, gaim_conversation_get_name(conv)); - if (b != NULL && gaim_conversation_get_type(conv) != GAIM_CONV_CHAT) + if (b != NULL && gaim_conversation_get_type(conv) != GAIM_CONV_TYPE_CHAT) who = gaim_buddy_get_contact_alias(b); else who = gaim_conversation_get_name(conv); } } - else if ((who != NULL) && (*who != '\0') && gaim_conversation_get_type(conv) != GAIM_CONV_CHAT) { + else if ((who != NULL) && (*who != '\0') && gaim_conversation_get_type(conv) != GAIM_CONV_TYPE_CHAT) { b = gaim_find_buddy(account, who); if (b != NULL) @@ -1351,7 +1351,7 @@ if (!(flags & GAIM_MESSAGE_RECV) && !(flags & GAIM_MESSAGE_SYSTEM) && !(flags & GAIM_MESSAGE_ERROR)) return; - if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) { + if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) { if ((flags & GAIM_MESSAGE_RECV) == GAIM_MESSAGE_RECV) gaim_conv_im_set_typing_state(GAIM_CONV_IM(conv), GAIM_NOT_TYPING); } @@ -1394,7 +1394,7 @@ * taskbar--we want the title of the window to be set to the name * of the person that IMed them most recently. */ - if ((gaim_conversation_get_type(conv) == GAIM_CONV_IM) && + if ((gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) && (flags & (GAIM_MESSAGE_RECV | GAIM_MESSAGE_ERROR)) && (!gaim_conv_window_has_focus(win)) && (gaim_conv_window_is_minimized(win))) @@ -1635,7 +1635,7 @@ g_return_val_if_fail(account !=NULL, FALSE); g_return_val_if_fail(what != NULL, FALSE); - conv = gaim_find_conversation_with_account(GAIM_CONV_ANY, who, account); + conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_ANY, who, account); if (conv != NULL) gaim_conversation_write(conv, NULL, what, GAIM_MESSAGE_ERROR, time(NULL)); else @@ -2450,7 +2450,7 @@ { GaimGroup *group = NULL; - if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) + if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) { GaimBuddy *buddy; @@ -2461,7 +2461,7 @@ group = gaim_find_buddys_group(buddy); } - else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) + else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) { GaimChat *chat; diff -r 1462b64f8fc9 -r 17142948653e src/conversation.h --- a/src/conversation.h Thu Aug 25 00:27:12 2005 +0000 +++ b/src/conversation.h Thu Aug 25 02:33:44 2005 +0000 @@ -44,11 +44,11 @@ */ typedef enum { - GAIM_CONV_UNKNOWN = 0, /**< Unknown conversation type. */ - GAIM_CONV_IM, /**< Instant Message. */ - GAIM_CONV_CHAT, /**< Chat room. */ - GAIM_CONV_MISC, /**< A misc. conversation. */ - GAIM_CONV_ANY /**< Any type of conversation. */ + GAIM_CONV_TYPE_UNKNOWN = 0, /**< Unknown conversation type. */ + GAIM_CONV_TYPE_IM, /**< Instant Message. */ + GAIM_CONV_TYPE_CHAT, /**< Chat room. */ + GAIM_CONV_TYPE_MISC, /**< A misc. conversation. */ + GAIM_CONV_TYPE_ANY /**< Any type of conversation. */ } GaimConversationType; @@ -666,7 +666,7 @@ /** * Returns the specified conversation's IM-specific data. * - * If the conversation type is not GAIM_CONV_IM, this will return @c NULL. + * If the conversation type is not GAIM_CONV_TYPE_IM, this will return @c NULL. * * @param conv The conversation. * @@ -679,7 +679,7 @@ /** * Returns the specified conversation's chat-specific data. * - * If the conversation type is not GAIM_CONV_CHAT, this will return @c NULL. + * If the conversation type is not GAIM_CONV_TYPE_CHAT, this will return @c NULL. * * @param conv The conversation. * diff -r 1462b64f8fc9 -r 17142948653e src/dbus-analyze-functions.py --- a/src/dbus-analyze-functions.py Thu Aug 25 00:27:12 2005 +0000 +++ b/src/dbus-analyze-functions.py Thu Aug 25 02:33:44 2005 +0000 @@ -16,11 +16,6 @@ # with the fact that it takes a (const) GList as a parameter. "gaim_presence_add_list", - # these two macros are excluded because they occur both as - # macros and as enum constants, which breaks libgaim-client. - "GAIM_CONV_IM", - "GAIM_CONV_CHAT", - # These functions are excluded because they involve value of the # type GaimConvPlacementFunc, which is a pointer to a function and # (currently?) can't be translated into a DBus type. Normally, diff -r 1462b64f8fc9 -r 17142948653e src/ft.c --- a/src/ft.c Thu Aug 25 00:27:12 2005 +0000 +++ b/src/ft.c Thu Aug 25 02:33:44 2005 +0000 @@ -160,7 +160,7 @@ g_return_if_fail(xfer != NULL); g_return_if_fail(message != NULL); - conv = gaim_find_conversation_with_account(GAIM_CONV_IM, xfer->who, + conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, xfer->who, gaim_xfer_get_account(xfer)); if (conv == NULL) diff -r 1462b64f8fc9 -r 17142948653e src/gtkblist.c --- a/src/gtkblist.c Thu Aug 25 00:27:12 2005 +0000 +++ b/src/gtkblist.c Thu Aug 25 02:33:44 2005 +0000 @@ -4288,7 +4288,7 @@ * and gaim_blist_add_buddy(). Or something. --Mark */ - c = gaim_find_conversation_with_account(GAIM_CONV_IM, who, data->account); + c = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, who, data->account); if (c != NULL) { gaim_buddy_icon_update(gaim_conv_im_get_icon(GAIM_CONV_IM(c))); gaim_conversation_update(c, GAIM_CONV_UPDATE_ADD); @@ -4482,7 +4482,7 @@ data->account->gc->prpl)->get_chat_name(chat->components); if (chat_name != NULL) { - conv = gaim_find_conversation_with_account(GAIM_CONV_CHAT, + conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, chat_name, data->account); g_free(chat_name); diff -r 1462b64f8fc9 -r 17142948653e src/gtkconv.c --- a/src/gtkconv.c Thu Aug 25 00:27:12 2005 +0000 +++ b/src/gtkconv.c Thu Aug 25 02:33:44 2005 +0000 @@ -203,7 +203,7 @@ l != NULL; l = l->next) { GaimConversation *conv = l->data; - if (gaim_conversation_get_type(conv) == GAIM_CONV_IM && + if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM && gaim_conversation_get_unseen(conv) == GAIM_UNSEEN_TEXT) { build_warn_close_dialog(win); @@ -267,7 +267,7 @@ * will fit, but then I don't want new windows taking up the entire screen. I check to see if there is only one * conversation in the window. This way we'll be setting new windows to the size of the last resized new window. */ - if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) + if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) { if (w == gtkconv->imhtml && (gaim_conv_window_get_conversation_count(win) == 1)) { @@ -277,7 +277,7 @@ if (w == gtkconv->entry) gaim_prefs_set_int("/gaim/gtk/conversations/im/entry_height", allocation->height); } - else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) + else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) { if (w == gtkconv->imhtml && (gaim_conv_window_get_conversation_count(win) == 1)) { @@ -380,9 +380,9 @@ say_command_cb(GaimConversation *conv, const char *cmd, char **args, char **error, void *data) { - if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) + if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) gaim_conv_im_send(GAIM_CONV_IM(conv), args[0]); - else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) + else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) gaim_conv_chat_send(GAIM_CONV_CHAT(conv), args[0]); return GAIM_CMD_RET_OK; @@ -396,9 +396,9 @@ tmp = g_strdup_printf("/me %s", args[0]); - if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) + if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) gaim_conv_im_send(GAIM_CONV_IM(conv), tmp); - else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) + else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) gaim_conv_chat_send(GAIM_CONV_CHAT(conv), tmp); g_free(tmp); @@ -552,7 +552,7 @@ g_free(error); return TRUE; case GAIM_CMD_STATUS_WRONG_TYPE: - if(gaim_conversation_get_type(conv) == GAIM_CONV_IM) + if(gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) gaim_conversation_write(conv, "", _("That command only works in chats, not IMs."), GAIM_MESSAGE_NO_LOG, time(NULL)); else @@ -583,7 +583,7 @@ if (!gaim_account_is_connected(account)) return; - if ((gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) && + if ((gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) && gaim_conv_chat_has_left(GAIM_CONV_CHAT(conv))) return; @@ -610,9 +610,9 @@ bufs = gtk_imhtml_get_markup_lines(GTK_IMHTML(gtkconv->entry)); for (i = 0; bufs[i]; i++) { send_history_add(conv, bufs[i]); - if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) + if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) gaim_conv_im_send(GAIM_CONV_IM(conv), bufs[i]); - else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) + else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) gaim_conv_chat_send(GAIM_CONV_CHAT(conv), bufs[i]); } @@ -620,9 +620,9 @@ } else { send_history_add(conv, buf); - if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) + if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) gaim_conv_im_send(GAIM_CONV_IM(conv), buf); - else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) + else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) gaim_conv_chat_send(GAIM_CONV_CHAT(conv), buf); } @@ -642,7 +642,7 @@ account = gaim_conversation_get_account(conv); name = gaim_conversation_get_name(conv); - if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) { + if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) { GaimBuddy *b; b = gaim_find_buddy(account, name); @@ -650,7 +650,7 @@ gaim_gtkdialogs_remove_buddy(b); else if (account != NULL && gaim_account_is_connected(account)) gaim_blist_request_add_buddy(account, (char *)name, NULL, NULL); - } else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) { + } else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) { GaimChat *c; c = gaim_blist_find_chat(account, name); @@ -692,12 +692,12 @@ { GaimConversation *conv = gtkconv->active_conv; - if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) { + if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) { serv_get_info(gaim_conversation_get_gc(conv), gaim_conversation_get_name(conv)); gtk_widget_grab_focus(gtkconv->entry); - } else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) { + } else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) { /* Get info of the person currently selected in the GtkTreeView */ GaimGtkChatPane *gtkchat; GtkTreeIter iter; @@ -1037,9 +1037,9 @@ conv = gaim_conv_window_get_active_conversation(win); - if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) + if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) type = GAIM_LOG_IM; - else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) + else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) type = GAIM_LOG_CHAT; else return; @@ -1167,7 +1167,7 @@ GaimConvWindow *win = (GaimConvWindow *)data; GaimConversation *conv = gaim_conv_window_get_active_conversation(win); - if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) { + if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) { serv_send_file(gaim_conversation_get_gc(conv), gaim_conversation_get_name(conv), NULL); } @@ -1229,13 +1229,13 @@ account = gaim_conversation_get_account(conv); name = gaim_conversation_get_name(conv); - if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) { + if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) { GaimBuddy *b; b = gaim_find_buddy(account, name); if (b != NULL) gaim_gtkdialogs_alias_buddy(b); - } else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) { + } else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) { GaimChat *c; c = gaim_blist_find_chat(account, name); @@ -2408,7 +2408,7 @@ g_return_val_if_fail(account != NULL, NULL); g_return_val_if_fail(name != NULL, NULL); - if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) { + if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) { GaimBuddy *b = gaim_find_buddy(account, name); if (b != NULL) { status = gaim_gtk_blist_get_status_icon((GaimBlistNode*)b, @@ -2458,7 +2458,7 @@ g_object_unref(status); if (gaim_conv_window_get_active_conversation(win) == conv && - (gaim_conversation_get_type(conv) != GAIM_CONV_IM || + (gaim_conversation_get_type(conv) != GAIM_CONV_TYPE_IM || gtkconv->u.im->anim == NULL)) { status = get_tab_icon(conv, FALSE); @@ -2708,7 +2708,7 @@ if (!conv) return; - g_return_if_fail(gaim_conversation_get_type(conv) == GAIM_CONV_IM); + g_return_if_fail(gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM); gtkconv = GAIM_GTK_CONVERSATION(conv); @@ -2762,7 +2762,7 @@ * supports it or not--that only affects if the button or menu item * is sensitive or not. */ - if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) { + if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) { /* Show stuff that applies to IMs, hide stuff that applies to chats */ /* Deal with menu items */ @@ -2785,7 +2785,7 @@ gtk_widget_show(gtkwin->menu.insert_link); gtk_widget_show(gtkwin->menu.insert_image); gtk_widget_show(gtkwin->menu.show_icon); - } else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) { + } else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) { /* Show stuff that applies to Chats, hide stuff that applies to IMs */ /* Deal with menu items */ @@ -2817,7 +2817,7 @@ * and what features that account supports. */ if ((gc != NULL) && - ( (gaim_conversation_get_type(conv) != GAIM_CONV_CHAT) || + ( (gaim_conversation_get_type(conv) != GAIM_CONV_TYPE_CHAT) || !gaim_conv_chat_has_left(GAIM_CONV_CHAT(conv)) )) { /* Account is online */ /* Deal with the toolbar */ @@ -2849,7 +2849,7 @@ gtk_widget_set_sensitive(gtkwin->menu.insert_link, (conv->features & GAIM_CONNECTION_HTML)); gtk_widget_set_sensitive(gtkwin->menu.insert_image, (prpl_info->options & OPT_PROTO_IM_IMAGE)); - if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) { + if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) { gtk_widget_set_sensitive(gtkwin->menu.add, (prpl_info->add_buddy != NULL)); gtk_widget_set_sensitive(gtkwin->menu.remove, (prpl_info->remove_buddy != NULL)); gtk_widget_set_sensitive(gtkwin->menu.send_file, @@ -2857,7 +2857,7 @@ prpl_info->can_receive_file(gc, gaim_conversation_get_name(conv))))); gtk_widget_set_sensitive(gtkwin->menu.alias, (gaim_find_buddy(account, gaim_conversation_get_name(conv)) != NULL)); - } else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) { + } else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) { gtk_widget_set_sensitive(gtkwin->menu.add, (prpl_info->join_chat != NULL)); gtk_widget_set_sensitive(gtkwin->menu.remove, (prpl_info->join_chat != NULL)); gtk_widget_set_sensitive(gtkwin->menu.alias, @@ -2865,7 +2865,7 @@ } /* Deal with chat userlist buttons */ - if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) + if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) { gtk_widget_set_sensitive(gtkconv->u.chat->userlist_im, TRUE); gtk_widget_set_sensitive(gtkconv->u.chat->userlist_ignore, TRUE); @@ -2889,7 +2889,7 @@ gtk_widget_set_sensitive(gtkwin->menu.insert_image, FALSE); /* Deal with chat userlist buttons */ - if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) + if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) { gtk_widget_set_sensitive(gtkconv->u.chat->userlist_im, FALSE); gtk_widget_set_sensitive(gtkconv->u.chat->userlist_ignore, FALSE); @@ -2900,7 +2900,7 @@ /* * Update the window's icon */ - if ((gaim_conversation_get_type(conv) == GAIM_CONV_IM) && + if ((gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) && (gtkconv->u.im->anim)) { window_icon = @@ -2927,7 +2927,7 @@ g_return_if_fail(conv != NULL); - if (gaim_conversation_get_type(conv) != GAIM_CONV_IM) + if (gaim_conversation_get_type(conv) != GAIM_CONV_TYPE_IM) return; gtkconv = GAIM_GTK_CONVERSATION(conv); @@ -2976,14 +2976,14 @@ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(gtkwin->menu.show_timestamps), gtkconv->show_timestamps); - if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) + if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(gtkwin->menu.show_icon), gtkconv->u.im->show_icon); /* * We pause icons when they are not visible. If this icon should * be animated then start it back up again. */ - if ((gaim_conversation_get_type(conv) == GAIM_CONV_IM) && + if ((gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) && (gtkconv->u.im->animate)) start_anim(NULL, gtkconv); @@ -3036,7 +3036,7 @@ gtkwin = GAIM_GTK_WINDOW(gaim_conversation_get_window(conv)); - if(gaim_conversation_get_type(conv) == GAIM_CONV_IM) + if(gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) im = GAIM_CONV_IM(conv); if(gtkwin->menu.typing_icon) { @@ -3454,7 +3454,7 @@ /* if there's nothing there just return */ if (!gtk_text_iter_compare(&cursor, &start_buffer)) - return (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) ? TRUE : FALSE; + return (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) ? TRUE : FALSE; text = gtk_text_buffer_get_text(gtkconv->entry_buffer, &start_buffer, &cursor, FALSE); @@ -3486,14 +3486,14 @@ if (!g_utf8_strlen(entered, -1)) { g_free(entered); - return (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) ? TRUE : FALSE; + return (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) ? TRUE : FALSE; } nick_partial = g_malloc(strlen(entered)+1); if (command) { list = gaim_cmd_list(conv); - } else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) { + } else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) { chat = GAIM_CONV_CHAT(conv); list = gaim_conv_chat_get_users(chat); } else { @@ -3555,7 +3555,7 @@ g_free(entered); if (command) g_list_free(list); - return (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) ? TRUE : FALSE; + return (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) ? TRUE : FALSE; } gtk_text_buffer_delete(gtkconv->entry_buffer, &word_start, &cursor); @@ -4208,7 +4208,7 @@ * just move the conv to this window. Otherwise, create a new * conv and add it to this window. */ - c = gaim_find_conversation_with_account(GAIM_CONV_IM, b->name, b->account); + c = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, b->name, b->account); if (c != NULL) { GaimConvWindow *oldwin; oldwin = gaim_conversation_get_window(c); @@ -4217,7 +4217,7 @@ gaim_conv_window_add_conversation(win, c); } } else { - c = gaim_conversation_new(GAIM_CONV_IM, b->account, b->name); + c = gaim_conversation_new(GAIM_CONV_TYPE_IM, b->account, b->name); gaim_conv_window_add_conversation(win, c); } @@ -4243,7 +4243,7 @@ } else { - c = gaim_conversation_new(GAIM_CONV_IM, account, username); + c = gaim_conversation_new(GAIM_CONV_TYPE_IM, account, username); gaim_conv_window_add_conversation(win, c); } } @@ -4254,7 +4254,7 @@ gtk_drag_finish(dc, TRUE, (dc->action == GDK_ACTION_MOVE), t); } else if (sd->target == gdk_atom_intern("text/uri-list", FALSE)) { - if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) + if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) gaim_dnd_file_manage(sd, gaim_conversation_get_account(conv), gaim_conversation_get_name(conv)); gtk_drag_finish(dc, TRUE, (dc->action == GDK_ACTION_MOVE), t); } @@ -4406,7 +4406,7 @@ cn = (GaimBlistNode *)c; for (b = (GaimBuddy *)cn->child; b; b = (GaimBuddy *) ((GaimBlistNode *)b)->next) { GaimConversation *conv; - if ((conv = gaim_find_conversation_with_account(GAIM_CONV_IM, b->name, b->account))) { + if ((conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, b->name, b->account))) { if (conv->ui_data) return conv->ui_data; } @@ -4440,7 +4440,7 @@ tab_cont = gtkconv->tab_cont; new_ui = FALSE; - } else if (conv_type == GAIM_CONV_IM && (gtkconv = gaim_gtk_conv_find_gtkconv(conv))) { + } else if (conv_type == GAIM_CONV_TYPE_IM && (gtkconv = gaim_gtk_conv_find_gtkconv(conv))) { conv->ui_data = gtkconv; gtkconv->active_conv = conv; if (!g_list_find(gtkconv->convs, conv)) @@ -4456,21 +4456,21 @@ gtkconv->sg = gtk_size_group_new(GTK_SIZE_GROUP_BOTH); gtkconv->tooltips = gtk_tooltips_new(); - if (conv_type == GAIM_CONV_IM) { + if (conv_type == GAIM_CONV_TYPE_IM) { gtkconv->u.im = g_malloc0(sizeof(GaimGtkImPane)); gtkconv->u.im->a_virgin = TRUE; pane = setup_im_pane(gtkconv); } - else if (conv_type == GAIM_CONV_CHAT) { + else if (conv_type == GAIM_CONV_TYPE_CHAT) { gtkconv->u.chat = g_malloc0(sizeof(GaimGtkChatPane)); pane = setup_chat_pane(gtkconv); } if (pane == NULL) { - if (conv_type == GAIM_CONV_CHAT) g_free(gtkconv->u.chat); - else if (conv_type == GAIM_CONV_IM) g_free(gtkconv->u.im); + if (conv_type == GAIM_CONV_TYPE_CHAT) g_free(gtkconv->u.chat); + else if (conv_type == GAIM_CONV_TYPE_IM) g_free(gtkconv->u.im); g_free(gtkconv); conv->ui_data = NULL; @@ -4601,7 +4601,7 @@ gtk_widget_show(tabby); gtk_widget_show(menu_tabby); - if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) + if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) gaim_gtkconv_update_buddy_icon(conv); /* Add this pane to the conversation's notebook. */ @@ -4659,7 +4659,7 @@ /* If this window is setup with an inactive gc, regenerate the menu. */ - if (conv_type == GAIM_CONV_IM && + if (conv_type == GAIM_CONV_TYPE_IM && gaim_conversation_get_gc(conv) == NULL) { generate_send_as_items(win, conv); @@ -4752,7 +4752,7 @@ gtk_widget_destroy(gtkconv->tab_cont); g_object_unref(gtkconv->tab_cont); - if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) { + if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) { if (gtkconv->u.im->icon_timer != 0) g_source_remove(gtkconv->u.im->icon_timer); @@ -4761,7 +4761,7 @@ g_free(gtkconv->u.im); } - else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) { + else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) { g_free(gtkconv->u.chat); } @@ -5107,7 +5107,7 @@ gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), buf2, 0); - if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) { + if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) { GtkTextIter start, end; GtkTextTag *buddytag = get_buddy_tag(conv, who); @@ -5534,7 +5534,7 @@ { gaim_conversation_autoset_title(conv); - if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) + if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) gaim_gtkconv_update_buddy_icon(conv); gaim_gtkconv_update_buttons_by_protocol(conv); @@ -5554,10 +5554,10 @@ GaimConnection *gc = gaim_conversation_get_gc(conv); char color[8]; - if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) + if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) im = GAIM_CONV_IM(conv); - if (!gc || ((gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) + if (!gc || ((gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) && gaim_conv_chat_has_left(GAIM_CONV_CHAT(conv)))) title = g_strdup_printf("(%s)", gaim_conversation_get_title(conv)); @@ -5714,7 +5714,7 @@ g_return_if_fail(conv != NULL); g_return_if_fail(GAIM_IS_GTK_CONVERSATION(conv)); - g_return_if_fail(gaim_conversation_get_type(conv) == GAIM_CONV_IM); + g_return_if_fail(gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM); gtkconv = GAIM_GTK_CONVERSATION(conv); @@ -6073,7 +6073,7 @@ for (l = gaim_get_conversations(); l != NULL; l = l->next) { GaimConversation *conv = l->data; - if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) + if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) gaim_conversation_foreach(gaim_gtkconv_update_buddy_icon); } } diff -r 1462b64f8fc9 -r 17142948653e src/gtkdialogs.c --- a/src/gtkdialogs.c Thu Aug 25 00:27:12 2005 +0000 +++ b/src/gtkdialogs.c Thu Aug 25 02:33:44 2005 +0000 @@ -516,10 +516,10 @@ g_return_if_fail(account != NULL); g_return_if_fail(username != NULL); - conv = gaim_find_conversation_with_account(GAIM_CONV_IM, username, account); + conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, username, account); if (conv == NULL) - conv = gaim_conversation_new(GAIM_CONV_IM, account, username); + conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, account, username); win = gaim_conversation_get_window(conv); gtkwin = GAIM_GTK_WINDOW(win); @@ -829,7 +829,7 @@ GaimConversation *conv; buddy = (GaimBuddy*)bnode; bnode = bnode->next; - conv = gaim_find_conversation_with_account(GAIM_CONV_IM, + conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, buddy->name, buddy->account); if (gaim_account_is_connected(buddy->account)) { @@ -891,7 +891,7 @@ serv_remove_buddy(buddy->account->gc, buddy, group); gaim_blist_remove_buddy(buddy); - conv = gaim_find_conversation_with_account(GAIM_CONV_IM, name, account); + conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, name, account); if (conv != NULL) gaim_conversation_update(conv, GAIM_CONV_UPDATE_REMOVE); @@ -930,7 +930,7 @@ gaim_blist_remove_chat(chat); if (name != NULL) { - conv = gaim_find_conversation_with_account(GAIM_CONV_CHAT, name, account); + conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, name, account); g_free(name); } diff -r 1462b64f8fc9 -r 17142948653e src/gtkpounce.c --- a/src/gtkpounce.c Thu Aug 25 00:27:12 2005 +0000 +++ b/src/gtkpounce.c Thu Aug 25 02:33:44 2005 +0000 @@ -944,10 +944,10 @@ if (gaim_pounce_action_is_enabled(pounce, "open-window")) { - conv = gaim_find_conversation_with_account(GAIM_CONV_IM, pouncee, account); + conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, pouncee, account); if (conv == NULL) - conv = gaim_conversation_new(GAIM_CONV_IM, account, pouncee); + conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, account, pouncee); } if (gaim_pounce_action_is_enabled(pounce, "popup-notify")) @@ -999,10 +999,10 @@ if (message != NULL) { - conv = gaim_find_conversation_with_account(GAIM_CONV_IM, pouncee, account); + conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, pouncee, account); if (conv == NULL) - conv = gaim_conversation_new(GAIM_CONV_IM, account, pouncee); + conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, account, pouncee); gaim_conversation_write(conv, NULL, message, GAIM_MESSAGE_SEND, time(NULL)); diff -r 1462b64f8fc9 -r 17142948653e src/gtkutils.c --- a/src/gtkutils.c Thu Aug 25 00:27:12 2005 +0000 +++ b/src/gtkutils.c Thu Aug 25 02:33:44 2005 +0000 @@ -1401,7 +1401,7 @@ serv_send_file(gaim_account_get_connection(data->account), data->who, data->filename); break; case DND_IM_IMAGE: - conv = gaim_conversation_new(GAIM_CONV_IM, data->account, data->who); + conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, data->account, data->who); gtkconv = GAIM_GTK_CONVERSATION(conv); if (!g_file_get_contents(data->filename, &filedata, &size, @@ -1574,7 +1574,7 @@ GaimGtkConversation *gtkconv; case GAIM_DESKTOP_ITEM_TYPE_LINK: - conv = gaim_conversation_new(GAIM_CONV_IM, account, who); + conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, account, who); gtkconv = GAIM_GTK_CONVERSATION(conv); gtk_imhtml_insert_link(GTK_IMHTML(gtkconv->entry), gtk_text_buffer_get_insert(GTK_IMHTML(gtkconv->entry)->text_buffer), diff -r 1462b64f8fc9 -r 17142948653e src/protocols/irc/cmds.c --- a/src/protocols/irc/cmds.c Thu Aug 25 00:27:12 2005 +0000 +++ b/src/protocols/irc/cmds.c Thu Aug 25 02:33:44 2005 +0000 @@ -34,14 +34,14 @@ int irc_cmd_default(struct irc_conn *irc, const char *cmd, const char *target, const char **args) { - GaimConversation *convo = gaim_find_conversation_with_account(GAIM_CONV_ANY, target, irc->account); + GaimConversation *convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_ANY, target, irc->account); char *buf; if (!convo) return 1; buf = g_strdup_printf(_("Unknown command: %s"), cmd); - if (gaim_conversation_get_type(convo) == GAIM_CONV_IM) + if (gaim_conversation_get_type(convo) == GAIM_CONV_TYPE_IM) gaim_conv_im_write(GAIM_CONV_IM(convo), "", buf, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); else gaim_conv_chat_write(GAIM_CONV_CHAT(convo), "", buf, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); @@ -110,14 +110,14 @@ g_free(newargs[1]); g_free(newargs); - convo = gaim_find_conversation_with_account(GAIM_CONV_ANY, target, irc->account); + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_ANY, target, irc->account); if (convo) { escaped = g_markup_escape_text(args[0], -1); action = g_strdup_printf("/me %s", escaped); g_free(escaped); if (action[strlen(action) - 1] == '\n') action[strlen(action) - 1] = '\0'; - if (gaim_conversation_get_type(convo) == GAIM_CONV_CHAT) + if (gaim_conversation_get_type(convo) == GAIM_CONV_TYPE_CHAT) serv_got_chat_in(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(convo)), gaim_connection_get_display_name(gc), 0, action, time(NULL)); @@ -169,7 +169,7 @@ if (!args || !args[0]) return 0; - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, target, irc->account); + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, target, irc->account); if (!convo) return 0; @@ -397,7 +397,7 @@ if (!args || !args[0]) return 0; - convo = gaim_conversation_new(GAIM_CONV_IM, irc->account, args[0]); + convo = gaim_conversation_new(GAIM_CONV_TYPE_IM, irc->account, args[0]); if (args[1]) { gc = gaim_account_get_connection(irc->account); @@ -449,7 +449,7 @@ if (!args) return 0; - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, target, irc->account); + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, target, irc->account); if (!convo) return 0; diff -r 1462b64f8fc9 -r 17142948653e src/protocols/irc/msgs.c --- a/src/protocols/irc/msgs.c Thu Aug 25 00:27:12 2005 +0000 +++ b/src/protocols/irc/msgs.c Thu Aug 25 02:33:44 2005 +0000 @@ -126,7 +126,7 @@ if (!args || !args[0] || !args[1] || !args[2]) return; - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, args[1], irc->account); + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, args[1], irc->account); if (!convo) return; @@ -147,7 +147,7 @@ if (!args || !args[1] || !args[2]) return; - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, args[1], irc->account); + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, args[1], irc->account); if (!convo) /* XXX punt on channels we are not in for now */ return; @@ -305,7 +305,7 @@ topic = irc_mirc2txt (args[2]); } - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, chan, irc->account); + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, chan, irc->account); if (!convo) { gaim_debug(GAIM_DEBUG_ERROR, "irc", "Got a topic for %s, which doesn't exist\n", chan); } @@ -350,7 +350,7 @@ GaimConversation *convo; if (!strcmp(name, "366")) { - convo = gaim_find_conversation_with_account(GAIM_CONV_ANY, irc->nameconv ? irc->nameconv : args[1], irc->account); + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_ANY, irc->nameconv ? irc->nameconv : args[1], irc->account); if (!convo) { gaim_debug(GAIM_DEBUG_ERROR, "irc", "Got a NAMES list for %s, which doesn't exist\n", args[2]); g_string_free(irc->names, TRUE); @@ -364,7 +364,7 @@ irc->names = NULL; if (irc->nameconv) { msg = g_strdup_printf(_("Users on %s: %s"), args[1], names ? names : ""); - if (gaim_conversation_get_type(convo) == GAIM_CONV_CHAT) + if (gaim_conversation_get_type(convo) == GAIM_CONV_TYPE_CHAT) gaim_conv_chat_write(GAIM_CONV_CHAT(convo), "", msg, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); else gaim_conv_im_write(GAIM_CONV_IM(convo), "", msg, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); @@ -480,9 +480,9 @@ GaimConnection *gc; GaimConversation *convo; - convo = gaim_find_conversation_with_account(GAIM_CONV_ANY, args[1], irc->account); + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_ANY, args[1], irc->account); if (convo) { - if (gaim_conversation_get_type(convo) == GAIM_CONV_CHAT) /* does this happen? */ + if (gaim_conversation_get_type(convo) == GAIM_CONV_TYPE_CHAT) /* does this happen? */ gaim_conv_chat_write(GAIM_CONV_CHAT(convo), args[1], _("no such channel"), GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); else @@ -505,7 +505,7 @@ GaimConnection *gc; GaimConversation *convo; - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, args[1], irc->account); + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, args[1], irc->account); if (convo) { gaim_conv_chat_write(GAIM_CONV_CHAT(convo), args[1], args[2], GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); } else { @@ -517,7 +517,7 @@ void irc_msg_notinchan(struct irc_conn *irc, const char *name, const char *from, char **args) { - GaimConversation *convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, args[1], irc->account); + GaimConversation *convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, args[1], irc->account); gaim_debug(GAIM_DEBUG_INFO, "irc", "We're apparently not in %s, but tried to use it\n", args[1]); if (convo) { @@ -534,7 +534,7 @@ if (!args || !args[1] || !args[2]) return; - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, args[1], irc->account); + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, args[1], irc->account); if (!convo) return; @@ -632,7 +632,7 @@ return; } - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, args[0], irc->account); + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, args[0], irc->account); if (convo == NULL) { gaim_debug(GAIM_DEBUG_ERROR, "irc", "JOIN for %s failed\n", args[0]); g_free(nick); @@ -654,7 +654,7 @@ void irc_msg_kick(struct irc_conn *irc, const char *name, const char *from, char **args) { GaimConnection *gc = gaim_account_get_connection(irc->account); - GaimConversation *convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, args[0], irc->account); + GaimConversation *convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, args[0], irc->account); char *nick = irc_mask_nick(from), *buf, *reason; if (!gc) { @@ -692,7 +692,7 @@ if (*args[0] == '#' || *args[0] == '&') { /* Channel */ char *escaped; - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, args[0], irc->account); + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, args[0], irc->account); if (!convo) { gaim_debug(GAIM_DEBUG_ERROR, "irc", "MODE received for %s, which we are not in\n", args[0]); g_free(nick); @@ -772,7 +772,7 @@ chats = chats->next; } - conv = gaim_find_conversation_with_account(GAIM_CONV_IM, nick, + conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, nick, irc->account); if (conv != NULL) gaim_conversation_set_name(conv, args[0]); @@ -834,7 +834,7 @@ if (!args || !args[0] || !gc) return; - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, args[0], irc->account); + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, args[0], irc->account); if (!convo) { gaim_debug(GAIM_DEBUG_INFO, "irc", "Got a PART on %s, which doesn't exist -- probably closed\n", args[0]); return; @@ -890,10 +890,10 @@ msg = g_strdup_printf(_("PING reply -- Lag: %lu seconds"), time(NULL) - oldstamp); } - convo = gaim_find_conversation_with_account(GAIM_CONV_ANY, parts[0], irc->account); + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_ANY, parts[0], irc->account); g_strfreev(parts); if (convo) { - if (gaim_conversation_get_type (convo) == GAIM_CONV_CHAT) + if (gaim_conversation_get_type (convo) == GAIM_CONV_TYPE_CHAT) gaim_conv_chat_write(GAIM_CONV_CHAT(convo), "PONG", msg, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); else gaim_conv_im_write(GAIM_CONV_IM(convo), "PONG", msg, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); @@ -944,7 +944,7 @@ } else if (notice) { serv_got_im(gc, nick, msg, 0, time(NULL)); } else { - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, args[0], irc->account); + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, args[0], irc->account); if (convo) serv_got_chat_in(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(convo)), nick, 0, msg, time(NULL)); else diff -r 1462b64f8fc9 -r 17142948653e src/protocols/jabber/jutil.c --- a/src/protocols/jabber/jutil.c Thu Aug 25 00:27:12 2005 +0000 +++ b/src/protocols/jabber/jutil.c Thu Aug 25 02:33:44 2005 +0000 @@ -224,7 +224,7 @@ for(cnv = gaim_get_conversations(); cnv; cnv = cnv->next) { c = (GaimConversation*)cnv->data; - if(gaim_conversation_get_type(c) == GAIM_CONV_IM && + if(gaim_conversation_get_type(c) == GAIM_CONV_TYPE_IM && !gaim_utf8_strcasecmp(name, gaim_conversation_get_name(c)) && account == gaim_conversation_get_account(c)) return c; diff -r 1462b64f8fc9 -r 17142948653e src/protocols/msn/slp.c --- a/src/protocols/msn/slp.c Thu Aug 25 00:27:12 2005 +0000 +++ b/src/protocols/msn/slp.c Thu Aug 25 02:33:44 2005 +0000 @@ -767,7 +767,7 @@ gc = slpcall->slplink->session->account->gc; who = slpcall->slplink->remote_user; - conv = gaim_find_conversation_with_account(GAIM_CONV_ANY, who, gc->account); + conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_ANY, who, gc->account); /* FIXME: it would be better if we wrote the data as we received it instead of all at once, calling write multiple times and @@ -813,7 +813,7 @@ gc = slplink->session->account->gc; - conversation = gaim_find_conversation_with_account(GAIM_CONV_ANY, who, gc->account); + conversation = gaim_find_conversation_with_account(GAIM_CONV_TYPE_ANY, who, gc->account); if (gaim_conv_custom_smiley_add(conversation, smile, "sha1", sha1c)) { msn_slplink_request_object(slplink, smile, got_emoticon, NULL, obj); diff -r 1462b64f8fc9 -r 17142948653e src/protocols/msn/switchboard.c --- a/src/protocols/msn/switchboard.c Thu Aug 25 00:27:12 2005 +0000 +++ b/src/protocols/msn/switchboard.c Thu Aug 25 02:33:44 2005 +0000 @@ -232,7 +232,7 @@ } if ((swboard->conv != NULL) && - (gaim_conversation_get_type(swboard->conv) == GAIM_CONV_CHAT)) + (gaim_conversation_get_type(swboard->conv) == GAIM_CONV_TYPE_CHAT)) { gaim_conv_chat_add_user(GAIM_CONV_CHAT(swboard->conv), user, NULL, GAIM_CBFLAGS_NONE, TRUE); @@ -240,7 +240,7 @@ else if (swboard->current_users > 1 || swboard->total_users > 1) { if (swboard->conv == NULL || - gaim_conversation_get_type(swboard->conv) != GAIM_CONV_CHAT) + gaim_conversation_get_type(swboard->conv) != GAIM_CONV_TYPE_CHAT) { GList *l; @@ -290,8 +290,8 @@ } else if (swboard->conv == NULL) { - /* XXX - I think this should probably be GAIM_CONV_CHAT, but I'm hedging */ - swboard->conv = gaim_find_conversation_with_account(GAIM_CONV_ANY, + /* XXX - I think this should probably be GAIM_CONV_TYPE_CHAT, but I'm hedging */ + swboard->conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_ANY, user, account); } else @@ -314,8 +314,8 @@ account = swboard->session->account; - /* XXX - I think this should probably be GAIM_CONV_IM, but I'm hedging */ - return gaim_find_conversation_with_account(GAIM_CONV_IM, + /* XXX - I think this should probably be GAIM_CONV_TYPE_IM, but I'm hedging */ + return gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, swboard->im_user, account); } @@ -650,7 +650,7 @@ msn_switchboard_destroy(swboard); } else if ((swboard->current_users > 1) || - (gaim_conversation_get_type(swboard->conv) == GAIM_CONV_CHAT)) + (gaim_conversation_get_type(swboard->conv) == GAIM_CONV_TYPE_CHAT)) { /* This is a switchboard used for a chat */ gaim_conv_chat_remove_user(GAIM_CONV_CHAT(swboard->conv), user, NULL); @@ -862,7 +862,7 @@ if (swboard->current_users > 1 || ((swboard->conv != NULL) && - gaim_conversation_get_type(swboard->conv) == GAIM_CONV_CHAT)) + gaim_conversation_get_type(swboard->conv) == GAIM_CONV_TYPE_CHAT)) { /* If current_users is always ok as it should then there is no need to * check if this is a chat. */ @@ -883,7 +883,7 @@ serv_got_im(gc, passport, body_final, 0, time(NULL)); if (swboard->conv == NULL) { - swboard->conv = gaim_find_conversation_with_account(GAIM_CONV_IM, + swboard->conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, passport, gaim_connection_get_account(gc)); swboard->flag |= MSN_SB_FLAG_IM; } diff -r 1462b64f8fc9 -r 17142948653e src/protocols/msn/userlist.c --- a/src/protocols/msn/userlist.c Thu Aug 25 00:27:12 2005 +0000 +++ b/src/protocols/msn/userlist.c Thu Aug 25 02:33:44 2005 +0000 @@ -266,7 +266,7 @@ "%s has added you to his or her contact list.\n", passport); - convo = gaim_find_conversation_with_account(GAIM_CONV_IM, passport, account); + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, passport, account); if (convo) { GaimBuddy *buddy; char *msg; @@ -330,7 +330,7 @@ "%s has removed you from his or her contact list.\n", passport); - convo = gaim_find_conversation_with_account(GAIM_CONV_IM, passport, account); + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, passport, account); if (convo) { GaimBuddy *buddy; char *msg; diff -r 1462b64f8fc9 -r 17142948653e src/protocols/novell/novell.c --- a/src/protocols/novell/novell.c Thu Aug 25 00:27:12 2005 +0000 +++ b/src/protocols/novell/novell.c Thu Aug 25 02:33:44 2005 +0000 @@ -194,8 +194,8 @@ if (user_record) { /* Set the title for the conversation */ - /* XXX - Should this be GAIM_CONV_IM? */ - gconv = gaim_find_conversation_with_account(GAIM_CONV_ANY, + /* XXX - Should this be GAIM_CONV_TYPE_IM? */ + gconv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_ANY, nm_user_record_get_display_id(user_record), (GaimAccount *) user->client_data); if (gconv) { @@ -1762,7 +1762,7 @@ text, imflags, nm_event_get_gmt(event)); - gconv = gaim_find_conversation_with_account(GAIM_CONV_IM, + gconv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, nm_user_record_get_display_id(user_record), (GaimAccount *) user->client_data); if (gconv) { @@ -2038,9 +2038,9 @@ ur = nm_find_user_record(user, nm_event_get_source(event)); if (ur) { - /* XXX - Should this be GAIM_CONV_IM? */ + /* XXX - Should this be GAIM_CONV_TYPE_IM? */ gconv = - gaim_find_conversation_with_account(GAIM_CONV_ANY, + gaim_find_conversation_with_account(GAIM_CONV_TYPE_ANY, nm_user_record_get_display_id(ur), user->client_data); if (gconv) { diff -r 1462b64f8fc9 -r 17142948653e src/protocols/oscar/aim.h --- a/src/protocols/oscar/aim.h Thu Aug 25 00:27:12 2005 +0000 +++ b/src/protocols/oscar/aim.h Thu Aug 25 02:33:44 2005 +0000 @@ -9,7 +9,6 @@ #ifndef __AIM_H__ #define __AIM_H__ -#include "faimconfig.h" #include "aim_cbtypes.h" #include "debug.h" @@ -46,11 +45,12 @@ typedef guint32 aim_snacid_t; typedef guint16 flap_seqnum_t; +#define WIN32_STATIC #if defined(_WIN32) && !defined(WIN32_STATIC) /* * For a win32 DLL, we define WIN32_INDLL if this file - * is included while compiling the DLL. If its not - * defined (its included in a client app), the symbols + * is included while compiling the DLL. If it's not + * defined (it's included in a client app), the symbols * will be imported instead of exported. */ #ifdef WIN32_INDLL @@ -75,8 +75,10 @@ #define TRUE (!FALSE) #endif -/* - * Current Maximum Length for Screen Names (not including NULL) +#define FAIM_SNAC_HASH_SIZE 16 + +/* + * Current Maximum Length for Screen Names (not including NULL) * * Currently only names up to 16 characters can be registered * however it is apparently legal for them to be larger. diff -r 1462b64f8fc9 -r 17142948653e src/protocols/oscar/faimconfig.h --- a/src/protocols/oscar/faimconfig.h Thu Aug 25 00:27:12 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -/* - * faimconfig.h - * - * Contains various compile-time options that apply _only_ to libfaim. - * - */ - -#ifndef __FAIMCONFIG_H__ -#define __FAIMCONFIG_H__ - -/* - * USE_SNAC_FOR_IMS is an old feature that allowed better - * tracking of error messages by caching SNAC IDs of outgoing - * ICBMs and comparing them to incoming errors. However, - * its a helluvalot of overhead for something that should - * rarely happen. - * - * Default: defined. This is now defined by default - * because it should be stable and its not too bad. - * And Josh wanted it. - * - */ -#define USE_SNAC_FOR_IMS - -/* - * Default Authorizer server name and TCP port for the OSCAR farm. - * - * You shouldn't need to change this unless you're writing - * your own server. - * - * Note that only one server is needed to start the whole - * AIM process. The later server addresses come from - * the authorizer service. - * - * This is only here for convenience. Its still up to - * the client to connect to it. - * - */ -#define FAIM_LOGIN_SERVER "login.oscar.aol.com" -#define FAIM_LOGIN_PORT 5190 - -/* - * Size of the SNAC caching hash. - * - * Default: 16 - * - */ -#define FAIM_SNAC_HASH_SIZE 16 - -/* - * If building on Win32, define WIN32_STATIC if you don't want - * to compile libfaim as a DLL (and instead link it right into - * your app). - */ -#define WIN32_STATIC - -#endif /* __FAIMCONFIG_H__ */ - - diff -r 1462b64f8fc9 -r 17142948653e src/protocols/oscar/oscar.c --- a/src/protocols/oscar/oscar.c Thu Aug 25 00:27:12 2005 +0000 +++ b/src/protocols/oscar/oscar.c Thu Aug 25 02:33:44 2005 +0000 @@ -61,6 +61,8 @@ #define AIMHASHDATA "http://gaim.sourceforge.net/aim_data.php3" #define OSCAR_CONNECT_STEPS 6 +#define OSCAR_DEFAULT_LOGIN_SERVER "login.oscar.aol.com" +#define OSCAR_DEFAULT_LOGIN_PORT 5190 #define OSCAR_DEFAULT_CUSTOM_ENCODING "ISO-8859-1" #define OSCAR_DEFAULT_AUTHORIZATION TRUE #define OSCAR_DEFAULT_HIDE_IP TRUE @@ -952,7 +954,7 @@ else g_snprintf(buf, sizeof buf, _("Direct IM with %s failed"), dim->name); - conv = gaim_find_conversation_with_account(GAIM_CONV_IM, dim->name, + conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, dim->name, gaim_connection_get_account(dim->gc)); if (conv) { gaim_conversation_write(conv, NULL, buf, GAIM_MESSAGE_SYSTEM, time(NULL)); @@ -1030,7 +1032,7 @@ dim->conn->fd = source; aim_conn_completeconnect(od->sess, dim->conn); - conv = gaim_conversation_new(GAIM_CONV_IM, dim->gc->account, dim->name); + conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, dim->gc->account, dim->name); /* This is the best way to see if we're connected or not */ /* Is this really needed? */ @@ -1115,7 +1117,7 @@ dim->gpc_pend = TRUE; rc = gaim_proxy_connect(gc->account, host, port, oscar_odc_callback, dim); - conv = gaim_conversation_new(GAIM_CONV_IM, dim->gc->account, d->sn); + conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, dim->gc->account, d->sn); tmp = g_strdup_printf(_("Attempting to connect to %s at %s:%hu for Direct IM."), d->sn, host, port); gaim_conversation_write(conv, NULL, tmp, GAIM_MESSAGE_SYSTEM, time(NULL)); @@ -1161,7 +1163,7 @@ "DirectIM: initiate success to %s\n", sn); dim = oscar_direct_im_find(od, sn); - conv = gaim_conversation_new(GAIM_CONV_IM, dim->gc->account, sn); + conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, dim->gc->account, sn); gaim_input_remove(dim->watcher); dim->conn = newconn; dim->watcher = gaim_input_add(dim->conn->fd, GAIM_INPUT_READ, oscar_callback, dim->conn); @@ -1204,7 +1206,7 @@ dim->watcher = 0; } - c = gaim_find_conversation_with_account(GAIM_CONV_IM, sn, + c = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, sn, gaim_connection_get_account(gc)); if (c != NULL) gaim_conversation_update_progress(c, percent); @@ -1541,7 +1543,7 @@ aim_conn_addhandler(od->sess, dim->conn, AIM_CB_FAM_OFT, AIM_CB_OFT_DIRECTIM_ESTABLISHED, gaim_odc_initiate, 0); - conv = gaim_conversation_new(GAIM_CONV_IM, dim->gc->account, who); + conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, dim->gc->account, who); tmp = g_strdup_printf(_("Asking %s to connect to us at %s:%hu for Direct IM."), who, ip, gaim_network_get_port_from_fd(listenfd)); gaim_conversation_write(conv, NULL, tmp, GAIM_MESSAGE_SYSTEM, time(NULL)); @@ -1809,8 +1811,8 @@ aim_conn_addhandler(sess, conn, AIM_CB_FAM_ATH, AIM_CB_ATH_SECURID_REQUEST, gaim_parse_auth_securid_request, 0); conn->status |= AIM_CONN_STATUS_INPROGRESS; - if (gaim_proxy_connect(account, gaim_account_get_string(account, "server", FAIM_LOGIN_SERVER), - gaim_account_get_int(account, "port", FAIM_LOGIN_PORT), + if (gaim_proxy_connect(account, gaim_account_get_string(account, "server", OSCAR_DEFAULT_LOGIN_SERVER), + gaim_account_get_int(account, "port", OSCAR_DEFAULT_LOGIN_PORT), oscar_login_connect, gc) < 0) { gaim_connection_error(gc, _("Couldn't connect to host")); return; @@ -2297,7 +2299,7 @@ va_list ap; struct aim_authresp_info *info; - port = gaim_account_get_int(account, "port", FAIM_LOGIN_PORT); + port = gaim_account_get_int(account, "port", OSCAR_DEFAULT_LOGIN_PORT); va_start(ap, fr); info = va_arg(ap, struct aim_authresp_info *); @@ -2892,7 +2894,7 @@ va_list ap; struct aim_redirect_data *redir; - port = gaim_account_get_int(account, "port", FAIM_LOGIN_PORT); + port = gaim_account_get_int(account, "port", OSCAR_DEFAULT_LOGIN_PORT); va_start(ap, fr); redir = va_arg(ap, struct aim_redirect_data *); @@ -5122,6 +5124,7 @@ static int gaim_parse_locaterights(aim_session_t *sess, aim_frame_t *fr, ...) { GaimConnection *gc = sess->aux_data; + GaimAccount *account = gaim_connection_get_account(gc); OscarData *od = (OscarData *)gc->proto_data; va_list ap; fu16_t maxsiglen; @@ -5139,7 +5142,8 @@ aim_locate_setcaps(od->sess, caps_icq); else aim_locate_setcaps(od->sess, caps_aim); - oscar_set_info(gc, gc->account->user_info); + oscar_set_info(gc, account->user_info); + /* TODO: Should set the status here, as well. */ return 1; } @@ -5641,7 +5645,7 @@ gsize len; GaimConversation *conv; - conv = gaim_find_conversation_with_account(GAIM_CONV_IM, name, account); + conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, name, account); if (strstr(message, "gc != gc) return; /* not ours */ - if(gaim_conversation_get_type(g_conv) != GAIM_CONV_IM) + if(gaim_conversation_get_type(g_conv) != GAIM_CONV_TYPE_IM) return; /* wrong type */ who.user = (char *) gaim_conversation_get_name(g_conv); @@ -1968,7 +1968,7 @@ idb = mwConversation_getTarget(conv); - return gaim_find_conversation_with_account(GAIM_CONV_IM,idb->user, acct); + return gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM,idb->user, acct); } @@ -2119,9 +2119,9 @@ idb = mwConversation_getTarget(conv); - gconv = gaim_find_conversation_with_account(GAIM_CONV_IM, idb->user, acct); + gconv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, idb->user, acct); if(! gconv) { - gconv = gaim_conversation_new(GAIM_CONV_IM, acct, idb->user); + gconv = gaim_conversation_new(GAIM_CONV_TYPE_IM, acct, idb->user); } g_return_if_fail(gconv != NULL); diff -r 1462b64f8fc9 -r 17142948653e src/protocols/silc/buddy.c --- a/src/protocols/silc/buddy.c Thu Aug 25 00:27:12 2005 +0000 +++ b/src/protocols/silc/buddy.c Thu Aug 25 02:33:44 2005 +0000 @@ -93,12 +93,12 @@ silc_ske_free_key_material(key); /* Open IM window */ - convo = gaim_find_conversation_with_account(GAIM_CONV_IM, + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, client_entry->nickname, sg->account); if (convo) gaim_conv_window_show(gaim_conversation_get_window(convo)); else - convo = gaim_conversation_new(GAIM_CONV_IM, sg->account, + convo = gaim_conversation_new(GAIM_CONV_TYPE_IM, sg->account, client_entry->nickname); g_snprintf(tmp, sizeof(tmp), "%s [private key]", client_entry->nickname); gaim_conversation_set_title(convo, tmp); diff -r 1462b64f8fc9 -r 17142948653e src/protocols/silc/chat.c --- a/src/protocols/silc/chat.c Thu Aug 25 00:27:12 2005 +0000 +++ b/src/protocols/silc/chat.c Thu Aug 25 02:33:44 2005 +0000 @@ -982,7 +982,7 @@ /* Add channel to Gaim */ channel->context = SILC_32_TO_PTR(++sg->channel_ids); serv_got_joined_chat(gc, sg->channel_ids, channel->channel_name); - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, channel->channel_name, sg->account); if (!convo) return; diff -r 1462b64f8fc9 -r 17142948653e src/protocols/silc/ops.c --- a/src/protocols/silc/ops.c Thu Aug 25 00:27:12 2005 +0000 +++ b/src/protocols/silc/ops.c Thu Aug 25 02:33:44 2005 +0000 @@ -63,13 +63,13 @@ for (l = sg->grps; l; l = l->next) if (((SilcGaimPrvgrp)l->data)->key == key) { prv = l->data; - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, prv->channel, sg->account); break; } } if (!convo) - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, channel->channel_name, sg->account); if (!convo) return; @@ -149,8 +149,8 @@ return; if (sender->nickname) - /* XXX - Should this be GAIM_CONV_IM? */ - convo = gaim_find_conversation_with_account(GAIM_CONV_ANY, + /* XXX - Should this be GAIM_CONV_TYPE_IM? */ + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_ANY, sender->nickname, sg->account); if (flags & SILC_MESSAGE_FLAG_SIGNED && @@ -265,7 +265,7 @@ if (client_entry == conn->local_entry) break; - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, channel->channel_name, sg->account); if (!convo) break; @@ -282,7 +282,7 @@ client_entry = va_arg(va, SilcClientEntry); channel = va_arg(va, SilcChannelEntry); - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, channel->channel_name, sg->account); if (!convo) break; @@ -303,7 +303,7 @@ /* Remove from all channels */ silc_hash_table_list(client_entry->channels, &htl); while (silc_hash_table_get(&htl, NULL, (void *)&chu)) { - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, chu->channel->channel_name, sg->account); if (!convo) continue; @@ -323,7 +323,7 @@ tmp = va_arg(va, char *); channel = va_arg(va, SilcChannelEntry); - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, channel->channel_name, sg->account); if (!convo) break; @@ -381,7 +381,7 @@ /* Change nick on all channels */ silc_hash_table_list(client_entry2->channels, &htl); while (silc_hash_table_get(&htl, NULL, (void *)&chu)) { - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, chu->channel->channel_name, sg->account); if (!convo) continue; @@ -405,7 +405,7 @@ buffer = va_arg(va, SilcBuffer); channel = va_arg(va, SilcChannelEntry); - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, channel->channel_name, sg->account); if (!convo) break; @@ -442,7 +442,7 @@ client_entry2 = va_arg(va, SilcClientEntry); channel = va_arg(va, SilcChannelEntry); - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, channel->channel_name, sg->account); if (!convo) break; @@ -488,7 +488,7 @@ client_entry2 = va_arg(va, SilcClientEntry); channel = va_arg(va, SilcChannelEntry); - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, channel->channel_name, sg->account); if (!convo) break; @@ -543,7 +543,7 @@ /* Remove us from all channels */ silc_hash_table_list(client_entry->channels, &htl); while (silc_hash_table_get(&htl, NULL, (void *)&chu)) { - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, chu->channel->channel_name, sg->account); if (!convo) continue; @@ -574,7 +574,7 @@ /* Remove user from all channels */ silc_hash_table_list(client_entry->channels, &htl); while (silc_hash_table_get(&htl, NULL, (void *)&chu)) { - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, chu->channel->channel_name, sg->account); if (!convo) continue; @@ -607,7 +607,7 @@ silc_hash_table_list(clients[i]->channels, &htl); while (silc_hash_table_get(&htl, NULL, (void *)&chu)) { convo = - gaim_find_conversation_with_account(GAIM_CONV_CHAT, + gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, chu->channel->channel_name, sg->account); if (!convo) continue; @@ -1174,7 +1174,7 @@ channel = va_arg(vp, SilcChannelEntry); - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, channel->channel_name, sg->account); if (!convo) { gaim_debug_error("silc", "Got a topic for %s, which doesn't exist\n", @@ -1209,7 +1209,7 @@ /* Change nick on all channels */ silc_hash_table_list(local_entry->channels, &htl); while (silc_hash_table_get(&htl, NULL, (void *)&chu)) { - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, chu->channel->channel_name, sg->account); if (!convo) continue; diff -r 1462b64f8fc9 -r 17142948653e src/protocols/silc/silc.c --- a/src/protocols/silc/silc.c Thu Aug 25 00:27:12 2005 +0000 +++ b/src/protocols/silc/silc.c Thu Aug 25 02:33:44 2005 +0000 @@ -854,7 +854,7 @@ char tmp[256], *nickname = NULL; SilcClientEntry client_entry; - convo = gaim_find_conversation_with_account(GAIM_CONV_IM, im->nick, + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, im->nick, sg->account); if (!convo) return; @@ -992,7 +992,7 @@ return GAIM_CMD_RET_FAILED; if(args && args[0]) { - convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, args[0], + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, args[0], gc->account); } else convo = conv; @@ -1131,7 +1131,7 @@ account = gaim_connection_get_account(gc); - convo = gaim_conversation_new(GAIM_CONV_IM, account, args[0]); + convo = gaim_conversation_new(GAIM_CONV_TYPE_IM, account, args[0]); if (args[1]) { ret = silcgaim_send_im(gc, args[0], args[1], GAIM_MESSAGE_SEND); diff -r 1462b64f8fc9 -r 17142948653e src/protocols/yahoo/yahoo.c --- a/src/protocols/yahoo/yahoo.c Thu Aug 25 00:27:12 2005 +0000 +++ b/src/protocols/yahoo/yahoo.c Thu Aug 25 02:33:44 2005 +0000 @@ -713,7 +713,7 @@ gaim_str_strip_cr(m); if (!strcmp(m, "")) { - GaimConversation *c = gaim_conversation_new(GAIM_CONV_IM, + GaimConversation *c = gaim_conversation_new(GAIM_CONV_TYPE_IM, gaim_connection_get_account(gc), im->from); gaim_conv_im_write(GAIM_CONV_IM(c), "", _("Buzz!!"), GAIM_MESSAGE_NICK|GAIM_MESSAGE_RECV, im->time); @@ -1688,7 +1688,7 @@ serv_add_deny(account->gc, name); /* The follow should really be done by the core... */ - conv = gaim_find_conversation_with_account(GAIM_CONV_IM, name, account); + conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, name, account); if (conv != NULL) gaim_conversation_update(conv, GAIM_CONV_UPDATE_REMOVE); diff -r 1462b64f8fc9 -r 17142948653e src/protocols/zephyr/zephyr.c --- a/src/protocols/zephyr/zephyr.c Thu Aug 25 00:27:12 2005 +0000 +++ b/src/protocols/zephyr/zephyr.c Thu Aug 25 02:33:44 2005 +0000 @@ -861,7 +861,7 @@ serv_got_chat_in(gc, zt2->id, send_inst_utf8, 0, buf3, time(NULL)); g_free(send_inst); - gconv1 = gaim_find_conversation_with_account(GAIM_CONV_CHAT, + gconv1 = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, zt2->name, gc->account); gcc = gaim_conversation_get_chat_data(gconv1); @@ -2008,7 +2008,7 @@ sig = zephyr_get_signature(); - gconv1 = gaim_find_conversation_with_account(GAIM_CONV_CHAT, zt->name, + gconv1 = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, zt->name, gc->account); gcc = gaim_conversation_get_chat_data(gconv1); @@ -2469,7 +2469,7 @@ /* find_sub_by_id can return NULL */ if (!zt) return; - gconv = gaim_find_conversation_with_account(GAIM_CONV_CHAT, zt->name, + gconv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, zt->name, gc->account); gcc = gaim_conversation_get_chat_data(gconv); diff -r 1462b64f8fc9 -r 17142948653e src/server.c --- a/src/server.c Thu Aug 25 00:27:12 2005 +0000 +++ b/src/server.c Thu Aug 25 02:33:44 2005 +0000 @@ -147,7 +147,7 @@ account = gaim_connection_get_account(gc); presence = gaim_account_get_presence(account); - conv = gaim_find_conversation_with_account(GAIM_CONV_IM, name, gc->account); + conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, name, gc->account); if (prpl_info && prpl_info->send_im) val = prpl_info->send_im(gc, name, message, imflags); @@ -343,7 +343,7 @@ b = buds->data; gaim_blist_server_alias_buddy(b, alias); - conv = gaim_find_conversation_with_account(GAIM_CONV_IM, b->name, account); + conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, b->name, account); if (conv != NULL && b->server_alias != NULL && strcmp(b->server_alias, alias)) @@ -628,7 +628,7 @@ * We should update the conversation window buttons and menu, * if it exists. */ - cnv = gaim_find_conversation_with_account(GAIM_CONV_IM, who, gc->account); + cnv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, who, gc->account); /* * Plugin stuff. we pass a char ** but we don't want to pass what's @@ -758,7 +758,7 @@ * while away), and then write it to the convo window. */ if (cnv == NULL) - cnv = gaim_conversation_new(GAIM_CONV_IM, account, name); + cnv = gaim_conversation_new(GAIM_CONV_TYPE_IM, account, name); gaim_conv_im_write(GAIM_CONV_IM(cnv), NULL, message, msgflags, mtime); } @@ -861,7 +861,7 @@ #if 0 if (docklet_count && gaim_prefs_get_bool("/plugins/gtk/docklet/queue_messages") && - !gaim_find_conversation_with_account(GAIM_CONV_IM, name, gc->account)) { + !gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, name, gc->account)) { /* * We're gonna queue it up and wait for the user to ask for * it... probably by clicking the docklet or windows tray icon. @@ -878,7 +878,7 @@ else { #endif if (cnv == NULL) - cnv = gaim_conversation_new(GAIM_CONV_IM, gc->account, name); + cnv = gaim_conversation_new(GAIM_CONV_TYPE_IM, gc->account, name); gaim_conv_im_write(GAIM_CONV_IM(cnv), NULL, message, msgflags, mtime); #if 0 @@ -897,7 +897,7 @@ GaimConversation *cnv; GaimConvIm *im; - cnv = gaim_find_conversation_with_account(GAIM_CONV_IM, name, gc->account); + cnv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, name, gc->account); if (!cnv) return; @@ -933,7 +933,7 @@ GaimConvIm *im; GaimBuddy *b; - c = gaim_find_conversation_with_account(GAIM_CONV_IM, name, gc->account); + c = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, name, gc->account); if (!c) return; @@ -1034,7 +1034,7 @@ account = gaim_connection_get_account(gc); - conv = gaim_conversation_new(GAIM_CONV_CHAT, account, name); + conv = gaim_conversation_new(GAIM_CONV_TYPE_CHAT, account, name); chat = GAIM_CONV_CHAT(conv); if (!g_slist_find(gc->buddy_chats, conv))