escape textblock styles for file labels if label is a textblock

ticket #1527


SVN revision: 76792
This commit is contained in:
Mike Blumenkrantz 2012-09-18 09:28:26 +00:00
parent d18751ac7f
commit 34c247ee40
1 changed files with 14 additions and 7 deletions

View File

@ -4805,14 +4805,12 @@ _e_fm2_icon_label_set(E_Fm2_Icon *ic, Evas_Object *obj)
{ {
char buf[4096], *p; char buf[4096], *p;
int len; int len;
const char *lbl, *type;
if (ic->info.label) if (ic->info.label)
{ lbl = ic->info.label;
edje_object_part_text_set(obj, "e.text.label", ic->info.label); else if ((ic->sd->config->icon.extension.show) || ((!ic->info.link) && (S_ISDIR(ic->info.statinfo.st_mode))))
return; lbl = ic->info.file;
}
if ((ic->sd->config->icon.extension.show) || ((!ic->info.link) && (S_ISDIR(ic->info.statinfo.st_mode))))
edje_object_part_text_set(obj, "e.text.label", ic->info.file);
else else
{ {
/* remove extension. handle double extensions like .tar.gz too /* remove extension. handle double extensions like .tar.gz too
@ -4831,8 +4829,17 @@ _e_fm2_icon_label_set(E_Fm2_Icon *ic, Evas_Object *obj)
p = strrchr(buf, '.'); p = strrchr(buf, '.');
if ((p) && ((len - (p - buf)) < 6)) *p = 0; if ((p) && ((len - (p - buf)) < 6)) *p = 0;
} }
edje_object_part_text_set(obj, "e.text.label", buf); lbl = buf;
} }
type = evas_object_type_get(edje_object_part_object_get(obj, "e.text.label"));
if (!e_util_strcmp(type, "textblock"))
{
p = evas_textblock_text_utf8_to_markup(NULL, lbl);
edje_object_part_text_set(obj, "e.text.label", p);
free(p);
}
else
edje_object_part_text_set(obj, "e.text.label", lbl);
} }
static Evas_Object * static Evas_Object *