assume a valid utf8 char is at the shortcut position. the menu parser makes sure of this

This commit is contained in:
Dana Jansens 2007-04-26 03:18:48 +00:00
parent baa9ad1480
commit c4ba6e605a

View file

@ -252,7 +252,6 @@ void RrFontDraw(XftDraw *d, RrTextureText *t, RrRect *area)
if (t->shortcut) {
const gchar *c = t->string + t->shortcut_pos;
if (g_utf8_validate(c, -1, NULL)) {
t->font->shortcut_underline->start_index = t->shortcut_pos;
t->font->shortcut_underline->end_index = t->shortcut_pos +
(g_utf8_next_char(c) - c);
@ -265,7 +264,6 @@ void RrFontDraw(XftDraw *d, RrTextureText *t, RrRect *area)
pango_layout_set_attributes(t->font->layout, attrlist);
pango_attr_list_unref(attrlist);
}
}
/* layout_line() uses y to specify the baseline
The line doesn't need to be freed, it's a part of the layout */