* cosmetics

This commit is contained in:
djcb
2012-09-05 01:23:00 +03:00
parent 0bd47871e8
commit cf143667e8
2 changed files with 11 additions and 12 deletions

View File

@ -33,11 +33,11 @@ static void
fill_hash (GHashTable *hash, GKeyFile *kfile) fill_hash (GHashTable *hash, GKeyFile *kfile)
{ {
gchar **keys, **cur; gchar **keys, **cur;
keys = g_key_file_get_keys (kfile, MU_BOOKMARK_GROUP, NULL, NULL); keys = g_key_file_get_keys (kfile, MU_BOOKMARK_GROUP, NULL, NULL);
if (!keys) if (!keys)
return; return;
for (cur = keys; *cur; ++cur) { for (cur = keys; *cur; ++cur) {
gchar *val; gchar *val;
val = g_key_file_get_string (kfile, MU_BOOKMARK_GROUP, val = g_key_file_get_string (kfile, MU_BOOKMARK_GROUP,
@ -56,9 +56,9 @@ create_hash_from_key_file (const gchar *bmpath)
{ {
GKeyFile *kfile; GKeyFile *kfile;
GHashTable *hash; GHashTable *hash;
kfile = g_key_file_new (); kfile = g_key_file_new ();
if (!g_key_file_load_from_file (kfile, bmpath, G_KEY_FILE_NONE, NULL)) { if (!g_key_file_load_from_file (kfile, bmpath, G_KEY_FILE_NONE, NULL)) {
g_key_file_free (kfile); g_key_file_free (kfile);
return NULL; return NULL;
@ -79,15 +79,15 @@ mu_bookmarks_new (const gchar *bmpath)
{ {
MuBookmarks *bookmarks; MuBookmarks *bookmarks;
GHashTable *hash; GHashTable *hash;
g_return_val_if_fail (bmpath, NULL); g_return_val_if_fail (bmpath, NULL);
hash = create_hash_from_key_file (bmpath); hash = create_hash_from_key_file (bmpath);
if (!hash) if (!hash)
return NULL; return NULL;
bookmarks = g_new (MuBookmarks, 1); bookmarks = g_new (MuBookmarks, 1);
bookmarks->_bmpath = g_strdup (bmpath); bookmarks->_bmpath = g_strdup (bmpath);
bookmarks->_hash = hash; bookmarks->_hash = hash;
@ -121,7 +121,7 @@ struct _BMData {
gpointer _user_data; gpointer _user_data;
}; };
typedef struct _BMData BMData; typedef struct _BMData BMData;
static void static void
each_bookmark (const gchar* key, const gchar *val, BMData *bmdata) each_bookmark (const gchar* key, const gchar *val, BMData *bmdata)
@ -135,13 +135,12 @@ mu_bookmarks_foreach (MuBookmarks *bm, MuBookmarksForeachFunc func,
gpointer user_data) gpointer user_data)
{ {
BMData bmdata; BMData bmdata;
g_return_if_fail (bm); g_return_if_fail (bm);
g_return_if_fail (func); g_return_if_fail (func);
bmdata._func = func; bmdata._func = func;
bmdata._user_data = user_data; bmdata._user_data = user_data;
g_hash_table_foreach (bm->_hash, (GHFunc)each_bookmark, &bmdata); g_hash_table_foreach (bm->_hash, (GHFunc)each_bookmark, &bmdata);
} }

View File

@ -184,6 +184,7 @@ plist."
(if sizestr (mu4e~view-construct-header field sizestr)))) (if sizestr (mu4e~view-construct-header field sizestr))))
;; attachments ;; attachments
(:attachments (mu4e~view-construct-attachments-header msg)) (:attachments (mu4e~view-construct-attachments-header msg))
;; pgp-signatures
(:signature (mu4e~view-construct-signature-header msg)) (:signature (mu4e~view-construct-signature-header msg))
(t (mu4e-error "Unsupported field: %S" field))))) (t (mu4e-error "Unsupported field: %S" field)))))
mu4e-view-fields "") mu4e-view-fields "")
@ -342,7 +343,6 @@ at POINT, or if nil, at (point)."
(btn (when val (btn (when val
(with-temp-buffer (with-temp-buffer
(insert-text-button "Details" (insert-text-button "Details"
'msg msg
'action (lambda (b) 'action (lambda (b)
(mu4e-view-verify-msg-popup (button-get b 'msg)))) (mu4e-view-verify-msg-popup (button-get b 'msg))))
(buffer-string)))) (buffer-string))))