[Geany-devel] File type icons?
Colomban Wendling
lists.ban at xxxxx
Tue Oct 26 18:24:29 UTC 2010
Le 26/10/2010 19:45, Nick Treleaven a écrit :
> On Thu, 14 Oct 2010 16:36:43 +0200
> Colomban Wendling <lists.ban at herbesfolles.org> wrote:
>
>> This patch adds a new mime_type field to GeanyFiletype and sets it for
>> every built-in filetype. Built-in filetypes for which I didn't find the
>> MIME type defaults to text/plain, but it would perhaps be better to set
>> it to NULL to explicitly say that it isn't the right one.
>
> I've removed text/plain defaults now. I think it will help when testing.
OK. Are you sure about removing it also for GEANY_FILETYPES_NONE?
> Custom filetypes were NULL too, so I fixed the menu item icon code to
> handle NULL.
Oups, forgot about custom filetypes at all :/
But your code for handling file_type->icon == NULL will not output a
theme-based icon, and will be different that the one shown in the
documents sidebar (when build against GLib >= 2.18). To be the same, you
need to use ui_get_filetype_icon("text/plain", ...).
Regards,
Colomban
More information about the Devel
mailing list