From 8e13a6cafab40f1688404e193ad5d3828dd380c2 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 27 May 2023 03:17:02 +0300 Subject: [PATCH 22/22] Drop effectively empty sdl2-client source files See osdn #47616 Signed-off-by: Marko Lindqvist --- client/gui-gtk-3.22/chatline.c | 1 + client/gui-gtk-3.22/voteinfo_bar.c | 2 +- client/gui-gtk-4.0/chatline.c | 1 + client/gui-gtk-4.0/voteinfo_bar.c | 2 +- client/gui-sdl2/Makefile.am | 6 ------ client/gui-sdl2/chatline.c | 3 ++- client/gui-sdl2/connectdlg.c | 2 +- client/gui-sdl2/dialogs.c | 6 +++--- client/gui-sdl2/gui_main.c | 2 +- client/gui-sdl2/inteldlg.c | 2 +- client/gui-sdl2/mapctrl.c | 2 +- client/gui-sdl2/menu.c | 2 +- client/gui-sdl2/messagedlg.c | 18 ------------------ client/gui-sdl2/messagedlg.h | 20 -------------------- client/gui-sdl2/optiondlg.c | 2 +- client/gui-sdl2/pages.c | 2 +- client/gui-sdl2/pages.h | 18 ------------------ client/gui-sdl2/ratesdlg.h | 21 --------------------- client/gui-sdl2/spaceshipdlg.c | 2 +- client/gui-sdl2/spaceshipdlg.h | 21 --------------------- client/gui-sdl2/voteinfo_bar.c | 2 +- client/gui-sdl2/voteinfo_bar.h | 19 ------------------- client/include/pages_g.h | 22 ++++------------------ client/update_queue.h | 19 +++++++++++++++++++ meson.build | 1 - 25 files changed, 41 insertions(+), 157 deletions(-) delete mode 100644 client/gui-sdl2/messagedlg.c delete mode 100644 client/gui-sdl2/messagedlg.h delete mode 100644 client/gui-sdl2/pages.h delete mode 100644 client/gui-sdl2/ratesdlg.h delete mode 100644 client/gui-sdl2/spaceshipdlg.h delete mode 100644 client/gui-sdl2/voteinfo_bar.h diff --git a/client/gui-gtk-3.22/chatline.c b/client/gui-gtk-3.22/chatline.c index 7839e846cd..b010570ff0 100644 --- a/client/gui-gtk-3.22/chatline.c +++ b/client/gui-gtk-3.22/chatline.c @@ -40,6 +40,7 @@ #include "climap.h" #include "control.h" #include "mapview_common.h" +#include "update_queue.h" /* client/gui-gtk-3.22 */ #include "colors.h" diff --git a/client/gui-gtk-3.22/voteinfo_bar.c b/client/gui-gtk-3.22/voteinfo_bar.c index 44ee17e543..eadbd2e9c7 100644 --- a/client/gui-gtk-3.22/voteinfo_bar.c +++ b/client/gui-gtk-3.22/voteinfo_bar.c @@ -25,10 +25,10 @@ /* client */ #include "options.h" #include "voteinfo.h" +#include "update_queue.h" /* client/gui-gtk-3.22 */ #include "chatline.h" -#include "pages.h" #include "voteinfo_bar.h" diff --git a/client/gui-gtk-4.0/chatline.c b/client/gui-gtk-4.0/chatline.c index a0cc054dd8..be05b50107 100644 --- a/client/gui-gtk-4.0/chatline.c +++ b/client/gui-gtk-4.0/chatline.c @@ -40,6 +40,7 @@ #include "climap.h" #include "control.h" #include "mapview_common.h" +#include "update_queue.h" /* client/gui-gtk-4.0 */ #include "colors.h" diff --git a/client/gui-gtk-4.0/voteinfo_bar.c b/client/gui-gtk-4.0/voteinfo_bar.c index ea767c1554..87b6d7fdc1 100644 --- a/client/gui-gtk-4.0/voteinfo_bar.c +++ b/client/gui-gtk-4.0/voteinfo_bar.c @@ -25,10 +25,10 @@ /* client */ #include "options.h" #include "voteinfo.h" +#include "update_queue.h" /* client/gui-gtk-4.0 */ #include "chatline.h" -#include "pages.h" #include "voteinfo_bar.h" diff --git a/client/gui-sdl2/Makefile.am b/client/gui-sdl2/Makefile.am index 2826f0f69a..56ca89b5bf 100644 --- a/client/gui-sdl2/Makefile.am +++ b/client/gui-sdl2/Makefile.am @@ -61,21 +61,16 @@ libgui_sdl2_la_SOURCES = \ mapview.h \ menu.c \ menu.h \ - messagedlg.c \ - messagedlg.h \ messagewin.c \ messagewin.h \ optiondlg.h \ optiondlg.c \ pages.c \ - pages.h \ plrdlg.c \ plrdlg.h \ - ratesdlg.h \ repodlgs.c \ repodlgs.h \ spaceshipdlg.c \ - spaceshipdlg.h \ sprite.c \ sprite.h \ themebackgrounds.c \ @@ -88,7 +83,6 @@ libgui_sdl2_la_SOURCES = \ utf8string.c \ utf8string.h \ voteinfo_bar.c \ - voteinfo_bar.h \ widget.c \ widget.h \ widget_button.c \ diff --git a/client/gui-sdl2/chatline.c b/client/gui-sdl2/chatline.c index 655b062790..2528417512 100644 --- a/client/gui-sdl2/chatline.c +++ b/client/gui-sdl2/chatline.c @@ -42,6 +42,8 @@ #include "client_main.h" #include "clinet.h" #include "connectdlg_common.h" +#include "ratesdlg_g.h" +#include "update_queue.h" /* gui-sdl2 */ #include "colors.h" @@ -52,7 +54,6 @@ #include "gui_tilespec.h" #include "mapview.h" #include "messagewin.h" -#include "pages.h" #include "themespec.h" #include "utf8string.h" #include "widget.h" diff --git a/client/gui-sdl2/connectdlg.c b/client/gui-sdl2/connectdlg.c index 631dd4a29c..9285f83170 100644 --- a/client/gui-sdl2/connectdlg.c +++ b/client/gui-sdl2/connectdlg.c @@ -41,6 +41,7 @@ #include "clinet.h" /* connect_to_server() */ #include "packhand.h" #include "servers.h" +#include "update_queue.h" /* gui-sdl2 */ #include "chatline.h" @@ -52,7 +53,6 @@ #include "mapview.h" #include "messagewin.h" #include "optiondlg.h" -#include "pages.h" #include "themespec.h" #include "widget.h" diff --git a/client/gui-sdl2/dialogs.c b/client/gui-sdl2/dialogs.c index 278ea86a96..191a761a19 100644 --- a/client/gui-sdl2/dialogs.c +++ b/client/gui-sdl2/dialogs.c @@ -47,10 +47,11 @@ /* client */ #include "client_main.h" -#include "climap.h" /* for client_tile_get_known() */ +#include "climap.h" /* For client_tile_get_known() */ #include "goto.h" -#include "helpdata.h" /* for helptext_nation() */ +#include "helpdata.h" /* For helptext_nation() */ #include "packhand.h" +#include "ratesdlg_g.h" #include "text.h" /* gui-sdl2 */ @@ -73,7 +74,6 @@ #include "messagewin.h" #include "optiondlg.h" #include "plrdlg.h" -#include "ratesdlg.h" #include "repodlgs.h" #include "sprite.h" #include "themespec.h" diff --git a/client/gui-sdl2/gui_main.c b/client/gui-sdl2/gui_main.c index a49538aa47..2f911116db 100644 --- a/client/gui-sdl2/gui_main.c +++ b/client/gui-sdl2/gui_main.c @@ -57,6 +57,7 @@ #include "climisc.h" #include "clinet.h" #include "editgui_g.h" +#include "spaceshipdlg_g.h" #include "tilespec.h" #include "update_queue.h" @@ -77,7 +78,6 @@ #include "optiondlg.h" #include "repodlgs.h" #include "themespec.h" -#include "spaceshipdlg.h" #include "widget.h" #include "gui_main.h" diff --git a/client/gui-sdl2/inteldlg.c b/client/gui-sdl2/inteldlg.c index b38e861068..1c4176a842 100644 --- a/client/gui-sdl2/inteldlg.c +++ b/client/gui-sdl2/inteldlg.c @@ -33,6 +33,7 @@ /* client */ #include "client_main.h" +#include "spaceshipdlg_g.h" /* gui-sdl2 */ #include "graphics.h" @@ -41,7 +42,6 @@ #include "gui_tilespec.h" #include "mapview.h" #include "repodlgs.h" -#include "spaceshipdlg.h" #include "sprite.h" #include "widget.h" diff --git a/client/gui-sdl2/mapctrl.c b/client/gui-sdl2/mapctrl.c index 544de97edf..3335a4481d 100644 --- a/client/gui-sdl2/mapctrl.c +++ b/client/gui-sdl2/mapctrl.c @@ -42,6 +42,7 @@ #include "client_main.h" #include "climisc.h" #include "overview_common.h" +#include "pages_g.h" #include "update_queue.h" /* client/gui-sdl2 */ @@ -59,7 +60,6 @@ #include "menu.h" #include "messagewin.h" #include "optiondlg.h" -#include "pages.h" #include "plrdlg.h" #include "repodlgs.h" #include "sprite.h" diff --git a/client/gui-sdl2/menu.c b/client/gui-sdl2/menu.c index ca284476f4..c046671200 100644 --- a/client/gui-sdl2/menu.c +++ b/client/gui-sdl2/menu.c @@ -45,6 +45,7 @@ #include "client_main.h" /* client_state */ #include "climisc.h" #include "control.h" +#include "pages_g.h" /* gui-sdl2 */ #include "dialogs.h" @@ -55,7 +56,6 @@ #include "gui_tilespec.h" #include "mapctrl.h" #include "mapview.h" -#include "pages.h" #include "widget.h" #include "menu.h" diff --git a/client/gui-sdl2/messagedlg.c b/client/gui-sdl2/messagedlg.c deleted file mode 100644 index ddcff31fd5..0000000000 --- a/client/gui-sdl2/messagedlg.c +++ /dev/null @@ -1,18 +0,0 @@ -/*********************************************************************** - 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 - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. -***********************************************************************/ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "messagedlg.h" diff --git a/client/gui-sdl2/messagedlg.h b/client/gui-sdl2/messagedlg.h deleted file mode 100644 index 3f6d0f3662..0000000000 --- a/client/gui-sdl2/messagedlg.h +++ /dev/null @@ -1,20 +0,0 @@ -/*********************************************************************** - 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 - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. -***********************************************************************/ -#ifndef FC__MESSAGEDLG_H -#define FC__MESSAGEDLG_H - -#include "messagedlg_g.h" - -/* Nothing to add */ - -#endif /* FC__MESSAGEDLG_H */ diff --git a/client/gui-sdl2/optiondlg.c b/client/gui-sdl2/optiondlg.c index c253955782..b85565dda3 100644 --- a/client/gui-sdl2/optiondlg.c +++ b/client/gui-sdl2/optiondlg.c @@ -48,6 +48,7 @@ #include "clinet.h" #include "connectdlg_common.h" #include "global_worklist.h" +#include "pages_g.h" /* gui-sdl2 */ #include "colors.h" @@ -62,7 +63,6 @@ #include "mapview.h" #include "menu.h" #include "messagewin.h" -#include "pages.h" #include "themespec.h" #include "widget.h" #include "wldlg.h" diff --git a/client/gui-sdl2/pages.c b/client/gui-sdl2/pages.c index f4f7ce2f82..7daa8efa06 100644 --- a/client/gui-sdl2/pages.c +++ b/client/gui-sdl2/pages.c @@ -25,6 +25,7 @@ /* client */ #include "connectdlg_common.h" +#include "pages_g.h" /* gui-sdl2 */ #include "chatline.h" @@ -41,7 +42,6 @@ #include "themespec.h" #include "widget.h" -#include "pages.h" static enum client_pages old_page = PAGE_MAIN; diff --git a/client/gui-sdl2/pages.h b/client/gui-sdl2/pages.h deleted file mode 100644 index cdb1f87105..0000000000 --- a/client/gui-sdl2/pages.h +++ /dev/null @@ -1,18 +0,0 @@ -/*********************************************************************** - Freeciv - Copyright (C) 1996-2004 - The Freeciv Team - 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 - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. -***********************************************************************/ -#ifndef FC__PAGES_H -#define FC__PAGES_H - -#include "pages_g.h" - -#endif /* FC__PAGES_H */ diff --git a/client/gui-sdl2/ratesdlg.h b/client/gui-sdl2/ratesdlg.h deleted file mode 100644 index bd60934bed..0000000000 --- a/client/gui-sdl2/ratesdlg.h +++ /dev/null @@ -1,21 +0,0 @@ -/*********************************************************************** - 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 - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. -***********************************************************************/ -#ifndef FC__RATESDLG_H -#define FC__RATESDLG_H - -/* client */ -#include "ratesdlg_g.h" - -/* Nothing to add */ - -#endif /* FC__RATESDLG_H */ diff --git a/client/gui-sdl2/spaceshipdlg.c b/client/gui-sdl2/spaceshipdlg.c index 3b6b5c1b63..df3c7d543e 100644 --- a/client/gui-sdl2/spaceshipdlg.c +++ b/client/gui-sdl2/spaceshipdlg.c @@ -27,6 +27,7 @@ /* client */ #include "client_main.h" +#include "spaceshipdlg_g.h" #include "text.h" /* gui-sdl2 */ @@ -37,7 +38,6 @@ #include "mapview.h" #include "widget.h" -#include "spaceshipdlg.h" #define SPECLIST_TAG dialog #define SPECLIST_TYPE struct small_dialog diff --git a/client/gui-sdl2/spaceshipdlg.h b/client/gui-sdl2/spaceshipdlg.h deleted file mode 100644 index b18e0387ca..0000000000 --- a/client/gui-sdl2/spaceshipdlg.h +++ /dev/null @@ -1,21 +0,0 @@ -/*********************************************************************** - 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 - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. -***********************************************************************/ - -#ifndef FC__SPACESHIPDLG_H -#define FC__SPACESHIPDLG_H - -/* client */ -#include "spaceshipdlg_g.h" - - -#endif /* FC__SPACESHIPDLG_H */ diff --git a/client/gui-sdl2/voteinfo_bar.c b/client/gui-sdl2/voteinfo_bar.c index 79142c755e..11ac80b4e0 100644 --- a/client/gui-sdl2/voteinfo_bar.c +++ b/client/gui-sdl2/voteinfo_bar.c @@ -17,8 +17,8 @@ /* client */ #include "voteinfo.h" +#include "voteinfo_bar_g.h" -#include "voteinfo_bar.h" /************************************************************************//** Refresh all vote related GUI widgets. Called by the voteinfo module when diff --git a/client/gui-sdl2/voteinfo_bar.h b/client/gui-sdl2/voteinfo_bar.h deleted file mode 100644 index a0ec1dc907..0000000000 --- a/client/gui-sdl2/voteinfo_bar.h +++ /dev/null @@ -1,19 +0,0 @@ -/*********************************************************************** - 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 - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. -***********************************************************************/ -#ifndef FC__VOTEBAR_H -#define FC__VOTEBAR_H - -/* client */ -#include "voteinfo_bar_g.h" - -#endif /* FC__VOTEBAR_H */ diff --git a/client/include/pages_g.h b/client/include/pages_g.h index 8d70a9e431..c980ddf70f 100644 --- a/client/include/pages_g.h +++ b/client/include/pages_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 @@ -13,17 +13,8 @@ #ifndef FC__PAGES_G_H #define FC__PAGES_G_H -/************************************************************************** - Toplevel window pages modes. -**************************************************************************/ -#define SPECENUM_NAME client_pages -#define SPECENUM_VALUE0 PAGE_MAIN /* Main menu, aka intro page. */ -#define SPECENUM_VALUE1 PAGE_START /* Start new game page. */ -#define SPECENUM_VALUE2 PAGE_SCENARIO /* Start new scenario page. */ -#define SPECENUM_VALUE3 PAGE_LOAD /* Load saved game page. */ -#define SPECENUM_VALUE4 PAGE_NETWORK /* Connect to network page. */ -#define SPECENUM_VALUE5 PAGE_GAME /* In game page. */ -#include "specenum_gen.h" +/* client */ +#include "update_queue.h" #include "gui_proto_constructor.h" @@ -31,9 +22,4 @@ GUI_FUNC_PROTO(void, real_set_client_page, enum client_pages page) GUI_FUNC_PROTO(enum client_pages, get_current_client_page, void) GUI_FUNC_PROTO(void, update_start_page, void) -/* Actually defined in update_queue.c */ -void set_client_page(enum client_pages page); -void client_start_server_and_set_page(enum client_pages page); -enum client_pages get_client_page(void); - -#endif /* FC__PAGES_G_H */ +#endif /* FC__PAGES_G_H */ diff --git a/client/update_queue.h b/client/update_queue.h index 4e75ed3f90..3f7cfc9617 100644 --- a/client/update_queue.h +++ b/client/update_queue.h @@ -17,6 +17,9 @@ extern "C" { #endif /* __cplusplus */ +/* utility */ +#include "support.h" /* bool */ + typedef void (*uq_callback_t) (void *data); typedef void (*uq_free_fn_t) (void *data); #define UQ_FREEDATA(fn) ((uq_free_fn_t) fn) @@ -65,6 +68,22 @@ void science_report_dialog_update(void); void economy_report_dialog_update(void); void units_report_dialog_update(void); +/************************************************************************** + Toplevel window pages modes. +**************************************************************************/ +#define SPECENUM_NAME client_pages +#define SPECENUM_VALUE0 PAGE_MAIN /* Main menu, aka intro page. */ +#define SPECENUM_VALUE1 PAGE_START /* Start new game page. */ +#define SPECENUM_VALUE2 PAGE_SCENARIO /* Start new scenario page. */ +#define SPECENUM_VALUE3 PAGE_LOAD /* Load saved game page. */ +#define SPECENUM_VALUE4 PAGE_NETWORK /* Connect to network page. */ +#define SPECENUM_VALUE5 PAGE_GAME /* In game page. */ +#include "specenum_gen.h" + +void set_client_page(enum client_pages page); +void client_start_server_and_set_page(enum client_pages page); +enum client_pages get_client_page(void); + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/meson.build b/meson.build index 23424057f4..fcb077b7c5 100644 --- a/meson.build +++ b/meson.build @@ -3408,7 +3408,6 @@ executable('freeciv-sdl2', 'client/gui-sdl2/mapctrl.c', 'client/gui-sdl2/mapview.c', 'client/gui-sdl2/menu.c', - 'client/gui-sdl2/messagedlg.c', 'client/gui-sdl2/messagewin.c', 'client/gui-sdl2/optiondlg.c', 'client/gui-sdl2/pages.c', -- 2.39.2