Merge lp:~alocritani/widelands/resource_info_in_editor into lp:widelands

Proposed by Angelo Locritani
Status: Merged
Merge reported by: SirVer
Merged at revision: not available
Proposed branch: lp:~alocritani/widelands/resource_info_in_editor
Merge into: lp:widelands
Diff against target: 39 lines (+12/-11)
1 file modified
src/editor/tools/editor_info_tool.cc (+12/-11)
To merge this branch: bzr merge lp:~alocritani/widelands/resource_info_in_editor
Reviewer Review Type Date Requested Status
Widelands Developers Pending
Review via email: mp+98150@code.launchpad.net

Description of the change

"resource amount" line only visible if there's a resource
sorry for asking 2 merges so close

To post a comment you must log in.
Revision history for this message
Angelo Locritani (alocritani) wrote :

do you think it can be inserted before Feature Freeze or should we wait for build18? Only a single translatable string has been changed.

Revision history for this message
Angelo Locritani (alocritani) wrote :

please ignore my previous comment
sorry, it seems it is in rev 6327 but no mail nor status change for the branch. no idea about reason.

Revision history for this message
SirVer (sirver) wrote :

The reason is the following: I merged it and forgot to push, then someone else commited stuff to trunk. So I rebase and somehow some metadata of the merge got lost.

It is completly in trunk though. Also: thanks for including the help.lua into catalogues - I somehow missed this.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/editor/tools/editor_info_tool.cc'
2--- src/editor/tools/editor_info_tool.cc 2012-03-18 20:21:02 +0000
3+++ src/editor/tools/editor_info_tool.cc 2012-03-19 06:07:23 +0000
4@@ -92,23 +92,24 @@
5 buf += _("3) Resources Info\n");
6 {
7 Widelands::Resource_Index ridx = f.get_resources();
8- int ramount = f.get_resources_amount();
9-
10- if (ramount > 0){
11- snprintf
12- (buf1, sizeof(buf1), _("Resource name: %s\n"), world.get_resource(ridx)->name().c_str());
13+ int ramount = f.get_resources_amount();
14+
15+ if (ramount > 0) {
16+ snprintf
17+ (buf1, sizeof(buf1), _(" Resource name: %s\n"), world.get_resource(ridx)->name().c_str());
18+ buf += buf1;
19+
20+ snprintf
21+ (buf1, sizeof(buf1), _(" Resource amount: %i\n"), ramount);
22+ buf += buf1;
23 }
24 else
25 {
26 snprintf
27- (buf1, sizeof(buf1), _("Resource name: %s\n"), _("<none>"));
28+ (buf1, sizeof(buf1), _(" Resource name: %s\n"), _("none"));
29+ buf += buf1;
30 }
31
32- buf += buf1;
33-
34- snprintf
35- (buf1, sizeof(buf1), _("Resource amount: %i\n"), ramount);
36- buf += buf1;
37 }
38
39 buf += _("4) Map Info\n Name: ");

Subscribers

People subscribed via source and target branches

to status/vote changes: