* mu-cmd-*: minor, updates for API changes

This commit is contained in:
Dirk-Jan C. Binnema
2011-09-12 20:34:48 +03:00
parent b944da0ae1
commit 1a7414dd6d
4 changed files with 10 additions and 13 deletions

View File

@ -172,7 +172,10 @@ run_cmd_cfind (const char* pattern, MuConfigFormat format,
gboolean rv; gboolean rv;
MuContacts *contacts; MuContacts *contacts;
size_t num; size_t num;
ECData ecdata = {format, color}; ECData ecdata;
ecdata.format = format;
ecdata.color = color;
contacts = mu_contacts_new (mu_runtime_path(MU_RUNTIME_PATH_CONTACTS)); contacts = mu_contacts_new (mu_runtime_path(MU_RUNTIME_PATH_CONTACTS));
if (!contacts) { if (!contacts) {

View File

@ -544,13 +544,10 @@ display_field (MuMsg *msg, MuMsgFieldId mfid)
static void static void
print_summary (MuMsg *msg) print_summary (MuMsg *msg)
{ {
GError *err;
char *summ; char *summ;
const guint SUMMARY_LEN = 5; /* summary based on first 5 const guint SUMMARY_LEN = 5; /* summary based on first 5
* lines */ * lines */
err = NULL;
summ = mu_str_summarize (mu_msg_get_body_text(msg), SUMMARY_LEN); summ = mu_str_summarize (mu_msg_get_body_text(msg), SUMMARY_LEN);
g_print ("Summary: %s\n", summ ? summ : "<none>"); g_print ("Summary: %s\n", summ ? summ : "<none>");
g_free (summ); g_free (summ);
@ -714,8 +711,10 @@ output_sexp (MuMsgIter *iter, gboolean threads,
continue; continue;
ti = threads ? mu_msg_iter_get_thread_info (iter) : NULL; ti = threads ? mu_msg_iter_get_thread_info (iter) : NULL;
sexp = mu_msg_to_sexp (msg,
mu_msg_iter_get_docid (iter),
ti, TRUE);
sexp = mu_msg_to_sexp (msg, ti, TRUE);
fputs (sexp, stdout); fputs (sexp, stdout);
g_free (sexp); g_free (sexp);
@ -763,11 +762,7 @@ output_xml (MuMsgIter *iter, gboolean include_unreadable, GError **err)
for (myiter = iter, count = 0; !mu_msg_iter_is_done (myiter); for (myiter = iter, count = 0; !mu_msg_iter_is_done (myiter);
mu_msg_iter_next (myiter)) { mu_msg_iter_next (myiter)) {
GError *err;
MuMsg *msg; MuMsg *msg;
err = NULL;
msg = mu_msg_iter_get_msg_floating (iter); /* don't unref */ msg = mu_msg_iter_get_msg_floating (iter); /* don't unref */
if (!msg) if (!msg)
return FALSE; return FALSE;

View File

@ -39,7 +39,6 @@
static gboolean MU_CAUGHT_SIGNAL; static gboolean MU_CAUGHT_SIGNAL;
static void static void
sig_handler (int sig) sig_handler (int sig)
{ {

View File

@ -48,7 +48,7 @@ view_msg_sexp (MuMsg *msg)
{ {
char *sexp; char *sexp;
sexp = mu_msg_to_sexp (msg, NULL, FALSE); sexp = mu_msg_to_sexp (msg, 0, NULL, FALSE);
fputs (sexp, stdout); fputs (sexp, stdout);
g_free (sexp); g_free (sexp);
@ -409,7 +409,7 @@ mu_cmd_add (MuStore *store, MuConfig *opts, GError **err)
src = opts->params[i]; src = opts->params[i];
if (!check_file_okay (src, TRUE) || if (!check_file_okay (src, TRUE) ||
!mu_store_store_path (store, src)) { mu_store_add_path (store, src, err) == MU_STORE_INVALID_DOCID) {
MU_WRITE_LOG ("failed to add %s", src); MU_WRITE_LOG ("failed to add %s", src);
allok = FALSE; allok = FALSE;
} }