summaryrefslogtreecommitdiffstats
path: root/ui/ncurses/nc-cui.h
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2013-10-10 15:35:35 +0800
committerJeremy Kerr <jk@ozlabs.org>2013-10-10 16:08:54 +0800
commit6d1eff1e8e1db12e7aa179e8dc9c65050c045536 (patch)
tree18f70566adb3c146840f7964c8877b51a1cefde0 /ui/ncurses/nc-cui.h
parent97c5d1f5d56d9ce890b4896ad7a9dc7ece7d4347 (diff)
downloadtalos-petitboot-6d1eff1e8e1db12e7aa179e8dc9c65050c045536.tar.gz
talos-petitboot-6d1eff1e8e1db12e7aa179e8dc9c65050c045536.zip
ui/ncurses: Defer item creation until boot editor is done
Currently, when creating new menu entries, we create an empty item, add it to the menu, then run the boot editor. This means that cancelling the edit will leave an empty item in the menu. This change defers the creation until the boot editor is done. To do this, we modify the on_open callback to take a menu rather than an item, and pass NULL boot data to the editor. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'ui/ncurses/nc-cui.h')
-rw-r--r--ui/ncurses/nc-cui.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/ncurses/nc-cui.h b/ui/ncurses/nc-cui.h
index 5298cad..730e721 100644
--- a/ui/ncurses/nc-cui.h
+++ b/ui/ncurses/nc-cui.h
@@ -67,7 +67,8 @@ struct cui *cui_init(void* platform_info,
int start_deamon);
struct nc_scr *cui_set_current(struct cui *cui, struct nc_scr *scr);
int cui_run(struct cui *cui, struct pmenu *main, unsigned int default_item);
-int cui_boot_editor_run(struct pmenu_item *item);
+void cui_item_edit(struct pmenu_item *item);
+void cui_item_new(struct pmenu *menu);
/* convenience routines */
OpenPOWER on IntegriCloud