Author: cazfi
Date: Wed Aug 19 21:52:13 2015
New Revision: 29592

URL: http://svn.gna.org/viewcvs/freeciv?rev=29592&view=rev
Log:
Made client menu entries about building base of certain gui_type type ruleset 
defined.
Only gtk-clients supported.

See patch #2721

Modified:
    trunk/client/gui-gtk-2.0/menu.c
    trunk/client/gui-gtk-3.0/menu.c
    trunk/common/packets.def
    trunk/data/alien/terrain.ruleset
    trunk/data/civ1/terrain.ruleset
    trunk/data/civ2/terrain.ruleset
    trunk/data/civ2civ3/terrain.ruleset
    trunk/data/classic/terrain.ruleset
    trunk/data/experimental/terrain.ruleset
    trunk/data/multiplayer/terrain.ruleset
    trunk/data/stub/terrain.ruleset
    trunk/fc_version
    trunk/server/ruleset.c

Modified: trunk/client/gui-gtk-2.0/menu.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-2.0/menu.c?rev=29592&r1=29591&r2=29592&view=diff
==============================================================================
--- trunk/client/gui-gtk-2.0/menu.c     (original)
+++ trunk/client/gui-gtk-2.0/menu.c     Wed Aug 19 21:52:13 2015
@@ -1719,9 +1719,9 @@
       /* Combat menu. */
       {"FORTIFY", NULL, _("Fortify"),
        "f", NULL, G_CALLBACK(fortify_callback)},
