From 414a208749704af0e2dbdbca8e81cb6add42fa60 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Mon, 8 Apr 2024 18:32:26 +0300
Subject: [PATCH 52/52] Correct "useable" to "usable"

See RM #431

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 client/gui-gtk-3.22/themes.c  |  4 ++--
 client/gui-gtk-4.0/themes.c   |  4 ++--
 client/gui-gtk-5.0/themes.c   |  4 ++--
 client/gui-qt/qtg_cxxside.cpp |  5 +++--
 client/gui-qt/qtg_cxxside.h   |  2 +-
 client/gui-qt/themes.cpp      |  2 +-
 client/gui-sdl2/themes.c      |  4 ++--
 client/gui-sdl3/themes.c      |  4 ++--
 client/gui-stub/themes.c      |  2 +-
 client/gui_cbsetter.c         |  2 +-
 client/gui_interface.c        |  6 +++---
 client/gui_interface.h        |  2 +-
 client/include/themes_g.h     |  4 ++--
 client/themes_common.c        | 22 +++++++++++-----------
 common/generate_packets.py    |  4 ++--
 15 files changed, 36 insertions(+), 35 deletions(-)

diff --git a/client/gui-gtk-3.22/themes.c b/client/gui-gtk-3.22/themes.c
index 3b79fde9ea..75d6647110 100644
--- a/client/gui-gtk-3.22/themes.c
+++ b/client/gui-gtk-3.22/themes.c
@@ -143,10 +143,10 @@ char **get_gui_specific_themes_directories(int *count)
 /*************************************************************************//**
   Return an array of names of usable themes in the given directory.
   Array size is stored in count.
-  Useable theme for gtk+ is a directory which contains file gtk-3.0/gtk.css.
+  Usable theme for gtk+ is a directory which contains file gtk-3.0/gtk.css.
   The caller is responsible for freeing the array and the names
 *****************************************************************************/
