From 19c8a199e57ecd39ddb804590417848e7ecc58ff Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Mon, 5 Aug 2024 23:22:20 +0300
Subject: [PATCH 13/13] 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-gtk-5.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 +-
 12 files changed, 13 insertions(+), 13 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 b3dde59459..a10118c534 100644
--- a/client/gui-gtk-4.0/dialogs.c
+++ b/client/gui-gtk-4.0/dialogs.c
@@ -1674,7 +1674,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-gtk-5.0/dialogs.c b/client/gui-gtk-5.0/dialogs.c
index 9f90c8e6d8..3a7c960642 100644
--- a/client/gui-gtk-5.0/dialogs.c
+++ b/client/gui-gtk-5.0/dialogs.c
@@ -1674,7 +1674,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 dbf5065240..24b7dd3849 100644
--- a/client/gui-qt/dialogs.cpp
+++ b/client/gui-qt/dialogs.cpp
@@ -4971,7 +4971,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 7446c47124..8eb26282d0 100644
--- a/client/gui-qt/qtg_cxxside.h
+++ b/client/gui-qt/qtg_cxxside.h
@@ -166,6 +166,6 @@ void qtg_real_units_report_dialog_update(void *unused);
 void qtg_endgame_report_dialog_start(const struct packet_endgame_report *packet);
 void qtg_endgame_report_dialog_player(const struct packet_endgame_player *packet);
 
-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 37c6e5d4c0..a577c469e6 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 1deacdc4b8..117f4b6fc2 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 7ed70b6872..98f04cb8ab 100644
--- a/client/gui_interface.c
+++ b/client/gui_interface.c
@@ -770,7 +770,7 @@ void endgame_report_dialog_player(const struct packet_endgame_player *packet)
 /**********************************************************************//**
   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 b243c83469..1d645e149f 100644
--- a/client/gui_interface.h
+++ b/client/gui_interface.h
@@ -174,7 +174,7 @@ struct gui_funcs {
   void (*endgame_report_dialog_start)(const struct packet_endgame_report *packet);
   void (*endgame_report_dialog_player)(const struct packet_endgame_player *packet);
 
-  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 82cdbcdf12..f3388e3af8 100644
--- a/client/packhand.c
+++ b/client/packhand.c
@@ -5594,7 +5594,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

