Re: [Nautilus-list] Patch to add a 'monitor cdrom mounts' preference option



A bit late on replying to this, but I just thought I'd add that as a
Nautilus Debian user who compiles from CVS, a fix like this would be a
great help.  When I do a checkout, before I compile I remove the code
which makes windows for new mounted cd's appear, and the code which
makes icons for mounts display on the desktop (I only need do this
because I prefer the CD icons to always be in the same place).

On a side note, if I finally get gnome-vfs to compile (still having
autoconf problems) should I use the redhat branch or HEAD for nautilus?

thanks,
chris

On Thu, 2001-08-23 at 02:29, Darin Adler wrote:
> > @@ -830,8 +830,8 @@ volume_mounted_callback (NautilusVolumeM
> >  	}
> >  	
> >  	/* Open a window to the CD if the user has set that preference. */
> > -	if (nautilus_volume_get_device_type (volume) == 
> > NAUTILUS_DEVICE_CDROM_DRIVE
> > -		&& gnome_config_get_bool 
> > ("/magicdev/Options/do_fileman_window=true")) {		
> > +	if (nautilus_volume_get_device_type (volume) == 
> > NAUTILUS_DEVICE_CDROM_DRIVE
> > +	    && eel_preferences_get_boolean 
> > (NAUTILUS_PREFERENCES_MONITOR_CDROM_MOUNTS)) {
> >  		window = nautilus_application_create_window (application);
> >  		uri = gnome_vfs_get_uri_from_local_path 
> > (nautilus_volume_get_mount_path (volume));
> >  		nautilus_window_go_to (window, uri);
> 
> I understand that you prefer to have this setting in Nautilus instead of 
> in the MagicDev part of the control center. But I'd like to hear from 
> people who actually use this feature, and perhaps the Red Hat hackers, 
> about this. It seems bad to have one setting in the control center that 
> has no effect, and a separate setting in Nautilus that does work. I'd 
> prefer to get rid of one if we are going to add the other.
> 
> > @@ -890,7 +890,9 @@ volume_unmounted_callback (NautilusVolum
> >  		if (window != NULL && window_can_be_closed (window)) {
> >  			uri = nautilus_window_get_location (window);
> >  			path = gnome_vfs_get_local_path_from_uri (uri);
> > -			if (eel_str_has_prefix (path, nautilus_volume_get_mount_path 
> > (volume))) {
> > +			if (eel_str_has_prefix (path, nautilus_volume_get_mount_path 
> > (volume))
> > +			    && nautilus_volume_get_device_type (volume) == 
> > NAUTILUS_DEVICE_CDROM_DRIVE
> > +			    && eel_preferences_get_boolean 
> > (NAUTILUS_PREFERENCES_MONITOR_CDROM_MOUNTS)) {
> >  				close_list = g_list_prepend (close_list, window);
> >  			}
> >  			g_free (path);
> 
> This looks like an incorrect change. The old code would close any window 
> when the volume is unmounted. The change seems to make it so that only CD 
> volume windows get closed and other windows are left open, even if the 
> volume is unmounted. Did you test how this affects other kinds of 
> removable media?
> 
> > @@ -334,6 +334,11 @@ static EelPreferencesItemDescription nav
> >  	  N_("Don't include the built-in bookmarks in the Bookmarks menu"),
> >  	  EEL_PREFERENCE_ITEM_BOOLEAN
> >  	},
> > +	{ N_("Monitor CDROM mounts"),
> > +	  NAUTILUS_PREFERENCES_MONITOR_CDROM_MOUNTS,
> > +	  N_("Open/close a window to a cdrom when it gets mounted/unmounted"),
> > +	  EEL_PREFERENCE_ITEM_BOOLEAN
> > +	},
> >  	{ NULL }
> >  };
> 
> My first thought would be to call this "When a CD-ROM is mounted, open a 
> new window" and not use the word "monitor". The help could say "When a 
> CD-ROM is mounted, open a window to display its contents".
> 
> I'm not sure that this is should be a separate setting for CD-ROMs and for 
> other removable media. I want a window to open when I mount a Zip 
> cartridge too.
> 
>      -- Darin
> 
> _______________________________________________
> Nautilus-list mailing list
> Nautilus-list lists eazel com
> http://lists.eazel.com/mailman/listinfo/nautilus-list






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