* add basic support for X-Label (WIP)

This commit is contained in:
Dirk-Jan C. Binnema
2011-06-16 00:26:30 +03:00
parent 2a36799054
commit 9971c1e7ae
6 changed files with 50 additions and 13 deletions

View File

@ -714,6 +714,18 @@ get_references (MuMsgFile *self)
static GSList*
get_tags (MuMsgFile *self)
{
GMimeObject *obj;
obj = GMIME_OBJECT(self->_mime_msg);
return mu_str_to_list (g_mime_object_get_header
(obj, "X-Label"), ',');
}
char*
mu_msg_file_get_str_field (MuMsgFile *self, MuMsgFieldId mfid, gboolean *do_free)
{
@ -774,16 +786,15 @@ mu_msg_file_get_str_list_field (MuMsgFile *self, MuMsgFieldId mfid,
case MU_MSG_FIELD_ID_REFS:
*do_free = TRUE;
return get_references (self);
case MU_MSG_FIELD_ID_TAGS:
*do_free = TRUE;
return get_tags (self);
default:
g_return_val_if_reached (NULL);
}
}
gint64
mu_msg_file_get_num_field (MuMsgFile *self, const MuMsgFieldId mfid)
{