* cosmetics

This commit is contained in:
Dirk-Jan C. Binnema 2010-11-22 21:44:54 +02:00
parent 9e43ded016
commit e141908b7c
3 changed files with 12 additions and 9 deletions

View File

@ -33,7 +33,8 @@ enum _FieldFlags {
FLAG_XAPIAN_INDEX = 1 << 1, /* field is indexed in xapian */ FLAG_XAPIAN_INDEX = 1 << 1, /* field is indexed in xapian */
FLAG_XAPIAN_TERM = 1 << 2, /* field stored as term in xapian */ FLAG_XAPIAN_TERM = 1 << 2, /* field stored as term in xapian */
FLAG_XAPIAN_VALUE = 1 << 3, /* field stored as value in xapian */ FLAG_XAPIAN_VALUE = 1 << 3, /* field stored as value in xapian */
FLAG_XAPIAN_CONTACT = 1 << 4 /* field contains an e-mail address */ FLAG_XAPIAN_CONTACT = 1 << 4 /* field contains an e-mail
* address */
}; };
typedef enum _FieldFlags FieldFlags; typedef enum _FieldFlags FieldFlags;

View File

@ -41,21 +41,21 @@ enum _MuMsgFieldId {
MU_MSG_FIELD_ID_TO, MU_MSG_FIELD_ID_TO,
MU_MSG_FIELD_ID_MSGID, MU_MSG_FIELD_ID_MSGID,
MU_MSG_FIELD_ID_TIMESTAMP, MU_MSG_FIELD_ID_TIMESTAMP,
MU_MSG_FIELD_ID_NUM,
MU_MSG_FIELD_ID_NUM
/* fake fields */
MU_MSG_PSEUDO_FIELD_ID_DATESTR, /* used in to store datestr in db */
MU_MSG_FIELD_ID_NUM_WITH_PSEUDO /* number including these fake
* fields */
}; };
typedef enum _MuMsgFieldId MuMsgFieldId; typedef enum _MuMsgFieldId MuMsgFieldId;
/* some specials... */ /* some specials... */
static const MuMsgFieldId MU_MSG_FIELD_ID_NONE = (MuMsgFieldId)-1; static const MuMsgFieldId MU_MSG_FIELD_ID_NONE = (MuMsgFieldId)-1;
static const MuMsgFieldId MU_MSG_FIELD_ID_DATESTR =
(MuMsgFieldId) (MU_MSG_FIELD_ID_NUM + 1);
#define mu_msg_field_id_is_valid(MFID) \ #define mu_msg_field_id_is_valid(MFID) \
((MFID) < MU_MSG_FIELD_ID_NUM) ((MFID) < MU_MSG_FIELD_ID_NUM)
/* don't change the order, add new types at the end (before _NUM)*/ /* don't change the order, add new types at the end (before _NUM)*/
enum _MuMsgFieldType { enum _MuMsgFieldType {
MU_MSG_FIELD_TYPE_STRING, MU_MSG_FIELD_TYPE_STRING,

View File

@ -707,13 +707,15 @@ get_body (MuMsg *msg, gboolean want_html)
NULL; NULL;
else else
str = data._txt_part ? str = data._txt_part ?
part_to_string (GMIME_PART(data._txt_part), TRUE, &err) : part_to_string (GMIME_PART(data._txt_part),
TRUE, &err) :
NULL; NULL;
/* note, str may be NULL (no body), but that's not necessarily /* note, str may be NULL (no body), but that's not necessarily
* an error; we only warn when an actual error occured */ * an error; we only warn when an actual error occured */
if (err) if (err)
g_warning ("error occured while retrieving %s body for message %s", g_warning ("error occured while retrieving %s body"
"for message %s",
want_html ? "html" : "text", want_html ? "html" : "text",
mu_msg_get_path(msg)); mu_msg_get_path(msg));