[Commits] [SCM] claws branch, litehtml, updated. 3.17.3-98-g10a7fde
ticho at claws-mail.org
ticho at claws-mail.org
Tue Jan 29 21:50:01 CET 2019
The branch, litehtml has been updated
via 10a7fde377d392088a2ef2303fd2aea2f8a50d2a (commit)
from 36de1eda6d981f94c9ab078d9fd46c831dbe7b07 (commit)
Summary of changes:
src/plugins/litehtml_viewer/lh_widget.cpp | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
- Log -----------------------------------------------------------------
commit 10a7fde377d392088a2ef2303fd2aea2f8a50d2a
Author: Andrej Kacian <ticho at claws-mail.org>
Date: Tue Jan 29 21:47:53 2019 +0100
Properly free previous document from memory in litehtml's clear()
We also call paint_white() earlier in redraw().
This results in properly clearing the previously
rendered html content when opening a different
HTML part.
diff --git a/src/plugins/litehtml_viewer/lh_widget.cpp b/src/plugins/litehtml_viewer/lh_widget.cpp
index 2998564..fd74a3b 100644
--- a/src/plugins/litehtml_viewer/lh_widget.cpp
+++ b/src/plugins/litehtml_viewer/lh_widget.cpp
@@ -240,10 +240,10 @@ void lh_widget::redraw()
GdkWindow *gdkwin;
cairo_t *cr;
- if (m_html == NULL) {
- g_warning("lh_widget::redraw: No document!");
+ paint_white();
+
+ if (m_html == NULL)
return;
- }
/* Get width of the viewport. */
gdkwin = gtk_viewport_get_view_window(GTK_VIEWPORT(m_viewport));
@@ -269,8 +269,6 @@ void lh_widget::redraw()
m_html->width(), m_html->height());
}
- paint_white();
-
/* Paint the rendered HTML. */
gdkwin = gtk_widget_get_window(m_drawing_area);
if (gdkwin == NULL) {
@@ -303,6 +301,7 @@ void lh_widget::paint_white()
}
void lh_widget::clear()
{
+ m_html = nullptr;
paint_white();
m_rendered_width = 0;
}
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list