Le 15/10/2010 00:03, Dominic Hopf a écrit :
Am Donnerstag, den 14.10.2010, 16:36 +0200 schrieb Colomban Wendling:
Hi,
I realized that in the "documents" sidebar each and every files have an icon, but they all have the same, no matter what. I had a little time and I decided to play a bit with the idea of having file-type based icons.
Such icons could be displayed at a few places:
- In the Documents sidebar: there is already icons and it would
probably ease to find a particular item (if different filetypes are mixed, of course). Anyway I think it's better to have the "right" icons rather than always using the same. (capture joined)
- In the document notebook popup. This will perhaps ease finding the
item, but perhaps adds clutter. Not sure. (capture joined)
- In the tab title, like GEdit does. I think this one is a bad idea
since it is probably useless and only use a little more space.
- In file browser and tree browser plugin, which maybe could use
functions provided by Geany for showing those icons.
Not sure it's really helpful for *browsers, because you have to know the file type already. I'd think g_content_type_guess() is probably more appropriate there since we don't know the content type already, and then you directly get the icon (with g_content_type_get_icon()).
I short: I love this idea! :)
Fine then :) Having that icon is fairly easy, but as said, I'm currently unable to display it reliably in the document sidebar.
Joined 0001-Add-filetype-icon.patch (depends on previous 0001-Add-MIME-type-to-GeanyFiletype.patch) that add filetype->icon, a 16x16 GdkPixbuf icon that represents the file type.
Also joined 0001-Add-filetype-icon-to-the-editor-notebook-popup.patch that... huh, adds filetype icon to the editor notebook popup entries, to show how it looks like. (this was suggestion 2).
Regards, Colomban