summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorC. Davis <cd.rattan@gmail.com>2012-08-19 18:29:06 -0700
committerMichael Adam <obnox@samba.org>2013-04-29 13:06:38 +0200
commitad15a83357dccc9a41ade1642cca24a0b7de92df (patch)
tree4fe4161c7ff406b452e8e1355a86c37dda6ae17b /source3
parent1208167c77a58154c612dc2bd1655bd70ae994e8 (diff)
downloadsamba-ad15a83357dccc9a41ade1642cca24a0b7de92df.tar.gz
samba-ad15a83357dccc9a41ade1642cca24a0b7de92df.tar.bz2
samba-ad15a83357dccc9a41ade1642cca24a0b7de92df.zip
regedit: Load values on startup.
Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/regedit.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/source3/utils/regedit.c b/source3/utils/regedit.c
index 2b8d06b03f..f4139d65b2 100644
--- a/source3/utils/regedit.c
+++ b/source3/utils/regedit.c
@@ -185,6 +185,14 @@ static void print_heading(struct regedit *regedit)
print_help(regedit);
}
+static void load_values(struct regedit *regedit)
+{
+ struct tree_node *node;
+
+ node = item_userptr(current_item(regedit->keys->menu));
+ value_list_load(regedit->vl, node->key);
+}
+
static void add_reg_key(struct regedit *regedit, struct tree_node *node,
bool subkey)
{
@@ -246,13 +254,11 @@ static void handle_tree_input(struct regedit *regedit, int c)
switch (c) {
case KEY_DOWN:
menu_driver(regedit->keys->menu, REQ_DOWN_ITEM);
- node = item_userptr(current_item(regedit->keys->menu));
- value_list_load(regedit->vl, node->key);
+ load_values(regedit);
break;
case KEY_UP:
menu_driver(regedit->keys->menu, REQ_UP_ITEM);
- node = item_userptr(current_item(regedit->keys->menu));
- value_list_load(regedit->vl, node->key);
+ load_values(regedit);
break;
case '\n':
case KEY_ENTER:
@@ -460,6 +466,8 @@ static void display_window(TALLOC_CTX *mem_ctx, struct registry_context *ctx)
print_heading(regedit);
tree_view_show(regedit->keys);
+ menu_driver(regedit->keys->menu, REQ_FIRST_ITEM);
+ load_values(regedit);
value_list_show(regedit->vl);
update_panels();