diff options
author | Alex Larsson <alexl@redhat.com> | 2001-09-11 01:20:43 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2001-09-11 01:20:43 +0000 |
commit | ede19226c50a448d0b64711b46c2f2072ee1963e (patch) | |
tree | 525a9532b9da2da409d970c542d748aceb930a49 /libnautilus-private/nautilus-monitor.c | |
parent | ffaa43d0eb9da4b4235072859e45c3aeea896f48 (diff) | |
download | nautilus-ede19226c50a448d0b64711b46c2f2072ee1963e.tar.gz |
Merge some stuff from the redhat-outstanding-patches branch
2001-09-05 Alex Larsson <alexl@redhat.com>
Merge some stuff from the redhat-outstanding-patches branch
* eazel-logos/default.xml:
* icons/default.xml:
don't hardcode the title, title info, and
shadow colors; this prevented the auto-color-selection stuff
in nautilus-sidebar-title.c from working properly.
And the hardcoded values were the same thing the autoselector
would have chosen anyhow.
* libnautilus-private/nautilus-monitor.c:
Don't monitor files on read only volumes, they never change, and
will keep cdroms from being unmounted because fam has open file
descriptors on them.
* libnautilus-private/nautilus-thumbnails.c:
Always look for local thumbnails first.
* libnautilus-private/nautilus-volume-monitor.[ch]:
Add nautilus_volume_is_read_only() and
nautilus_volume_monitor_get_volume_for_path()
* src/nautilus-desktop-window.c:
(set_wmspec_desktop_hint): function to set _NET_WM_WINDOW_TYPE, to
avoid confusing kwin so badly, and also to go ahead and support
the Window Manager Hints Of The Future.
(set_gdk_window_background): only set root background to a pixel
if we retrieved a pixel property
(map): Set background of our child widgets in addition to our
own background. This gets rid of the last of the ugliness during
Nautilus startup, I believe.
* src/file-manager/fm-icon-view.c:
Don't read GMC position meta data -- it is never right for nautilus,
due to different size icons, additional icons, different placement
policies, so falling back to normal automatic placement works better.
Diffstat (limited to 'libnautilus-private/nautilus-monitor.c')
-rw-r--r-- | libnautilus-private/nautilus-monitor.c | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/libnautilus-private/nautilus-monitor.c b/libnautilus-private/nautilus-monitor.c index d2f394924..3ff006795 100644 --- a/libnautilus-private/nautilus-monitor.c +++ b/libnautilus-private/nautilus-monitor.c @@ -31,6 +31,7 @@ #ifdef HAVE_LIBFAM #include "nautilus-file-changes-queue.h" +#include "nautilus-volume-monitor.h" #include <fam.h> #include <gdk/gdk.h> #include <gmodule.h> @@ -232,6 +233,17 @@ nautilus_monitor_active (void) #endif } +static gboolean +path_is_on_readonly_volume (const char *path) +{ + NautilusVolumeMonitor *volume_monitor; + NautilusVolume *volume; + + volume_monitor = nautilus_volume_monitor_get (); + volume = nautilus_volume_monitor_get_volume_for_path (volume_monitor, path); + return (volume != NULL) && nautilus_volume_is_read_only (volume); +} + NautilusMonitor * nautilus_monitor_file (const char *uri) { @@ -251,7 +263,16 @@ nautilus_monitor_file (const char *uri) if (path == NULL) { return NULL; } - + + /* Check to see if the file system is readonly. If so, don't monitor -- + * there is no point, and we'll just keep the file system busy for + * no reason, preventing unmounting + */ + if (path_is_on_readonly_volume (path)) { + g_free (path); + return NULL; + } + monitor = g_new0 (NautilusMonitor, 1); FAMMonitorFile (connection, path, &monitor->request, NULL); @@ -283,6 +304,15 @@ nautilus_monitor_directory (const char *uri) return NULL; } + /* Check to see if the file system is readonly. If so, don't monitor -- + * there is no point, and we'll just keep the file system busy for + * no reason, preventing unmounting + */ + if (path_is_on_readonly_volume (path)) { + g_free (path); + return NULL; + } + monitor = g_new0 (NautilusMonitor, 1); FAMMonitorDirectory (connection, path, &monitor->request, NULL); |