[Commits] [SCM] claws branch, master, updated. 3.9.0-172-g98b03df
holger at claws-mail.org
holger at claws-mail.org
Sun Apr 7 03:48:51 CEST 2013
The branch master of project "claws" (Claws Mail) has been updated
via 98b03dfda49ad0c206a73b6d8741587b6b5d60b5 (commit)
from 3e1e674b8a73109200e23b0e2520f42e8d63155b (commit)
- Log -----------------------------------------------------------------
commit 98b03dfda49ad0c206a73b6d8741587b6b5d60b5
Author: Holger Berndt <hb at claws-mail.org>
Date: Sun Apr 7 03:47:40 2013 +0200
Python plugin: Add Cc field to messageinfo objects
diff --git a/src/plugins/python/messageinfotype.c b/src/plugins/python/messageinfotype.c
index e796858..4015db4 100644
--- a/src/plugins/python/messageinfotype.c
+++ b/src/plugins/python/messageinfotype.c
@@ -36,6 +36,7 @@ typedef struct {
PyObject_HEAD
PyObject *from;
PyObject *to;
+ PyObject *cc;
PyObject *subject;
PyObject *msgid;
PyObject *filepath;
@@ -47,6 +48,7 @@ static void MessageInfo_dealloc(clawsmail_MessageInfoObject* self)
{
Py_XDECREF(self->from);
Py_XDECREF(self->to);
+ Py_XDECREF(self->cc);
Py_XDECREF(self->subject);
Py_XDECREF(self->msgid);
self->ob_type->tp_free((PyObject*)self);
@@ -61,6 +63,9 @@ static int MessageInfo_init(clawsmail_MessageInfoObject *self, PyObject *args, P
self->to = Py_None;
Py_INCREF(Py_None);
+ self->cc = Py_None;
+
+ Py_INCREF(Py_None);
self->subject = Py_None;
Py_INCREF(Py_None);
@@ -209,7 +214,7 @@ static PyMethodDef MessageInfo_methods[] = {
"\n"
"Returns True if the new flag of the message is set."},
- {"is_unread", is_unread, METH_NOARGS,
+ {"is_unread", is_unread, METH_NOARGS,
"is_unread() - checks if the message is unread\n"
"\n"
"Returns True if the unread flag of the message is set."},
@@ -255,11 +260,14 @@ static PyMethodDef MessageInfo_methods[] = {
};
static PyMemberDef MessageInfo_members[] = {
- {"From", T_OBJECT_EX, offsetof(clawsmail_MessageInfoObject, from), 0,
- "From - the From header of the message"},
+ { "From", T_OBJECT_EX, offsetof(clawsmail_MessageInfoObject, from), 0,
+ "From - the From header of the message" },
+
+ { "To", T_OBJECT_EX, offsetof(clawsmail_MessageInfoObject, to), 0,
+ "To - the To header of the message" },
- {"To", T_OBJECT_EX, offsetof(clawsmail_MessageInfoObject, to), 0,
- "To - the To header of the message"},
+ { "Cc", T_OBJECT_EX, offsetof(clawsmail_MessageInfoObject, cc), 0,
+ "Cc - the Cc header of the message" },
{"Subject", T_OBJECT_EX, offsetof(clawsmail_MessageInfoObject, subject), 0,
"Subject - the subject header of the message"},
@@ -347,6 +355,7 @@ static gboolean update_members(clawsmail_MessageInfoObject *ff, MsgInfo *msginfo
MSGINFO_STRING_TO_PYTHON_MESSAGEINFO_MEMBER(msginfo->from, "From");
MSGINFO_STRING_TO_PYTHON_MESSAGEINFO_MEMBER(msginfo->to, "To");
+ MSGINFO_STRING_TO_PYTHON_MESSAGEINFO_MEMBER(msginfo->cc, "Cc");
MSGINFO_STRING_TO_PYTHON_MESSAGEINFO_MEMBER(msginfo->subject, "Subject");
MSGINFO_STRING_TO_PYTHON_MESSAGEINFO_MEMBER(msginfo->msgid, "MessageID");
-----------------------------------------------------------------------
Summary of changes:
src/plugins/python/messageinfotype.c | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list