Bug 3158 - Avatar plugin priority
Summary: Avatar plugin priority
Status: NEW
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: Plugins (show other bugs)
Version: 3.10.0
Hardware: All All
: P3 enhancement
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2014-04-28 13:54 UTC by Christian Hesse
Modified: 2014-06-21 21:22 UTC (History)
0 users

See Also:


Attachments
prepare GUI for avatar priority (12.33 KB, patch)
2014-06-20 22:55 UTC, Christian Hesse
no flags Details | Diff

Description Christian Hesse 2014-04-28 13:54:20 UTC
Currently the priority is set by the unique type identifier, so last one is always higher priority by definition. I would like to change priority, so I can decide what source has precedence. For example checking for Face header first, then X-Face header, last try to fetch avatar from libravatar.
Comment 1 Christian Hesse 2014-06-20 20:36:56 UTC
Trying to get this in place...
Any hints how to manage this at runtime and where/how to save the configuration?
Comment 2 Christian Hesse 2014-06-20 22:55:00 UTC
Created attachment 1411 [details]
prepare GUI for avatar priority

Just started by writing some GUI code... The important things are still missing, though.
Comment 3 Ricardo Mones 2014-06-21 16:54:35 UTC
Don't take it bad but my initial idea for this is not to have it centralized at all. The core should not care about this priority since it's an arrangement among plugins of some kind. I don't like the idea of having code in core for this even if no avatar plugin is loaded, only the strictly required (which ideally should be nothing :)

One idea for this is applying something similar to what is done with pgp plugins: one avatarcore plugin with the common code (something similar to the priority management you depicted in your patch) and the other avatar-related plugins would reuse it.

Also some common interface would have to be defined: at least functions to query/set priority all avatar-related plugins should implement, so the avatarcore would  invoke them for each of them appropriately. Maybe also some user-friendly identification function to help GUI.

Had not much time to think about the details, but more or less that's the big picture right now. So if you want to invest time on this I think that's the way to go, more than adding more code to the core.

Thanks in advance!
Comment 4 Christian Hesse 2014-06-21 21:22:23 UTC
(In reply to comment #3)
> Don't take it bad but my initial idea for this is not to have it centralized
> at all. The core should not care about this priority since it's an
> arrangement among plugins of some kind. I don't like the idea of having code
> in core for this even if no avatar plugin is loaded, only the strictly
> required (which ideally should be nothing :)

Agreed, I am with you. ;)

> One idea for this is applying something similar to what is done with pgp
> plugins: one avatarcore plugin with the common code (something similar to
> the priority management you depicted in your patch) and the other
> avatar-related plugins would reuse it.

Ok, but this requires X-/Face support got to a plugin as well, no?

> Also some common interface would have to be defined: at least functions to
> query/set priority all avatar-related plugins should implement, so the
> avatarcore would  invoke them for each of them appropriately. Maybe also
> some user-friendly identification function to help GUI.
> 
> Had not much time to think about the details, but more or less that's the
> big picture right now. So if you want to invest time on this I think that's
> the way to go, more than adding more code to the core.

I will think about it. All of this sound reasonable so far I think.

> Thanks in advance!

Note You need to log in before you can comment on or make changes to this bug.