-char **get_useable_themes_in_directory(const char *directory, int *count)
+char **get_usable_themes_in_directory(const char *directory, int *count)
 {
   DIR *dir;
   struct dirent *entry;
diff --git a/client/gui-gtk-4.0/themes.c b/client/gui-gtk-4.0/themes.c
index e63cf8d740..541650754d 100644
--- a/client/gui-gtk-4.0/themes.c
+++ b/client/gui-gtk-4.0/themes.c
@@ -138,10 +138,10 @@ char **get_gui_specific_themes_directories(int *count)
 /*************************************************************************//**
   Return an array of names of usable themes in the given directory.
   Array size is stored in count.
-  Useable theme for gtk is a directory which contains file gtk-4.0/gtk.css.
+  Usable theme for gtk is a directory which contains file gtk-4.0/gtk.css.
   The caller is responsible for freeing the array and the names
 *****************************************************************************/
-char **get_useable_themes_in_directory(const char *directory, int *count)
+char **get_usable_themes_in_directory(const char *directory, int *count)
 {
   DIR *dir;
   struct dirent *entry;
diff --git a/client/gui-gtk-5.0/themes.c b/client/gui-gtk-5.0/themes.c
index 4d4308c926..6cf607683e 100644
--- a/client/gui-gtk-5.0/themes.c
+++ b/client/gui-gtk-5.0/themes.c
@@ -138,10 +138,10 @@ char **get_gui_specific_themes_directories(int *count)
 /*************************************************************************//**
   Return an array of names of usable themes in the given directory.
   Array size is stored in count.
-  Useable theme for gtk is a directory which contains file gtk-4.0/gtk.css.
+  Usable theme for gtk is a directory which contains file gtk-4.0/gtk.css.
   The caller is responsible for freeing the array and the names
 *****************************************************************************/
-char **get_useable_themes_in_directory(const char *directory, int *count)
+char **get_usable_themes_in_directory(const char *directory, int *count)
 {
   DIR *dir;
   struct dirent *entry;
diff --git a/client/gui-qt/qtg_cxxside.cpp b/client/gui-qt/qtg_cxxside.cpp
index d147ab5667..cb0fd2b68f 100644
--- a/client/gui-qt/qtg_cxxside.cpp
+++ b/client/gui-qt/qtg_cxxside.cpp
@@ -113,8 +113,9 @@ void setup_gui_funcs()
 
   funcs->gui_load_theme = qtg_gui_load_theme;
   funcs->gui_clear_theme = qtg_gui_clear_theme;
-  funcs->get_gui_specific_themes_directories = qtg_get_gui_specific_themes_directories;
-  funcs->get_useable_themes_in_directory = qtg_get_useable_themes_in_directory;
+  funcs->get_gui_specific_themes_directories
+    = qtg_get_gui_specific_themes_directories;
+  funcs->get_usable_themes_in_directory = qtg_get_usable_themes_in_directory;
 
   funcs->gui_init_meeting = qtg_init_meeting;
   funcs->gui_recv_cancel_meeting = qtg_recv_cancel_meeting;
diff --git a/client/gui-qt/qtg_cxxside.h b/client/gui-qt/qtg_cxxside.h
index ae754b2155..fec25ac318 100644
--- a/client/gui-qt/qtg_cxxside.h
+++ b/client/gui-qt/qtg_cxxside.h
@@ -144,7 +144,7 @@ void qtg_update_infra_dialog();
 void qtg_gui_load_theme(const char *directory, const char *theme_name);
 void qtg_gui_clear_theme();
 char **qtg_get_gui_specific_themes_directories(int *count);
-char **qtg_get_useable_themes_in_directory(const char *directory, int *count);
+char **qtg_get_usable_themes_in_directory(const char *directory, int *count);
 
 void qtg_init_meeting(struct Treaty *ptreaty, struct player *they,
                       struct player *initiator);
diff --git a/client/gui-qt/themes.cpp b/client/gui-qt/themes.cpp
index bcb98642ba..79092d65b2 100644
--- a/client/gui-qt/themes.cpp
+++ b/client/gui-qt/themes.cpp
@@ -142,7 +142,7 @@ char **qtg_get_gui_specific_themes_directories(int *count)
   Array size is stored in count.
   The caller is responsible for freeing the array and the names.
 *****************************************************************************/
-char **qtg_get_useable_themes_in_directory(const char *directory, int *count)
+char **qtg_get_usable_themes_in_directory(const char *directory, int *count)
 {
   QStringList sl, theme_list;
   char **array;
diff --git a/client/gui-sdl2/themes.c b/client/gui-sdl2/themes.c
index ddfd81336e..3e98df9d92 100644
--- a/client/gui-sdl2/themes.c
+++ b/client/gui-sdl2/themes.c
@@ -101,10 +101,10 @@ char **get_gui_specific_themes_directories(int *count)
 /*************************************************************************//**
   Return an array of names of usable themes in the given directory.
   Array size is stored in count.
-  Useable theme for gui-sdl2 is a directory which contains file theme.themespec.
+  Usable theme for gui-sdl2 is a directory which contains file theme.themespec.
   The caller is responsible for freeing the array and the names
 *****************************************************************************/
-char **get_useable_themes_in_directory(const char *directory, int *count)
+char **get_usable_themes_in_directory(const char *directory, int *count)
 {
   DIR *dir;
   struct dirent *entry;
diff --git a/client/gui-sdl3/themes.c b/client/gui-sdl3/themes.c
index 1732129c34..2312f84eff 100644
--- a/client/gui-sdl3/themes.c
+++ b/client/gui-sdl3/themes.c
@@ -101,10 +101,10 @@ char **get_gui_specific_themes_directories(int *count)
 /*************************************************************************//**
   Return an array of names of usable themes in the given directory.
   Array size is stored in count.
-  Useable theme for gui-sdl3 is a directory which contains file theme.themespec.
+  Usable theme for gui-sdl3 is a directory which contains file theme.themespec.
   The caller is responsible for freeing the array and the names
 *****************************************************************************/
-char **get_useable_themes_in_directory(const char *directory, int *count)
+char **get_usable_themes_in_directory(const char *directory, int *count)
 {
   DIR *dir;
   struct dirent *entry;
diff --git a/client/gui-stub/themes.c b/client/gui-stub/themes.c
index 0367c3ad6f..6f4e4dca5f 100644
--- a/client/gui-stub/themes.c
+++ b/client/gui-stub/themes.c
@@ -60,7 +60,7 @@ char **gui_get_gui_specific_themes_directories(int *count)
   Array size is stored in count.
   The caller is responsible for freeing the array and the names
 *****************************************************************************/
-char **gui_get_useable_themes_in_directory(const char *directory, int *count)
+char **gui_get_usable_themes_in_directory(const char *directory, int *count)
 {
   *count = 0;
   return fc_malloc(sizeof(char*) * 0);
diff --git a/client/gui_cbsetter.c b/client/gui_cbsetter.c
index 5837e5867c..8e4b905d05 100644
--- a/client/gui_cbsetter.c
+++ b/client/gui_cbsetter.c
@@ -123,5 +123,5 @@ void setup_gui_funcs(void)
   funcs->gui_load_theme = gui_gui_load_theme;
   funcs->gui_clear_theme = gui_gui_clear_theme;
   funcs->get_gui_specific_themes_directories = gui_get_gui_specific_themes_directories;
-  funcs->get_useable_themes_in_directory = gui_get_useable_themes_in_directory;
+  funcs->get_usable_themes_in_directory = gui_get_usable_themes_in_directory;
 }
diff --git a/client/gui_interface.c b/client/gui_interface.c
index 7171761e26..adc29bcd39 100644
--- a/client/gui_interface.c
+++ b/client/gui_interface.c
@@ -645,11 +645,11 @@ char **get_gui_specific_themes_directories(int *count)
 }
 
 /**********************************************************************//**
-  Call get_useable_themes_in_directory callback
+  Call get_usable_themes_in_directory callback
 **************************************************************************/
-char **get_useable_themes_in_directory(const char *directory, int *count)
+char **get_usable_themes_in_directory(const char *directory, int *count)
 {
-  return funcs.get_useable_themes_in_directory(directory, count);
+  return funcs.get_usable_themes_in_directory(directory, count);
 }
 
 /**********************************************************************//**
diff --git a/client/gui_interface.h b/client/gui_interface.h
index 50da6f87bb..3217b76639 100644
--- a/client/gui_interface.h
+++ b/client/gui_interface.h
@@ -152,7 +152,7 @@ struct gui_funcs {
   void (*gui_load_theme)(const char *directory, const char *theme_name);
   void (*gui_clear_theme)(void);
   char **(*get_gui_specific_themes_directories)(int *count);
-  char **(*get_useable_themes_in_directory)(const char *directory, int *count);
+  char **(*get_usable_themes_in_directory)(const char *directory, int *count);
 
   void (*gui_init_meeting)(struct Treaty *ptreaty, struct player *they,
                            struct player *initiator);
diff --git a/client/include/themes_g.h b/client/include/themes_g.h
index 3f97a3ae48..3627c531a6 100644
--- a/client/include/themes_g.h
+++ b/client/include/themes_g.h
@@ -1,4 +1,4 @@
-/********************************************************************** 
+/***********************************************************************
  Freeciv - Copyright (C) 2005 The Freeciv Team
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ GUI_FUNC_PROTO(void, gui_load_theme, const char *directory,
                const char *theme_name)
 GUI_FUNC_PROTO(void, gui_clear_theme, void)
 GUI_FUNC_PROTO(char**, get_gui_specific_themes_directories, int *count)
-GUI_FUNC_PROTO(char**, get_useable_themes_in_directory,
+GUI_FUNC_PROTO(char**, get_usable_themes_in_directory,
                const char *directory, int* count)
 
 #endif /* FC__THEMES_G_H */
diff --git a/client/themes_common.c b/client/themes_common.c
index 05984e448c..d17876b2ee 100644
--- a/client/themes_common.c
+++ b/client/themes_common.c
@@ -42,7 +42,7 @@
   
   Theme is stored in a directory called like the theme. The directory contains
   some data files. Each gui defines its own format in the
-  get_useable_themes_in_directory() function.
+  get_usable_themes_in_directory() function.
 ****************************************************************************/
 
 /* A directory containing a list of usable themes */
@@ -65,27 +65,27 @@ struct theme_directory *directories;
 void init_themes(void)
 {
   int i;
-    
-  /* get GUI-specific theme directories */
+
+  /* Get GUI-specific theme directories */
   char **gui_directories =
       get_gui_specific_themes_directories(&num_directories);
-  
-  directories = 
+
+  directories =
       fc_malloc(sizeof(struct theme_directory) * num_directories);
-          
+
   for (i = 0; i < num_directories; i++) {
     directories[i].path = gui_directories[i];
-    
-    /* get useable themes in this directory */
+
+    /* Get usable themes in this directory */
     directories[i].themes =
-	get_useable_themes_in_directory(directories[i].path,
-					&(directories[i].num_themes));
+	get_usable_themes_in_directory(directories[i].path,
+                                       &(directories[i].num_themes));
   }
   free(gui_directories);
 }
 
 /************************************************************************//**
-  Return a static string vector of useable theme names.
+  Return a static string vector of usable theme names.
 ****************************************************************************/
 const struct strvec *get_themes_list(const struct option *poption)
 {
diff --git a/common/generate_packets.py b/common/generate_packets.py
index f94bdbedb2..4924e85272 100755
--- a/common/generate_packets.py
+++ b/common/generate_packets.py
@@ -543,7 +543,7 @@ class RawFieldType(ABC):
     @abstractmethod
     def array(self, size: SizeInfo) -> "FieldType":
         """Add an array size to this field type, either to make a type which
-        needs a size fully useable, or to make an array type with self as
+        needs a size fully usable, or to make an array type with self as
         the element type."""
         raise NotImplementedError
 
@@ -663,7 +663,7 @@ class NeedSizeType(RawFieldType):
         self.cls = cls
 
     def array(self, size: SizeInfo) -> "FieldType":
-        """Add an array size to make a useable type."""
+        """Add an array size to make a usable type."""
         return self.cls(self.dataio_type, self.public_type, size)
 
     def __str__(self) -> str:
-- 
2.43.0

