projects
/
claws.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7ba8722
)
Python plugin: Include information about default account
author
Holger Berndt
<hb@claws-mail.org>
Sat, 27 Jul 2013 14:46:43 +0000
(16:46 +0200)
committer
Holger Berndt
<hb@claws-mail.org>
Sat, 27 Jul 2013 14:50:09 +0000
(16:50 +0200)
src/plugins/python/accounttype.c
patch
|
blob
|
history
diff --git
a/src/plugins/python/accounttype.c
b/src/plugins/python/accounttype.c
index d82717acb357db1b106140ef3756338b1f051d79..56c7c7be6232703001e6d8e6e594ea855597cf67 100644
(file)
--- 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;
}
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},
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},
{"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}
};
{NULL}
};