summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorC. Davis <cd.rattan@gmail.com>2012-08-12 22:38:06 -0700
committerMichael Adam <obnox@samba.org>2013-04-29 13:06:27 +0200
commite9645db344d4a8fcdca0eb447b273fff539d85df (patch)
tree832dcfe4ae6b176827c9d81ad32d696d91502be4 /source3/utils
parent77edcd4dbfee304ed39da134da0752d693250f98 (diff)
downloadsamba-e9645db344d4a8fcdca0eb447b273fff539d85df.tar.gz
samba-e9645db344d4a8fcdca0eb447b273fff539d85df.tar.bz2
samba-e9645db344d4a8fcdca0eb447b273fff539d85df.zip
regedit: Add help msgs for key and value sections at bottom of screen.
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.c35
1 files changed, 33 insertions, 2 deletions
diff --git a/source3/utils/regedit.c b/source3/utils/regedit.c
index 3e96656ff7..5ca1edffe7 100644
--- a/source3/utils/regedit.c
+++ b/source3/utils/regedit.c
@@ -38,8 +38,9 @@
#define VAL_WIDTH (COLS - KEY_WIDTH)
#define VAL_HEIGHT (LINES - VAL_START_Y - 1)
#define HEADING_START_Y (KEY_START_Y - 1)
-#define INFO_START_Y (LINES - 1)
-#define INFO_WIDTH (LINES)
+#define HELP_START_Y (LINES - 1)
+#define HELP_START_X 0
+#define HELP_WIDTH (LINES)
#define PATH_START_Y 0
#define PATH_START_X 6
#define PATH_MAX_Y (COLS - 1)
@@ -124,6 +125,34 @@ static struct tree_node *load_hives(TALLOC_CTX *mem_ctx,
return root;
}
+static void print_help(struct regedit *regedit)
+{
+ const char *khelp = "[n] New Key [s] New Subkey [d] Del Key "
+ "[LEFT] Ascend [RIGHT] Descend";
+ const char *vhelp = "[n] New Value [d] Del Value [ENTER] Edit";
+ const char *msg = "KEYS";
+ const char *help = khelp;
+ int i, pad;
+
+ if (!regedit->tree_input) {
+ msg = "VALUES";
+ help = vhelp;
+ }
+
+ move(HELP_START_Y, HELP_START_X);
+ clrtoeol();
+ attron(A_REVERSE | A_BOLD);
+ move(HELP_START_Y, HELP_START_X);
+ addstr(msg);
+ attroff(A_BOLD);
+ pad = COLS - strlen(msg) - strlen(help);
+ for (i = 0; i < pad; ++i) {
+ addch(' ');
+ }
+ addstr(help);
+ attroff(A_REVERSE);
+}
+
static void print_heading(struct regedit *regedit)
{
move(HEADING_START_Y, 0);
@@ -144,6 +173,8 @@ static void print_heading(struct regedit *regedit)
}
mvprintw(HEADING_START_Y, VAL_START_X, "Value");
attroff(A_REVERSE);
+
+ print_help(regedit);
}
static void add_reg_key(struct regedit *regedit, struct tree_node *node,