diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-07-06 02:02:01 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-09-14 20:08:34 +0800 |
commit | af704b849e6a28582ca6d75b0ee0ef3a867587cf (patch) | |
tree | d8db9243ed23680f0b78ef5b87ecee4df68eb4b8 /plugins/vcard-inline | |
parent | c72aba8f7c13cdc68b1f3dbc1d381be45e0c4cb8 (diff) | |
download | gsoc2013-evolution-af704b849e6a28582ca6d75b0ee0ef3a867587cf.tar gsoc2013-evolution-af704b849e6a28582ca6d75b0ee0ef3a867587cf.tar.gz gsoc2013-evolution-af704b849e6a28582ca6d75b0ee0ef3a867587cf.tar.bz2 gsoc2013-evolution-af704b849e6a28582ca6d75b0ee0ef3a867587cf.tar.lz gsoc2013-evolution-af704b849e6a28582ca6d75b0ee0ef3a867587cf.tar.xz gsoc2013-evolution-af704b849e6a28582ca6d75b0ee0ef3a867587cf.tar.zst gsoc2013-evolution-af704b849e6a28582ca6d75b0ee0ef3a867587cf.zip |
Avoid camel_stream_printf().
camel_stream_printf() is next on the chopping block.
Use g_strdup_printf() or a GString to construct a formatted string in
memory, pass it to camel_stream_write() in one go, and then check for
errors (unless it's a memory stream).
Diffstat (limited to 'plugins/vcard-inline')
-rw-r--r-- | plugins/vcard-inline/vcard-inline.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/vcard-inline/vcard-inline.c b/plugins/vcard-inline/vcard-inline.c index 7e56da440b..78818f328b 100644 --- a/plugins/vcard-inline/vcard-inline.c +++ b/plugins/vcard-inline/vcard-inline.c @@ -313,6 +313,7 @@ org_gnome_vcard_inline_format (gpointer ep, EMFormatHookTarget *target) { VCardInlinePObject *vcard_object; gchar *classid; + gchar *content; classid = g_strdup_printf ( "org-gnome-vcard-inline-display-%d", @@ -332,8 +333,9 @@ org_gnome_vcard_inline_format (gpointer ep, EMFormatHookTarget *target) e_book_client_get_sources (&vcard_object->source_list, NULL); - camel_stream_printf ( - target->stream, "<object classid=%s></object>", classid); + content = g_strdup_printf ("<object classid=%s></object>", classid); + camel_stream_write_string (target->stream, content, NULL, NULL); + g_free (content); g_free (classid); } |