1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-02 09:47:23 +03:00

regedit: Print the registry path.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
C. Davis 2012-07-13 17:16:51 -07:00 committed by Michael Adam
parent 632cefa1da
commit f751b36979

View File

@ -77,7 +77,7 @@ static struct tree_node *load_hives(TALLOC_CTX *mem_ctx,
static void display_test_window(TALLOC_CTX *mem_ctx,
struct registry_context *ctx)
{
WINDOW *tree_window;
WINDOW *tree_window, *path_label;
struct tree_view *view;
struct tree_node *root, *node;
int c;
@ -93,6 +93,10 @@ static void display_test_window(TALLOC_CTX *mem_ctx,
keypad(tree_window, TRUE);
mvwprintw(tree_window, 0, 0, "Path: ");
path_label = derwin(tree_window, 1, 45, 0, 6);
wprintw(path_label, "/");
root = load_hives(mem_ctx, ctx);
SMB_ASSERT(root != NULL);
@ -114,12 +118,14 @@ static void display_test_window(TALLOC_CTX *mem_ctx,
node = item_userptr(current_item(view->menu));
if (node && tree_node_has_children(node)) {
tree_node_load_children(node);
tree_node_print_path(path_label, node->child_head);
tree_view_update(view, node->child_head);
}
break;
case KEY_LEFT:
node = item_userptr(current_item(view->menu));
if (node && node->parent) {
tree_node_print_path(path_label, node->child_head);
tree_view_update(view,
tree_node_first(node->parent));
}