changeset 28128:d7cfffdd35e6

merge of '0a6d9985bcc4d77bf880200a8594a3ec52b00777' and 'd05a71308f2d09a24eae2b38940b5ab221f70448'
author Paul Aurich <paul@darkrain42.org>
date Sat, 29 Aug 2009 02:36:57 +0000
parents e47d4bddf974 (current diff) 1662dbdac18c (diff)
children 22c65c1090a8
files
diffstat 4 files changed, 44 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog.API	Fri Aug 28 23:27:10 2009 +0000
+++ b/ChangeLog.API	Sat Aug 29 02:36:57 2009 +0000
@@ -1,5 +1,14 @@
 Pidgin and Finch: The Pimpin' Penguin IM Clients That're Good for the Soul
 
+version 2.6.2 (09/??/2009):
+	Perl:
+		Added:
+		* Purple::XMLNode::get_next(), which returns the next neighbor tag of
+		  the current node.
+		Changed:
+		* Purple::XMLNode::get_child() will return the first child node if
+		  passed "" or undef as the name of the node.
+
 version 2.6.1 (08/18/2009):
 	No changes
 
--- a/libpurple/account.c	Fri Aug 28 23:27:10 2009 +0000
+++ b/libpurple/account.c	Sat Aug 29 02:36:57 2009 +0000
@@ -2290,9 +2290,13 @@
 purple_account_add_buddy(PurpleAccount *account, PurpleBuddy *buddy)
 {
 	PurplePluginProtocolInfo *prpl_info = NULL;
-	PurpleConnection *gc = purple_account_get_connection(account);
+	PurpleConnection *gc;
 	PurplePlugin *prpl = NULL;
 
+	g_return_if_fail(account != NULL);
+	g_return_if_fail(buddy != NULL);
+
+	gc = purple_account_get_connection(account);
 	if (gc != NULL)
 	        prpl = purple_connection_get_prpl(gc);
 
--- a/libpurple/plugins/perl/common/XMLNode.xs	Fri Aug 28 23:27:10 2009 +0000
+++ b/libpurple/plugins/perl/common/XMLNode.xs	Sat Aug 29 02:36:57 2009 +0000
@@ -32,6 +32,18 @@
 xmlnode_get_child(parent, name)
 	Purple::XMLNode parent
 	const char *name
+PREINIT:
+	xmlnode *tmp;
+CODE:
+	if (!name || *name == '\0') {
+		tmp = parent->child;
+		while (tmp && tmp->type != XMLNODE_TYPE_TAG)
+			tmp = tmp->next;
+		RETVAL = tmp;
+	} else
+		RETVAL = xmlnode_get_child(parent, name);
+OUTPUT:
+	RETVAL
 
 Purple::XMLNode
 xmlnode_get_child_with_namespace(parent, name, xmlns)
@@ -44,6 +56,19 @@
 	Purple::XMLNode node
 
 Purple::XMLNode
+xmlnode_get_next(node)
+	Purple::XMLNode node
+PREINIT:
+	xmlnode *tmp;
+CODE:
+	tmp = node->next;
+	while (tmp && tmp->type != XMLNODE_TYPE_TAG)
+		tmp = tmp->next;
+	RETVAL = tmp;
+OUTPUT:
+	RETVAL
+
+Purple::XMLNode
 xmlnode_get_next_twin(node)
 	Purple::XMLNode node
 
--- a/pidgin/plugins/gevolution/gevo-util.c	Fri Aug 28 23:27:10 2009 +0000
+++ b/pidgin/plugins/gevolution/gevo-util.c	Sat Aug 29 02:36:57 2009 +0000
@@ -35,14 +35,16 @@
 
 	conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, buddy_name, account);
 
-	if ((group = purple_find_group(group_name)) == NULL)
+	group = purple_find_group(group_name);
+	if (group == NULL)
 	{
 		group = purple_group_new(group_name);
 		purple_blist_add_group(group, NULL);
 	}
 
-	if ((buddy = purple_find_buddy_in_group(account, buddy_name, group)))
-	{	
+	buddy = purple_find_buddy_in_group(account, buddy_name, group);
+	if (buddy == NULL)
+	{
 		buddy = purple_buddy_new(account, buddy_name, alias);
 		purple_blist_add_buddy(buddy, NULL, group, NULL);
 	}