[Commits] [SCM] claws branch, master, updated. 4.1.1-100-gfd6149254

jonathan at claws-mail.org jonathan at claws-mail.org
Sun Oct 22 11:51:50 UTC 2023


The branch, master has been updated
       via  fd6149254aaebd40e2ac74d8c2c6f1a54d71d0f3 (commit)
      from  abed0c4a511d0d247eaa17cd235f433863dc3025 (commit)

Summary of changes:
 src/plugins/litehtml_viewer/container_linux.cpp    |  7 ++---
 src/plugins/litehtml_viewer/container_linux.h      |  1 -
 .../litehtml_viewer/container_linux_images.cpp     | 14 +++-------
 .../{lh_prefs.h => container_linux_images.h}       | 31 ++++++++--------------
 4 files changed, 18 insertions(+), 35 deletions(-)
 copy src/plugins/litehtml_viewer/{lh_prefs.h => container_linux_images.h} (63%)


- Log -----------------------------------------------------------------
commit fd6149254aaebd40e2ac74d8c2c6f1a54d71d0f3
Author: Jonathan Boeing <jonathan at claws-mail.org>
Date:   Mon Oct 9 22:42:31 2023 -0700

    Build fixes

diff --git a/src/plugins/litehtml_viewer/container_linux.cpp b/src/plugins/litehtml_viewer/container_linux.cpp
index 3b6219d87..498f90152 100644
--- a/src/plugins/litehtml_viewer/container_linux.cpp
+++ b/src/plugins/litehtml_viewer/container_linux.cpp
@@ -21,6 +21,7 @@
 #endif
 
 #include "container_linux.h"
+#include "container_linux_images.h"
 
 #include <cmath>
 #include "lh_prefs.h"
@@ -411,18 +412,18 @@ void container_linux::draw_background( litehtml::uint_ptr hdc, const std::vector
 			switch(bg.repeat)
 			{
 			case litehtml::background_repeat_no_repeat:
-				draw_pixbuf(cr, bgbmp, bg.position_x, bg.position_y, bgbmp->get_width(), bgbmp->get_height());
+				draw_pixbuf(cr, bgbmp, bg.position_x, bg.position_y, gdk_pixbuf_get_width(bgbmp), gdk_pixbuf_get_height(bgbmp));
 				break;
 
 			case litehtml::background_repeat_repeat_x:
 				cairo_set_source(cr, pattern);
-				cairo_rectangle(cr, bg.clip_box.left(), bg.position_y, bg.clip_box.width, bgbmp->get_height());
+				cairo_rectangle(cr, bg.clip_box.left(), bg.position_y, bg.clip_box.width, gdk_pixbuf_get_height(bgbmp));
 				cairo_fill(cr);
 				break;
 
 			case litehtml::background_repeat_repeat_y:
 				cairo_set_source(cr, pattern);
-				cairo_rectangle(cr, bg.position_x, bg.clip_box.top(), bgbmp->get_width(), bg.clip_box.height);
+				cairo_rectangle(cr, bg.position_x, bg.clip_box.top(), gdk_pixbuf_get_width(bgbmp), bg.clip_box.height);
 				cairo_fill(cr);
 				break;
 
diff --git a/src/plugins/litehtml_viewer/container_linux.h b/src/plugins/litehtml_viewer/container_linux.h
index a09384601..67ca3b29e 100644
--- a/src/plugins/litehtml_viewer/container_linux.h
+++ b/src/plugins/litehtml_viewer/container_linux.h
@@ -104,7 +104,6 @@ public:
 	void del_clip() override;
 
 	virtual void make_url( const char* url, const char* basepath, litehtml::string& out );
-	virtual Glib::RefPtr<Gdk::Pixbuf>	get_image(const char* url, bool redraw_on_ready) = 0;
 
 	void clear_images();
 
diff --git a/src/plugins/litehtml_viewer/container_linux_images.cpp b/src/plugins/litehtml_viewer/container_linux_images.cpp
index 4e834aec3..2e06f32d5 100644
--- a/src/plugins/litehtml_viewer/container_linux_images.cpp
+++ b/src/plugins/litehtml_viewer/container_linux_images.cpp
@@ -20,14 +20,11 @@
 #include "claws-features.h"
 #endif
 
-#include <set>
 #include "common/utils.h"
 
-#include "container_linux.h"
+#include "container_linux_images.h"
 #include "http.h"
 
-typedef std::pair<litehtml::string, struct timeval> lru_entry;
-
 static GdkPixbuf *lh_get_image(const char *url)
 {
 	GError *error = NULL;
@@ -59,12 +56,7 @@ theend:
 	return pixbuf;
 }
 
-struct FetchCtx {
-	container_linux *container;
-	gchar *url;
-};
-
-static void get_image_threaded(GTask *task, gpointer source, gpointer task_data, GCancellable *cancellable)
+void get_image_threaded(GTask *task, gpointer source, gpointer task_data, GCancellable *cancellable)
 {
 	struct FetchCtx *ctx = (struct FetchCtx *)task_data;
 	GdkPixbuf *pixbuf = lh_get_image(ctx->url);
@@ -72,7 +64,7 @@ static void get_image_threaded(GTask *task, gpointer source, gpointer task_data,
 	g_task_return_pointer(task, pixbuf, NULL);
 }
 
-static void get_image_callback(GObject *source, GAsyncResult *res, gpointer user_data)
+void get_image_callback(GObject *source, GAsyncResult *res, gpointer user_data)
 {
 	GdkPixbuf *pixbuf;
 	struct FetchCtx *ctx = (struct FetchCtx *)user_data;
diff --git a/src/plugins/litehtml_viewer/container_linux_images.h b/src/plugins/litehtml_viewer/container_linux_images.h
new file mode 100644
index 000000000..2ea7b3284
--- /dev/null
+++ b/src/plugins/litehtml_viewer/container_linux_images.h
@@ -0,0 +1,35 @@
+/*
+ * Claws Mail -- A GTK based, lightweight, and fast e-mail client
+ * Copyright(C) 2023 the Claws Mail Team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write tothe Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef CONTAINER_LINUX_IMAGES_H
+#define CONTAINER_LINUX_IMAGES_H
+
+#include <set>
+
+#include "container_linux.h"
+
+typedef std::pair<litehtml::string, struct timeval> lru_entry;
+
+struct FetchCtx {
+	container_linux *container;
+	gchar *url;
+};
+
+void get_image_threaded(GTask *task, gpointer source, gpointer task_data, GCancellable *cancellable);
+void get_image_callback(GObject *source, GAsyncResult *res, gpointer user_data);
+
+#endif

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list