[Commits] [SCM] claws branch, master, updated. 3.17.3-132-g6dc279d
ticho at claws-mail.org
ticho at claws-mail.org
Sat Mar 9 22:55:17 CET 2019
The branch, master has been updated
via 6dc279d931599fa2c7be4b3cd49273625008d7a5 (commit)
from 531b117a0a3459abf82022f032fa52a2d09c1695 (commit)
Summary of changes:
src/plugins/litehtml_viewer/container_linux_images.cpp | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
- Log -----------------------------------------------------------------
commit 6dc279d931599fa2c7be4b3cd49273625008d7a5
Author: Andrej Kacian <ticho at claws-mail.org>
Date: Sat Mar 9 22:53:10 2019 +0100
Always remove local images from Litehtml image cache
Since their "url" in cache only includes MIME
file name, they are not guaranteed to be unique
across different messages.
diff --git a/src/plugins/litehtml_viewer/container_linux_images.cpp b/src/plugins/litehtml_viewer/container_linux_images.cpp
index 2c9d91d..5c6f7f6 100644
--- a/src/plugins/litehtml_viewer/container_linux_images.cpp
+++ b/src/plugins/litehtml_viewer/container_linux_images.cpp
@@ -214,7 +214,19 @@ gint container_linux::clear_images(gint desired_size)
lock_images_cache();
- /* First, tally up size of all the stored GdkPixbufs and
+ /* First, remove all local images - the ones with "cid:"
+ * URL. We will remove their list elements later. */
+ for (auto i = m_images.rbegin(); i != m_images.rend(); ++i) {
+ image *img = &(*i);
+
+ if (!strncmp(img->first.c_str(), "cid:", 4)) {
+ g_object_unref(img->second);
+ img->second = NULL;
+ num++;
+ }
+ }
+
+ /* Now tally up size of all the stored GdkPixbufs and
* deallocate those which make the total size be above
* the desired_size limit. We will remove their list
* elements later. */
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list