X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=ui%2Fncurses%2Fnc-menu.c;h=beb63f3bdd2f91b3bf7fc9d4a18161c872bb6958;hp=e28168edd4cf6d253e10e4c2f04fa3939fd25192;hb=4a2dbb71fdcf234302760d20333420a6e6566d56;hpb=f1599796efed1eb67759cf42f47fe4bf6a9bf93c diff --git a/ui/ncurses/nc-menu.c b/ui/ncurses/nc-menu.c index e28168e..beb63f3 100644 --- a/ui/ncurses/nc-menu.c +++ b/ui/ncurses/nc-menu.c @@ -205,6 +205,7 @@ static void pmenu_process_key(struct nc_scr *scr, int key) switch (key) { case 27: /* ESC */ + case 'x': if (menu->on_exit) menu->on_exit(menu); nc_flush_keys(); @@ -232,10 +233,9 @@ static void pmenu_process_key(struct nc_scr *scr, int key) if (item->on_edit) item->on_edit(item); break; - case 'o': - DBGS("on_open: %p\n", menu->on_open); - if (menu->on_open) - menu->on_open(menu); + case 'n': + if (menu->on_new) + menu->on_new(menu); break; case '\n': case '\r':