diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2004-05-22 18:49:25 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:53:53 -0500 |
commit | bf52e242f53aeaac33eea69fbdfb3477634b90fb (patch) | |
tree | 76b04dc95e3e7befd45180a661cd7f55d085701e /source4/lib/registry/tools/gregedit.c | |
parent | 4e9d01c2a7cd044ac4b466a1039c9a7e3978d6ef (diff) | |
download | samba-bf52e242f53aeaac33eea69fbdfb3477634b90fb.tar.gz samba-bf52e242f53aeaac33eea69fbdfb3477634b90fb.tar.bz2 samba-bf52e242f53aeaac33eea69fbdfb3477634b90fb.zip |
r825: - Introduce support for multiple roots (or 'hives')
- Clean up rpc backend (possible now that multiple hives are supported)
(This used to be commit 8cd1b6bc70510fe576135a66351e9e3ea895c9ff)
Diffstat (limited to 'source4/lib/registry/tools/gregedit.c')
-rw-r--r-- | source4/lib/registry/tools/gregedit.c | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/source4/lib/registry/tools/gregedit.c b/source4/lib/registry/tools/gregedit.c index 7b06b2266f..e8800c6ee9 100644 --- a/source4/lib/registry/tools/gregedit.c +++ b/source4/lib/registry/tools/gregedit.c @@ -1,6 +1,6 @@ /* Unix SMB/CIFS implementation. - Gtk registry frontend + GTK+ registry frontend Copyright (C) Jelmer Vernooij 2004 @@ -115,20 +115,25 @@ static void registry_load_root() { REG_KEY *root; GtkTreeIter iter, tmpiter; - WERROR error; + WERROR error = WERR_OK; + int i = 0; if(!registry) return; - error = reg_get_root(registry, &root); - if(!W_ERROR_IS_OK(error)) { - gtk_show_werror(error); - return; - } - gtk_tree_store_clear(store_keys); - /* Add the root */ - gtk_tree_store_append(store_keys, &iter, NULL); - gtk_tree_store_set (store_keys, + while(1) { + error = reg_get_hive(registry, i, &root); + if(W_ERROR_EQUAL(error, WERR_NO_MORE_ITEMS)) { + return; + } + if(!W_ERROR_IS_OK(error)) { + gtk_show_werror(error); + return; + } + + /* Add the root */ + gtk_tree_store_append(store_keys, &iter, NULL); + gtk_tree_store_set (store_keys, &iter, 0, reg_key_name(root), @@ -136,7 +141,9 @@ static void registry_load_root() root, -1); - gtk_tree_store_append(store_keys, &tmpiter, &iter); + gtk_tree_store_append(store_keys, &tmpiter, &iter); + i++; + } gtk_widget_set_sensitive( save, True ); gtk_widget_set_sensitive( save_as, True ); |