[PATCH] bug fix for crash.



This is my first mailing list post so bare with me I might get a few
things wrong.

The bug:
If you go to the Open Location menu item in nautilus and close the main
browser window behind it then clicking OK on the dialog to confirm to go
to a new location nautilus should crash.

The fix:
This patch is a two liner which basicly makes the dialog window
dependant on the main parent window. If the parent window is closed the
dialog is closed with it. 

The patch:

? locationbugfix.patch
? nautilus-location-dialog.c.org
Index: nautilus-location-dialog.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-location-dialog.c,v
retrieving revision 1.5
diff -p -u -r1.5 nautilus-location-dialog.c
--- nautilus-location-dialog.c	31 Mar 2004 20:03:18 -0000	1.5
+++ nautilus-location-dialog.c	5 Aug 2004 07:43:43 -0000
@@ -136,6 +136,7 @@ nautilus_location_dialog_init (NautilusL
 
 	gtk_window_set_title (GTK_WINDOW (dialog), _("Open Location"));
 	gtk_window_set_default_size (GTK_WINDOW (dialog), 300, -1);
+	gtk_window_set_destroy_with_parent(GTK_WINDOW (dialog),TRUE);
 	gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
 	gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
 	gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 2);
@@ -186,6 +187,7 @@ nautilus_location_dialog_new (NautilusWi
 	char *formatted_location;
 	
 	dialog = gtk_widget_new (NAUTILUS_TYPE_LOCATION_DIALOG, NULL);
+	gtk_window_set_transient_for(GTK_WINDOW (dialog),GTK_WINDOW(window));
 
 	if (window) {
 		gtk_window_set_screen (GTK_WINDOW (dialog),




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]