[PATCH] close windows on unmount



Hey,

Currently, there is some code in nautilus that is supposed to close any
open windows under a volume when it is unmounted.  It connects to the
wrong signal, however, so it doesn't work.  Here's a patch.

Thanks,
James
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/nautilus/ChangeLog,v
retrieving revision 1.6128
diff -u -r1.6128 ChangeLog
--- ChangeLog	4 Mar 2004 20:29:56 -0000	1.6128
+++ ChangeLog	5 Mar 2004 03:45:22 -0000
@@ -1,3 +1,11 @@
+2004-03-04  James Willcox  <jwillcox gnome org>
+
+	* src/nautilus-application.c: (nautilus_application_instance_init),
+	(volume_unmounted_callback):
+
+	Connect to the correct signal (volume_pre_unmount) so we can close
+	windows and stuff.
+
 2004-03-04  Dave Camp  <dave ximian com>
 
 	* libnautilus-extension/nautilus-file-info.c:
Index: src/nautilus-application.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-application.c,v
retrieving revision 1.217
diff -u -r1.217 nautilus-application.c
--- src/nautilus-application.c	11 Feb 2004 12:39:01 -0000	1.217
+++ src/nautilus-application.c	5 Mar 2004 03:45:22 -0000
@@ -179,7 +179,7 @@
 	 * used anymore */
 
 	/* Watch for volume unmounts so we can close open windows */
-	g_signal_connect_object (gnome_vfs_get_volume_monitor (), "volume_unmounted",
+	g_signal_connect_object (gnome_vfs_get_volume_monitor (), "volume_pre_unmount",
 				 G_CALLBACK (volume_unmounted_callback), application, 0);
 	g_signal_connect_object (gnome_vfs_get_volume_monitor (), "volume_mounted",
 				 G_CALLBACK (volume_mounted_callback), application, 0);


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