gobjectification: 536cd123: Fix compile for it all...

qulogic at pidgin.im qulogic at pidgin.im
Sat Feb 21 19:35:39 EST 2009


-----------------------------------------------------------------
Revision: 536cd1234840adc6844441618c9ae94fd26766d7
Ancestor: ef571f3485bf63529e6f62e2e3f1ecbf64d97656
Author: qulogic at pidgin.im
Date: 2009-02-22T00:30:26
Branch: im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/536cd1234840adc6844441618c9ae94fd26766d7

Modified files:
        libpurple/protocols/msn/msg.c
        libpurple/protocols/msn/switchboard.c
        libpurple/protocols/qq/group_im.c libpurple/status.c

ChangeLog: 

Fix compile for it all...

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/msg.c	e635599d8868e7b8a31662d4605556c25fb19839
+++ libpurple/protocols/msn/msg.c	41bc32092e13ddeb9818aa2086dc88d0198c066a
@@ -829,7 +829,7 @@ msn_plain_msg(MsnCmdProc *cmdproc, MsnMe
 	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_str = g_strndup(body, body_len);
@@ -916,7 +916,7 @@ msn_control_msg(MsnCmdProc *cmdproc, Msn
 	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_attr(msg, "TypingUser") == NULL)
@@ -949,9 +949,11 @@ msn_datacast_msg(MsnCmdProc *cmdproc, Ms
 	if (!strcmp(id, "1")) {
 		/* Nudge */
 		PurpleAccount *account;
+		PurpleConnection *gc;
 		const char *user;
 
 		account = cmdproc->session->account;
+		gc = purple_account_get_connection(account);
 		user = msg->remote_user;
 
 		if (cmdproc->servconn->type == MSN_SERVCONN_SB) {
@@ -959,13 +961,13 @@ msn_datacast_msg(MsnCmdProc *cmdproc, Ms
 			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(account, swboard->chat_id, user, MSN_NUDGE);
 
 			else
-				purple_prpl_got_attention(account->gc, user, MSN_NUDGE);
+				purple_prpl_got_attention(account, user, MSN_NUDGE);
 
 		} else {
-			purple_prpl_got_attention(account->gc, user, MSN_NUDGE);
+			purple_prpl_got_attention(account, user, MSN_NUDGE);
 		}
 
 	} else if (!strcmp(id, "2")) {
============================================================
--- libpurple/protocols/msn/switchboard.c	12c18c22f4e1e1124120a67de44a6d9107021a23
+++ libpurple/protocols/msn/switchboard.c	4339bd20707206e29e23f3456deccc4d950b1cf8
@@ -1222,21 +1222,21 @@ msn_switchboard_init(void)
 
 	/* Register the message type callbacks. */
 	msn_table_add_msg_type(cbs_table, "text/plain",
-						   plain_msg);
+	                       msn_plain_msg);
 	msn_table_add_msg_type(cbs_table, "text/x-msmsgscontrol",
-						   control_msg);
+	                       msn_control_msg);
 	msn_table_add_msg_type(cbs_table, "text/x-clientcaps",
-						   clientcaps_msg);
+	                       clientcaps_msg);
 	msn_table_add_msg_type(cbs_table, "text/x-clientinfo",
-						   clientcaps_msg);
+	                       clientcaps_msg);
 	msn_table_add_msg_type(cbs_table, "application/x-msnmsgrp2p",
-						   msn_p2p_msg);
+	                       msn_p2p_msg);
 	msn_table_add_msg_type(cbs_table, "text/x-mms-emoticon",
-						   msn_emoticon_msg);
+	                       msn_emoticon_msg);
 	msn_table_add_msg_type(cbs_table, "text/x-mms-animemoticon",
-	                                           msn_emoticon_msg);
+	                       msn_emoticon_msg);
 	msn_table_add_msg_type(cbs_table, "text/x-msnmsgr-datacast",
-						   datacast_msg);
+	                       msn_datacast_msg);
 #if 0
 	msn_table_add_msg_type(cbs_table, "text/x-msmmsginvite",
 						   msn_invite_msg);
============================================================
--- libpurple/protocols/qq/group_im.c	ac1d18f243aa12dee75288c18d2b4626690f6aaf
+++ libpurple/protocols/qq/group_im.c	3371dd4d1e1011f823db5ecc9af946724113af72
@@ -173,7 +173,7 @@ void qq_room_got_chat_in(PurpleConnectio
 	g_return_if_fail(gc != NULL && room_id != 0);
 	g_return_if_fail(msg != NULL);
 
-	qd = (qq_data *)gc->proto_data;
+	qd = (qq_data *)purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 	conv = purple_find_chat(gc, room_id);
 	rmd = qq_room_data_find(gc, room_id);
 	g_return_if_fail(rmd != NULL);
============================================================
--- libpurple/status.c	6a0e030864d938dd2f752ae86d1353f1b12904e7
+++ libpurple/status.c	9f4f8943c7da805b41c7f6eaa52cfc08947e0d06
@@ -830,7 +830,7 @@ purple_status_set_active_with_attrs_list
 
 		if (!g_list_find_custom(specified_attr_ids, attr->id, (GCompareFunc)strcmp)) {
 			const GValue *default_value = purple_status_attr_get_value(attr);
-			switch (G_VALUE_TYPE(value)) {
+			switch (G_VALUE_TYPE(default_value)) {
 				case G_TYPE_STRING: {
 					const gchar *cur = purple_status_get_attr_string(status, attr->id);
 					const gchar *def = g_value_get_string(default_value);
@@ -862,7 +862,7 @@ purple_status_set_active_with_attrs_list
 					/* We don't know what the data is--skip over it */
 					purple_debug_warning("status",
 						"Skipping attribute with unhandled data type %s",
-						G_VALUE_TYPE_NAME(value));
+						G_VALUE_TYPE_NAME(default_value));
 					continue;
 				}
 			}


More information about the Commits mailing list