Re: [PATCH] Fix special icons in thumbnail factory



Hi Christian,

There is a leak in your code. See below

Jaap

> +static char *
> +get_special_icon_for_file (NautilusFile *file)
> +{
> +	char *uri, *ret;
> +
> +	if (file == NULL) {
> +		return NULL;
> +	}
> +
> +	if (nautilus_file_is_home (file)) {
> +		return ICON_NAME_HOME;
> +	}
> +
> +	ret = NULL;
> +	uri = nautilus_file_get_uri (file);
> +
> +	if (strcmp (uri, "burn:///") == 0) {
> +		ret = "gnome-dev-cdrom";
> +	} else if (strcmp (uri, "computer:///") == 0) {
> +		ret = g_strdup ("gnome-fs-client");

Previous line should be:
		ret = "gnome-fs-client";

> +	} else if ((strcmp (uri, "network:///") == 0)
> +		   || (strcmp (uri, "smb:///") == 0)) {
> +		ret = "gnome-fs-network";
> +	} else if (strcmp (uri, EEL_TRASH_URI) == 0) {
> +		if (nautilus_trash_monitor_is_empty ()) {
> +			ret = ICON_NAME_TRASH_EMPTY;
> +		} else {
> +			ret = ICON_NAME_TRASH_FULL;
> +		}
> +	}
> +
> +	g_free (uri);
> +
> +	return ret;
> +}



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