Re: nautilus volume monitor patch



On Wed, 2002-05-22 at 16:54, Alex Larsson wrote:
> On 22 May 2002, Bastien Nocera wrote:
> 
> > Hi,
> > 
> > I cooked up a small patch to fix up a couple of problems I had with
> > volume handling in nautilus:
> > 
> > - device with mount point "/mnt/backup/" showing up as an empty menu
> > item in the devices list
> > - added a couple of filesystems to the list (probably to back off and
> > add up post-2.0), and changed smb to smbfs
> > - added a couple of device types (so that people could add "windows" and
> > "mac" types of icons for HD) and use the already quite popular i-smb
> > icon
> > - make the "new window on mount" behaviour use the new magicdev options
> > (ie. use gconf, not gnome_config).
> > 
> > http://hadess.net/files/patches/nautilus-smb.patch
> 
> 
> +	} else if (strcmp (file_system_type_name, "nfs") == 0) {
>  		ok = mount_volume_nfs_add (volume);
> +		volume->is_removable = FALSE;
> +		return TRUE;
> 
> This ignores the ok return value.

Fixed

> @@ -1869,24 +1890,40 @@
>  nautilus_volume_monitor_get_mount_name_for_display (NautilusVolumeMonitor *monitor,
>  						    const NautilusVolume *volume)
>  {
> -	const char *name, *found_name;
> +	const char *found_name;
> +	char *name, *stripped = NULL;
>  
> We don't initialize variables in the declaration.
> 
>  } else {
> -		return g_strdup (name);
> +		char *retval;
> +
> +		retval = g_strdup (name);
> +		g_free (stripped);
> +		return retval;
>  	}
> 
> All variable declarations go at the start of the function.

I replaced all this cruft with basename. Thing I didn't know, there are
2 different basename() in libc, and we want to use the most portable one
(see comment in patch).

> +	case NAUTILUS_DEVICE_SMB:
> +		icon_name = "i-smb";
> +		break;
>  	
> If we do this we should ship with an i-smb icon.

gnome-mime-data contains one already.

> The filesystems strings added aren't very visible, so i think we 
> can sneak those past the release team. (/me ducks)

Hehe ;)

http://hadess.net/files/patches/nautilus-smb2.patch

Cheers

-- 
/Bastien Nocera
http://hadess.net

Attachment: signature.asc
Description: This is a digitally signed message part



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