@@ -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);
@@ -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);
@@ -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 }
};