[Commits] [SCM] claws branch, gtk3, updated. 3.16.0-782-gb003028a9

ticho at claws-mail.org ticho at claws-mail.org
Mon Aug 26 22:18:28 CEST 2019


The branch, gtk3 has been updated
       via  b003028a9064c08dbd9852c507fa145ee0b85353 (commit)
       via  b1bc36d2f7ca19cd61e335561d2a44c421ba9678 (commit)
       via  abef83168f83b441324660cf405ac68428a69639 (commit)
       via  c7ce85fb14caa8e2ac80951060a1a36236e62baf (commit)
       via  eaaefcdf4c4c8d5ee9e4216cffccbd16b504f350 (commit)
       via  aa8f4ad99713a23887cd2cce66e757ef0df941d6 (commit)
       via  bc5414861497db691bca5cd1a370a989689a3efd (commit)
       via  ab031e717b4abc25852c9224b4be64f4540d8ba7 (commit)
       via  432dd7cfc695700480a832aee278f536a298ce01 (commit)
      from  1e1dd7d7f9b25845a838ab32e94ba7502628c344 (commit)

Summary of changes:
 src/import.c                                    |  8 +++
 src/mbox.c                                      | 19 ++++--
 src/plugins/litehtml_viewer/Makefile.am         | 31 +++++++++-
 src/plugins/litehtml_viewer/claws.def           | 81 ++-----------------------
 src/plugins/litehtml_viewer/lh_viewer.c         |  3 +-
 src/plugins/litehtml_viewer/litehtml/os_types.h | 11 ++--
 src/plugins/pgpcore/tests/Makefile.am           |  1 +
 src/plugins/rssyl/rssyl_add_item.c              |  4 ++
 src/plugins/rssyl/rssyl_deleted.c               |  6 +-
 src/plugins/rssyl/rssyl_update_feed.c           |  2 +-
 src/textview.c                                  |  1 -
 src/vcard.c                                     |  2 +-
 12 files changed, 75 insertions(+), 94 deletions(-)


- Log -----------------------------------------------------------------
commit b003028a9064c08dbd9852c507fa145ee0b85353
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Mon Aug 26 22:17:46 2019 +0200

    Fix build of pgpcore unit test

diff --git a/src/plugins/pgpcore/tests/Makefile.am b/src/plugins/pgpcore/tests/Makefile.am
index 3bcc12da9..c4a0e8502 100644
--- a/src/plugins/pgpcore/tests/Makefile.am
+++ b/src/plugins/pgpcore/tests/Makefile.am
@@ -5,6 +5,7 @@ common_ldadd = \
 
 AM_CPPFLAGS = \
 	$(GLIB_CFLAGS) \
+	$(GTK_CFLAGS) \
 	-I.. \
 	-I$(top_srcdir)/src \
 	-I$(top_srcdir)/src/common

commit b1bc36d2f7ca19cd61e335561d2a44c421ba9678
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Mon Aug 26 22:05:23 2019 +0200

    Update litehtml_viewer to build on Windows

diff --git a/src/plugins/litehtml_viewer/Makefile.am b/src/plugins/litehtml_viewer/Makefile.am
index 271797443..f91ea5926 100644
--- a/src/plugins/litehtml_viewer/Makefile.am
+++ b/src/plugins/litehtml_viewer/Makefile.am
@@ -11,17 +11,44 @@ IFLAGS = \
         -I$(top_srcdir)/src/common \
         -I$(top_builddir)/src \
         -I$(top_srcdir)/src/gtk \
-	-I$(top_srcdir)/src/plugins/litehtml_viewer/litehtml
+        -I$(top_srcdir)/src/plugins/litehtml_viewer/litehtml
 
