mirror of https://github.com/djcb/mu.git
* cosmetics
This commit is contained in:
parent
2db1606a36
commit
7fe594fb2a
|
@ -111,7 +111,8 @@ mu_msg_doc_get_num_field (MuMsgDoc *self, MuMsgFieldId mfid)
|
||||||
t = mu_date_str_to_time_t (s.c_str(), FALSE/*utc*/);
|
t = mu_date_str_to_time_t (s.c_str(), FALSE/*utc*/);
|
||||||
return static_cast<gint64>(t);
|
return static_cast<gint64>(t);
|
||||||
} else {
|
} else {
|
||||||
return static_cast<gint64>(Xapian::sortable_unserialise(s));
|
return static_cast<gint64>
|
||||||
|
(Xapian::sortable_unserialise(s));
|
||||||
}
|
}
|
||||||
|
|
||||||
} MU_XAPIAN_CATCH_BLOCK_RETURN(-1);
|
} MU_XAPIAN_CATCH_BLOCK_RETURN(-1);
|
||||||
|
|
|
@ -126,7 +126,8 @@ each_contact (MuMsgContact *c, ContactData *cdata)
|
||||||
add_prefix_maybe (cdata->gstr, &cdata->bcc, "\t:bcc (");
|
add_prefix_maybe (cdata->gstr, &cdata->bcc, "\t:bcc (");
|
||||||
break;
|
break;
|
||||||
case MU_MSG_CONTACT_TYPE_REPLY_TO:
|
case MU_MSG_CONTACT_TYPE_REPLY_TO:
|
||||||
add_prefix_maybe (cdata->gstr, &cdata->reply_to, "\t:reply-to (");
|
add_prefix_maybe (cdata->gstr, &cdata->reply_to,
|
||||||
|
"\t:reply-to (");
|
||||||
break;
|
break;
|
||||||
default: g_return_val_if_reached (FALSE);
|
default: g_return_val_if_reached (FALSE);
|
||||||
}
|
}
|
||||||
|
@ -386,7 +387,8 @@ append_message_file_parts (GString *gstr, MuMsg *msg, MuMsgOptions opts)
|
||||||
append_sexp_parts (gstr, msg, opts);
|
append_sexp_parts (gstr, msg, opts);
|
||||||
append_sexp_contacts (gstr, msg);
|
append_sexp_contacts (gstr, msg);
|
||||||
|
|
||||||
append_sexp_attr_list (gstr, "references", mu_msg_get_references (msg));
|
append_sexp_attr_list (gstr, "references",
|
||||||
|
mu_msg_get_references (msg));
|
||||||
append_sexp_attr (gstr, "in-reply-to",
|
append_sexp_attr (gstr, "in-reply-to",
|
||||||
mu_msg_get_header (msg, "In-Reply-To"));
|
mu_msg_get_header (msg, "In-Reply-To"));
|
||||||
append_sexp_attr (gstr, "body-txt",
|
append_sexp_attr (gstr, "body-txt",
|
||||||
|
@ -440,8 +442,9 @@ mu_msg_to_sexp (MuMsg *msg, unsigned docid, const MuMsgIterThreadInfo *ti,
|
||||||
|
|
||||||
append_sexp_attr (gstr, "subject", mu_msg_get_subject (msg));
|
append_sexp_attr (gstr, "subject", mu_msg_get_subject (msg));
|
||||||
|
|
||||||
/* in the no-headers-only case (see below) we get a more complete list
|
/* in the no-headers-only case (see below) we get a more
|
||||||
* of contacts, so no need to get them here if that's the case */
|
* complete list of contacts, so no need to get them here if
|
||||||
|
* that's the case */
|
||||||
if (opts & MU_MSG_OPTION_HEADERS_ONLY)
|
if (opts & MU_MSG_OPTION_HEADERS_ONLY)
|
||||||
append_sexp_contacts (gstr, msg);
|
append_sexp_contacts (gstr, msg);
|
||||||
|
|
||||||
|
@ -454,9 +457,9 @@ mu_msg_to_sexp (MuMsg *msg, unsigned docid, const MuMsgIterThreadInfo *ti,
|
||||||
mu_msg_prio_name(mu_msg_get_prio(msg)));
|
mu_msg_prio_name(mu_msg_get_prio(msg)));
|
||||||
append_sexp_flags (gstr, msg);
|
append_sexp_flags (gstr, msg);
|
||||||
|
|
||||||
/* headers are retrieved from the database, views from the message file
|
/* headers are retrieved from the database, views from the
|
||||||
* file attr things can only be gotten from the file (ie., mu
|
* message file file attr things can only be gotten from the
|
||||||
* view), not from the database (mu find). */
|
* file (ie., mu view), not from the database (mu find). */
|
||||||
if (!(opts & MU_MSG_OPTION_HEADERS_ONLY))
|
if (!(opts & MU_MSG_OPTION_HEADERS_ONLY))
|
||||||
append_message_file_parts (gstr, msg, opts);
|
append_message_file_parts (gstr, msg, opts);
|
||||||
|
|
||||||
|
|
|
@ -406,7 +406,9 @@ prune_empty_containers (MuContainer *root_set)
|
||||||
{
|
{
|
||||||
MuContainer *cur;
|
MuContainer *cur;
|
||||||
|
|
||||||
mu_container_foreach (root_set, (MuContainerForeachFunc)prune_maybe, NULL);
|
mu_container_foreach (root_set,
|
||||||
|
(MuContainerForeachFunc)prune_maybe,
|
||||||
|
NULL);
|
||||||
|
|
||||||
/* and prune the root_set itself... */
|
/* and prune the root_set itself... */
|
||||||
for (cur = root_set; cur; cur = cur->next) {
|
for (cur = root_set; cur; cur = cur->next) {
|
||||||
|
@ -418,7 +420,8 @@ prune_empty_containers (MuContainer *root_set)
|
||||||
MuContainer *newchild;
|
MuContainer *newchild;
|
||||||
newchild = cur->child;
|
newchild = cur->child;
|
||||||
cur->child = NULL;
|
cur->child = NULL;
|
||||||
root_set = mu_container_append_siblings (root_set, newchild);
|
root_set = mu_container_append_siblings (root_set,
|
||||||
|
newchild);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue