Mercurial > pidgin
diff libpurple/protocols/qq/qq.c @ 25818:5fa132f530f3
propagate from branch 'im.pidgin.pidgin' (head 3fa3a746613f1d6095334bfc54443d61166dd9fa)
to branch 'im.pidgin.pidgin.next.minor' (head f3bb9458fa15c80c60545652e3145916f069d494)
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sun, 02 Nov 2008 22:18:13 +0000 |
parents | e35115192593 |
children | 0331bc480515 |
line wrap: on
line diff
--- a/libpurple/protocols/qq/qq.c Sun Nov 02 22:17:59 2008 +0000 +++ b/libpurple/protocols/qq/qq.c Sun Nov 02 22:18:13 2008 +0000 @@ -248,7 +248,7 @@ qq_buddy_data *bd; GString *status; - bd = (qq_buddy_data *) b->proto_data; + bd = purple_buddy_get_protocol_data(b); if (bd == NULL) return NULL; @@ -271,9 +271,9 @@ case QQ_BUDDY_ONLINE_INVISIBLE: g_string_append(status, _("Invisible")); break; - case QQ_BUDDY_ONLINE_BUSY: - g_string_append(status, _("Busy")); - break; + case QQ_BUDDY_ONLINE_BUSY: + g_string_append(status, _("Busy")); + break; default: g_string_printf(status, _("Unknown-%d"), bd->status); } @@ -291,7 +291,7 @@ g_return_if_fail(b != NULL); - bd = (qq_buddy_data *) b->proto_data; + bd = purple_buddy_get_protocol_data(b); if (bd == NULL) return; @@ -382,11 +382,12 @@ qq_data *qd; qq_buddy_data *buddy; - if (!b || !(account = b->account) || - !(gc = purple_account_get_connection(account)) || !(qd = gc->proto_data)) + if (!b || !(account = purple_buddy_get_account(b)) || + !(gc = purple_account_get_connection(account)) || + !(qd = purple_connection_get_protocol_data(gc))) return NULL; - buddy = (qq_buddy_data *)b->proto_data; + buddy = purple_buddy_get_protocol_data(b); if (!buddy) { return "not-authorized"; } @@ -419,9 +420,9 @@ "invisible", _("Invisible"), FALSE, TRUE, FALSE); types = g_list_append(types, status); - status = purple_status_type_new_full(PURPLE_STATUS_UNAVAILABLE, - "busy", _("Busy"), TRUE, TRUE, FALSE); - types = g_list_append(types, status); + status = purple_status_type_new_full(PURPLE_STATUS_UNAVAILABLE, + "busy", _("Busy"), TRUE, TRUE, FALSE); + types = g_list_append(types, status); status = purple_status_type_new_full(PURPLE_STATUS_OFFLINE, "offline", _("Offline"), FALSE, TRUE, FALSE); @@ -798,8 +799,9 @@ static void action_chat_quit(PurpleBlistNode * node) { PurpleChat *chat = (PurpleChat *)node; - PurpleConnection *gc = purple_account_get_connection(chat->account); - GHashTable *components = chat -> components; + PurpleAccount *account = purple_chat_get_account(chat); + PurpleConnection *gc = purple_account_get_connection(account); + GHashTable *components = purple_chat_get_components(chat); gchar *num_str; guint32 room_id; @@ -817,8 +819,9 @@ static void action_chat_get_info(PurpleBlistNode * node) { PurpleChat *chat = (PurpleChat *)node; - PurpleConnection *gc = purple_account_get_connection(chat->account); - GHashTable *components = chat -> components; + PurpleAccount *account = purple_chat_get_account(chat); + PurpleConnection *gc = purple_account_get_connection(account); + GHashTable *components = purple_chat_get_components(chat); gchar *num_str; guint32 room_id; @@ -905,7 +908,7 @@ g_return_if_fail(PURPLE_BLIST_NODE_IS_BUDDY(node)); buddy = (PurpleBuddy *) node; - gc = purple_account_get_connection(buddy->account); + gc = purple_account_get_connection(purple_buddy_get_account(buddy)); qq_add_buddy(gc, buddy, NULL); } @@ -918,7 +921,7 @@ PurpleConnection *gc = purple_account_get_connection(buddy->account); qq_data *qd = gc->proto_data; */ - qq_buddy_data *bd = (qq_buddy_data *)buddy->proto_data; + qq_buddy_data *bd = purple_buddy_get_protocol_data(buddy); if (bd == NULL) { act = purple_menu_action_new(_("Add Buddy"),