projects
/
claws.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fedafd7
)
Python plugin: Folder: Add identifier property
author
Holger Berndt
<hb@claws-mail.org>
Wed, 7 Aug 2013 22:28:43 +0000
(
00:28
+0200)
committer
Holger Berndt
<hb@claws-mail.org>
Thu, 8 Aug 2013 21:34:37 +0000
(23:34 +0200)
src/plugins/python/foldertype.c
patch
|
blob
|
history
diff --git
a/src/plugins/python/foldertype.c
b/src/plugins/python/foldertype.c
index 10a19b423bb3821835483aecad68e9bc0c30f169..3afd0cc5b2c354e23518645180d58dbe5efe9bf1 100644
(file)
--- a/
src/plugins/python/foldertype.c
+++ b/
src/plugins/python/foldertype.c
@@
-145,6
+145,22
@@
static PyObject* get_mailbox_name(clawsmail_FolderObject *self, void *closure)
Py_RETURN_NONE;
}
Py_RETURN_NONE;
}
+static PyObject* get_identifier(clawsmail_FolderObject *self, void *closure)
+{
+ if(self->folderitem) {
+ gchar *id;
+ id = folder_item_get_identifier(self->folderitem);
+ if(id) {
+ PyObject *retval;
+ retval = PyString_FromString(id);
+ g_free(id);
+ return retval;
+ }
+ }
+ Py_RETURN_NONE;
+}
+
+
static PyObject* get_properties(clawsmail_FolderObject *self, void *closure)
{
Py_INCREF(self->properties);
static PyObject* get_properties(clawsmail_FolderObject *self, void *closure)
{
Py_INCREF(self->properties);
@@
-170,6
+186,9
@@
static PyGetSetDef Folder_getset[] = {
{"path", (getter)get_path, (setter)NULL,
"path - path of folder", NULL},
{"path", (getter)get_path, (setter)NULL,
"path - path of folder", NULL},
+ {"identifier", (getter)get_identifier, (setter)NULL,
+ "identifier - identifier of folder", NULL},
+
{"mailbox_name", (getter)get_mailbox_name, (setter)NULL,
"mailbox_name - name of the corresponding mailbox", NULL},
{"mailbox_name", (getter)get_mailbox_name, (setter)NULL,
"mailbox_name - name of the corresponding mailbox", NULL},