summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorC. Davis <cd.rattan@gmail.com>2012-08-11 23:29:13 -0700
committerMichael Adam <obnox@samba.org>2013-04-29 13:06:26 +0200
commit77edcd4dbfee304ed39da134da0752d693250f98 (patch)
tree34b116ad4aaed7b5ddd9bb4df7cc14fdc5ab9985 /source3/utils
parentdc119eb9b2881c0f3cf92a0c77fe71411a6a1a13 (diff)
downloadsamba-77edcd4dbfee304ed39da134da0752d693250f98.tar.gz
samba-77edcd4dbfee304ed39da134da0752d693250f98.tar.bz2
samba-77edcd4dbfee304ed39da134da0752d693250f98.zip
regedit: Prefer copywin() over prefresh() for displaying path.
copywin() works better with panels, dialogs, etc. Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/regedit.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/utils/regedit.c b/source3/utils/regedit.c
index efea07b89c..3e96656ff7 100644
--- a/source3/utils/regedit.c
+++ b/source3/utils/regedit.c
@@ -67,13 +67,14 @@ static void show_path(struct regedit *regedit)
mvprintw(PATH_START_Y, start_win, "...");
start_win += 3;
}
- prefresh(regedit->path_label, 0, start_pad, PATH_START_Y, start_win,
- PATH_START_Y, PATH_MAX_Y);
+ copywin(regedit->path_label, regedit->main_window, 0, start_pad,
+ PATH_START_Y, start_win, PATH_START_Y, PATH_MAX_Y, false);
}
static void print_path(struct regedit *regedit, struct tree_node *node)
{
regedit->path_len = tree_node_print_path(regedit->path_label, node);
+ show_path(regedit);
}
/* load all available hives */
@@ -375,6 +376,7 @@ int regedit_getch(void)
value_list_resize(regedit_main->vl, VAL_HEIGHT, VAL_WIDTH,
VAL_START_Y, VAL_START_X);
print_heading(regedit_main);
+ show_path(regedit_main);
}
return c;
@@ -402,6 +404,7 @@ static void display_window(TALLOC_CTX *mem_ctx, struct registry_context *ctx)
regedit->path_label = newpad(1, PATH_WIDTH_MAX);
SMB_ASSERT(regedit->path_label);
wprintw(regedit->path_label, "/");
+ show_path(regedit_main);
root = load_hives(regedit, ctx);
SMB_ASSERT(root != NULL);
@@ -422,7 +425,6 @@ static void display_window(TALLOC_CTX *mem_ctx, struct registry_context *ctx)
update_panels();
doupdate();
- show_path(regedit_main);
while (1) {
c = regedit_getch();
if (c == 'q' || c == 'Q') {
@@ -431,7 +433,6 @@ static void display_window(TALLOC_CTX *mem_ctx, struct registry_context *ctx)
handle_main_input(regedit, c);
update_panels();
doupdate();
- show_path(regedit_main);
}
endwin();