aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-user-creatable-items-handler.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/e-shell-user-creatable-items-handler.c')
-rw-r--r--shell/e-shell-user-creatable-items-handler.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/shell/e-shell-user-creatable-items-handler.c b/shell/e-shell-user-creatable-items-handler.c
index ebd5be0911..efc1b24f5f 100644
--- a/shell/e-shell-user-creatable-items-handler.c
+++ b/shell/e-shell-user-creatable-items-handler.c
@@ -307,9 +307,13 @@ append_xml_for_menu_item (GString *xml,
else if (item->shortcut != '\0')
g_string_append_printf (xml, " accel=\"*Control**Shift*%c\"", item->shortcut);
- if (item->icon != NULL)
- g_string_append_printf (xml, " pixtype=\"pixbuf\" pixname=\"%s\"",
- bonobo_ui_util_pixbuf_to_xml (item->icon));
+ if (item->icon != NULL) {
+ char *icon_xml;
+
+ icon_xml = bonobo_ui_util_pixbuf_to_xml (item->icon);
+ g_string_append_printf (xml, " pixtype=\"pixbuf\" pixname=\"%s\"", icon_xml);
+ g_free (icon_xml);
+ }
encoded_tooltip = bonobo_ui_util_encode_str (item->tooltip);
g_string_append_printf (xml, " tip=\"%s\"", encoded_tooltip);