[Commits] [SCM] claws branch, master, updated. 3.9.3-154-gf04a873
colin at claws-mail.org
colin at claws-mail.org
Fri May 2 12:39:40 CEST 2014
The branch master of project "claws" (Claws Mail) has been updated
via f04a8733e6cb9a1d746c77629823fcab310d68a3 (commit)
via 9be8d70d88b0252130d36773e668c204ed2d26b0 (commit)
via 2b0b467727d110b8505517bd92261608e499f57f (commit)
via 549ee9bcb64e38a31e9b26b9bb130b7b4e107436 (commit)
via e9292600bd46c769bebe82862bce447d65ba558c (commit)
from a70f2a5ffcad7910ffa2616663ac60075ed9e58d (commit)
- Log -----------------------------------------------------------------
commit f04a8733e6cb9a1d746c77629823fcab310d68a3
Author: Colin Leroy <colin at colino.net>
Date: Fri May 2 12:38:57 2014 +0200
Factorize if
diff --git a/src/mimeview.c b/src/mimeview.c
index 17223b8..9326e47 100644
--- a/src/mimeview.c
+++ b/src/mimeview.c
@@ -2659,22 +2659,17 @@ static void icon_list_toggle_by_mime_info (MimeView *mimeview,
children = gtk_container_get_children(GTK_CONTAINER(mimeview->icon_vbox));
for (child = children; child != NULL; child = g_list_next(child)) {
+ gboolean *highlight = NULL;
+ GtkWidget *icon = gtk_bin_get_child(GTK_BIN(child->data));
+
if (!GTK_IS_EVENT_BOX(child->data))
continue;
- if(g_object_get_data(G_OBJECT(child->data),
- "partinfo") == (gpointer)mimeinfo) {
- gboolean *highlight = NULL;
- GtkWidget *icon = gtk_bin_get_child(GTK_BIN(child->data));
- highlight = g_object_get_data(G_OBJECT(icon), "highlight");
- *highlight = TRUE;
- gtk_widget_queue_draw(icon);
- } else {
- gint *highlight = NULL;
- GtkWidget *icon = gtk_bin_get_child(GTK_BIN(child->data));
- highlight = g_object_get_data(G_OBJECT(icon), "highlight");
- *highlight = FALSE;
- gtk_widget_queue_draw(icon);
- }
+
+ highlight = g_object_get_data(G_OBJECT(icon), "highlight");
+ *highlight = (g_object_get_data(G_OBJECT(child->data),
+ "partinfo") == (gpointer)mimeinfo);
+
+ gtk_widget_queue_draw(icon);
}
g_list_free(children);
}
commit 9be8d70d88b0252130d36773e668c204ed2d26b0
Author: Colin Leroy <colin at colino.net>
Date: Fri May 2 12:37:13 2014 +0200
Fix disappearing highlight in mails with PGP signatures
diff --git a/src/mimeview.c b/src/mimeview.c
index 37f3828..17223b8 100644
--- a/src/mimeview.c
+++ b/src/mimeview.c
@@ -2647,6 +2647,9 @@ static void icon_list_create(MimeView *mimeview, MimeInfo *mimeinfo)
gtk_widget_set_size_request(mimeview->icon_mainbox,
size.width, -1);
}
+ if (mimeview->opened)
+ icon_list_toggle_by_mime_info(mimeview,
+ mimeview_get_node_part(mimeview, mimeview->opened));
}
static void icon_list_toggle_by_mime_info (MimeView *mimeview,
commit 2b0b467727d110b8505517bd92261608e499f57f
Author: Colin Leroy <colin at colino.net>
Date: Fri May 2 12:11:28 2014 +0200
More simplification
diff --git a/src/textview.c b/src/textview.c
index 9131f91..2d027c2 100644
--- a/src/textview.c
+++ b/src/textview.c
@@ -636,15 +636,7 @@ void textview_show_part(TextView *textview, MimeInfo *mimeinfo, FILE *fp)
textview_clear(textview);
- if (mimeinfo->type == MIMETYPE_MULTIPART ||
- (mimeinfo->type == MIMETYPE_MESSAGE && !g_ascii_strcasecmp(mimeinfo->subtype, "rfc822"))) {
- textview_add_parts(textview, mimeinfo);
- } else {
- if (fseek(fp, mimeinfo->offset, SEEK_SET) < 0)
- perror("fseek");
-
- textview_write_body(textview, mimeinfo);
- }
+ textview_add_parts(textview, mimeinfo);
textview->loading = FALSE;
textview->stop_loading = FALSE;
@@ -805,7 +797,7 @@ static void textview_add_part(TextView *textview, MimeInfo *mimeinfo)
END_TIMING();
GTK_EVENTS_FLUSH();
}
- } else if (mimeinfo->type == MIMETYPE_TEXT) {
+ } else {
if (prefs_common.display_header && (charcount > 0))
gtk_text_buffer_insert(buffer, &iter, "\n", 1);
commit 549ee9bcb64e38a31e9b26b9bb130b7b4e107436
Author: Colin Leroy <colin at colino.net>
Date: Fri May 2 12:02:05 2014 +0200
Remove obviously dead code
diff --git a/src/textview.c b/src/textview.c
index d10485d..9131f91 100644
--- a/src/textview.c
+++ b/src/textview.c
@@ -636,17 +636,14 @@ void textview_show_part(TextView *textview, MimeInfo *mimeinfo, FILE *fp)
textview_clear(textview);
- if ((mimeinfo->type == MIMETYPE_MULTIPART) ||
- ((mimeinfo->type == MIMETYPE_MESSAGE) && !g_ascii_strcasecmp(mimeinfo->subtype, "rfc822"))) {
+ if (mimeinfo->type == MIMETYPE_MULTIPART ||
+ (mimeinfo->type == MIMETYPE_MESSAGE && !g_ascii_strcasecmp(mimeinfo->subtype, "rfc822"))) {
textview_add_parts(textview, mimeinfo);
} else {
if (fseek(fp, mimeinfo->offset, SEEK_SET) < 0)
perror("fseek");
- if (mimeinfo->type == MIMETYPE_MULTIPART)
- textview_add_parts(textview, mimeinfo);
- else
- textview_write_body(textview, mimeinfo);
+ textview_write_body(textview, mimeinfo);
}
textview->loading = FALSE;
commit e9292600bd46c769bebe82862bce447d65ba558c
Author: Colin Leroy <colin at colino.net>
Date: Fri May 2 11:57:33 2014 +0200
Factorize to make clearer
diff --git a/src/textview.c b/src/textview.c
index 37456df..d10485d 100644
--- a/src/textview.c
+++ b/src/textview.c
@@ -631,38 +631,28 @@ void textview_show_part(TextView *textview, MimeInfo *mimeinfo, FILE *fp)
cm_return_if_fail(mimeinfo != NULL);
cm_return_if_fail(fp != NULL);
- if ((mimeinfo->type == MIMETYPE_MULTIPART) ||
- ((mimeinfo->type == MIMETYPE_MESSAGE) && !g_ascii_strcasecmp(mimeinfo->subtype, "rfc822"))) {
- textview->loading = TRUE;
- textview->stop_loading = FALSE;
-
- textview_clear(textview);
- textview_add_parts(textview, mimeinfo);
-
- textview->loading = FALSE;
- textview->stop_loading = FALSE;
- textview_set_position(textview, 0);
-
- END_TIMING();
- return;
- }
textview->loading = TRUE;
textview->stop_loading = FALSE;
- if (fseek(fp, mimeinfo->offset, SEEK_SET) < 0)
- perror("fseek");
-
textview_clear(textview);
- if (mimeinfo->type == MIMETYPE_MULTIPART)
+ if ((mimeinfo->type == MIMETYPE_MULTIPART) ||
+ ((mimeinfo->type == MIMETYPE_MESSAGE) && !g_ascii_strcasecmp(mimeinfo->subtype, "rfc822"))) {
textview_add_parts(textview, mimeinfo);
- else
- textview_write_body(textview, mimeinfo);
+ } else {
+ if (fseek(fp, mimeinfo->offset, SEEK_SET) < 0)
+ perror("fseek");
+
+ if (mimeinfo->type == MIMETYPE_MULTIPART)
+ textview_add_parts(textview, mimeinfo);
+ else
+ textview_write_body(textview, mimeinfo);
+ }
textview->loading = FALSE;
textview->stop_loading = FALSE;
-
textview_set_position(textview, 0);
+
END_TIMING();
}
-----------------------------------------------------------------------
Summary of changes:
src/mimeview.c | 26 ++++++++++++--------------
src/textview.c | 27 +++------------------------
2 files changed, 15 insertions(+), 38 deletions(-)
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list