talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 3887eb3fd30f291fd162a5c33fac282033d727eb
parent 7ba87228ec8165e64eff7cb0e97d85d085faca0c
Author: Holger Berndt <hb@claws-mail.org>
Date:   Sat, 27 Jul 2013 16:46:43 +0200

Python plugin: Include information about default account
Diffstat:
Msrc/plugins/python/accounttype.c | 11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)

diff --git a/src/plugins/python/accounttype.c b/src/plugins/python/accounttype.c @@ -75,6 +75,14 @@ static PyObject* get_address(clawsmail_AccountObject *self, void *closure) return self->address; } +static PyObject* get_is_default(clawsmail_AccountObject *self, void *closure) +{ + if(self->account->is_default) + Py_RETURN_TRUE; + else + Py_RETURN_FALSE; +} + static PyGetSetDef Account_getset[] = { {"account_name", (getter)get_account_name, (setter)NULL, "account_name - name of the account", NULL}, @@ -82,6 +90,9 @@ static PyGetSetDef Account_getset[] = { {"address", (getter)get_address, (setter)NULL, "address - address of the account", NULL}, + {"is_default", (getter)get_is_default, (setter)NULL, + "is_default - whether this account is the default account", NULL}, + {NULL} };