Author: cazfi Date: Wed Aug 19 21:52:32 2015 New Revision: 29593 URL: http://svn.gna.org/viewcvs/freeciv?rev=29593&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: branches/S2_6/client/gui-gtk-2.0/menu.c branches/S2_6/client/gui-gtk-3.0/menu.c branches/S2_6/common/packets.def branches/S2_6/data/alien/terrain.ruleset branches/S2_6/data/civ1/terrain.ruleset branches/S2_6/data/civ2/terrain.ruleset branches/S2_6/data/civ2civ3/terrain.ruleset branches/S2_6/data/classic/terrain.ruleset branches/S2_6/data/experimental/terrain.ruleset branches/S2_6/data/multiplayer/terrain.ruleset branches/S2_6/data/stub/terrain.ruleset branches/S2_6/fc_version branches/S2_6/server/ruleset.c Modified: branches/S2_6/client/gui-gtk-2.0/menu.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-2.0/menu.c?rev=29593&r1=29592&r2=29593&view=diff ============================================================================== --- branches/S2_6/client/gui-gtk-2.0/menu.c (original) +++ branches/S2_6/client/gui-gtk-2.0/menu.c Wed Aug 19 21:52:32 2015 @@ -1709,9 +1709,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: branches/S2_6/client/gui-gtk-3.0/menu.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.0/menu.c?rev=29593&r1=29592&r2=29593&view=diff ============================================================================== --- branches/S2_6/client/gui-gtk-3.0/menu.c (original) +++ branches/S2_6/client/gui-gtk-3.0/menu.c Wed Aug 19 21:52:32 2015 @@ -1710,9 +1710,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: branches/S2_6/common/packets.def URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/common/packets.def?rev=29593&r1=29592&r2=29593&view=diff ============================================================================== --- branches/S2_6/common/packets.def (original) +++ branches/S2_6/common/packets.def Wed Aug 19 21:52:32 2015 @@ -1390,6 +1390,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: branches/S2_6/data/alien/terrain.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/alien/terrain.ruleset?rev=29593&r1=29592&r2=29593&view=diff ============================================================================== --- branches/S2_6/data/alien/terrain.ruleset (original) +++ branches/S2_6/data/alien/terrain.ruleset Wed Aug 19 21:52:32 2015 @@ -558,6 +558,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: branches/S2_6/data/civ1/terrain.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/civ1/terrain.ruleset?rev=29593&r1=29592&r2=29593&view=diff ============================================================================== --- branches/S2_6/data/civ1/terrain.ruleset (original) +++ branches/S2_6/data/civ1/terrain.ruleset Wed Aug 19 21:52:32 2015 @@ -715,6 +715,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: branches/S2_6/data/civ2/terrain.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/civ2/terrain.ruleset?rev=29593&r1=29592&r2=29593&view=diff ============================================================================== --- branches/S2_6/data/civ2/terrain.ruleset (original) +++ branches/S2_6/data/civ2/terrain.ruleset Wed Aug 19 21:52:32 2015 @@ -821,6 +821,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: branches/S2_6/data/civ2civ3/terrain.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/civ2civ3/terrain.ruleset?rev=29593&r1=29592&r2=29593&view=diff ============================================================================== --- branches/S2_6/data/civ2civ3/terrain.ruleset (original) +++ branches/S2_6/data/civ2civ3/terrain.ruleset Wed Aug 19 21:52:32 2015 @@ -1010,6 +1010,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: branches/S2_6/data/classic/terrain.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/classic/terrain.ruleset?rev=29593&r1=29592&r2=29593&view=diff ============================================================================== --- branches/S2_6/data/classic/terrain.ruleset (original) +++ branches/S2_6/data/classic/terrain.ruleset Wed Aug 19 21:52:32 2015 @@ -1000,6 +1000,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: branches/S2_6/data/experimental/terrain.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/experimental/terrain.ruleset?rev=29593&r1=29592&r2=29593&view=diff ============================================================================== --- branches/S2_6/data/experimental/terrain.ruleset (original) +++ branches/S2_6/data/experimental/terrain.ruleset Wed Aug 19 21:52:32 2015 @@ -976,6 +976,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: branches/S2_6/data/multiplayer/terrain.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/multiplayer/terrain.ruleset?rev=29593&r1=29592&r2=29593&view=diff ============================================================================== --- branches/S2_6/data/multiplayer/terrain.ruleset (original) +++ branches/S2_6/data/multiplayer/terrain.ruleset Wed Aug 19 21:52:32 2015 @@ -974,6 +974,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: branches/S2_6/data/stub/terrain.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/stub/terrain.ruleset?rev=29593&r1=29592&r2=29593&view=diff ============================================================================== --- branches/S2_6/data/stub/terrain.ruleset (original) +++ branches/S2_6/data/stub/terrain.ruleset Wed Aug 19 21:52:32 2015 @@ -271,6 +271,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: branches/S2_6/fc_version URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/fc_version?rev=29593&r1=29592&r2=29593&view=diff ============================================================================== --- branches/S2_6/fc_version (original) +++ branches/S2_6/fc_version Wed Aug 19 21:52:32 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-2.6-2015.Aug.19" +NETWORK_CAPSTRING_MANDATORY="+Freeciv.Devel-2.6-2015.Aug.19b" NETWORK_CAPSTRING_OPTIONAL="" FREECIV_DISTRIBUTOR="" Modified: branches/S2_6/server/ruleset.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/ruleset.c?rev=29593&r1=29592&r2=29593&view=diff ============================================================================== --- branches/S2_6/server/ruleset.c (original) +++ branches/S2_6/server/ruleset.c Wed Aug 19 21:52:32 2015 @@ -2397,6 +2397,7 @@ bool compat_river = FALSE; const char **res; const char *filename = secfile_name(file); + const char *text; bool ok = TRUE; if (check_ruleset_capabilities(file, RULESET_CAPABILITIES, filename) == NULL) { @@ -2441,6 +2442,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