[gaim-migrate @ 12499]

Sat, 16 Apr 2005 16:53:05 +0000

author
Stu Tomlinson <nosnilmot@pidgin.im>
date
Sat, 16 Apr 2005 16:53:05 +0000
changeset 10831
fbe1ff83d5a9
parent 10830
4b06c2ab8afc
child 10832
7facd4303838

[gaim-migrate @ 12499]
Fix bug #1083465 - don't automatically add yourself to your buddy list with
the gevolution plugin, this is probably what caused complaint #59 that Ubuntu
interface designer had.

plugins/gevolution/gevolution.c file | annotate | diff | comparison | revisions
--- a/plugins/gevolution/gevolution.c	Sat Apr 16 16:28:44 2005 +0000
+++ b/plugins/gevolution/gevolution.c	Sat Apr 16 16:53:05 2005 +0000
@@ -25,6 +25,7 @@
 #include "debug.h"
 #include "prefs.h"
 #include "signals.h"
+#include "util.h"
 #include "version.h"
 
 #include "gtkblist.h"
@@ -75,6 +76,7 @@
 	{
 		GaimConnection *gc = (GaimConnection *)l->data;
 		GaimAccount *account = gaim_connection_get_account(gc);
+		char *me = g_strdup(gaim_normalize(account, gaim_account_get_username(account)));
 
 		if (strcmp(gaim_account_get_protocol_id(account), prpl_id))
 			continue;
@@ -84,11 +86,13 @@
 
 		for (l2 = ims; l2 != NULL; l2 = l2->next)
 		{
-			if (gaim_find_buddy(account, l2->data) != NULL)
+			if (gaim_find_buddy(account, l2->data) != NULL ||
+				!strcmp(me, gaim_normalize(account, l2->data)))
 				continue;
 
 			gevo_add_buddy(account, _("Buddies"), l2->data, name);
 		}
+		g_free(me);
 	}
 
 	g_list_foreach(ims, (GFunc)g_free, NULL);

mercurial