+if OS_WIN32
+
+LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \
+		`echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \
+		sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
+
+%.lo: %.rc
+	$(LTRCCOMPILE) -i $< -o $@
+
+plugin_res = version.lo
+plugin_res_ldflag = -Wl,.libs/version.o
+export_symbols = -export-symbols $(srcdir)/plugin.def
+plugin_deps = libclaws.a $(plugin_res) plugin.def
+plugin_ldadd = -L. -lclaws
+
+libclaws.a: claws.def
+	$(DLLTOOL) --output-lib $@ --def $<
+else
 plugin_res =
 plugin_res_ldflag =
 export_symbols =
 plugin_deps =
 plugin_ldadd =
+endif
 
+if PLATFORM_WIN32
+no_undefined = -no-undefined
+else
 no_undefined =
+endif
 
+if CYGWIN
+cygwin_export_lib = -L$(top_builddir)/src -lclaws-mail
+else
 cygwin_export_lib =
+endif
 
 plugindir = $(pkglibdir)/plugins
 
@@ -29,7 +56,7 @@ if BUILD_LITEHTML_VIEWER_PLUGIN
 plugin_LTLIBRARIES = litehtml_viewer.la
 endif
 
-litehtml_viewer_la_DEPENDENCIES = $(plugin_deps)
+litehtml_viewer_la_DEPENDENCIES = $(plugin_deps) litehtml/liblitehtml.la
 
 litehtml_viewer_la_LIBADD = $(plugin_ldadd) $(cygwin_export_lib) \
 	$(top_builddir)/src/plugins/litehtml_viewer/litehtml/liblitehtml.la \
diff --git a/src/plugins/litehtml_viewer/claws.def b/src/plugins/litehtml_viewer/claws.def
index 9a6ff503a..90b9af383 100644
--- a/src/plugins/litehtml_viewer/claws.def
+++ b/src/plugins/litehtml_viewer/claws.def
@@ -1,72 +1,15 @@
 LIBRARY CLAWS-MAIL.EXE
 EXPORTS
-addressbook_folder_selection
-alertpanel
-alertpanel_error
-check_plugin_version
-claws_do_idle
-claws_fopen
-claws_fdopen
-claws_fclose
-claws_safe_fclose
-combobox_get_active_data
-combobox_select_by_data
-combobox_text_new
-complete_address
-compose_new
-conv_codeset_strdup
-conv_get_locale_charset_str
-conv_get_locale_charset_str_no_utf8
 debug_print_real
 debug_srcname
-end_address_completion
-extract_address
-file_exist
-file_read_to_str_no_recode
-filesel_select_file_open
-filesel_select_file_save
-folder_find_item_from_identifier
-folder_get_default_trash
-folder_item_get_identifier
-folder_item_get_path
-folder_item_remove_msg
-foldersel_folder_sel
-folder_subscribe
-get_complete_address
-get_locale_dir
 get_rc_dir
-gtkut_get_browse_directory_btn
-gtkut_get_browse_file_btn
 gtkut_get_options_frame
-gtkutils_scroll_one_line
-gtkutils_scroll_page
-gtkut_sc_combobox_create
-hooks_register_hook
-hooks_unregister_hook
-is_dir_exist
-line_has_quote_char
-log_error
-make_dir
-matcherlist_free
-matcherlist_match
-matcherlist_new
-matcherprop_new
+gtkut_widget_draw_now
+mainwindow_get_mainwindow
 mimeview_register_viewer_factory
 mimeview_unregister_viewer_factory
-noticeview_hide
-open_txt_editor
 open_uri
-plugin_get_loaded_by_name
-pref_get_escaped_pref
-pref_get_pref_from_entry
-pref_get_unescaped_pref
-prefs_button_toggled
-prefs_button_toggled follow
-prefs_common
-prefs_common_get_ext_editor_cmd
-prefs_common_get_prefs
 prefs_common_get_uri_cmd
-pref_set_entry_from_pref
 prefs_file_close
 prefs_file_close_revert
 prefs_gtk_register_page
@@ -76,23 +19,7 @@ prefs_set_block_label
 prefs_set_default
 prefs_write_open
 prefs_write_param
-printing_get_page_setup
-printing_get_settings
-printing_store_settings
-procmime_get_part
-procmime_get_tmp_file_name
+procmime_get_part_as_pixbuf
+procmime_get_part_as_string
 procmime_mimeinfo_get_parameter
 procmime_mimeinfo_next
-procmsg_get_message_file
-procmsg_msginfo_set_flags
-procmsg_msginfo_unset_flags
-procmsg_register_spam_learner
-procmsg_spam_set_folder
-procmsg_unregister_spam_learner
-settings
-start_address_completion
-statusbar_pop_all
-statusbar_print_all
-statusbar_progress_all
-str_write_to_file
-subst_char
diff --git a/src/plugins/litehtml_viewer/litehtml/os_types.h b/src/plugins/litehtml_viewer/litehtml/os_types.h
index 39b027085..d0aa9f9e9 100644
--- a/src/plugins/litehtml_viewer/litehtml/os_types.h
+++ b/src/plugins/litehtml_viewer/litehtml/os_types.h
@@ -49,11 +49,12 @@ namespace litehtml
 
 #endif
 
-	#ifdef _WIN64
-		typedef unsigned __int64 uint_ptr;
-	#else
-		typedef unsigned int	uint_ptr;
-	#endif
+//	#ifdef _WIN64
+//		typedef unsigned __int64 uint_ptr;
+//	#else
+//		typedef unsigned int	uint_ptr;
+//	#endif
+	typedef void*				uint_ptr;
 
 #else
 	#define LITEHTML_UTF8

commit abef83168f83b441324660cf405ac68428a69639
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Mon Aug 26 17:50:20 2019 +0200

    Fix handling deleted feed items where modified and published dates do not match

diff --git a/src/plugins/rssyl/rssyl_deleted.c b/src/plugins/rssyl/rssyl_deleted.c
index 5d1bbfc49..dd344d558 100644
--- a/src/plugins/rssyl/rssyl_deleted.c
+++ b/src/plugins/rssyl/rssyl_deleted.c
@@ -267,7 +267,8 @@ static gint _rssyl_deleted_check_func(gconstpointer a, gconstpointer b)
 
 	/* ...and time of publishing */
 	if (ditem->date_published == -1 ||
-			ditem->date_published == feed_item_get_date_published(fitem))
+			ditem->date_published == feed_item_get_date_published(fitem) ||
+			ditem->date_published == feed_item_get_date_modified(fitem))
 		pubdate_match = TRUE;
 
 	/* if all three match, it's the same item */
@@ -332,7 +333,8 @@ static void _rssyl_deleted_expire_func_f(gpointer data, gpointer user_data)
 
 	/* time of publishing, if set... */
 	if (ctx->ditem->date_published == -1 ||
-			ctx->ditem->date_published == feed_item_get_date_published(fitem))
+			ctx->ditem->date_published == feed_item_get_date_published(fitem) ||
+			ctx->ditem->date_published == feed_item_get_date_modified(fitem))
 		pubdate_match = TRUE;
 
 	/* if it's our item, set to NOT delete, since it's obviously

commit c7ce85fb14caa8e2ac80951060a1a36236e62baf
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Mon Aug 26 17:42:52 2019 +0200

    Fix comparison for RSS feed items without text

diff --git a/src/plugins/rssyl/rssyl_add_item.c b/src/plugins/rssyl/rssyl_add_item.c
index c40c9cd60..d8f28eabc 100644
--- a/src/plugins/rssyl/rssyl_add_item.c
+++ b/src/plugins/rssyl/rssyl_add_item.c
@@ -361,6 +361,10 @@ void rssyl_add_item(RFolderItem *ritem, FeedItem *feed_item)
 		feed_item->summary = NULL;
 	}
 
+	/* If there is still no text, use an empty string for consistency. */
+	if( feed_item_get_text(feed_item) == NULL )
+		feed_item_set_text(feed_item, "");
+
 	/* Do not add if the item already exists, update if it does exist, but
 	 * has changed. */
 	dif = rssyl_feed_item_exists(ritem, feed_item, &old_item);

commit eaaefcdf4c4c8d5ee9e4216cffccbd16b504f350
Author: Ricardo Mones <ricardo at mones.org>
Date:   Wed Aug 21 11:37:22 2019 +0200

    Fix const correctness
    
    Fixes "lh_viewer.c:97:19: warning: initialization discards ‘const’
    qualifier from pointer target type"

diff --git a/src/plugins/litehtml_viewer/lh_viewer.c b/src/plugins/litehtml_viewer/lh_viewer.c
index 2d2fc5044..03775dc78 100644
--- a/src/plugins/litehtml_viewer/lh_viewer.c
+++ b/src/plugins/litehtml_viewer/lh_viewer.c
@@ -88,13 +88,14 @@ static void lh_show_mimepart(MimeViewer *_viewer, const gchar *infile,
 	LHViewer *viewer = (LHViewer *)_viewer;
 	gchar *string = procmime_get_part_as_string(partinfo, TRUE);
 	gchar *utf8 = NULL;
+	const gchar *charset;
 
 	if (string == NULL) {
 		g_warning("LH: couldn't get MIME part file\n");
 		return;
 	}
 
-	gchar *charset = procmime_mimeinfo_get_parameter(partinfo, "charset");
+	charset = procmime_mimeinfo_get_parameter(partinfo, "charset");
 	if (charset != NULL && g_ascii_strcasecmp("utf-8", charset) != 0) {
 		gsize length;
 		GError *error = NULL;

commit aa8f4ad99713a23887cd2cce66e757ef0df941d6
Author: Ricardo Mones <ricardo at mones.org>
Date:   Wed Aug 21 11:36:40 2019 +0200

    Don't call strncpy with mismatching length
    
    Fixes "vcard.c:238:2: warning: ‘strncpy’ output truncated before
    terminating nul copying as many bytes from a string as its length"

diff --git a/src/vcard.c b/src/vcard.c
index 463f4a35d..2e8fce511 100644
--- a/src/vcard.c
+++ b/src/vcard.c
@@ -235,7 +235,7 @@ static gchar *vcard_get_line( VCardFile *cardFile ) {
 	start = cardFile->bufptr;
 	len = strlen( start );
 	end = start + len;
-	strncpy( buf, start, len );
+	memcpy( buf, start, len );
 	buf[ len ] = '\0';
 	g_strstrip(buf);
 	cardFile->bufptr = end + 1;

commit bc5414861497db691bca5cd1a370a989689a3efd
Author: Ricardo Mones <ricardo at mones.org>
Date:   Wed Aug 21 11:35:54 2019 +0200

    Remove unused variable
    
    Fixes "textview.c:721:18: warning: unused variable ‘stream’"

diff --git a/src/textview.c b/src/textview.c
index 2e4a9fd3f..d07f80ca1 100644
--- a/src/textview.c
+++ b/src/textview.c
@@ -681,7 +681,6 @@ static void textview_add_part(TextView *textview, MimeInfo *mimeinfo)
 			GdkPixbuf *pixbuf;
 			GError *error = NULL;
 			ClickableText *uri;
-			GInputStream *stream;
 
 			START_TIMING("inserting image");
 

commit ab031e717b4abc25852c9224b4be64f4540d8ba7
Author: Colin Leroy <colin at colino.net>
Date:   Tue Aug 13 10:13:29 2019 +0200

    MBOX import: give a better estimation of the time left and grey out widgets while importing

diff --git a/src/import.c b/src/import.c
index 89b470c47..3e1913d87 100644
--- a/src/import.c
+++ b/src/import.c
@@ -230,6 +230,14 @@ static void import_ok_cb(GtkWidget *widget, gpointer data)
 		g_free(mbox);
 		return;
 	} else {
+		gtk_widget_set_sensitive(file_entry, FALSE);
+		gtk_widget_set_sensitive(dest_entry, FALSE);
+		gtk_widget_set_sensitive(file_button, FALSE);
+		gtk_widget_set_sensitive(dest_button, FALSE);
+		gtk_widget_set_sensitive(ok_button, FALSE);
+		gtk_widget_set_sensitive(cancel_button, FALSE);
+		GTK_EVENTS_FLUSH();
+
 		import_ok = proc_mbox(dest, mbox, FALSE, NULL);
 	}
 
diff --git a/src/mbox.c b/src/mbox.c
index 9047fbb87..6375615a6 100644
--- a/src/mbox.c
+++ b/src/mbox.c
@@ -86,12 +86,19 @@ gint proc_mbox(FolderItem *dest, const gchar *mbox, gboolean apply_filter,
 	GSList *to_filter = NULL, *filtered = NULL, *unfiltered = NULL, *cur, *to_add = NULL;
 	gboolean printed = FALSE;
 	FolderItem *dropfolder;
+	GStatBuf src_stat;
 
 	cm_return_val_if_fail(dest != NULL, -1);
 	cm_return_val_if_fail(mbox != NULL, -1);
 
 	debug_print("Getting messages from %s into %s...\n", mbox, dest->path);
 
+	if (g_stat(mbox, &src_stat) < 0) {
+		FILE_OP_ERROR(mbox, "g_stat");
+		alertpanel_error(_("Could not stat mbox file:\n%s\n"), mbox);
+		return -1;
+	}
+
 	if ((mbox_fp = claws_fopen(mbox, "rb")) == NULL) {
 		FILE_OP_ERROR(mbox, "claws_fopen");
 		alertpanel_error(_("Could not open mbox file:\n%s\n"), mbox);
@@ -127,12 +134,14 @@ gint proc_mbox(FolderItem *dest, const gchar *mbox, gboolean apply_filter,
 		gint empty_lines;
 		gint msgnum;
 		
-		if (msgs > 0 && msgs%500 == 0) {
+		if (msgs%500 == 0) {
+			long cur_offset_mb = ftell(mbox_fp) / (1024 * 1024);
 			if (printed)
 				statusbar_pop_all();
 			statusbar_print_all(
-					ngettext("Importing from mbox... (%d mail imported)",
-						"Importing from mbox... (%d mails imported)", msgs), msgs);
+					ngettext("Importing from mbox... (%ld MB imported)",
+						"Importing from mbox... (%ld MB imported)", cur_offset_mb), cur_offset_mb);
+			statusbar_progress_all(cur_offset_mb, src_stat.st_size / (1024*1024), 1);
 			printed=TRUE;
 			GTK_EVENTS_FLUSH();
 		}
@@ -255,8 +264,10 @@ gint proc_mbox(FolderItem *dest, const gchar *mbox, gboolean apply_filter,
 		msgs++;
 	} while (more);
 
-	if (printed)
+	if (printed) {
 		statusbar_pop_all();
+		statusbar_progress_all(0, 0, 0);
+	}
 
 	if (apply_filter) {
 

commit 432dd7cfc695700480a832aee278f536a298ce01
Author: Colin Leroy <colin at colino.net>
Date:   Sat Aug 10 17:35:17 2019 +0200

    Fix bug #4237 - 403 is Forbidden not Unauthorized

diff --git a/src/plugins/rssyl/rssyl_update_feed.c b/src/plugins/rssyl/rssyl_update_feed.c
index 31b4228a0..bd4ead851 100644
--- a/src/plugins/rssyl/rssyl_update_feed.c
+++ b/src/plugins/rssyl/rssyl_update_feed.c
@@ -107,7 +107,7 @@ void rssyl_fetch_feed(RFetchCtx *ctx, RSSylVerboseFlags verbose)
 				ctx->error = g_strdup(_("401 (Authorisation required)"));
 				break;
 			case 403:
-				ctx->error = g_strdup(_("403 (Unauthorised)"));
+				ctx->error = g_strdup(_("403 (Forbidden)"));
 				break;
 			case 404:
 				ctx->error = g_strdup(_("404 (Not found)"));

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list