[Users] Flagging non-default accounts during compose?

Holger Berndt berndth at gmx.de
Sat Jul 27 18:04:45 CEST 2013

On Fr, 19.07.2013 21:58, Pierre Fortin wrote:

>When replying in a folder (CM list in this case) which has a non-default
>account address, the background is yellow...  Is there a way to get at
>something like folder.Properties.Compose.DefaultTo...?

I added some more functionality to the Python plugin in Git:

There is now an Account type. The clawsmail module has new functions
for querying accounts, as does the compose_window object.

There is now a FolderProperties type. Folders have a "properties"
member to query the corresponding object.

So now, you should be able to do something like this in compose_any:

# not global default account and not default account of current folder
if not clawsmail.compose_window.account.is_default and clawsmail.compose_window.account != clawsmail.get_folderview_selected_folder().properties.default_account:
    clawsmail.compose_window.text.modify_base(gtk.STATE_NORMAL, gtk.gdk.color_parse("#FFF0AA"))

Does that address your issues?

(There is now also a "forwardinfo" member analogous to the "replyinfo",
but it maps directly to Claws Mail's internals, and only catches
forwards, but not forward-as-attachment or redirect, so it's
helpfullness is currently limited.)

All those types are very incomplete, and as usual with the Python
plugin, I don't aim for completeness but extend on an as-needed


More information about the Users mailing list