# HG changeset patch # User andrew.victor@mxit.com # Date 1317503075 0 # Node ID 10e5000326a5d4e39831e9e9533578d7cabdbc96 # Parent f75041cb3fecc99fdb8171a0d04650efffa12fca Convert code to use the purple_account accessor functions. diff -r f75041cb3fec -r 10e5000326a5 libpurple/conversation.c --- a/libpurple/conversation.c Sat Oct 01 18:21:43 2011 +0000 +++ b/libpurple/conversation.c Sat Oct 01 21:04:35 2011 +0000 @@ -526,7 +526,7 @@ chats = g_list_prepend(chats, conv); - if ((disp = purple_connection_get_display_name(account->gc))) + if ((disp = purple_connection_get_display_name(purple_account_get_connection(account)))) purple_conv_chat_set_nick(conv->u.chat, disp); else purple_conv_chat_set_nick(conv->u.chat, @@ -815,7 +815,7 @@ if (account == NULL) return NULL; - return account->gc; + return purple_account_get_connection(account); } void diff -r f75041cb3fec -r 10e5000326a5 libpurple/protocols/irc/irc.c --- a/libpurple/protocols/irc/irc.c Sat Oct 01 18:21:43 2011 +0000 +++ b/libpurple/protocols/irc/irc.c Sat Oct 01 21:04:35 2011 +0000 @@ -645,9 +645,10 @@ static void read_input(struct irc_conn *irc, int len) { + PurpleConnection *connection = purple_account_get_connection(irc->account); char *cur, *end; - irc->account->gc->last_received = time(NULL); + connection->last_received = time(NULL); irc->inbufused += len; irc->inbuf[irc->inbufused] = '\0'; diff -r f75041cb3fec -r 10e5000326a5 libpurple/protocols/jabber/jabber.c --- a/libpurple/protocols/jabber/jabber.c Sat Oct 01 18:21:43 2011 +0000 +++ b/libpurple/protocols/jabber/jabber.c Sat Oct 01 21:04:35 2011 +0000 @@ -3163,7 +3163,7 @@ const char *cmd, char **args, char **error, void *data) { PurpleAccount *account = purple_conversation_get_account(conv); - JabberStream *js = purple_connection_get_protocol_data(account->gc); + JabberStream *js = purple_connection_get_protocol_data(purple_account_get_connection(account)); const gchar *who; gchar *description; PurpleBuddy *buddy; @@ -3575,7 +3575,7 @@ const char *cmd, char **args, char **error, void *data) { PurpleAccount *account = purple_conversation_get_account(conv); - JabberStream *js = purple_connection_get_protocol_data(account->gc); + JabberStream *js = purple_connection_get_protocol_data(purple_account_get_connection(account)); if (js->pep) { /* if no argument was given, unset mood */ diff -r f75041cb3fec -r 10e5000326a5 libpurple/protocols/msn/contact.c --- a/libpurple/protocols/msn/contact.c Sat Oct 01 18:21:43 2011 +0000 +++ b/libpurple/protocols/msn/contact.c Sat Oct 01 21:04:35 2011 +0000 @@ -968,7 +968,7 @@ purple_debug_misc("msn", "Got the Address Book!\n"); if (msn_parse_addressbook(session, resp->xml)) { - msn_send_privacy(session->account->gc); + msn_send_privacy(purple_account_get_connection(session->account)); msn_notification_dump_contact(session); } else { /* This is making us loop infinitely when we fail to parse the @@ -1251,7 +1251,7 @@ body = g_markup_escape_text(user->invite_message, -1); /* Ignore the cast, we treat it as const anyway. */ - tmp = (char *)purple_connection_get_display_name(session->account->gc); + tmp = (char *)purple_connection_get_display_name(purple_account_get_connection(session->account)); tmp = tmp ? g_markup_escape_text(tmp, -1) : g_strdup(""); invite = g_strdup_printf(MSN_CONTACT_INVITE_MESSAGE_XML, body, tmp); diff -r f75041cb3fec -r 10e5000326a5 libpurple/protocols/msn/error.c --- a/libpurple/protocols/msn/error.c Sat Oct 01 18:21:43 2011 +0000 +++ b/libpurple/protocols/msn/error.c Sat Oct 01 21:04:35 2011 +0000 @@ -274,7 +274,7 @@ if (debug) purple_debug_warning("msn", "error %d: %s\n", type, buf); else - purple_notify_error(session->account->gc, NULL, buf, NULL); + purple_notify_error(purple_account_get_connection(session->account), NULL, buf, NULL); g_free(buf); } diff -r f75041cb3fec -r 10e5000326a5 libpurple/protocols/msn/httpconn.c --- a/libpurple/protocols/msn/httpconn.c Sat Oct 01 18:21:43 2011 +0000 +++ b/libpurple/protocols/msn/httpconn.c Sat Oct 01 21:04:35 2011 +0000 @@ -285,8 +285,10 @@ httpconn = data; servconn = httpconn->servconn; - if (servconn->type == MSN_SERVCONN_NS) - servconn->session->account->gc->last_received = time(NULL); + if (servconn->type == MSN_SERVCONN_NS) { + PurpleConnection *gc = purple_account_get_connection(servconn->session); + gc->last_received = time(NULL); + } len = read(httpconn->fd, buf, sizeof(buf) - 1); if (len < 0 && errno == EAGAIN) diff -r f75041cb3fec -r 10e5000326a5 libpurple/protocols/msn/msg.c --- a/libpurple/protocols/msn/msg.c Sat Oct 01 18:21:43 2011 +0000 +++ b/libpurple/protocols/msn/msg.c Sat Oct 01 21:04:35 2011 +0000 @@ -627,7 +627,7 @@ const char *passport; const char *value; - gc = cmdproc->session->account->gc; + gc = purple_account_get_connection(cmdproc->session->account); body = msn_message_get_bin_data(msg, &body_len); body_enc = g_markup_escape_text(body, body_len); @@ -713,7 +713,7 @@ PurpleConnection *gc; char *passport; - gc = cmdproc->session->account->gc; + gc = purple_account_get_connection(cmdproc->session->account); passport = msg->remote_user; if (msn_message_get_header_value(msg, "TypingUser") == NULL) @@ -762,7 +762,7 @@ if (swboard->conv == NULL) { if (chat) - swboard->conv = purple_find_chat(account->gc, swboard->chat_id); + swboard->conv = purple_find_chat(purple_account_get_connection(account), swboard->chat_id); else { swboard->conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, who, account); @@ -991,21 +991,23 @@ /* Nudge */ PurpleAccount *account; const char *user; + PurpleConnection *gc; account = cmdproc->session->account; user = msg->remote_user; + gc = purple_account_get_connection(account); if (cmdproc->servconn->type == MSN_SERVCONN_SB) { MsnSwitchBoard *swboard = cmdproc->data; if (swboard->current_users > 1 || ((swboard->conv != NULL) && purple_conversation_get_type(swboard->conv) == PURPLE_CONV_TYPE_CHAT)) - purple_prpl_got_attention_in_chat(account->gc, swboard->chat_id, user, MSN_NUDGE); + purple_prpl_got_attention_in_chat(gc, swboard->chat_id, user, MSN_NUDGE); else - purple_prpl_got_attention(account->gc, user, MSN_NUDGE); + purple_prpl_got_attention(gc, user, MSN_NUDGE); } else { - purple_prpl_got_attention(account->gc, user, MSN_NUDGE); + purple_prpl_got_attention(gc, user, MSN_NUDGE); } } else if (!strcmp(id, "2")) { diff -r f75041cb3fec -r 10e5000326a5 libpurple/protocols/msn/nexus.c --- a/libpurple/protocols/msn/nexus.c Sat Oct 01 18:21:43 2011 +0000 +++ b/libpurple/protocols/msn/nexus.c Sat Oct 01 21:04:35 2011 +0000 @@ -390,7 +390,7 @@ msn_session_set_login_step(session, MSN_LOGIN_STEP_GET_COOKIE); username = purple_account_get_username(session->account); - password = purple_connection_get_password(session->account->gc); + password = purple_connection_get_password(purple_account_get_connection(session->account)); if (g_utf8_strlen(password, -1) > 16) { /* max byte size for 16 utf8 characters is 64 + 1 for the null */ gchar truncated[65]; diff -r f75041cb3fec -r 10e5000326a5 libpurple/protocols/msn/notification.c --- a/libpurple/protocols/msn/notification.c Sat Oct 01 18:21:43 2011 +0000 +++ b/libpurple/protocols/msn/notification.c Sat Oct 01 21:04:35 2011 +0000 @@ -1390,7 +1390,7 @@ session = cmdproc->session; account = session->account; - gc = account->gc; + gc = purple_account_get_connection(account); rru = cmd->params[1]; url = cmd->params[2]; @@ -2011,7 +2011,7 @@ const char *unread; session = cmdproc->session; - gc = session->account->gc; + gc = purple_account_get_connection(session->account); if (strcmp(msg->remote_user, "Hotmail")) /* This isn't an official message. */ @@ -2062,7 +2062,7 @@ const char *mdata, *unread; session = cmdproc->session; - gc = session->account->gc; + gc = purple_account_get_connection(session->account); if (strcmp(msg->remote_user, "Hotmail")) /* This isn't an official message. */ @@ -2134,7 +2134,7 @@ char *from, *subject, *tmp; session = cmdproc->session; - gc = session->account->gc; + gc = purple_account_get_connection(session->account); if (strcmp(msg->remote_user, "Hotmail")) /* This isn't an official message. */ @@ -2219,7 +2219,7 @@ } if (*buf != '\0') - purple_notify_info(cmdproc->session->account->gc, NULL, buf, NULL); + purple_notify_info(purple_account_get_connection(cmdproc->session->account), NULL, buf, NULL); } g_hash_table_destroy(table); diff -r f75041cb3fec -r 10e5000326a5 libpurple/protocols/msn/oim.c --- a/libpurple/protocols/msn/oim.c Sat Oct 01 18:21:43 2011 +0000 +++ b/libpurple/protocols/msn/oim.c Sat Oct 01 21:04:35 2011 +0000 @@ -695,7 +695,7 @@ purple_debug_info("msn", "oim Date:{%s},passport{%s}\n", date, passport); - serv_got_im(rdata->oim->session->account->gc, passport, decode_msg, 0, + serv_got_im(purple_account_get_connection(rdata->oim->session->account), passport, decode_msg, 0, stamp); /*Now get the oim message ID from the oim_list. @@ -785,7 +785,7 @@ /* XXX/khc: pretty sure this is wrong */ if (count > 0) - purple_notify_emails(session->account->gc, count, FALSE, NULL, + purple_notify_emails(purple_account_get_connection(session->account), count, FALSE, NULL, NULL, passports, urls, NULL, NULL); g_free(unread); } diff -r f75041cb3fec -r 10e5000326a5 libpurple/protocols/msn/servconn.c --- a/libpurple/protocols/msn/servconn.c Sat Oct 01 18:21:43 2011 +0000 +++ b/libpurple/protocols/msn/servconn.c Sat Oct 01 21:04:35 2011 +0000 @@ -421,8 +421,10 @@ servconn = data; - if (servconn->type == MSN_SERVCONN_NS) - servconn->session->account->gc->last_received = time(NULL); + if (servconn->type == MSN_SERVCONN_NS) { + PurpleConnection *gc = purple_account_get_connection(servconn->session->account); + gc->last_received = time(NULL); + } len = read(servconn->fd, buf, sizeof(buf) - 1); if (len < 0 && errno == EAGAIN) diff -r f75041cb3fec -r 10e5000326a5 libpurple/protocols/msn/session.c --- a/libpurple/protocols/msn/session.c Sat Oct 01 18:21:43 2011 +0000 +++ b/libpurple/protocols/msn/session.c Sat Oct 01 21:04:35 2011 +0000 @@ -459,7 +459,7 @@ if (session->logged_in) return; - gc = session->account->gc; + gc = purple_account_get_connection(session->account); session->login_step = step; diff -r f75041cb3fec -r 10e5000326a5 libpurple/protocols/msn/switchboard.c --- a/libpurple/protocols/msn/switchboard.c Sat Oct 01 18:21:43 2011 +0000 +++ b/libpurple/protocols/msn/switchboard.c Sat Oct 01 21:04:35 2011 +0000 @@ -312,7 +312,7 @@ swboard->chat_id = msn_switchboard_get_chat_id(); swboard->flag |= MSN_SB_FLAG_IM; - swboard->conv = serv_got_joined_chat(account->gc, + swboard->conv = serv_got_joined_chat(purple_account_get_connection(account), swboard->chat_id, "MSN Chat"); @@ -750,7 +750,7 @@ PurpleConnection *gc; MsnSwitchBoard *swboard; - gc = cmdproc->session->account->gc; + gc = purple_account_get_connection(cmdproc->session->account); swboard = cmdproc->data; if (swboard->current_users > 1) diff -r f75041cb3fec -r 10e5000326a5 libpurple/protocols/msn/user.c --- a/libpurple/protocols/msn/user.c Sat Oct 01 18:21:43 2011 +0000 +++ b/libpurple/protocols/msn/user.c Sat Oct 01 21:04:35 2011 +0000 @@ -566,7 +566,7 @@ return; } - if (!buddy_icon_cached(account->gc, obj)) { + if (!buddy_icon_cached(purple_account_get_connection(account), obj)) { MsnUserList *userlist; userlist = user->userlist; diff -r f75041cb3fec -r 10e5000326a5 libpurple/protocols/myspace/myspace.c --- a/libpurple/protocols/myspace/myspace.c Sat Oct 01 18:21:43 2011 +0000 +++ b/libpurple/protocols/myspace/myspace.c Sat Oct 01 21:04:35 2011 +0000 @@ -2543,7 +2543,7 @@ /* If we should be idle, set that status. Time is irrelevant here. */ if (purple_presence_is_idle(pres) && status_code != MSIM_STATUS_CODE_OFFLINE_OR_HIDDEN) - msim_set_idle(account->gc, 1); + msim_set_idle(purple_account_get_connection(account), 1); } /** @@ -2864,7 +2864,7 @@ const char *username; /* If the account does not exist, we can't look up the user. */ - if (!account || !account->gc) + if (!account || !purple_account_get_connection(account)) return str; id = atol(str); diff -r f75041cb3fec -r 10e5000326a5 libpurple/protocols/silc/silc.c --- a/libpurple/protocols/silc/silc.c Sat Oct 01 18:21:43 2011 +0000 +++ b/libpurple/protocols/silc/silc.c Sat Oct 01 21:04:35 2011 +0000 @@ -555,7 +555,7 @@ char *username, *hostname, *realname, **up; int i; - gc = account->gc; + gc = purple_account_get_connection(account); if (!gc) return; purple_connection_set_protocol_data(gc, NULL); diff -r f75041cb3fec -r 10e5000326a5 libpurple/protocols/yahoo/libymsg.c --- a/libpurple/protocols/yahoo/libymsg.c Sat Oct 01 18:21:43 2011 +0000 +++ b/libpurple/protocols/yahoo/libymsg.c Sat Oct 01 21:04:35 2011 +0000 @@ -5213,7 +5213,7 @@ if (*args && args[0]) return PURPLE_CMD_RET_FAILED; - purple_prpl_send_attention(account->gc, purple_conversation_get_name(c), YAHOO_BUZZ); + purple_prpl_send_attention(purple_account_get_connection(account), purple_conversation_get_name(c), YAHOO_BUZZ); return PURPLE_CMD_RET_OK; } diff -r f75041cb3fec -r 10e5000326a5 libpurple/protocols/zephyr/zephyr.c --- a/libpurple/protocols/zephyr/zephyr.c Sat Oct 01 18:21:43 2011 +0000 +++ b/libpurple/protocols/zephyr/zephyr.c Sat Oct 01 21:04:35 2011 +0000 @@ -1842,7 +1842,7 @@ if (zephyr_subscribe_to(zephyr,"MESSAGE","PERSONAL",zephyr->username,NULL) != ZERR_NONE) { /* XXX don't translate this yet. It could be written better */ /* XXX error messages could be handled with more detail */ - purple_notify_error(account->gc, NULL, + purple_notify_error(purple_account_get_connection(account), NULL, "Unable to subscribe to messages", "Unable to subscribe to initial messages"); return; } diff -r f75041cb3fec -r 10e5000326a5 pidgin/gtkblist.c --- a/pidgin/gtkblist.c Sat Oct 01 18:21:43 2011 +0000 +++ b/pidgin/gtkblist.c Sat Oct 01 21:04:35 2011 +0000 @@ -1519,7 +1519,7 @@ if (prpl_info && prpl_info->send_file) { if (!prpl_info->can_receive_file || - prpl_info->can_receive_file(buddy->account->gc, buddy->name)) + prpl_info->can_receive_file(purple_account_get_connection(buddy->account), buddy->name)) { pidgin_new_item_from_stock(menu, _("_Send File..."), PIDGIN_STOCK_TOOLBAR_SEND_FILE, @@ -1547,7 +1547,7 @@ NULL, G_CALLBACK(gtk_blist_menu_showoffline_cb), node, 0, 0, NULL); } - pidgin_append_blist_node_proto_menu(menu, buddy->account->gc, node); + pidgin_append_blist_node_proto_menu(menu, purple_account_get_connection(buddy->account), node); pidgin_append_blist_node_extended_menu(menu, node); if (!contact_expanded && contact != NULL) @@ -1600,7 +1600,7 @@ return FALSE; } if(buddy) - pidgin_retrieve_user_info(buddy->account->gc, buddy->name); + pidgin_retrieve_user_info(purple_account_get_connection(buddy->account), buddy->name); } else { switch (event->keyval) { case GDK_F2: @@ -1753,7 +1753,7 @@ pidgin_new_item_from_stock(menu, _("View _Log"), NULL, G_CALLBACK(gtk_blist_menu_showlog_cb), node, 0, 0, NULL); - pidgin_append_blist_node_proto_menu(menu, c->account->gc, node); + pidgin_append_blist_node_proto_menu(menu, purple_account_get_connection(c->account), node); pidgin_append_blist_node_extended_menu(menu, node); pidgin_separator(menu); @@ -1838,7 +1838,7 @@ if(buddy == b) continue; - if(!buddy->account->gc) + if(!purple_account_get_connection(buddy->account)) continue; if(!show_offline && !PURPLE_BUDDY_IS_ONLINE(buddy)) continue; @@ -1967,7 +1967,7 @@ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl); if (prpl && prpl_info->get_info) - pidgin_retrieve_user_info(b->account->gc, b->name); + pidgin_retrieve_user_info(purple_account_get_connection(b->account), b->name); handled = TRUE; } @@ -2673,8 +2673,8 @@ account = purple_buddy_get_account(buddy); } - if(account && account->gc) { - prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(account->gc->prpl); + if(account && purple_account_get_connection(account)) { + prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_account_get_connection(account)->prpl); } #if 0 @@ -3681,7 +3681,7 @@ connections = purple_connections_get_all(); if (connections && connections->next) { - tmp = g_markup_escape_text(chat->account->username, -1); + tmp = g_markup_escape_text(purple_account_get_username(chat->account), -1); g_string_append_printf(str, _("Account: %s"), tmp); g_free(tmp); } @@ -3713,7 +3713,7 @@ } if (prpl_info && prpl_info->chat_info != NULL) - cur = prpl_info->chat_info(chat->account->gc); + cur = prpl_info->chat_info(purple_account_get_connection(chat->account)); else cur = NULL; @@ -4235,7 +4235,7 @@ if (prpl != NULL) prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl); - if (prpl_info && prpl_info->status_text && b->account->gc) { + if (prpl_info && prpl_info->status_text && purple_account_get_connection(b->account)) { char *tmp = prpl_info->status_text(b); const char *end; diff -r f75041cb3fec -r 10e5000326a5 pidgin/gtkconv.c --- a/pidgin/gtkconv.c Sat Oct 01 18:21:43 2011 +0000 +++ b/pidgin/gtkconv.c Sat Oct 01 21:04:35 2011 +0000 @@ -1746,7 +1746,7 @@ if (buddy != NULL) { if (purple_account_is_connected(account)) - pidgin_append_blist_node_proto_menu(menu, account->gc, + pidgin_append_blist_node_proto_menu(menu, purple_account_get_connection(account), (PurpleBlistNode *)buddy); pidgin_append_blist_node_extended_menu(menu, (PurpleBlistNode *)buddy); gtk_widget_show_all(menu); @@ -1772,7 +1772,7 @@ gtkconv = PIDGIN_CONVERSATION(conv); gtkchat = gtkconv->u.chat; account = purple_conversation_get_account(conv); - gc = account->gc; + gc = purple_account_get_connection(account); model = gtk_tree_view_get_model(GTK_TREE_VIEW(gtkchat->list)); @@ -1808,7 +1808,7 @@ gtkchat = gtkconv->u.chat; account = purple_conversation_get_account(conv); - gc = account->gc; + gc = purple_account_get_connection(account); model = gtk_tree_view_get_model(GTK_TREE_VIEW(gtkchat->list)); @@ -2678,7 +2678,7 @@ gtkconv = PIDGIN_CONVERSATION(conv); account = purple_conversation_get_account(conv); - if (!(account && account->gc)) { + if (!(account && purple_account_get_connection(account))) { gtkconv->u.im->icon_timer = 0; return FALSE; } @@ -3303,7 +3303,7 @@ } } else if (node) { if (purple_account_is_connected(account)) - pidgin_append_blist_node_proto_menu(menu, account->gc, node); + pidgin_append_blist_node_proto_menu(menu, purple_account_get_connection(account), node); pidgin_append_blist_node_extended_menu(menu, node); } @@ -4770,7 +4770,7 @@ PurpleAccount *account = purple_conversation_get_account(conv); char *who = NULL; - if (account->gc == NULL) + if (purple_account_get_connection(account) == NULL) return FALSE; if (!gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, path)) @@ -4778,7 +4778,7 @@ gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, CHAT_USERS_NAME_COLUMN, &who, -1); - prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(account->gc->prpl); + prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_account_get_connection(account)->prpl); node = (PurpleBlistNode*)(purple_find_buddy(purple_conversation_get_account(conv), who)); if (node && prpl_info && (prpl_info->options & OPT_PROTO_UNIQUE_CHATNAME)) pidgin_blist_draw_tooltip(node, gtkconv->infopane); diff -r f75041cb3fec -r 10e5000326a5 pidgin/gtkpounce.c --- a/pidgin/gtkpounce.c Sat Oct 01 18:21:43 2011 +0000 +++ b/pidgin/gtkpounce.c Sat Oct 01 21:04:35 2011 +0000 @@ -476,7 +476,7 @@ { PurpleAccount *account = pidgin_account_option_menu_get_selected(dialog->account_menu); gtk_imhtml_setup_entry(GTK_IMHTML(dialog->send_msg_entry), - (account && account->gc) ? account->gc->flags : PURPLE_CONNECTION_HTML); + (account && purple_account_get_connection(account)) ? purple_account_get_connection(account)->flags : PURPLE_CONNECTION_HTML); } void @@ -1483,7 +1483,7 @@ purple_conversation_write(conv, NULL, message, PURPLE_MESSAGE_SEND, time(NULL)); - serv_send_im(account->gc, (char *)pouncee, (char *)message, 0); + serv_send_im(purple_account_get_connection(account), (char *)pouncee, (char *)message, 0); } } diff -r f75041cb3fec -r 10e5000326a5 pidgin/gtkprivacy.c --- a/pidgin/gtkprivacy.c Sat Oct 01 18:21:43 2011 +0000 +++ b/pidgin/gtkprivacy.c Sat Oct 01 21:04:35 2011 +0000 @@ -211,7 +211,7 @@ dialog->account = account; for (i = 0; i < menu_entry_count; i++) { - if (menu_entries[i].num == account->perm_deny) { + if (menu_entries[i].num == purple_account_get_privacy_type(account)) { gtk_combo_box_set_active(GTK_COMBO_BOX(dialog->type_menu), i); break; } @@ -230,7 +230,7 @@ { int new_type = menu_entries[gtk_combo_box_get_active(combo)].num; - dialog->account->perm_deny = new_type; + purple_account_set_privacy_type(dialog->account, new_type); serv_set_permit_deny(purple_account_get_connection(dialog->account)); gtk_widget_hide(dialog->allow_widget); @@ -371,7 +371,7 @@ gtk_combo_box_append_text(GTK_COMBO_BOX(dialog->type_menu), _(menu_entries[i].text)); - if (menu_entries[i].num == dialog->account->perm_deny) + if (menu_entries[i].num == purple_account_get_privacy_type(dialog->account)) selected = i; } @@ -411,12 +411,12 @@ type_changed_cb(GTK_COMBO_BOX(dialog->type_menu), dialog); #if 0 - if (dialog->account->perm_deny == PURPLE_PRIVACY_ALLOW_USERS) { + if (purple_account_get_privacy_type(dialog->account) == PURPLE_PRIVACY_ALLOW_USERS) { gtk_widget_show(dialog->allow_widget); gtk_widget_show(dialog->button_box); dialog->in_allow_list = TRUE; } - else if (dialog->account->perm_deny == PURPLE_PRIVACY_DENY_USERS) { + else if (purple_account_get_privacy_type(dialog->account) == PURPLE_PRIVACY_DENY_USERS) { gtk_widget_show(dialog->block_widget); gtk_widget_show(dialog->button_box); dialog->in_allow_list = FALSE; diff -r f75041cb3fec -r 10e5000326a5 pidgin/plugins/adiumthemes/webkit.c --- a/pidgin/plugins/adiumthemes/webkit.c Sat Oct 01 18:21:43 2011 +0000 +++ b/pidgin/plugins/adiumthemes/webkit.c Sat Oct 01 21:04:35 2011 +0000 @@ -452,7 +452,7 @@ } purple_conversation_set_data(conv, "webkit-lastflags", GINT_TO_POINTER(flags)); - smileyed = smiley_parse_markup(stripped, purple_conversation_get_account(conv)->protocol_id); + smileyed = smiley_parse_markup(stripped, purple_account_get_protocol_id(purple_conversation_get_account(conv))); msg = replace_message_tokens(message_html, conv, name, alias, smileyed, flags, mtime); escape = gtk_webview_quote_js_string(msg); script = g_strdup_printf("%s(%s)", func, escape); diff -r f75041cb3fec -r 10e5000326a5 pidgin/plugins/xmppconsole.c --- a/pidgin/plugins/xmppconsole.c Sat Oct 01 18:21:43 2011 +0000 +++ b/pidgin/plugins/xmppconsole.c Sat Oct 01 21:04:35 2011 +0000 @@ -733,10 +733,10 @@ account = purple_accounts_find(gtk_combo_box_get_active_text(GTK_COMBO_BOX(console->dropdown)), "prpl-jabber"); - if (!account || !account->gc) + if (!account || !purple_account_get_connection(account)) return; - console->gc = account->gc; + console->gc = purple_account_get_connection(account); gtk_imhtml_clear(GTK_IMHTML(console->imhtml)); }