[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: CDROM-drive icon on the desktop



Le lundi 06 septembre 2004 à 18:02 +0200, Jérôme Warnier a écrit :
> Using Debian Sarge with udev + kernel 2.6 + gnome-volume-manager +
> GNOME, the CDROM-drivers appear in the "Computer" window, but with a
> harddisk icon. Same on the desktop.
> 
> I tried with the "Simple" and "Industrial" themes.

I think this is caused by the fact it is now mounted in /media/cdrom1,
and gnomeVFS doesn't recognize this mount point.

Backporting some changes from 2.7 should do the trick, otherwise I have
attached a trivial patch. Can anyone care to upload it? I don't have
enough time currently.
-- 
 .''`.           Josselin Mouette        /\./\
: :' :           josselin.mouette@ens-lyon.org
`. `'                        joss@debian.org
  `-  Debian GNU/Linux -- The power of freedom
--- libgnomevfs/gnome-vfs-volume-monitor-daemon.c.old	2004-09-06 18:22:30.000000000 +0200
+++ libgnomevfs/gnome-vfs-volume-monitor-daemon.c	2004-09-06 18:27:46.000000000 +0200
@@ -220,10 +220,11 @@
 	    	return GNOME_VFS_DEVICE_TYPE_CDROM;
 	} else if (g_str_has_prefix (device_path, "/dev/cd")) {
 	    	return GNOME_VFS_DEVICE_TYPE_CDROM;
-	} else if (g_str_has_prefix (mount_path, "/mnt/")) {		
-		name = mount_path + strlen ("/mnt/");
+	} else if (g_str_has_prefix (mount_path, "/mnt/") ||
+	    	   g_str_has_prefix (mount_path, "/media/")) {		
+		name = strchr (mount_path + 1, '/') + 1;
 		
-		if (g_str_has_prefix (name, "cdrom") ||
+		if (g_str_has_prefix (name, "cd") ||
 		    g_str_has_prefix (name, "burn")) {
 			return GNOME_VFS_DEVICE_TYPE_CDROM;
 		} else if (g_str_has_prefix (name, "floppy")) {

Attachment: signature.asc
Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=


Reply to: