commit: 2b1a5c84a1d070889646a97d7a5618ae4c968cdb Author: Petr Vaněk <arkamar <AT> gentoo <DOT> org> AuthorDate: Wed Oct 1 13:08:19 2025 +0000 Commit: Petr Vaněk <arkamar <AT> gentoo <DOT> org> CommitDate: Wed Oct 1 13:31:44 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b1a5c84
media-gfx/gpicview: drop 0.2.5-r3 Signed-off-by: Petr Vaněk <arkamar <AT> gentoo.org> media-gfx/gpicview/Manifest | 1 - .../files/Fix-displaying-images-with-GTK3.patch | 172 --------------------- .../files/gpicview-fix-animated-gifs.patch | 13 -- .../gpicview-main_win_open-dummy-return.patch | 13 -- media-gfx/gpicview/gpicview-0.2.5-r3.ebuild | 31 ---- 5 files changed, 230 deletions(-) diff --git a/media-gfx/gpicview/Manifest b/media-gfx/gpicview/Manifest index ae696420337a..3db0e4ceba39 100644 --- a/media-gfx/gpicview/Manifest +++ b/media-gfx/gpicview/Manifest @@ -1,2 +1 @@ -DIST gpicview-0.2.5.tar.xz 349536 BLAKE2B c215e812693a30d55d3e606b9958d308b5d7f564ba0c3fc60e7606c492ec3ddd9997ae63f0865a6bebdf79c0a18e6a8b26a1e2c8d5dd7e2174d211130dbbe817 SHA512 afc7e67c7ae1252f9c1816ee46fe69e96ea7be9a60e03406a539f17b2e4f0e4b93a028c6f3f1c455f5433d6d7d78a58dcee2cb0ac91ea53093a21935bf454afd DIST gpicview-0.3.1.tar.gz 166302 BLAKE2B 919321bf1d26ebf4199b5ae6db0cf81c8e9e2de83d885913e3f91ba1895346947b004d47cb4a42e4d7c46f55cd5d98d6e380a68adebd7ceb4b34478f5ec766b5 SHA512 15f6a3201067e0eb3b71492072f207e7b95e4c672cea358eca0bb71c404e9fd5e1e7d2fd28eda11965374c192a13b496f58fedea03799ea2b7aa80da66fcd812 diff --git a/media-gfx/gpicview/files/Fix-displaying-images-with-GTK3.patch b/media-gfx/gpicview/files/Fix-displaying-images-with-GTK3.patch deleted file mode 100644 index b832d364b3ed..000000000000 --- a/media-gfx/gpicview/files/Fix-displaying-images-with-GTK3.patch +++ /dev/null @@ -1,172 +0,0 @@ -From 2a497a06d9297712778b9bfde3f21a2bd867967c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <[email protected]> -Date: Tue, 21 Feb 2017 01:06:06 +0100 -Subject: [PATCH] Fix displaying images with GTK3 - -We have to use the cairo context provided by the draw event, otherwise the scrolling does not work properly. - -Don't paint the whole image when scale == 1, it's unneeded and slow. ---- - src/image-view.c | 86 +++++++++++++++++++++++++++++--------------------------- - 1 file changed, 44 insertions(+), 42 deletions(-) - -diff --git a/src/image-view.c b/src/image-view.c -index b367f2a..820b843 100644 ---- a/src/image-view.c -+++ b/src/image-view.c -@@ -24,11 +24,10 @@ - static void image_view_finalize(GObject *iv); - - static void image_view_clear( ImageView* iv ); --static gboolean on_idle( ImageView* iv ); - static void calc_image_area( ImageView* iv ); --static void paint( ImageView* iv, GdkRectangle* invalid_rect, GdkInterpType type ); - - #if GTK_CHECK_VERSION(3, 0, 0) -+static void paint( ImageView* iv, GdkRectangle* invalid_rect, GdkInterpType type, cairo_t* cr ); - - static void image_view_paint( ImageView* iv, cairo_t* cr ); - -@@ -37,6 +36,8 @@ static void on_get_preferred_height( GtkWidget* widget, gint* minimal_height, gi - static gboolean on_draw_event(GtkWidget* widget, cairo_t* cr); - - #else // GTK2 -+static gboolean on_idle( ImageView* iv ); -+static void paint( ImageView* iv, GdkRectangle* invalid_rect, GdkInterpType type ); - - static void image_view_paint( ImageView* iv, GdkEventExpose* evt ); - -@@ -268,16 +269,13 @@ void image_view_paint( ImageView* iv, cairo_t *cr ) - { - cairo_rectangle_int_t rectangle; - cairo_region_get_rectangle(region, i, &rectangle); -- paint( iv, &rectangle, GDK_INTERP_NEAREST ); -+ paint( iv, &rectangle, GDK_INTERP_NEAREST, cr ); - } - - cairo_region_destroy (region); -- -- if( 0 == iv->idle_handler ) -- iv->idle_handler = g_idle_add( (GSourceFunc)on_idle, iv ); - } - } --#else -+#else // GTK2 - - gboolean on_expose_event( GtkWidget* widget, GdkEventExpose* evt ) - { -@@ -390,6 +388,8 @@ void image_view_set_scale( ImageView* iv, gdouble new_scale, GdkInterpType type - } - } - -+#if GTK_CHECK_VERSION(3, 0, 0) -+#else // GTK2 - gboolean on_idle( ImageView* iv ) - { - GDK_THREADS_ENTER(); -@@ -435,6 +435,7 @@ gboolean on_idle( ImageView* iv ) - iv->idle_handler = 0; - return FALSE; - } -+#endif - - void calc_image_area( ImageView* iv ) - { -@@ -460,7 +461,11 @@ void calc_image_area( ImageView* iv ) - } - } - -+#if GTK_CHECK_VERSION(3, 0, 0) -+void paint( ImageView* iv, GdkRectangle* invalid_rect, GdkInterpType type, cairo_t* cr ) -+#else // GTK2 - void paint( ImageView* iv, GdkRectangle* invalid_rect, GdkInterpType type ) -+#endif - { - GdkRectangle rect; - if( ! gdk_rectangle_intersect( invalid_rect, &iv->img_area, &rect ) ) -@@ -470,51 +475,48 @@ void paint( ImageView* iv, GdkRectangle* invalid_rect, GdkInterpType type ) - int dest_y; - - GdkPixbuf* src_pix = NULL; -- if( iv->scale == 1.0 ) // original size -- { -- src_pix = (GdkPixbuf*)g_object_ref( iv->pix ); -- dest_x = iv->img_area.x; -- dest_y = iv->img_area.y; -- } -- else // scaling is needed -+ GdkPixbuf* scaled_pix = NULL; -+ -+ dest_x = rect.x; -+ dest_y = rect.y; -+ -+ rect.x -= iv->img_area.x; -+ rect.y -= iv->img_area.y; -+ -+ int src_x = (int)floor( ((gdouble)rect.x) / iv->scale + 0.5 ); -+ int src_y = (int)floor( ((gdouble)rect.y) / iv->scale + 0.5 ); -+ int src_w = (int)floor( ((gdouble)rect.width) / iv->scale + 0.5 ); -+ int src_h = (int)floor( ((gdouble)rect.height) / iv->scale + 0.5 ); -+ if( src_y > gdk_pixbuf_get_height( iv->pix ) ) -+ src_y = gdk_pixbuf_get_height( iv->pix ); -+ if( src_x + src_w > gdk_pixbuf_get_width( iv->pix ) ) -+ src_w = gdk_pixbuf_get_width( iv->pix ) - src_x; -+ if( src_y + src_h > gdk_pixbuf_get_height( iv->pix ) ) -+ src_h = gdk_pixbuf_get_height( iv->pix ) - src_y; -+ //g_debug("orig src: x=%d, y=%d, w=%d, h=%d", -+ // src_x, src_y, src_w, src_h ); -+ -+ if ((src_w > 0) && (src_h > 0)) - { -- dest_x = rect.x; -- dest_y = rect.y; -- -- rect.x -= iv->img_area.x; -- rect.y -= iv->img_area.y; -- -- GdkPixbuf* scaled_pix = NULL; -- int src_x = (int)floor( ((gdouble)rect.x) / iv->scale + 0.5 ); -- int src_y = (int)floor( ((gdouble)rect.y) / iv->scale + 0.5 ); -- int src_w = (int)floor( ((gdouble)rect.width) / iv->scale + 0.5 ); -- int src_h = (int)floor( ((gdouble)rect.height) / iv->scale + 0.5 ); -- if( src_y > gdk_pixbuf_get_height( iv->pix ) ) -- src_y = gdk_pixbuf_get_height( iv->pix ); -- if( src_x + src_w > gdk_pixbuf_get_width( iv->pix ) ) -- src_w = gdk_pixbuf_get_width( iv->pix ) - src_x; -- if( src_y + src_h > gdk_pixbuf_get_height( iv->pix ) ) -- src_h = gdk_pixbuf_get_height( iv->pix ) - src_y; -- //g_debug("orig src: x=%d, y=%d, w=%d, h=%d", -- // src_x, src_y, src_w, src_h ); -- -- if ((src_w > 0) && (src_h > 0)) -- { -- src_pix = gdk_pixbuf_new_subpixbuf( iv->pix, src_x, src_y, src_w, src_h ); -- scaled_pix = gdk_pixbuf_scale_simple( src_pix, rect.width, rect.height, type ); -- g_object_unref( src_pix ); -- src_pix = scaled_pix; -- } -- -+ src_pix = gdk_pixbuf_new_subpixbuf( iv->pix, src_x, src_y, src_w, src_h ); -+ scaled_pix = gdk_pixbuf_scale_simple( src_pix, rect.width, rect.height, type ); -+ g_object_unref( src_pix ); -+ src_pix = scaled_pix; - } - - if( G_LIKELY(src_pix) ) - { - GtkWidget* widget = (GtkWidget*)iv; -+#if GTK_CHECK_VERSION(3, 0, 0) -+#else // GTK2 - cairo_t *cr = gdk_cairo_create (gtk_widget_get_window(widget)); -+#endif - gdk_cairo_set_source_pixbuf (cr, src_pix, dest_x, dest_y); - cairo_paint (cr); -+#if GTK_CHECK_VERSION(3, 0, 0) -+#else // GTK2 - cairo_destroy (cr); -+#endif - - g_object_unref( src_pix ); - } --- -2.11.1 diff --git a/media-gfx/gpicview/files/gpicview-fix-animated-gifs.patch b/media-gfx/gpicview/files/gpicview-fix-animated-gifs.patch deleted file mode 100644 index 88867fbe31ad..000000000000 --- a/media-gfx/gpicview/files/gpicview-fix-animated-gifs.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/image-view.c b/src/image-view.c -index b367f2a..1368620 100644 ---- a/src/image-view.c -+++ b/src/image-view.c -@@ -343,7 +343,7 @@ void image_view_clear( ImageView* iv ) - - void image_view_set_pixbuf( ImageView* iv, GdkPixbuf* pixbuf ) - { -- if( pixbuf != iv->pix ) -+ - { - image_view_clear( iv ); - if( G_LIKELY(pixbuf) ) diff --git a/media-gfx/gpicview/files/gpicview-main_win_open-dummy-return.patch b/media-gfx/gpicview/files/gpicview-main_win_open-dummy-return.patch deleted file mode 100644 index 0f4e3bde251c..000000000000 --- a/media-gfx/gpicview/files/gpicview-main_win_open-dummy-return.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/main-win.c b/src/main-win.c -index 32f6433..bf5feba 100644 ---- a/src/main-win.c -+++ b/src/main-win.c -@@ -378,7 +378,7 @@ gboolean main_win_open( MainWin* mw, const char* file_path, ZoomMode zoom ) - image_list_sort_by_name( mw->img_list, GTK_SORT_DESCENDING ); - if (image_list_get_first(mw->img_list)) - main_win_open(mw, image_list_get_current_file_path(mw->img_list), zoom); -- return; -+ return 1; - } - - diff --git a/media-gfx/gpicview/gpicview-0.2.5-r3.ebuild b/media-gfx/gpicview/gpicview-0.2.5-r3.ebuild deleted file mode 100644 index 7cc62978f08a..000000000000 --- a/media-gfx/gpicview/gpicview-0.2.5-r3.ebuild +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit xdg - -DESCRIPTION="A Simple and Fast Image Viewer for X" -HOMEPAGE="https://lxde.sourceforge.net/gpicview/" -SRC_URI="https://downloads.sourceforge.net/lxde/${P}.tar.xz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ppc ~riscv x86" - -RDEPEND="media-libs/libjpeg-turbo - x11-libs/gtk+:3[X]" -DEPEND="${RDEPEND} - >=dev-util/intltool-0.40 - sys-devel/gettext - virtual/pkgconfig" - -PATCHES=( - "${FILESDIR}/Fix-displaying-images-with-GTK3.patch" - "${FILESDIR}/${PN}-main_win_open-dummy-return.patch" - "${FILESDIR}/${PN}-fix-animated-gifs.patch" -) - -src_configure() { - econf --enable-gtk3 -}
