Mercurial > pidgin.yaz
changeset 7118:bf630f7dfdcd
[gaim-migrate @ 7685]
Here's a commit that I think will make faceprint happy. GaimWindow ->
GaimConvWindow, GaimIm -> GaimConvIm, GaimChat -> GaimConvChat,
GaimBlistChat -> GaimChat, and updated the API functions as well. Plugin
authors are going to hunt me down and murder me. I can feel it..
committer: Tailor Script <tailor@pidgin.im>
line wrap: on
line diff
--- a/ChangeLog Thu Oct 02 02:15:36 2003 +0000 +++ b/ChangeLog Thu Oct 02 02:54:07 2003 +0000 @@ -5,6 +5,7 @@ they are away. * Re-write of Jabber protocol plugin * Massive core/UI splitting. + * Conversation API changes. * SSL support can now be provided by third party plugins. * Multiple copies of gaim installed at different locations no longer attempt to load the same, possibly incompatible plugins
--- a/plugins/docklet/docklet.c Thu Oct 02 02:15:36 2003 +0000 +++ b/plugins/docklet/docklet.c Thu Oct 02 02:54:07 2003 +0000 @@ -376,7 +376,7 @@ } static gboolean -gaim_im_recv(GaimAccount *account, GaimConversation *conv, char **who, +gaim_conv_im_recv(GaimAccount *account, GaimConversation *conv, char **who, char **what, int *flags, void *data) { /* if message queuing while away is enabled, this event could be the first @@ -436,7 +436,7 @@ gaim_signal_connect(accounts_handle, "account-away", plugin, GAIM_CALLBACK(gaim_away), NULL); gaim_signal_connect(conv_handle, "received-im-msg", - plugin, GAIM_CALLBACK(gaim_im_recv), NULL); + plugin, GAIM_CALLBACK(gaim_conv_im_recv), NULL); gaim_signal_connect(conv_handle, "conversation-created", plugin, GAIM_CALLBACK(gaim_new_conversation), NULL);
--- a/plugins/gestures/gestures.c Thu Oct 02 02:15:36 2003 +0000 +++ b/plugins/gestures/gestures.c Thu Oct 02 02:54:07 2003 +0000 @@ -55,7 +55,7 @@ stroke_prev_tab(GtkWidget *widget, void *data) { GaimConversation *conv; - GaimWindow *win; + GaimConvWindow *win; unsigned int index; conv = (GaimConversation *)data; @@ -63,50 +63,50 @@ index = gaim_conversation_get_index(conv); if (index == 0) - index = gaim_window_get_conversation_count(win) - 1; + index = gaim_conv_window_get_conversation_count(win) - 1; else index--; - gaim_window_switch_conversation(win, index); + gaim_conv_window_switch_conversation(win, index); } static void stroke_next_tab(GtkWidget *widget, void *data) { GaimConversation *conv; - GaimWindow *win; + GaimConvWindow *win; unsigned int index; conv = (GaimConversation *)data; win = gaim_conversation_get_window(conv); index = gaim_conversation_get_index(conv); - if (index == gaim_window_get_conversation_count(win) - 1) + if (index == gaim_conv_window_get_conversation_count(win) - 1) index = 0; else index++; - gaim_window_switch_conversation(win, index); + gaim_conv_window_switch_conversation(win, index); } void stroke_new_win(GtkWidget *widget, void *data) { - GaimWindow *new_win, *old_win; + GaimConvWindow *new_win, *old_win; GaimConversation *conv; conv = (GaimConversation *)data; old_win = gaim_conversation_get_window(conv); - if (gaim_window_get_conversation_count(old_win) <= 1) + if (gaim_conv_window_get_conversation_count(old_win) <= 1) return; - new_win = gaim_window_new(); + new_win = gaim_conv_window_new(); - gaim_window_remove_conversation(old_win, gaim_conversation_get_index(conv)); - gaim_window_add_conversation(new_win, conv); + gaim_conv_window_remove_conversation(old_win, gaim_conversation_get_index(conv)); + gaim_conv_window_add_conversation(new_win, conv); - gaim_window_show(new_win); + gaim_conv_window_show(new_win); } static void
--- a/plugins/iconaway.c Thu Oct 02 02:15:36 2003 +0000 +++ b/plugins/iconaway.c Thu Oct 02 02:54:07 2003 +0000 @@ -21,7 +21,7 @@ static void iconify_windows(GaimAccount *account, char *state, char *message, void *data) { - GaimWindow *win; + GaimConvWindow *win; GList *windows; GaimConnection *gc; @@ -37,7 +37,7 @@ windows != NULL; windows = windows->next) { - win = (GaimWindow *)windows->data; + win = (GaimConvWindow *)windows->data; if (GAIM_IS_GTK_WINDOW(win)) { GaimGtkWindow *gtkwin;
--- a/plugins/notify.c Thu Oct 02 02:15:36 2003 +0000 +++ b/plugins/notify.c Thu Oct 02 02:54:07 2003 +0000 @@ -84,7 +84,7 @@ static int notify(GaimConversation *conv, gboolean increment); static gboolean unnotify(GaimConversation *conv, gboolean reset); static int unnotify_cb(GtkWidget *widget, GaimConversation *conv); -static void renotify(GaimWindow *gaimwin); +static void renotify(GaimConvWindow *gaimwin); /* gtk widget callbacks for prefs panel */ static void type_toggle_cb(GtkWidget *widget, gpointer data); @@ -110,7 +110,7 @@ static int notify(GaimConversation *conv, gboolean increment) { - GaimWindow *gaimwin = NULL; + GaimConvWindow *gaimwin = NULL; GaimGtkWindow *gtkwin = NULL; /* Window focus_return; @@ -139,7 +139,7 @@ /* TODO need to test these different levels of having focus * only still need to test the window has focus, but tab doesn't one */ if (gaim_prefs_get_bool("/plugins/gtk/X11/notify/type_focused") || - (has_focus && gaim_window_get_active_conversation(gaimwin) != conv) || + (has_focus && gaim_conv_window_get_active_conversation(gaimwin) != conv) || !has_focus) { if (increment) { count = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(gtkwin->window), "notify-message-count")); @@ -167,7 +167,7 @@ { GaimConversation *active_conv = NULL; GaimGtkWindow *gtkwin = NULL; - GaimWindow *gaimwin = NULL; + GaimConvWindow *gaimwin = NULL; gint count; if (conv == NULL) @@ -175,7 +175,7 @@ gaimwin = gaim_conversation_get_window(conv); gtkwin = GAIM_GTK_WINDOW(gaimwin); - active_conv = gaim_window_get_active_conversation(gaimwin); + active_conv = gaim_conv_window_get_active_conversation(gaimwin); /* This should mean that there is no notification on the window */ count = GPOINTER_TO_INT(gaim_conversation_get_data(conv, "notify-message-count")); @@ -211,12 +211,12 @@ } static void -renotify(GaimWindow *gaimwin) +renotify(GaimConvWindow *gaimwin) { GList *convs = NULL; - for (convs = gaim_window_get_conversations(gaimwin); + for (convs = gaim_conv_window_get_conversations(gaimwin); convs != NULL; convs = convs->next) { GaimGtkWindow *gtkwin = NULL; int count; @@ -358,7 +358,7 @@ static void conv_created(GaimConversation *conv) { - GaimWindow *gaimwin = NULL; + GaimConvWindow *gaimwin = NULL; GaimGtkWindow *gtkwin = NULL; gaimwin = gaim_conversation_get_window(conv); @@ -378,7 +378,7 @@ static void chat_join(GaimConversation *conv) { - GaimWindow *gaimwin = NULL; + GaimConvWindow *gaimwin = NULL; GaimGtkWindow *gtkwin = NULL; gaimwin = gaim_conversation_get_window(conv); @@ -399,7 +399,7 @@ static void conv_switched(GaimConversation *old_conv, GaimConversation *new_conv) { - GaimWindow *gaimwin = NULL; + GaimConvWindow *gaimwin = NULL; GaimGtkWindow *gtkwin = NULL; /* gint count;
--- a/plugins/perl/common/module.h Thu Oct 02 02:15:36 2003 +0000 +++ b/plugins/perl/common/module.h Thu Oct 02 02:54:07 2003 +0000 @@ -22,14 +22,14 @@ typedef GaimAccount * Gaim__Account; typedef GaimBuddy * Gaim__BuddyList__Buddy; -typedef GaimBlistChat * Gaim__BuddyList__Chat; +typedef GaimChat * Gaim__BuddyList__Chat; typedef GaimGroup * Gaim__BuddyList__Group; typedef GaimContact * Gaim__BuddyList__Contact; typedef GaimConnection * Gaim__Connection; typedef GaimConversation *Gaim__Conversation; -typedef GaimChat * Gaim__Conversation__Chat; -typedef GaimIm * Gaim__Conversation__IM; -typedef GaimWindow * Gaim__ConvWindow; +typedef GaimConvChat * Gaim__Conversation__Chat; +typedef GaimConvIm * Gaim__Conversation__IM; +typedef GaimConvWindow * Gaim__ConvWindow; typedef GaimPlugin * Gaim__Plugin; typedef GaimDebugLevel Gaim__DebugLevel;
--- a/plugins/tcl/tcl_cmds.c Thu Oct 02 02:15:36 2003 +0000 +++ b/plugins/tcl/tcl_cmds.c Thu Oct 02 02:54:07 2003 +0000 @@ -261,7 +261,7 @@ GaimBlistNode *node, *gnode, *bnode; GaimAccount *account; GaimBuddy *bud; - GaimBlistChat *cnode; + GaimChat *cnode; int error, all = 0, count; if (objc < 2) { @@ -284,7 +284,7 @@ if ((node = tcl_list_to_buddy(interp, count, elems)) == NULL) return TCL_ERROR; if (node->type == GAIM_BLIST_CHAT_NODE) - Tcl_SetStringObj(result, ((GaimBlistChat *)node)->alias, -1); + Tcl_SetStringObj(result, ((GaimChat *)node)->alias, -1); else if (node->type == GAIM_BLIST_BUDDY_NODE) Tcl_SetStringObj(result, (char *)gaim_get_buddy_alias((GaimBuddy *)node), -1); return TCL_OK; @@ -373,7 +373,7 @@ Tcl_DecrRefCount(tclcontactlist); break; case GAIM_BLIST_CHAT_NODE: - cnode = (GaimBlistChat *)node; + cnode = (GaimChat *)node; if (!all && !gaim_account_is_connected(cnode->account)) continue; tclbud = Tcl_NewListObj(0, NULL); @@ -599,9 +599,9 @@ break; } if (gaim_conversation_get_type(convo) == GAIM_CONV_CHAT) - gaim_chat_write(GAIM_CHAT(convo), from, what, flags, time(NULL)); + gaim_conv_chat_write(GAIM_CONV_CHAT(convo), from, what, flags, time(NULL)); else - gaim_im_write(GAIM_IM(convo), from, what, flags, time(NULL)); + gaim_conv_im_write(GAIM_CONV_IM(convo), from, what, flags, time(NULL)); break; }
--- a/plugins/tcl/tcl_signals.c Thu Oct 02 02:15:36 2003 +0000 +++ b/plugins/tcl/tcl_signals.c Thu Oct 02 02:54:07 2003 +0000 @@ -239,8 +239,8 @@ (unsigned long)((GaimBuddy *)node)->account); break; case GAIM_BLIST_CHAT_NODE: - g_string_printf(val, "chat {%s} %lu", ((GaimBlistChat *)node)->alias, - (unsigned long)((GaimBlistChat *)node)->account); + g_string_printf(val, "chat {%s} %lu", ((GaimChat *)node)->alias, + (unsigned long)((GaimChat *)node)->account); break; case GAIM_BLIST_OTHER_NODE: g_string_printf(val, "other");
--- a/plugins/win32/winprefs/winprefs.c Thu Oct 02 02:15:36 2003 +0000 +++ b/plugins/win32/winprefs/winprefs.c Thu Oct 02 02:54:07 2003 +0000 @@ -270,7 +270,7 @@ static void winprefs_set_im_blink(GtkWidget *w) { gaim_prefs_set_bool(OPT_WINPREFS_IM_BLINK, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))); - wgaim_im_blink_state(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))); + wgaim_conv_im_blink_state(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))); } /* @@ -294,7 +294,7 @@ else gaim_signal_connect((void*)gaim_connections_get_handle(), "signed-on", plugin_id, GAIM_CALLBACK(blist_create_cb), NULL); - wgaim_im_blink_state(gaim_prefs_get_bool(OPT_WINPREFS_IM_BLINK)); + wgaim_conv_im_blink_state(gaim_prefs_get_bool(OPT_WINPREFS_IM_BLINK)); gaim_signal_connect((void*)gaim_get_core(), "quitting", plugin, GAIM_CALLBACK(gaim_quit_cb), NULL); @@ -303,7 +303,7 @@ gboolean plugin_unload(GaimPlugin *plugin) { blist_set_dockable(FALSE); - wgaim_im_blink_state(TRUE); + wgaim_conv_im_blink_state(TRUE); return TRUE; }
--- a/src/account.c Thu Oct 02 02:15:36 2003 +0000 +++ b/src/account.c Thu Oct 02 02:54:07 2003 +0000 @@ -1450,7 +1450,7 @@ } } } else if (GAIM_BLIST_NODE_IS_CHAT(cnode)) { - GaimBlistChat *c = (GaimBlistChat *)cnode; + GaimChat *c = (GaimChat *)cnode; if (c->account == account) gaim_blist_remove_chat(c);
--- a/src/away.c Thu Oct 02 02:15:36 2003 +0000 +++ b/src/away.c Thu Oct 02 02:54:07 2003 +0000 @@ -78,7 +78,7 @@ else gaim_conversation_set_account(cnv, account); - gaim_im_write(GAIM_IM(cnv), NULL, qm->message, + gaim_conv_im_write(GAIM_CONV_IM(cnv), NULL, qm->message, qm->flags, qm->tm); g_free(qm->message); g_free(qm); @@ -118,7 +118,7 @@ else gaim_conversation_set_account(cnv, account); - gaim_im_write(GAIM_IM(cnv), NULL, qm->message, qm->flags, qm->tm); + gaim_conv_im_write(GAIM_CONV_IM(cnv), NULL, qm->message, qm->flags, qm->tm); g_free(qm->message); g_free(qm);
--- a/src/blist.c Thu Oct 02 02:15:36 2003 +0000 +++ b/src/blist.c Thu Oct 02 02:54:07 2003 +0000 @@ -323,7 +323,7 @@ ops->update(gaimbuddylist, (GaimBlistNode*)buddy); } -void gaim_blist_alias_chat(GaimBlistChat *chat, const char *alias) +void gaim_blist_alias_chat(GaimChat *chat, const char *alias) { GaimBlistUiOps *ops = gaimbuddylist->ui_ops; @@ -406,7 +406,7 @@ NULL, bnode->prev); prev = child; } else if(GAIM_BLIST_NODE_IS_CHAT(child)) { - gaim_blist_add_chat((GaimBlistChat *)child, dest_group, prev); + gaim_blist_add_chat((GaimChat *)child, dest_group, prev); prev = child; } else { gaim_debug(GAIM_DEBUG_ERROR, "blist", @@ -432,15 +432,15 @@ } } -GaimBlistChat *gaim_blist_chat_new(GaimAccount *account, const char *alias, GHashTable *components) +GaimChat *gaim_blist_chat_new(GaimAccount *account, const char *alias, GHashTable *components) { - GaimBlistChat *chat; + GaimChat *chat; GaimBlistUiOps *ops; if(!components) return NULL; - chat = g_new0(GaimBlistChat, 1); + chat = g_new0(GaimChat, 1); chat->account = account; if(alias && strlen(alias)) chat->alias = g_strdup(alias); @@ -458,7 +458,7 @@ return chat; } -char *gaim_blist_chat_get_display_name(GaimBlistChat *chat) +char *gaim_blist_chat_get_display_name(GaimChat *chat) { char *name; @@ -531,7 +531,7 @@ return buddy->icon; } -void gaim_blist_add_chat(GaimBlistChat *chat, GaimGroup *group, GaimBlistNode *node) +void gaim_blist_add_chat(GaimChat *chat, GaimGroup *group, GaimBlistNode *node) { GaimBlistNode *n = node, *cnode = (GaimBlistNode*)chat; GaimGroup *g = group; @@ -1053,7 +1053,7 @@ gaim_blist_remove_contact((GaimContact*)cnode); } -void gaim_blist_remove_chat (GaimBlistChat *chat) +void gaim_blist_remove_chat (GaimChat *chat) { GaimBlistUiOps *ops = gaimbuddylist->ui_ops; @@ -1169,7 +1169,7 @@ return ret ? ret : buddy->name; } -const char *gaim_blist_chat_get_name(GaimBlistChat *chat) +const char *gaim_blist_chat_get_name(GaimChat *chat) { if(chat->alias && *chat->alias) { return chat->alias; @@ -1270,11 +1270,11 @@ return NULL; } -GaimBlistChat * +GaimChat * gaim_blist_find_chat(GaimAccount *account, const char *name) { char *chat_name; - GaimBlistChat *chat; + GaimChat *chat; GaimPlugin *prpl; GaimPluginProtocolInfo *prpl_info = NULL; struct proto_chat_entry *pce; @@ -1288,7 +1288,7 @@ for (node = group->child; node != NULL; node = node->next) { if (GAIM_BLIST_NODE_IS_CHAT(node)) { - chat = (GaimBlistChat*)node; + chat = (GaimChat*)node; prpl = gaim_find_prpl(gaim_account_get_protocol(chat->account)); prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(prpl); @@ -1313,7 +1313,7 @@ } GaimGroup * -gaim_blist_chat_get_group(GaimBlistChat *chat) +gaim_blist_chat_get_group(GaimChat *chat) { g_return_val_if_fail(chat != NULL, NULL); @@ -1340,8 +1340,8 @@ for(cnode = gnode->child; cnode; cnode = cnode->next) { if (GAIM_BLIST_NODE_IS_CHAT(cnode)) { - if(!g_slist_find(l, ((GaimBlistChat *)cnode)->account)) - l = g_slist_append(l, ((GaimBlistChat *)cnode)->account); + if(!g_slist_find(l, ((GaimChat *)cnode)->account)) + l = g_slist_append(l, ((GaimChat *)cnode)->account); } else if(GAIM_BLIST_NODE_IS_CONTACT(cnode)) { for(bnode = cnode->child; bnode; bnode = bnode->next) { if(GAIM_BLIST_NODE_IS_BUDDY(bnode)) { @@ -1392,7 +1392,7 @@ ops->update(gaimbuddylist, cnode); } } else if(GAIM_BLIST_NODE_IS_CHAT(cnode) && - ((GaimBlistChat*)cnode)->account == account) { + ((GaimChat*)cnode)->account == account) { ((GaimGroup *)gnode)->online++; ((GaimGroup *)gnode)->currentsize++; ops->update(gaimbuddylist, cnode); @@ -1448,7 +1448,7 @@ ops->update(gaimbuddylist, cnode); } } else if(GAIM_BLIST_NODE_IS_CHAT(cnode) && - ((GaimBlistChat*)cnode)->account == account) { + ((GaimChat*)cnode)->account == account) { ((GaimGroup*)gnode)->currentsize--; ((GaimGroup*)gnode)->online--; if(ops) @@ -1851,7 +1851,7 @@ } } } else if(GAIM_BLIST_NODE_IS_CHAT(cnode)) { - GaimBlistChat *chat = (GaimBlistChat *)cnode; + GaimChat *chat = (GaimChat *)cnode; if((!account && gaim_account_is_connected(chat->account)) || chat->account == account) return TRUE; @@ -2025,7 +2025,7 @@ GaimAccount *account = gaim_accounts_find(blist_parser_account_name, blist_parser_account_protocol); if(account) { - GaimBlistChat *chat = gaim_blist_chat_new(account, + GaimChat *chat = gaim_blist_chat_new(account, blist_parser_chat_alias, blist_parser_chat_components); gaim_blist_add_chat(chat,blist_parser_group, gaim_blist_get_last_child((GaimBlistNode*)blist_parser_group)); @@ -2442,7 +2442,7 @@ fprintf(file, "\t\t\t</contact>\n"); } else if(GAIM_BLIST_NODE_IS_CHAT(cnode)) { - GaimBlistChat *chat = (GaimBlistChat *)cnode; + GaimChat *chat = (GaimChat *)cnode; if(!exp_acct || chat->account == exp_acct) { char *acct_name = g_markup_escape_text(chat->account->username, -1); fprintf(file, "\t\t\t<chat protocol=\"%d\" account=\"%s\">\n", @@ -2554,7 +2554,7 @@ return g_strdup(g_hash_table_lookup(g->settings, key)); } -void gaim_blist_chat_set_setting(GaimBlistChat *c, const char *key, +void gaim_blist_chat_set_setting(GaimChat *c, const char *key, const char *value) { if(!c) @@ -2562,7 +2562,7 @@ g_hash_table_replace(c->settings, g_strdup(key), g_strdup(value)); } -char *gaim_blist_chat_get_setting(GaimBlistChat *c, const char *key) +char *gaim_blist_chat_get_setting(GaimChat *c, const char *key) { if(!c) return NULL;
--- a/src/blist.h Thu Oct 02 02:15:36 2003 +0000 +++ b/src/blist.h Thu Oct 02 02:54:07 2003 +0000 @@ -32,7 +32,7 @@ typedef struct _GaimBlistUiOps GaimBlistUiOps; typedef struct _GaimBlistNode GaimBlistNode; -typedef struct _GaimBlistChat GaimBlistChat; +typedef struct _GaimChat GaimChat; typedef struct _GaimGroup GaimGroup; typedef struct _GaimContact GaimContact; typedef struct _GaimBuddy GaimBuddy; @@ -138,7 +138,7 @@ * A chat. This contains everything Gaim needs to put a chat room in the * buddy list. */ -struct _GaimBlistChat { +struct _GaimChat { GaimBlistNode node; /**< The node that this chat inherits from */ char *alias; /**< The display name of this chat. */ GHashTable *components; /**< the stuff the protocol needs to know to join the chat */ @@ -161,7 +161,7 @@ /** * Buddy list UI operations. * - * Any UI representing a buddy list must assign a filled-out gaim_window_ops + * Any UI representing a buddy list must assign a filled-out gaim_conv_window_ops * structure to the buddy list core. */ struct _GaimBlistUiOps @@ -304,7 +304,7 @@ * @param chat The chat whose alias will be changed. * @param alias The chat's new alias. */ -void gaim_blist_alias_chat(GaimBlistChat *chat, const char *alias); +void gaim_blist_alias_chat(GaimChat *chat, const char *alias); /** * Renames a group @@ -322,7 +322,7 @@ * @param components The info the prpl needs to join the chat * @return A newly allocated chat */ -GaimBlistChat *gaim_blist_chat_new(GaimAccount *account, const char *alias, GHashTable *components); +GaimChat *gaim_blist_chat_new(GaimAccount *account, const char *alias, GHashTable *components); /** * Gets the alias of the chat, or the chat name if the alias does not exist @@ -330,7 +330,7 @@ * @param chat The chat * @return The display name of the chat */ -char *gaim_blist_chat_get_display_name(GaimBlistChat *chat); +char *gaim_blist_chat_get_display_name(GaimChat *chat); /** * Adds a new chat to the buddy list. @@ -343,7 +343,7 @@ * @param group The group to add the new chat to. * @param node The insertion point */ -void gaim_blist_add_chat(GaimBlistChat *chat, GaimGroup *group, GaimBlistNode *node); +void gaim_blist_add_chat(GaimChat *chat, GaimGroup *group, GaimBlistNode *node); /** * Creates a new buddy @@ -486,7 +486,7 @@ * * @param chat The chat to be removed */ -void gaim_blist_remove_chat(GaimBlistChat *chat); +void gaim_blist_remove_chat(GaimChat *chat); /** * Removes a group from the buddy list and frees the memory allocated to it and to @@ -519,7 +519,7 @@ * @param chat The chat whose name will be returned. * @return The alias (if set), or first component value. */ -const char *gaim_blist_chat_get_name(GaimBlistChat *chat); +const char *gaim_blist_chat_get_name(GaimChat *chat); /** * Finds the buddy struct given a screenname and an account @@ -577,7 +577,7 @@ * * @return The chat, or @c NULL if the chat does not exist. */ -GaimBlistChat *gaim_blist_find_chat(GaimAccount *account, const char *name); +GaimChat *gaim_blist_find_chat(GaimAccount *account, const char *name); /** * Returns the group of which the chat is a member. @@ -586,7 +586,7 @@ * * @return The parent group, or @c NULL if the chat is not in a group. */ -GaimGroup *gaim_blist_chat_get_group(GaimBlistChat *chat); +GaimGroup *gaim_blist_chat_get_group(GaimChat *chat); /** * Returns the group of which the buddy is a member. @@ -729,7 +729,7 @@ * @param key The key used to retrieve the data * @param value The data to set */ -void gaim_blist_chat_set_setting(GaimBlistChat *c, const char *key, const char *value); +void gaim_blist_chat_set_setting(GaimChat *c, const char *key, const char *value); /** * Retrieves data from the XML buddy list set by gaim_blist_chat_set_setting()) @@ -739,7 +739,7 @@ * * @return The associated data or NULL if no data is associated */ -char *gaim_blist_chat_get_setting(GaimBlistChat *c, const char *key); +char *gaim_blist_chat_get_setting(GaimChat *c, const char *key); /** * Associates some data with the buddy in the xml buddy list
--- a/src/buddyicon.c Thu Oct 02 02:15:36 2003 +0000 +++ b/src/buddyicon.c Thu Oct 02 02:54:07 2003 +0000 @@ -154,7 +154,7 @@ conv = gaim_find_conversation_with_account(username, account); if (conv != NULL && gaim_conversation_get_type(conv) == GAIM_CONV_IM) - gaim_im_set_icon(GAIM_IM(conv), icon); + gaim_conv_im_set_icon(GAIM_CONV_IM(conv), icon); } void
--- a/src/connection.c Thu Oct 02 02:15:36 2003 +0000 +++ b/src/connection.c Thu Oct 02 02:54:07 2003 +0000 @@ -249,8 +249,8 @@ * notification system. */ for (wins = gaim_get_windows(); wins != NULL; wins = wins->next) { - GaimWindow *win = (GaimWindow *)wins->data; - gaim_conversation_update(gaim_window_get_conversation_at(win, 0), + GaimConvWindow *win = (GaimConvWindow *)wins->data; + gaim_conversation_update(gaim_conv_window_get_conversation_at(win, 0), GAIM_CONV_ACCOUNT_OFFLINE); } @@ -323,8 +323,8 @@ * notification system. */ for (wins = gaim_get_windows(); wins != NULL; wins = wins->next) { - GaimWindow *win = (GaimWindow *)wins->data; - gaim_conversation_update(gaim_window_get_conversation_at(win, 0), + GaimConvWindow *win = (GaimConvWindow *)wins->data; + gaim_conversation_update(gaim_conv_window_get_conversation_at(win, 0), GAIM_CONV_ACCOUNT_ONLINE); }
--- a/src/conversation.c Thu Oct 02 02:15:36 2003 +0000 +++ b/src/conversation.c Thu Oct 02 02:54:07 2003 +0000 @@ -42,7 +42,7 @@ #define SEND_TYPED_TIMEOUT 5000 -static GaimWindowUiOps *win_ui_ops = NULL; +static GaimConvWindowUiOps *win_ui_ops = NULL; static GList *conversations = NULL; static GList *ims = NULL; @@ -139,16 +139,16 @@ reset_typing(gpointer data) { GaimConversation *c = (GaimConversation *)data; - GaimIm *im; + GaimConvIm *im; if (!g_list_find(conversations, c)) return FALSE; - im = GAIM_IM(c); - - gaim_im_set_typing_state(im, GAIM_NOT_TYPING); - gaim_im_update_typing(im); - gaim_im_stop_typing_timeout(im); + im = GAIM_CONV_IM(c); + + gaim_conv_im_set_typing_state(im, GAIM_NOT_TYPING); + gaim_conv_im_update_typing(im); + gaim_conv_im_stop_typing_timeout(im); return FALSE; } @@ -164,7 +164,7 @@ name = gaim_conversation_get_name(conv); if (conv != NULL && gc != NULL && name != NULL) { - gaim_im_set_type_again(GAIM_IM(conv), TRUE); + gaim_conv_im_set_type_again(GAIM_CONV_IM(conv), TRUE); serv_send_typing(gc, name, GAIM_TYPED); @@ -252,7 +252,7 @@ gaim_conversation_get_account(conv), conv, buffy); if (type == GAIM_CONV_IM) { - GaimIm *im = GAIM_IM(conv); + GaimConvIm *im = GAIM_CONV_IM(conv); buffy = g_strdup(buf); gaim_signal_emit(gaim_conversations_get_handle(), "sending-im-msg", @@ -260,11 +260,11 @@ gaim_conversation_get_name(conv), &buffy); if (buffy != NULL) { - GaimImFlags imflags = 0; + GaimConvImFlags imflags = 0; GaimMessageFlags msgflags = GAIM_MESSAGE_SEND; if (im->images != NULL) { - imflags |= GAIM_IM_IMAGES; + imflags |= GAIM_CONV_IM_IMAGES; msgflags |= GAIM_MESSAGE_IMAGES; } @@ -272,7 +272,7 @@ buffy, imflags); if (err > 0) - gaim_im_write(im, NULL, buf, msgflags, time(NULL)); + gaim_conv_im_write(im, NULL, buf, msgflags, time(NULL)); if (im->images != NULL) { GSList *tempy; @@ -302,14 +302,14 @@ gaim_signal_emit(gaim_conversations_get_handle(), "sending-chat-msg", gaim_conversation_get_account(conv), &buffy, - gaim_chat_get_id(GAIM_CHAT(conv))); + gaim_conv_chat_get_id(GAIM_CONV_CHAT(conv))); if (buffy != NULL) { - err = serv_chat_send(gc, gaim_chat_get_id(GAIM_CHAT(conv)), buffy); + err = serv_chat_send(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(conv)), buffy); gaim_signal_emit(gaim_conversations_get_handle(), "sent-chat-msg", gaim_conversation_get_account(conv), buf, - gaim_chat_get_id(GAIM_CHAT(conv))); + gaim_conv_chat_get_id(GAIM_CONV_CHAT(conv))); g_free(buffy); } @@ -347,12 +347,12 @@ } static void -update_conv_indexes(GaimWindow *win) +update_conv_indexes(GaimConvWindow *win) { GList *l; int i; - for (l = gaim_window_get_conversations(win), i = 0; + for (l = gaim_conv_window_get_conversations(win), i = 0; l != NULL; l = l->next, i++) { @@ -362,12 +362,12 @@ } } -GaimWindow * -gaim_window_new(void) +GaimConvWindow * +gaim_conv_window_new(void) { - GaimWindow *win; - - win = g_new0(GaimWindow, 1); + GaimConvWindow *win; + + win = g_new0(GaimConvWindow, 1); windows = g_list_append(windows, win); @@ -380,18 +380,18 @@ } void -gaim_window_destroy(GaimWindow *win) +gaim_conv_window_destroy(GaimConvWindow *win) { - GaimWindowUiOps *ops; + GaimConvWindowUiOps *ops; GList *node; g_return_if_fail(win != NULL); - ops = gaim_window_get_ui_ops(win); + ops = gaim_conv_window_get_ui_ops(win); /* * If there are any conversations in this, destroy them all. The last - * conversation will call gaim_window_destroy(), but this time, this + * conversation will call gaim_conv_window_destroy(), but this time, this * check will fail and the window will actually be destroyed. * * This is needed because chats may not close right away. They may @@ -399,9 +399,9 @@ * already destroyed, and gaim either crashes or spits out gtk warnings. * The problem is fixed with this check. */ - if (gaim_window_get_conversation_count(win) > 0) { - - node = g_list_first(gaim_window_get_conversations(win)); + if (gaim_conv_window_get_conversation_count(win) > 0) { + + node = g_list_first(gaim_conv_window_get_conversations(win)); while(node != NULL) { GaimConversation *conv = node->data; @@ -416,7 +416,7 @@ if (ops != NULL && ops->destroy_window != NULL) ops->destroy_window(win); - g_list_free(gaim_window_get_conversations(win)); + g_list_free(gaim_conv_window_get_conversations(win)); windows = g_list_remove(windows, win); @@ -425,13 +425,13 @@ } void -gaim_window_show(GaimWindow *win) +gaim_conv_window_show(GaimConvWindow *win) { - GaimWindowUiOps *ops; + GaimConvWindowUiOps *ops; g_return_if_fail(win != NULL); - ops = gaim_window_get_ui_ops(win); + ops = gaim_conv_window_get_ui_ops(win); if (ops == NULL || ops->show == NULL) return; @@ -440,13 +440,13 @@ } void -gaim_window_hide(GaimWindow *win) +gaim_conv_window_hide(GaimConvWindow *win) { - GaimWindowUiOps *ops; + GaimConvWindowUiOps *ops; g_return_if_fail(win != NULL); - ops = gaim_window_get_ui_ops(win); + ops = gaim_conv_window_get_ui_ops(win); if (ops == NULL || ops->hide == NULL) return; @@ -455,13 +455,13 @@ } void -gaim_window_raise(GaimWindow *win) +gaim_conv_window_raise(GaimConvWindow *win) { - GaimWindowUiOps *ops; + GaimConvWindowUiOps *ops; g_return_if_fail(win != NULL); - ops = gaim_window_get_ui_ops(win); + ops = gaim_conv_window_get_ui_ops(win); if (ops == NULL || ops->raise == NULL) return; @@ -470,13 +470,13 @@ } void -gaim_window_flash(GaimWindow *win) +gaim_conv_window_flash(GaimConvWindow *win) { - GaimWindowUiOps *ops; + GaimConvWindowUiOps *ops; g_return_if_fail(win != NULL); - ops = gaim_window_get_ui_ops(win); + ops = gaim_conv_window_get_ui_ops(win); if (ops == NULL || ops->flash == NULL) return; @@ -485,7 +485,7 @@ } void -gaim_window_set_ui_ops(GaimWindow *win, GaimWindowUiOps *ops) +gaim_conv_window_set_ui_ops(GaimConvWindow *win, GaimConvWindowUiOps *ops) { GaimConversationUiOps *conv_ops = NULL; GList *l; @@ -506,7 +506,7 @@ if (win->ui_ops != NULL && win->ui_ops->new_window != NULL) win->ui_ops->new_window(win); - for (l = gaim_window_get_conversations(win); + for (l = gaim_conv_window_get_conversations(win); l != NULL; l = l->next) { @@ -519,8 +519,8 @@ } } -GaimWindowUiOps * -gaim_window_get_ui_ops(const GaimWindow *win) +GaimConvWindowUiOps * +gaim_conv_window_get_ui_ops(const GaimConvWindow *win) { g_return_val_if_fail(win != NULL, NULL); @@ -528,20 +528,20 @@ } int -gaim_window_add_conversation(GaimWindow *win, GaimConversation *conv) +gaim_conv_window_add_conversation(GaimConvWindow *win, GaimConversation *conv) { - GaimWindowUiOps *ops; + GaimConvWindowUiOps *ops; g_return_val_if_fail(win != NULL, -1); g_return_val_if_fail(conv != NULL, -1); if (gaim_conversation_get_window(conv) != NULL) { - gaim_window_remove_conversation( + gaim_conv_window_remove_conversation( gaim_conversation_get_window(conv), gaim_conversation_get_index(conv)); } - ops = gaim_window_get_ui_ops(win); + ops = gaim_conv_window_get_ui_ops(win); win->conversations = g_list_append(win->conversations, conv); win->conversation_count++; @@ -562,18 +562,18 @@ } GaimConversation * -gaim_window_remove_conversation(GaimWindow *win, unsigned int index) +gaim_conv_window_remove_conversation(GaimConvWindow *win, unsigned int index) { - GaimWindowUiOps *ops; + GaimConvWindowUiOps *ops; GaimConversation *conv; GList *node; g_return_val_if_fail(win != NULL, NULL); - g_return_val_if_fail(index < gaim_window_get_conversation_count(win), NULL); - - ops = gaim_window_get_ui_ops(win); - - node = g_list_nth(gaim_window_get_conversations(win), index); + g_return_val_if_fail(index < gaim_conv_window_get_conversation_count(win), NULL); + + ops = gaim_conv_window_get_ui_ops(win); + + node = g_list_nth(gaim_conv_window_get_conversations(win), index); conv = (GaimConversation *)node->data; if (ops != NULL && ops->remove_conversation != NULL) @@ -587,8 +587,8 @@ conv->window = NULL; - if (gaim_window_get_conversation_count(win) == 0) - gaim_window_destroy(win); + if (gaim_conv_window_get_conversation_count(win) == 0) + gaim_conv_window_destroy(win); else { /* Change all the indexes. */ update_conv_indexes(win); @@ -598,23 +598,23 @@ } void -gaim_window_move_conversation(GaimWindow *win, unsigned int index, +gaim_conv_window_move_conversation(GaimConvWindow *win, unsigned int index, unsigned int new_index) { - GaimWindowUiOps *ops; + GaimConvWindowUiOps *ops; GaimConversation *conv; GList *l; g_return_if_fail(win != NULL); - g_return_if_fail(index < gaim_window_get_conversation_count(win)); + g_return_if_fail(index < gaim_conv_window_get_conversation_count(win)); g_return_if_fail(index != new_index); /* We can't move this past the last index. */ - if (new_index > gaim_window_get_conversation_count(win)) - new_index = gaim_window_get_conversation_count(win); + if (new_index > gaim_conv_window_get_conversation_count(win)) + new_index = gaim_conv_window_get_conversation_count(win); /* Get the list item for this conversation at its current index. */ - l = g_list_nth(gaim_window_get_conversations(win), index); + l = g_list_nth(gaim_conv_window_get_conversations(win), index); if (l == NULL) { /* Should never happen. */ @@ -627,7 +627,7 @@ conv = (GaimConversation *)l->data; /* Update the UI part of this. */ - ops = gaim_window_get_ui_ops(win); + ops = gaim_conv_window_get_ui_ops(win); if (ops != NULL && ops->move_conversation != NULL) ops->move_conversation(win, conv, new_index); @@ -645,19 +645,19 @@ } GaimConversation * -gaim_window_get_conversation_at(const GaimWindow *win, unsigned int index) +gaim_conv_window_get_conversation_at(const GaimConvWindow *win, unsigned int index) { g_return_val_if_fail(win != NULL, NULL); g_return_val_if_fail(index >= 0 && - index < gaim_window_get_conversation_count(win), + index < gaim_conv_window_get_conversation_count(win), NULL); return (GaimConversation *)g_list_nth_data( - gaim_window_get_conversations(win), index); + gaim_conv_window_get_conversations(win), index); } size_t -gaim_window_get_conversation_count(const GaimWindow *win) +gaim_conv_window_get_conversation_count(const GaimConvWindow *win) { g_return_val_if_fail(win != NULL, 0); @@ -665,22 +665,22 @@ } void -gaim_window_switch_conversation(GaimWindow *win, unsigned int index) +gaim_conv_window_switch_conversation(GaimConvWindow *win, unsigned int index) { - GaimWindowUiOps *ops; + GaimConvWindowUiOps *ops; GaimConversation *old_conv, *conv; g_return_if_fail(win != NULL); g_return_if_fail(index >= 0 && - index < gaim_window_get_conversation_count(win)); - - old_conv = gaim_window_get_active_conversation(win); - conv = gaim_window_get_conversation_at(win, index); + index < gaim_conv_window_get_conversation_count(win)); + + old_conv = gaim_conv_window_get_active_conversation(win); + conv = gaim_conv_window_get_conversation_at(win, index); gaim_signal_emit(gaim_conversations_get_handle(), "conversation-switching", old_conv, conv); - ops = gaim_window_get_ui_ops(win); + ops = gaim_conv_window_get_ui_ops(win); if (ops != NULL && ops->switch_conversation != NULL) ops->switch_conversation(win, index); @@ -692,25 +692,25 @@ } GaimConversation * -gaim_window_get_active_conversation(const GaimWindow *win) +gaim_conv_window_get_active_conversation(const GaimConvWindow *win) { - GaimWindowUiOps *ops; + GaimConvWindowUiOps *ops; g_return_val_if_fail(win != NULL, NULL); - if (gaim_window_get_conversation_count(win) == 0) + if (gaim_conv_window_get_conversation_count(win) == 0) return NULL; - ops = gaim_window_get_ui_ops(win); + ops = gaim_conv_window_get_ui_ops(win); if (ops != NULL && ops->get_active_index != NULL) - return gaim_window_get_conversation_at(win, ops->get_active_index(win)); + return gaim_conv_window_get_conversation_at(win, ops->get_active_index(win)); return NULL; } GList * -gaim_window_get_conversations(const GaimWindow *win) +gaim_conv_window_get_conversations(const GaimConvWindow *win) { g_return_val_if_fail(win != NULL, NULL); @@ -723,20 +723,20 @@ return windows; } -GaimWindow * +GaimConvWindow * gaim_get_first_window_with_type(GaimConversationType type) { GList *wins, *convs; - GaimWindow *win; + GaimConvWindow *win; GaimConversation *conv; if (type == GAIM_CONV_UNKNOWN) return NULL; for (wins = gaim_get_windows(); wins != NULL; wins = wins->next) { - win = (GaimWindow *)wins->data; - - for (convs = gaim_window_get_conversations(win); + win = (GaimConvWindow *)wins->data; + + for (convs = gaim_conv_window_get_conversations(win); convs != NULL; convs = convs->next) { @@ -750,11 +750,11 @@ return NULL; } -GaimWindow * +GaimConvWindow * gaim_get_last_window_with_type(GaimConversationType type) { GList *wins, *convs; - GaimWindow *win; + GaimConvWindow *win; GaimConversation *conv; if (type == GAIM_CONV_UNKNOWN) @@ -764,9 +764,9 @@ wins != NULL; wins = wins->prev) { - win = (GaimWindow *)wins->data; - - for (convs = gaim_window_get_conversations(win); + win = (GaimConvWindow *)wins->data; + + for (convs = gaim_conv_window_get_conversations(win); convs != NULL; convs = convs->next) { @@ -810,7 +810,7 @@ if (type == GAIM_CONV_IM) { - conv->u.im = g_new0(GaimIm, 1); + conv->u.im = g_new0(GaimConvIm, 1); conv->u.im->conv = conv; ims = g_list_append(ims, conv); @@ -820,7 +820,7 @@ } else if (type == GAIM_CONV_CHAT) { - conv->u.chat = g_new0(GaimChat, 1); + conv->u.chat = g_new0(GaimConvChat, 1); conv->u.chat->conv = conv; chats = g_list_append(chats, conv); @@ -839,13 +839,13 @@ * created window. */ if (windows == NULL) { - GaimWindow *win; - - win = gaim_window_new(); - gaim_window_add_conversation(win, conv); + GaimConvWindow *win; + + win = gaim_conv_window_new(); + gaim_conv_window_add_conversation(win, conv); /* Ensure the window is visible. */ - gaim_window_show(win); + gaim_conv_window_show(win); } else { if (place_conv == NULL) @@ -868,7 +868,7 @@ gaim_conversation_destroy(GaimConversation *conv) { GaimPluginProtocolInfo *prpl_info = NULL; - GaimWindow *win; + GaimConvWindow *win; GaimConversationUiOps *ops; GaimConnection *gc; const char *name; @@ -912,7 +912,7 @@ */ if (gc && g_slist_find(gc->buddy_chats, conv) != NULL) { - serv_chat_leave(gc, gaim_chat_get_id(GAIM_CHAT(conv))); + serv_chat_leave(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(conv))); return; } @@ -944,8 +944,8 @@ GSList *tempy; int image; - gaim_im_stop_typing_timeout(conv->u.im); - gaim_im_stop_type_again_timeout(conv->u.im); + gaim_conv_im_stop_typing_timeout(conv->u.im); + gaim_conv_im_stop_type_again_timeout(conv->u.im); for (tempy = conv->u.im->images; tempy != NULL; @@ -993,7 +993,7 @@ g_hash_table_destroy(conv->data); if (win != NULL) { - gaim_window_remove_conversation(win, + gaim_conv_window_remove_conversation(win, gaim_conversation_get_index(conv)); } @@ -1213,7 +1213,7 @@ return conv->history; } -GaimWindow * +GaimConvWindow * gaim_conversation_get_window(const GaimConversation *conv) { g_return_val_if_fail(conv != NULL, NULL); @@ -1221,7 +1221,7 @@ return conv->window; } -GaimIm * +GaimConvIm * gaim_conversation_get_im_data(const GaimConversation *conv) { g_return_val_if_fail(conv != NULL, NULL); @@ -1232,7 +1232,7 @@ return conv->u.im; } -GaimChat * +GaimConvChat * gaim_conversation_get_chat_data(const GaimConversation *conv) { g_return_val_if_fail(conv != NULL, NULL); @@ -1344,7 +1344,7 @@ GaimConnection *gc = NULL; GaimAccount *account; GaimConversationUiOps *ops; - GaimWindow *win; + GaimConvWindow *win; GaimBuddy *b; GaimUnseenState unseen; /* int logging_font_options = 0; */ @@ -1419,10 +1419,10 @@ if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) { if ((flags & GAIM_MESSAGE_RECV) == GAIM_MESSAGE_RECV) - gaim_im_set_typing_state(GAIM_IM(conv), GAIM_NOT_TYPING); + gaim_conv_im_set_typing_state(GAIM_CONV_IM(conv), GAIM_NOT_TYPING); } - if (gaim_window_get_active_conversation(win) != conv) { + if (gaim_conv_window_get_active_conversation(win) != conv) { if ((flags & GAIM_MESSAGE_NICK) == GAIM_MESSAGE_NICK || gaim_conversation_get_unseen(conv) == GAIM_UNSEEN_NICK) unseen = GAIM_UNSEEN_NICK; @@ -1473,7 +1473,7 @@ * IM Conversation API **************************************************************************/ GaimConversation * -gaim_im_get_conversation(const GaimIm *im) +gaim_conv_im_get_conversation(const GaimConvIm *im) { g_return_val_if_fail(im != NULL, NULL); @@ -1481,7 +1481,7 @@ } void -gaim_im_set_icon(GaimIm *im, GaimBuddyIcon *icon) +gaim_conv_im_set_icon(GaimConvIm *im, GaimBuddyIcon *icon) { g_return_if_fail(im != NULL); @@ -1493,12 +1493,12 @@ im->icon = (icon == NULL ? NULL : gaim_buddy_icon_ref(icon)); - gaim_conversation_update(gaim_im_get_conversation(im), + gaim_conversation_update(gaim_conv_im_get_conversation(im), GAIM_CONV_UPDATE_ICON); } GaimBuddyIcon * -gaim_im_get_icon(const GaimIm *im) +gaim_conv_im_get_icon(const GaimConvIm *im) { g_return_val_if_fail(im != NULL, NULL); @@ -1506,7 +1506,7 @@ } void -gaim_im_set_typing_state(GaimIm *im, int state) +gaim_conv_im_set_typing_state(GaimConvIm *im, int state) { g_return_if_fail(im != NULL); @@ -1514,7 +1514,7 @@ } int -gaim_im_get_typing_state(const GaimIm *im) +gaim_conv_im_get_typing_state(const GaimConvIm *im) { g_return_val_if_fail(im != NULL, 0); @@ -1522,7 +1522,7 @@ } void -gaim_im_start_typing_timeout(GaimIm *im, int timeout) +gaim_conv_im_start_typing_timeout(GaimConvIm *im, int timeout) { GaimConversation *conv; const char *name; @@ -1530,9 +1530,9 @@ g_return_if_fail(im != NULL); if (im->typing_timeout > 0) - gaim_im_stop_typing_timeout(im); - - conv = gaim_im_get_conversation(im); + gaim_conv_im_stop_typing_timeout(im); + + conv = gaim_conv_im_get_conversation(im); name = gaim_conversation_get_name(conv); im->typing_timeout = g_timeout_add_full(G_PRIORITY_DEFAULT_IDLE, @@ -1540,7 +1540,7 @@ } void -gaim_im_stop_typing_timeout(GaimIm *im) +gaim_conv_im_stop_typing_timeout(GaimConvIm *im) { g_return_if_fail(im != NULL); @@ -1552,7 +1552,7 @@ } guint -gaim_im_get_typing_timeout(const GaimIm *im) +gaim_conv_im_get_typing_timeout(const GaimConvIm *im) { g_return_val_if_fail(im != NULL, 0); @@ -1560,7 +1560,7 @@ } void -gaim_im_set_type_again(GaimIm *im, time_t val) +gaim_conv_im_set_type_again(GaimConvIm *im, time_t val) { g_return_if_fail(im != NULL); @@ -1568,7 +1568,7 @@ } time_t -gaim_im_get_type_again(const GaimIm *im) +gaim_conv_im_get_type_again(const GaimConvIm *im) { g_return_val_if_fail(im != NULL, 0); @@ -1576,16 +1576,16 @@ } void -gaim_im_start_type_again_timeout(GaimIm *im) +gaim_conv_im_start_type_again_timeout(GaimConvIm *im) { g_return_if_fail(im != NULL); im->type_again_timeout = g_timeout_add(SEND_TYPED_TIMEOUT, send_typed, - gaim_im_get_conversation(im)); + gaim_conv_im_get_conversation(im)); } void -gaim_im_stop_type_again_timeout(GaimIm *im) +gaim_conv_im_stop_type_again_timeout(GaimConvIm *im) { g_return_if_fail(im != NULL); @@ -1597,7 +1597,7 @@ } guint -gaim_im_get_type_again_timeout(const GaimIm *im) +gaim_conv_im_get_type_again_timeout(const GaimConvIm *im) { g_return_val_if_fail(im != NULL, 0); @@ -1605,16 +1605,16 @@ } void -gaim_im_update_typing(GaimIm *im) +gaim_conv_im_update_typing(GaimConvIm *im) { g_return_if_fail(im != NULL); - gaim_conversation_update(gaim_im_get_conversation(im), + gaim_conversation_update(gaim_conv_im_get_conversation(im), GAIM_CONV_UPDATE_TYPING); } void -gaim_im_write(GaimIm *im, const char *who, const char *message, +gaim_conv_im_write(GaimConvIm *im, const char *who, const char *message, GaimMessageFlags flags, time_t mtime) { GaimConversation *c; @@ -1622,7 +1622,7 @@ g_return_if_fail(im != NULL); g_return_if_fail(message != NULL); - c = gaim_im_get_conversation(im); + c = gaim_conv_im_get_conversation(im); /* Raise the window, if specified in prefs. */ if (c->ui_ops != NULL && c->ui_ops->write_im != NULL) @@ -1632,12 +1632,12 @@ } void -gaim_im_send(GaimIm *im, const char *message) +gaim_conv_im_send(GaimConvIm *im, const char *message) { g_return_if_fail(im != NULL); g_return_if_fail(message != NULL); - common_send(gaim_im_get_conversation(im), message); + common_send(gaim_conv_im_get_conversation(im), message); } /************************************************************************** @@ -1645,7 +1645,7 @@ **************************************************************************/ GaimConversation * -gaim_chat_get_conversation(const GaimChat *chat) +gaim_conv_chat_get_conversation(const GaimConvChat *chat) { g_return_val_if_fail(chat != NULL, NULL); @@ -1653,7 +1653,7 @@ } GList * -gaim_chat_set_users(GaimChat *chat, GList *users) +gaim_conv_chat_set_users(GaimConvChat *chat, GList *users) { g_return_val_if_fail(chat != NULL, NULL); @@ -1663,7 +1663,7 @@ } GList * -gaim_chat_get_users(const GaimChat *chat) +gaim_conv_chat_get_users(const GaimConvChat *chat) { g_return_val_if_fail(chat != NULL, NULL); @@ -1671,21 +1671,21 @@ } void -gaim_chat_ignore(GaimChat *chat, const char *name) +gaim_conv_chat_ignore(GaimConvChat *chat, const char *name) { g_return_if_fail(chat != NULL); g_return_if_fail(name != NULL); /* Make sure the user isn't already ignored. */ - if (gaim_chat_is_user_ignored(chat, name)) + if (gaim_conv_chat_is_user_ignored(chat, name)) return; - gaim_chat_set_ignored(chat, - g_list_append(gaim_chat_get_ignored(chat), g_strdup(name))); + gaim_conv_chat_set_ignored(chat, + g_list_append(gaim_conv_chat_get_ignored(chat), g_strdup(name))); } void -gaim_chat_unignore(GaimChat *chat, const char *name) +gaim_conv_chat_unignore(GaimConvChat *chat, const char *name) { GList *item; @@ -1693,21 +1693,21 @@ g_return_if_fail(name != NULL); /* Make sure the user is actually ignored. */ - if (!gaim_chat_is_user_ignored(chat, name)) + if (!gaim_conv_chat_is_user_ignored(chat, name)) return; - item = g_list_find(gaim_chat_get_ignored(chat), - gaim_chat_get_ignored_user(chat, name)); - - gaim_chat_set_ignored(chat, - g_list_remove_link(gaim_chat_get_ignored(chat), item)); + item = g_list_find(gaim_conv_chat_get_ignored(chat), + gaim_conv_chat_get_ignored_user(chat, name)); + + gaim_conv_chat_set_ignored(chat, + g_list_remove_link(gaim_conv_chat_get_ignored(chat), item)); g_free(item->data); g_list_free_1(item); } GList * -gaim_chat_set_ignored(GaimChat *chat, GList *ignored) +gaim_conv_chat_set_ignored(GaimConvChat *chat, GList *ignored) { g_return_val_if_fail(chat != NULL, NULL); @@ -1717,7 +1717,7 @@ } GList * -gaim_chat_get_ignored(const GaimChat *chat) +gaim_conv_chat_get_ignored(const GaimConvChat *chat) { g_return_val_if_fail(chat != NULL, NULL); @@ -1725,14 +1725,14 @@ } const char * -gaim_chat_get_ignored_user(const GaimChat *chat, const char *user) +gaim_conv_chat_get_ignored_user(const GaimConvChat *chat, const char *user) { GList *ignored; g_return_val_if_fail(chat != NULL, NULL); g_return_val_if_fail(user != NULL, NULL); - for (ignored = gaim_chat_get_ignored(chat); + for (ignored = gaim_conv_chat_get_ignored(chat); ignored != NULL; ignored = ignored->next) { @@ -1755,16 +1755,16 @@ } gboolean -gaim_chat_is_user_ignored(const GaimChat *chat, const char *user) +gaim_conv_chat_is_user_ignored(const GaimConvChat *chat, const char *user) { g_return_val_if_fail(chat != NULL, FALSE); g_return_val_if_fail(user != NULL, FALSE); - return (gaim_chat_get_ignored_user(chat, user) != NULL); + return (gaim_conv_chat_get_ignored_user(chat, user) != NULL); } void -gaim_chat_set_topic(GaimChat *chat, const char *who, const char *topic) +gaim_conv_chat_set_topic(GaimConvChat *chat, const char *who, const char *topic) { g_return_if_fail(chat != NULL); @@ -1774,12 +1774,12 @@ chat->who = (who == NULL ? NULL : g_strdup(who)); chat->topic = (topic == NULL ? NULL : g_strdup(topic)); - gaim_conversation_update(gaim_chat_get_conversation(chat), + gaim_conversation_update(gaim_conv_chat_get_conversation(chat), GAIM_CONV_UPDATE_TOPIC); } const char * -gaim_chat_get_topic(const GaimChat *chat) +gaim_conv_chat_get_topic(const GaimConvChat *chat) { g_return_val_if_fail(chat != NULL, NULL); @@ -1787,7 +1787,7 @@ } void -gaim_chat_set_id(GaimChat *chat, int id) +gaim_conv_chat_set_id(GaimConvChat *chat, int id) { g_return_if_fail(chat != NULL); @@ -1795,7 +1795,7 @@ } int -gaim_chat_get_id(const GaimChat *chat) +gaim_conv_chat_get_id(const GaimConvChat *chat) { g_return_val_if_fail(chat != NULL, -1); @@ -1803,7 +1803,7 @@ } void -gaim_chat_write(GaimChat *chat, const char *who, const char *message, +gaim_conv_chat_write(GaimConvChat *chat, const char *who, const char *message, GaimMessageFlags flags, time_t mtime) { GaimAccount *account; @@ -1814,12 +1814,12 @@ g_return_if_fail(who != NULL); g_return_if_fail(message != NULL); - conv = gaim_chat_get_conversation(chat); + conv = gaim_conv_chat_get_conversation(chat); gc = gaim_conversation_get_gc(conv); account = gaim_connection_get_account(gc); /* Don't display this if the person who wrote it is ignored. */ - if (gaim_chat_is_user_ignored(chat, who)) + if (gaim_conv_chat_is_user_ignored(chat, who)) return; if (!(flags & GAIM_MESSAGE_WHISPER)) { @@ -1852,16 +1852,16 @@ } void -gaim_chat_send(GaimChat *chat, const char *message) +gaim_conv_chat_send(GaimConvChat *chat, const char *message) { g_return_if_fail(chat != NULL); g_return_if_fail(message != NULL); - common_send(gaim_chat_get_conversation(chat), message); + common_send(gaim_conv_chat_get_conversation(chat), message); } void -gaim_chat_add_user(GaimChat *chat, const char *user, const char *extra_msg) +gaim_conv_chat_add_user(GaimConvChat *chat, const char *user, const char *extra_msg) { GaimConversation *conv; GaimConversationUiOps *ops; @@ -1870,14 +1870,14 @@ g_return_if_fail(chat != NULL); g_return_if_fail(user != NULL); - conv = gaim_chat_get_conversation(chat); + conv = gaim_conv_chat_get_conversation(chat); ops = gaim_conversation_get_ui_ops(conv); gaim_signal_emit(gaim_conversations_get_handle(), "chat-buddy-joining", conv, user); - gaim_chat_set_users(chat, - g_list_insert_sorted(gaim_chat_get_users(chat), g_strdup(user), + gaim_conv_chat_set_users(chat, + g_list_insert_sorted(gaim_conv_chat_get_users(chat), g_strdup(user), insertname_compare)); if (ops != NULL && ops->chat_add_user != NULL) @@ -1899,7 +1899,7 @@ } void -gaim_chat_add_users(GaimChat *chat, GList *users) +gaim_conv_chat_add_users(GaimConvChat *chat, GList *users) { GaimConversation *conv; GaimConversationUiOps *ops; @@ -1908,7 +1908,7 @@ g_return_if_fail(chat != NULL); g_return_if_fail(users != NULL); - conv = gaim_chat_get_conversation(chat); + conv = gaim_conv_chat_get_conversation(chat); ops = gaim_conversation_get_ui_ops(conv); for (l = users; l != NULL; l = l->next) { @@ -1917,8 +1917,8 @@ gaim_signal_emit(gaim_conversations_get_handle(), "chat-buddy-joining", conv, user); - gaim_chat_set_users(chat, - g_list_insert_sorted(gaim_chat_get_users(chat), + gaim_conv_chat_set_users(chat, + g_list_insert_sorted(gaim_conv_chat_get_users(chat), g_strdup((char *)l->data), insertname_compare)); @@ -1931,7 +1931,7 @@ } void -gaim_chat_rename_user(GaimChat *chat, const char *old_user, +gaim_conv_chat_rename_user(GaimConvChat *chat, const char *old_user, const char *new_user) { GaimConversation *conv; @@ -1943,33 +1943,33 @@ g_return_if_fail(old_user != NULL); g_return_if_fail(new_user != NULL); - conv = gaim_chat_get_conversation(chat); + conv = gaim_conv_chat_get_conversation(chat); ops = gaim_conversation_get_ui_ops(conv); - gaim_chat_set_users(chat, - g_list_insert_sorted(gaim_chat_get_users(chat), g_strdup(new_user), + gaim_conv_chat_set_users(chat, + g_list_insert_sorted(gaim_conv_chat_get_users(chat), g_strdup(new_user), insertname_compare)); if (ops != NULL && ops->chat_rename_user != NULL) ops->chat_rename_user(conv, old_user, new_user); - for (names = gaim_chat_get_users(chat); + for (names = gaim_conv_chat_get_users(chat); names != NULL; names = names->next) { if (!gaim_utf8_strcasecmp((char *)names->data, old_user)) { - gaim_chat_set_users(chat, - g_list_remove(gaim_chat_get_users(chat), names->data)); + gaim_conv_chat_set_users(chat, + g_list_remove(gaim_conv_chat_get_users(chat), names->data)); break; } } - if (gaim_chat_is_user_ignored(chat, old_user)) { - gaim_chat_unignore(chat, old_user); - gaim_chat_ignore(chat, new_user); + if (gaim_conv_chat_is_user_ignored(chat, old_user)) { + gaim_conv_chat_unignore(chat, old_user); + gaim_conv_chat_ignore(chat, new_user); } - else if (gaim_chat_is_user_ignored(chat, new_user)) - gaim_chat_unignore(chat, new_user); + else if (gaim_conv_chat_is_user_ignored(chat, new_user)) + gaim_conv_chat_unignore(chat, new_user); if (gaim_prefs_get_bool("/core/conversations/chat/show_nick_change")) { g_snprintf(tmp, sizeof(tmp), @@ -1980,7 +1980,7 @@ } void -gaim_chat_remove_user(GaimChat *chat, const char *user, const char *reason) +gaim_conv_chat_remove_user(GaimConvChat *chat, const char *user, const char *reason) { GaimConversation *conv; GaimConversationUiOps *ops; @@ -1990,7 +1990,7 @@ g_return_if_fail(chat != NULL); g_return_if_fail(user != NULL); - conv = gaim_chat_get_conversation(chat); + conv = gaim_conv_chat_get_conversation(chat); ops = gaim_conversation_get_ui_ops(conv); gaim_signal_emit(gaim_conversations_get_handle(), "chat-buddy-leaving", @@ -1999,13 +1999,13 @@ if (ops != NULL && ops->chat_remove_user != NULL) ops->chat_remove_user(conv, user); - for (names = gaim_chat_get_users(chat); + for (names = gaim_conv_chat_get_users(chat); names != NULL; names = names->next) { if (!gaim_utf8_strcasecmp((char *)names->data, user)) { - gaim_chat_set_users(chat, - g_list_remove(gaim_chat_get_users(chat), names->data)); + gaim_conv_chat_set_users(chat, + g_list_remove(gaim_conv_chat_get_users(chat), names->data)); break; } } @@ -2027,7 +2027,7 @@ } void -gaim_chat_remove_users(GaimChat *chat, GList *users, const char *reason) +gaim_conv_chat_remove_users(GaimConvChat *chat, GList *users, const char *reason) { GaimConversation *conv; GaimConversationUiOps *ops; @@ -2037,7 +2037,7 @@ g_return_if_fail(chat != NULL); g_return_if_fail(users != NULL); - conv = gaim_chat_get_conversation(chat); + conv = gaim_conv_chat_get_conversation(chat); ops = gaim_conversation_get_ui_ops(conv); for (l = users; l != NULL; l = l->next) { @@ -2053,14 +2053,14 @@ for (l = users; l != NULL; l = l->next) { const char *user = (const char *)l->data; - for (names = gaim_chat_get_users(chat); + for (names = gaim_conv_chat_get_users(chat); names != NULL; names = names->next) { if (!gaim_utf8_strcasecmp((char *)names->data, user)) { - gaim_chat_set_users(chat, - g_list_remove(gaim_chat_get_users(chat), names->data)); + gaim_conv_chat_set_users(chat, + g_list_remove(gaim_conv_chat_get_users(chat), names->data)); break; } @@ -2101,7 +2101,7 @@ } void -gaim_chat_clear_users(GaimChat *chat) +gaim_conv_chat_clear_users(GaimConvChat *chat) { GaimConversation *conv; GaimConversationUiOps *ops; @@ -2110,9 +2110,9 @@ g_return_if_fail(chat != NULL); - conv = gaim_chat_get_conversation(chat); + conv = gaim_conv_chat_get_conversation(chat); ops = gaim_conversation_get_ui_ops(conv); - users = gaim_chat_get_users(chat); + users = gaim_conv_chat_get_users(chat); if (ops != NULL && ops->chat_remove_users != NULL) ops->chat_remove_users(conv, users); @@ -2132,7 +2132,7 @@ } g_list_free(users); - gaim_chat_set_users(chat, NULL); + gaim_conv_chat_set_users(chat, NULL); } GaimConversation * @@ -2144,7 +2144,7 @@ for (l = gaim_get_chats(); l != NULL; l = l->next) { conv = (GaimConversation *)l->data; - if (gaim_chat_get_id(GAIM_CHAT(conv)) == id && + if (gaim_conv_chat_get_id(GAIM_CONV_CHAT(conv)) == id && gaim_conversation_get_gc(conv) == gc) return conv; } @@ -2159,7 +2159,7 @@ static void conv_placement_last_created_win(GaimConversation *conv) { - GaimWindow *win; + GaimConvWindow *win; if (gaim_prefs_get_bool("/core/conversations/combine_chat_im")) win = g_list_last(gaim_get_windows())->data; @@ -2167,26 +2167,26 @@ win = gaim_get_last_window_with_type(gaim_conversation_get_type(conv)); if (win == NULL) { - win = gaim_window_new(); - - gaim_window_add_conversation(win, conv); - gaim_window_show(win); + win = gaim_conv_window_new(); + + gaim_conv_window_add_conversation(win, conv); + gaim_conv_window_show(win); } else - gaim_window_add_conversation(win, conv); + gaim_conv_window_add_conversation(win, conv); } /* This one places each conversation in its own window. */ static void conv_placement_new_window(GaimConversation *conv) { - GaimWindow *win; - - win = gaim_window_new(); - - gaim_window_add_conversation(win, conv); - - gaim_window_show(win); + GaimConvWindow *win; + + win = gaim_conv_window_new(); + + gaim_conv_window_add_conversation(win, conv); + + gaim_conv_window_show(win); } /* @@ -2197,7 +2197,7 @@ static void conv_placement_by_group(GaimConversation *conv) { - GaimWindow *win; + GaimConvWindow *win; GaimConversationType type; type = gaim_conversation_get_type(conv); @@ -2215,14 +2215,14 @@ /* Go through the list of IMs and find one with this group. */ for (wins = gaim_get_windows(); wins != NULL; wins = wins->next) { - GaimWindow *win2; + GaimConvWindow *win2; GaimConversation *conv2; GaimBuddy *b2; GaimGroup *g2 = NULL; - win2 = (GaimWindow *)wins->data; - - for (convs = gaim_window_get_conversations(win2); + win2 = (GaimConvWindow *)wins->data; + + for (convs = gaim_conv_window_get_conversations(win2); convs != NULL; convs = convs->next) { @@ -2235,7 +2235,7 @@ g2 = gaim_find_buddys_group(b2); if (grp == g2) { - gaim_window_add_conversation(win2, conv); + gaim_conv_window_add_conversation(win2, conv); return; } @@ -2246,7 +2246,7 @@ conv_placement_new_window(conv); } else if (type == GAIM_CONV_CHAT) { - GaimBlistChat *chat; + GaimChat *chat; GaimGroup *group = NULL; GList *wins, *convs; @@ -2258,14 +2258,14 @@ /* Go through the list of chats and find one with this group. */ for (wins = gaim_get_windows(); wins != NULL; wins = wins->next) { - GaimWindow *win2; + GaimConvWindow *win2; GaimConversation *conv2; - GaimBlistChat *chat2; + GaimChat *chat2; GaimGroup *group2 = NULL; - win2 = (GaimWindow *)wins->data; - - for (convs = gaim_window_get_conversations(win2); + win2 = (GaimConvWindow *)wins->data; + + for (convs = gaim_conv_window_get_conversations(win2); convs != NULL; convs = convs->next) { @@ -2279,7 +2279,7 @@ group2 = gaim_blist_chat_get_group(chat2); if (group == group2) { - gaim_window_add_conversation(win2, conv); + gaim_conv_window_add_conversation(win2, conv); return; } @@ -2295,7 +2295,7 @@ if (win == NULL) conv_placement_new_window(conv); else - gaim_window_add_conversation(win, conv); + gaim_conv_window_add_conversation(win, conv); } } @@ -2314,12 +2314,12 @@ /* Go through the list of IMs and find one with this group. */ for (wins = gaim_get_windows(); wins != NULL; wins = wins->next) { - GaimWindow *win2; + GaimConvWindow *win2; GaimConversation *conv2; - win2 = (GaimWindow *)wins->data; - - for (convs = gaim_window_get_conversations(win2); + win2 = (GaimConvWindow *)wins->data; + + for (convs = gaim_conv_window_get_conversations(win2); convs != NULL; convs = convs->next) { @@ -2329,7 +2329,7 @@ type == gaim_conversation_get_type(conv2)) && account == gaim_conversation_get_account(conv2)) { - gaim_window_add_conversation(win2, conv); + gaim_conv_window_add_conversation(win2, conv); return; } @@ -2496,12 +2496,12 @@ } void -gaim_conversations_set_win_ui_ops(GaimWindowUiOps *ops) +gaim_conversations_set_win_ui_ops(GaimConvWindowUiOps *ops) { win_ui_ops = ops; } -GaimWindowUiOps * +GaimConvWindowUiOps * gaim_conversations_get_win_ui_ops(void) { return win_ui_ops;
--- a/src/conversation.h Thu Oct 02 02:15:36 2003 +0000 +++ b/src/conversation.h Thu Oct 02 02:54:07 2003 +0000 @@ -29,12 +29,12 @@ /** Data Structures */ /**************************************************************************/ -typedef struct _GaimWindowUiOps GaimWindowUiOps; -typedef struct _GaimWindow GaimWindow; +typedef struct _GaimConvWindowUiOps GaimConvWindowUiOps; +typedef struct _GaimConvWindow GaimConvWindow; typedef struct _GaimConversationUiOps GaimConversationUiOps; typedef struct _GaimConversation GaimConversation; -typedef struct _GaimIm GaimIm; -typedef struct _GaimChat GaimChat; +typedef struct _GaimConvIm GaimConvIm; +typedef struct _GaimConvChat GaimConvChat; /** * A type of conversation. @@ -112,6 +112,7 @@ GAIM_MESSAGE_NO_LOG = 0x0040, /**< Do not log. */ GAIM_MESSAGE_WHISPER = 0x0080, /**< Whispered message. */ GAIM_MESSAGE_IMAGES = 0x0100 /**< Message contains images. */ + } GaimMessageFlags; #include "account.h" @@ -121,27 +122,27 @@ /** * Conversation window operations. * - * Any UI representing a window must assign a filled-out gaim_window_ops - * structure to the GaimWindow. + * Any UI representing a window must assign a filled-out gaim_conv_window_ops + * structure to the GaimConvWindow. */ -struct _GaimWindowUiOps +struct _GaimConvWindowUiOps { GaimConversationUiOps *(*get_conversation_ui_ops)(void); - void (*new_window)(GaimWindow *win); - void (*destroy_window)(GaimWindow *win); + void (*new_window)(GaimConvWindow *win); + void (*destroy_window)(GaimConvWindow *win); - void (*show)(GaimWindow *win); - void (*hide)(GaimWindow *win); - void (*raise)(GaimWindow *win); - void (*flash)(GaimWindow *win); + void (*show)(GaimConvWindow *win); + void (*hide)(GaimConvWindow *win); + void (*raise)(GaimConvWindow *win); + void (*flash)(GaimConvWindow *win); - void (*switch_conversation)(GaimWindow *win, unsigned int index); - void (*add_conversation)(GaimWindow *win, GaimConversation *conv); - void (*remove_conversation)(GaimWindow *win, GaimConversation *conv); - void (*move_conversation)(GaimWindow *win, GaimConversation *conv, + void (*switch_conversation)(GaimConvWindow *win, unsigned int index); + void (*add_conversation)(GaimConvWindow *win, GaimConversation *conv); + void (*remove_conversation)(GaimConvWindow *win, GaimConversation *conv); + void (*move_conversation)(GaimConvWindow *win, GaimConversation *conv, unsigned int newIndex); - int (*get_active_index)(const GaimWindow *win); + int (*get_active_index)(const GaimConvWindow *win); }; /** @@ -154,9 +155,11 @@ { void (*destroy_conversation)(GaimConversation *conv); void (*write_chat)(GaimConversation *conv, const char *who, - const char *message, GaimMessageFlags flags, time_t mtime); + const char *message, GaimMessageFlags flags, + time_t mtime); void (*write_im)(GaimConversation *conv, const char *who, - const char *message, GaimMessageFlags flags, time_t mtime); + const char *message, GaimMessageFlags flags, + time_t mtime); void (*write_conv)(GaimConversation *conv, const char *who, const char *message, GaimMessageFlags flags, time_t mtime); @@ -179,19 +182,19 @@ * A core representation of a graphical window containing one or more * conversations. */ -struct _GaimWindow +struct _GaimConvWindow { GList *conversations; /**< The conversations in the window. */ size_t conversation_count; /**< The number of conversations. */ - GaimWindowUiOps *ui_ops; /**< UI-specific window operations. */ + GaimConvWindowUiOps *ui_ops; /**< UI-specific window operations. */ void *ui_data; /**< UI-specific data. */ }; /** * Data specific to Instant Messages. */ -struct _GaimIm +struct _GaimConvIm { GaimConversation *conv; /**< The parent conversation. */ @@ -208,7 +211,7 @@ /** * Data specific to Chats. */ -struct _GaimChat +struct _GaimConvChat { GaimConversation *conv; /**< The parent conversation. */ @@ -223,14 +226,14 @@ * A core representation of a conversation between two or more people. * * The conversation can be an IM or a chat. Each conversation is kept - * in a GaimWindow and has a UI representation. + * in a GaimConvWindow and has a UI representation. */ struct _GaimConversation { GaimConversationType type; /**< The type of conversation. */ GaimAccount *account; /**< The user using this conversation. */ - GaimWindow *window; /**< The parent window. */ + GaimConvWindow *window; /**< The parent window. */ int conversation_pos; /**< The position in the window's list. */ @@ -246,8 +249,8 @@ union { - GaimIm *im; /**< IM-specific data. */ - GaimChat *chat; /**< Chat-specific data. */ + GaimConvIm *im; /**< IM-specific data. */ + GaimConvChat *chat; /**< Chat-specific data. */ void *misc; /**< Misc. data. */ } u; @@ -273,46 +276,46 @@ * Creates a new conversation window. * * This window is added to the list of windows, but is not shown until - * gaim_window_show() is called. + * gaim_conv_window_show() is called. * * @return The new conversation window. */ -GaimWindow *gaim_window_new(void); +GaimConvWindow *gaim_conv_window_new(void); /** * Destroys the specified conversation window and all conversations in it. * * @param win The window to destroy. */ -void gaim_window_destroy(GaimWindow *win); +void gaim_conv_window_destroy(GaimConvWindow *win); /** * Shows the specified conversation window. * * @param win The window. */ -void gaim_window_show(GaimWindow *win); +void gaim_conv_window_show(GaimConvWindow *win); /** * Hides the specified conversation window. * * @param win The window. */ -void gaim_window_hide(GaimWindow *win); +void gaim_conv_window_hide(GaimConvWindow *win); /** * Raises the specified conversation window. * * @param win The window. */ -void gaim_window_raise(GaimWindow *win); +void gaim_conv_window_raise(GaimConvWindow *win); /** * Causes the window to flash for IM notification, if the UI supports this. * * @param win The window. */ -void gaim_window_flash(GaimWindow *win); +void gaim_conv_window_flash(GaimConvWindow *win); /** * Sets the specified window's UI window operations structure. @@ -320,7 +323,8 @@ * @param win The window. * @param ops The UI window operations structure. */ -void gaim_window_set_ui_ops(GaimWindow *win, GaimWindowUiOps *ops); +void gaim_conv_window_set_ui_ops(GaimConvWindow *win, + GaimConvWindowUiOps *ops); /** * Returns the specified window's UI window operations structure. @@ -329,7 +333,7 @@ * * @return The UI window operations structure. */ -GaimWindowUiOps *gaim_window_get_ui_ops(const GaimWindow *win); +GaimConvWindowUiOps *gaim_conv_window_get_ui_ops(const GaimConvWindow *win); /** * Adds a conversation to this window. @@ -341,7 +345,8 @@ * * @return The new index of the conversation in the window. */ -int gaim_window_add_conversation(GaimWindow *win, GaimConversation *conv); +int gaim_conv_window_add_conversation(GaimConvWindow *win, + GaimConversation *conv); /** * Removes the conversation at the specified index from the window. @@ -353,8 +358,8 @@ * * @return The conversation removed. */ -GaimConversation *gaim_window_remove_conversation(GaimWindow *win, - unsigned int index); +GaimConversation *gaim_conv_window_remove_conversation(GaimConvWindow *win, + unsigned int index); /** * Moves the conversation at the specified index in a window to a new index. @@ -363,8 +368,9 @@ * @param index The index of the conversation to move. * @param new_index The new index. */ -void gaim_window_move_conversation(GaimWindow *win, unsigned int index, - unsigned int new_index); +void gaim_conv_window_move_conversation(GaimConvWindow *win, + unsigned int index, + unsigned int new_index); /** * Returns the conversation in the window at the specified index. @@ -376,8 +382,8 @@ * * @return The conversation at the specified index. */ -GaimConversation *gaim_window_get_conversation_at(const GaimWindow *win, - unsigned int index); +GaimConversation *gaim_conv_window_get_conversation_at( + const GaimConvWindow *win, unsigned int index); /** * Returns the number of conversations in the window. @@ -386,7 +392,7 @@ * * @return The number of conversations. */ -size_t gaim_window_get_conversation_count(const GaimWindow *win); +size_t gaim_conv_window_get_conversation_count(const GaimConvWindow *win); /** * Switches the active conversation to the one at the specified index. @@ -396,7 +402,8 @@ * @param win The window. * @param index The new index. */ -void gaim_window_switch_conversation(GaimWindow *win, unsigned int index); +void gaim_conv_window_switch_conversation(GaimConvWindow *win, + unsigned int index); /** * Returns the active conversation in the window. @@ -405,7 +412,8 @@ * * @return The active conversation. */ -GaimConversation *gaim_window_get_active_conversation(const GaimWindow *win); +GaimConversation *gaim_conv_window_get_active_conversation( + const GaimConvWindow *win); /** * Returns the list of conversations in the specified window. @@ -414,7 +422,7 @@ * * @return The list of conversations. */ -GList *gaim_window_get_conversations(const GaimWindow *win); +GList *gaim_conv_window_get_conversations(const GaimConvWindow *win); /** * Returns a list of all windows. @@ -430,7 +438,7 @@ * * @return The window if found, or @c NULL if not found. */ -GaimWindow *gaim_get_first_window_with_type(GaimConversationType type); +GaimConvWindow *gaim_get_first_window_with_type(GaimConversationType type); /** * Returns the last window containing a conversation of the specified type. @@ -439,7 +447,7 @@ * * @return The window if found, or @c NULL if not found. */ -GaimWindow *gaim_get_last_window_with_type(GaimConversationType type); +GaimConvWindow *gaim_get_last_window_with_type(GaimConversationType type); /*@}*/ @@ -649,7 +657,7 @@ * * @return The conversation's parent window. */ -GaimWindow *gaim_conversation_get_window(const GaimConversation *conv); +GaimConvWindow *gaim_conversation_get_window(const GaimConversation *conv); /** * Returns the specified conversation's IM-specific data. @@ -660,9 +668,9 @@ * * @return The IM-specific data. */ -GaimIm *gaim_conversation_get_im_data(const GaimConversation *conv); +GaimConvIm *gaim_conversation_get_im_data(const GaimConversation *conv); -#define GAIM_IM(c) (gaim_conversation_get_im_data(c)) +#define GAIM_CONV_IM(c) (gaim_conversation_get_im_data(c)) /** * Returns the specified conversation's chat-specific data. @@ -673,9 +681,9 @@ * * @return The chat-specific data. */ -GaimChat *gaim_conversation_get_chat_data(const GaimConversation *conv); +GaimConvChat *gaim_conversation_get_chat_data(const GaimConversation *conv); -#define GAIM_CHAT(c) (gaim_conversation_get_chat_data(c)) +#define GAIM_CONV_CHAT(c) (gaim_conversation_get_chat_data(c)) /** * Sets extra data for a conversation. @@ -744,7 +752,7 @@ * Writes to a conversation window. * * This function should not be used to write IM or chat messages. Use - * gaim_im_write() and gaim_chat_write() instead. Those functions will + * gaim_conv_im_write() and gaim_conv_chat_write() instead. Those functions will * most likely call this anyway, but they may do their own formatting, * sound playback, etc. * @@ -757,8 +765,8 @@ * @param flags The message flags. * @param mtime The time the message was sent. * - * @see gaim_im_write() - * @see gaim_chat_write() + * @see gaim_conv_im_write() + * @see gaim_conv_chat_write() */ void gaim_conversation_write(GaimConversation *conv, const char *who, const char *message, GaimMessageFlags flags, @@ -805,7 +813,7 @@ * * @return The parent conversation. */ -GaimConversation *gaim_im_get_conversation(const GaimIm *im); +GaimConversation *gaim_conv_im_get_conversation(const GaimConvIm *im); /** * Sets the IM's buddy icon. @@ -818,7 +826,7 @@ * * @see gaim_buddy_icon_set_data() */ -void gaim_im_set_icon(GaimIm *im, GaimBuddyIcon *icon); +void gaim_conv_im_set_icon(GaimConvIm *im, GaimBuddyIcon *icon); /** * Returns the IM's buddy icon. @@ -827,7 +835,7 @@ * * @return The buddy icon. */ -GaimBuddyIcon *gaim_im_get_icon(const GaimIm *im); +GaimBuddyIcon *gaim_conv_im_get_icon(const GaimConvIm *im); /** * Sets the IM's typing state. @@ -835,7 +843,7 @@ * @param im The IM. * @param state The typing state. */ -void gaim_im_set_typing_state(GaimIm *im, int state); +void gaim_conv_im_set_typing_state(GaimConvIm *im, int state); /** * Returns the IM's typing state. @@ -844,7 +852,7 @@ * * @return The IM's typing state. */ -int gaim_im_get_typing_state(const GaimIm *im); +int gaim_conv_im_get_typing_state(const GaimConvIm *im); /** * Starts the IM's typing timeout. @@ -852,14 +860,14 @@ * @param im The IM. * @param timeout The timeout. */ -void gaim_im_start_typing_timeout(GaimIm *im, int timeout); +void gaim_conv_im_start_typing_timeout(GaimConvIm *im, int timeout); /** * Stops the IM's typing timeout. * * @param im The IM. */ -void gaim_im_stop_typing_timeout(GaimIm *im); +void gaim_conv_im_stop_typing_timeout(GaimConvIm *im); /** * Returns the IM's typing timeout. @@ -868,7 +876,7 @@ * * @return The timeout. */ -guint gaim_im_get_typing_timeout(const GaimIm *im); +guint gaim_conv_im_get_typing_timeout(const GaimConvIm *im); /** * Sets the IM's time until it should send another typing notification. @@ -876,7 +884,7 @@ * @param im The IM. * @param val The time. */ -void gaim_im_set_type_again(GaimIm *im, time_t val); +void gaim_conv_im_set_type_again(GaimConvIm *im, time_t val); /** * Returns the IM's time until it should send another typing notification. @@ -885,21 +893,21 @@ * * @return The time. */ -time_t gaim_im_get_type_again(const GaimIm *im); +time_t gaim_conv_im_get_type_again(const GaimConvIm *im); /** * Starts the IM's type again timeout. * * @param im The IM. */ -void gaim_im_start_type_again_timeout(GaimIm *im); +void gaim_conv_im_start_type_again_timeout(GaimConvIm *im); /** * Stops the IM's type again timeout. * * @param im The IM. */ -void gaim_im_stop_type_again_timeout(GaimIm *im); +void gaim_conv_im_stop_type_again_timeout(GaimConvIm *im); /** * Returns the IM's type again timeout interval. @@ -908,14 +916,14 @@ * * @return The type again timeout interval. */ -guint gaim_im_get_type_again_timeout(const GaimIm *im); +guint gaim_conv_im_get_type_again_timeout(const GaimConvIm *im); /** * Updates the visual typing notification for an IM conversation. * * @param im The IM. */ -void gaim_im_update_typing(GaimIm *im); +void gaim_conv_im_update_typing(GaimConvIm *im); /** * Writes to an IM. @@ -926,8 +934,9 @@ * @param flags The message flags. * @param mtime The time the message was sent. */ -void gaim_im_write(GaimIm *im, const char *who, - const char *message, GaimMessageFlags flags, time_t mtime); +void gaim_conv_im_write(GaimConvIm *im, const char *who, + const char *message, GaimMessageFlags flags, + time_t mtime); /** * Sends a message to this IM conversation. @@ -935,7 +944,7 @@ * @param im The IM. * @param message The message to send. */ -void gaim_im_send(GaimIm *im, const char *message); +void gaim_conv_im_send(GaimConvIm *im, const char *message); /*@}*/ @@ -952,21 +961,21 @@ * * @return The parent conversation. */ -GaimConversation *gaim_chat_get_conversation(const GaimChat *chat); +GaimConversation *gaim_conv_chat_get_conversation(const GaimConvChat *chat); /** * Sets the list of users in the chat room. * * @note Calling this function will not update the display of the users. - * Please use gaim_chat_add_user(), gaim_chat_add_users(), - * gaim_chat_remove_user(), and gaim_chat_remove_users() instead. + * Please use gaim_conv_chat_add_user(), gaim_conv_chat_add_users(), + * gaim_conv_chat_remove_user(), and gaim_conv_chat_remove_users() instead. * * @param chat The chat. * @param users The list of users. * * @return The list passed. */ -GList *gaim_chat_set_users(GaimChat *chat, GList *users); +GList *gaim_conv_chat_set_users(GaimConvChat *chat, GList *users); /** * Returns a list of users in the chat room. @@ -975,7 +984,7 @@ * * @return The list of users. */ -GList *gaim_chat_get_users(const GaimChat *chat); +GList *gaim_conv_chat_get_users(const GaimConvChat *chat); /** * Ignores a user in a chat room. @@ -983,7 +992,7 @@ * @param chat The chat. * @param name The name of the user. */ -void gaim_chat_ignore(GaimChat *chat, const char *name); +void gaim_conv_chat_ignore(GaimConvChat *chat, const char *name); /** * Unignores a user in a chat room. @@ -991,7 +1000,7 @@ * @param chat The chat. * @param name The name of the user. */ -void gaim_chat_unignore(GaimChat *chat, const char *name); +void gaim_conv_chat_unignore(GaimConvChat *chat, const char *name); /** * Sets the list of ignored users in the chat room. @@ -1001,7 +1010,7 @@ * * @return The list passed. */ -GList *gaim_chat_set_ignored(GaimChat *chat, GList *ignored); +GList *gaim_conv_chat_set_ignored(GaimConvChat *chat, GList *ignored); /** * Returns the list of ignored users in the chat room. @@ -1010,7 +1019,7 @@ * * @return The list of ignored users. */ -GList *gaim_chat_get_ignored(const GaimChat *chat); +GList *gaim_conv_chat_get_ignored(const GaimConvChat *chat); /** * Returns the actual name of the specified ignored user, if it exists in @@ -1026,8 +1035,8 @@ * @return The ignored user if found, complete with prefixes, or @c NULL * if not found. */ -const char *gaim_chat_get_ignored_user(const GaimChat *chat, - const char *user); +const char *gaim_conv_chat_get_ignored_user(const GaimConvChat *chat, + const char *user); /** * Returns @c TRUE if the specified user is ignored. @@ -1037,8 +1046,8 @@ * * @return @c TRUE if the user is in the ignore list; @c FALSE otherwise. */ -gboolean gaim_chat_is_user_ignored(const GaimChat *chat, - const char *user); +gboolean gaim_conv_chat_is_user_ignored(const GaimConvChat *chat, + const char *user); /** * Sets the chat room's topic. @@ -1047,8 +1056,8 @@ * @param who The user that set the topic. * @param topic The topic. */ -void gaim_chat_set_topic(GaimChat *chat, const char *who, - const char *topic); +void gaim_conv_chat_set_topic(GaimConvChat *chat, const char *who, + const char *topic); /** * Returns the chat room's topic. @@ -1057,7 +1066,7 @@ * * @return The chat's topic. */ -const char *gaim_chat_get_topic(const GaimChat *chat); +const char *gaim_conv_chat_get_topic(const GaimConvChat *chat); /** * Sets the chat room's ID. @@ -1065,7 +1074,7 @@ * @param chat The chat. * @param id The ID. */ -void gaim_chat_set_id(GaimChat *chat, int id); +void gaim_conv_chat_set_id(GaimConvChat *chat, int id); /** * Returns the chat room's ID. @@ -1074,7 +1083,7 @@ * * @return The ID. */ -int gaim_chat_get_id(const GaimChat *chat); +int gaim_conv_chat_get_id(const GaimConvChat *chat); /** * Writes to a chat. @@ -1085,8 +1094,9 @@ * @param flags The flags. * @param mtime The time the message was sent. */ -void gaim_chat_write(GaimChat *chat, const char *who, - const char *message, GaimMessageFlags flags, time_t mtime); +void gaim_conv_chat_write(GaimConvChat *chat, const char *who, + const char *message, GaimMessageFlags flags, + time_t mtime); /** * Sends a message to this chat conversation. @@ -1094,7 +1104,7 @@ * @param chat The chat. * @param message The message to send. */ -void gaim_chat_send(GaimChat *chat, const char *message); +void gaim_conv_chat_send(GaimConvChat *chat, const char *message); /** * Adds a user to a chat. @@ -1103,8 +1113,8 @@ * @param user The user to add. * @param extra_msg An extra message to display with the join message. */ -void gaim_chat_add_user(GaimChat *chat, const char *user, - const char *extra_msg); +void gaim_conv_chat_add_user(GaimConvChat *chat, const char *user, + const char *extra_msg); /** * Adds a list of users to a chat. @@ -1115,7 +1125,7 @@ * @param chat The chat. * @param users The list of users to add. */ -void gaim_chat_add_users(GaimChat *chat, GList *users); +void gaim_conv_chat_add_users(GaimConvChat *chat, GList *users); /** * Renames a user in a chat. @@ -1124,8 +1134,8 @@ * @param old_user The old username. * @param new_user The new username. */ -void gaim_chat_rename_user(GaimChat *chat, const char *old_user, - const char *new_user); +void gaim_conv_chat_rename_user(GaimConvChat *chat, const char *old_user, + const char *new_user); /** * Removes a user from a chat, optionally with a reason. @@ -1136,8 +1146,8 @@ * @param user The user that is being removed. * @param reason The optional reason given for the removal. Can be @c NULL. */ -void gaim_chat_remove_user(GaimChat *chat, const char *user, - const char *reason); +void gaim_conv_chat_remove_user(GaimConvChat *chat, const char *user, + const char *reason); /** * Removes a list of users from a chat, optionally with a single reason. @@ -1146,14 +1156,15 @@ * @param users The users that are being removed. * @param reason The optional reason given for the removal. Can be @c NULL. */ -void gaim_chat_remove_users(GaimChat *chat, GList *users, const char *reason); +void gaim_conv_chat_remove_users(GaimConvChat *chat, GList *users, + const char *reason); /** * Clears all users from a chat. * * @param chat The chat. */ -void gaim_chat_clear_users(GaimChat *chat); +void gaim_conv_chat_clear_users(GaimConvChat *chat); /** * Finds a chat with the specified chat ID. @@ -1241,15 +1252,15 @@ * * @param ops The UI operations structure. */ -void gaim_conversations_set_win_ui_ops(GaimWindowUiOps *ops); +void gaim_conversations_set_win_ui_ops(GaimConvWindowUiOps *ops); /** * Returns the gaim window UI operations structure to be used in * new windows. * - * @return A filled-out GaimWindowUiOps structure. + * @return A filled-out GaimConvWindowUiOps structure. */ -GaimWindowUiOps *gaim_conversations_get_win_ui_ops(void); +GaimConvWindowUiOps *gaim_conversations_get_win_ui_ops(void); /*@}*/
--- a/src/dialogs.c Thu Oct 02 02:15:36 2003 +0000 +++ b/src/dialogs.c Thu Oct 02 02:54:07 2003 +0000 @@ -358,7 +358,7 @@ } static void -do_remove_chat(GaimBlistChat *chat) +do_remove_chat(GaimChat *chat) { gaim_blist_remove_chat(chat); gaim_blist_save(); @@ -440,7 +440,7 @@ } } } else if(GAIM_BLIST_NODE_IS_CHAT(cnode)) { - GaimBlistChat *chat = (GaimBlistChat *)cnode; + GaimChat *chat = (GaimChat *)cnode; cnode = cnode->next; if(gaim_account_is_connected(chat->account)) gaim_blist_remove_chat(chat); @@ -468,7 +468,7 @@ g_free(text); } -void show_confirm_del_blist_chat(GaimBlistChat *chat) +void show_confirm_del_blist_chat(GaimChat *chat) { char *name = gaim_blist_chat_get_display_name(chat); char *text = g_strdup_printf(_("You are about to remove the chat %s from your buddy list. Do you want to continue?"), name); @@ -539,7 +539,7 @@ if (conv == NULL) conv = gaim_conversation_new(GAIM_CONV_IM, account, who); else { - gaim_window_raise(gaim_conversation_get_window(conv)); + gaim_conv_window_raise(gaim_conversation_get_window(conv)); } } @@ -1797,14 +1797,14 @@ } static void -alias_chat_cb(GaimBlistChat *chat, const char *new_alias) +alias_chat_cb(GaimChat *chat, const char *new_alias) { gaim_blist_alias_chat(chat, new_alias); gaim_blist_save(); } void -alias_dialog_blist_chat(GaimBlistChat *chat) +alias_dialog_blist_chat(GaimChat *chat) { gaim_request_input(NULL, _("Alias Chat"), _("Alias chat"), _("Please enter an aliased name for this chat."),
--- a/src/gaim.h Thu Oct 02 02:15:36 2003 +0000 +++ b/src/gaim.h Thu Oct 02 02:54:07 2003 +0000 @@ -39,7 +39,7 @@ /* Functions in dialogs.c */ extern void show_confirm_del(GaimBuddy *); extern void show_confirm_del_group(GaimGroup *); -extern void show_confirm_del_blist_chat(GaimBlistChat *); +extern void show_confirm_del_blist_chat(GaimChat *); extern void show_confirm_del_contact(GaimContact *); /* Functions in gaimrc.c */
--- a/src/gtkconv.c Thu Oct 02 02:15:36 2003 +0000 +++ b/src/gtkconv.c Thu Oct 02 02:54:07 2003 +0000 @@ -136,7 +136,7 @@ const char *name, int pos); static void tab_complete(GaimConversation *conv); static void update_typing_icon(GaimConversation *conv); -static gboolean update_send_as_selection(GaimWindow *win); +static gboolean update_send_as_selection(GaimConvWindow *win); static char *item_factory_translate_func (const char *path, gpointer func_data); static void save_convo(GtkWidget *save, GaimConversation *c); static void update_tab_icon(GaimConversation *conv); @@ -195,7 +195,7 @@ { GaimConversation *conv; GaimGtkConversation *gtkconv; - GaimIm *im; + GaimConvIm *im; char *name, *filename; char *buf, *data; size_t size; @@ -204,7 +204,7 @@ conv = g_object_get_data(G_OBJECT(wid), "user_data"); gtkconv = GAIM_GTK_CONVERSATION(conv); - im = GAIM_IM(conv); + im = GAIM_CONV_IM(conv); name = g_strdup(gtk_file_selection_get_filename(GTK_FILE_SELECTION(wid))); if (!name) { @@ -261,9 +261,9 @@ static gint close_win_cb(GtkWidget *w, GdkEventAny *e, gpointer d) { - GaimWindow *win = (GaimWindow *)d; - - gaim_window_destroy(win); + GaimConvWindow *win = (GaimConvWindow *)d; + + gaim_conv_window_destroy(win); return TRUE; } @@ -389,7 +389,7 @@ gtk_widget_grab_focus(gtkconv->entry); - limit = 32 * 1024; /* This will be done again in gaim_im_send. *shrug* */ + limit = 32 * 1024; /* This will be done again in gaim_conv_im_send. *shrug* */ buf = g_malloc(limit); strncpy(buf, buf2, limit); @@ -463,12 +463,12 @@ g_free(buf2); if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) - gaim_im_send(GAIM_IM(conv), buf); + gaim_conv_im_send(GAIM_CONV_IM(conv), buf); else - gaim_chat_send(GAIM_CHAT(conv), buf); + gaim_conv_chat_send(GAIM_CONV_CHAT(conv), buf); if (gaim_prefs_get_bool("/gaim/gtk/conversations/im/hide_on_send")) - gaim_window_hide(gaim_conversation_get_window(conv)); + gaim_conv_window_hide(gaim_conversation_get_window(conv)); g_free(buf); @@ -569,7 +569,7 @@ } serv_chat_invite(gaim_conversation_get_gc(info->conv), - gaim_chat_get_id(GAIM_CHAT(info->conv)), + gaim_conv_chat_get_id(GAIM_CONV_CHAT(info->conv)), message, buddy); } @@ -586,7 +586,7 @@ if (invite_dialog == NULL) { GaimConnection *gc; - GaimWindow *win; + GaimConvWindow *win; GaimGtkWindow *gtkwin; GtkWidget *label; GtkWidget *vbox, *hbox; @@ -699,18 +699,18 @@ static void menu_save_as_cb(gpointer data, guint action, GtkWidget *widget) { - GaimWindow *win = (GaimWindow *)data; - - save_convo(NULL, gaim_window_get_active_conversation(win)); + GaimConvWindow *win = (GaimConvWindow *)data; + + save_convo(NULL, gaim_conv_window_get_active_conversation(win)); } static void menu_view_log_cb(gpointer data, guint action, GtkWidget *widget) { - GaimWindow *win = (GaimWindow *)data; + GaimConvWindow *win = (GaimConvWindow *)data; GaimConversation *conv; - conv = gaim_window_get_active_conversation(win); + conv = gaim_conv_window_get_active_conversation(win); conv_show_log(NULL, (char *)gaim_conversation_get_name(conv)); } @@ -718,10 +718,10 @@ static void menu_add_pounce_cb(gpointer data, guint action, GtkWidget *widget) { - GaimWindow *win = (GaimWindow *)data; + GaimConvWindow *win = (GaimConvWindow *)data; GaimConversation *conv; - conv = gaim_window_get_active_conversation(win); + conv = gaim_conv_window_get_active_conversation(win); gaim_gtkpounce_dialog_show(gaim_conversation_get_account(conv), gaim_conversation_get_name(conv), NULL); @@ -730,11 +730,11 @@ static void menu_insert_link_cb(gpointer data, guint action, GtkWidget *widget) { - GaimWindow *win = (GaimWindow *)data; + GaimConvWindow *win = (GaimConvWindow *)data; GaimConversation *conv; GaimGtkConversation *gtkconv; - conv = gaim_window_get_active_conversation(win); + conv = gaim_conv_window_get_active_conversation(win); gtkconv = GAIM_GTK_CONVERSATION(conv); show_insert_link(gtkconv->toolbar.link, conv); @@ -743,10 +743,10 @@ static void menu_insert_image_cb(gpointer data, guint action, GtkWidget *widget) { - GaimWindow *win = (GaimWindow *)data; + GaimConvWindow *win = (GaimConvWindow *)data; GaimGtkConversation *gtkconv; - gtkconv = GAIM_GTK_CONVERSATION(gaim_window_get_active_conversation(win)); + gtkconv = GAIM_GTK_CONVERSATION(gaim_conv_window_get_active_conversation(win)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gtkconv->toolbar.image), !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gtkconv->toolbar.image))); @@ -755,11 +755,11 @@ static void menu_alias_cb(gpointer data, guint action, GtkWidget *widget) { - GaimWindow *win = (GaimWindow *)data; + GaimConvWindow *win = (GaimConvWindow *)data; GaimConversation *conv; GaimBuddy *b; - conv = gaim_window_get_active_conversation(win); + conv = gaim_conv_window_get_active_conversation(win); b = gaim_find_buddy(gaim_conversation_get_account(conv), gaim_conversation_get_name(conv)); @@ -777,10 +777,10 @@ static void menu_get_info_cb(gpointer data, guint action, GtkWidget *widget) { - GaimWindow *win = (GaimWindow *)data; + GaimConvWindow *win = (GaimConvWindow *)data; GaimConversation *conv; - conv = gaim_window_get_active_conversation(win); + conv = gaim_conv_window_get_active_conversation(win); info_cb(NULL, conv); } @@ -788,10 +788,10 @@ static void menu_invite_cb(gpointer data, guint action, GtkWidget *widget) { - GaimWindow *win = (GaimWindow *)data; + GaimConvWindow *win = (GaimConvWindow *)data; GaimConversation *conv; - conv = gaim_window_get_active_conversation(win); + conv = gaim_conv_window_get_active_conversation(win); invite_cb(NULL, conv); } @@ -799,10 +799,10 @@ static void menu_warn_cb(gpointer data, guint action, GtkWidget *widget) { - GaimWindow *win = (GaimWindow *)data; + GaimConvWindow *win = (GaimConvWindow *)data; GaimConversation *conv; - conv = gaim_window_get_active_conversation(win); + conv = gaim_conv_window_get_active_conversation(win); warn_cb(NULL, conv); } @@ -810,10 +810,10 @@ static void menu_block_cb(gpointer data, guint action, GtkWidget *widget) { - GaimWindow *win = (GaimWindow *)data; + GaimConvWindow *win = (GaimConvWindow *)data; GaimConversation *conv; - conv = gaim_window_get_active_conversation(win); + conv = gaim_conv_window_get_active_conversation(win); block_cb(NULL, conv); } @@ -821,10 +821,10 @@ static void menu_add_remove_cb(gpointer data, guint action, GtkWidget *widget) { - GaimWindow *win = (GaimWindow *)data; + GaimConvWindow *win = (GaimConvWindow *)data; GaimConversation *conv; - conv = gaim_window_get_active_conversation(win); + conv = gaim_conv_window_get_active_conversation(win); add_cb(NULL, conv); } @@ -832,18 +832,18 @@ static void menu_close_conv_cb(gpointer data, guint action, GtkWidget *widget) { - GaimWindow *win = (GaimWindow *)data; - - close_conv_cb(NULL, gaim_window_get_active_conversation(win)); + GaimConvWindow *win = (GaimConvWindow *)data; + + close_conv_cb(NULL, gaim_conv_window_get_active_conversation(win)); } static void menu_logging_cb(gpointer data, guint action, GtkWidget *widget) { - GaimWindow *win = (GaimWindow *)data; + GaimConvWindow *win = (GaimConvWindow *)data; GaimConversation *conv; - conv = gaim_window_get_active_conversation(win); + conv = gaim_conv_window_get_active_conversation(win); if (conv == NULL) return; @@ -855,11 +855,11 @@ static void menu_sounds_cb(gpointer data, guint action, GtkWidget *widget) { - GaimWindow *win = (GaimWindow *)data; + GaimConvWindow *win = (GaimConvWindow *)data; GaimConversation *conv; GaimGtkConversation *gtkconv; - conv = gaim_window_get_active_conversation(win); + conv = gaim_conv_window_get_active_conversation(win); if (!conv) return; @@ -904,7 +904,7 @@ conv2 = gaim_find_conversation_with_account(name, account); if (conv2 != NULL) - gaim_window_raise(gaim_conversation_get_window(conv2)); + gaim_conv_window_raise(gaim_conversation_get_window(conv2)); else conv2 = gaim_conversation_new(GAIM_CONV_IM, account, name); } @@ -914,14 +914,14 @@ { GaimGtkConversation *gtkconv; GaimGtkChatPane *gtkchat; - GaimChat *chat; + GaimConvChat *chat; GtkTreeIter iter; GtkTreeModel *model; GtkTreeSelection *sel; const char *name; int pos; - chat = GAIM_CHAT(conv); + chat = GAIM_CONV_CHAT(conv); gtkconv = GAIM_GTK_CONVERSATION(conv); gtkchat = gtkconv->u.chat; @@ -935,12 +935,12 @@ else return; - pos = g_list_index(gaim_chat_get_users(chat), name); - - if (gaim_chat_is_user_ignored(chat, name)) - gaim_chat_unignore(chat, name); + pos = g_list_index(gaim_conv_chat_get_users(chat), name); + + if (gaim_conv_chat_is_user_ignored(chat, name)) + gaim_conv_chat_unignore(chat, name); else - gaim_chat_ignore(chat, name); + gaim_conv_chat_ignore(chat, name); add_chat_buddy_common(conv, name, pos); } @@ -959,7 +959,7 @@ conv2 = gaim_find_conversation_with_account(who, account); if (conv2 != NULL) - gaim_window_show(gaim_conversation_get_window(conv2)); + gaim_conv_window_show(gaim_conversation_get_window(conv2)); else conv2 = gaim_conversation_new(GAIM_CONV_IM, account, who); } @@ -982,7 +982,7 @@ * buddy chat "rooms"... */ if (prpl_info->get_cb_info != NULL) - prpl_info->get_cb_info(gc, gaim_chat_get_id(GAIM_CHAT(conv)), who); + prpl_info->get_cb_info(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(conv)), who); else prpl_info->get_info(gc, who); } @@ -1006,7 +1006,7 @@ */ if (prpl_info->get_cb_away != NULL) - prpl_info->get_cb_away(gc, gaim_chat_get_id(GAIM_CHAT(conv)), who); + prpl_info->get_cb_away(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(conv)), who); } } @@ -1100,7 +1100,7 @@ gtk_menu_shell_append(GTK_MENU_SHELL(menu), button); gtk_widget_show(button); - if (gaim_chat_is_user_ignored(GAIM_CHAT(conv), who)) + if (gaim_conv_chat_is_user_ignored(GAIM_CONV_CHAT(conv), who)) button = gtk_menu_item_new_with_label(_("Un-Ignore")); else button = gtk_menu_item_new_with_label(_("Ignore")); @@ -1155,7 +1155,7 @@ static gboolean entry_key_pressed_cb_2(GtkWidget *entry, GdkEventKey *event, gpointer data) { - GaimWindow *win; + GaimConvWindow *win; GaimConversation *conv; GaimGtkConversation *gtkconv; GaimGtkWindow *gtkwin; @@ -1373,13 +1373,13 @@ gtk_window_iconify(GTK_WINDOW(gtkwin->window)); } else if (event->keyval == '[') { - gaim_window_switch_conversation(win, + gaim_conv_window_switch_conversation(win, gaim_conversation_get_index(conv) - 1); g_signal_stop_emission_by_name(G_OBJECT(entry), "key_press_event"); } else if (event->keyval == ']') { - gaim_window_switch_conversation(win, + gaim_conv_window_switch_conversation(win, gaim_conversation_get_index(conv) + 1); g_signal_stop_emission_by_name(G_OBJECT(entry), "key_press_event"); @@ -1405,7 +1405,7 @@ else if ((event->state & GDK_MOD1_MASK) && event->keyval > '0' && event->keyval <= '9') { - gaim_window_switch_conversation(win, event->keyval - '1'); + gaim_conv_window_switch_conversation(win, event->keyval - '1'); g_signal_stop_emission_by_name(G_OBJECT(entry), "key_press_event"); } @@ -1447,11 +1447,11 @@ static void menu_conv_sel_send_cb(GObject *m, gpointer data) { - GaimWindow *win = g_object_get_data(m, "user_data"); + GaimConvWindow *win = g_object_get_data(m, "user_data"); GaimAccount *account = g_object_get_data(m, "gaim_account"); GaimConversation *conv; - conv = gaim_window_get_active_conversation(win); + conv = gaim_conv_window_get_active_conversation(win); gaim_conversation_set_account(conv, account); } @@ -1476,20 +1476,20 @@ GtkTextIter *end_pos, gpointer user_data) { GaimConversation *conv = (GaimConversation *)user_data; - GaimIm *im; + GaimConvIm *im; g_return_if_fail(conv != NULL); if (!gaim_prefs_get_bool("/core/conversations/im/send_typing")) return; - im = GAIM_IM(conv); + im = GAIM_CONV_IM(conv); if (gtk_text_iter_is_start(start_pos) && gtk_text_iter_is_end(end_pos)) { /* We deleted all the text, so turn off typing. */ - if (gaim_im_get_type_again_timeout(im)) - gaim_im_stop_type_again_timeout(im); + if (gaim_conv_im_get_type_again_timeout(im)) + gaim_conv_im_stop_type_again_timeout(im); serv_send_typing(gaim_conversation_get_gc(conv), gaim_conversation_get_name(conv), @@ -1531,7 +1531,7 @@ } static gboolean -notebook_motion_cb(GtkWidget *widget, GdkEventButton *e, GaimWindow *win) +notebook_motion_cb(GtkWidget *widget, GdkEventButton *e, GaimConvWindow *win) { GaimGtkWindow *gtkwin; @@ -1552,7 +1552,7 @@ } } else { /* Otherwise, draw the arrows. */ - GaimWindow *dest_win; + GaimConvWindow *dest_win; GaimGtkWindow *dest_gtkwin; GtkNotebook *dest_notebook; GtkWidget *tab, *last_vis_tab = NULL; @@ -1589,7 +1589,7 @@ } /* Find out where to put the arrows. */ - for (l = gaim_window_get_conversations(dest_win), i = 0; + for (l = gaim_conv_window_get_conversations(dest_win), i = 0; l != NULL; l = l->next, i++) { @@ -1665,7 +1665,7 @@ } static gboolean -notebook_leave_cb(GtkWidget *widget, GdkEventCrossing *e, GaimWindow *win) +notebook_leave_cb(GtkWidget *widget, GdkEventCrossing *e, GaimConvWindow *win) { GaimGtkWindow *gtkwin; @@ -1690,7 +1690,7 @@ * THANK YOU GALEON! */ static gboolean -notebook_press_cb(GtkWidget *widget, GdkEventButton *e, GaimWindow *win) +notebook_press_cb(GtkWidget *widget, GdkEventButton *e, GaimConvWindow *win) { GaimGtkWindow *gtkwin; gint nb_x, nb_y, x_rel, y_rel; @@ -1733,7 +1733,7 @@ gtkwin->drag_max_y = 0; /* Find out which tab was dragged. */ - for (l = gaim_window_get_conversations(win); l != NULL; l = l->next) { + for (l = gaim_conv_window_get_conversations(win); l != NULL; l = l->next) { GaimConversation *conv = l->data; GtkWidget *tab = GAIM_GTK_CONVERSATION(conv)->tabby; @@ -1774,9 +1774,9 @@ } static gboolean -notebook_release_cb(GtkWidget *widget, GdkEventButton *e, GaimWindow *win) +notebook_release_cb(GtkWidget *widget, GdkEventButton *e, GaimConvWindow *win) { - GaimWindow *dest_win; + GaimConvWindow *dest_win; GaimGtkWindow *gtkwin; GaimGtkWindow *dest_gtkwin; GaimConversation *conv; @@ -1835,25 +1835,25 @@ dest_win = gaim_gtkwin_get_at_xy(e->x_root, e->y_root); - conv = gaim_window_get_active_conversation(win); + conv = gaim_conv_window_get_active_conversation(win); if (dest_win == NULL) { - if (gaim_window_get_conversation_count(win) < 2) + if (gaim_conv_window_get_conversation_count(win) < 2) return FALSE; - if (gaim_window_get_conversation_count(win) > 1) { + if (gaim_conv_window_get_conversation_count(win) > 1) { /* Make a new window to stick this to. */ - GaimWindow *new_win; + GaimConvWindow *new_win; GaimGtkWindow *new_gtkwin; GaimGtkConversation *gtkconv; gint win_width, win_height; gtkconv = GAIM_GTK_CONVERSATION(conv); - new_win = gaim_window_new(); - - gaim_window_add_conversation(new_win, - gaim_window_remove_conversation(win, + new_win = gaim_conv_window_new(); + + gaim_conv_window_add_conversation(new_win, + gaim_conv_window_remove_conversation(win, gaim_conversation_get_index(conv))); new_gtkwin = GAIM_GTK_WINDOW(new_win); @@ -1865,7 +1865,7 @@ e->x_root - (win_width / 2), e->y_root - (win_height / 2)); - gaim_window_show(new_win); + gaim_conv_window_show(new_win); } return TRUE; @@ -1881,21 +1881,21 @@ e->x_root, e->y_root); if (win == dest_win) { - gaim_window_move_conversation(win, + gaim_conv_window_move_conversation(win, gaim_conversation_get_index(conv), dest_page_num); } else { size_t pos; - gaim_window_remove_conversation(win, + gaim_conv_window_remove_conversation(win, gaim_conversation_get_index(conv)); - pos = gaim_window_add_conversation(dest_win, conv); + pos = gaim_conv_window_add_conversation(dest_win, conv); if (pos != dest_page_num) - gaim_window_move_conversation(dest_win, pos, dest_page_num); - - gaim_window_switch_conversation(dest_win, dest_page_num); + gaim_conv_window_move_conversation(dest_win, pos, dest_page_num); + + gaim_conv_window_switch_conversation(dest_win, dest_page_num); } gtk_widget_grab_focus(GAIM_GTK_CONVERSATION(conv)->entry); @@ -1908,15 +1908,15 @@ gpointer user_data) { GaimPluginProtocolInfo *prpl_info = NULL; - GaimWindow *win; + GaimConvWindow *win; GaimConversation *conv; GaimGtkConversation *gtkconv; GaimGtkWindow *gtkwin; GaimConnection *gc; - win = (GaimWindow *)user_data; - - conv = gaim_window_get_conversation_at(win, page_num); + win = (GaimConvWindow *)user_data; + + conv = gaim_conv_window_get_conversation_at(win, page_num); g_return_if_fail(conv != NULL); @@ -1986,7 +1986,7 @@ gtk_widget_hide(gtkwin->menu.block); if (gaim_find_chat(gaim_conversation_get_gc(conv), - gaim_chat_get_id(GAIM_CHAT(conv))) == NULL) { + gaim_conv_chat_get_id(GAIM_CONV_CHAT(conv))) == NULL) { gtk_widget_show(gtkwin->menu.add); gtk_widget_hide(gtkwin->menu.remove); @@ -2156,31 +2156,31 @@ static void got_typing_keypress(GaimConversation *conv, gboolean first) { - GaimIm *im; + GaimConvIm *im; /* * We know we got something, so we at least have to make sure we don't * send GAIM_TYPED any time soon. */ - im = GAIM_IM(conv); - - if (gaim_im_get_type_again_timeout(im)) - gaim_im_stop_type_again_timeout(im); - - gaim_im_start_type_again_timeout(im); - - if (first || (gaim_im_get_type_again(im) != 0 && - time(NULL) > gaim_im_get_type_again(im))) { + im = GAIM_CONV_IM(conv); + + if (gaim_conv_im_get_type_again_timeout(im)) + gaim_conv_im_stop_type_again_timeout(im); + + gaim_conv_im_start_type_again_timeout(im); + + if (first || (gaim_conv_im_get_type_again(im) != 0 && + time(NULL) > gaim_conv_im_get_type_again(im))) { int timeout = serv_send_typing(gaim_conversation_get_gc(conv), (char *)gaim_conversation_get_name(conv), GAIM_TYPING); if (timeout) - gaim_im_set_type_again(im, time(NULL) + timeout); + gaim_conv_im_set_type_again(im, time(NULL) + timeout); else - gaim_im_set_type_again(im, 0); + gaim_conv_im_set_type_again(im, 0); } } @@ -2188,19 +2188,19 @@ update_typing_icon(GaimConversation *conv) { GaimGtkWindow *gtkwin; - GaimIm *im = NULL; + GaimConvIm *im = NULL; GaimGtkConversation *gtkconv = GAIM_GTK_CONVERSATION(conv); gtkwin = GAIM_GTK_WINDOW(gaim_conversation_get_window(conv)); if(gaim_conversation_get_type(conv) == GAIM_CONV_IM) - im = GAIM_IM(conv); + im = GAIM_CONV_IM(conv); if(gtkwin->menu.typing_icon) { gtk_widget_destroy(gtkwin->menu.typing_icon); gtkwin->menu.typing_icon = NULL; } - if(im && gaim_im_get_typing_state(im) == GAIM_TYPING) { + if(im && gaim_conv_im_get_typing_state(im) == GAIM_TYPING) { gtkwin->menu.typing_icon = gtk_image_menu_item_new(); gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM(gtkwin->menu.typing_icon), @@ -2208,7 +2208,7 @@ GTK_ICON_SIZE_MENU)); gtk_tooltips_set_tip(gtkconv->tooltips, gtkwin->menu.typing_icon, _("User is typing..."), NULL); - } else if(im && gaim_im_get_typing_state(im) == GAIM_TYPED) { + } else if(im && gaim_conv_im_get_typing_state(im) == GAIM_TYPED) { gtkwin->menu.typing_icon = gtk_image_menu_item_new(); gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM(gtkwin->menu.typing_icon), @@ -2228,7 +2228,7 @@ } static gboolean -update_send_as_selection(GaimWindow *win) +update_send_as_selection(GaimConvWindow *win) { GaimAccount *account; GaimConversation *conv; @@ -2239,7 +2239,7 @@ if (g_list_find(gaim_get_windows(), win) == NULL) return FALSE; - conv = gaim_window_get_active_conversation(win); + conv = gaim_conv_window_get_active_conversation(win); if (conv == NULL) return FALSE; @@ -2273,7 +2273,7 @@ } static void -generate_send_as_items(GaimWindow *win, GaimConversation *deleted_conv) +generate_send_as_items(GaimConvWindow *win, GaimConversation *deleted_conv) { GaimGtkWindow *gtkwin; GtkWidget *menu; @@ -2524,11 +2524,11 @@ { GaimGtkConversation *gtkconv; GaimGtkChatPane *gtkchat; - GaimChat *chat; + GaimConvChat *chat; GtkTreeIter iter; GtkListStore *ls; - chat = GAIM_CHAT(conv); + chat = GAIM_CONV_CHAT(conv); gtkconv = GAIM_GTK_CONVERSATION(conv); gtkchat = gtkconv->u.chat; @@ -2536,7 +2536,7 @@ gtk_list_store_append(ls, &iter); gtk_list_store_set(ls, &iter, 0, - (gaim_chat_is_user_ignored(chat, name) ? "X" : " "), + (gaim_conv_chat_is_user_ignored(chat, name) ? "X" : " "), 1, name, -1); gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(ls), 1, GTK_SORT_ASCENDING); @@ -2546,7 +2546,7 @@ tab_complete(GaimConversation *conv) { GaimGtkConversation *gtkconv; - GaimChat *chat; + GaimConvChat *chat; GtkTextIter cursor, word_start, start_buffer; int start; int most_matched = -1; @@ -2556,7 +2556,7 @@ GList *nicks = NULL; gtkconv = GAIM_GTK_CONVERSATION(conv); - chat = GAIM_CHAT(conv); + chat = GAIM_CONV_CHAT(conv); gtk_text_buffer_get_start_iter(gtkconv->entry_buffer, &start_buffer); gtk_text_buffer_get_iter_at_mark(gtkconv->entry_buffer, &cursor, @@ -2601,7 +2601,7 @@ return; } - for (nicks = gaim_chat_get_users(chat); + for (nicks = gaim_conv_chat_get_users(chat); nicks != NULL; nicks = nicks->next) { @@ -2634,7 +2634,7 @@ if (strlen(nick) == strlen(entered)) { nicks = (nicks->next ? nicks->next - : gaim_chat_get_users(chat)); + : gaim_conv_chat_get_users(chat)); nick = nicks->data; @@ -2851,7 +2851,7 @@ } static GtkWidget * -setup_menubar(GaimWindow *win) +setup_menubar(GaimConvWindow *win) { GaimGtkWindow *gtkwin; GtkAccelGroup *accel_group; @@ -3605,7 +3605,7 @@ move_next_tab(GaimConversation *conv) { GaimConversation *next_conv = NULL; - GaimWindow *win; + GaimConvWindow *win; GList *l; int index, i; @@ -3613,7 +3613,7 @@ index = gaim_conversation_get_index(conv); /* First check the tabs after this position. */ - for (l = g_list_nth(gaim_window_get_conversations(win), index); + for (l = g_list_nth(gaim_conv_window_get_conversations(win), index); l != NULL; l = l->next) { @@ -3628,7 +3628,7 @@ if (next_conv == NULL) { /* Now check before this position. */ - for (l = gaim_window_get_conversations(win), i = 0; + for (l = gaim_conv_window_get_conversations(win), i = 0; l != NULL && i < index; l = l->next) { @@ -3642,15 +3642,15 @@ if (next_conv == NULL) { /* Okay, just grab the next conversation tab. */ - if (index == gaim_window_get_conversation_count(win) - 1) - next_conv = gaim_window_get_conversation_at(win, 0); + if (index == gaim_conv_window_get_conversation_count(win) - 1) + next_conv = gaim_conv_window_get_conversation_at(win, 0); else - next_conv = gaim_window_get_conversation_at(win, index + 1); + next_conv = gaim_conv_window_get_conversation_at(win, index + 1); } } if (next_conv != NULL && next_conv != conv) { - gaim_window_switch_conversation(win, + gaim_conv_window_switch_conversation(win, gaim_conversation_get_index(next_conv)); } } @@ -3660,7 +3660,7 @@ GtkSelectionData *sd, guint info, guint t, GaimConversation *conv) { - GaimWindow *win = conv->window; + GaimConvWindow *win = conv->window; GaimConversation *c; if (sd->target == gdk_atom_intern("GAIM_BLIST_NODE", FALSE)) { @@ -3677,7 +3677,7 @@ c = gaim_conversation_new(GAIM_CONV_IM, b->account, b->name); - gaim_window_add_conversation(win, c); + gaim_conv_window_add_conversation(win, c); } } @@ -3685,7 +3685,7 @@ * GTK+ window ops **************************************************************************/ static void -gaim_gtk_new_window(GaimWindow *win) +gaim_gtk_new_window(GaimConvWindow *win) { GaimGtkWindow *gtkwin; GtkPositionType pos; @@ -3748,7 +3748,7 @@ } static void -gaim_gtk_destroy_window(GaimWindow *win) +gaim_gtk_destroy_window(GaimConvWindow *win) { GaimGtkWindow *gtkwin = GAIM_GTK_WINDOW(win); @@ -3761,7 +3761,7 @@ } static void -gaim_gtk_show(GaimWindow *win) +gaim_gtk_show(GaimConvWindow *win) { GaimGtkWindow *gtkwin = GAIM_GTK_WINDOW(win); @@ -3769,7 +3769,7 @@ } static void -gaim_gtk_hide(GaimWindow *win) +gaim_gtk_hide(GaimConvWindow *win) { GaimGtkWindow *gtkwin = GAIM_GTK_WINDOW(win); @@ -3777,7 +3777,7 @@ } static void -gaim_gtk_raise(GaimWindow *win) +gaim_gtk_raise(GaimConvWindow *win) { GaimGtkWindow *gtkwin = GAIM_GTK_WINDOW(win); @@ -3787,17 +3787,17 @@ } static void -gaim_gtk_flash(GaimWindow *win) +gaim_gtk_flash(GaimConvWindow *win) { #ifdef _WIN32 GaimGtkWindow *gtkwin = GAIM_GTK_WINDOW(win); - wgaim_im_blink(gtkwin->window); + wgaim_conv_im_blink(gtkwin->window); #endif } static void -gaim_gtk_switch_conversation(GaimWindow *win, unsigned int index) +gaim_gtk_switch_conversation(GaimConvWindow *win, unsigned int index) { GaimGtkWindow *gtkwin; @@ -3815,7 +3815,7 @@ }; static void -gaim_gtk_add_conversation(GaimWindow *win, GaimConversation *conv) +gaim_gtk_add_conversation(GaimConvWindow *win, GaimConversation *conv) { GaimGtkWindow *gtkwin; GaimGtkConversation *gtkconv, *focus_gtkconv; @@ -4005,7 +4005,7 @@ gtk_widget_show(tab_cont); - if (gaim_window_get_conversation_count(win) == 1) { + if (gaim_conv_window_get_conversation_count(win) == 1) { /* Er, bug in notebooks? Switch to the page manually. */ gtk_notebook_set_current_page(GTK_NOTEBOOK(gtkwin->notebook), 0); @@ -4015,7 +4015,7 @@ else gtk_notebook_set_show_tabs(GTK_NOTEBOOK(gtkwin->notebook), TRUE); - focus_conv = g_list_nth_data(gaim_window_get_conversations(win), + focus_conv = g_list_nth_data(gaim_conv_window_get_conversations(win), gtk_notebook_get_current_page(GTK_NOTEBOOK(gtkwin->notebook))); focus_gtkconv = GAIM_GTK_CONVERSATION(focus_conv); gtk_widget_grab_focus(focus_gtkconv->entry); @@ -4026,12 +4026,12 @@ if (!new_ui) g_object_unref(gtkconv->tab_cont); - if (gaim_window_get_conversation_count(win) == 1) + if (gaim_conv_window_get_conversation_count(win) == 1) g_timeout_add(0, (GSourceFunc)update_send_as_selection, win); } static void -gaim_gtk_remove_conversation(GaimWindow *win, GaimConversation *conv) +gaim_gtk_remove_conversation(GaimConvWindow *win, GaimConversation *conv) { GaimGtkWindow *gtkwin; GaimGtkConversation *gtkconv; @@ -4050,7 +4050,7 @@ gtk_notebook_remove_page(GTK_NOTEBOOK(gtkwin->notebook), index); /* go back to tabless if need be */ - if (gaim_window_get_conversation_count(win) <= 2) { + if (gaim_conv_window_get_conversation_count(win) <= 2) { gtk_notebook_set_show_tabs(GTK_NOTEBOOK(gtkwin->notebook), gaim_prefs_get_bool("/gaim/gtk/conversations/tabs")); } @@ -4065,7 +4065,7 @@ } static void -gaim_gtk_move_conversation(GaimWindow *win, GaimConversation *conv, +gaim_gtk_move_conversation(GaimConvWindow *win, GaimConversation *conv, unsigned int new_index) { GaimGtkWindow *gtkwin; @@ -4082,7 +4082,7 @@ } static int -gaim_gtk_get_active_index(const GaimWindow *win) +gaim_gtk_get_active_index(const GaimConvWindow *win) { GaimGtkWindow *gtkwin; int index; @@ -4098,7 +4098,7 @@ return (index == -1 ? 0 : index); } -static GaimWindowUiOps window_ui_ops = +static GaimConvWindowUiOps window_ui_ops = { gaim_gtk_conversations_get_conv_ui_ops, gaim_gtk_new_window, @@ -4118,7 +4118,7 @@ update_convo_add_button(GaimConversation *conv) { GaimPluginProtocolInfo *prpl_info = NULL; - GaimWindow *win; + GaimConvWindow *win; GaimGtkWindow *gtkwin; GaimGtkConversation *gtkconv; GaimConnection *gc; @@ -4144,7 +4144,7 @@ gtk_widget_set_sensitive(gtkconv->u.im->add, (gc != NULL && prpl_info->remove_buddy != NULL)); - if (gaim_window_get_active_conversation(win) == conv) { + if (gaim_conv_window_get_active_conversation(win) == conv) { gtk_widget_show(gtkwin->menu.remove); gtk_widget_hide(gtkwin->menu.add); } @@ -4159,7 +4159,7 @@ gtk_widget_set_sensitive(gtkconv->u.im->add, (gc != NULL && prpl_info->add_buddy != NULL)); - if (gaim_window_get_active_conversation(win) == conv) { + if (gaim_conv_window_get_active_conversation(win) == conv) { gtk_widget_show(gtkwin->menu.add); gtk_widget_hide(gtkwin->menu.remove); } @@ -4175,7 +4175,7 @@ gtk_size_group_add_widget(gtkconv->sg, gtkconv->u.im->add); } -GaimWindowUiOps * +GaimConvWindowUiOps * gaim_gtk_conversations_get_win_ui_ops(void) { return &window_ui_ops; @@ -4246,7 +4246,7 @@ if (!(flags & GAIM_MESSAGE_NO_LOG) && gaim_prefs_get_bool("/gaim/gtk/conversations/im/raise_on_events")) { - gaim_window_raise(gaim_conversation_get_window(conv)); + gaim_conv_window_raise(gaim_conversation_get_window(conv)); } /* Play a sound, if specified in prefs. */ @@ -4300,7 +4300,7 @@ if (!(flags & GAIM_MESSAGE_NO_LOG) && gaim_prefs_get_bool("/gaim/gtk/conversations/chat/raise_on_events")) { - gaim_window_raise(gaim_conversation_get_window(conv)); + gaim_conv_window_raise(gaim_conversation_get_window(conv)); } gaim_conversation_write(conv, who, message, flags, mtime); @@ -4312,7 +4312,7 @@ time_t mtime) { GaimGtkConversation *gtkconv; - GaimWindow *win; + GaimConvWindow *win; GaimConnection *gc; int gtk_font_options = 0; GString *log_str; @@ -4339,7 +4339,7 @@ (gaim_prefs_get_bool("/gaim/gtk/conversations/im/raise_on_events") || gaim_prefs_get_bool("/gaim/gtk/conversations/im/hide_on_send"))))) { - gaim_window_show(win); + gaim_conv_window_show(win); } if (flags & GAIM_MESSAGE_IMAGES) @@ -4629,18 +4629,18 @@ static void gaim_gtkconv_chat_add_user(GaimConversation *conv, const char *user) { - GaimChat *chat; + GaimConvChat *chat; GaimGtkConversation *gtkconv; GaimGtkChatPane *gtkchat; char tmp[BUF_LONG]; int num_users; int pos; - chat = GAIM_CHAT(conv); + chat = GAIM_CONV_CHAT(conv); gtkconv = GAIM_GTK_CONVERSATION(conv); gtkchat = gtkconv->u.chat; - num_users = g_list_length(gaim_chat_get_users(chat)); + num_users = g_list_length(gaim_conv_chat_get_users(chat)); g_snprintf(tmp, sizeof(tmp), ngettext("%d person in room", "%d people in room", @@ -4652,7 +4652,7 @@ if (gtkconv->make_sound) gaim_sound_play_event(GAIM_SOUND_CHAT_JOIN); - pos = g_list_index(gaim_chat_get_users(chat), user); + pos = g_list_index(gaim_conv_chat_get_users(chat), user); add_chat_buddy_common(conv, user, pos); } @@ -4660,7 +4660,7 @@ static void gaim_gtkconv_chat_add_users(GaimConversation *conv, GList *users) { - GaimChat *chat; + GaimConvChat *chat; GaimGtkConversation *gtkconv; GaimGtkChatPane *gtkchat; GList *l; @@ -4668,11 +4668,11 @@ int num_users; int pos; - chat = GAIM_CHAT(conv); + chat = GAIM_CONV_CHAT(conv); gtkconv = GAIM_GTK_CONVERSATION(conv); gtkchat = gtkconv->u.chat; - num_users = g_list_length(gaim_chat_get_users(chat)); + num_users = g_list_length(gaim_conv_chat_get_users(chat)); g_snprintf(tmp, sizeof(tmp), ngettext("%d person in room", "%d people in room", @@ -4682,7 +4682,7 @@ gtk_label_set_text(GTK_LABEL(gtkchat->count), tmp); for (l = users; l != NULL; l = l->next) { - pos = g_list_index(gaim_chat_get_users(chat), (char *)l->data); + pos = g_list_index(gaim_conv_chat_get_users(chat), (char *)l->data); add_chat_buddy_common(conv, (char *)l->data, pos); } @@ -4692,7 +4692,7 @@ gaim_gtkconv_chat_rename_user(GaimConversation *conv, const char *old_name, const char *new_name) { - GaimChat *chat; + GaimConvChat *chat; GaimGtkConversation *gtkconv; GaimGtkChatPane *gtkchat; GtkTreeIter iter; @@ -4701,11 +4701,11 @@ int pos; int f = 1; - chat = GAIM_CHAT(conv); + chat = GAIM_CONV_CHAT(conv); gtkconv = GAIM_GTK_CONVERSATION(conv); gtkchat = gtkconv->u.chat; - for (names = gaim_chat_get_users(chat); + for (names = gaim_conv_chat_get_users(chat); names != NULL; names = names->next) { @@ -4739,7 +4739,7 @@ if (!names) return; - pos = g_list_index(gaim_chat_get_users(chat), new_name); + pos = g_list_index(gaim_conv_chat_get_users(chat), new_name); add_chat_buddy_common(conv, new_name, pos); } @@ -4747,7 +4747,7 @@ static void gaim_gtkconv_chat_remove_user(GaimConversation *conv, const char *user) { - GaimChat *chat; + GaimConvChat *chat; GaimGtkConversation *gtkconv; GaimGtkChatPane *gtkchat; GtkTreeIter iter; @@ -4757,13 +4757,13 @@ int num_users; int f = 1; - chat = GAIM_CHAT(conv); + chat = GAIM_CONV_CHAT(conv); gtkconv = GAIM_GTK_CONVERSATION(conv); gtkchat = gtkconv->u.chat; - num_users = g_list_length(gaim_chat_get_users(chat)) - 1; - - for (names = gaim_chat_get_users(chat); + num_users = g_list_length(gaim_conv_chat_get_users(chat)) - 1; + + for (names = gaim_conv_chat_get_users(chat); names != NULL; names = names->next) { @@ -4808,7 +4808,7 @@ static void gaim_gtkconv_chat_remove_users(GaimConversation *conv, GList *users) { - GaimChat *chat; + GaimConvChat *chat; GaimGtkConversation *gtkconv; GaimGtkChatPane *gtkchat; GtkTreeIter iter; @@ -4819,15 +4819,15 @@ int num_users; int f = 1; - chat = GAIM_CHAT(conv); + chat = GAIM_CONV_CHAT(conv); gtkconv = GAIM_GTK_CONVERSATION(conv); gtkchat = gtkconv->u.chat; - num_users = g_list_length(gaim_chat_get_users(chat)) - + num_users = g_list_length(gaim_conv_chat_get_users(chat)) - g_list_length(users); for (l = users; l != NULL; l = l->next) { - for (names = gaim_chat_get_users(chat); + for (names = gaim_conv_chat_get_users(chat); names != NULL; names = names->next) { @@ -4873,7 +4873,7 @@ gaim_gtkconv_set_title(GaimConversation *conv, const char *title) { GaimGtkConversation *gtkconv; - GaimWindow *win; + GaimConvWindow *win; GaimGtkWindow *gtkwin; win = gaim_conversation_get_window(conv); @@ -4883,7 +4883,7 @@ gtk_label_set_text(GTK_LABEL(gtkconv->tab_label), title); gtk_label_set_text(GTK_LABEL(gtkconv->menu_label), title); - if(conv == gaim_window_get_active_conversation(win)) + if(conv == gaim_conv_window_get_active_conversation(win)) gtk_window_set_title(GTK_WINDOW(gtkwin->window), title); } @@ -4929,11 +4929,11 @@ static void gaim_gtkconv_updated(GaimConversation *conv, GaimConvUpdateType type) { - GaimWindow *win; + GaimConvWindow *win; GaimGtkWindow *gtkwin; GaimGtkConversation *gtkconv; GaimGtkChatPane *gtkchat; - GaimChat *chat; + GaimConvChat *chat; win = gaim_conversation_get_window(conv); gtkwin = GAIM_GTK_WINDOW(win); @@ -4956,11 +4956,11 @@ else if (type == GAIM_CONV_UPDATE_TYPING || type == GAIM_CONV_UPDATE_UNSEEN) { GtkStyle *style; - GaimIm *im = NULL; + GaimConvIm *im = NULL; if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) - im = GAIM_IM(conv); + im = GAIM_CONV_IM(conv); style = gtk_style_new(); @@ -4971,13 +4971,13 @@ style->font_desc = pango_font_description_copy( gtk_widget_get_style(gtkconv->tab_label)->font_desc); - if (im != NULL && gaim_im_get_typing_state(im) == GAIM_TYPING) { + if (im != NULL && gaim_conv_im_get_typing_state(im) == GAIM_TYPING) { style->fg[GTK_STATE_NORMAL].red = 0x4646; style->fg[GTK_STATE_NORMAL].green = 0xA0A0; style->fg[GTK_STATE_NORMAL].blue = 0x4646; style->fg[GTK_STATE_ACTIVE] = style->fg[GTK_STATE_NORMAL]; } - else if (im != NULL && gaim_im_get_typing_state(im) == GAIM_TYPED) { + else if (im != NULL && gaim_conv_im_get_typing_state(im) == GAIM_TYPED) { style->fg[GTK_STATE_NORMAL].red = 0xD1D1; style->fg[GTK_STATE_NORMAL].green = 0x9494; style->fg[GTK_STATE_NORMAL].blue = 0x0C0C; @@ -5005,17 +5005,17 @@ gtk_widget_set_style(gtkconv->tab_label, style); g_object_unref(G_OBJECT(style)); - if(conv == gaim_window_get_active_conversation(win)) { + if(conv == gaim_conv_window_get_active_conversation(win)) { update_typing_icon(conv); } } else if (type == GAIM_CONV_UPDATE_TOPIC) { - chat = GAIM_CHAT(conv); + chat = GAIM_CONV_CHAT(conv); gtkchat = gtkconv->u.chat; gtk_entry_set_text(GTK_ENTRY(gtkchat->topic_text), - gaim_chat_get_topic(chat)); + gaim_conv_chat_get_topic(chat)); } else if (type == GAIM_CONV_ACCOUNT_ONLINE || type == GAIM_CONV_ACCOUNT_OFFLINE) { @@ -5282,7 +5282,7 @@ } else { - GaimBuddyIcon *icon = gaim_im_get_icon(GAIM_IM(conv)); + GaimBuddyIcon *icon = gaim_conv_im_get_icon(GAIM_CONV_IM(conv)); if (icon == NULL) return; @@ -5440,7 +5440,7 @@ gaim_gtkconv_update_buttons_by_protocol(GaimConversation *conv) { GaimPluginProtocolInfo *prpl_info = NULL; - GaimWindow *win; + GaimConvWindow *win; GaimGtkWindow *gtkwin = NULL; GaimGtkConversation *gtkconv; GaimConnection *gc; @@ -5458,7 +5458,7 @@ if (gc == NULL) { gtk_widget_set_sensitive(gtkconv->send, FALSE); - if (win != NULL && gaim_window_get_active_conversation(win) == conv) { + if (win != NULL && gaim_conv_window_get_active_conversation(win) == conv) { gtk_widget_set_sensitive(gtkwin->menu.insert_link, FALSE); } } @@ -5482,7 +5482,7 @@ gtk_widget_set_sensitive(gtkconv->u.im->add, FALSE); if (win != NULL && - gaim_window_get_active_conversation(win) == conv) { + gaim_conv_window_get_active_conversation(win) == conv) { gtk_widget_set_sensitive(gtkwin->menu.insert_image, FALSE); } @@ -5496,7 +5496,7 @@ gtk_widget_set_sensitive(gtkconv->toolbar.image, (prpl_info->options & OPT_PROTO_IM_IMAGE)); - if (win != NULL && gaim_window_get_active_conversation(win) == conv) { + if (win != NULL && gaim_conv_window_get_active_conversation(win) == conv) { gtk_widget_set_sensitive(gtkwin->menu.insert_image, (prpl_info->options & OPT_PROTO_IM_IMAGE)); } @@ -5533,10 +5533,10 @@ } } -GaimWindow * +GaimConvWindow * gaim_gtkwin_get_at_xy(int x, int y) { - GaimWindow *win = NULL; + GaimConvWindow *win = NULL; GaimGtkWindow *gtkwin; GdkWindow *gdkwin; GList *l; @@ -5547,7 +5547,7 @@ gdkwin = gdk_window_get_toplevel(gdkwin); for (l = gaim_get_windows(); l != NULL; l = l->next) { - win = (GaimWindow *)l->data; + win = (GaimConvWindow *)l->data; if (!GAIM_IS_GTK_WINDOW(win)) continue; @@ -5562,7 +5562,7 @@ } int -gaim_gtkconv_get_tab_at_xy(GaimWindow *win, int x, int y) +gaim_gtkconv_get_tab_at_xy(GaimConvWindow *win, int x, int y) { GaimGtkWindow *gtkwin; GList *l; @@ -5582,7 +5582,7 @@ x_rel = x - nb_x; y_rel = y - nb_y; - for (l = gaim_window_get_conversations(win), i = 0; + for (l = gaim_conv_window_get_conversations(win), i = 0; l != NULL; l = l->next, i++) { @@ -5623,14 +5623,14 @@ } } - if (i == gaim_window_get_conversation_count(win) + 1) + if (i == gaim_conv_window_get_conversation_count(win) + 1) return -1; return page_num; } int -gaim_gtkconv_get_dest_tab_at_xy(GaimWindow *win, int x, int y) +gaim_gtkconv_get_dest_tab_at_xy(GaimConvWindow *win, int x, int y) { GaimGtkWindow *gtkwin; GList *l; @@ -5649,7 +5649,7 @@ x_rel = x - nb_x; y_rel = y - nb_y; - for (l = gaim_window_get_conversations(win), i = 0; + for (l = gaim_conv_window_get_conversations(win), i = 0; l != NULL; l = l->next, i++) { @@ -5683,7 +5683,7 @@ } } - if (i == gaim_window_get_conversation_count(win) + 1) + if (i == gaim_conv_window_get_conversation_count(win) + 1) return -1; return page_num; @@ -5827,13 +5827,13 @@ { GList *l; GtkPositionType pos; - GaimWindow *win; + GaimConvWindow *win; GaimGtkWindow *gtkwin; pos = GPOINTER_TO_INT(value); for (l = gaim_get_windows(); l != NULL; l = l->next) { - win = (GaimWindow *)l->data; + win = (GaimConvWindow *)l->data; if (!GAIM_IS_GTK_WINDOW(win)) continue;
--- a/src/gtkconv.h Thu Oct 02 02:15:36 2003 +0000 +++ b/src/gtkconv.h Thu Oct 02 02:54:07 2003 +0000 @@ -203,7 +203,7 @@ ((GaimGtkConversation *)(conv)->ui_data) #define GAIM_IS_GTK_WINDOW(win) \ - (gaim_window_get_ui_ops(win) == gaim_gtk_conversations_get_win_ui_ops()) + (gaim_conv_window_get_ui_ops(win) == gaim_gtk_conversations_get_win_ui_ops()) #define GAIM_IS_GTK_CONVERSATION(conv) \ (gaim_conversation_get_ui_ops(conv) == \ @@ -226,7 +226,7 @@ * * @return The GTK window operations structure. */ -GaimWindowUiOps *gaim_gtk_conversations_get_win_ui_ops(void); +GaimConvWindowUiOps *gaim_gtk_conversations_get_win_ui_ops(void); /** * Returns the UI operations structure for GTK conversations. @@ -299,7 +299,7 @@ * * @return The GTK+ window at the location, if it exists, or @c NULL otherwise. */ -GaimWindow *gaim_gtkwin_get_at_xy(int x, int y); +GaimConvWindow *gaim_gtkwin_get_at_xy(int x, int y); /** * Returns the index of the tab at the specified X, Y location in a notebook. @@ -310,7 +310,7 @@ * * @return The index of the tab at the location. */ -int gaim_gtkconv_get_tab_at_xy(GaimWindow *win, int x, int y); +int gaim_gtkconv_get_tab_at_xy(GaimConvWindow *win, int x, int y); /** * Returns the index of the destination tab at the @@ -325,7 +325,7 @@ * * @return The index of the tab at the location. */ -int gaim_gtkconv_get_dest_tab_at_xy(GaimWindow *win, int x, int y); +int gaim_gtkconv_get_dest_tab_at_xy(GaimConvWindow *win, int x, int y); /*@}*/
--- a/src/gtkutils.c Thu Oct 02 02:15:36 2003 +0000 +++ b/src/gtkutils.c Thu Oct 02 02:54:07 2003 +0000 @@ -273,7 +273,7 @@ return; if ((file = fopen(f, "w")) != NULL) { - GaimBuddyIcon *icon = gaim_im_get_icon(GAIM_IM(c)); + GaimBuddyIcon *icon = gaim_conv_im_get_icon(GAIM_CONV_IM(c)); size_t len; const void *data = gaim_buddy_icon_get_data(icon, &len);
--- a/src/imgstore.h Thu Oct 02 02:15:36 2003 +0000 +++ b/src/imgstore.h Thu Oct 02 02:54:07 2003 +0000 @@ -21,8 +21,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ -#ifndef _GAIM_IMGSTORE_H_ -#define _GAIM_IMGSTORE_H_ +#ifndef _GAIM_CONV_IMGSTORE_H_ +#define _GAIM_CONV_IMGSTORE_H_ /** * Stored image @@ -85,4 +85,4 @@ } #endif -#endif /* _GAIM_IMGSTORE_H_ */ +#endif /* _GAIM_CONV_IMGSTORE_H_ */
--- a/src/pounce.c Thu Oct 02 02:15:36 2003 +0000 +++ b/src/pounce.c Thu Oct 02 02:54:07 2003 +0000 @@ -946,7 +946,7 @@ { GaimPounceEvent event; - event = (gaim_im_get_typing_state(GAIM_IM(conv)) == GAIM_TYPING + event = (gaim_conv_im_get_typing_state(GAIM_CONV_IM(conv)) == GAIM_TYPING ? GAIM_POUNCE_TYPING : GAIM_POUNCE_TYPING_STOPPED); gaim_pounce_execute(account, name, event);
--- a/src/protocols/gg/gg.c Thu Oct 02 02:15:36 2003 +0000 +++ b/src/protocols/gg/gg.c Thu Oct 02 02:54:07 2003 +0000 @@ -1,6 +1,6 @@ /* * gaim - Gadu-Gadu Protocol Plugin - * $Id: gg.c 7673 2003-10-01 07:15:53Z chipx86 $ + * $Id: gg.c 7685 2003-10-02 02:54:07Z chipx86 $ * * Copyright (C) 2001 Arkadiusz Mi¶kiewicz <misiek@pld.ORG.PL> * @@ -557,7 +557,7 @@ g_free(gc->proto_data); } -static int agg_send_im(GaimConnection *gc, const char *who, const char *msg, GaimImFlags flags) +static int agg_send_im(GaimConnection *gc, const char *who, const char *msg, GaimConvImFlags flags) { struct agg_data *gd = (struct agg_data *)gc->proto_data; gchar *imsg;
--- a/src/protocols/irc/cmds.c Thu Oct 02 02:15:36 2003 +0000 +++ b/src/protocols/irc/cmds.c Thu Oct 02 02:54:07 2003 +0000 @@ -40,9 +40,9 @@ buf = g_strdup_printf(_("Unknown command: %s"), cmd); if (gaim_conversation_get_type(convo) == GAIM_CONV_IM) - gaim_im_write(GAIM_IM(convo), "", buf, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); + gaim_conv_im_write(GAIM_CONV_IM(convo), "", buf, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); else - gaim_chat_write(GAIM_CHAT(convo), "", buf, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); + gaim_conv_chat_write(GAIM_CONV_CHAT(convo), "", buf, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); g_free(buf); return 1; @@ -113,7 +113,7 @@ action = g_strdup_printf("/me %s", args[0]); if (action[strlen(action) - 1] == '\n') action[strlen(action) - 1] = '\0'; - serv_got_chat_in(gc, gaim_chat_get_id(GAIM_CHAT(convo)), + serv_got_chat_in(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(convo)), gaim_connection_get_display_name(gc), 0, action, time(NULL)); g_free(action); @@ -132,7 +132,7 @@ return 0; if (gaim_conversation_get_type(convo) == GAIM_CONV_CHAT) { - gaim_chat_write(GAIM_CHAT(convo), "", _("<B>Supported IRC Commands:</B><BR>" + gaim_conv_chat_write(GAIM_CONV_CHAT(convo), "", _("<B>Supported IRC Commands:</B><BR>" "AWAY INVITE JOIN KICK<BR>" "ME MODE MSG NAMES<BR>" "NICK OP DEOP OPERWALL<BR>" @@ -141,7 +141,7 @@ "VOICE DEVOICE WALLOPS WHOIS<BR>"), GAIM_MESSAGE_NO_LOG, time(NULL)); } else { - gaim_im_write(GAIM_IM(convo), "", _("<B>Supported IRC Commands:</B><BR>" + gaim_conv_im_write(GAIM_CONV_IM(convo), "", _("<B>Supported IRC Commands:</B><BR>" "AWAY JOIN ME MODE<BR>" "MSG NICK OPERWALL PING<BR>" "QUERY QUIT QUOTE UMODE<BR>" @@ -412,7 +412,7 @@ if (args[1]) { gc = gaim_account_get_connection(irc->account); irc_cmd_privmsg(irc, cmd, target, args); - gaim_im_write(GAIM_IM(convo), gaim_connection_get_display_name(gc), + gaim_conv_im_write(GAIM_CONV_IM(convo), gaim_connection_get_display_name(gc), args[1], GAIM_MESSAGE_SEND, time(NULL)); } @@ -453,13 +453,13 @@ return 0; if (!args[0]) { - topic = gaim_chat_get_topic (GAIM_CHAT(convo)); + topic = gaim_conv_chat_get_topic (GAIM_CONV_CHAT(convo)); if (topic) buf = g_strdup_printf(_("current topic is: %s"), topic); else buf = g_strdup(_("No topic is set")); - gaim_chat_write(GAIM_CHAT(convo), target, buf, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); + gaim_conv_chat_write(GAIM_CONV_CHAT(convo), target, buf, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); g_free(buf); return 0;
--- a/src/protocols/irc/irc.c Thu Oct 02 02:15:36 2003 +0000 +++ b/src/protocols/irc/irc.c Thu Oct 02 02:54:07 2003 +0000 @@ -43,7 +43,7 @@ static void irc_login(GaimAccount *account); static void irc_login_cb(gpointer data, gint source, GaimInputCondition cond); static void irc_close(GaimConnection *gc); -static int irc_im_send(GaimConnection *gc, const char *who, const char *what, GaimImFlags flags); +static int irc_im_send(GaimConnection *gc, const char *who, const char *what, GaimConvImFlags flags); static int irc_chat_send(GaimConnection *gc, int id, const char *what); static void irc_chat_join (GaimConnection *gc, GHashTable *data); static void irc_input_cb(gpointer data, gint source, GaimInputCondition cond); @@ -245,7 +245,7 @@ g_free(irc); } -static int irc_im_send(GaimConnection *gc, const char *who, const char *what, GaimImFlags flags) +static int irc_im_send(GaimConnection *gc, const char *who, const char *what, GaimConvImFlags flags) { struct irc_conn *irc = gc->proto_data; const char *args[2];
--- a/src/protocols/irc/msgs.c Thu Oct 02 02:15:36 2003 +0000 +++ b/src/protocols/irc/msgs.c Thu Oct 02 02:54:07 2003 +0000 @@ -56,11 +56,11 @@ static void irc_chat_remove_buddy(GaimConversation *convo, char *data[2]) { - GList *users = gaim_chat_get_users(GAIM_CHAT(convo)); + GList *users = gaim_conv_chat_get_users(GAIM_CONV_CHAT(convo)); char *message = g_strdup_printf("quit: %s", data[1]); if (g_list_find_custom(users, data[0], (GCompareFunc)(strcmp))) - gaim_chat_remove_user(GAIM_CHAT(convo), data[0], message); + gaim_conv_chat_remove_user(GAIM_CONV_CHAT(convo), data[0], message); g_free(message); } @@ -85,7 +85,7 @@ gc = gaim_account_get_connection(irc->account); if (gc) - serv_got_im(gc, args[1], args[2], GAIM_IM_AUTO_RESP, time(NULL)); + serv_got_im(gc, args[1], args[2], GAIM_CONV_IM_AUTO_RESP, time(NULL)); } void irc_msg_badmode(struct irc_conn *irc, const char *name, const char *from, char **args) @@ -124,7 +124,7 @@ return; buf = g_strdup_printf("mode for %s: %s %s", args[1], args[2], args[3] ? args[3] : ""); - gaim_chat_write(GAIM_CHAT(convo), "", buf, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); + gaim_conv_chat_write(GAIM_CONV_CHAT(convo), "", buf, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); g_free(buf); return; @@ -240,17 +240,17 @@ if (!convo) { gaim_debug(GAIM_DEBUG_ERROR, "irc", "Got a topic for %s, which doesn't exist\n", chan); } - gaim_chat_set_topic(GAIM_CHAT(convo), NULL, topic); + gaim_conv_chat_set_topic(GAIM_CONV_CHAT(convo), NULL, topic); /* If this is an interactive update, print it out */ if (!strcmp(name, "topic")) { nick = irc_mask_nick(from); msg = g_strdup_printf(_("%s has changed the topic to: %s"), nick, topic); g_free(nick); - gaim_chat_write(GAIM_CHAT(convo), from, msg, GAIM_MESSAGE_SYSTEM, time(NULL)); + gaim_conv_chat_write(GAIM_CONV_CHAT(convo), from, msg, GAIM_MESSAGE_SYSTEM, time(NULL)); g_free(msg); } else { msg = g_strdup_printf(_("The topic for %s is: %s"), chan, topic); - gaim_chat_write(GAIM_CHAT(convo), "", msg, GAIM_MESSAGE_SYSTEM, time(NULL)); + gaim_conv_chat_write(GAIM_CONV_CHAT(convo), "", msg, GAIM_MESSAGE_SYSTEM, time(NULL)); g_free(msg); } } @@ -289,9 +289,9 @@ if (irc->nameconv) { msg = g_strdup_printf("Users on %s: %s", args[1], names); if (gaim_conversation_get_type(convo) == GAIM_CONV_CHAT) - gaim_chat_write(GAIM_CHAT(convo), "", msg, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); + gaim_conv_chat_write(GAIM_CONV_CHAT(convo), "", msg, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); else - gaim_im_write(GAIM_IM(convo), "", msg, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); + gaim_conv_im_write(GAIM_CONV_IM(convo), "", msg, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); g_free(msg); g_free(irc->nameconv); irc->nameconv = NULL; @@ -314,7 +314,7 @@ if (users != NULL) { GList *l; - gaim_chat_add_users(GAIM_CHAT(convo), users); + gaim_conv_chat_add_users(GAIM_CONV_CHAT(convo), users); for (l = users; l != NULL; l = l->next) g_free(l->data); @@ -368,10 +368,10 @@ convo = gaim_find_conversation_with_account(args[1], irc->account); if (convo) { if (gaim_conversation_get_type(convo) == GAIM_CONV_CHAT) /* does this happen? */ - gaim_chat_write(GAIM_CHAT(convo), args[1], _("no such channel"), + gaim_conv_chat_write(GAIM_CONV_CHAT(convo), args[1], _("no such channel"), GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); else - gaim_im_write(GAIM_IM(convo), args[1], _("User is not logged in"), + gaim_conv_im_write(GAIM_CONV_IM(convo), args[1], _("User is not logged in"), GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); } else { if ((gc = gaim_account_get_connection(irc->account)) == NULL) @@ -392,7 +392,7 @@ convo = gaim_find_conversation_with_account(args[1], irc->account); if (convo) { - gaim_chat_write(GAIM_CHAT(convo), args[1], args[2], GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); + gaim_conv_chat_write(GAIM_CONV_CHAT(convo), args[1], args[2], GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); } else { if ((gc = gaim_account_get_connection(irc->account)) == NULL) return; @@ -408,7 +408,7 @@ if (convo) { /*g_slist_remove(irc->gc->buddy_chats, convo); gaim_conversation_set_account(convo, NULL);*/ - gaim_chat_write(GAIM_CHAT(convo), args[1], args[2], GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); + gaim_conv_chat_write(GAIM_CONV_CHAT(convo), args[1], args[2], GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); } } @@ -423,7 +423,7 @@ if (!convo) return; - gaim_chat_write(GAIM_CHAT(convo), "", args[2], GAIM_MESSAGE_SYSTEM, time(NULL)); + gaim_conv_chat_write(GAIM_CONV_CHAT(convo), "", args[2], GAIM_MESSAGE_SYSTEM, time(NULL)); } void irc_msg_invite(struct irc_conn *irc, const char *name, const char *from, char **args) @@ -526,7 +526,7 @@ } userhost = irc_mask_userhost(from); - gaim_chat_add_user(GAIM_CHAT(convo), nick, userhost); + gaim_conv_chat_add_user(GAIM_CONV_CHAT(convo), nick, userhost); g_free(userhost); g_free(nick); } @@ -550,15 +550,15 @@ if (!gaim_utf8_strcasecmp(gaim_connection_get_display_name(gc), args[1])) { buf = g_strdup_printf(_("You have been kicked by %s: (%s)"), nick, args[2]); - gaim_chat_write(GAIM_CHAT(convo), args[0], buf, GAIM_MESSAGE_SYSTEM, time(NULL)); + gaim_conv_chat_write(GAIM_CONV_CHAT(convo), args[0], buf, GAIM_MESSAGE_SYSTEM, time(NULL)); g_free(buf); /*g_slist_remove(irc->gc->buddy_chats, convo); gaim_conversation_set_account(convo, NULL);*/ - /*g_list_free(gaim_chat_get_users(GAIM_CHAT(convo))); - gaim_chat_set_users(GAIM_CHAT(convo), NULL);*/ + /*g_list_free(gaim_conv_chat_get_users(GAIM_CONV_CHAT(convo))); + gaim_conv_chat_set_users(GAIM_CONV_CHAT(convo), NULL);*/ } else { buf = g_strdup_printf(_("Kicked by %s (%s)"), nick, args[2]); - gaim_chat_remove_user(GAIM_CHAT(convo), args[1], buf); + gaim_conv_chat_remove_user(GAIM_CONV_CHAT(convo), args[1], buf); g_free(buf); } @@ -579,7 +579,7 @@ return; } buf = g_strdup_printf(_("mode (%s %s) by %s"), args[1], args[2] ? args[2] : "", nick); - gaim_chat_write(GAIM_CHAT(convo), args[0], buf, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); + gaim_conv_chat_write(GAIM_CONV_CHAT(convo), args[0], buf, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); g_free(buf); } else { /* User */ } @@ -603,15 +603,15 @@ } while (chats) { - GaimChat *chat = GAIM_CHAT(chats->data); - GList *users = gaim_chat_get_users(chat); + GaimConvChat *chat = GAIM_CONV_CHAT(chats->data); + GList *users = gaim_conv_chat_get_users(chat); while (users) { char *user = users->data; if (!strcmp(nick, user)) { - gaim_chat_rename_user(chat, user, args[0]); - users = gaim_chat_get_users(chat); + gaim_conv_chat_rename_user(chat, user, args[0]); + users = gaim_conv_chat_get_users(chat); break; } users = users->next; @@ -680,10 +680,10 @@ nick = irc_mask_nick(from); if (!gaim_utf8_strcasecmp(nick, gaim_connection_get_display_name(gc))) { msg = g_strdup_printf(_("You have parted the channel%s%s"), *args[1] ? ": " : "", args[1]); - gaim_chat_write(GAIM_CHAT(convo), args[0], msg, GAIM_MESSAGE_SYSTEM, time(NULL)); + gaim_conv_chat_write(GAIM_CONV_CHAT(convo), args[0], msg, GAIM_MESSAGE_SYSTEM, time(NULL)); g_free(msg); } else { - gaim_chat_remove_user(GAIM_CHAT(convo), nick, args[1]); + gaim_conv_chat_remove_user(GAIM_CONV_CHAT(convo), nick, args[1]); } g_free(nick); } @@ -726,9 +726,9 @@ g_strfreev(parts); if (convo) { if (gaim_conversation_get_type (convo) == GAIM_CONV_CHAT) - gaim_chat_write(GAIM_CHAT(convo), "PONG", msg, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); + gaim_conv_chat_write(GAIM_CONV_CHAT(convo), "PONG", msg, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); else - gaim_im_write(GAIM_IM(convo), "PONG", msg, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); + gaim_conv_im_write(GAIM_CONV_IM(convo), "PONG", msg, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); } else { gc = gaim_account_get_connection(irc->account); if (!gc) { @@ -773,7 +773,7 @@ } else { convo = gaim_find_conversation_with_account(args[0], irc->account); if (convo) - serv_got_chat_in(gc, gaim_chat_get_id(GAIM_CHAT(convo)), nick, 0, msg, time(NULL)); + serv_got_chat_in(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(convo)), nick, 0, msg, time(NULL)); else gaim_debug(GAIM_DEBUG_ERROR, "irc", "Got a PRIVMSG on %s, which does not exist\n", args[0]); }
--- a/src/protocols/jabber/chat.c Thu Oct 02 02:15:36 2003 +0000 +++ b/src/protocols/jabber/chat.c Thu Oct 02 02:54:07 2003 +0000 @@ -238,7 +238,7 @@ gboolean jabber_chat_find_buddy(GaimConversation *conv, const char *name) { - GList *m = gaim_chat_get_users(GAIM_CHAT(conv)); + GList *m = gaim_conv_chat_get_users(GAIM_CONV_CHAT(conv)); while(m) { if(!strcmp(m->data, name))
--- a/src/protocols/jabber/message.c Thu Oct 02 02:15:36 2003 +0000 +++ b/src/protocols/jabber/message.c Thu Oct 02 02:54:07 2003 +0000 @@ -93,7 +93,7 @@ return; if(jm->subject) - gaim_chat_set_topic(GAIM_CHAT(chat->conv), jid->resource, jm->subject); + gaim_conv_chat_set_topic(GAIM_CONV_CHAT(chat->conv), jid->resource, jm->subject); serv_got_chat_in(jm->js->gc, chat->id, jabber_get_resource(jm->from), 0, jm->xhtml ? jm->xhtml : jm->body, jm->sent); @@ -326,7 +326,7 @@ } int jabber_message_send_im(GaimConnection *gc, const char *who, const char *msg, - GaimImFlags flags) + GaimConvImFlags flags) { JabberMessage *jm; JabberBuddy *jb;
--- a/src/protocols/jabber/message.h Thu Oct 02 02:15:36 2003 +0000 +++ b/src/protocols/jabber/message.h Thu Oct 02 02:54:07 2003 +0000 @@ -52,7 +52,7 @@ void jabber_message_parse(JabberStream *js, xmlnode *packet); int jabber_message_send_im(GaimConnection *gc, const char *who, const char *msg, - GaimImFlags flags); + GaimConvImFlags flags); int jabber_message_send_chat(GaimConnection *gc, int id, const char *message); int jabber_send_typing(GaimConnection *gc, const char *who, int typing);
--- a/src/protocols/jabber/presence.c Thu Oct 02 02:15:36 2003 +0000 +++ b/src/protocols/jabber/presence.c Thu Oct 02 02:54:07 2003 +0000 @@ -271,12 +271,12 @@ serv_got_chat_left(js->gc, chat->id); jabber_chat_destroy(chat); } else { - gaim_chat_remove_user(GAIM_CHAT(chat->conv), jid->resource, + gaim_conv_chat_remove_user(GAIM_CONV_CHAT(chat->conv), jid->resource, NULL); } } else { if(!jabber_chat_find_buddy(chat->conv, jid->resource)) - gaim_chat_add_user(GAIM_CHAT(chat->conv), jid->resource, + gaim_conv_chat_add_user(GAIM_CONV_CHAT(chat->conv), jid->resource, NULL); } g_free(room_jid);
--- a/src/protocols/msn/msn.c Thu Oct 02 02:15:36 2003 +0000 +++ b/src/protocols/msn/msn.c Thu Oct 02 02:54:07 2003 +0000 @@ -270,7 +270,7 @@ swboard->chat = serv_got_joined_chat(gc, ++swboard->chat_id, "MSN Chat"); - gaim_chat_add_user(GAIM_CHAT(swboard->chat), + gaim_conv_chat_add_user(GAIM_CONV_CHAT(swboard->chat), gaim_account_get_username(account), NULL); } @@ -485,7 +485,7 @@ static int msn_send_im(GaimConnection *gc, const char *who, const char *message, - GaimImFlags flags) + GaimConvImFlags flags) { GaimAccount *account = gaim_connection_get_account(gc); MsnSession *session = gc->proto_data;
--- a/src/protocols/msn/switchboard.c Thu Oct 02 02:15:36 2003 +0000 +++ b/src/protocols/msn/switchboard.c Thu Oct 02 02:54:07 2003 +0000 @@ -127,7 +127,7 @@ return TRUE; if (swboard->chat != NULL) - gaim_chat_remove_user(GAIM_CHAT(swboard->chat), user, NULL); + gaim_conv_chat_remove_user(GAIM_CONV_CHAT(swboard->chat), user, NULL); else { const char *username; GaimConversation *conv; @@ -188,13 +188,13 @@ swboard->chat = serv_got_joined_chat(gc, ++swboard->chat_id, "MSN Chat"); - gaim_chat_add_user(GAIM_CHAT(swboard->chat), + gaim_conv_chat_add_user(GAIM_CONV_CHAT(swboard->chat), gaim_account_get_username(account), NULL); gaim_conversation_destroy(conv); } - gaim_chat_add_user(GAIM_CHAT(swboard->chat), params[3], NULL); + gaim_conv_chat_add_user(GAIM_CONV_CHAT(swboard->chat), params[3], NULL); } return TRUE; @@ -219,9 +219,9 @@ swboard->chat = serv_got_joined_chat(gc, ++swboard->chat_id, "MSN Chat"); - gaim_chat_add_user(GAIM_CHAT(swboard->chat), + gaim_conv_chat_add_user(GAIM_CONV_CHAT(swboard->chat), msn_user_get_passport(swboard->user), NULL); - gaim_chat_add_user(GAIM_CHAT(swboard->chat), + gaim_conv_chat_add_user(GAIM_CONV_CHAT(swboard->chat), gaim_account_get_username(account), NULL); msn_user_unref(swboard->user); @@ -230,7 +230,7 @@ } if (swboard->chat != NULL) - gaim_chat_add_user(GAIM_CHAT(swboard->chat), passport, NULL); + gaim_conv_chat_add_user(GAIM_CONV_CHAT(swboard->chat), passport, NULL); swboard->total_users++; @@ -287,7 +287,7 @@ MsnSwitchBoard *swboard = servconn->data; if (swboard->chat != NULL) - serv_got_chat_left(gc, gaim_chat_get_id(GAIM_CHAT(swboard->chat))); + serv_got_chat_left(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(swboard->chat))); msn_switchboard_destroy(swboard); @@ -349,7 +349,7 @@ } if (swboard->chat != NULL) - serv_got_chat_in(gc, gaim_chat_get_id(GAIM_CHAT(swboard->chat)), + serv_got_chat_in(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(swboard->chat)), servconn->msg_passport, 0, body, time(NULL)); else serv_got_im(gc, servconn->msg_passport, body, 0, time(NULL));
--- a/src/protocols/napster/napster.c Thu Oct 02 02:15:36 2003 +0000 +++ b/src/protocols/napster/napster.c Thu Oct 02 02:54:07 2003 +0000 @@ -125,7 +125,7 @@ } /* 205 - MSG_CLIENT_PRIVMSG */ -static int nap_send_im(GaimConnection *gc, const char *who, const char *message, GaimImFlags flags) +static int nap_send_im(GaimConnection *gc, const char *who, const char *message, GaimConvImFlags flags) { if ((strlen(message) < 2) || (message[0] != '/' ) || (message[1] == '/')) { @@ -326,14 +326,14 @@ case 401: /* MSG_CLIENT_PART */ c = nap_find_chat(gc, buf); if (c) - serv_got_chat_left(gc, gaim_chat_get_id(GAIM_CHAT(c))); + serv_got_chat_left(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(c))); break; case 403: /* MSG_SERVER_PUBLIC */ res = g_strsplit(buf, " ", 3); c = nap_find_chat(gc, res[0]); if (c) - serv_got_chat_in(gc, gaim_chat_get_id(GAIM_CHAT(c)), res[1], 0, res[2], time((time_t)NULL)); + serv_got_chat_in(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(c)), res[1], 0, res[2], time((time_t)NULL)); g_strfreev(res); break; @@ -345,13 +345,13 @@ case 405: /* MSG_SERVER_JOIN_ACK */ c = nap_find_chat(gc, buf); if (!c) - serv_got_joined_chat(gc, gaim_chat_get_id(GAIM_CHAT(c)), buf); + serv_got_joined_chat(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(c)), buf); break; case 407: /* MSG_SERVER_PART */ res = g_strsplit(buf, " ", 0); c = nap_find_chat(gc, res[0]); - gaim_chat_remove_user(GAIM_CHAT(c), res[1], NULL); + gaim_conv_chat_remove_user(GAIM_CONV_CHAT(c), res[1], NULL); g_strfreev(res); break; @@ -359,7 +359,7 @@ case 408: /* MSG_SERVER_CHANNEL_USER_LIST */ res = g_strsplit(buf, " ", 4); c = nap_find_chat(gc, res[0]); - gaim_chat_add_user(GAIM_CHAT(c), res[1], NULL); + gaim_conv_chat_add_user(GAIM_CONV_CHAT(c), res[1], NULL); g_strfreev(res); break; @@ -370,7 +370,7 @@ /* display the topic in the channel */ res = g_strsplit(buf, " ", 2); c = nap_find_chat(gc, res[0]); - gaim_chat_set_topic(GAIM_CHAT(c), res[0], res[1]); + gaim_conv_chat_set_topic(GAIM_CONV_CHAT(c), res[0], res[1]); g_strfreev(res); break; @@ -433,7 +433,7 @@ buf3 = g_strdup_printf("/me %s", buf2); g_free(buf2); if ((c = nap_find_chat(gc, res[0]))) { - gaim_chat_write(GAIM_CHAT(c), res[1], buf3, GAIM_MESSAGE_NICK, time(NULL)); + gaim_conv_chat_write(GAIM_CONV_CHAT(c), res[1], buf3, GAIM_MESSAGE_NICK, time(NULL)); } g_free(buf3); g_strfreev(res);
--- a/src/protocols/oscar/oscar.c Thu Oct 02 02:15:36 2003 +0000 +++ b/src/protocols/oscar/oscar.c Thu Oct 02 02:54:07 2003 +0000 @@ -214,10 +214,10 @@ static int gaim_parse_userinfo (aim_session_t *, aim_frame_t *, ...); static int gaim_parse_motd (aim_session_t *, aim_frame_t *, ...); static int gaim_chatnav_info (aim_session_t *, aim_frame_t *, ...); -static int gaim_chat_join (aim_session_t *, aim_frame_t *, ...); -static int gaim_chat_leave (aim_session_t *, aim_frame_t *, ...); -static int gaim_chat_info_update (aim_session_t *, aim_frame_t *, ...); -static int gaim_chat_incoming_msg(aim_session_t *, aim_frame_t *, ...); +static int gaim_conv_chat_join (aim_session_t *, aim_frame_t *, ...); +static int gaim_conv_chat_leave (aim_session_t *, aim_frame_t *, ...); +static int gaim_conv_chat_info_update (aim_session_t *, aim_frame_t *, ...); +static int gaim_conv_chat_incoming_msg(aim_session_t *, aim_frame_t *, ...); static int gaim_email_parseupdate(aim_session_t *, aim_frame_t *, ...); static int gaim_icon_error (aim_session_t *, aim_frame_t *, ...); static int gaim_icon_parseicon (aim_session_t *, aim_frame_t *, ...); @@ -1363,10 +1363,10 @@ static int id = 1; aim_conn_addhandler(sess, fr->conn, AIM_CB_FAM_CHT, 0x0001, gaim_parse_genericerr, 0); - aim_conn_addhandler(sess, fr->conn, AIM_CB_FAM_CHT, AIM_CB_CHT_USERJOIN, gaim_chat_join, 0); - aim_conn_addhandler(sess, fr->conn, AIM_CB_FAM_CHT, AIM_CB_CHT_USERLEAVE, gaim_chat_leave, 0); - aim_conn_addhandler(sess, fr->conn, AIM_CB_FAM_CHT, AIM_CB_CHT_ROOMINFOUPDATE, gaim_chat_info_update, 0); - aim_conn_addhandler(sess, fr->conn, AIM_CB_FAM_CHT, AIM_CB_CHT_INCOMINGMSG, gaim_chat_incoming_msg, 0); + aim_conn_addhandler(sess, fr->conn, AIM_CB_FAM_CHT, AIM_CB_CHT_USERJOIN, gaim_conv_chat_join, 0); + aim_conn_addhandler(sess, fr->conn, AIM_CB_FAM_CHT, AIM_CB_CHT_USERLEAVE, gaim_conv_chat_leave, 0); + aim_conn_addhandler(sess, fr->conn, AIM_CB_FAM_CHT, AIM_CB_CHT_ROOMINFOUPDATE, gaim_conv_chat_info_update, 0); + aim_conn_addhandler(sess, fr->conn, AIM_CB_FAM_CHT, AIM_CB_CHT_INCOMINGMSG, gaim_conv_chat_incoming_msg, 0); aim_clientready(sess, fr->conn); @@ -2156,7 +2156,7 @@ GaimConnection *gc = sess->aux_data; struct oscar_data *od = gc->proto_data; char *tmp; - GaimImFlags flags = 0; + GaimConvImFlags flags = 0; gsize convlen; GError *err = NULL; struct buddyinfo *bi; @@ -2169,7 +2169,7 @@ } if (args->icbmflags & AIM_IMFLAGS_AWAY) - flags |= GAIM_IM_AUTO_RESP; + flags |= GAIM_CONV_IM_AUTO_RESP; if (args->icbmflags & AIM_IMFLAGS_TYPINGNOT) bi->typingnot = TRUE; @@ -3281,7 +3281,7 @@ return 1; } -static int gaim_chat_join(aim_session_t *sess, aim_frame_t *fr, ...) { +static int gaim_conv_chat_join(aim_session_t *sess, aim_frame_t *fr, ...) { va_list ap; int count, i; aim_userinfo_t *info; @@ -3299,12 +3299,12 @@ return 1; for (i = 0; i < count; i++) - gaim_chat_add_user(GAIM_CHAT(c->cnv), info[i].sn, NULL); + gaim_conv_chat_add_user(GAIM_CONV_CHAT(c->cnv), info[i].sn, NULL); return 1; } -static int gaim_chat_leave(aim_session_t *sess, aim_frame_t *fr, ...) { +static int gaim_conv_chat_leave(aim_session_t *sess, aim_frame_t *fr, ...) { va_list ap; int count, i; aim_userinfo_t *info; @@ -3322,12 +3322,12 @@ return 1; for (i = 0; i < count; i++) - gaim_chat_remove_user(GAIM_CHAT(c->cnv), info[i].sn, NULL); + gaim_conv_chat_remove_user(GAIM_CONV_CHAT(c->cnv), info[i].sn, NULL); return 1; } -static int gaim_chat_info_update(aim_session_t *sess, aim_frame_t *fr, ...) { +static int gaim_conv_chat_info_update(aim_session_t *sess, aim_frame_t *fr, ...) { va_list ap; aim_userinfo_t *userinfo; struct aim_chat_roominfo *roominfo; @@ -3363,7 +3363,7 @@ return 1; } -static int gaim_chat_incoming_msg(aim_session_t *sess, aim_frame_t *fr, ...) { +static int gaim_conv_chat_incoming_msg(aim_session_t *sess, aim_frame_t *fr, ...) { GaimConnection *gc = sess->aux_data; va_list ap; aim_userinfo_t *info; @@ -4204,9 +4204,9 @@ return 0; } static void oscar_ask_direct_im(GaimConnection *gc, const char *name); -static int gaim_odc_send_im(aim_session_t *, aim_conn_t *, const char *, GaimImFlags); - -static int oscar_send_im(GaimConnection *gc, const char *name, const char *message, GaimImFlags imflags) { +static int gaim_odc_send_im(aim_session_t *, aim_conn_t *, const char *, GaimConvImFlags); + +static int oscar_send_im(GaimConnection *gc, const char *name, const char *message, GaimConvImFlags imflags) { struct oscar_data *od = (struct oscar_data *)gc->proto_data; struct direct_im *dim = find_direct_im(od, name); int ret = 0; @@ -4217,7 +4217,7 @@ if (dim && dim->connected) { /* If we're directly connected, send a direct IM */ ret = gaim_odc_send_im(od->sess, dim->conn, message, imflags); - } else if (imflags & GAIM_IM_IMAGES) { + } else if (imflags & GAIM_CONV_IM_IMAGES) { /* Trying to send an IM image outside of a direct connection. */ oscar_ask_direct_im(gc, name); ret = -ENOTCONN; @@ -4242,7 +4242,7 @@ args.features = features_aim; args.featureslen = sizeof(features_aim); - if (imflags & GAIM_IM_AUTO_RESP) + if (imflags & GAIM_CONV_IM_AUTO_RESP) args.flags |= AIM_IMFLAGS_AWAY; } @@ -5205,7 +5205,7 @@ while (bcs) { count++; b = (GaimConversation *)bcs->data; - if (id == gaim_chat_get_id(GAIM_CHAT(b))) + if (id == gaim_conv_chat_get_id(GAIM_CONV_CHAT(b))) break; bcs = bcs->next; b = NULL; @@ -5217,7 +5217,7 @@ gaim_debug(GAIM_DEBUG_INFO, "oscar", "Attempting to leave room %s (currently in %d rooms)\n", b->name, count); - c = find_oscar_chat(g, gaim_chat_get_id(GAIM_CHAT(b))); + c = find_oscar_chat(g, gaim_conv_chat_get_id(GAIM_CONV_CHAT(b))); if (c != NULL) { if (od) od->oscar_chats = g_slist_remove(od->oscar_chats, c); @@ -5230,7 +5230,7 @@ g_free(c); } /* we do this because with Oscar it doesn't tell us we left */ - serv_got_chat_left(g, gaim_chat_get_id(GAIM_CHAT(b))); + serv_got_chat_left(g, gaim_conv_chat_get_id(GAIM_CONV_CHAT(b))); } static int oscar_chat_send(GaimConnection *g, int id, const char *message) { @@ -5243,7 +5243,7 @@ while (bcs) { b = (GaimConversation *)bcs->data; - if (id == gaim_chat_get_id(GAIM_CHAT(b))) + if (id == gaim_conv_chat_get_id(GAIM_CONV_CHAT(b))) break; bcs = bcs->next; b = NULL; @@ -5643,7 +5643,7 @@ */ static int gaim_odc_incoming(aim_session_t *sess, aim_frame_t *fr, ...) { GaimConnection *gc = sess->aux_data; - GaimImFlags imflags = 0; + GaimConvImFlags imflags = 0; GString *newmsg = g_string_new(""); GSList *images = NULL; va_list ap; @@ -5664,7 +5664,7 @@ "Got DirectIM message from %s\n", sn); if (isawaymsg) - imflags |= GAIM_IM_AUTO_RESP; + imflags |= GAIM_CONV_IM_AUTO_RESP; /* message has a binary trailer */ if ((binary = gaim_strcasestr(msg, "<binary>"))) { @@ -5728,7 +5728,7 @@ /* set the flag if we caught any images */ if (images) - imflags |= GAIM_IM_IMAGES; + imflags |= GAIM_CONV_IM_IMAGES; } else { g_string_append_len(newmsg, msg, len); } @@ -5778,12 +5778,12 @@ return 1; } -static int gaim_odc_send_im(aim_session_t *sess, aim_conn_t *conn, const char *message, GaimImFlags imflags) { +static int gaim_odc_send_im(aim_session_t *sess, aim_conn_t *conn, const char *message, GaimConvImFlags imflags) { char *buf; size_t len; int ret; - if (imflags & GAIM_IM_IMAGES) { + if (imflags & GAIM_CONV_IM_IMAGES) { GString *msg = g_string_new(""); GString *data = g_string_new("<BINARY>"); GData *attribs; @@ -5853,7 +5853,7 @@ } /* XXX - The last parameter below is the encoding. Let Paco-Paco do something with it. */ - if (imflags & GAIM_IM_AUTO_RESP) + if (imflags & GAIM_CONV_IM_AUTO_RESP) ret = aim_odc_send_im(sess, conn, buf, len, 0, 1); else ret = aim_odc_send_im(sess, conn, buf, len, 0, 0);
--- a/src/protocols/toc/toc.c Thu Oct 02 02:15:36 2003 +0000 +++ b/src/protocols/toc/toc.c Thu Oct 02 02:54:07 2003 +0000 @@ -735,7 +735,7 @@ message++; message++; - a = (away && (*away == 'T')) ? GAIM_IM_AUTO_RESP : 0; + a = (away && (*away == 'T')) ? GAIM_CONV_IM_AUTO_RESP : 0; serv_got_im(gc, c, message, a, time(NULL)); } else if (!g_ascii_strcasecmp(c, "UPDATE_BUDDY")) { @@ -823,16 +823,16 @@ char *in, *buddy; GSList *bcs = gc->buddy_chats; GaimConversation *b = NULL; - GaimChat *chat; + GaimConvChat *chat; sscanf(strtok(NULL, ":"), "%d", &id); in = strtok(NULL, ":"); - chat = GAIM_CHAT(b); + chat = GAIM_CONV_CHAT(b); while (bcs) { b = (GaimConversation *)bcs->data; - if (id == gaim_chat_get_id(chat)) + if (id == gaim_conv_chat_get_id(chat)) break; bcs = bcs->next; b = NULL; @@ -843,10 +843,10 @@ if (in && (*in == 'T')) while ((buddy = strtok(NULL, ":")) != NULL) - gaim_chat_add_user(chat, buddy, NULL); + gaim_conv_chat_add_user(chat, buddy, NULL); else while ((buddy = strtok(NULL, ":")) != NULL) - gaim_chat_remove_user(chat, buddy, NULL); + gaim_conv_chat_remove_user(chat, buddy, NULL); } else if (!g_ascii_strcasecmp(c, "CHAT_INVITE")) { char *name, *who, *message; int id; @@ -870,7 +870,7 @@ while (bcs) { b = (GaimConversation *)bcs->data; - if (id == gaim_chat_get_id(GAIM_CHAT(b))) + if (id == gaim_conv_chat_get_id(GAIM_CONV_CHAT(b))) break; b = NULL; bcs = bcs->next; @@ -1056,7 +1056,7 @@ } } -static int toc_send_im(GaimConnection *gc, const char *name, const char *message, GaimImFlags flags) +static int toc_send_im(GaimConnection *gc, const char *name, const char *message, GaimConvImFlags flags) { char *buf1, *buf2; @@ -1068,7 +1068,7 @@ return -E2BIG; } buf2 = g_strdup_printf("toc_send_im %s \"%s\"%s", gaim_normalize(name), buf1, - ((flags & GAIM_IM_AUTO_RESP) ? " auto" : "")); + ((flags & GAIM_CONV_IM_AUTO_RESP) ? " auto" : "")); g_free(buf1); #else /* This doesn't work yet. See the comments below for details */ @@ -1092,7 +1092,7 @@ } buf2 = g_strdup_printf("toc2_send_im_enc %s F U en \"%s\" %s", gaim_normalize(name), buf1, - ((flags & GAIM_IM_AUTO_RESP) ? "auto" : "")); + ((flags & GAIM_CONV_IM_AUTO_RESP) ? "auto" : "")); g_free(buf1); #endif @@ -1305,7 +1305,7 @@ while (bcs) { b = (GaimConversation *)bcs->data; - if (id == gaim_chat_get_id(GAIM_CHAT(b))) + if (id == gaim_conv_chat_get_id(GAIM_CONV_CHAT(b))) break; b = NULL; bcs = bcs->next;
--- a/src/protocols/trepia/trepia.c Thu Oct 02 02:15:36 2003 +0000 +++ b/src/protocols/trepia/trepia.c Thu Oct 02 02:54:07 2003 +0000 @@ -1133,7 +1133,7 @@ static int trepia_send_im(GaimConnection *gc, const char *who, const char *message, - GaimImFlags flags) + GaimConvImFlags flags) { TrepiaSession *session = gc->proto_data; TrepiaProfile *profile;
--- a/src/protocols/yahoo/yahoo.c Thu Oct 02 02:15:36 2003 +0000 +++ b/src/protocols/yahoo/yahoo.c Thu Oct 02 02:54:07 2003 +0000 @@ -2074,7 +2074,7 @@ return m; } -static int yahoo_send_im(GaimConnection *gc, const char *who, const char *what, GaimImFlags flags) +static int yahoo_send_im(GaimConnection *gc, const char *who, const char *what, GaimConvImFlags flags) { struct yahoo_data *yd = gc->proto_data; struct yahoo_packet *pkt = yahoo_packet_new(YAHOO_SERVICE_MESSAGE, YAHOO_STATUS_OFFLINE, 0);
--- a/src/protocols/yahoo/yahoochat.c Thu Oct 02 02:15:36 2003 +0000 +++ b/src/protocols/yahoo/yahoochat.c Thu Oct 02 02:54:07 2003 +0000 @@ -63,30 +63,30 @@ } /* this is slow, and different from the gaim_* version in that it (hopefully) won't add a user twice */ -static void yahoo_chat_add_users(GaimChat *chat, GList *newusers) +static void yahoo_chat_add_users(GaimConvChat *chat, GList *newusers) { GList *users, *i, *j; - users = gaim_chat_get_users(chat); + users = gaim_conv_chat_get_users(chat); for (i = newusers; i; i = i->next) { j = g_list_find_custom(users, i->data, _mystrcmpwrapper); if (j) continue; - gaim_chat_add_user(chat, i->data, NULL); + gaim_conv_chat_add_user(chat, i->data, NULL); } } -static void yahoo_chat_add_user(GaimChat *chat, const char *user, const char *reason) +static void yahoo_chat_add_user(GaimConvChat *chat, const char *user, const char *reason) { GList *users; - users = gaim_chat_get_users(chat); + users = gaim_conv_chat_get_users(chat); if ((g_list_find_custom(users, user, _mystrcmpwrapper))) return; - gaim_chat_add_user(chat, user, reason); + gaim_conv_chat_add_user(chat, user, reason); } static GaimConversation *yahoo_find_conference(GaimConnection *gc, const char *name) @@ -218,7 +218,7 @@ if (who && room) { c = yahoo_find_conference(gc, room); if (c) - yahoo_chat_add_user(GAIM_CHAT(c), who, NULL); + yahoo_chat_add_user(GAIM_CONV_CHAT(c), who, NULL); } } @@ -245,7 +245,7 @@ if (who && room) { c = yahoo_find_conference(gc, room); if (c) - gaim_chat_remove_user(GAIM_CHAT(c), who, NULL); + gaim_conv_chat_remove_user(GAIM_CONV_CHAT(c), who, NULL); } } @@ -278,7 +278,7 @@ if (!c) return; msg = yahoo_codes_to_html(msg); - serv_got_chat_in(gc, gaim_chat_get_id(GAIM_CHAT(c)), who, 0, msg, time(NULL)); + serv_got_chat_in(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(c)), who, 0, msg, time(NULL)); g_free(msg); } @@ -376,12 +376,12 @@ if (!c) { c = serv_got_joined_chat(gc, YAHOO_CHAT_ID, room); if (topic) - gaim_chat_set_topic(GAIM_CHAT(c), NULL, topic); + gaim_conv_chat_set_topic(GAIM_CONV_CHAT(c), NULL, topic); yd->in_chat = 1; yd->chat_name = g_strdup(room); - gaim_chat_add_users(GAIM_CHAT(c), members); + gaim_conv_chat_add_users(GAIM_CONV_CHAT(c), members); } else { - yahoo_chat_add_users(GAIM_CHAT(c), members); + yahoo_chat_add_users(GAIM_CONV_CHAT(c), members); } g_list_free(members); @@ -406,7 +406,7 @@ if (who) { GaimConversation *c = gaim_find_chat(gc, YAHOO_CHAT_ID); if (c) - gaim_chat_remove_user(GAIM_CHAT(c), who, NULL); + gaim_conv_chat_remove_user(GAIM_CONV_CHAT(c), who, NULL); } } @@ -582,7 +582,7 @@ if (!strcmp(memarr[i], "") || !strcmp(memarr[i], dn)) continue; yahoo_packet_hash(pkt, 3, memarr[i]); - gaim_chat_add_user(GAIM_CHAT(c), memarr[i], NULL); + gaim_conv_chat_add_user(GAIM_CONV_CHAT(c), memarr[i], NULL); } } yahoo_send_packet(yd, pkt); @@ -599,7 +599,7 @@ struct yahoo_packet *pkt; GList *members; - members = gaim_chat_get_users(GAIM_CHAT(c)); + members = gaim_conv_chat_get_users(GAIM_CONV_CHAT(c)); pkt = yahoo_packet_new(YAHOO_SERVICE_CONFADDINVITE, YAHOO_STATUS_AVAILABLE, 0); @@ -788,7 +788,7 @@ if (id != YAHOO_CHAT_ID) { yahoo_conf_leave(yd, gaim_conversation_get_name(c), - gaim_connection_get_display_name(gc), gaim_chat_get_users(GAIM_CHAT(c))); + gaim_connection_get_display_name(gc), gaim_conv_chat_get_users(GAIM_CONV_CHAT(c))); yd->confs = g_slist_remove(yd->confs, c); } else { yahoo_chat_leave(yd, gaim_conversation_get_name(c), gaim_connection_get_display_name(gc)); @@ -813,12 +813,12 @@ if (id != YAHOO_CHAT_ID) { ret = yahoo_conf_send(yd, gaim_connection_get_display_name(gc), - gaim_conversation_get_name(c), gaim_chat_get_users(GAIM_CHAT(c)), what); + gaim_conversation_get_name(c), gaim_conv_chat_get_users(GAIM_CONV_CHAT(c)), what); } else { ret = yahoo_chat_send(yd, gaim_connection_get_display_name(gc), gaim_conversation_get_name(c), what); if (!ret) - serv_got_chat_in(gc, gaim_chat_get_id(GAIM_CHAT(c)), + serv_got_chat_in(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(c)), gaim_connection_get_display_name(gc), 0, what, time(NULL)); } return ret; @@ -863,7 +863,7 @@ id = yd->conf_id++; c = serv_got_joined_chat(gc, id, room); yd->confs = g_slist_prepend(yd->confs, c); - gaim_chat_set_topic(GAIM_CHAT(c), gaim_connection_get_display_name(gc), topic); + gaim_conv_chat_set_topic(GAIM_CONV_CHAT(c), gaim_connection_get_display_name(gc), topic); yahoo_conf_join(yd, c, gaim_connection_get_display_name(gc), room, topic, members); return; } else {
--- a/src/protocols/zephyr/zephyr.c Thu Oct 02 02:15:36 2003 +0000 +++ b/src/protocols/zephyr/zephyr.c Thu Oct 02 02:54:07 2003 +0000 @@ -367,7 +367,7 @@ char *sendertmp; char *ptr = notice.z_message + strlen(notice.z_message) + 1; int len = notice.z_message_len - (ptr - notice.z_message); - GaimImFlags flags = 0; + GaimConvImFlags flags = 0; if (len > 0) { buf = g_malloc(len + 1); g_snprintf(buf, len + 1, "%s", ptr); @@ -377,7 +377,7 @@ if (!g_ascii_strcasecmp(notice.z_class, "MESSAGE") && !g_ascii_strcasecmp(notice.z_class_inst, "PERSONAL")) { if (!g_ascii_strcasecmp(notice.z_message, "Automated reply:")) - flags |= GAIM_IM_AUTO_RESP; + flags |= GAIM_CONV_IM_AUTO_RESP; serv_got_im(zgc, notice.z_sender, buf2, flags, time(NULL)); } else { zephyr_triple *zt1, *zt2; @@ -798,12 +798,12 @@ return 0; } -static int zephyr_send_im(GaimConnection *gc, const char *who, const char *im, GaimImFlags flags) { +static int zephyr_send_im(GaimConnection *gc, const char *who, const char *im, GaimConvImFlags flags) { ZNotice_t notice; char *buf; const char *sig; - if (flags & GAIM_IM_AUTO_RESP) + if (flags & GAIM_CONV_IM_AUTO_RESP) sig = "Automated reply:"; else { sig = ZGetVariable("zwrite-signature");
--- a/src/prpl.h Thu Oct 02 02:15:36 2003 +0000 +++ b/src/prpl.h Thu Oct 02 02:54:07 2003 +0000 @@ -92,9 +92,9 @@ */ typedef enum { - GAIM_IM_AUTO_RESP = 0x0001, /**< Auto response. */ - GAIM_IM_IMAGES = 0x0002 /**< Contains images. */ -} GaimImFlags; + GAIM_CONV_IM_AUTO_RESP = 0x0001, /**< Auto response. */ + GAIM_CONV_IM_IMAGES = 0x0002 /**< Contains images. */ +} GaimConvImFlags; /** * Protocol options @@ -243,7 +243,7 @@ void (*close)(GaimConnection *); int (*send_im)(GaimConnection *, const char *who, const char *message, - GaimImFlags flags); + GaimConvImFlags flags); void (*set_info)(GaimConnection *, const char *info); int (*send_typing)(GaimConnection *, const char *name, int typing); void (*get_info)(GaimConnection *, const char *who);
--- a/src/server.c Thu Oct 02 02:15:36 2003 +0000 +++ b/src/server.c Thu Oct 02 02:54:07 2003 +0000 @@ -258,7 +258,7 @@ } int serv_send_im(GaimConnection *gc, const char *name, const char *message, - GaimImFlags imflags) + GaimConvImFlags imflags) { GaimConversation *c; int val = -EINVAL; @@ -272,7 +272,7 @@ if (prpl_info && prpl_info->send_im) val = prpl_info->send_im(gc, name, message, imflags); - if (!(imflags & GAIM_IM_AUTO_RESP)) + if (!(imflags & GAIM_CONV_IM_AUTO_RESP)) serv_touch_idle(gc); if (gc->away && @@ -285,8 +285,8 @@ lar->sent = time(NULL); } - if (c && gaim_im_get_type_again_timeout(GAIM_IM(c))) - gaim_im_stop_type_again_timeout(GAIM_IM(c)); + if (c && gaim_conv_im_get_type_again_timeout(GAIM_CONV_IM(c))) + gaim_conv_im_stop_type_again_timeout(GAIM_CONV_IM(c)); return val; } @@ -835,7 +835,7 @@ * sure to follow along, kids */ void serv_got_im(GaimConnection *gc, const char *who, const char *msg, - GaimImFlags imflags, time_t mtime) + GaimConvImFlags imflags, time_t mtime) { GaimConversation *cnv; GaimMessageFlags msgflags; @@ -892,9 +892,9 @@ * associated images. */ msgflags = GAIM_MESSAGE_RECV; - if (imflags & GAIM_IM_AUTO_RESP) + if (imflags & GAIM_CONV_IM_AUTO_RESP) msgflags |= GAIM_MESSAGE_AUTO_RESP; - if (imflags & GAIM_IM_IMAGES) + if (imflags & GAIM_CONV_IM_IMAGES) msgflags |= GAIM_MESSAGE_IMAGES; /* @@ -972,7 +972,7 @@ if (cnv == NULL) cnv = gaim_conversation_new(GAIM_CONV_IM, gc->account, name); - gaim_im_write(GAIM_IM(cnv), NULL, message, msgflags, mtime); + gaim_conv_im_write(GAIM_CONV_IM(cnv), NULL, message, msgflags, mtime); } /* @@ -1018,7 +1018,7 @@ /* apply default fonts and colors */ tmpmsg = stylize(gc->away, MSG_LEN); - serv_send_im(gc, name, gaim_str_sub_away_formatters(tmpmsg, alias), GAIM_IM_AUTO_RESP); + serv_send_im(gc, name, gaim_str_sub_away_formatters(tmpmsg, alias), GAIM_CONV_IM_AUTO_RESP); if (!cnv && awayqueue && gaim_prefs_get_bool("/gaim/gtk/away/queue_messages")) { @@ -1032,7 +1032,7 @@ qm->flags = GAIM_MESSAGE_SEND | GAIM_MESSAGE_AUTO_RESP; message_queue = g_slist_append(message_queue, qm); } else if (cnv != NULL) - gaim_im_write(GAIM_IM(cnv), NULL, gaim_str_sub_away_formatters(tmpmsg, alias), + gaim_conv_im_write(GAIM_CONV_IM(cnv), NULL, gaim_str_sub_away_formatters(tmpmsg, alias), GAIM_MESSAGE_SEND | GAIM_MESSAGE_AUTO_RESP, mtime); g_free(tmpmsg); @@ -1068,8 +1068,8 @@ if (cnv == NULL) cnv = gaim_conversation_new(GAIM_CONV_IM, gc->account, name); - gaim_im_write(GAIM_IM(cnv), NULL, message, msgflags, mtime); - gaim_window_flash(gaim_conversation_get_window(cnv)); + gaim_conv_im_write(GAIM_CONV_IM(cnv), NULL, message, msgflags, mtime); + gaim_conv_window_flash(gaim_conversation_get_window(cnv)); } } @@ -1237,16 +1237,16 @@ GaimBuddy *b; GaimConversation *cnv = gaim_find_conversation_with_account(name, gc->account); - GaimIm *im; + GaimConvIm *im; if (!cnv) return; - im = GAIM_IM(cnv); + im = GAIM_CONV_IM(cnv); gaim_conversation_set_account(cnv, gc->account); - gaim_im_set_typing_state(im, state); - gaim_im_update_typing(im); + gaim_conv_im_set_typing_state(im, state); + gaim_conv_im_update_typing(im); b = gaim_find_buddy(gc->account, name); @@ -1265,26 +1265,26 @@ } if (timeout > 0) - gaim_im_start_typing_timeout(im, timeout); + gaim_conv_im_start_typing_timeout(im, timeout); } void serv_got_typing_stopped(GaimConnection *gc, const char *name) { GaimConversation *c = gaim_find_conversation_with_account(name, gc->account); - GaimIm *im; + GaimConvIm *im; GaimBuddy *b; if (!c) return; - im = GAIM_IM(c); + im = GAIM_CONV_IM(c); if (im->typing_state == GAIM_NOT_TYPING) return; - gaim_im_stop_typing_timeout(im); - gaim_im_set_typing_state(im, GAIM_NOT_TYPING); - gaim_im_update_typing(im); + gaim_conv_im_stop_typing_timeout(im); + gaim_conv_im_set_typing_state(im, GAIM_NOT_TYPING); + gaim_conv_im_update_typing(im); b = gaim_find_buddy(gc->account, name); @@ -1350,17 +1350,17 @@ int id, const char *name) { GaimConversation *conv; - GaimChat *chat; + GaimConvChat *chat; GaimAccount *account; account = gaim_connection_get_account(gc); conv = gaim_conversation_new(GAIM_CONV_CHAT, account, name); - chat = GAIM_CHAT(conv); + chat = GAIM_CONV_CHAT(conv); gc->buddy_chats = g_slist_append(gc->buddy_chats, conv); - gaim_chat_set_id(chat, id); + gaim_conv_chat_set_id(chat, id); /* TODO Move this to UI logging code! */ if (gaim_prefs_get_bool("/gaim/gtk/logging/log_chats") || @@ -1387,8 +1387,8 @@ free(filename); } - gaim_window_show(gaim_conversation_get_window(conv)); - gaim_window_switch_conversation(gaim_conversation_get_window(conv), + gaim_conv_window_show(gaim_conversation_get_window(conv)); + gaim_conv_window_switch_conversation(gaim_conversation_get_window(conv), gaim_conversation_get_index(conv)); gaim_signal_emit(gaim_conversations_get_handle(), "chat-joined", conv); @@ -1400,7 +1400,7 @@ { GSList *bcs; GaimConversation *conv = NULL; - GaimChat *chat = NULL; + GaimConvChat *chat = NULL; GaimAccount *account; account = gaim_connection_get_account(g); @@ -1408,9 +1408,9 @@ for (bcs = g->buddy_chats; bcs != NULL; bcs = bcs->next) { conv = (GaimConversation *)bcs->data; - chat = GAIM_CHAT(conv); + chat = GAIM_CONV_CHAT(conv); - if (gaim_chat_get_id(chat) == id) + if (gaim_conv_chat_get_id(chat) == id) break; conv = NULL; @@ -1435,7 +1435,7 @@ GaimMessageFlags w; GSList *bcs; GaimConversation *conv = NULL; - GaimChat *chat = NULL; + GaimConvChat *chat = NULL; char *buf; char *buffy, *angel; int plugin_return; @@ -1443,9 +1443,9 @@ for (bcs = g->buddy_chats; bcs != NULL; bcs = bcs->next) { conv = (GaimConversation *)bcs->data; - chat = GAIM_CHAT(conv); + chat = GAIM_CONV_CHAT(conv); - if (gaim_chat_get_id(chat) == id) + if (gaim_conv_chat_get_id(chat) == id) break; conv = NULL; @@ -1470,7 +1470,7 @@ gaim_signal_emit_return_1(gaim_conversations_get_handle(), "received-chat-msg", g->account, &angel, &buffy, - gaim_chat_get_id(GAIM_CHAT(conv)))); + gaim_conv_chat_get_id(GAIM_CONV_CHAT(conv)))); if (!buffy || !angel || plugin_return) { if (buffy) @@ -1494,7 +1494,7 @@ else w = 0; - gaim_chat_write(chat, who, buf, w, mtime); + gaim_conv_chat_write(chat, who, buf, w, mtime); g_free(angel); g_free(buf);
--- a/src/server.h Thu Oct 02 02:15:36 2003 +0000 +++ b/src/server.h Thu Oct 02 02:54:07 2003 +0000 @@ -39,7 +39,7 @@ void serv_login(GaimAccount *); void serv_close(GaimConnection *); void serv_touch_idle(GaimConnection *); -int serv_send_im(GaimConnection *, const char *, const char *, GaimImFlags); +int serv_send_im(GaimConnection *, const char *, const char *, GaimConvImFlags); void serv_get_info(GaimConnection *, const char *); void serv_get_dir(GaimConnection *, const char *); void serv_set_idle(GaimConnection *, int); @@ -81,7 +81,7 @@ void serv_set_buddyicon(GaimConnection *gc, const char *filename); void serv_got_typing_stopped(GaimConnection *gc, const char *name); void serv_got_im(GaimConnection *gc, const char *who, const char *msg, - GaimImFlags imflags, time_t mtime); + GaimConvImFlags imflags, time_t mtime); void serv_got_update(GaimConnection *gc, const char *name, int loggedin, int evil, time_t signon, time_t idle, int type); void serv_finish_login(GaimConnection *gc);
--- a/src/ui.h Thu Oct 02 02:15:36 2003 +0000 +++ b/src/ui.h Thu Oct 02 02:54:07 2003 +0000 @@ -123,7 +123,7 @@ /* Functions in dialogs.c */ extern void alias_dialog_bud(GaimBuddy *); -extern void alias_dialog_blist_chat(GaimBlistChat *); +extern void alias_dialog_blist_chat(GaimChat *); extern void show_warn_dialog(GaimConnection *, char *); extern void show_im_dialog(); extern void show_info_dialog();
--- a/src/win32/win32dep.c Thu Oct 02 02:15:36 2003 +0000 +++ b/src/win32/win32dep.c Thu Oct 02 02:54:07 2003 +0000 @@ -240,7 +240,7 @@ /* FlashWindowEx is only supported by Win98+ and WinNT5+. If its not supported we do it our own way */ -void wgaim_im_blink(GtkWidget *window) { +void wgaim_conv_im_blink(GtkWidget *window) { if(!blink_turned_on) return; if(MyFlashWindowEx) { @@ -265,7 +265,7 @@ } } -void wgaim_im_blink_state(gboolean val) { +void wgaim_conv_im_blink_state(gboolean val) { blink_turned_on = val; }
--- a/src/win32/win32dep.h Thu Oct 02 02:15:36 2003 +0000 +++ b/src/win32/win32dep.h Thu Oct 02 02:54:07 2003 +0000 @@ -48,8 +48,8 @@ extern char* wgaim_data_dir(void); extern char* wgaim_escape_dirsep(char*); /* UI related */ -extern void wgaim_im_blink(GtkWidget*); -extern void wgaim_im_blink_state(gboolean val); +extern void wgaim_conv_im_blink(GtkWidget*); +extern void wgaim_conv_im_blink_state(gboolean val); extern void wgaim_gtk_window_move(GtkWindow *window, gint x, gint y); /* Utility */ extern int wgaim_gz_decompress(const char* in, const char* out);