#ifdef HAVE_CONFIG_H
# include "config.h"
-#include "claws-features.h"
+# include "claws-features.h"
#endif
-#include <glib.h>
-#include <glib/gi18n.h>
-
#include "composewindowtype.h"
+#include "accounttype.h"
#include "clawsmailmodule.h"
#include "foldertype.h"
#include "account.h"
#include "summaryview.h"
+#include <glib.h>
+#include <glib/gi18n.h>
+
#include <structmember.h>
#include <string.h>
PyObject *ui_manager;
PyObject *text;
PyObject *replyinfo;
+ PyObject *fwdinfo;
Compose *compose;
} clawsmail_ComposeWindowObject;
Py_XDECREF(self->ui_manager);
Py_XDECREF(self->text);
Py_XDECREF(self->replyinfo);
+ Py_XDECREF(self->fwdinfo);
self->ob_type->tp_free((PyObject*)self);
}
store_py_object(&(self->text), get_gobj_from_address(compose->text));
store_py_object(&(self->replyinfo), clawsmail_messageinfo_new(compose->replyinfo));
+ store_py_object(&(self->fwdinfo), clawsmail_messageinfo_new(compose->fwdinfo));
}
static int ComposeWindow_init(clawsmail_ComposeWindowObject *self, PyObject *args, PyObject *kwds)
return Py_None;
}
+static PyObject* get_account(clawsmail_ComposeWindowObject *self, void *closure)
+{
+ if(self->compose->account) {
+ return clawsmail_account_new(self->compose->account);
+ }
+ Py_RETURN_NONE;
+}
+
+
static PyMethodDef ComposeWindow_methods[] = {
{"set_subject", (PyCFunction)ComposeWindow_set_subject, METH_VARARGS,
"set_subject(text) - set subject to text\n"
{"replyinfo", T_OBJECT_EX, offsetof(clawsmail_ComposeWindowObject, replyinfo), 0,
"replyinfo - The MessageInfo object of the message that is being replied to, or None"},
+ {"forwardinfo", T_OBJECT_EX, offsetof(clawsmail_ComposeWindowObject, fwdinfo), 0,
+ "forwardinfo - The MessageInfo object of the message that is being forwarded, or None"},
+
+ {NULL}
+};
+
+static PyGetSetDef ComposeWindow_getset[] = {
+ {"account", (getter)get_account, (setter)NULL,
+ "account - the account corresponding to this compose window", NULL},
+
{NULL}
};
0, /* tp_iternext */
ComposeWindow_methods, /* tp_methods */
ComposeWindow_members, /* tp_members */
- 0, /* tp_getset */
+ ComposeWindow_getset, /* tp_getset */
0, /* tp_base */
0, /* tp_dict */
0, /* tp_descr_get */