summaryrefslogtreecommitdiff
path: root/source4/lib/registry/tools
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-04-11 23:34:23 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:51:13 -0500
commit9d6a284567b832eee6fd47ac48c3471e69c0cc17 (patch)
treea66ba9bd82c79f53f4ee5ecf3536f883163591f3 /source4/lib/registry/tools
parent639afabf404d469638bc521b8a7f37e541ccf834 (diff)
downloadsamba-9d6a284567b832eee6fd47ac48c3471e69c0cc17.tar.gz
samba-9d6a284567b832eee6fd47ac48c3471e69c0cc17.tar.bz2
samba-9d6a284567b832eee6fd47ac48c3471e69c0cc17.zip
r169: Fix gregedit
(This used to be commit 32036375de58327a673a5a85cedb01e8ddfa503a)
Diffstat (limited to 'source4/lib/registry/tools')
-rw-r--r--source4/lib/registry/tools/gregedit.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source4/lib/registry/tools/gregedit.c b/source4/lib/registry/tools/gregedit.c
index 4fbb1b2705..0c9084ad3e 100644
--- a/source4/lib/registry/tools/gregedit.c
+++ b/source4/lib/registry/tools/gregedit.c
@@ -65,19 +65,20 @@ static void gtk_show_werror(WERROR err)
static void expand_key(GtkTreeView *treeview, GtkTreeIter *parent, GtkTreePath *arg2)
{
- GtkTreeIter iter, tmpiter;
+ GtkTreeIter firstiter, iter, tmpiter;
REG_KEY *k, *sub;
char *name;
GValue value;
WERROR error;
int i;
+ gtk_tree_model_iter_children(GTK_TREE_MODEL(store_keys), &firstiter, parent);
+
/* See if this row has ever had a name gtk_tree_store_set()'ed to it.
If not, read the directory contents */
- gtk_tree_model_get(GTK_TREE_MODEL(store_keys), parent,
- 0, &name, -1);
+ gtk_tree_model_get(GTK_TREE_MODEL(store_keys), &firstiter, 0, &name, -1);
- if(!name) return;
+ if(name) return;
gtk_tree_model_get(GTK_TREE_MODEL(store_keys), parent, 1, &k, -1);
@@ -91,8 +92,7 @@ static void expand_key(GtkTreeView *treeview, GtkTreeIter *parent, GtkTreePath *
node GTK gets confused and won't expand the parent row. */
if(i == 0) {
- gtk_tree_model_iter_children(GTK_TREE_MODEL(store_keys),
- &iter, parent);
+ iter = firstiter;
} else {
gtk_tree_store_append(store_keys, &iter, parent);
}