[Commits] [SCM] claws branch, gtk3, updated. 3.16.0-838-ge39dd37bd
paul at claws-mail.org
paul at claws-mail.org
Tue Nov 19 10:09:45 CET 2019
The branch, gtk3 has been updated
via e39dd37bd199e17f225ee088011b47cd470c09b2 (commit)
via 4b94a12f82591727e40df50165aa601899a3923f (commit)
via 526c5168c5b00a11441ea38f36a82f83432552a0 (commit)
via e0f3a8308d4dcece168a5190b2194abaad981882 (commit)
via bd607fe7f1cbcda709fa1a4694510db44d27db6a (commit)
via 9b7d4a4c14edb8f67fef2dd4e6c527de0f8754c8 (commit)
via 7101f40bfb4104823a0c8e5f3217f34d7d540840 (commit)
via 48d3a5452c526c332c71a0580ca87f2a1aeb8540 (commit)
via ebb4127098911debb0ca42fee34e89c3e3a19e61 (commit)
via c209879fb91f5987354f19bb485e85d899543bd1 (commit)
via b1bdeb3febe4b908996d4728c265c16679cd11a4 (commit)
via fddefcb853e8bb0bfc1e12bb1415c82ca82812d5 (commit)
via b63a048d3ed518bfffe9db228bb0726c8ad47e28 (commit)
via 09c4296aaaf94673891fe15bc2ef0dfcc8b54c21 (commit)
via db3a75f4a6707110eb259c4771c9d7c60641d06b (commit)
via 03ebc8f791eaa6734ad2004b908af00baad4aaf4 (commit)
from 14b243655db5f329306c6e764a05f2ff69c284d5 (commit)
Summary of changes:
configure.ac | 84 +++++++++++++++++++++------------
src/addressadd.c | 2 +
src/addressbook_foldersel.c | 2 +
src/common/session.c | 60 +++++++++++------------
src/common/session.h | 3 +-
src/compose.c | 8 +++-
src/compose.h | 3 +-
src/inc.c | 33 +++++++------
src/inc.h | 4 +-
src/main.c | 7 +--
src/messageview.c | 12 +++++
src/mimeview.c | 8 ++++
src/mimeview.h | 2 +
src/plugins/litehtml_viewer/lh_viewer.c | 30 +++++++++++-
src/plugins/pgpinline/pgpinline.c | 4 +-
src/plugins/pgpmime/pgpmime.c | 4 +-
src/plugins/smime/smime.c | 2 +-
src/prefs_msg_colors.c | 9 +++-
src/printing.c | 16 ++++---
19 files changed, 192 insertions(+), 101 deletions(-)
- Log -----------------------------------------------------------------
commit e39dd37bd199e17f225ee088011b47cd470c09b2
Author: Paul <paul at claws-mail.org>
Date: Mon Nov 18 13:07:48 2019 +0000
when user cancels the signing passphrase dialogue, don't bother the user with an "error" dialogue
diff --git a/src/compose.c b/src/compose.c
index 072ae7a46..c422f5283 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -5276,6 +5276,9 @@ static void _display_queue_error(ComposeQueueResult val)
alertpanel_error(_("Could not queue message for sending:\n\n"
"Couldn't get recipient encryption key."));
break;
+ case COMPOSE_QUEUE_SIGNING_CANCELLED:
+ debug_print("signing cancelled\n");
+ break;
default:
/* unhandled error */
debug_print("oops, unhandled compose_queue() return value %d\n",
@@ -5914,7 +5917,10 @@ static gint compose_write_to_file(Compose *compose, FILE *fp, gint action, gbool
compose->account, from_addr)) {
g_free(from_name);
g_free(from_addr);
- return COMPOSE_QUEUE_ERROR_SIGNING_FAILED;
+ if (!privacy_peek_error())
+ return COMPOSE_QUEUE_SIGNING_CANCELLED;
+ else
+ return COMPOSE_QUEUE_ERROR_SIGNING_FAILED;
}
g_free(from_name);
g_free(from_addr);
diff --git a/src/compose.h b/src/compose.h
index dee18a18c..99441d726 100644
--- a/src/compose.h
+++ b/src/compose.h
@@ -92,7 +92,8 @@ typedef enum
COMPOSE_QUEUE_ERROR_SIGNING_FAILED = -3,
COMPOSE_QUEUE_ERROR_ENCRYPT_FAILED = -4,
COMPOSE_QUEUE_ERROR_CHAR_CONVERSION = -5,
- COMPOSE_QUEUE_ERROR_NO_ENCRYPTION_KEY = -6
+ COMPOSE_QUEUE_ERROR_NO_ENCRYPTION_KEY = -6,
+ COMPOSE_QUEUE_SIGNING_CANCELLED = -7
} ComposeQueueResult;
typedef enum {
commit 4b94a12f82591727e40df50165aa601899a3923f
Author: Paul <paul at claws-mail.org>
Date: Mon Nov 18 13:02:06 2019 +0000
replace deprecated g_memmove with memmove
diff --git a/src/plugins/pgpinline/pgpinline.c b/src/plugins/pgpinline/pgpinline.c
index f69c79140..c5a05fb99 100644
--- a/src/plugins/pgpinline/pgpinline.c
+++ b/src/plugins/pgpinline/pgpinline.c
@@ -586,7 +586,7 @@ static gboolean pgpinline_sign(MimeInfo *mimeinfo, PrefsAccount *account, const
}
tmp = g_malloc(len+1);
- g_memmove(tmp, sigcontent, len+1);
+ memmove(tmp, sigcontent, len+1);
tmp[len] = '\0';
gpgme_data_release(gpgtext);
g_free(textstr);
@@ -733,7 +733,7 @@ static gboolean pgpinline_encrypt(MimeInfo *mimeinfo, const gchar *encrypt_data)
}
tmp = g_malloc(len+1);
- g_memmove(tmp, enccontent, len+1);
+ memmove(tmp, enccontent, len+1);
tmp[len] = '\0';
g_free(enccontent);
diff --git a/src/plugins/pgpmime/pgpmime.c b/src/plugins/pgpmime/pgpmime.c
index 539c2f895..595fa92e9 100644
--- a/src/plugins/pgpmime/pgpmime.c
+++ b/src/plugins/pgpmime/pgpmime.c
@@ -599,7 +599,7 @@ gboolean pgpmime_sign(MimeInfo *mimeinfo, PrefsAccount *account, const gchar *fr
newinfo->description = g_strdup(_("OpenPGP digital signature"));
newinfo->content = MIMECONTENT_MEM;
newinfo->data.mem = g_malloc(len + 1);
- g_memmove(newinfo->data.mem, sigcontent, len);
+ memmove(newinfo->data.mem, sigcontent, len);
newinfo->data.mem[len] = '\0';
newinfo->tmp = TRUE;
g_node_append(sigmultipart->node, newinfo->node);
@@ -746,7 +746,7 @@ gboolean pgpmime_encrypt(MimeInfo *mimeinfo, const gchar *encrypt_data)
newinfo->content = MIMECONTENT_MEM;
newinfo->data.mem = g_malloc(len + 1);
newinfo->tmp = TRUE;
- g_memmove(newinfo->data.mem, enccontent, len);
+ memmove(newinfo->data.mem, enccontent, len);
newinfo->data.mem[len] = '\0';
g_node_append(encmultipart->node, newinfo->node);
diff --git a/src/plugins/smime/smime.c b/src/plugins/smime/smime.c
index fd50f1e3f..0d8325938 100644
--- a/src/plugins/smime/smime.c
+++ b/src/plugins/smime/smime.c
@@ -692,7 +692,7 @@ gboolean smime_sign(MimeInfo *mimeinfo, PrefsAccount *account, const gchar *from
g_strdup("smime.p7s"));
newinfo->data.mem = g_malloc(len + 1);
newinfo->tmp = TRUE;
- g_memmove(newinfo->data.mem, real_content, len);
+ memmove(newinfo->data.mem, real_content, len);
newinfo->data.mem[len] = '\0';
newinfo->encoding_type = ENC_BASE64;
g_node_append(sigmultipart->node, newinfo->node);
commit 526c5168c5b00a11441ea38f36a82f83432552a0
Author: Paul <paul at claws-mail.org>
Date: Fri Nov 15 11:54:26 2019 +0000
don't save 'last_opened_folder' value if 'goto_last_folder_on_startup' is not set
Based on patch by Olaf Hering
diff --git a/src/main.c b/src/main.c
index f2b81b3da..06cd115b5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1687,6 +1687,7 @@ static void exit_claws(MainWindow *mainwin)
if (prefs_common.last_opened_folder != NULL)
g_free(prefs_common.last_opened_folder);
prefs_common.last_opened_folder =
+ !prefs_common.goto_last_folder_on_startup ? NULL :
folder_item_get_identifier(item);
}
commit e0f3a8308d4dcece168a5190b2194abaad981882
Author: Paul <paul at claws-mail.org>
Date: Tue Nov 12 16:18:43 2019 +0000
missed this in last commit
diff --git a/src/inc.c b/src/inc.c
index 01e49c51f..44355f353 100644
--- a/src/inc.c
+++ b/src/inc.c
@@ -553,10 +553,8 @@ static void inc_progress_dialog_destroy(IncProgressDialog *inc_dialog)
main_window_progress_off(inc_dialog->mainwin);
progress_dialog_destroy(inc_dialog->dialog);
-#if GLIB_CHECK_VERSION(2,26,1)
g_date_time_unref(inc_dialog->progress_tv);
g_date_time_unref(inc_dialog->folder_tv);
-#endif
g_free(inc_dialog);
}
commit bd607fe7f1cbcda709fa1a4694510db44d27db6a
Author: Paul <paul at claws-mail.org>
Date: Tue Nov 12 10:11:22 2019 +0000
GDateTime etc have been available since 2.26, we require min 2.28, no need for these checks
diff --git a/src/common/session.c b/src/common/session.c
index c7a42f084..7ef085d1f 100644
--- a/src/common/session.c
+++ b/src/common/session.c
@@ -75,11 +75,7 @@ void session_init(Session *session, const void *prefs_account, gboolean is_smtp)
session->state = SESSION_READY;
session->last_access_time = time(NULL);
-#if GLIB_CHECK_VERSION(2,61,2)
session->tv_prev = g_date_time_new_now_local();
-#else
- g_get_current_time(&session->tv_prev);
-#endif
session->conn_id = 0;
@@ -268,9 +264,7 @@ void session_destroy(Session *session)
#ifdef USE_GNUTLS
g_free(session->gnutls_priority);
#endif
-#if GLIB_CHECK_VERSION(2,61,2)
g_date_time_unref(session->tv_prev);
-#endif
debug_print("session (%p): destroyed\n", session);
g_free(session);
@@ -506,12 +500,8 @@ gint session_send_data(Session *session, const guchar *data, guint size)
session->write_data = data;
session->write_data_p = session->write_data;
session->write_data_len = size;
-#if GLIB_CHECK_VERSION(2,61,2)
g_date_time_unref(session->tv_prev);
session->tv_prev = g_date_time_new_now_local();
-#else
- g_get_current_time(&session->tv_prev);
-#endif
ret = session_write_data_cb(session->sock, G_IO_OUT, session);
@@ -533,12 +523,8 @@ gint session_recv_data(Session *session, guint size, const gchar *terminator)
g_free(session->read_data_terminator);
session->read_data_terminator = g_strdup(terminator);
-#if GLIB_CHECK_VERSION(2,61,2)
g_date_time_unref(session->tv_prev);
session->tv_prev = g_date_time_new_now_local();
-#else
- g_get_current_time(&session->tv_prev);
-#endif
if (session->read_buf_len > 0)
g_idle_add(session_recv_data_idle_cb, session);
@@ -727,7 +713,6 @@ static gboolean session_read_data_cb(SockInfo *source, GIOCondition condition,
/* incomplete read */
if (!complete) {
-#if GLIB_CHECK_VERSION(2,61,2)
GDateTime *tv_cur = g_date_time_new_now_local();
GTimeSpan ts = g_date_time_difference(tv_cur, session->tv_prev);
@@ -739,19 +724,6 @@ static gboolean session_read_data_cb(SockInfo *source, GIOCondition condition,
session->tv_prev = g_date_time_new_now_local();
}
g_date_time_unref(tv_cur);
-#else
- GTimeVal tv_cur;
-
- g_get_current_time(&tv_cur);
- if (tv_cur.tv_sec - session->tv_prev.tv_sec > 0 ||
- tv_cur.tv_usec - session->tv_prev.tv_usec >
- UI_REFRESH_INTERVAL) {
- session->recv_data_progressive_notify
- (session, data_buf->len, 0,
- session->recv_data_progressive_notify_data);
- g_get_current_time(&session->tv_prev);
- }
-#endif
return TRUE;
}
@@ -912,7 +884,6 @@ static gboolean session_write_data_cb(SockInfo *source,
session->state = SESSION_ERROR;
return FALSE;
} else if (ret > 0) {
-#if GLIB_CHECK_VERSION(2,61,2)
GDateTime *tv_cur = g_date_time_new_now_local();
GTimeSpan ts = g_date_time_difference(tv_cur, session->tv_prev);
@@ -927,23 +898,6 @@ static gboolean session_write_data_cb(SockInfo *source,
session->tv_prev = g_date_time_new_now_local();
}
g_date_time_unref(tv_cur);
-#else
- GTimeVal tv_cur;
-
- g_get_current_time(&tv_cur);
- if (tv_cur.tv_sec - session->tv_prev.tv_sec > 0 ||
- tv_cur.tv_usec - session->tv_prev.tv_usec >
- UI_REFRESH_INTERVAL) {
- session_set_timeout(session, session->timeout_interval);
- session->send_data_progressive_notify
- (session,
- session->write_data_p - session->write_data,
- write_data_len,
- session->send_data_progressive_notify_data);
- g_get_current_time(&session->tv_prev);
- }
-
-#endif
return TRUE;
}
diff --git a/src/common/session.h b/src/common/session.h
index d24e75030..f72270c88 100644
--- a/src/common/session.h
+++ b/src/common/session.h
@@ -88,11 +88,7 @@ struct _Session
SessionState state;
time_t last_access_time;
-#if GLIB_CHECK_VERSION(2,61,2)
GDateTime *tv_prev;
-#else
- GTimeVal tv_prev;
-#endif
gint conn_id;
gint io_tag;
diff --git a/src/inc.c b/src/inc.c
index 48098c614..01e49c51f 100644
--- a/src/inc.c
+++ b/src/inc.c
@@ -508,13 +508,8 @@ static IncProgressDialog *inc_progress_dialog_create(gboolean autocheck)
}
dialog->dialog = progress;
-#if GLIB_CHECK_VERSION(2,61,2)
dialog->progress_tv = g_date_time_new_now_local();
dialog->folder_tv = g_date_time_new_now_local();
-#else
- g_get_current_time(&dialog->progress_tv);
- g_get_current_time(&dialog->folder_tv);
-#endif
dialog->queue_list = NULL;
dialog->cur_row = 0;
@@ -558,7 +553,7 @@ static void inc_progress_dialog_destroy(IncProgressDialog *inc_dialog)
main_window_progress_off(inc_dialog->mainwin);
progress_dialog_destroy(inc_dialog->dialog);
-#if GLIB_CHECK_VERSION(2,61,2)
+#if GLIB_CHECK_VERSION(2,26,1)
g_date_time_unref(inc_dialog->progress_tv);
g_date_time_unref(inc_dialog->folder_tv);
#endif
@@ -1091,7 +1086,6 @@ static void inc_progress_dialog_set_progress(IncProgressDialog *inc_dialog,
static void inc_progress_dialog_update_periodic(IncProgressDialog *inc_dialog,
IncSession *inc_session)
{
-#if GLIB_CHECK_VERSION(2,61,2)
GDateTime *tv_cur = g_date_time_new_now_local();
GTimeSpan tv_result;
@@ -1107,28 +1101,6 @@ static void inc_progress_dialog_update_periodic(IncProgressDialog *inc_dialog,
g_date_time_unref(inc_dialog->progress_tv);
inc_dialog->progress_tv = tv_cur;
}
-#else
- GTimeVal tv_cur;
- GTimeVal tv_result;
-
- gint msec;
-
- g_get_current_time(&tv_cur);
-
- tv_result.tv_sec = tv_cur.tv_sec - inc_dialog->progress_tv.tv_sec;
- tv_result.tv_usec = tv_cur.tv_usec - inc_dialog->progress_tv.tv_usec;
- if (tv_result.tv_usec < 0) {
- tv_result.tv_sec--;
- tv_result.tv_usec += G_USEC_PER_SEC;
- }
-
- msec = tv_result.tv_sec * 1000 + tv_result.tv_usec / 1000;
- if (msec > PROGRESS_UPDATE_INTERVAL) {
- inc_progress_dialog_update(inc_dialog, inc_session);
- inc_dialog->progress_tv.tv_sec = tv_cur.tv_sec;
- inc_dialog->progress_tv.tv_usec = tv_cur.tv_usec;
- }
-#endif
}
static gint inc_recv_data_progressive(Session *session, guint cur_len,
diff --git a/src/inc.h b/src/inc.h
index c8d38b620..13f10c1cb 100644
--- a/src/inc.h
+++ b/src/inc.h
@@ -58,13 +58,8 @@ struct _IncProgressDialog
gboolean show_dialog;
-#if GLIB_CHECK_VERSION(2,61,2)
GDateTime *progress_tv;
GDateTime *folder_tv;
-#else
- GTimeVal progress_tv;
- GTimeVal folder_tv;
-#endif
GList *queue_list; /* list of IncSession */
gint cur_row;
commit 9b7d4a4c14edb8f67fef2dd4e6c527de0f8754c8
Author: wwp <subscript at free.fr>
Date: Mon Nov 11 00:14:55 2019 +0100
Addressbook folder selection dialogs: make sure folder list is
sorted and apply global prefs to get stripes in lists.
diff --git a/src/addressadd.c b/src/addressadd.c
index 5049fa956..709ae4a52 100644
--- a/src/addressadd.c
+++ b/src/addressadd.c
@@ -266,6 +266,8 @@ static void addressadd_create( void ) {
tree_folder = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
g_object_unref(store);
+ gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(store), ADDRADD_COL_NAME, GTK_SORT_ASCENDING);
+ gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(tree_folder), prefs_common.use_stripes_everywhere);
gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(tree_folder), TRUE);
gtk_tree_view_set_enable_tree_lines(GTK_TREE_VIEW(tree_folder), FALSE);
gtk_tree_view_set_search_column(GTK_TREE_VIEW(tree_folder),
diff --git a/src/addressbook_foldersel.c b/src/addressbook_foldersel.c
index cb8cc54f8..7228b79ff 100644
--- a/src/addressbook_foldersel.c
+++ b/src/addressbook_foldersel.c
@@ -184,6 +184,8 @@ static void addressbook_foldersel_create( void )
GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_POINTER);
view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
+ gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(store), COL_NAME, GTK_SORT_ASCENDING);
+ gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(view), prefs_common.use_stripes_everywhere);
gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(view), TRUE);
gtk_tree_view_set_enable_tree_lines(GTK_TREE_VIEW(view), FALSE);
gtk_tree_view_set_search_column(GTK_TREE_VIEW(view), COL_NAME);
commit 7101f40bfb4104823a0c8e5f3217f34d7d540840
Author: Michael Rasmussen <mir at datanom.net>
Date: Mon Nov 11 23:27:08 2019 +0100
Fix use of deprecated GTimeVal since glib 2.61.2
Signed-off-by: Michael Rasmussen <mir at datanom.net>
diff --git a/src/common/session.c b/src/common/session.c
index 2da8e16c2..c7a42f084 100644
--- a/src/common/session.c
+++ b/src/common/session.c
@@ -75,7 +75,11 @@ void session_init(Session *session, const void *prefs_account, gboolean is_smtp)
session->state = SESSION_READY;
session->last_access_time = time(NULL);
+#if GLIB_CHECK_VERSION(2,61,2)
+ session->tv_prev = g_date_time_new_now_local();
+#else
g_get_current_time(&session->tv_prev);
+#endif
session->conn_id = 0;
@@ -264,7 +268,9 @@ void session_destroy(Session *session)
#ifdef USE_GNUTLS
g_free(session->gnutls_priority);
#endif
-
+#if GLIB_CHECK_VERSION(2,61,2)
+ g_date_time_unref(session->tv_prev);
+#endif
debug_print("session (%p): destroyed\n", session);
g_free(session);
@@ -500,7 +506,12 @@ gint session_send_data(Session *session, const guchar *data, guint size)
session->write_data = data;
session->write_data_p = session->write_data;
session->write_data_len = size;
- g_get_current_time(&session->tv_prev);
+#if GLIB_CHECK_VERSION(2,61,2)
+ g_date_time_unref(session->tv_prev);
+ session->tv_prev = g_date_time_new_now_local();
+#else
+ g_get_current_time(&session->tv_prev);
+#endif
ret = session_write_data_cb(session->sock, G_IO_OUT, session);
@@ -522,7 +533,12 @@ gint session_recv_data(Session *session, guint size, const gchar *terminator)
g_free(session->read_data_terminator);
session->read_data_terminator = g_strdup(terminator);
- g_get_current_time(&session->tv_prev);
+#if GLIB_CHECK_VERSION(2,61,2)
+ g_date_time_unref(session->tv_prev);
+ session->tv_prev = g_date_time_new_now_local();
+#else
+ g_get_current_time(&session->tv_prev);
+#endif
if (session->read_buf_len > 0)
g_idle_add(session_recv_data_idle_cb, session);
@@ -711,17 +727,31 @@ static gboolean session_read_data_cb(SockInfo *source, GIOCondition condition,
/* incomplete read */
if (!complete) {
+#if GLIB_CHECK_VERSION(2,61,2)
+ GDateTime *tv_cur = g_date_time_new_now_local();
+
+ GTimeSpan ts = g_date_time_difference(tv_cur, session->tv_prev);
+ if (1000 - ts < 0 || ts > UI_REFRESH_INTERVAL) {
+ session->recv_data_progressive_notify
+ (session, data_buf->len, 0,
+ session->recv_data_progressive_notify_data);
+ g_date_time_unref(session->tv_prev);
+ session->tv_prev = g_date_time_new_now_local();
+ }
+ g_date_time_unref(tv_cur);
+#else
GTimeVal tv_cur;
g_get_current_time(&tv_cur);
- if (tv_cur.tv_sec - session->tv_prev.tv_sec > 0 ||
- tv_cur.tv_usec - session->tv_prev.tv_usec >
- UI_REFRESH_INTERVAL) {
- session->recv_data_progressive_notify
- (session, data_buf->len, 0,
- session->recv_data_progressive_notify_data);
- g_get_current_time(&session->tv_prev);
- }
+ if (tv_cur.tv_sec - session->tv_prev.tv_sec > 0 ||
+ tv_cur.tv_usec - session->tv_prev.tv_usec >
+ UI_REFRESH_INTERVAL) {
+ session->recv_data_progressive_notify
+ (session, data_buf->len, 0,
+ session->recv_data_progressive_notify_data);
+ g_get_current_time(&session->tv_prev);
+ }
+#endif
return TRUE;
}
@@ -882,20 +912,38 @@ static gboolean session_write_data_cb(SockInfo *source,
session->state = SESSION_ERROR;
return FALSE;
} else if (ret > 0) {
+#if GLIB_CHECK_VERSION(2,61,2)
+ GDateTime *tv_cur = g_date_time_new_now_local();
+
+ GTimeSpan ts = g_date_time_difference(tv_cur, session->tv_prev);
+ if (1000 - ts < 0 || ts > UI_REFRESH_INTERVAL) {
+ session_set_timeout(session, session->timeout_interval);
+ session->send_data_progressive_notify
+ (session,
+ session->write_data_p - session->write_data,
+ write_data_len,
+ session->send_data_progressive_notify_data);
+ g_date_time_unref(session->tv_prev);
+ session->tv_prev = g_date_time_new_now_local();
+ }
+ g_date_time_unref(tv_cur);
+#else
GTimeVal tv_cur;
- g_get_current_time(&tv_cur);
- if (tv_cur.tv_sec - session->tv_prev.tv_sec > 0 ||
- tv_cur.tv_usec - session->tv_prev.tv_usec >
- UI_REFRESH_INTERVAL) {
- session_set_timeout(session, session->timeout_interval);
- session->send_data_progressive_notify
- (session,
- session->write_data_p - session->write_data,
- write_data_len,
- session->send_data_progressive_notify_data);
- g_get_current_time(&session->tv_prev);
- }
+ g_get_current_time(&tv_cur);
+ if (tv_cur.tv_sec - session->tv_prev.tv_sec > 0 ||
+ tv_cur.tv_usec - session->tv_prev.tv_usec >
+ UI_REFRESH_INTERVAL) {
+ session_set_timeout(session, session->timeout_interval);
+ session->send_data_progressive_notify
+ (session,
+ session->write_data_p - session->write_data,
+ write_data_len,
+ session->send_data_progressive_notify_data);
+ g_get_current_time(&session->tv_prev);
+ }
+
+#endif
return TRUE;
}
diff --git a/src/common/session.h b/src/common/session.h
index 13a56c97e..d24e75030 100644
--- a/src/common/session.h
+++ b/src/common/session.h
@@ -88,8 +88,11 @@ struct _Session
SessionState state;
time_t last_access_time;
+#if GLIB_CHECK_VERSION(2,61,2)
+ GDateTime *tv_prev;
+#else
GTimeVal tv_prev;
-
+#endif
gint conn_id;
gint io_tag;
diff --git a/src/inc.c b/src/inc.c
index 5a0bdffcc..48098c614 100644
--- a/src/inc.c
+++ b/src/inc.c
@@ -508,8 +508,13 @@ static IncProgressDialog *inc_progress_dialog_create(gboolean autocheck)
}
dialog->dialog = progress;
+#if GLIB_CHECK_VERSION(2,61,2)
+ dialog->progress_tv = g_date_time_new_now_local();
+ dialog->folder_tv = g_date_time_new_now_local();
+#else
g_get_current_time(&dialog->progress_tv);
g_get_current_time(&dialog->folder_tv);
+#endif
dialog->queue_list = NULL;
dialog->cur_row = 0;
@@ -553,6 +558,11 @@ static void inc_progress_dialog_destroy(IncProgressDialog *inc_dialog)
main_window_progress_off(inc_dialog->mainwin);
progress_dialog_destroy(inc_dialog->dialog);
+#if GLIB_CHECK_VERSION(2,61,2)
+ g_date_time_unref(inc_dialog->progress_tv);
+ g_date_time_unref(inc_dialog->folder_tv);
+#endif
+
g_free(inc_dialog);
}
@@ -1081,25 +1091,44 @@ static void inc_progress_dialog_set_progress(IncProgressDialog *inc_dialog,
static void inc_progress_dialog_update_periodic(IncProgressDialog *inc_dialog,
IncSession *inc_session)
{
+#if GLIB_CHECK_VERSION(2,61,2)
+ GDateTime *tv_cur = g_date_time_new_now_local();
+ GTimeSpan tv_result;
+
+ tv_result = g_date_time_difference(tv_cur, inc_dialog->progress_tv);
+ g_date_time_unref(tv_cur);
+ if (tv_result < 0) {
+ tv_result += G_USEC_PER_SEC;
+ }
+
+ if (tv_result > PROGRESS_UPDATE_INTERVAL) {
+ inc_progress_dialog_update(inc_dialog, inc_session);
+ tv_cur = g_date_time_add(inc_dialog->progress_tv, tv_result);
+ g_date_time_unref(inc_dialog->progress_tv);
+ inc_dialog->progress_tv = tv_cur;
+ }
+#else
GTimeVal tv_cur;
GTimeVal tv_result;
- gint msec;
- g_get_current_time(&tv_cur);
+ gint msec;
- tv_result.tv_sec = tv_cur.tv_sec - inc_dialog->progress_tv.tv_sec;
- tv_result.tv_usec = tv_cur.tv_usec - inc_dialog->progress_tv.tv_usec;
- if (tv_result.tv_usec < 0) {
- tv_result.tv_sec--;
- tv_result.tv_usec += G_USEC_PER_SEC;
- }
+ g_get_current_time(&tv_cur);
- msec = tv_result.tv_sec * 1000 + tv_result.tv_usec / 1000;
- if (msec > PROGRESS_UPDATE_INTERVAL) {
- inc_progress_dialog_update(inc_dialog, inc_session);
- inc_dialog->progress_tv.tv_sec = tv_cur.tv_sec;
- inc_dialog->progress_tv.tv_usec = tv_cur.tv_usec;
- }
+ tv_result.tv_sec = tv_cur.tv_sec - inc_dialog->progress_tv.tv_sec;
+ tv_result.tv_usec = tv_cur.tv_usec - inc_dialog->progress_tv.tv_usec;
+ if (tv_result.tv_usec < 0) {
+ tv_result.tv_sec--;
+ tv_result.tv_usec += G_USEC_PER_SEC;
+ }
+
+ msec = tv_result.tv_sec * 1000 + tv_result.tv_usec / 1000;
+ if (msec > PROGRESS_UPDATE_INTERVAL) {
+ inc_progress_dialog_update(inc_dialog, inc_session);
+ inc_dialog->progress_tv.tv_sec = tv_cur.tv_sec;
+ inc_dialog->progress_tv.tv_usec = tv_cur.tv_usec;
+ }
+#endif
}
static gint inc_recv_data_progressive(Session *session, guint cur_len,
diff --git a/src/inc.h b/src/inc.h
index c440c8f42..c8d38b620 100644
--- a/src/inc.h
+++ b/src/inc.h
@@ -58,8 +58,13 @@ struct _IncProgressDialog
gboolean show_dialog;
+#if GLIB_CHECK_VERSION(2,61,2)
+ GDateTime *progress_tv;
+ GDateTime *folder_tv;
+#else
GTimeVal progress_tv;
GTimeVal folder_tv;
+#endif
GList *queue_list; /* list of IncSession */
gint cur_row;
commit 48d3a5452c526c332c71a0580ca87f2a1aeb8540
Author: Colin Leroy <colin at colino.net>
Date: Sun Nov 10 20:55:11 2019 +0100
LiteHtml viewer: implement keyboard scroll
diff --git a/src/plugins/litehtml_viewer/lh_viewer.c b/src/plugins/litehtml_viewer/lh_viewer.c
index cca94d5fa..7fee13e47 100644
--- a/src/plugins/litehtml_viewer/lh_viewer.c
+++ b/src/plugins/litehtml_viewer/lh_viewer.c
@@ -140,6 +140,31 @@ static void lh_print_viewer (MimeViewer *_viewer)
lh_widget_print(viewer->widget);
}
+
+static gboolean lh_scroll_page(MimeViewer *_viewer, gboolean up)
+{
+ LHViewer *viewer = (LHViewer *)_viewer;
+ GtkAdjustment *vadj = gtk_scrolled_window_get_vadjustment(
+ GTK_SCROLLED_WINDOW(lh_widget_get_widget(viewer->widget)));
+
+ if (viewer->widget == NULL)
+ return FALSE;
+
+ return gtkutils_scroll_page(lh_widget_get_widget(viewer->widget), vadj, up);
+}
+
+static void lh_scroll_one_line(MimeViewer *_viewer, gboolean up)
+{
+ LHViewer *viewer = (LHViewer *)_viewer;
+ GtkAdjustment *vadj = gtk_scrolled_window_get_vadjustment(
+ GTK_SCROLLED_WINDOW(lh_widget_get_widget(viewer->widget)));
+
+ if (viewer->widget == NULL)
+ return;
+
+ gtkutils_scroll_one_line(lh_widget_get_widget(viewer->widget), vadj, up);
+}
+
/***************************************************************/
MimeViewer *lh_viewer_create()
{
@@ -155,6 +180,9 @@ MimeViewer *lh_viewer_create()
viewer->mimeviewer.clear_viewer = lh_clear_viewer;
viewer->mimeviewer.destroy_viewer = lh_destroy_viewer;
+ viewer->mimeviewer.scroll_page = lh_scroll_page;
+ viewer->mimeviewer.scroll_one_line = lh_scroll_one_line;
+
viewer->vbox = gtk_vbox_new(FALSE, 0);
GtkWidget *w = lh_widget_get_widget(viewer->widget);
commit ebb4127098911debb0ca42fee34e89c3e3a19e61
Author: Colin Leroy <colin at colino.net>
Date: Sat Nov 9 23:13:33 2019 +0100
Printing: only print as plain text if the part is of type text;
fix a segfault with default info icon when trying to print a non-text
part.
diff --git a/src/messageview.c b/src/messageview.c
index 962c945b9..b07b55b2e 100644
--- a/src/messageview.c
+++ b/src/messageview.c
@@ -2182,9 +2182,17 @@ static void print_mimeview(MimeView *mimeview, gint sel_start, gint sel_end, gin
viewer->print(viewer);
return;
} else {
- /* Force text rendering */
- mimeview_show_part_as_text(mimeview,
- mimeview_get_selected_part(mimeview));
+ /* Force text rendering if possible */
+ MimeInfo *mimepart;
+
+ mimepart = mimeview_get_selected_part(mimeview);
+ if (mimepart == NULL
+ || (mimepart->type != MIMETYPE_TEXT && mimepart->type != MIMETYPE_MESSAGE)) {
+ alertpanel_warning(_("Cannot print: the message doesn't "
+ "contain text."));
+ return;
+ }
+ mimeview_show_part_as_text(mimeview, mimepart);
}
}
if (sel_start != -1 && sel_end != -1) {
diff --git a/src/printing.c b/src/printing.c
index d5d32283a..ca3ed9101 100644
--- a/src/printing.c
+++ b/src/printing.c
@@ -1144,16 +1144,18 @@ static void printing_textview_cb_draw_page(GtkPrintOperation *op, GtkPrintContex
GdkPixbuf *pixbuf = gtk_image_get_pixbuf(print_data->avatar);
gdouble startx, starty;
- startx = gtk_print_context_get_width(context)/print_data->zoom;
+ if (pixbuf != NULL) {
+ startx = gtk_print_context_get_width(context)/print_data->zoom;
- startx -= ((double)gdk_pixbuf_get_width(pixbuf));
+ startx -= ((double)gdk_pixbuf_get_width(pixbuf));
- starty = start_pos;
+ starty = start_pos;
- surface = pixbuf_to_surface(pixbuf);
- cairo_set_source_surface (cr, surface, startx, starty);
- cairo_paint (cr);
- cairo_surface_destroy (surface);
+ surface = pixbuf_to_surface(pixbuf);
+ cairo_set_source_surface (cr, surface, startx, starty);
+ cairo_paint (cr);
+ cairo_surface_destroy (surface);
+ }
}
pango_layout_iter_free(iter);
commit c209879fb91f5987354f19bb485e85d899543bd1
Author: wwp <subscript at free.fr>
Date: Wed Nov 6 12:01:51 2019 +0100
Revert parts of configure.ac, unexpected changes from another patch.
diff --git a/configure.ac b/configure.ac
index 81bf37f81..2373d23c2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1143,10 +1143,6 @@ AC_ARG_ENABLE(vcalendar-plugin,
[ --disable-vcalendar-plugin Do not build vcalendar plugin],
[enable_vcalendar_plugin=$enableval], [enable_vcalendar_plugin=auto])
-AC_ARG_ENABLE(vfolder-plugin,
- [ --disable-vfolder-plugin Do not build vfolder plugin],
- [enable_vfolder_plugin=$enableval], [enable_vfolder_plugin=auto])
-
dnl disabled by default
AC_ARG_ENABLE(demo-plugin,
[ --enable-demo-plugin Build demo plugin],
@@ -1225,6 +1221,12 @@ dnl libarchive *****************************************************************
PKG_CHECK_MODULES(LIBARCHIVE, libarchive, HAVE_ARCHIVE=yes, HAVE_ARCHIVE=no)
AC_SUBST(ARCHIVE_LIBS)
AC_SUBST(ARCHIVE_CFLAGS)
+AC_CHECK_LIB([archive], [archive_read_new],
+ ARCHIVE_LIBS=-larchive
+ HAVE_ARCHIVE=yes
+ AC_SUBST(ARCHIVE_LIBS,$ARCHIVE_CFLAGS),
+ HAVE_ARCHIVE=no
+ )
dnl libgdata *******************************************************************
PKG_CHECK_MODULES(GDATA, libgdata >= 0.17.2, HAVE_GDATA=yes, HAVE_GDATA=no)
@@ -2093,15 +2095,6 @@ else
AC_MSG_RESULT(no)
fi
-AC_MSG_CHECKING([whether to build vfolder plugin])
-if test x"$enable_vfolder_plugin" != xno; then
- PLUGINS="$PLUGINS vfolder"
- AC_MSG_RESULT(yes)
-else
- DISABLED_PLUGINS="$DISABLED_PLUGINS vfolder"
- AC_MSG_RESULT(no)
-fi
-
dnl And finally the automake conditionals.
AM_CONDITIONAL(BUILD_ACPI_NOTIFIER_PLUGIN, test x"$enable_acpi_notifier_plugin" != xno)
@@ -2136,7 +2129,6 @@ AM_CONDITIONAL(BUILD_SPAMASSASSIN_PLUGIN, test x"$enable_spamassassin_plugin" !=
AM_CONDITIONAL(BUILD_SPAM_REPORT_PLUGIN, test x"$enable_spam_report_plugin" != xno)
AM_CONDITIONAL(BUILD_TNEF_PARSE_PLUGIN, test x"$enable_tnef_parse_plugin" != xno)
AM_CONDITIONAL(BUILD_VCALENDAR_PLUGIN, test x"$enable_vcalendar_plugin" != xno)
-AM_CONDITIONAL(BUILD_VFOLDER_PLUGIN, test x"$enable_vfolder_plugin" != xno)
dnl ****************************
@@ -2195,7 +2187,6 @@ src/plugins/spamassassin/Makefile
src/plugins/spam_report/Makefile
src/plugins/tnef_parse/Makefile
src/plugins/vcalendar/Makefile
-src/plugins/vfolder/Makefile
src/tests/Makefile
doc/Makefile
doc/man/Makefile
commit b1bdeb3febe4b908996d4728c265c16679cd11a4
Author: wwp <subscript at free.fr>
Date: Wed Nov 6 11:42:59 2019 +0100
Add support for libetpan 1.9.4 (it now uses pkg-config), fix a bit
version matching related to former 1.x.x and 0.x versions as well.
diff --git a/configure.ac b/configure.ac
index 3064610da..81bf37f81 100644
--- a/configure.ac
+++ b/configure.ac
@@ -908,38 +908,62 @@ fi
dnl Libetpan
AC_MSG_CHECKING([whether to use libetpan])
if test x"$enable_libetpan" = xyes; then
- AC_MSG_RESULT(yes)
- libetpan_result=no
- AC_PATH_PROG(libetpanconfig, [libetpan-config])
- if test "x$libetpanconfig" != "x"; then
- CPPFLAGS="$CPPFLAGS `$libetpanconfig --cflags 2>/dev/null`"
- AC_CHECK_HEADER(libetpan/libetpan.h, [libetpan_result=yes])
- if test "x$libetpan_result" = "xyes"; then
- AC_MSG_CHECKING([whether libetpan-config hints compiles and links fine])
- LIBS="$LIBS `$libetpanconfig --libs 2>/dev/null`"
- AC_TRY_LINK([#include <libetpan/dbstorage.h>], [db_mailstorage_init(NULL, NULL);], [libetpan_result=yes], [libetpan_result=no])
- AC_MSG_RESULT([$libetpan_result])
- fi
- fi
- if test "x$libetpan_result" = "xyes"; then
- LIBETPAN_CPPFLAGS="`$libetpanconfig --cflags`"
- LIBETPAN_LIBS="`$libetpanconfig --libs`"
- LIBETPAN_VERSION=`$libetpanconfig --version | $AWK -F. '{printf "%d", ($1 * 100) + $2}'`
- if test "$LIBETPAN_VERSION" -lt "57"; then
- AC_MSG_RESULT([*** Claws Mail requires libetpan 0.57 or newer. See http://www.etpan.org/])
- AC_MSG_RESULT([*** You can use --disable-libetpan if you don't need IMAP4 and/or NNTP support.])
+ AC_MSG_RESULT(yes)
+
+ libetpan_config=no
+ libetpan_result=no
+ libetpan_versiontype=0
+
+ # since 1.9.4, libetpan uses pkg-config
+ PKG_CHECK_MODULES([LIBETPAN], [libetpan >= 1.9.4],
+ [
+ LIBETPAN_VERSION=`pkg-config --modversion | $AWK -F. '{printf "%d", ($1 * 10000) + ($2 * 100) + $3}'`
+ libetpan_config=yes
+ ],
+ [
+ # before 1.9.4, libetpan uses its own libetpan-config script
+ AC_PATH_PROG(libetpanconfig, [libetpan-config])
+ if test "x$libetpanconfig" != "x"; then
+ LIBETPAN_CPPFLAGS="`$libetpanconfig --cflags`"
+ LIBETPAN_LIBS="`$libetpanconfig --libs`"
+ # support libetpan version like x.x and x.x.x
+ libetpan_versiontype=`$libetpanconfig --version | tr -dc . | wc -c`
+ if test $libetpan_versiontype -eq 1; then
+ LIBETPAN_VERSION=`$libetpanconfig --version | $AWK -F. '{printf "%d", ($1 * 100) + $2}'`
+ else
+ LIBETPAN_VERSION=`$libetpanconfig --version | $AWK -F. '{printf "%d", ($1 * 10000) + ($2 * 100) + $3}'`
+ fi
+ libetpan_config=yes
+ fi
+ ])
+ if test "x$libetpan_config" = "xyes"; then
+ CPPFLAGS="$CPPFLAGS $LIBETPAN_FLAGS"
+ AC_CHECK_HEADER(libetpan/libetpan.h, [libetpan_result=yes])
+ if test "x$libetpan_result" = "xyes"; then
+ AC_MSG_CHECKING([whether libetpan-config hints compiles and links fine])
+ LIBS="$LIBS $LIBETPAN_LIBS"
+ AC_TRY_LINK([#include <libetpan/dbstorage.h>], [db_mailstorage_init(NULL, NULL);], [libetpan_result=yes], [libetpan_result=no])
+ AC_MSG_RESULT([$libetpan_result])
+ fi
+ fi
+ if test "x$libetpan_result" = "xyes"; then
+ if test $libetpan_versiontype -eq 1; then
+ if test "$LIBETPAN_VERSION" -lt "57"; then
+ AC_MSG_RESULT([*** Claws Mail requires libetpan 0.57 or newer. See http://www.etpan.org/])
+ AC_MSG_RESULT([*** You can use --disable-libetpan if you don't need IMAP4 and/or NNTP support.])
AC_MSG_ERROR([libetpan 0.57 not found])
- fi
- AC_SUBST(LIBETPAN_FLAGS)
- AC_SUBST(LIBETPAN_LIBS)
- AC_DEFINE(HAVE_LIBETPAN, 1, Define if you want IMAP and/or NNTP support.)
- else
- AC_MSG_RESULT([*** Claws Mail requires libetpan 0.57 or newer. See http://www.etpan.org/ ])
- AC_MSG_RESULT([*** You can use --disable-libetpan if you don't need IMAP4 and/or NNTP support.])
- AC_MSG_ERROR([libetpan 0.57 not found])
- fi
+ fi
+ fi
+ AC_SUBST(LIBETPAN_FLAGS)
+ AC_SUBST(LIBETPAN_LIBS)
+ AC_DEFINE(HAVE_LIBETPAN, 1, Define if you want IMAP and/or NNit TP support.)
+ else
+ AC_MSG_RESULT([*** Claws Mail requires libetpan 0.57 or newer. See http://www.etpan.org/ ])
+ AC_MSG_RESULT([*** You can use --disable-libetpan if you don't need IMAP4 and/or NNTP support.])
+ AC_MSG_ERROR([libetpan 0.57 not found])
+ fi
else
- AC_MSG_RESULT(no)
+ AC_MSG_RESULT(no)
fi
AM_CONDITIONAL(CLAWS_LIBETPAN, test "x$libetpan_result" = "xyes")
@@ -1119,6 +1143,10 @@ AC_ARG_ENABLE(vcalendar-plugin,
[ --disable-vcalendar-plugin Do not build vcalendar plugin],
[enable_vcalendar_plugin=$enableval], [enable_vcalendar_plugin=auto])
+AC_ARG_ENABLE(vfolder-plugin,
+ [ --disable-vfolder-plugin Do not build vfolder plugin],
+ [enable_vfolder_plugin=$enableval], [enable_vfolder_plugin=auto])
+
dnl disabled by default
AC_ARG_ENABLE(demo-plugin,
[ --enable-demo-plugin Build demo plugin],
@@ -1197,12 +1225,6 @@ dnl libarchive *****************************************************************
PKG_CHECK_MODULES(LIBARCHIVE, libarchive, HAVE_ARCHIVE=yes, HAVE_ARCHIVE=no)
AC_SUBST(ARCHIVE_LIBS)
AC_SUBST(ARCHIVE_CFLAGS)
-AC_CHECK_LIB([archive], [archive_read_new],
- ARCHIVE_LIBS=-larchive
- HAVE_ARCHIVE=yes
- AC_SUBST(ARCHIVE_LIBS,$ARCHIVE_CFLAGS),
- HAVE_ARCHIVE=no
- )
dnl libgdata *******************************************************************
PKG_CHECK_MODULES(GDATA, libgdata >= 0.17.2, HAVE_GDATA=yes, HAVE_GDATA=no)
@@ -2071,6 +2093,15 @@ else
AC_MSG_RESULT(no)
fi
+AC_MSG_CHECKING([whether to build vfolder plugin])
+if test x"$enable_vfolder_plugin" != xno; then
+ PLUGINS="$PLUGINS vfolder"
+ AC_MSG_RESULT(yes)
+else
+ DISABLED_PLUGINS="$DISABLED_PLUGINS vfolder"
+ AC_MSG_RESULT(no)
+fi
+
dnl And finally the automake conditionals.
AM_CONDITIONAL(BUILD_ACPI_NOTIFIER_PLUGIN, test x"$enable_acpi_notifier_plugin" != xno)
@@ -2105,6 +2136,7 @@ AM_CONDITIONAL(BUILD_SPAMASSASSIN_PLUGIN, test x"$enable_spamassassin_plugin" !=
AM_CONDITIONAL(BUILD_SPAM_REPORT_PLUGIN, test x"$enable_spam_report_plugin" != xno)
AM_CONDITIONAL(BUILD_TNEF_PARSE_PLUGIN, test x"$enable_tnef_parse_plugin" != xno)
AM_CONDITIONAL(BUILD_VCALENDAR_PLUGIN, test x"$enable_vcalendar_plugin" != xno)
+AM_CONDITIONAL(BUILD_VFOLDER_PLUGIN, test x"$enable_vfolder_plugin" != xno)
dnl ****************************
@@ -2163,6 +2195,7 @@ src/plugins/spamassassin/Makefile
src/plugins/spam_report/Makefile
src/plugins/tnef_parse/Makefile
src/plugins/vcalendar/Makefile
+src/plugins/vfolder/Makefile
src/tests/Makefile
doc/Makefile
doc/man/Makefile
commit fddefcb853e8bb0bfc1e12bb1415c82ca82812d5
Author: wwp <subscript at free.fr>
Date: Tue Nov 5 12:28:05 2019 +0100
Fix wrong length value passed to fd_write().
diff --git a/src/main.c b/src/main.c
index 25357a25b..f2b81b3da 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2394,11 +2394,11 @@ static gint prohibit_duplicate_launch(void)
} else if (cmd.send) {
fd_write_all(uxsock, "send\n", 5);
} else if (cmd.online_mode == ONLINE_MODE_ONLINE) {
- fd_write(uxsock, "online\n", 6);
+ fd_write(uxsock, "online\n", 7);
} else if (cmd.online_mode == ONLINE_MODE_OFFLINE) {
- fd_write(uxsock, "offline\n", 7);
+ fd_write(uxsock, "offline\n", 8);
} else if (cmd.debug) {
- fd_write(uxsock, "debug\n", 7);
+ fd_write(uxsock, "debug\n", 6);
} else if (cmd.status || cmd.status_full) {
gchar buf[BUFFSIZE];
gint i;
commit b63a048d3ed518bfffe9db228bb0726c8ad47e28
Author: Paul <paul at claws-mail.org>
Date: Tue Nov 5 11:09:23 2019 +0000
ammend last commit in order to avoid misusing gettext's context
diff --git a/src/prefs_msg_colors.c b/src/prefs_msg_colors.c
index 8a2776251..78afb79c9 100644
--- a/src/prefs_msg_colors.c
+++ b/src/prefs_msg_colors.c
@@ -309,8 +309,9 @@ static void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window,
SET_TOGGLE_SENSITIVITY(checkbtn_enable_colors, label[COL_SIGNATURE]);
vbox4 = gtkut_get_options_frame(vbox2, &frame_diff,
- C_("A patch is a text file listing the differences between 2 or more different "
- "versions of the same text file", "Patch messages and attachments"));
+ /* TRANSLATORS: A patch is a text file listing the differences between 2 or more different */
+ /* versions of the same text file */
+ _("Patch messages and attachments"));
SET_TOGGLE_SENSITIVITY(checkbtn_enable_colors, frame_diff);
hbox = gtk_hbox_new(FALSE, VBOX_BORDER);
@@ -337,12 +338,12 @@ static void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window,
gtk_box_pack_start (GTK_BOX (vbox4), hbox, FALSE, FALSE, 0);
COLOR_BUTTON_PACK_START(hbox, COL_DIFF_HUNK,
- C_("Tooltip. A hunk is a section of the patch indicating how the files differ",
- "Pick color for hunk lines"));
+ /* TRANSLATORS: A hunk is a section of the patch indicating how the files differ */
+ C_("Tooltip.", "Pick color for hunk lines"));
COLOR_LABEL_PACK_START(hbox, COL_DIFF_HUNK,
- C_("A hunk is a section of the patch indicating how the files differ",
- "Hunk lines"));
+ /* TRANSLATORS: A hunk is a section of the patch indicating how the files differ */
+ _("Hunk lines"));
vbox2 = gtkut_get_options_frame(vbox1, &frame_folder, _("Folder list"));
commit 09c4296aaaf94673891fe15bc2ef0dfcc8b54c21
Author: Paul <paul at claws-mail.org>
Date: Tue Nov 5 10:56:20 2019 +0000
provide some info for translators about patches and hunks
diff --git a/src/prefs_msg_colors.c b/src/prefs_msg_colors.c
index 3dced72fe..8a2776251 100644
--- a/src/prefs_msg_colors.c
+++ b/src/prefs_msg_colors.c
@@ -308,7 +308,9 @@ static void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window,
COLOR_LABEL_PACK_START(hbox, COL_SIGNATURE, _("Signatures"));
SET_TOGGLE_SENSITIVITY(checkbtn_enable_colors, label[COL_SIGNATURE]);
- vbox4 = gtkut_get_options_frame(vbox2, &frame_diff, _("Patch messages and attachments"));
+ vbox4 = gtkut_get_options_frame(vbox2, &frame_diff,
+ C_("A patch is a text file listing the differences between 2 or more different "
+ "versions of the same text file", "Patch messages and attachments"));
SET_TOGGLE_SENSITIVITY(checkbtn_enable_colors, frame_diff);
hbox = gtk_hbox_new(FALSE, VBOX_BORDER);
@@ -335,10 +337,12 @@ static void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window,
gtk_box_pack_start (GTK_BOX (vbox4), hbox, FALSE, FALSE, 0);
COLOR_BUTTON_PACK_START(hbox, COL_DIFF_HUNK,
- C_("Tooltip", "Pick color for hunk lines"));
+ C_("Tooltip. A hunk is a section of the patch indicating how the files differ",
+ "Pick color for hunk lines"));
COLOR_LABEL_PACK_START(hbox, COL_DIFF_HUNK,
- _("Hunk lines"));
+ C_("A hunk is a section of the patch indicating how the files differ",
+ "Hunk lines"));
vbox2 = gtkut_get_options_frame(vbox1, &frame_folder, _("Folder list"));
commit db3a75f4a6707110eb259c4771c9d7c60641d06b
Author: Colin Leroy <colin at colino.net>
Date: Sat Nov 9 22:47:55 2019 +0100
Unplug LiteHtml's print callback which does nothing
diff --git a/src/plugins/litehtml_viewer/lh_viewer.c b/src/plugins/litehtml_viewer/lh_viewer.c
index 03775dc78..cca94d5fa 100644
--- a/src/plugins/litehtml_viewer/lh_viewer.c
+++ b/src/plugins/litehtml_viewer/lh_viewer.c
@@ -154,8 +154,6 @@ MimeViewer *lh_viewer_create()
viewer->mimeviewer.clear_viewer = lh_clear_viewer;
viewer->mimeviewer.destroy_viewer = lh_destroy_viewer;
-
- viewer->mimeviewer.print = lh_print_viewer;
viewer->vbox = gtk_vbox_new(FALSE, 0);
commit 03ebc8f791eaa6734ad2004b908af00baad4aaf4
Author: Colin Leroy <colin at colino.net>
Date: Sat Nov 9 22:45:17 2019 +0100
Fix printing of empty pages when the selected part
is rendered with a plugin not implementing print.
diff --git a/src/messageview.c b/src/messageview.c
index f305a4a9b..962c945b9 100644
--- a/src/messageview.c
+++ b/src/messageview.c
@@ -2181,6 +2181,10 @@ static void print_mimeview(MimeView *mimeview, gint sel_start, gint sel_end, gin
if (viewer && viewer->print) {
viewer->print(viewer);
return;
+ } else {
+ /* Force text rendering */
+ mimeview_show_part_as_text(mimeview,
+ mimeview_get_selected_part(mimeview));
}
}
if (sel_start != -1 && sel_end != -1) {
diff --git a/src/mimeview.c b/src/mimeview.c
index 3a0f1884b..c43c0ad10 100644
--- a/src/mimeview.c
+++ b/src/mimeview.c
@@ -1432,6 +1432,14 @@ static void update_signature_info(MimeView *mimeview, MimeInfo *selected)
noticeview_show(mimeview->siginfoview);
}
+void mimeview_show_part_as_text(MimeView *mimeview, MimeInfo *partinfo)
+{
+ cm_return_if_fail(mimeview != NULL);
+ cm_return_if_fail(partinfo != NULL);
+
+ mimeview_show_message_part(mimeview, partinfo);
+}
+
static void mimeview_selected(GtkTreeSelection *selection, MimeView *mimeview)
{
GtkTreeView *ctree = GTK_TREE_VIEW(mimeview->ctree);
diff --git a/src/mimeview.h b/src/mimeview.h
index 14c4e8564..e4c3cf321 100644
--- a/src/mimeview.h
+++ b/src/mimeview.h
@@ -147,6 +147,8 @@ void mimeview_show_message (MimeView *mimeview,
const gchar *file);
gboolean mimeview_show_part (MimeView *mimeview,
MimeInfo *partinfo);
+void mimeview_show_part_as_text (MimeView *mimeview,
+ MimeInfo *partinfo);
void mimeview_destroy (MimeView *mimeview);
void mimeview_update (MimeView *mimeview);
void mimeview_clear (MimeView *mimeview);
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list