-      {"BUILD_FORTRESS", NULL, _("Build Type A Base"),
+      {"BUILD_FORTRESS", NULL, Q_(terrain_control.gui_type_base0),
        "<Shift>f", NULL, G_CALLBACK(build_fortress_callback)},
-      {"BUILD_AIRBASE", NULL, _("Build Type B Base"),
+      {"BUILD_AIRBASE", NULL, Q_(terrain_control.gui_type_base1),
        "<Shift>e", NULL, G_CALLBACK(build_airbase_callback)},
 
       {"DO_PILLAGE", NULL, _("_Pillage"),

Modified: trunk/client/gui-gtk-3.0/menu.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/menu.c?rev=29592&r1=29591&r2=29592&view=diff
==============================================================================
--- trunk/client/gui-gtk-3.0/menu.c     (original)
+++ trunk/client/gui-gtk-3.0/menu.c     Wed Aug 19 21:52:13 2015
@@ -1720,9 +1720,9 @@
       /* Combat menu. */
       {"FORTIFY", NULL, _("Fortify"),
        "f", NULL, G_CALLBACK(fortify_callback)},
-      {"BUILD_FORTRESS", NULL, _("Build Type A Base"),
+      {"BUILD_FORTRESS", NULL, Q_(terrain_control.gui_type_base0),
        "<Shift>f", NULL, G_CALLBACK(build_fortress_callback)},
-      {"BUILD_AIRBASE", NULL, _("Build Type B Base"),
+      {"BUILD_AIRBASE", NULL, Q_(terrain_control.gui_type_base1),
        "<Shift>e", NULL, G_CALLBACK(build_airbase_callback)},
 
       {"DO_PILLAGE", NULL, _("_Pillage"),

Modified: trunk/common/packets.def
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/packets.def?rev=29592&r1=29591&r2=29592&view=diff
==============================================================================
--- trunk/common/packets.def    (original)
+++ trunk/common/packets.def    Wed Aug 19 21:52:13 2015
@@ -1397,6 +1397,8 @@
   UINT8 move_fragments;
   UINT8 igter_cost;
   BOOL pythagorean_diagonal;
+  STRING gui_type_base0[MAX_LEN_NAME];
+  STRING gui_type_base1[MAX_LEN_NAME];
 end
 
 PACKET_RULESETS_READY = 225; sc, lsend

Modified: trunk/data/alien/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/terrain.ruleset?rev=29592&r1=29591&r2=29592&view=diff
==============================================================================
--- trunk/data/alien/terrain.ruleset    (original)
+++ trunk/data/alien/terrain.ruleset    Wed Aug 19 21:52:13 2015
@@ -559,6 +559,13 @@
 trade       = 2
 identifier  = "g"
 
+
+[extraui]
+
+; Player visible names of the base gui types.
+ui_name_base_fortress = _("?gui_type:Build Land base")
+ui_name_base_airbase = _("?gui_type:Build Airforce base")
+
 ; /* <-- avoid gettext warnings
 ;
 ; Each extra, including bases and roads, must have a section here.

Modified: trunk/data/civ1/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/terrain.ruleset?rev=29592&r1=29591&r2=29592&view=diff
==============================================================================
--- trunk/data/civ1/terrain.ruleset     (original)
+++ trunk/data/civ1/terrain.ruleset     Wed Aug 19 21:52:13 2015
@@ -716,6 +716,13 @@
 food        = 2
 # arctic (seals => walrus).
 
+
+[extraui]
+
+; Player visible names of the base gui types.
+ui_name_base_fortress = _("?gui_type:Build Fortress")
+ui_name_base_airbase = _("?gui_type:Build None")
+
 ; /* <-- avoid gettext warnings
 ;
 ; Each extra, including bases and roads, must have a section here.

Modified: trunk/data/civ2/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/terrain.ruleset?rev=29592&r1=29591&r2=29592&view=diff
==============================================================================
--- trunk/data/civ2/terrain.ruleset     (original)
+++ trunk/data/civ2/terrain.ruleset     Wed Aug 19 21:52:13 2015
@@ -822,6 +822,13 @@
 shield      = 3
 # desert-only, special processing, see savegame map_load().
 
+
+[extraui]
+
+; Player visible names of the base gui types.
+ui_name_base_fortress = _("?gui_type:Build Land base")
+ui_name_base_airbase = _("?gui_type:Build Airforce base")
+
 ; /* <-- avoid gettext warnings
 ;
 ; Each extra, including bases and roads, must have a section here.

Modified: trunk/data/civ2civ3/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/terrain.ruleset?rev=29592&r1=29591&r2=29592&view=diff
==============================================================================
--- trunk/data/civ2civ3/terrain.ruleset (original)
+++ trunk/data/civ2civ3/terrain.ruleset Wed Aug 19 21:52:13 2015
@@ -1011,6 +1011,13 @@
 shield      = 3 ; glacier used to have 4
 # glacier, desert
 
+
+[extraui]
+
+; Player visible names of the base gui types.
+ui_name_base_fortress = _("?gui_type:Build Fort/Fortress/Buoy")
+ui_name_base_airbase = _("?gui_type:Build Airstrip/Airbase")
+
 ; /* <-- avoid gettext warnings
 ;
 ; Each extra, including bases and roads, must have a section here.

Modified: trunk/data/classic/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/terrain.ruleset?rev=29592&r1=29591&r2=29592&view=diff
==============================================================================
--- trunk/data/classic/terrain.ruleset  (original)
+++ trunk/data/classic/terrain.ruleset  Wed Aug 19 21:52:13 2015
@@ -1001,6 +1001,13 @@
 shield      = 3 ; glacier used to have 4
 # glacier, desert
 
+
+[extraui]
+
+; Player visible names of the base gui types.
+ui_name_base_fortress = _("?gui_type:Build Fortress/Buoy")
+ui_name_base_airbase = _("?gui_type:Build Airbase")
+
 ; /* <-- avoid gettext warnings
 ;
 ; Each extra, including bases and roads, must have a section here.

Modified: trunk/data/experimental/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/experimental/terrain.ruleset?rev=29592&r1=29591&r2=29592&view=diff
==============================================================================
--- trunk/data/experimental/terrain.ruleset     (original)
+++ trunk/data/experimental/terrain.ruleset     Wed Aug 19 21:52:13 2015
@@ -977,6 +977,13 @@
 shield      = 3 ; glacier used to have 4
 # glacier, desert
 
+
+[extraui]
+
+; Player visible names of the base gui types.
+ui_name_base_fortress = _("?gui_type:Build Fortress/Buoy")
+ui_name_base_airbase = _("?gui_type:Build Airbase")
+
 ; /* <-- avoid gettext warnings
 ;
 ; Each extra, including bases and roads, must have a section here.

Modified: trunk/data/multiplayer/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/multiplayer/terrain.ruleset?rev=29592&r1=29591&r2=29592&view=diff
==============================================================================
--- trunk/data/multiplayer/terrain.ruleset      (original)
+++ trunk/data/multiplayer/terrain.ruleset      Wed Aug 19 21:52:13 2015
@@ -975,6 +975,13 @@
 shield      = 3 ; glacier used to have 4
 # glacier, desert
 
+
+[extraui]
+
+; Player visible names of the base gui types.
+ui_name_base_fortress = _("?gui_type:Build Fortress/Buoy")
+ui_name_base_airbase = _("?gui_type:Build Airbase")
+
 ; /* <-- avoid gettext warnings
 ;
 ; Each extra, including bases and roads, must have a section here.

Modified: trunk/data/stub/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/stub/terrain.ruleset?rev=29592&r1=29591&r2=29592&view=diff
==============================================================================
--- trunk/data/stub/terrain.ruleset     (original)
+++ trunk/data/stub/terrain.ruleset     Wed Aug 19 21:52:13 2015
@@ -272,6 +272,13 @@
 trade       = 1
 identifier  = "g"
 
+
+[extraui]
+
+; Player visible names of the base gui types.
+ui_name_base_fortress = _("?gui_type:Build Type A Base")
+ui_name_base_airbase = _("?gui_type:Build Type B Base")
+
 ; /* <-- avoid gettext warnings
 ;
 ; Each extra, including bases and roads, must have a section here.

Modified: trunk/fc_version
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/fc_version?rev=29592&r1=29591&r2=29592&view=diff
==============================================================================
--- trunk/fc_version    (original)
+++ trunk/fc_version    Wed Aug 19 21:52:13 2015
@@ -54,7 +54,7 @@
 #   - Avoid adding a new mandatory capability to the development branch for
 #     as long as possible.  We want to maintain network compatibility with
 #     the stable branch for as long as possible.
-NETWORK_CAPSTRING_MANDATORY="+Freeciv.Devel-3.0-2015.Aug.19"
+NETWORK_CAPSTRING_MANDATORY="+Freeciv.Devel-3.0-2015.Aug.19b"
 NETWORK_CAPSTRING_OPTIONAL=""
 
 FREECIV_DISTRIBUTOR=""

Modified: trunk/server/ruleset.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/ruleset.c?rev=29592&r1=29591&r2=29592&view=diff
==============================================================================
--- trunk/server/ruleset.c      (original)
+++ trunk/server/ruleset.c      Wed Aug 19 21:52:13 2015
@@ -2416,6 +2416,7 @@
   bool compat_river = FALSE;
   const char **res;
   const char *filename = secfile_name(file);
+  const char *text;
   bool ok = TRUE;
 
   /* parameters */
@@ -2456,6 +2457,16 @@
   map.server.ocean_resources
     = secfile_lookup_bool_default(file, FALSE,
                                   "parameters.ocean_resources");
+
+  text = secfile_lookup_str_default(file,
+                                    N_("?gui_type:Build Type A Base"),
+                                    "extraui.ui_name_base_fortress");
+  sz_strlcpy(terrain_control.gui_type_base0, text);
+
+  text = secfile_lookup_str_default(file,
+                                    N_("?gui_type:Build Type B Base"),
+                                    "extraui.ui_name_base_airbase");
+  sz_strlcpy(terrain_control.gui_type_base1, text);
 
   if (ok) {
     /* terrain details */


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to