gobjectification: a27c8325: Fix up the merge. This was simpler than ...

sadrul at pidgin.im sadrul at pidgin.im
Mon Jun 23 00:47:01 EDT 2008


-----------------------------------------------------------------
Revision: a27c8325ce586338c42600c63f3b3f28d5868d76
Ancestor: 789e564f5aa88da4ed6c80e782bf68363ae373a7
Author: sadrul at pidgin.im
Date: 2008-06-23T04:41:26
Branch: im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/a27c8325ce586338c42600c63f3b3f28d5868d76

Modified files:
        finch/gntaccount.c finch/gntconn.c libpurple/account.c
        libpurple/plugins/perl/common/Account.xs
        libpurple/protocols/bonjour/bonjour.c
        libpurple/protocols/bonjour/bonjour_ft.c
        libpurple/protocols/jabber/auth.c
        libpurple/protocols/msn/msn.c
        libpurple/protocols/msn/object.c
        libpurple/protocols/msnp9/object.c
        libpurple/protocols/oscar/family_auth.c
        libpurple/protocols/oscar/oscar.c
        libpurple/protocols/simple/simple.c
        libpurple/protocols/yahoo/yahoo.c
        libpurple/protocols/yahoo/yahoo_aliases.c
        libpurple/protocols/yahoo/yahoo_picture.c pidgin/gtkblist.c
        pidgin/gtkconv.c pidgin/gtkimhtml.c

ChangeLog: 

Fix up the merge. This was simpler than I had feared it was going to be.

-------------- next part --------------
============================================================
--- finch/gntaccount.c	68c656bd74f66594e82682938a8fa1a57ecaf1d8
+++ finch/gntaccount.c	7393878c5fada140341fdb42835d1dfef8be997a
@@ -250,7 +250,7 @@ save_account_cb(AccountEditDialog *dialo
 		saved_status = purple_savedstatus_get_current();
 		if (saved_status != NULL) {
 			purple_savedstatus_activate_for_account(saved_status, account);
-			purple_account_set_enabled(account, FINCH_UI, TRUE);
+			purple_account_set_enabled(account, TRUE);
 		}
 	}
 
