* cosmetic / minor

This commit is contained in:
djcb
2012-10-27 14:41:20 +03:00
parent 38067eda44
commit ec25124693
4 changed files with 14 additions and 7 deletions

View File

@ -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 user_data a user-provide pointer that will be passed to the callback
* @param options, bit-wise OR'ed * @param options, bit-wise OR'ed
* *
* @return FALSE in case of error, TRUE otherwise
*/ */
gboolean mu_msg_part_foreach (MuMsg *msg, MuMsgOptions opts, gboolean mu_msg_part_foreach (MuMsg *msg, MuMsgOptions opts,
MuMsgPartForeachFunc func, gpointer user_data); MuMsgPartForeachFunc func, gpointer user_data);

View File

@ -345,8 +345,7 @@ append_sexp_parts (GString *gstr, MuMsg *msg, MuMsgOptions opts)
if (!mu_msg_part_foreach (msg, opts, (MuMsgPartForeachFunc)each_part, if (!mu_msg_part_foreach (msg, opts, (MuMsgPartForeachFunc)each_part,
&pinfo)) { &pinfo)) {
/* if decryption failed, mark this message as encrypted */ /* do nothing */
g_string_append (gstr, "\t:encrypted t\n");
} else if (pinfo.parts) { } else if (pinfo.parts) {
g_string_append_printf (gstr, "\t:parts (%s)\n", pinfo.parts); g_string_append_printf (gstr, "\t:parts (%s)\n", pinfo.parts);
g_free (pinfo.parts); g_free (pinfo.parts);

View File

@ -30,6 +30,10 @@
G_BEGIN_DECLS G_BEGIN_DECLS
/**
* @addtogroup MuStr
* @{
*/
/** /**
* create a 'display contact' from an email header To/Cc/Bcc/From-type address * 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); gchar* mu_str_quoted_from_strv (const gchar **params);
/** @} */
G_END_DECLS G_END_DECLS
#endif /*__MU_STR_H__*/ #endif /*__MU_STR_H__*/

View File

@ -434,10 +434,11 @@ at POINT, or if nil, at (point)."
(when attachments (when attachments
(mu4e~view-construct-header :attachments attstr t)))) (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 ;; "Decrypt maybe; depends on whether there are any such parts
;; and the value of `mu4e-view-decrypt-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 ;; (mu4e-view-for-each-part msg
;; (lambda (msg part) ;; (lambda (msg part)
;; (when (member 'encrypted (mu4e-message-part-field part :type)) ;; (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)))) ;; (err (mu4e-error "Decryption failed: %S" err))))
;; (decr ;; (decr
;; (if (and decr (plist-get mu4e~server-props :crypto)) ;; (if (and decr (plist-get mu4e~server-props :crypto))
;;
;; )))) ;; TODO: reload message ;; )))) ;; TODO: reload message
;; ;; otherwise, we try to handle it here. ;; ;; otherwise, we try to handle it here.
;; ) ;; )
;; decr)))))))) ;; decr))))))
(defun mu4e-view-for-each-part (msg func) (defun mu4e-view-for-each-part (msg func)
"Apply FUNC to each part in MSG. FUNC should be a function taking "Apply FUNC to each part in MSG. FUNC should be a function taking