E notification: Fixed notifications with newlines.

Use the new evas_textblock_text_utf8_to_markup.

SVN revision: 66198
This commit is contained in:
Tom Hacohen 2011-12-14 15:04:24 +00:00
parent 9225575511
commit 5e19ee65a3
1 changed files with 8 additions and 3 deletions

View File

@ -178,10 +178,10 @@ _notification_popup_merge(E_Notification *n)
len = strlen(body_old);
len += strlen(body_new);
len += 4; /* "<ps>" */
len += 3; /* \xE2\x80\xA9 - PS */
if (len < 65536) body_final = alloca(len + 1);
else body_final = malloc(len + 1);
snprintf(body_final, len + 1, "%s<ps>%s", body_old, body_new);
snprintf(body_final, len + 1, "%s\xE2\x80\xA9%s", body_old, body_new);
/* printf("set body %s\n", body_final); */
e_notification_body_set(n, body_final);
@ -579,6 +579,11 @@ _notification_format_message(Popup_Data *popup)
Evas_Object *o = popup->theme;
const char *title = e_notification_summary_get(popup->notif);
const char *b = e_notification_body_get(popup->notif);
edje_object_part_text_set(o, "notification.textblock.message", b);
edje_object_part_text_set(o, "notification.text.title", title);
{
char *tmp;
tmp = evas_textblock_text_utf8_to_markup(NULL, b);
edje_object_part_text_set(o, "notification.textblock.message", tmp);
if (tmp) free(tmp);
}
}