[Users] A little help with development

GDR! gdr at gdr.name
Sat Apr 18 15:15:18 CEST 2015


Hi list,

I've posted this a few months ago:

> Is there a way to always enable PGP encryption/signing for certain
> email addresses in Claws?

I've had the time to download Claws source from git today and tinker a
little bit and, since there doesn't seem to be a development focused
mailing list, I'll drop my questions here.

I'm wondering what the appropriate course of action would be for
implementing this feature. I guess that an address book field would
need to be added in "Other Attributes" when PGP core plugin is enabled
-> a new hook type would need to be created in src/addrcustomattr.c

It doesn't look like there's support for anything else than strings as
extra fields, so - at least in proof of concept phase - I'd use a
string acting as a boolean.

Then I'd add another hook to compose_entry_append() in src/compose.c
and attach the PGP core plugin to that hook. It would call
compose_force_encryption() if needed.

Alternatively I could attach PGP core to
COMPOSE_CHECK_BEFORE_SEND_HOOKLIST and display a dialog if encryption
wasn't enabled but address book says it should be.

Does this sound like a reasonable strategy? Would such patch be
accepted? It's the first time I'm seeing Claws source so my ideas may
be completely off.

-- 
GDR!
http://gdr.geekhood.net/



More information about the Users mailing list