diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2013-10-10 15:35:35 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2013-10-10 16:08:54 +0800 |
commit | 6d1eff1e8e1db12e7aa179e8dc9c65050c045536 (patch) | |
tree | 18f70566adb3c146840f7964c8877b51a1cefde0 /ui/ncurses/ps3-main.c | |
parent | 97c5d1f5d56d9ce890b4896ad7a9dc7ece7d4347 (diff) | |
download | talos-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/ps3-main.c')
-rw-r--r-- | ui/ncurses/ps3-main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/ncurses/ps3-main.c b/ui/ncurses/ps3-main.c index 5be8c32..9efba3b 100644 --- a/ui/ncurses/ps3-main.c +++ b/ui/ncurses/ps3-main.c @@ -412,7 +412,7 @@ static struct pmenu *ps3_mm_init(struct ps3_cui *ps3_cui) } m->hot_key = ps3_hot_key; - m->on_open = cui_on_open; + m->on_new = cui_item_new; #if defined(DEBUG) m->scr.frame.title = talloc_strdup(m, |