pidgin: b8a0c1b9: Convert to using the accessor functions.

andrew.victor at mxit.com andrew.victor at mxit.com
Fri Aug 26 17:31:15 EDT 2011


----------------------------------------------------------------------
Revision: b8a0c1b968d60c21b27838cf9338ac9bb8c28e10
Parent:   9f78d43fc430627c3810b8ec389a5e7d0d354dd2
Author:   andrew.victor at mxit.com
Date:     08/26/11 17:21:45
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/b8a0c1b968d60c21b27838cf9338ac9bb8c28e10

Changelog: 

Convert to using the accessor functions.


Changes against parent 9f78d43fc430627c3810b8ec389a5e7d0d354dd2

  patched  pidgin/gtkconv.c
  patched  pidgin/gtkconv.h

-------------- next part --------------
============================================================
--- pidgin/gtkconv.c	a62ad364c257afb4d5df7725438c7b460ebff628
+++ pidgin/gtkconv.c	140ffad5094bc233703faf2bbb7184725117f697
@@ -5277,8 +5277,8 @@ pidgin_conv_find_gtkconv(PurpleConversat
 		PurpleBuddy *b = PURPLE_BUDDY(bn);
 		PurpleConversation *conv;
 		if ((conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, b->name, b->account))) {
-			if (conv->ui_data)
-				return conv->ui_data;
+			if (PIDGIN_CONVERSATION(conv))
+				return PIDGIN_CONVERSATION(conv);
 		}
 	}
 
@@ -5366,7 +5366,7 @@ private_gtkconv_new(PurpleConversation *
 	PurpleValue *value;
 
 	if (conv_type == PURPLE_CONV_TYPE_IM && (gtkconv = pidgin_conv_find_gtkconv(conv))) {
-		conv->ui_data = gtkconv;
+		purple_conversation_set_ui_data(conv, gtkconv);
 		if (!g_list_find(gtkconv->convs, conv))
 			gtkconv->convs = g_list_prepend(gtkconv->convs, conv);
 		pidgin_conv_switch_active_conversation(conv);
@@ -5374,7 +5374,7 @@ private_gtkconv_new(PurpleConversation *
 	}
 
 	gtkconv = g_new0(PidginConversation, 1);
-	conv->ui_data = gtkconv;
+	purple_conversation_set_ui_data(conv, gtkconv);
 	gtkconv->active_conv = conv;
 	gtkconv->convs = g_list_prepend(gtkconv->convs, conv);
 	gtkconv->send_history = g_list_append(NULL, NULL);
@@ -5401,7 +5401,7 @@ private_gtkconv_new(PurpleConversation *
 			g_free(gtkconv->u.im);
 
 		g_free(gtkconv);
-		conv->ui_data = NULL;
+		purple_conversation_set_ui_data(conv, NULL);
 		return;
 	}
 
============================================================
--- pidgin/gtkconv.h	7297b62e0003c7b7ac9cf77f2eaf7d0c94ead043
+++ pidgin/gtkconv.h	a08075eef96235c276acc66079a666e6ecb8200c
@@ -56,7 +56,7 @@ enum {
 };
 
 #define PIDGIN_CONVERSATION(conv) \
-	((PidginConversation *)(conv)->ui_data)
+	((PidginConversation *)purple_conversation_get_ui_data(conv))
 
 #define PIDGIN_IS_PIDGIN_CONVERSATION(conv) \
 	(purple_conversation_get_ui_ops(conv) == \


More information about the Commits mailing list