widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #02059
Re: [Merge] lp:~widelands-dev/widelands/bug-1293158 into lp:widelands
Review: Approve
the inline comment is rather cumbersome with saving....
Diff comments:
> === modified file 'src/editor/tools/editor_info_tool.cc'
> --- src/editor/tools/editor_info_tool.cc 2014-03-09 10:28:39 +0000
> +++ src/editor/tools/editor_info_tool.cc 2014-05-29 17:16:25 +0000
> @@ -49,16 +49,11 @@
> Widelands::Field & f = map[center.node];
>
> // *** Node info
> - char buf1[1024];
> std::string buf = _("Node:");
> buf += "\n";
> buf += std::string("• ") + (boost::format(_("Coordinates: (%1$i, %2$i)"))
> % center.node.x % center.node.y).str() + "\n";
>
> - buf += std::string("• ");
> - buf += buf1;
> - buf += std::string("\n");
> -
> std::string temp = "";
> Widelands::NodeCaps const caps = f.nodecaps();
> switch (caps & Widelands::BUILDCAPS_SIZEMASK) {
> @@ -83,9 +78,15 @@
>
> buf += std::string("• ") + (boost::format(_("Caps:%s")) % temp).str() + "\n";
>
> - buf += std::string("• ");
> - snprintf(buf1, sizeof(buf1), _("Owned by %i"), f.get_owned_by());
> - buf += std::string(buf1) + "\n";
> + if(f.get_owned_by() > 0) {
> + buf += std::string("• ");
> + char buf1[1024];
> + snprintf(buf1, sizeof(buf1), _("Owned by: %u"), f.get_owned_by());
> + buf += std::string(buf1) + "\n";
> + }
> + else {
> + buf += std::string("• ") + _("Owned by: —") + "\n";
Ack about the consistency. We need to fix codecheck though as it cannot deal with utf files it seems.
An example for the table thing is here: http://bazaar.launchpad.net/~widelands-dev/widelands/trunk/files/head:/manual_test/richtext/tests/table_like/
It only works for the new style text renderer - I am not sure if that is used in multiline text areas or not.
> + }
>
> temp = f.get_immovable() ? _("Has base immovable") : _("No base immovable");
> buf += std::string("• ") + temp + "\n";
> @@ -116,8 +117,7 @@
> ).str() + "\n";
> buf += std::string("• ") + (boost::format(_("Resource amount: %i")) % ramount).str() + "\n";
> }
> - else
> - {
> + else {
> buf += std::string("• ") + std::string(_("No resources")) + "\n";
> }
>
> @@ -127,10 +127,13 @@
> buf += std::string("• ") + (boost::format(_("Size: %1$ix%2$i"))
> % map.get_width() % map.get_height()).str() + "\n";
>
> - buf += std::string("• ");
> - snprintf(buf1, sizeof(buf1), _("Players: %i"), map.get_nrplayers());
> + if (map.get_nrplayers() > 0) {
> + buf += std::string("• ") + (boost::format(_("Players: %u")) % map.get_nrplayers()).str() + "\n";
> + }
> + else {
> + buf += std::string("• ") + (boost::format(_("Players: %s")) % "—").str() + "\n";
> + }
>
> - buf += std::string(buf1) + "\n";
> buf += std::string("• ") + (boost::format(_("Author: %s")) % map.get_author()).str() + "\n";
> buf += std::string("• ") + (boost::format(_("Descr: %s")) % map.get_description()).str() + "\n";
>
>
> === modified file 'src/logic/cmd_queue.h'
> --- src/logic/cmd_queue.h 2014-05-11 12:29:55 +0000
> +++ src/logic/cmd_queue.h 2014-05-29 17:16:25 +0000
> @@ -22,6 +22,7 @@
>
> #include <memory>
> #include <queue>
> +#include <stdint.h>
>
> #include "logic/queue_cmd_ids.h"
>
>
--
https://code.launchpad.net/~widelands-dev/widelands/bug-1293158/+merge/221434
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1293158.
References