From d456cc9037a6a2d42c048dd1e72aabbf3551d54a Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 10 Jun 2023 17:53:48 +0300 Subject: [PATCH 50/50] gtk4: Drop unused image_..._from_surface() See osdn #48213 Signed-off-by: Marko Lindqvist --- client/gui-gtk-4.0/sprite.c | 36 ------------------------------------ client/gui-gtk-4.0/sprite.h | 6 ------ 2 files changed, 42 deletions(-) diff --git a/client/gui-gtk-4.0/sprite.c b/client/gui-gtk-4.0/sprite.c index 69c5c53b96..4a540a5e59 100644 --- a/client/gui-gtk-4.0/sprite.c +++ b/client/gui-gtk-4.0/sprite.c @@ -520,42 +520,6 @@ GdkPixbuf *create_extra_pixbuf(const struct extra_type *pextra) return pixbuf; } -/* TODO: Remove as unused */ -#if 0 -/************************************************************************//** - Create a GtkImage from cairo surface. -****************************************************************************/ -GtkWidget *image_new_from_surface(cairo_surface_t *surf) -{ - GdkPixbuf *pb; - GtkWidget *image; - - pb = surface_get_pixbuf(surf, - cairo_image_surface_get_width(surf), - cairo_image_surface_get_height(surf)); - - image = gtk_image_new_from_pixbuf(pb); - g_object_unref(pb); - - return image; -} - -/************************************************************************//** - Set a GtkImage from cairo surface. -****************************************************************************/ -void image_set_from_surface(GtkImage *image, cairo_surface_t *surf) -{ - GdkPixbuf *pb; - - pb = surface_get_pixbuf(surf, - cairo_image_surface_get_width(surf), - cairo_image_surface_get_height(surf)); - - gtk_image_set_from_pixbuf(image, pb); - g_object_unref(pb); -} -#endif /* Unused GtkImage stuff */ - /************************************************************************//** Create a GtkPicture from cairo surface. ****************************************************************************/ diff --git a/client/gui-gtk-4.0/sprite.h b/client/gui-gtk-4.0/sprite.h index 78eb30063d..d166a78702 100644 --- a/client/gui-gtk-4.0/sprite.h +++ b/client/gui-gtk-4.0/sprite.h @@ -36,12 +36,6 @@ GdkPixbuf *surface_get_pixbuf(cairo_surface_t *surf, int width, int height); GdkPixbuf *create_extra_pixbuf(const struct extra_type *pextra); -/* TODO: Remove as unused */ -#if 0 -GtkWidget *image_new_from_surface(cairo_surface_t *surf); -void image_set_from_surface(GtkImage *image, cairo_surface_t *surf); -#endif - GtkWidget *picture_new_from_surface(cairo_surface_t *surf); void picture_set_from_surface(GtkPicture *image, cairo_surface_t *surf); -- 2.39.2