============================================================
--- finch/gntconn.c	934c7a2b81c73109f9aca6a5c8b8533ef2f9545f
+++ finch/gntconn.c	6b926091059659ed479169f1ca309ea47a80d753
@@ -196,9 +196,8 @@ void finch_connections_init()
 
 void finch_connections_init()
 {
-	hash = g_hash_table_new_full(
-							g_direct_hash, g_direct_equal,
-							NULL, free_auto_recon);
+	hash = g_hash_table_new_full(g_direct_hash, g_direct_equal,
+			NULL, free_auto_recon);
 
 	purple_signal_connect(purple_accounts_get_handle(), "account-removed",
 						finch_connection_get_handle(),
============================================================
--- libpurple/account.c	dc825787568d1bfebd2639a5f47e7e4e1244606d
+++ libpurple/account.c	309149c2ceef3f443194bec2b953f0933eb9fee7
@@ -1826,7 +1826,7 @@ purple_account_get_protocol_name(const P
 
 	g_return_val_if_fail(PURPLE_IS_ACCOUNT(account), NULL);
 
-	p = purple_find_prpl(purple_account_get_protocol_id(account));
+	p = PURPLE_ACCOUNT_GET_PRIVATE(account)->prpl;
 
 	return ((p && p->info->name) ? _(p->info->name) : _("Unknown"));
 }
============================================================
--- libpurple/plugins/perl/common/Account.xs	b1cdb75396617829d2d974784755f836e0dfd3a2
+++ libpurple/plugins/perl/common/Account.xs	08b2881f77bbe9984eb617b24011143a38ce5e3c
@@ -78,9 +78,8 @@ purple_account_set_check_mail(account, v
     Purple::Account account
     gboolean value
 
-void purple_account_set_enabled(account, ui, value)
+void purple_account_set_enabled(account, value)
     Purple::Account account
-    const char *ui
     gboolean value
 
 void
@@ -168,9 +167,8 @@ gboolean
     Purple::Account account
 
 gboolean
-purple_account_get_enabled(account, ui)
+purple_account_get_enabled(account)
     Purple::Account account
-    const char *ui
 
 Purple::ProxyInfo
 purple_account_get_proxy_info(account)
============================================================
--- libpurple/protocols/bonjour/bonjour.c	ebdfddf16942f2992e4050b7d1b3f21ec4bf3d7f
+++ libpurple/protocols/bonjour/bonjour.c	1bf52e55826af1f381a369418dee75f02c267444
@@ -397,7 +397,7 @@ bonjour_group_buddy(PurpleConnection *co
 bonjour_group_buddy(PurpleConnection *connection, const char *who, const char *old_group, const char *new_group)
 {
 	PurpleBlistNodeFlags oldflags;
-	PurpleBuddy *buddy = purple_find_buddy(connection->account, who);
+	PurpleBuddy *buddy = purple_find_buddy(purple_connection_get_account(connection), who);
 
 	if (buddy == NULL)
 		return;
@@ -415,7 +415,7 @@ bonjour_can_receive_file(PurpleConnectio
 static gboolean
 bonjour_can_receive_file(PurpleConnection *connection, const char *who)
 {
-	PurpleBuddy *buddy = purple_find_buddy(connection->account, who);
+	PurpleBuddy *buddy = purple_find_buddy(purple_connection_get_account(connection), who);
 
 	return (buddy != NULL && buddy->proto_data != NULL);
 
============================================================
--- libpurple/protocols/bonjour/bonjour_ft.c	18f3d27211229c62ebf58bdbda2c07f3566efb56
+++ libpurple/protocols/bonjour/bonjour_ft.c	2871f9d1fd40f75ba3fd80251c5fe513b4743313
@@ -461,7 +461,7 @@ xep_si_parse(PurpleConnection *pc, xmlno
 
 			if(xfer == NULL) {
 				purple_debug_info("bonjour", "xfer find fail.\n");
-				xep_ft_si_reject((BonjourData *)pc->proto_data, id, pb->name, "403", "cancel");
+				xep_ft_si_reject((BonjourData *)purple_object_get_protocol_data(PURPLE_OBJECT(pc)), id, pb->name, "403", "cancel");
 			} else
 				bonjour_bytestreams_init(xfer);
 
============================================================
--- libpurple/protocols/jabber/auth.c	4c987d5517190fc3c9fca92abaad1e96679bfca1
+++ libpurple/protocols/jabber/auth.c	8c2ce2d0b1445c0809a8a58743faf3a2e01962c7
@@ -24,6 +24,7 @@
 #include "debug.h"
 #include "core.h"
 #include "conversation.h"
+#include "hmaccipher.h"
 #include "md5cipher.h"
 #include "request.h"
 #include "sha1cipher.h"
@@ -641,7 +642,7 @@ static void auth_old_cb(JabberStream *js
 
 		} else if(js->stream_id && xmlnode_get_child(query, "crammd5")) {
 			const char *challenge;
-			gchar digest[33];
+			guchar digest[33];
 			PurpleCipher *hmac;
 
 #warning Someone better double check this
@@ -663,7 +664,7 @@ static void auth_old_cb(JabberStream *js
 
 			x = xmlnode_new_child(query, "crammd5");
 
-			xmlnode_insert_data(x, digest, 32);
+			xmlnode_insert_data(x, (char*)digest, 32);
 
 			jabber_iq_set_callback(iq, auth_old_result_cb, NULL);
 			jabber_iq_send(iq);
============================================================
--- libpurple/protocols/msn/msn.c	ad73a7b32ef7313f4d821f526c5a8a3c36813d67
+++ libpurple/protocols/msn/msn.c	86de6fd3f2f8346c1089cc554442626a9fce9b49
@@ -609,7 +609,7 @@ msn_tooltip_text(PurpleBuddy *buddy, Pur
 	PurplePresence *presence = purple_buddy_get_presence(buddy);
 	PurpleStatus *status = purple_presence_get_active_status(presence);
 
-	user = purple_object_get_protocol_data(PURPLE_OBJECT(buddy));
+	user = buddy->proto_data;
 
 	if (purple_presence_is_online(presence))
 	{
@@ -833,7 +833,7 @@ msn_buddy_menu(PurpleBuddy *buddy)
 
 	g_return_val_if_fail(buddy != NULL, NULL);
 
-	user = purple_object_get_protocol_data(PURPLE_OBJECT(buddy));
+	user = buddy->proto_data;
 
 	if (user != NULL)
 	{
============================================================
--- libpurple/protocols/msn/object.c	5b8aedef4f80c61c0188fa9f8dc9615be3ccc7e6
+++ libpurple/protocols/msn/object.c	ea40c45196d28ab13a05c899c129cc6a0b16656e
@@ -24,7 +24,7 @@
 #include "object.h"
 #include "debug.h"
 /* Sha1 stuff */
-#include "cipher.h"
+#include "sha1cipher.h"
 /* Base64 stuff */
 #include "util.h"
 
@@ -113,8 +113,7 @@ msn_object_new_from_image(PurpleStoredIm
 		const char *creator, MsnObjectType type)
 {
 	MsnObject *msnobj;
-
-	PurpleCipherContext *ctx;
+	PurpleCipher *cipher;
 	char *buf;
 	gconstpointer data;
 	size_t size;
@@ -141,9 +140,9 @@ msn_object_new_from_image(PurpleStoredIm
 	/* Compute the SHA1D field. */
 	memset(digest, 0, sizeof(digest));
 
-	ctx = purple_cipher_context_new_by_name("sha1", NULL);
-	purple_cipher_context_append(ctx, data, size);
-	purple_cipher_context_digest(ctx, sizeof(digest), digest, NULL);
+	cipher = purple_sha1_cipher_new();
+	purple_cipher_append(cipher, data, size);
+	purple_cipher_digest(cipher, sizeof(digest), digest, NULL);
 
 	base64 = purple_base64_encode(digest, sizeof(digest));
 	msn_object_set_sha1d(msnobj, base64);
@@ -163,10 +162,10 @@ msn_object_new_from_image(PurpleStoredIm
 
 	memset(digest, 0, sizeof(digest));
 
-	purple_cipher_context_reset(ctx, NULL);
-	purple_cipher_context_append(ctx, (const guchar *)buf, strlen(buf));
-	purple_cipher_context_digest(ctx, sizeof(digest), digest, NULL);
-	purple_cipher_context_destroy(ctx);
+	purple_cipher_reset(cipher);
+	purple_cipher_append(cipher, (const guchar *)buf, strlen(buf));
+	purple_cipher_digest(cipher, sizeof(digest), digest, NULL);
+	g_object_unref(G_OBJECT(cipher));
 	g_free(buf);
 
 	base64 = purple_base64_encode(digest, sizeof(digest));
============================================================
--- libpurple/protocols/msnp9/object.c	a65682762d9d661e9a56c4479ab3b15fb9dae55a
+++ libpurple/protocols/msnp9/object.c	20c73fc65625afb070afbee0ad880cfb75703e43
@@ -24,7 +24,7 @@
 #include "object.h"
 #include "debug.h"
 /* Sha1 stuff */
-#include "cipher.h"
+#include "sha1cipher.h"
 /* Base64 stuff */
 #include "util.h"
 
@@ -113,8 +113,7 @@ msn_object_new_from_image(PurpleStoredIm
 		const char *creator, MsnObjectType type)
 {
 	MsnObject *msnobj;
-
-	PurpleCipherContext *ctx;
+	PurpleCipher *cipher;
 	char *buf;
 	gconstpointer data;
 	size_t size;
@@ -141,9 +140,9 @@ msn_object_new_from_image(PurpleStoredIm
 	/* Compute the SHA1D field. */
 	memset(digest, 0, sizeof(digest));
 
-	ctx = purple_cipher_context_new_by_name("sha1", NULL);
-	purple_cipher_context_append(ctx, data, size);
-	purple_cipher_context_digest(ctx, sizeof(digest), digest, NULL);
+	cipher = purple_sha1_cipher_new();
+	purple_cipher_append(cipher, data, size);
+	purple_cipher_digest(cipher, sizeof(digest), digest, NULL);
 
 	base64 = purple_base64_encode(digest, sizeof(digest));
 	msn_object_set_sha1d(msnobj, base64);
@@ -163,10 +162,10 @@ msn_object_new_from_image(PurpleStoredIm
 
 	memset(digest, 0, sizeof(digest));
 
-	purple_cipher_context_reset(ctx, NULL);
-	purple_cipher_context_append(ctx, (const guchar *)buf, strlen(buf));
-	purple_cipher_context_digest(ctx, sizeof(digest), digest, NULL);
-	purple_cipher_context_destroy(ctx);
+	purple_cipher_reset(cipher);
+	purple_cipher_append(cipher, (const guchar *)buf, strlen(buf));
+	purple_cipher_digest(cipher, sizeof(digest), digest, NULL);
+	g_object_unref(G_OBJECT(cipher));
 	g_free(buf);
 
 	base64 = purple_base64_encode(digest, sizeof(digest));
============================================================
--- libpurple/protocols/oscar/family_auth.c	20d960c0db696dda74c3e32c1a1d2d63484ac708
+++ libpurple/protocols/oscar/family_auth.c	1f965d63af32ff4ae4c77223f56c246df946ea48
@@ -97,23 +97,21 @@ aim_encode_password_md5(const char *pass
 aim_encode_password_md5(const char *password, size_t password_len, const char *key, guint8 *digest)
 {
 	PurpleCipher *cipher;
-	PurpleCipherContext *context;
 	guchar passdigest[16];
 
-	cipher = purple_ciphers_find_cipher("md5");
+	cipher = purple_md5_cipher_new();
+	purple_cipher_append(cipher, (const guchar *)password, password_len);
+	purple_cipher_digest(cipher, 16, passdigest, NULL);
 
-	context = purple_cipher_context_new(cipher, NULL);
-	purple_cipher_context_append(context, (const guchar *)password, password_len);
-	purple_cipher_context_digest(context, 16, passdigest, NULL);
-	purple_cipher_context_destroy(context);
+	purple_cipher_reset(cipher);
 
-	context = purple_cipher_context_new(cipher, NULL);
-	purple_cipher_context_append(context, (const guchar *)key, strlen(key));
-	purple_cipher_context_append(context, passdigest, 16);
-	purple_cipher_context_append(context, (const guchar *)AIM_MD5_STRING, strlen(AIM_MD5_STRING));
-	purple_cipher_context_digest(context, 16, digest, NULL);
-	purple_cipher_context_destroy(context);
+	purple_cipher_append(cipher, (const guchar *)key, strlen(key));
+	purple_cipher_append(cipher, passdigest, 16);
+	purple_cipher_append(cipher, (const guchar *)AIM_MD5_STRING, strlen(AIM_MD5_STRING));
+	purple_cipher_digest(cipher, 16, digest, NULL);
 
+	g_object_unref(G_OBJECT(cipher));
+
 	return 0;
 }
 #endif
============================================================
--- libpurple/protocols/oscar/oscar.c	463859689931378a291893feb366670eaf6f7a2a
+++ libpurple/protocols/oscar/oscar.c	ea254eaf571534dfe4289b0fa00737db2432d227
@@ -3792,12 +3792,9 @@ static int purple_icqinfo(OscarData *od,
 	PurpleConnection *gc;
 	PurpleAccount *account;
 	PurpleBuddy *buddy;
-	PurplePresence *presence;
-	PurpleStatus *status;
 	struct buddyinfo *bi;
 	gchar who[16];
 	PurpleNotifyUserInfo *user_info;
-	GString *tmp;
 	gchar *utf8;
 	gchar *buf;
 	const gchar *alias;
============================================================
--- libpurple/protocols/simple/simple.c	581df8c3335ff7fdad91aed6e091e63399226822
+++ libpurple/protocols/simple/simple.c	6a1e71849171b3ac8f622ec3bd0115f36a037aea
@@ -398,7 +398,7 @@ static void fill_auth(struct simple_acco
 					 auth->realm ? auth->realm : "(null)"); 
 
 		if(auth->realm) {
-			auth->digest_session_key = purple_cipher_http_digest_calculate_session_key(
+			auth->digest_session_key = purple_http_digest_calculate_session_key(
 				"md5", authuser, auth->realm, sip->password, auth->nonce, NULL);
 
 			auth->nc = 1;
============================================================
--- libpurple/protocols/yahoo/yahoo.c	8807eed2d119bad315ad3d71aeac85bec9e5b7a7
+++ libpurple/protocols/yahoo/yahoo.c	84f20faed0e94014c547972f5438acdb65d72e8d
@@ -3482,10 +3482,11 @@ yahoo_get_inbox_token_cb(PurpleUtilFetch
 	PurpleConnection *gc = user_data;
 	gboolean set_cookie = FALSE;
 	gchar *url;
-	struct yahoo_data *yd = gc->proto_data;
+	struct yahoo_data *yd;
 
 	g_return_if_fail(PURPLE_CONNECTION_IS_VALID(gc));
-	
+
+	yd = purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 	yd->url_datas = g_slist_remove(yd->url_datas, url_data);
 
 	if (error_message != NULL)
============================================================
--- libpurple/protocols/yahoo/yahoo_aliases.c	af592b359e99f62c8ebd7b3e620ca95827b04b47
+++ libpurple/protocols/yahoo/yahoo_aliases.c	9c6eb565553fd3442315195387ccf651ac087ad0
@@ -116,7 +116,7 @@ yahoo_fetch_aliases_cb(PurpleUtilFetchUr
 
 				/*  Find the local buddy that matches */
 				f = yahoo_friend_find(cb->gc, yid);
-				b = purple_find_buddy(cb->gc->account, yid);
+				b = purple_find_buddy(purple_connection_get_account(cb->gc), yid);
 
 				/*  If we don't find a matching buddy, ignore the alias !!  */
 				if (f != NULL && b != NULL) {
@@ -154,12 +154,15 @@ yahoo_fetch_aliases(PurpleConnection *gc
 	const char *url;
 	gchar *request, *webpage, *webaddress;
 	PurpleUtilFetchUrlData *url_data;
+	PurpleAccount *account;
 
 	gboolean use_whole_url = FALSE;
 
+	account = purple_connection_get_account(gc);
+
 	/* use whole URL if using HTTP Proxy */
-	if ((gc->account->proxy_info)
-	    && (gc->account->proxy_info->type == PURPLE_PROXY_HTTP))
+	if ((account->proxy_info)
+	    && (account->proxy_info->type == PURPLE_PROXY_HTTP))
 		use_whole_url = TRUE;
 
 	/* Using callback_data so I have access to gc in the callback function */
@@ -268,15 +271,18 @@ yahoo_update_alias(PurpleConnection *gc,
 	PurpleUtilFetchUrlData *url_data;
 	gboolean use_whole_url = FALSE;
 	YahooFriend *f;
+	PurpleAccount *account;
 
-	/* use whole URL if using HTTP Proxy */
-	if ((gc->account->proxy_info)
-	    && (gc->account->proxy_info->type == PURPLE_PROXY_HTTP))
-		use_whole_url = TRUE;
-
 	g_return_if_fail(who != NULL);
 	g_return_if_fail(gc != NULL);
 
+	account = purple_connection_get_account(gc);
+
+	/* use whole URL if using HTTP Proxy */
+	if ((account->proxy_info)
+	    && (account->proxy_info->type == PURPLE_PROXY_HTTP))
+		use_whole_url = TRUE;
+
 	if (alias == NULL)
 		alias = "";
 
@@ -286,7 +292,7 @@ yahoo_update_alias(PurpleConnection *gc,
 		return;
 	}
 
-	yd = gc->proto_data;
+	yd = purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 
 	/* Using callback_data so I have access to gc in the callback function */
 	cb = g_new0(struct callback_data, 1);
@@ -307,7 +313,7 @@ yahoo_update_alias(PurpleConnection *gc,
 			gchar *converted_alias_jp = yahoo_convert_to_numeric(alias_jp);
 			content = g_strdup_printf("<ab k=\"%s\" cc=\"9\">\n"
 						  "<ct a=\"1\" yi='%s' nn='%s' />\n</ab>\r\n",
-						  purple_account_get_username(gc->account),
+						  purple_account_get_username(account),
 						  who, converted_alias_jp);
 			free(converted_alias_jp);
 			g_free(alias_jp);
@@ -315,7 +321,7 @@ yahoo_update_alias(PurpleConnection *gc,
 			gchar *escaped_alias = g_markup_escape_text(alias, -1);
 			content = g_strdup_printf("<?xml version=\"1.0\" encoding=\"utf-8\"?><ab k=\"%s\" cc=\"9\">\n"
 						  "<ct a=\"1\" yi='%s' nn='%s' />\n</ab>\r\n",
-						  purple_account_get_username(gc->account),
+						  purple_account_get_username(account),
 						  who, escaped_alias);
 			g_free(escaped_alias);
 		}
@@ -327,7 +333,7 @@ yahoo_update_alias(PurpleConnection *gc,
 			gchar *converted_alias_jp = yahoo_convert_to_numeric(alias_jp);
 			content = g_strdup_printf("<ab k=\"%s\" cc=\"1\">\n"
 						  "<ct e=\"1\"  yi='%s' id='%s' nn='%s' pr='0' />\n</ab>\r\n",
-						  purple_account_get_username(gc->account),
+						  purple_account_get_username(account),
 						  who, cb->id, converted_alias_jp);
 			free(converted_alias_jp);
 			g_free(alias_jp);
@@ -335,7 +341,7 @@ yahoo_update_alias(PurpleConnection *gc,
 			gchar *escaped_alias = g_markup_escape_text(alias, -1);
 			content = g_strdup_printf("<?xml version=\"1.0\" encoding=\"utf-8\"?><ab k=\"%s\" cc=\"1\">\n"
 						  "<ct e=\"1\"  yi='%s' id='%s' nn='%s' pr='0' />\n</ab>\r\n",
-						  purple_account_get_username(gc->account),
+						  purple_account_get_username(account),
 						  who, cb->id, escaped_alias);
 			g_free(escaped_alias);
 		}
============================================================
--- libpurple/protocols/yahoo/yahoo_picture.c	ecb607f6117f725b08ea39f64b0f38f30f772385
+++ libpurple/protocols/yahoo/yahoo_picture.c	4c754b42b01ec8ffbe6f07afbea258e7a8ec64dc
@@ -471,8 +471,8 @@ static void yahoo_buddy_icon_upload_conn
 		return;
 	}
 	/* use whole URL if using HTTP Proxy */
-	if ((gc->account->proxy_info)
-	    	&& (gc->account->proxy_info->type == PURPLE_PROXY_HTTP))
+	if ((account->proxy_info)
+	    	&& (account->proxy_info->type == PURPLE_PROXY_HTTP))
 		use_whole_url = TRUE;
 
 	pkt = yahoo_packet_new(YAHOO_SERVICE_PICTURE_UPLOAD, YAHOO_STATUS_AVAILABLE, yd->session_id);
============================================================
--- pidgin/gtkblist.c	9504688deec1376894094817655aac3a682f0e20
+++ pidgin/gtkblist.c	3a9175e3bf86cdd57868c7a313419177aa35e763
@@ -2182,9 +2182,7 @@ static void pidgin_blist_drag_data_get_c
 			return;
 		}
 
-		protocol =
-			PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->list_icon(buddy->account,
-														   buddy);
+		protocol = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc))->list_icon(buddy->account, buddy);
 
 		str = g_string_new(NULL);
 		g_string_printf(str,
@@ -2578,7 +2576,7 @@ static GdkPixbuf *pidgin_blist_get_buddy
 	}
 
 	if(account && purple_account_get_connection(account)) {
-		Purpleconnection *gc = purple_account_get_connection(account);
+		PurpleConnection *gc = purple_account_get_connection(account);
 		prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
 	}
 
@@ -7626,7 +7624,7 @@ pidgin_blist_update_accounts_menu(void)
 
 		account = accounts->data;
 
-		if(!purple_account_get_enabled(account, PIDGIN_UI)) {
+		if(!purple_account_get_enabled(account)) {
 			if (!disabled_accounts) {
 				menuitem = gtk_menu_item_new_with_label(_("Enable Account"));
 				gtk_menu_shell_append(GTK_MENU_SHELL(accountmenu), menuitem);
============================================================
--- pidgin/gtkconv.c	b5f9d3c23cd68867049ef1c69e43103fbd29f189
+++ pidgin/gtkconv.c	37b83877fa8e23c46912d39af55012df878c5a9d
@@ -2601,6 +2601,7 @@ redraw_icon(gpointer data)
 	PurpleConversation *conv = gtkconv->active_conv;
 	PurpleAccount *account;
 	PurplePluginProtocolInfo *prpl_info = NULL;
+	PurpleConnection *conn;
 
 	GdkPixbuf *buf;
 	GdkPixbuf *scale;
@@ -2610,9 +2611,10 @@ redraw_icon(gpointer data)
 
 	gtkconv = PIDGIN_CONVERSATION(conv);
 	account = purple_conversation_get_account(conv);
+	conn = account ? purple_account_get_connection(account) : NULL;
 
-	if(account && account->gc) {
-		prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(account->gc->prpl);
+	if(account && conn) {
+		prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(conn));
 	} else {
 		gtkconv->u.im->icon_timer = 0;
 		return FALSE;
@@ -4219,7 +4221,7 @@ static void topic_callback(GtkWidget *w,
 
 	gc      = purple_conversation_get_gc(conv);
 
-	if(!gc || !(prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)))
+	if(!gc || !(prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc))))
 		return;
 
 	if(prpl_info->set_chat_topic == NULL)
============================================================
--- pidgin/gtkimhtml.c	aec158a9b0786422a143edfdfe8b19d82774ce7e
+++ pidgin/gtkimhtml.c	01779ded890954e0c43993bef783d4872e09356d
@@ -5465,7 +5465,7 @@ void gtk_imhtml_setup_entry(GtkIMHtml *i
 	if (flags & PURPLE_CONNECTION_FLAGS_NO_IMAGES)
 		buttons &= ~GTK_IMHTML_IMAGE;
 
-	if (flags & PURPLE_CONNECTION_ALLOW_CUSTOM_SMILEY)
+	if (flags & PURPLE_CONNECTION_FLAGS_ALLOW_CUSTOM_SMILEY)
 		buttons |= GTK_IMHTML_CUSTOM_SMILEY;
 	else
 		buttons &= ~GTK_IMHTML_CUSTOM_SMILEY;


More information about the Commits mailing list