diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-04-25 18:04:15 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-04-25 18:04:15 +0000 |
| commit | 0c41ab3c208970a68e9d0e0d0471c450542e23a3 (patch) | |
| tree | 0cd187a92d5d7a0e33ab62ff17613b6c66be0602 /openbox | |
| parent | a744deeee34dc46bbaea98f574426d7aeddbe549 (diff) | |
make rendering the shortcuts much faster
Diffstat (limited to 'openbox')
| -rw-r--r-- | openbox/menuframe.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/openbox/menuframe.c b/openbox/menuframe.c index d92f47df..9d635f95 100644 --- a/openbox/menuframe.c +++ b/openbox/menuframe.c @@ -319,12 +319,13 @@ static void menu_entry_frame_render(ObMenuEntryFrame *self) self->a_text_normal)); text_a->texture[0].data.text.string = self->entry->data.normal.label; if (self->frame->menu->show_all_shortcuts || - self->entry->data.normal.shortcut_position > 0) + self->entry->data.normal.shortcut > 0) { - text_a->texture[0].data.text.shortcut = - self->entry->data.normal.shortcut; + text_a->texture[0].data.text.shortcut = TRUE; + text_a->texture[0].data.text.shortcut_pos = + self->entry->data.normal.shortcut_position; } else - text_a->texture[0].data.text.shortcut = 0; + text_a->texture[0].data.text.shortcut = FALSE; break; case OB_MENU_ENTRY_TYPE_SUBMENU: text_a = (self == self->frame->selected ? @@ -332,11 +333,11 @@ static void menu_entry_frame_render(ObMenuEntryFrame *self) self->a_text_normal); sub = self->entry->data.submenu.submenu; text_a->texture[0].data.text.string = sub ? sub->title : ""; - if (self->frame->menu->show_all_shortcuts || - sub->shortcut_position > 0) { - text_a->texture[0].data.text.shortcut = sub->shortcut; + if (self->frame->menu->show_all_shortcuts || sub->shortcut > 0) { + text_a->texture[0].data.text.shortcut = TRUE; + text_a->texture[0].data.text.shortcut_pos = sub->shortcut_position; } else - text_a->texture[0].data.text.shortcut = 0; + text_a->texture[0].data.text.shortcut = FALSE; break; case OB_MENU_ENTRY_TYPE_SEPARATOR: if (self->entry->data.separator.label != NULL) |
