From 08d954987942f9ffdbce67046c4d7c56b09a2a51 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 14 Oct 2022 23:35:57 +0300 Subject: [PATCH 45/45] Drop theme options of obsoleted clients See osdn #45779 Signed-off-by: Marko Lindqvist --- client/options.c | 9 +-------- client/options.h | 4 ---- client/tilespec.c | 10 ++-------- 3 files changed, 3 insertions(+), 20 deletions(-) diff --git a/client/options.c b/client/options.c index fed512052a..aa537289d5 100644 --- a/client/options.c +++ b/client/options.c @@ -204,7 +204,6 @@ struct client_options gui_options = { /* gui-gtk-2.0 client specific options. * These are still kept just so users can migrate them to gtk3-client */ - .gui_gtk2_default_theme_name = FC_GTK2_DEFAULT_THEME_NAME, .gui_gtk2_map_scrollbars = FALSE, .gui_gtk2_dialogs_on_top = TRUE, .gui_gtk2_show_task_icons = TRUE, @@ -235,7 +234,6 @@ struct client_options gui_options = { .gui_gtk2_font_reqtree_text = "Serif 10", /* gui-gtk-3.0 client specific options. */ - .gui_gtk3_default_theme_name = FC_GTK3_DEFAULT_THEME_NAME, .gui_gtk3_fullscreen = FALSE, .gui_gtk3_map_scrollbars = FALSE, .gui_gtk3_dialogs_on_top = TRUE, @@ -1924,14 +1922,9 @@ static struct client_option client_options[] = { N_("The chat log file"), N_("The name of the chat log file."), COC_INTERFACE, GUI_STUB, GUI_DEFAULT_CHAT_LOGFILE, NULL, 0), - /* gui_gtk3/4_default_theme_name and gui_sdl2_default_theme_name are + /* gui_gtk3_22/4_default_theme_name and gui_sdl2_default_theme_name are * different settings to avoid client crash after loading the * style for the other gui. Keeps 5 different options! */ - GEN_STR_LIST_OPTION(gui_gtk3_default_theme_name, N_("Theme"), - N_("By changing this option you change the " - "active theme."), - COC_GRAPHICS, GUI_GTK3, FC_GTK3_DEFAULT_THEME_NAME, - get_themes_list, theme_reread_callback, 0), GEN_STR_LIST_OPTION(gui_gtk3_22_default_theme_name, N_("Theme"), N_("By changing this option you change the " "active theme."), diff --git a/client/options.h b/client/options.h index 405eca4483..b944a8240a 100644 --- a/client/options.h +++ b/client/options.h @@ -222,8 +222,6 @@ struct client_options /* gui-gtk-2.0 client specific options. * These are still kept just so users can migrate them to later gtk-clients */ -#define FC_GTK2_DEFAULT_THEME_NAME "Freeciv" - char gui_gtk2_default_theme_name[512]; bool gui_gtk2_map_scrollbars; bool gui_gtk2_dialogs_on_top; bool gui_gtk2_show_task_icons; @@ -255,8 +253,6 @@ struct client_options /* gui-gtk-3.0 client specific options. * These are still kept just so users can migrate them to later gtk-clients */ -#define FC_GTK3_DEFAULT_THEME_NAME "Freeciv" - char gui_gtk3_default_theme_name[512]; bool gui_gtk3_fullscreen; bool gui_gtk3_map_scrollbars; bool gui_gtk3_dialogs_on_top; diff --git a/client/tilespec.c b/client/tilespec.c index 49a3919028..a063e8e57e 100644 --- a/client/tilespec.c +++ b/client/tilespec.c @@ -6850,14 +6850,6 @@ void tileset_use_preferred_theme(const struct tileset *t) int i; switch (get_gui_type()) { - case GUI_GTK2: - default_theme_name = gui_options.gui_gtk2_default_theme_name; - default_theme_name_sz = sizeof(gui_options.gui_gtk2_default_theme_name); - break; - case GUI_GTK3: - default_theme_name = gui_options.gui_gtk3_default_theme_name; - default_theme_name_sz = sizeof(gui_options.gui_gtk3_default_theme_name); - break; case GUI_GTK3_22: default_theme_name = gui_options.gui_gtk3_22_default_theme_name; default_theme_name_sz = sizeof(gui_options.gui_gtk3_22_default_theme_name); @@ -6874,6 +6866,8 @@ void tileset_use_preferred_theme(const struct tileset *t) case GUI_QT: case GUI_SDL: case GUI_WEB: + case GUI_GTK2: + case GUI_GTK3: break; } -- 2.35.1