From e814754716394382565c854205cdf2dc3c201c81 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Wed, 25 May 2022 22:07:40 +0300 Subject: [PATCH 12/12] Gtk: Add tooltip for citydlg "Size" line See osdn #44515 Signed-off-by: Marko Lindqvist --- client/gui-gtk-3.0/citydlg.c | 6 +++++- client/gui-gtk-3.22/citydlg.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/client/gui-gtk-3.0/citydlg.c b/client/gui-gtk-3.0/citydlg.c index 46e9ffa99f..1af1d34f64 100644 --- a/client/gui-gtk-3.0/citydlg.c +++ b/client/gui-gtk-3.0/citydlg.c @@ -657,8 +657,12 @@ static gboolean show_info_popup(GtkWidget *w, GdkEventButton *ev, if (ev->button == 1) { GtkWidget *p, *label, *frame; char buf[1024]; - + switch (GPOINTER_TO_UINT(data)) { + case INFO_SIZE: + fc_snprintf(buf, sizeof(buf), _("Population: %d, Specialists: %d"), + pdialog->pcity->size, city_specialists(pdialog->pcity)); + break; case INFO_FOOD: get_city_dialog_output_text(pdialog->pcity, O_FOOD, buf, sizeof(buf)); break; diff --git a/client/gui-gtk-3.22/citydlg.c b/client/gui-gtk-3.22/citydlg.c index 0e14dc9607..8693f364f6 100644 --- a/client/gui-gtk-3.22/citydlg.c +++ b/client/gui-gtk-3.22/citydlg.c @@ -658,8 +658,12 @@ static gboolean show_info_popup(GtkWidget *w, GdkEventButton *ev, if (ev->button == 1) { GtkWidget *p, *label, *frame; char buf[1024]; - + switch (GPOINTER_TO_UINT(data)) { + case INFO_SIZE: + fc_snprintf(buf, sizeof(buf), _("Population: %d, Specialists: %d"), + pdialog->pcity->size, city_specialists(pdialog->pcity)); + break; case INFO_FOOD: get_city_dialog_output_text(pdialog->pcity, O_FOOD, buf, sizeof(buf)); break; -- 2.35.1