gobjectification: 59330ed0: Fix a lot of small compilation errors by...

markdoliner at pidgin.im markdoliner at pidgin.im
Sun Mar 20 19:05:58 EDT 2011


----------------------------------------------------------------------
Revision: 59330ed07b381531d967c2e841c251d86114aef7
Parent:   1d26006ef49170ec95a2f036eace218560a33a08
Author:   markdoliner at pidgin.im
Date:     03/20/11 19:04:51
Branch:   im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/59330ed07b381531d967c2e841c251d86114aef7

Changelog: 

Fix a lot of small compilation errors by using accessor functions

Changes against parent 1d26006ef49170ec95a2f036eace218560a33a08

  patched  libpurple/protocols/gg/gg.c
  patched  libpurple/protocols/irc/msgs.c
  patched  libpurple/protocols/mxit/login.c
  patched  libpurple/protocols/mxit/mxit.c
  patched  libpurple/protocols/oscar/family_feedbag.c
  patched  libpurple/protocols/qq/group_im.c

-------------- next part --------------
============================================================
--- libpurple/protocols/gg/gg.c	f5258d230fec378e856400c6a07b4ad677e3a4a5
+++ libpurple/protocols/gg/gg.c	6e033e7137f5403c0a3f44cda4fdf37af02fe7a2
@@ -767,7 +767,7 @@ static void ggp_action_change_status_bro
 
 static void ggp_action_change_status_broadcasting_ok(PurpleConnection *gc, PurpleRequestFields *fields)
 {
-	GGPInfo *info = gc->proto_data;
+	GGPInfo *info = purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 	int selected_field;
 	PurpleAccount *account = purple_connection_get_account(gc);
 	PurpleStatus *status;
@@ -787,7 +787,7 @@ static void ggp_action_change_status_bro
 static void ggp_action_change_status_broadcasting(PurplePluginAction *action)
 {
 	PurpleConnection *gc = (PurpleConnection *)action->context;
-	GGPInfo *info = gc->proto_data;
+	GGPInfo *info = purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 	
 	PurpleRequestFields *fields;
 	PurpleRequestFieldGroup *group;
============================================================
--- libpurple/protocols/irc/msgs.c	faf42112487a57a867f38f5e3fc0a2fe097fb68c
+++ libpurple/protocols/irc/msgs.c	1e00c70a1ea3d354dd687b89ebb8c8b54277ccf4
@@ -449,12 +449,12 @@ void irc_msg_who(struct irc_conn *irc, c
 		g_free(userhost);
 		g_free(realname);
 		
-		flags = purple_conv_chat_user_get_flags(chat, cb->name);
+		flags = purple_conv_chat_user_get_flags(chat, purple_conv_chat_cb_get_name(cb));
 
 		if (args[6][0] == 'G' && !(flags & PURPLE_CBFLAGS_AWAY)) {
-			purple_conv_chat_user_set_flags(chat, cb->name, flags | PURPLE_CBFLAGS_AWAY);
+			purple_conv_chat_user_set_flags(chat, purple_conv_chat_cb_get_name(cb), flags | PURPLE_CBFLAGS_AWAY);
 		} else if(args[6][0] == 'H' && (flags & PURPLE_CBFLAGS_AWAY)) {
-			purple_conv_chat_user_set_flags(chat, cb->name, flags & ~PURPLE_CBFLAGS_AWAY);
+			purple_conv_chat_user_set_flags(chat, purple_conv_chat_cb_get_name(cb), flags & ~PURPLE_CBFLAGS_AWAY);
 		}
 	}
 }
============================================================
--- libpurple/protocols/oscar/family_feedbag.c	ae1f1a5c598f4bc3377ff17e61d18b94eb7a52cb
+++ libpurple/protocols/oscar/family_feedbag.c	768ac1989bd22d14688cbfd4314053bb81e0ca87
@@ -628,7 +628,7 @@ static int aim_ssi_sync(OscarData *od)
 			for (cur1 = od->ssi.local; cur1; cur1 = cur1->next) 
 				aim_ssi_item_debug_append(debugstr, "\t", cur1);
 			purple_debug_misc("oscar", "Dumping item list of account %s:\n%s",
-				purple_connection_get_account(od->gc)->username, debugstr->str);
+				purple_account_get_username(purple_connection_get_account(od->gc)), debugstr->str);
 		}
 	}
 	g_string_free(debugstr, TRUE);
@@ -1256,7 +1256,7 @@ static int parsedata(OscarData *od, Flap
 		aim_tlvlist_free(data);
 	}
 	purple_debug_misc("oscar", "Reading items from tlvlist for account %s:\n%s",
-		purple_connection_get_account(od->gc)->username, debugstr->str);
+		purple_account_get_username(purple_connection_get_account(od->gc)), debugstr->str);
 	g_string_free(debugstr, TRUE);
 
 	/* Read in the timestamp */
============================================================
--- libpurple/protocols/qq/group_im.c	869de0c31833bac9375804111b0456660b42ed89
+++ libpurple/protocols/qq/group_im.c	f7baf5bdb50d90816eded3705f8ec6dd4f8c69c2
@@ -225,7 +225,7 @@ void qq_process_room_im(guint8 *data, gi
 	guint16 msg_id;
 	guint32 use_default_font;
 	qq_im_format *fmt = NULL;
-	qd = (qq_data *) gc->proto_data;
+	qd = purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 
 	/* at least include im_text.msg_len */
 	g_return_if_fail(data != NULL && data_len > 23);
============================================================
--- libpurple/protocols/mxit/login.c	2360fd3312053b684655762ea00bccb6633d6a08
+++ libpurple/protocols/mxit/login.c	873e196ec11579986024647bc242d837b6d7576d
@@ -573,7 +573,7 @@ static void mxit_cb_captcha_cancel( Purp
  */
 static void mxit_cb_captcha_cancel( PurpleConnection* gc, PurpleRequestFields* fields )
 {
-	struct MXitSession*		session	= (struct MXitSession*) gc->proto_data;
+	struct MXitSession*		session	= purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 
 	/* free up the login resources */
 	free_logindata( session->logindata );
@@ -766,9 +766,9 @@ void mxit_reconnect( struct MXitSession*
 	purple_debug_info( MXIT_PLUGIN_ID, "mxit_reconnect\n" );
 
 	/* remove the input cb function */
-	if ( session->con->inpa ) {
-		purple_input_remove( session->con->inpa );
-		session->con->inpa = 0;
+	if ( purple_object_get_int(PURPLE_OBJECT(session->con), "inpa") ) {
+		purple_input_remove( purple_object_get_int(PURPLE_OBJECT(session->con), "inpa") );
+		g_object_set(G_OBJECT(session->con), "inpa", 0, NULL);
 	}
 
 	/* close existing connection */
============================================================
--- libpurple/protocols/mxit/mxit.c	632c52cf585748f7292504bca5aa361601d52430
+++ libpurple/protocols/mxit/mxit.c	a9f0f270ad84542c2c2cec8bf1ec26711887e249
@@ -623,7 +623,7 @@ static void mxit_reinvite( PurpleBlistNo
 
 	buddy = (PurpleBuddy *)node;
 	gc = purple_account_get_connection( purple_buddy_get_account( buddy ) );
-	session = gc->proto_data;
+	session = purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 
 	contact = purple_buddy_get_protocol_data( (PurpleBuddy*) node );
 	if ( !contact )


More information about the Commits mailing list