From 706d052c857877af1f47b9c935d519ce3071d299 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sun, 9 Apr 2023 21:08:55 +0300 Subject: [PATCH 43/43] gtk: Show nation flag in help browser See osdn #47824 Signed-off-by: Marko Lindqvist --- client/gui-gtk-3.0/helpdlg.c | 4 +++- client/gui-gtk-3.22/helpdlg.c | 4 +++- client/gui-gtk-4.0/helpdlg.c | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/client/gui-gtk-3.0/helpdlg.c b/client/gui-gtk-3.0/helpdlg.c index c09c62dba3..82cb9c58d8 100644 --- a/client/gui-gtk-3.0/helpdlg.c +++ b/client/gui-gtk-3.0/helpdlg.c @@ -1502,7 +1502,7 @@ static void help_update_government(const struct help_item *pitem, } /**********************************************************************//** - This is currently just a text page, with special text + Show nation flag and legend. **************************************************************************/ static void help_update_nation(const struct help_item *pitem, char *title, struct nation_type *pnation) @@ -1513,6 +1513,8 @@ static void help_update_nation(const struct help_item *pitem, char *title, strcat(buf, pitem->text); } else { helptext_nation(buf, sizeof(buf), pnation, pitem->text); + + set_help_tile_from_sprite(get_nation_flag_sprite(tileset, pnation)); } gtk_text_buffer_set_text(help_text, buf, -1); diff --git a/client/gui-gtk-3.22/helpdlg.c b/client/gui-gtk-3.22/helpdlg.c index e7e1fb1fcb..3169a916ed 100644 --- a/client/gui-gtk-3.22/helpdlg.c +++ b/client/gui-gtk-3.22/helpdlg.c @@ -1502,7 +1502,7 @@ static void help_update_government(const struct help_item *pitem, } /**********************************************************************//** - This is currently just a text page, with special text + Show nation flag and legend. **************************************************************************/ static void help_update_nation(const struct help_item *pitem, char *title, struct nation_type *pnation) @@ -1513,6 +1513,8 @@ static void help_update_nation(const struct help_item *pitem, char *title, strcat(buf, pitem->text); } else { helptext_nation(buf, sizeof(buf), pnation, pitem->text); + + set_help_tile_from_sprite(get_nation_flag_sprite(tileset, pnation)); } gtk_text_buffer_set_text(help_text, buf, -1); diff --git a/client/gui-gtk-4.0/helpdlg.c b/client/gui-gtk-4.0/helpdlg.c index c23ad0fd7f..ca5ff01859 100644 --- a/client/gui-gtk-4.0/helpdlg.c +++ b/client/gui-gtk-4.0/helpdlg.c @@ -1549,7 +1549,7 @@ static void help_update_government(const struct help_item *pitem, } /**********************************************************************//** - This is currently just a text page, with special text. + Show nation flag and legend. **************************************************************************/ static void help_update_nation(const struct help_item *pitem, char *title, struct nation_type *pnation) @@ -1560,6 +1560,8 @@ static void help_update_nation(const struct help_item *pitem, char *title, strcat(buf, pitem->text); } else { helptext_nation(buf, sizeof(buf), pnation, pitem->text); + + set_help_tile_from_sprite(get_nation_flag_sprite(tileset, pnation)); } gtk_text_buffer_set_text(help_text, buf, -1); -- 2.39.2