From 22be6e089c9eefab63734ecd09a4418dff795ee0 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Sun, 9 Apr 2023 21:49:25 +0300
Subject: [PATCH 29/29] gtk3(.22): Show nation flag in help browser

See osdn #47824

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 client/gui-gtk-2.0/helpdlg.c  | 2 +-
 client/gui-gtk-3.0/helpdlg.c  | 6 ++++--
 client/gui-gtk-3.22/helpdlg.c | 6 ++++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/client/gui-gtk-2.0/helpdlg.c b/client/gui-gtk-2.0/helpdlg.c
index 4f9fcf05d2..5272bee3cc 100644
--- a/client/gui-gtk-2.0/helpdlg.c
+++ b/client/gui-gtk-2.0/helpdlg.c
@@ -1401,7 +1401,7 @@ static void help_update_government(const struct help_item *pitem,
   This is currently just a text page, with special text
 **************************************************************************/
 static void help_update_nation(const struct help_item *pitem, char *title,
-			       struct nation_type *pnation)
+                               struct nation_type *pnation)
 {
   char buf[4096];
 
diff --git a/client/gui-gtk-3.0/helpdlg.c b/client/gui-gtk-3.0/helpdlg.c
index e824f16322..f1b7ff527a 100644
--- a/client/gui-gtk-3.0/helpdlg.c
+++ b/client/gui-gtk-3.0/helpdlg.c
@@ -1506,10 +1506,10 @@ 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)
+                               struct nation_type *pnation)
 {
   char buf[4096];
 
@@ -1517,6 +1517,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 64c0c4241e..65243b85d7 100644
--- a/client/gui-gtk-3.22/helpdlg.c
+++ b/client/gui-gtk-3.22/helpdlg.c
@@ -1505,10 +1505,10 @@ 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)
+                               struct nation_type *pnation)
 {
   char buf[4096];
 
@@ -1516,6 +1516,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