diff options
author | C. Davis <cd.rattan@gmail.com> | 2012-08-08 14:16:41 -0700 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2013-04-29 13:06:09 +0200 |
commit | 360f31d52b30ef14e8a584f62ff61cc55c95ed53 (patch) | |
tree | 82eebf265e90acb28444936e0a91933435e37630 /source3 | |
parent | 3b6da775d30edcc44655d4eccca00dc71a1835bb (diff) | |
download | samba-360f31d52b30ef14e8a584f62ff61cc55c95ed53.tar.gz samba-360f31d52b30ef14e8a584f62ff61cc55c95ed53.tar.bz2 samba-360f31d52b30ef14e8a584f62ff61cc55c95ed53.zip |
regedit: Really delete value.
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/utils/regedit.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/source3/utils/regedit.c b/source3/utils/regedit.c index a18a79dcc2..fef5a9bd64 100644 --- a/source3/utils/regedit.c +++ b/source3/utils/regedit.c @@ -183,9 +183,16 @@ static void handle_value_input(struct regedit *regedit, int c) case 'n': case 'N': { int new_type; + int sel; - if (dialog_select_type(regedit, &new_type, regedit->main_window) == DIALOG_OK) { - mvwprintw(regedit->main_window, 1, 0, "Item: %s (%d)", str_regtype(new_type), new_type); + sel = dialog_select_type(regedit, &new_type, + regedit->main_window); + if (sel == DIALOG_OK) { + struct tree_node *node; + node = item_userptr(current_item(regedit->keys->menu)); + dialog_edit_value(regedit, node->key, new_type, NULL, + regedit->main_window); + value_list_load(regedit->vl, node->key); } break; } @@ -201,7 +208,15 @@ static void handle_value_input(struct regedit *regedit, int c) "Really delete value \"%s\"?", vitem->value_name); sel = dialog_modal_loop(dia); - mvwprintw(regedit->main_window, 1, 0, "Sel: %d", sel); + if (sel == DIALOG_OK) { + ITEM *it = current_item(regedit->keys->menu); + struct tree_node *node = item_userptr(it); + reg_del_value(regedit, node->key, + vitem->value_name); + value_list_load(regedit->vl, node->key); + } + + } break; } |