diff options
author | David Zeuthen <davidz@redhat.com> | 2008-02-21 13:20:19 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2008-02-21 13:20:19 +0000 |
commit | 00e59a6b3c10ec4c3915b61d09498b4110189917 (patch) | |
tree | 9247ccf21281ac9e95bbcbce29cb9241446b1687 /src/nautilus-places-sidebar.c | |
parent | 7f77d09d9926e0aa7317d433248fc824828df44a (diff) | |
download | nautilus-00e59a6b3c10ec4c3915b61d09498b4110189917.tar.gz |
Use g_volume_should_automount() to determine if we should autorun programs
2008-02-21 David Zeuthen <davidz@redhat.com>
* libnautilus-private/nautilus-autorun.c: (should_autorun_mount):
Use g_volume_should_automount() to determine if we should autorun
programs on a mount.
* libnautilus-private/nautilus-directory-async.c:
(nautilus_directory_set_up_request),
(nautilus_async_destroying_file), (lacks_filesystem_info),
(wants_filesystem_info), (request_is_satisfied),
(directory_count_start), (mime_list_start),
(filesystem_info_cancel), (filesystem_info_stop),
(filesystem_info_state_free), (got_filesystem_info),
(query_filesystem_info_callback), (filesystem_info_start),
(start_or_stop_io), (nautilus_directory_cancel),
(cancel_filesystem_info_for_file), (cancel_loading_attributes),
(nautilus_directory_cancel_loading_file_attributes):
* libnautilus-private/nautilus-directory-private.h:
* libnautilus-private/nautilus-file-attributes.h: Add new
filesystem info attribute; right now two bits in NautilusFile's
private structure are set; the filesystem::use-preview and
filesystem:readonly.
* libnautilus-private/nautilus-file-operations.c:
(nautilus_file_operations_mount_volume):
* src/nautilus-places-sidebar.c: (open_selected_bookmark),
(mount_shortcut_cb): Don't inhibit automount from
nautilus_file_operations_mount_volume() because then everything
will be inhibited as the mount_added callback use it as
well. Rather, move the call to inhibit out to the proper call
sites.
* libnautilus-private/nautilus-file-private.h:
* libnautilus-private/nautilus-file.c:
(nautilus_file_get_filesystem_use_preview),
(nautilus_file_should_show_thumbnail),
(get_speed_tradeoff_preference_for_file),
(nautilus_file_get_mount):
* libnautilus-private/nautilus-file.h:
* src/file-manager/fm-directory-view.c: (load_directory):
* src/file-manager/fm-icon-view.c: (should_preview_sound):
* src/nautilus-window-manage-views.c: (update_for_new_location):
Use the new filesystem::use-preview hint to determine if we should
preview non-native files (such as gphoto2:// and cdda://
mounts).
svn path=/trunk/; revision=13795
Diffstat (limited to 'src/nautilus-places-sidebar.c')
-rw-r--r-- | src/nautilus-places-sidebar.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nautilus-places-sidebar.c b/src/nautilus-places-sidebar.c index 8eb568836..e63db3b20 100644 --- a/src/nautilus-places-sidebar.c +++ b/src/nautilus-places-sidebar.c @@ -56,6 +56,7 @@ #include <libnautilus-private/nautilus-file-operations.h> #include <libnautilus-private/nautilus-trash-monitor.h> #include <libnautilus-private/nautilus-icon-names.h> +#include <libnautilus-private/nautilus-autorun.h> #include <gio/gio.h> #include "nautilus-bookmark-list.h" @@ -1314,6 +1315,7 @@ open_selected_bookmark (NautilusPlacesSidebar *sidebar, GVolume *volume; gtk_tree_model_get (model, &iter, PLACES_SIDEBAR_COLUMN_VOLUME, &volume, -1); if (volume != NULL) { + nautilus_inhibit_autorun_for_volume (volume); nautilus_file_operations_mount_volume (NULL, volume); g_object_unref (volume); } @@ -1429,6 +1431,7 @@ mount_shortcut_cb (GtkMenuItem *item, -1); if (volume != NULL) { + nautilus_inhibit_autorun_for_volume (volume); nautilus_file_operations_mount_volume (NULL, volume); g_object_unref (volume); } |