[Commits] [SCM] claws branch, gtk2, updated. 3.19.1-84-g1bddbe5b1
jonathan at claws-mail.org
jonathan at claws-mail.org
Sun Oct 22 11:52:47 UTC 2023
The branch, gtk2 has been updated
via 1bddbe5b146aa333b00b41840e3e64495cf837b9 (commit)
from 7cfd53bcc732e47eca5dbacfd5560de047b79e5d (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} | 33 ++++++++--------------
4 files changed, 19 insertions(+), 36 deletions(-)
copy src/plugins/litehtml_viewer/{lh_prefs.h => container_linux_images.h} (58%)
- Log -----------------------------------------------------------------
commit 1bddbe5b146aa333b00b41840e3e64495cf837b9
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 aa61398d7..df4e5792b 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 99b84c0ae..2a598d358 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 e66962a8c..2897b2d0f 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