summaryrefslogtreecommitdiff
path: root/source4/lib/registry/tools
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-04-11 23:16:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:51:13 -0500
commit639afabf404d469638bc521b8a7f37e541ccf834 (patch)
tree1523a34bd54bb1d7ed48fbcb20554c572eb64433 /source4/lib/registry/tools
parentc60c5ebb910a77f6f3f345093794637714eb66e2 (diff)
downloadsamba-639afabf404d469638bc521b8a7f37e541ccf834.tar.gz
samba-639afabf404d469638bc521b8a7f37e541ccf834.tar.bz2
samba-639afabf404d469638bc521b8a7f37e541ccf834.zip
r168: - Cleanups in rpc backend
- Small fixess in nt4 and dir backends - Start on w95 file backend (This used to be commit aa739e8d3c7108f6f2089af2d8d522feacc7f698)
Diffstat (limited to 'source4/lib/registry/tools')
-rw-r--r--source4/lib/registry/tools/gregedit.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/source4/lib/registry/tools/gregedit.c b/source4/lib/registry/tools/gregedit.c
index 51fad4287d..4fbb1b2705 100644
--- a/source4/lib/registry/tools/gregedit.c
+++ b/source4/lib/registry/tools/gregedit.c
@@ -84,6 +84,7 @@ static void expand_key(GtkTreeView *treeview, GtkTreeIter *parent, GtkTreePath *
g_assert(k);
for(i = 0; W_ERROR_IS_OK(error = reg_key_get_subkey_by_index(k, i, &sub)); i++) {
+ int count;
/* Replace the blank child with the first directory entry
You may be tempted to remove the blank child node and then
append a new one. Don't. If you remove the blank child
@@ -103,14 +104,8 @@ static void expand_key(GtkTreeView *treeview, GtkTreeIter *parent, GtkTreePath *
sub,
-1);
- gtk_tree_store_append(store_keys, &tmpiter, &iter);
- }
-
- /* Remove placeholder child */
- if(i == 0) {
- gtk_tree_model_iter_children(GTK_TREE_MODEL(store_keys),
- &iter, parent);
- gtk_tree_store_remove(store_keys, &iter);
+ if(W_ERROR_IS_OK(reg_key_num_subkeys(sub, &count)) && count > 0)
+ gtk_tree_store_append(store_keys, &tmpiter, &iter);
}
if(!W_ERROR_EQUAL(error, WERR_NO_MORE_ITEMS)) gtk_show_werror(error);