self->a_text_selected :
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)
+ {
+ text_a->texture[0].data.text.shortcut =
+ self->entry->data.normal.shortcut;
+ } else
+ text_a->texture[0].data.text.shortcut = 0;
break;
case OB_MENU_ENTRY_TYPE_SUBMENU:
text_a = (self == self->frame->selected ?
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;
+ } else
+ text_a->texture[0].data.text.shortcut = 0;
break;
case OB_MENU_ENTRY_TYPE_SEPARATOR:
if (self->entry->data.separator.label != NULL)
return FALSE;
}
-void menu_frame_select(ObMenuFrame *self, ObMenuEntryFrame *entry)
+void menu_frame_select(ObMenuFrame *self, ObMenuEntryFrame *entry,
+ gboolean immediate)
{
ObMenuEntryFrame *old = self->selected;
ObMenuFrame *oldchild = self->child;
menu_entry_frame_render(self->selected);
if (self->selected->entry->type == OB_MENU_ENTRY_TYPE_SUBMENU) {
- if (config_submenu_show_delay) {
+ if (config_submenu_show_delay && !immediate) {
/* initiate a new submenu open request */
ob_main_loop_timeout_add(ob_main_loop,
config_submenu_show_delay * 1000,
}
}
}
- menu_frame_select(self, it ? it->data : NULL);
+ menu_frame_select(self, it ? it->data : NULL, TRUE);
}
void menu_frame_select_next(ObMenuFrame *self)
}
}
}
- menu_frame_select(self, it ? it->data : NULL);
+ menu_frame_select(self, it ? it->data : NULL, TRUE);
}