From ec11624e3e0235b91277da4fd2912504be17934f Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Wed, 15 Jun 2022 05:50:23 +0300 Subject: [PATCH 40/40] Gui API: Drop option_dialog_popup() from common API See osdn #44836 Signed-off-by: Marko Lindqvist --- client/gui-gtk-3.22/optiondlg.h | 4 +++- client/gui-gtk-4.0/optiondlg.h | 4 +++- client/gui-qt/optiondlg.cpp | 5 ++--- client/gui-qt/optiondlg.h | 2 ++ client/gui-sdl2/optiondlg.h | 3 +++ client/gui-stub/optiondlg.h | 2 ++ client/include/optiondlg_g.h | 6 ++---- 7 files changed, 17 insertions(+), 9 deletions(-) diff --git a/client/gui-gtk-3.22/optiondlg.h b/client/gui-gtk-3.22/optiondlg.h index 9c6c738b30..ba7e11efa3 100644 --- a/client/gui-gtk-3.22/optiondlg.h +++ b/client/gui-gtk-3.22/optiondlg.h @@ -16,4 +16,6 @@ /* client */ #include "optiondlg_g.h" -#endif /* FC__OPTIONDLG_H */ +void option_dialog_popup(const char *name, const struct option_set *poptset); + +#endif /* FC__OPTIONDLG_H */ diff --git a/client/gui-gtk-4.0/optiondlg.h b/client/gui-gtk-4.0/optiondlg.h index 9c6c738b30..ba7e11efa3 100644 --- a/client/gui-gtk-4.0/optiondlg.h +++ b/client/gui-gtk-4.0/optiondlg.h @@ -16,4 +16,6 @@ /* client */ #include "optiondlg_g.h" -#endif /* FC__OPTIONDLG_H */ +void option_dialog_popup(const char *name, const struct option_set *poptset); + +#endif /* FC__OPTIONDLG_H */ diff --git a/client/gui-qt/optiondlg.cpp b/client/gui-qt/optiondlg.cpp index cf9af45121..b29467c9a4 100644 --- a/client/gui-qt/optiondlg.cpp +++ b/client/gui-qt/optiondlg.cpp @@ -119,11 +119,10 @@ QString cut_helptext(QString text) return ret_str; } - /************************************************************************//** Constructor for options dialog. ****************************************************************************/ -option_dialog::option_dialog(const QString & name, +option_dialog::option_dialog(const QString &name, const option_set *options, QWidget *parent) : qfc_dialog(parent) { @@ -768,7 +767,7 @@ void option_dialog::add_option(struct option *poption) /************************************************************************//** Popup the option dialog for the option set. ****************************************************************************/ -void option_dialog_popup(const char *name, const struct option_set *poptset) +void option_dialog_popup(QString name, const struct option_set *poptset) { option_dialog *opt_dialog; diff --git a/client/gui-qt/optiondlg.h b/client/gui-qt/optiondlg.h index 63233ff3be..15dac85129 100644 --- a/client/gui-qt/optiondlg.h +++ b/client/gui-qt/optiondlg.h @@ -35,6 +35,8 @@ class QString; QString split_text(QString text, bool cut); QString cut_helptext(QString text); +void option_dialog_popup(QString name, const struct option_set *poptset); + /**************************************************************************** Dialog for client/server options ****************************************************************************/ diff --git a/client/gui-sdl2/optiondlg.h b/client/gui-sdl2/optiondlg.h index b33fa2eb97..1970400d26 100644 --- a/client/gui-sdl2/optiondlg.h +++ b/client/gui-sdl2/optiondlg.h @@ -22,11 +22,14 @@ #ifndef FC__OPTIONDLG_H #define FC__OPTIONDLG_H +/* client */ #include "optiondlg_g.h" void popup_optiondlg(void); void popdown_optiondlg(bool leave_game); +void option_dialog_popup(const char *name, const struct option_set *poptset); + void init_options_button(void); void enable_options_button(void); void disable_options_button(void); diff --git a/client/gui-stub/optiondlg.h b/client/gui-stub/optiondlg.h index 955285492b..738856c633 100644 --- a/client/gui-stub/optiondlg.h +++ b/client/gui-stub/optiondlg.h @@ -14,7 +14,9 @@ #ifndef FC__OPTIONDLG_H #define FC__OPTIONDLG_H +/* client */ #include "optiondlg_g.h" +void option_dialog_popup(const char *name, const struct option_set *poptset); #endif /* FC__OPTIONDLG_H */ diff --git a/client/include/optiondlg_g.h b/client/include/optiondlg_g.h index 41115fbceb..8b8671a74c 100644 --- a/client/include/optiondlg_g.h +++ b/client/include/optiondlg_g.h @@ -1,4 +1,4 @@ -/********************************************************************** +/*********************************************************************** Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold 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 @@ -18,12 +18,10 @@ struct option; struct option_set; -GUI_FUNC_PROTO(void, option_dialog_popup, const char *name, - const struct option_set *poptset) GUI_FUNC_PROTO(void, option_dialog_popdown, const struct option_set *poptset) GUI_FUNC_PROTO(void, option_gui_update, struct option *poption) GUI_FUNC_PROTO(void, option_gui_add, struct option *poption) GUI_FUNC_PROTO(void, option_gui_remove, struct option *poption) -#endif /* FC__OPTIONDLG_G_H */ +#endif /* FC__OPTIONDLG_G_H */ -- 2.35.1