changeset 32233:1d09b9077181

Use purple_conv_chat_get_nick() rather than accessing chat->nick directly.
author andrew.victor@mxit.com
date Sat, 01 Oct 2011 11:02:15 +0000
parents 1714dc991a71
children 1877fd446f8d
files finch/gntsound.c finch/plugins/gntgf.c pidgin/gtkconv.c pidgin/gtksound.c
diffstat 4 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/finch/gntsound.c	Thu Sep 29 05:03:40 2011 +0000
+++ b/finch/gntsound.c	Sat Oct 01 11:02:15 2011 +0000
@@ -150,7 +150,7 @@
 		return ret;
 
 	account = purple_conversation_get_account(conv);
-	nick = g_strdup(purple_normalize(account, chat->nick));
+	nick = g_strdup(purple_normalize(account, purple_conv_chat_get_nick(chat)));
 	name = g_strdup(purple_normalize(account, aname));
 
 	if (g_utf8_collate(nick, name) == 0)
@@ -268,7 +268,7 @@
 	if (chat_nick_matches_name(conv, sender))
 		return;
 
-	if (flags & PURPLE_MESSAGE_NICK || purple_utf8_has_word(message, chat->nick))
+	if (flags & PURPLE_MESSAGE_NICK || purple_utf8_has_word(message, purple_conv_chat_get_nick(chat)))
 		play_conv_event(conv, PURPLE_SOUND_CHAT_NICK);
 	else
 		play_conv_event(conv, event);
--- a/finch/plugins/gntgf.c	Thu Sep 29 05:03:40 2011 +0000
+++ b/finch/plugins/gntgf.c	Sat Oct 01 11:02:15 2011 +0000
@@ -256,7 +256,7 @@
 	if (flags & PURPLE_MESSAGE_WHISPER)
 		return;
 
-	nick = PURPLE_CONV_CHAT(conv)->nick;
+	nick = purple_conv_chat_get_nick(PURPLE_CONV_CHAT(conv));
 
 	if (g_utf8_collate(sender, nick) == 0)
 		return;
--- a/pidgin/gtkconv.c	Thu Sep 29 05:03:40 2011 +0000
+++ b/pidgin/gtkconv.c	Sat Oct 01 11:02:15 2011 +0000
@@ -1657,7 +1657,7 @@
 	if (menu)
 		gtk_widget_destroy(menu);
 
-	if (!strcmp(chat->nick, purple_normalize(conv->account, who)))
+	if (!strcmp(purple_conv_chat_get_nick(chat), purple_normalize(conv->account, who)))
 		is_me = TRUE;
 
 	menu = gtk_menu_new();
@@ -4070,7 +4070,7 @@
 
 	stock = get_chat_buddy_status_icon(chat, name, flags);
 
-	if (!strcmp(chat->nick, purple_normalize(conv->account, old_name != NULL ? old_name : name)))
+	if (!strcmp(purple_conv_chat_get_nick(chat), purple_normalize(conv->account, old_name != NULL ? old_name : name)))
 		is_me = TRUE;
 
 	is_buddy = cb->buddy;
@@ -4474,7 +4474,7 @@
 			char *alias_key = NULL;
 			PurpleBuddy *buddy2;
 
-			if (strcmp(chat->nick, purple_normalize(conv->account, name))) {
+			if (strcmp(purple_conv_chat_get_nick(chat), purple_normalize(conv->account, name))) {
 				/* This user is not me, so look into updating the alias. */
 
 				if ((buddy2 = purple_find_buddy(conv->account, name)) != NULL) {
--- a/pidgin/gtksound.c	Thu Sep 29 05:03:40 2011 +0000
+++ b/pidgin/gtksound.c	Sat Oct 01 11:02:15 2011 +0000
@@ -96,7 +96,7 @@
 	if (chat==NULL)
 		return ret;
 
-	nick = g_strdup(purple_normalize(conv->account, chat->nick));
+	nick = g_strdup(purple_normalize(conv->account, purple_conv_chat_get_nick(chat)));
 	name = g_strdup(purple_normalize(conv->account, aname));
 
 	if (g_utf8_collate(nick, name) == 0)
@@ -212,7 +212,7 @@
 	if (chat_nick_matches_name(conv, sender))
 		return;
 
-	if (flags & PURPLE_MESSAGE_NICK || purple_utf8_has_word(message, chat->nick))
+	if (flags & PURPLE_MESSAGE_NICK || purple_utf8_has_word(message, purple_conv_chat_get_nick(chat)))
 		/* This isn't quite right; if you have the PURPLE_SOUND_CHAT_NICK event disabled
 		 * and the PURPLE_SOUND_CHAT_SAY event enabled, you won't get a sound at all */
 		play_conv_event(conv, PURPLE_SOUND_CHAT_NICK);