From 24cd656ab0cd6501e321661883ae564c8d548298 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 12 Apr 2004 11:02:38 +0000 Subject: r174: Win95 registry files (like USER.DAT) can now be partially parsed (This used to be commit dd31d3bcbfbb0ef7a96a1b86c1b4c54b650e9fd5) --- source4/lib/registry/tools/gregedit.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'source4/lib/registry/tools/gregedit.c') 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, ®istry); + error = reg_open(user_data, filename, NULL, ®istry); 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); -- cgit