Re: [Nautilus-list] [PATCH] handling icon for mime types
- From: Alex Larsson <alexl redhat com>
- To: Diego González <diego pemas net>
- Cc: Nautilus List <nautilus-list lists eazel com>
- Subject: Re: [Nautilus-list] [PATCH] handling icon for mime types
- Date: Sat, 20 Apr 2002 17:49:53 -0400 (EDT)
On 21 Apr 2002, Diego González wrote:
> ok, i used the gnome2 capplet. This capplet writes in the users mime
> database the whole path of the icon (/home/diego/image.png). When
> nautilus reaches the function make_full_icon_path. the parameters passed
> to it when for the mime type that you just changed are:
>
> path: the whole path to the image plus the icon without the extension
> (/home/diego/image for example)
> suffix: .svg, because this is the first string in
> icon_file_name_suffixes
>
> so, in the first check:
>
> if (path[0] == '/')
> return partial_path;
>
> we return a string, and the caller: get_themed_icon_file_path function,
> considers that the file /home/diego/image.svg exists and is the right
> one to use, but it doesn't exist, the right image to use whole be
> /home/diego/image.png.
>
> with the check:
>
> if (path[0] == '/' && g_file_test (partial_path, G_FILE_TEST_EXISTS)
> return partial_path;
>
> we return *only* when the file with the right extension exists.
Ok. Stupid icon factory should not be stripping the extension off full
pathnames. But I guess that this is a good enough workaround. I'd like to
rewrite the icon factory when i have finished the proposal for the new
common icon theme standard.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl redhat com alla lysator liu se
He's a Nobel prize-winning misogynist grifter with a robot buddy named Sparky.
She's a cold-hearted mute detective with a song in her heart and a spring in
her step. They fight crime!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]