diff options
author | marcus <marcus@FreeBSD.org> | 2002-09-11 04:24:07 +0800 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2002-09-11 04:24:07 +0800 |
commit | bda5921ac0be6b9eb32c4028cde1fc8d9f74fedd (patch) | |
tree | d075b00c642adc4452c4ac45a65c0b35d0bdc1a1 /x11-fm/nautilus | |
parent | c05c5a24d7b32079d0245d71ed6c324ec10bc199 (diff) | |
download | freebsd-ports-gnome-bda5921ac0be6b9eb32c4028cde1fc8d9f74fedd.tar.gz freebsd-ports-gnome-bda5921ac0be6b9eb32c4028cde1fc8d9f74fedd.tar.zst freebsd-ports-gnome-bda5921ac0be6b9eb32c4028cde1fc8d9f74fedd.zip |
Port sobomax's nautilus2 volume patches to nautilus, and take things a step
further. Now, removable media such as CDs, Zip drives, etc. are correctly
handled by nautilus with pretty little icons. Bump PORTREVISION.
Diffstat (limited to 'x11-fm/nautilus')
-rw-r--r-- | x11-fm/nautilus/Makefile | 2 | ||||
-rw-r--r-- | x11-fm/nautilus/files/patch-libnautilus-private::nautilus-volume-monitor.c | 61 |
2 files changed, 37 insertions, 26 deletions
diff --git a/x11-fm/nautilus/Makefile b/x11-fm/nautilus/Makefile index 694c950bebf2..0dbb3abf0360 100644 --- a/x11-fm/nautilus/Makefile +++ b/x11-fm/nautilus/Makefile @@ -7,7 +7,7 @@ PORTNAME= nautilus PORTVERSION= 1.0.6 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= x11-fm gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= stable/sources/nautilus diff --git a/x11-fm/nautilus/files/patch-libnautilus-private::nautilus-volume-monitor.c b/x11-fm/nautilus/files/patch-libnautilus-private::nautilus-volume-monitor.c index c76d27a3b7ed..3759e405ded1 100644 --- a/x11-fm/nautilus/files/patch-libnautilus-private::nautilus-volume-monitor.c +++ b/x11-fm/nautilus/files/patch-libnautilus-private::nautilus-volume-monitor.c @@ -1,8 +1,5 @@ - -$FreeBSD$ - ---- libnautilus-private/nautilus-volume-monitor.c.orig Wed Oct 10 03:16:39 2001 -+++ libnautilus-private/nautilus-volume-monitor.c Wed Dec 5 23:58:45 2001 +--- libnautilus-private/nautilus-volume-monitor.c.orig Tue Oct 9 20:16:39 2001 ++++ libnautilus-private/nautilus-volume-monitor.c Tue Sep 10 16:17:51 2002 @@ -60,6 +60,18 @@ #include <sys/types.h> #include <unistd.h> @@ -101,7 +98,7 @@ $FreeBSD$ } +#elif defined (HAVE_SETFSENT) + while ((fsent = getfsent ()) != NULL) { -+ if (strstr (fsent->fs_mntops, "noauto") == 0) { ++ if (strstr (fsent->fs_mntops, "noauto") != NULL) { + volume = create_volume (fsent->fs_spec, fsent->fs_file); + volumes = finish_creating_volume_and_prepend + (monitor, volume, fsent->fs_vfstype, volumes); @@ -126,7 +123,7 @@ $FreeBSD$ static gboolean volume_is_removable (const NautilusVolume *volume) -@@ -907,23 +943,34 @@ +@@ -907,23 +943,35 @@ @@ -142,18 +139,19 @@ $FreeBSD$ + FILE *fh; MountTableEntry ent; +#else -+ int fh; -+ struct fstab *ent; ++ int fh, index; ++ MountTableEntry *ent; +#endif NautilusVolume *volume; + /*{static int b = 1; while (b);}*/ volumes = NULL; - fh = setmntent (MOUNT_TABLE_PATH, "r"); +#ifndef HAVE_SETFSENT + fh = setmntent (MOUNT_TABLE_PATH, "r"); if (fh == NULL) { +#else ++ fh = getmntinfo(&ent, MNT_WAIT); + if (fh == 0) { +#endif return NULL; @@ -163,31 +161,24 @@ $FreeBSD$ while (! getmntent(fh, &ent)) { volume = create_volume (ent.mnt_special, ent.mnt_mountp); volume->is_removable = has_removable_mntent_options (&ent); -@@ -932,6 +979,23 @@ +@@ -932,6 +980,16 @@ } fclose (fh); +#else -+ while ((ent = getfsent ()) != NULL) { -+ /*{static int b = 1; while (b);}*/ -+ if (strcmp(ent->fs_vfstype, "swap") == 0) -+ continue; -+ volume = create_volume (ent->fs_spec, ent->fs_file); -+ if (strstr (ent->fs_mntops, "noauto") == 0) -+ volume->is_removable = TRUE; -+ else -+ volume->is_removable = FALSE; -+ volumes = finish_creating_volume_and_prepend -+ (monitor, volume, ent->fs_vfstype, volumes); ++ for (index = 0; index < fh; index++) { ++ volume = create_volume(ent[index].f_mntfromname, ++ ent[index].f_mntonname); ++ volume->is_removable = has_removable_mntent_options(ent + index); ++ volumes = finish_creating_volume_and_prepend ++ (monitor, volume, ent[index].f_fstypename, volumes); + } -+ -+ endfsent(); +#endif + return volumes; } -@@ -1668,7 +1732,7 @@ +@@ -1668,7 +1726,7 @@ for (node = volume_list; node != NULL; node = node->next) { volume = node->data; @@ -196,3 +187,23 @@ $FreeBSD$ /* These are set up by get_current_mount_list for Solaris. */ volume->is_removable = volume_is_removable (volume); #endif +@@ -1692,7 +1750,7 @@ + ok = mount_volume_auto_add (volume); + } else if (strcmp (file_system_type_name, "cdda") == 0) { + ok = mount_volume_cdda_add (volume); +- } else if (strcmp (file_system_type_name, "iso9660") == 0) { ++ } else if (strcmp (file_system_type_name, "cd9660") == 0) { + ok = mount_volume_iso9660_add (volume); + } else if (strcmp (file_system_type_name, "nfs") == 0) { + ok = mount_volume_nfs_add (volume); +@@ -1709,8 +1767,8 @@ + } + + /* Identify device type */ +- if (eel_str_has_prefix (volume->mount_path, "/mnt/")) { +- name = volume->mount_path + strlen ("/mnt/"); ++ if (eel_str_has_prefix (volume->mount_path, "/")) { ++ name = volume->mount_path + strlen ("/"); + + if (eel_str_has_prefix (name, "cdrom")) { + volume->device_type = NAUTILUS_DEVICE_CDROM_DRIVE; |