From 8998a790d1a3fd5f4f2bd80c4bfdec87978ea860 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 19 Nov 2021 15:28:52 +0200 Subject: [PATCH 24/24] gtk: Drop unused buy_shell, rename_input from struct city_dialog See osdn #43239 Signed-off-by: Marko Lindqvist --- client/gui-gtk-3.0/citydlg.c | 8 ++------ client/gui-gtk-3.22/citydlg.c | 8 ++------ client/gui-gtk-4.0/citydlg.c | 8 ++------ 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/client/gui-gtk-3.0/citydlg.c b/client/gui-gtk-3.0/citydlg.c index 297f0115d3..ae86089126 100644 --- a/client/gui-gtk-3.0/citydlg.c +++ b/client/gui-gtk-3.0/citydlg.c @@ -194,9 +194,9 @@ struct city_dialog { short block_signal; } misc; - GtkWidget *buy_shell, *sell_shell; + GtkWidget *sell_shell; GtkTreeSelection *change_selection; - GtkWidget *rename_shell, *rename_input; + GtkWidget *rename_shell; GtkWidget *show_units_command; GtkWidget *prev_command, *next_command; @@ -1515,7 +1515,6 @@ static struct city_dialog *create_city_dialog(struct city *pcity) pdialog = fc_malloc(sizeof(struct city_dialog)); pdialog->pcity = pcity; - pdialog->buy_shell = NULL; pdialog->sell_shell = NULL; pdialog->rename_shell = NULL; pdialog->happiness.map_canvas.sw = NULL; /* make sure NULL if spy */ @@ -3358,9 +3357,6 @@ static void city_destroy_callback(GtkWidget *w, gpointer data) unit_node_vector_free(&pdialog->overview.supported_units); unit_node_vector_free(&pdialog->overview.present_units); - if (pdialog->buy_shell) { - gtk_widget_destroy(pdialog->buy_shell); - } if (pdialog->sell_shell) { gtk_widget_destroy(pdialog->sell_shell); } diff --git a/client/gui-gtk-3.22/citydlg.c b/client/gui-gtk-3.22/citydlg.c index 323b0ab38e..4a0ca7652f 100644 --- a/client/gui-gtk-3.22/citydlg.c +++ b/client/gui-gtk-3.22/citydlg.c @@ -194,9 +194,9 @@ struct city_dialog { short block_signal; } misc; - GtkWidget *buy_shell, *sell_shell; + GtkWidget *sell_shell; GtkTreeSelection *change_selection; - GtkWidget *rename_shell, *rename_input; + GtkWidget *rename_shell; GtkWidget *show_units_command; GtkWidget *prev_command; @@ -1551,7 +1551,6 @@ static struct city_dialog *create_city_dialog(struct city *pcity) pdialog = fc_malloc(sizeof(struct city_dialog)); pdialog->pcity = pcity; - pdialog->buy_shell = NULL; pdialog->sell_shell = NULL; pdialog->rename_shell = NULL; pdialog->happiness.map_canvas.sw = NULL; /* make sure NULL if spy */ @@ -3374,9 +3373,6 @@ static void city_destroy_callback(GtkWidget *w, gpointer data) unit_node_vector_free(&pdialog->overview.supported_units); unit_node_vector_free(&pdialog->overview.present_units); - if (pdialog->buy_shell) { - gtk_widget_destroy(pdialog->buy_shell); - } if (pdialog->sell_shell) { gtk_widget_destroy(pdialog->sell_shell); } diff --git a/client/gui-gtk-4.0/citydlg.c b/client/gui-gtk-4.0/citydlg.c index d7faa0dedd..8f3f011e14 100644 --- a/client/gui-gtk-4.0/citydlg.c +++ b/client/gui-gtk-4.0/citydlg.c @@ -191,9 +191,9 @@ struct city_dialog { short block_signal; } misc; - GtkWidget *buy_shell, *sell_shell; + GtkWidget *sell_shell; GtkTreeSelection *change_selection; - GtkWidget *rename_shell, *rename_input; + GtkWidget *rename_shell; GtkWidget *show_units_command; GtkWidget *prev_command; @@ -1528,7 +1528,6 @@ static struct city_dialog *create_city_dialog(struct city *pcity) pdialog = fc_malloc(sizeof(struct city_dialog)); pdialog->pcity = pcity; - pdialog->buy_shell = NULL; pdialog->sell_shell = NULL; pdialog->rename_shell = NULL; pdialog->happiness.map_canvas.sw = NULL; /* make sure NULL if spy */ @@ -3374,9 +3373,6 @@ static void city_destroy_callback(GtkWidget *w, gpointer data) unit_node_vector_free(&pdialog->overview.supported_units); unit_node_vector_free(&pdialog->overview.present_units); - if (pdialog->buy_shell) { - gtk_widget_destroy(pdialog->buy_shell); - } if (pdialog->sell_shell) { gtk_widget_destroy(pdialog->sell_shell); } -- 2.33.0