summaryrefslogtreecommitdiff
path: root/source4/gtk/tools
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-12-29 12:28:35 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:07:42 -0500
commitf05bc12213477676967b5c1780c8cca61b262317 (patch)
treedd5859e3c9943661a7a7896c1a7821bbf41fe1e0 /source4/gtk/tools
parentd39ae5434185b6e54d029b1868ec610f0d638d6f (diff)
downloadsamba-f05bc12213477676967b5c1780c8cca61b262317.tar.gz
samba-f05bc12213477676967b5c1780c8cca61b262317.tar.bz2
samba-f05bc12213477676967b5c1780c8cca61b262317.zip
r4390: Registry value and key names are case-insensitive
Nicer menu layout in gregedit (This used to be commit 2948b9750d756880c3af7fb352f0a684a1fae9c9)
Diffstat (limited to 'source4/gtk/tools')
-rw-r--r--source4/gtk/tools/gregedit.c39
1 files changed, 30 insertions, 9 deletions
diff --git a/source4/gtk/tools/gregedit.c b/source4/gtk/tools/gregedit.c
index 9d6aed8b6a..33a3117e3d 100644
--- a/source4/gtk/tools/gregedit.c
+++ b/source4/gtk/tools/gregedit.c
@@ -379,6 +379,16 @@ static void on_open_gconf_activate (GtkMenuItem *menui
registry_load_hive(root);
}
+static void on_open_local_activate(GtkMenuItem *menuitem, gpointer user_data)
+{
+ WERROR error = reg_open_local(&registry);
+ if(!W_ERROR_IS_OK(error)) {
+ gtk_show_werror(mainwin, error);
+ return;
+ }
+ registry_load_root();
+}
+
static void on_open_remote_activate(GtkMenuItem *menuitem, gpointer user_data)
{
char *tmp;
@@ -661,6 +671,7 @@ static GtkWidget* create_mainwin (void)
GtkWidget *open_w95;
GtkWidget *open_gconf;
GtkWidget *open_remote;
+ GtkWidget *open_local;
GtkWidget *separatormenuitem1;
GtkWidget *quit;
GtkWidget *men_key;
@@ -694,6 +705,25 @@ static GtkWidget* create_mainwin (void)
menu_file_menu = gtk_menu_new ();
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_file), menu_file_menu);
+ open_local = gtk_menu_item_new_with_mnemonic ("Open _Local");
+ gtk_container_add (GTK_CONTAINER (menu_file_menu), open_local);
+ g_signal_connect ((gpointer) open_local, "activate",
+ G_CALLBACK (on_open_local_activate), NULL);
+
+ if(reg_has_backend("rpc")) {
+ open_remote = gtk_menu_item_new_with_mnemonic ("Open _Remote");
+ gtk_container_add (GTK_CONTAINER (menu_file_menu), open_remote);
+
+ g_signal_connect ((gpointer) open_remote, "activate",
+ G_CALLBACK (on_open_remote_activate),
+ NULL);
+ }
+
+ separatormenuitem1 = gtk_menu_item_new ();
+ gtk_container_add (GTK_CONTAINER (menu_file_menu), separatormenuitem1);
+ gtk_widget_set_sensitive (separatormenuitem1, FALSE);
+
+
if(reg_has_backend("nt4")) {
open_nt4 = gtk_image_menu_item_new_with_mnemonic("Open _NT4 file");
gtk_container_add (GTK_CONTAINER (menu_file_menu), open_nt4);
@@ -721,15 +751,6 @@ static GtkWidget* create_mainwin (void)
NULL);
}
- if(reg_has_backend("rpc")) {
- open_remote = gtk_menu_item_new_with_mnemonic ("Open _Remote");
- gtk_container_add (GTK_CONTAINER (menu_file_menu), open_remote);
-
- g_signal_connect ((gpointer) open_remote, "activate",
- G_CALLBACK (on_open_remote_activate),
- NULL);
- }
-
if(reg_has_backend("ldb")) {
open_ldb = gtk_image_menu_item_new_with_mnemonic("Open _LDB file");
gtk_container_add (GTK_CONTAINER (menu_file_menu), open_ldb);