From aea66a83e9c5a63c13c54c7e71e2ccdea22c474c Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Mon, 5 Aug 2024 23:24:22 +0300
Subject: [PATCH 10/10] Drop unused width,height parameters from popup_image()

See RM #774

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 client/gui-gtk-3.22/dialogs.c | 2 +-
 client/gui-gtk-4.0/dialogs.c  | 2 +-
 client/gui-qt/dialogs.cpp     | 2 +-
 client/gui-qt/qtg_cxxside.h   | 2 +-
 client/gui-sdl2/dialogs.c     | 2 +-
 client/gui-sdl3/dialogs.c     | 2 +-
 client/gui-stub/dialogs.c     | 2 +-
 client/gui_interface.c        | 4 ++--
 client/gui_interface.h        | 2 +-
 client/include/dialogs_g.h    | 2 +-
 client/packhand.c             | 2 +-
 11 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/client/gui-gtk-3.22/dialogs.c b/client/gui-gtk-3.22/dialogs.c
index 66faff3a3f..aef44eb3cf 100644
--- a/client/gui-gtk-3.22/dialogs.c
+++ b/client/gui-gtk-3.22/dialogs.c
@@ -1633,7 +1633,7 @@ void request_action_confirmation(const char *expl,
 /**********************************************************************//**
   Popup image window
 **************************************************************************/
-void popup_image(const char *tag, int width, int height)
+void popup_image(const char *tag)
 {
   struct sprite *spr = load_popup_sprite(tag);
 
diff --git a/client/gui-gtk-4.0/dialogs.c b/client/gui-gtk-4.0/dialogs.c
index f0bd40e4e2..16c9fbc827 100644
--- a/client/gui-gtk-4.0/dialogs.c
+++ b/client/gui-gtk-4.0/dialogs.c
@@ -1673,7 +1673,7 @@ void request_action_confirmation(const char *expl,
 /**********************************************************************//**
   Popup image window
 **************************************************************************/
-void popup_image(const char *tag, int width_discard, int height_discard)
+void popup_image(const char *tag)
 {
   struct sprite *spr = load_popup_sprite(tag);
 
diff --git a/client/gui-qt/dialogs.cpp b/client/gui-qt/dialogs.cpp
index 4d111b9616..94cfae0783 100644
--- a/client/gui-qt/dialogs.cpp
+++ b/client/gui-qt/dialogs.cpp
@@ -4965,7 +4965,7 @@ void qtg_request_action_confirmation(const char *expl,
 /**********************************************************************//**
   Popup image window
 **************************************************************************/
-void qtg_popup_image(const char *tag, int width_discard, int height_discard)
+void qtg_popup_image(const char *tag)
 {
   struct sprite *spr = load_popup_sprite(tag);
 
diff --git a/client/gui-qt/qtg_cxxside.h b/client/gui-qt/qtg_cxxside.h
index e9dbc61af4..90594fc538 100644
--- a/client/gui-qt/qtg_cxxside.h
+++ b/client/gui-qt/qtg_cxxside.h
@@ -158,6 +158,6 @@ void qtg_recv_accept_treaty(struct Treaty *ptreaty, struct player *they);
 void qtg_request_action_confirmation(const char *expl,
                                      struct act_confirmation_data *data);
 
-void qtg_popup_image(const char *tag, int width, int height);
+void qtg_popup_image(const char *tag);
 
 #endif // FC__QTG_CXXSIDE_H
diff --git a/client/gui-sdl2/dialogs.c b/client/gui-sdl2/dialogs.c
index c5b7bb79aa..7f707a8e6d 100644
--- a/client/gui-sdl2/dialogs.c
+++ b/client/gui-sdl2/dialogs.c
@@ -3752,7 +3752,7 @@ static int exit_image_popup_callback(struct widget *pwidget)
 /**********************************************************************//**
   Popup image window
 **************************************************************************/
-void popup_image(const char *tag, int width_discard, int height_discard)
+void popup_image(const char *tag)
 {
   if (advanced_image_popup == NULL) {
     struct sprite *spr = load_popup_sprite(tag);
diff --git a/client/gui-sdl3/dialogs.c b/client/gui-sdl3/dialogs.c
index 0307b7ed96..916ea9abb0 100644
--- a/client/gui-sdl3/dialogs.c
+++ b/client/gui-sdl3/dialogs.c
@@ -3750,7 +3750,7 @@ static int exit_image_popup_callback(struct widget *pwidget)
 /**********************************************************************//**
   Popup image window
 **************************************************************************/
-void popup_image(const char *tag, int width_discard, int height_discard)
+void popup_image(const char *tag)
 {
   if (advanced_image_popup == NULL) {
     struct sprite *spr = load_popup_sprite(tag);
diff --git a/client/gui-stub/dialogs.c b/client/gui-stub/dialogs.c
index 343747878b..b5106782a0 100644
--- a/client/gui-stub/dialogs.c
+++ b/client/gui-stub/dialogs.c
@@ -377,6 +377,6 @@ void gui_request_action_confirmation(const char *expl,
 /**********************************************************************//**
   Popup image window
 **************************************************************************/
-void gui_popup_image(const char *tag, int width, int height)
+void gui_popup_image(const char *tag)
 {
 }
diff --git a/client/gui_interface.c b/client/gui_interface.c
index 9a94372bdf..a41becad9f 100644
--- a/client/gui_interface.c
+++ b/client/gui_interface.c
@@ -713,7 +713,7 @@ void request_action_confirmation(const char *expl,
 /**********************************************************************//**
   Call popup_image callback
 **************************************************************************/
-void popup_image(const char *tag, int width, int height)
+void popup_image(const char *tag)
 {
-  funcs.popup_image(tag, width, height);
+  funcs.popup_image(tag);
 }
diff --git a/client/gui_interface.h b/client/gui_interface.h
index 5709fea1e2..8495fff44b 100644
--- a/client/gui_interface.h
+++ b/client/gui_interface.h
@@ -165,7 +165,7 @@ struct gui_funcs {
   void (*request_action_confirmation)(const char *expl,
                                       struct act_confirmation_data *data);
 
-  void (*popup_image)(const char *tag, int width, int height);
+  void (*popup_image)(const char *tag);
 };
 
 struct gui_funcs *get_gui_funcs(void);
diff --git a/client/include/dialogs_g.h b/client/include/dialogs_g.h
index 33f3512e9e..f8484817de 100644
--- a/client/include/dialogs_g.h
+++ b/client/include/dialogs_g.h
@@ -94,6 +94,6 @@ GUI_FUNC_PROTO(void, request_action_confirmation, const char *expl,
 
 GUI_FUNC_PROTO(void, update_infra_dialog, void)
 
-GUI_FUNC_PROTO(void, popup_image, const char *tag, int width, int height)
+GUI_FUNC_PROTO(void, popup_image, const char *tag)
 
 #endif /* FC__DIALOGS_G_H */
diff --git a/client/packhand.c b/client/packhand.c
index 72a814d27a..7348bf1aa4 100644
--- a/client/packhand.c
+++ b/client/packhand.c
@@ -5533,7 +5533,7 @@ void handle_play_music(const char *tag)
 ****************************************************************************/
 void handle_popup_image(const char *tag)
 {
-  popup_image(tag, 500, 500);
+  popup_image(tag);
 }
 
 /************************************************************************//**
-- 
2.43.0

