summaryrefslogtreecommitdiff
path: root/source4/lib/registry/tools/gregedit.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-04-12 11:02:38 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:51:15 -0500
commit24cd656ab0cd6501e321661883ae564c8d548298 (patch)
tree5e6a517d5170a06f1a802eb8c5820b1f1f3cbb46 /source4/lib/registry/tools/gregedit.c
parent9d6a284567b832eee6fd47ac48c3471e69c0cc17 (diff)
downloadsamba-24cd656ab0cd6501e321661883ae564c8d548298.tar.gz
samba-24cd656ab0cd6501e321661883ae564c8d548298.tar.bz2
samba-24cd656ab0cd6501e321661883ae564c8d548298.zip
r174: Win95 registry files (like USER.DAT) can now be partially parsed
(This used to be commit dd31d3bcbfbb0ef7a96a1b86c1b4c54b650e9fd5)
Diffstat (limited to 'source4/lib/registry/tools/gregedit.c')
-rw-r--r--source4/lib/registry/tools/gregedit.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/source4/lib/registry/tools/gregedit.c b/source4/lib/registry/tools/gregedit.c
index 0c9084ad3e..10e5f45468 100644
--- a/source4/lib/registry/tools/gregedit.c
+++ b/source4/lib/registry/tools/gregedit.c
@@ -220,7 +220,7 @@ GtkWidget* create_rpcwin (void)
return rpcwin;
}
-static void on_open_nt4_activate (GtkMenuItem *menuitem, gpointer user_data)
+static void on_open_file_activate (GtkMenuItem *menuitem, gpointer user_data)
{
gint result = gtk_dialog_run(GTK_DIALOG(create_openfilewin()));
char *filename;
@@ -228,7 +228,7 @@ static void on_open_nt4_activate (GtkMenuItem *menuitem, gpointer user_data)
switch(result) {
case GTK_RESPONSE_OK:
filename = strdup(gtk_file_selection_get_filename(GTK_FILE_SELECTION(openfilewin)));
- error = reg_open("nt4", filename, NULL, &registry);
+ error = reg_open(user_data, filename, NULL, &registry);
if(!W_ERROR_IS_OK(error)) {
gtk_show_werror(error);
break;
@@ -407,6 +407,7 @@ GtkWidget* create_mainwin (void)
GtkWidget *menu_file;
GtkWidget *menu_file_menu;
GtkWidget *open_nt4;
+ GtkWidget *open_w95;
GtkWidget *open_gconf;
GtkWidget *open_remote;
GtkWidget *separatormenuitem1;
@@ -455,6 +456,10 @@ GtkWidget* create_mainwin (void)
gtk_widget_show (open_nt4);
gtk_container_add (GTK_CONTAINER (menu_file_menu), open_nt4);
+ open_w95 = gtk_image_menu_item_new_with_mnemonic("_Open Win9x file");
+ gtk_widget_show (open_w95);
+ gtk_container_add (GTK_CONTAINER (menu_file_menu), open_w95);
+
open_gconf = gtk_image_menu_item_new_with_mnemonic ("_Open GConf");
gtk_widget_show (open_gconf);
gtk_container_add (GTK_CONTAINER (menu_file_menu), open_gconf);
@@ -595,8 +600,11 @@ GtkWidget* create_mainwin (void)
gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (statusbar), FALSE);
g_signal_connect ((gpointer) open_nt4, "activate",
- G_CALLBACK (on_open_nt4_activate),
- NULL);
+ G_CALLBACK (on_open_file_activate),
+ "nt4");
+ g_signal_connect ((gpointer) open_w95, "activate",
+ G_CALLBACK (on_open_file_activate),
+ "w95");
g_signal_connect ((gpointer) open_gconf, "activate",
G_CALLBACK (on_open_gconf_activate),
NULL);