diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2014-03-12 14:34:13 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2014-04-08 16:00:38 +0800 |
commit | a83a614d94b09d063d56bf28be6f9dd0d0e22854 (patch) | |
tree | 221b9e1b48a12cf194f7f5fb0a5ca27a86039f0e /ui | |
parent | 28926a0e2f144b09ac9e0a4d019c7f649fd9d5c1 (diff) | |
download | petitboot-a83a614d94b09d063d56bf28be6f9dd0d0e22854.zip petitboot-a83a614d94b09d063d56bf28be6f9dd0d0e22854.tar.gz |
ui/ncurses: Remove pmenu_item_replace
... as nothing uses it.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/ncurses/nc-menu.c | 48 | ||||
-rw-r--r-- | ui/ncurses/nc-menu.h | 1 |
2 files changed, 0 insertions, 49 deletions
diff --git a/ui/ncurses/nc-menu.c b/ui/ncurses/nc-menu.c index 654c389..ef00ff2 100644 --- a/ui/ncurses/nc-menu.c +++ b/ui/ncurses/nc-menu.c @@ -130,54 +130,6 @@ static int pmenu_item_get_index(const struct pmenu_item *item) } /** - * pmenu_item_replace - Replace the menu item with a new one. - * - * Use this routine to change a menu item's text. - */ - -int pmenu_item_replace(struct pmenu_item *i, const char *name) -{ - struct pmenu *menu; - ITEM *nci; - int index; - - assert(name); - assert(i->nci); - - menu = i->pmenu; - index = pmenu_item_get_index(i); - - if (index < 0) { - assert(0 && "get_index failed"); - return -1; - } - - nci = new_item(name, NULL); - - if (!nci) { - assert(0 && "new_item failed"); - return -1; - } - - set_item_userptr(nci, i); - - nc_scr_unpost(&menu->scr); - set_menu_items(menu->ncm, NULL); - - // FIXME: need to assure item name is a talloc string. - /* talloc_free((char *)item_name(i->nci)); */ - - free_item(i->nci); - menu->items[index] = nci; - i->nci = nci; - - set_menu_items(menu->ncm, menu->items); - nc_scr_post(&menu->scr); - - return 0; -} - -/** * pmenu_move_cursor - Move the cursor. * @req: An ncurses request or char to send to menu_driver(). */ diff --git a/ui/ncurses/nc-menu.h b/ui/ncurses/nc-menu.h index 4c3a43f..63da2e5 100644 --- a/ui/ncurses/nc-menu.h +++ b/ui/ncurses/nc-menu.h @@ -56,7 +56,6 @@ struct pmenu_item { struct pmenu_item *pmenu_item_alloc(struct pmenu *menu); struct pmenu_item *pmenu_item_setup(struct pmenu *menu, struct pmenu_item *i, unsigned int index, const char *name); -int pmenu_item_replace(struct pmenu_item *i, const char *name); void pmenu_item_delete(struct pmenu_item *item); static inline struct pmenu_item *pmenu_item_from_arg(void *arg) |