From a2a5aa15bd38dd7d0ab43c9e4b464861977074a9 Mon Sep 17 00:00:00 2001 From: Peng Huang Date: Sun, 27 Sep 2009 13:33:49 +0800 Subject: [PATCH] Write empty string instead "(null) in xml. --- src/ibusenginedesc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ibusenginedesc.c b/src/ibusenginedesc.c index b96d8c01..d5b43261 100644 --- a/src/ibusenginedesc.c +++ b/src/ibusenginedesc.c @@ -254,13 +254,13 @@ ibus_engine_desc_output (IBusEngineDesc *desc, { g_string_append_indent (output, indent); g_string_append (output, "\n"); -#define OUTPUT_ENTRY(field, element) \ - { \ - gchar *escape_text = g_markup_escape_text (desc->field, -1); \ - g_string_append_indent (output, indent + 1); \ - g_string_append_printf (output, "<"element">%s\n", \ - escape_text); \ - g_free (escape_text); \ +#define OUTPUT_ENTRY(field, element) \ + { \ + gchar *escape_text = g_markup_escape_text (desc->field ? desc->field : "", -1); \ + g_string_append_indent (output, indent + 1); \ + g_string_append_printf (output, "<"element">%s\n", \ + escape_text); \ + g_free (escape_text); \ } #define OUTPUT_ENTRY_1(name) OUTPUT_ENTRY(name, #name) OUTPUT_ENTRY_1(name); -- 2.34.1