[Geany-devel] File type icons?

Nick Treleaven nick.treleaven at xxxxx
Wed Oct 27 14:21:25 UTC 2010


On Tue, 26 Oct 2010 20:24:29 +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?

I just changed the mime_type field to be "text/plain" if it wasn't
initialized.

> > 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", ...).

OK, should be fixed now.

Nick



More information about the Devel mailing list