diff options
author | Bastien Nocera <hadess@hadess.net> | 2003-07-02 13:28:53 +0000 |
---|---|---|
committer | Bastien Nocera <hadess@src.gnome.org> | 2003-07-02 13:28:53 +0000 |
commit | 05cb93d522ed581cee0061924751c3bcb1fd7143 (patch) | |
tree | 4c5a71f684870baa5f43313c399efbb32a0c108e | |
parent | 97e21e0e5f7ad1d6e3410598e1835bc9d40598e3 (diff) | |
download | nautilus-05cb93d522ed581cee0061924751c3bcb1fd7143.tar.gz |
removed creation of new window when mounting CD-Roms, it was useless and
2003-07-02 Bastien Nocera <hadess@hadess.net>
* src/nautilus-application.c: (nautilus_application_instance_init),
(check_mount_window_disabled): removed creation of new window
when mounting CD-Roms, it was useless and very annoying
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/nautilus-application.c | 46 |
2 files changed, 9 insertions, 43 deletions
@@ -1,3 +1,9 @@ +2003-07-02 Bastien Nocera <hadess@hadess.net> + + * src/nautilus-application.c: (nautilus_application_instance_init), + (check_mount_window_disabled): removed creation of new window + when mounting CD-Roms, it was useless and very annoying + 2003-06-29 Dave Camp <dave@ximian.com> * src/nautilus-view-frame.c: diff --git a/src/nautilus-application.c b/src/nautilus-application.c index e1b3acfa8..0034a26f5 100644 --- a/src/nautilus-application.c +++ b/src/nautilus-application.c @@ -90,9 +90,6 @@ static GList *nautilus_application_window_list; static gboolean need_to_show_first_time_druid (void); static void desktop_changed_callback (gpointer user_data); static void desktop_location_changed_callback (gpointer user_data); -static void volume_mounted_callback (NautilusVolumeMonitor *monitor, - NautilusVolume *volume, - NautilusApplication *application); static void volume_unmounted_callback (NautilusVolumeMonitor *monitor, NautilusVolume *volume, NautilusApplication *application); @@ -148,9 +145,9 @@ nautilus_application_instance_init (NautilusApplication *application) /* Create an undo manager */ application->undo_manager = nautilus_undo_manager_new (); - /* Watch for volume mounts so we can restore open windows */ - g_signal_connect_object (nautilus_volume_monitor_get (), "volume_mounted", - G_CALLBACK (volume_mounted_callback), application, 0); + /* Watch for volume mounts so we can restore open windows + * This used to be for showing new window on mount, but is not + * used anymore */ /* Watch for volume unmounts so we can close open windows */ g_signal_connect_object (nautilus_volume_monitor_get (), "volume_unmounted", @@ -919,43 +916,6 @@ need_to_show_first_time_druid (void) return result; } -/* Apps like redhat-config-packages that are using the CD-ROM - * directly, can grab ownership of the _NAUTILUS_DISABLE_MOUNT_WINDOW - * selection to temporarily disable the new window behavior. - */ -static gboolean -check_mount_window_disabled (void) -{ - Atom selection_atom = gdk_x11_get_xatom_by_name ("_NAUTILUS_DISABLE_MOUNT_WINDOW"); - - if (XGetSelectionOwner (GDK_DISPLAY(), selection_atom) != None) - return TRUE; - else - return FALSE; -} - -static void -volume_mounted_callback (NautilusVolumeMonitor *monitor, NautilusVolume *volume, - NautilusApplication *application) -{ - NautilusWindow *window; - char *uri; - - if (volume == NULL || application == NULL) { - return; - } - - /* Open a window to the CD if the user has set that preference. */ - if (nautilus_volume_get_device_type (volume) == NAUTILUS_DEVICE_CDROM_DRIVE - && eel_gconf_get_boolean( "/apps/magicdev/do_fileman_window") - && !check_mount_window_disabled ()) { - window = nautilus_application_create_window (application, gdk_screen_get_default ()); - uri = gnome_vfs_get_uri_from_local_path (nautilus_volume_get_mount_path (volume)); - nautilus_window_go_to (window, uri); - g_free (uri); - } -} - static gboolean window_can_be_closed (NautilusWindow *window) { |