From 9c37f7be841fedbc7e019fa4b5d1646347ed871e Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Mon, 25 Jul 2022 04:52:23 +0300 Subject: [PATCH 45/45] Drop popup_messageopt_dialog() from gui API See osdn #44938 Signed-off-by: Marko Lindqvist --- client/gui-gtk-3.22/messagedlg.c | 3 ++- client/gui-gtk-3.22/messagedlg.h | 7 ++----- client/gui-gtk-4.0/messagedlg.c | 2 +- client/gui-gtk-4.0/messagedlg.h | 7 ++----- client/gui-qt/messagedlg.cpp | 2 +- client/gui-qt/messagedlg.h | 2 +- client/gui-sdl2/messagedlg.c | 11 ----------- client/gui-stub/messagedlg.c | 11 ----------- client/include/messagedlg_g.h | 6 ++---- 9 files changed, 11 insertions(+), 40 deletions(-) diff --git a/client/gui-gtk-3.22/messagedlg.c b/client/gui-gtk-3.22/messagedlg.c index e49d945ec7..83a3100cfb 100644 --- a/client/gui-gtk-3.22/messagedlg.c +++ b/client/gui-gtk-3.22/messagedlg.c @@ -50,8 +50,9 @@ static void item_toggled(GtkCellRendererToggle *cell, **************************************************************************/ void popup_messageopt_dialog(void) { - if (!shell) + if (shell == NULL) { create_messageopt_dialog(); + } gui_dialog_raise(shell); } diff --git a/client/gui-gtk-3.22/messagedlg.h b/client/gui-gtk-3.22/messagedlg.h index 92c0d7e020..5401444f1e 100644 --- a/client/gui-gtk-3.22/messagedlg.h +++ b/client/gui-gtk-3.22/messagedlg.h @@ -13,9 +13,6 @@ #ifndef FC__MESSAGEDLG_H #define FC__MESSAGEDLG_H -/* client */ -#include "messagedlg_g.h" +void popup_messageopt_dialog(void); -/* nothing to add */ - -#endif /* FC__MESSAGEDLG_H */ +#endif /* FC__MESSAGEDLG_H */ diff --git a/client/gui-gtk-4.0/messagedlg.c b/client/gui-gtk-4.0/messagedlg.c index e17ba2fb02..b909f0fd2f 100644 --- a/client/gui-gtk-4.0/messagedlg.c +++ b/client/gui-gtk-4.0/messagedlg.c @@ -50,7 +50,7 @@ static void item_toggled(GtkCellRendererToggle *cell, **************************************************************************/ void popup_messageopt_dialog(void) { - if (!shell) { + if (shell == NULL) { create_messageopt_dialog(); } diff --git a/client/gui-gtk-4.0/messagedlg.h b/client/gui-gtk-4.0/messagedlg.h index 92c0d7e020..5401444f1e 100644 --- a/client/gui-gtk-4.0/messagedlg.h +++ b/client/gui-gtk-4.0/messagedlg.h @@ -13,9 +13,6 @@ #ifndef FC__MESSAGEDLG_H #define FC__MESSAGEDLG_H -/* client */ -#include "messagedlg_g.h" +void popup_messageopt_dialog(void); -/* nothing to add */ - -#endif /* FC__MESSAGEDLG_H */ +#endif /* FC__MESSAGEDLG_H */ diff --git a/client/gui-qt/messagedlg.cpp b/client/gui-qt/messagedlg.cpp index 3a589e8a70..92114d58a2 100644 --- a/client/gui-qt/messagedlg.cpp +++ b/client/gui-qt/messagedlg.cpp @@ -174,7 +174,7 @@ void message_dlg::cancel_changes() /**********************************************************************//** Popup a window to let the user edit their message options. **************************************************************************/ -void popup_messageopt_dialog(void) +void popup_messageopt_dialog() { int i; QWidget *w; diff --git a/client/gui-qt/messagedlg.h b/client/gui-qt/messagedlg.h index 919061cec1..1b62c5f8b0 100644 --- a/client/gui-qt/messagedlg.h +++ b/client/gui-qt/messagedlg.h @@ -40,6 +40,6 @@ private slots: void cancel_changes(); }; -void popup_messageopt_dialog(void); +void popup_messageopt_dialog(); #endif // FC__MESSAGEDLG_H diff --git a/client/gui-sdl2/messagedlg.c b/client/gui-sdl2/messagedlg.c index b8927e87b3..ddcff31fd5 100644 --- a/client/gui-sdl2/messagedlg.c +++ b/client/gui-sdl2/messagedlg.c @@ -15,15 +15,4 @@ #include #endif -/* utility */ -#include "log.h" - #include "messagedlg.h" - -/**********************************************************************//** - Popup a window to let the user edit their message options. -**************************************************************************/ -void popup_messageopt_dialog(void) -{ - log_debug("popup_messageopt_dialog : PORT ME"); -} diff --git a/client/gui-stub/messagedlg.c b/client/gui-stub/messagedlg.c index 5991ec7b4e..e3e59c703b 100644 --- a/client/gui-stub/messagedlg.c +++ b/client/gui-stub/messagedlg.c @@ -15,18 +15,7 @@ #include #endif -/* gui main header */ -#include "gui_stub.h" - /* client */ #include "options.h" #include "messagedlg.h" - -/**********************************************************************//** - Popup a window to let the user edit their message options. -**************************************************************************/ -void popup_messageopt_dialog(void) -{ - /* PORTME */ -} diff --git a/client/include/messagedlg_g.h b/client/include/messagedlg_g.h index f9ff30d294..49bb107d5c 100644 --- a/client/include/messagedlg_g.h +++ b/client/include/messagedlg_g.h @@ -1,4 +1,4 @@ -/********************************************************************** +/*********************************************************************** Freeciv - Copyright (C) 2003 - The Freeciv Project 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 @@ -15,6 +15,4 @@ #include "gui_proto_constructor.h" -GUI_FUNC_PROTO(void, popup_messageopt_dialog, void) - -#endif /* FC__MESSAGEDLG_G_H */ +#endif /* FC__MESSAGEDLG_G_H */ -- 2.35.1