Mime-type editor, where to put it?
stephan at xfce.org
Sun Jan 22 09:46:24 CET 2012
On Sat, Jan 21, 2012 at 9:26 PM, Nick Schermer <nickschermer at gmail.com> wrote:
> On Sat, Jan 21, 2012 at 6:46 PM, Jannis Pohlmann <jannis at xfce.org> wrote:
>> On Sat, 21 Jan 2012 17:05:58 +0100
>> Nick Schermer <nickschermer at gmail.com> wrote:
>>> Code is in the nick/mime-settings branch of xfce4-settings.
>> I just had a quick look at it. Here's my comments:
>> * Small icons next to the MIME types and application names would be
>> useful IMHO, as they could help finding things more quickly.
> True-ish, but loading ~600 icons is not a good idea...
Agreed, lets do some math:
16x16 = 256 pixels
256x32 = 8.192 bytes (considering ARGB)
600x8192 = 4.915.200 bytes ( ~ 5MB)
add a 20% overhead for the objects... (which is huge), then we end up at 6MB
Ok, doing 600 round-trips to the filesystem is not a good idea, and
using 6MB just for icons is a lot too.
But can't we figure out a solution to that?
For example, only loading those visible to the user (so, 15-25-ish)
should not be a problem?
You could add an idle-timer to figure out when the user has stopped
scrolling and only load the icons that are visible.
Similar to how Thunar triggers the emission of
queue-thumbnail-requests to tumbler. (I must confess, I haven't looked
at that code yet).
I haven't fully considered all the implications and possibilities, but
I agree that showing icons can improve usability quite a bit.
Maybe there is a way to make it work without having to 'load 600 icons'.
More information about the Xfce4-dev