telepathy-gabble: vcard-manager: add children more neatly
Will Thompson
wjt at kemper.freedesktop.org
Thu Dec 6 09:37:23 PST 2012
Module: telepathy-gabble
Branch: master
Commit: 202014297342e5ba2361879734c6784f71b2cd54
URL: http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=202014297342e5ba2361879734c6784f71b2cd54
Author: Will Thompson <will.thompson at collabora.co.uk>
Date: Mon Nov 26 13:51:54 2012 +0000
vcard-manager: add children more neatly
---
src/vcard-manager.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/vcard-manager.c b/src/vcard-manager.c
index b19161c..a75969b 100644
--- a/src/vcard-manager.c
+++ b/src/vcard-manager.c
@@ -1168,9 +1168,8 @@ gabble_vcard_manager_edit_info_apply (GabbleVCardManagerEditInfo *info,
if (info->edit_type == GABBLE_VCARD_EDIT_CLEAR)
{
/* start from a clean slate... */
- vcard_node = wocky_node_add_child_with_content (
- wocky_stanza_get_top_node (msg), "vCard", "");
- vcard_node->ns = g_quark_from_string ("vcard-temp");
+ vcard_node = wocky_node_add_child_ns (
+ wocky_stanza_get_top_node (msg), "vCard", NS_VCARD_TEMP);
/* ... but as a special case, the photo gets copied in from the old
* vCard, because SetContactInfo doesn't touch photos */
@@ -1448,10 +1447,9 @@ pipeline_reply_cb (GabbleConnection *conn,
DEBUG ("successful lookup response contained no <vCard> node, "
"creating an empty one");
- vcard_node = wocky_node_add_child_with_content (
+ vcard_node = wocky_node_add_child_ns (
wocky_stanza_get_top_node (reply_msg), "vCard",
- NULL);
- vcard_node->ns = g_quark_from_string (NS_VCARD_TEMP);
+ NS_VCARD_TEMP);
}
/* Put the message in the cache */
More information about the telepathy-commits
mailing list