]> git.ozlabs.org Git - petitboot/commit
ui/ncurses: Defer item creation until boot editor is done
authorJeremy Kerr <jk@ozlabs.org>
Thu, 10 Oct 2013 07:35:35 +0000 (15:35 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Thu, 10 Oct 2013 08:08:54 +0000 (16:08 +0800)
commit6d1eff1e8e1db12e7aa179e8dc9c65050c045536
tree18f70566adb3c146840f7964c8877b51a1cefde0
parent97c5d1f5d56d9ce890b4896ad7a9dc7ece7d4347
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>
ui/ncurses/generic-main.c
ui/ncurses/nc-boot-editor.c
ui/ncurses/nc-boot-editor.h
ui/ncurses/nc-cui.c
ui/ncurses/nc-cui.h
ui/ncurses/nc-menu.c
ui/ncurses/nc-menu.h
ui/ncurses/ps3-main.c