From ec251246931e5690b8ce888620570ff5f5b06e05 Mon Sep 17 00:00:00 2001 From: djcb Date: Sat, 27 Oct 2012 14:41:20 +0300 Subject: [PATCH] * cosmetic / minor --- lib/mu-msg-part.h | 1 + lib/mu-msg-sexp.c | 3 +-- lib/mu-str.h | 6 ++++++ mu4e/mu4e-view.el | 11 ++++++----- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/lib/mu-msg-part.h b/lib/mu-msg-part.h index 42645c27..0552dfcd 100644 --- a/lib/mu-msg-part.h +++ b/lib/mu-msg-part.h @@ -245,6 +245,7 @@ typedef void (*MuMsgPartForeachFunc) (MuMsg *msg, MuMsgPart*, gpointer); * @param user_data a user-provide pointer that will be passed to the callback * @param options, bit-wise OR'ed * + * @return FALSE in case of error, TRUE otherwise */ gboolean mu_msg_part_foreach (MuMsg *msg, MuMsgOptions opts, MuMsgPartForeachFunc func, gpointer user_data); diff --git a/lib/mu-msg-sexp.c b/lib/mu-msg-sexp.c index 471153d4..c0fc1fe2 100644 --- a/lib/mu-msg-sexp.c +++ b/lib/mu-msg-sexp.c @@ -345,8 +345,7 @@ append_sexp_parts (GString *gstr, MuMsg *msg, MuMsgOptions opts) if (!mu_msg_part_foreach (msg, opts, (MuMsgPartForeachFunc)each_part, &pinfo)) { - /* if decryption failed, mark this message as encrypted */ - g_string_append (gstr, "\t:encrypted t\n"); + /* do nothing */ } else if (pinfo.parts) { g_string_append_printf (gstr, "\t:parts (%s)\n", pinfo.parts); g_free (pinfo.parts); diff --git a/lib/mu-str.h b/lib/mu-str.h index 118c6f36..dc5318c7 100644 --- a/lib/mu-str.h +++ b/lib/mu-str.h @@ -30,6 +30,10 @@ G_BEGIN_DECLS +/** + * @addtogroup MuStr + * @{ + */ /** * create a 'display contact' from an email header To/Cc/Bcc/From-type address @@ -329,6 +333,8 @@ const gchar* mu_str_subject_normalize (const gchar* str); */ gchar* mu_str_quoted_from_strv (const gchar **params); +/** @} */ + G_END_DECLS #endif /*__MU_STR_H__*/ diff --git a/mu4e/mu4e-view.el b/mu4e/mu4e-view.el index 050cca8a..2431623a 100644 --- a/mu4e/mu4e-view.el +++ b/mu4e/mu4e-view.el @@ -434,10 +434,11 @@ at POINT, or if nil, at (point)." (when attachments (mu4e~view-construct-header :attachments attstr t)))) -;; (defun mu4e~decrypt-parts-maybe (msg) +;; (defun mu4e~decrypt-parts-maybe () ;; "Decrypt maybe; depends on whether there are any such parts ;; and the value of `mu4e-view-decrypt-parts'." -;; (let ((str "")) +;; (interactive) +;; (let ((str "") (msg (mu4e-message-at-point))) ;; (mu4e-view-for-each-part msg ;; (lambda (msg part) ;; (when (member 'encrypted (mu4e-message-part-field part :type)) @@ -452,11 +453,11 @@ at POINT, or if nil, at (point)." ;; (err (mu4e-error "Decryption failed: %S" err)))) ;; (decr ;; (if (and decr (plist-get mu4e~server-props :crypto)) -;; + ;; )))) ;; TODO: reload message ;; ;; otherwise, we try to handle it here. ;; ) -;; decr)))))))) +;; decr)))))) (defun mu4e-view-for-each-part (msg func) "Apply FUNC to each part in MSG. FUNC should be a function taking @@ -476,7 +477,7 @@ at POINT, or if nil, at (point)." (let ((map (make-sparse-keymap))) (define-key map (kbd "C-S-u") 'mu4e-update-mail-and-index) - + (define-key map "q" 'mu4e~view-quit-buffer) ;; note, 'z' is by-default bound to 'bury-buffer'