Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/test-ngettext into lp:widelands

2016-04-15 Thread GunChleoc
Review: Resubmit

Done :)
-- 
https://code.launchpad.net/~widelands-dev/widelands/test-ngettext/+merge/291587
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/test-ngettext.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/test-ngettext into lp:widelands

2016-04-15 Thread GunChleoc
The proposal to merge lp:~widelands-dev/widelands/test-ngettext into 
lp:widelands has been updated.

Commit Message changed to:

Revised Lua ngettext to allow only unsigned integers. Created test for lua 
gettext functions.

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/test-ngettext/+merge/291587
-- 
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/test-ngettext.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/revise-map-descr into lp:widelands

2016-04-15 Thread GunChleoc
GunChleoc has proposed merging lp:~widelands-dev/widelands/revise-map-descr 
into lp:widelands.

Commit message:
Revised map details in map loading screens. Localized map tags everywhere.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/revise-map-descr/+merge/292031

It became impossible to scroll through some map descriptions, so I put it all 
into one big richtext area. This means that I could also add some more info 
like map size and tags.
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/revise-map-descr into lp:widelands.
=== modified file 'src/editor/ui_menus/main_menu_map_options.cc'
--- src/editor/ui_menus/main_menu_map_options.cc	2016-04-06 09:23:04 +
+++ src/editor/ui_menus/main_menu_map_options.cc	2016-04-15 17:37:26 +
@@ -33,6 +33,7 @@
 #include "ui_basic/multilineeditbox.h"
 #include "ui_basic/multilinetextarea.h"
 #include "ui_basic/textarea.h"
+#include "wui/map_tags.h"
 
 inline EditorInteractive & MainMenuMapOptions::eia() {
 	return dynamic_cast(*get_parent());
@@ -122,12 +123,12 @@
 
 
 	tags_box_.add(new UI::Textarea(&tags_box_, 0, 0, max_w_, labelh_, _("Tags:")), UI::Align::kLeft);
-	add_tag_checkbox(&tags_box_, "unbalanced", _("Unbalanced"));
-	add_tag_checkbox(&tags_box_, "ffa", _("Free for all"));
-	add_tag_checkbox(&tags_box_, "1v1", _("1v1"));
-	add_tag_checkbox(&tags_box_, "2teams", _("Teams of 2"));
-	add_tag_checkbox(&tags_box_, "3teams", _("Teams of 3"));
-	add_tag_checkbox(&tags_box_, "4teams", _("Teams of 4"));
+	add_tag_checkbox(&tags_box_, "unbalanced", localize_tag("unbalanced"));
+	add_tag_checkbox(&tags_box_, "ffa", localize_tag("ffa"));
+	add_tag_checkbox(&tags_box_, "1v1", localize_tag("1v1"));
+	add_tag_checkbox(&tags_box_, "2teams", localize_tag("2teams"));
+	add_tag_checkbox(&tags_box_, "3teams", localize_tag("3teams"));
+	add_tag_checkbox(&tags_box_, "4teams", localize_tag("4teams"));
 
 	teams_box_.add(new UI::Textarea(&teams_box_, 0, 0, max_w_, labelh_, _("Suggested Teams:")),
 		UI::Align::kLeft);

=== modified file 'src/graphic/text/rt_parse.cc'
--- src/graphic/text/rt_parse.cc	2016-03-14 19:49:52 +
+++ src/graphic/text/rt_parse.cc	2016-04-15 17:37:26 +
@@ -274,6 +274,7 @@
 
 		tc.allowed_children.insert("br");
 		tc.allowed_children.insert("space");
+		tc.allowed_children.insert("vspace");
 		tc.allowed_children.insert("p");
 		tc.allowed_children.insert("font");
 		tc.allowed_children.insert("sub");

=== modified file 'src/ui_basic/multilinetextarea.cc'
--- src/ui_basic/multilinetextarea.cc	2016-04-01 09:29:17 +
+++ src/ui_basic/multilinetextarea.cc	2016-04-15 17:37:26 +
@@ -41,7 +41,8 @@
 	Panel   (parent, x, y, w, h),
 	text_  (text),
 	color_(UI_FONT_CLR_FG),
-	isrichtext(false),
+	force_new_renderer_(false),
+	use_old_renderer_(false),
 	scrollbar_ (this, get_w() - Scrollbar::kSize, 0, Scrollbar::kSize, h, false),
 	scrollmode_(scroll_mode)
 {
@@ -88,12 +89,16 @@
 	// We wrap the text twice. We need to do this to account for the presence/absence of the scollbar.
 	bool scrollbar_was_enabled = scrollbar_.is_enabled();
 	for (int i = 0; i < 2; ++i) {
-		if (text_.compare(0, 3, "render(make_richtext(), get_eff_w() - 2 * RICHTEXT_MARGIN);
 			height = text_im->height();
+		} else if (force_new_renderer_) {
+			use_old_renderer_ = false;
+			const Image* text_im = UI::g_fh1->render(text_, get_eff_w() - 2 * RICHTEXT_MARGIN);
+			height = text_im->height();
 		} else {
-			isrichtext = true;
+			use_old_renderer_ = true;
 			rt.set_width(get_eff_w() - 2 * RICHTEXT_MARGIN);
 			rt.parse(text_);
 			height = rt.height() + 2 * RICHTEXT_MARGIN;
@@ -143,10 +148,15 @@
  */
 void MultilineTextarea::draw(RenderTarget& dst)
 {
-	if (isrichtext) {
+	if (use_old_renderer_) {
 		rt.draw(dst, Point(RICHTEXT_MARGIN, RICHTEXT_MARGIN - scrollbar_.get_scrollpos()));
 	} else {
-		const Image* text_im = UI::g_fh1->render(make_richtext(), get_eff_w() - 2 * RICHTEXT_MARGIN);
+		const Image* text_im;
+		if (!is_richtext(text_)) {
+			text_im = UI::g_fh1->render(make_richtext(), get_eff_w() - 2 * RICHTEXT_MARGIN);
+		} else {
+			text_im = UI::g_fh1->render(text_, get_eff_w() - 2 * RICHTEXT_MARGIN);
+		}
 
 		uint32_t blit_width = std::min(text_im->width(), static_cast(get_eff_w()));
 		uint32_t blit_height = std::min(text_im->height(), static_cast(get_inner_h()));

=== modified file 'src/ui_basic/multilinetextarea.h'
--- src/ui_basic/multilinetextarea.h	2016-04-01 12:22:09 +
+++ src/ui_basic/multilinetextarea.h	2016-04-15 17:37:26 +
@@ -58,6 +58,7 @@
 	uint32_t get_eff_w() const {return scrollbar_.is_enabled() ? get_w() - Scrollbar::kSize : get_w();}
 
 	void set_color(RGBColor fg) {color_ = fg;}
+	void force_new_renderer() {force_new_renderer_ = true;}
 
 	// Drawing and event handlers
 	void draw(RenderTarget&) override;
@@ -82,7 +83,8 @@
 	RGBColor color_;
 	Align align_;
 
-	bool isrichtext

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/fh1_multiline_textarea into lp:widelands

2016-04-15 Thread kaputtnik
:-)

-- 
https://code.launchpad.net/~widelands-dev/widelands/fh1_multiline_textarea/+merge/292033
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/fh1_multiline_textarea into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/test-ngettext into lp:widelands

2016-04-15 Thread Miroslav Remák
Review: Approve

LGTM.
-- 
https://code.launchpad.net/~widelands-dev/widelands/test-ngettext/+merge/291587
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/test-ngettext.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/test-ngettext into lp:widelands

2016-04-15 Thread Klaus Halfmann
Review: Approve compile / regression / review / check f1-help

Fine for me.
-- 
https://code.launchpad.net/~widelands-dev/widelands/test-ngettext/+merge/291587
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/test-ngettext.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/fh1_multiline_textarea into lp:widelands

2016-04-15 Thread Klaus Halfmann
Uhm, to late, already branched it.
/me will try to read first, next time :-)
-- 
https://code.launchpad.net/~widelands-dev/widelands/fh1_multiline_textarea/+merge/292033
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/fh1_multiline_textarea into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/fh1_multiline_textarea into lp:widelands

2016-04-15 Thread kaputtnik
:-D

Klaus, this is just for bug 1535732 , see 
https://bugs.launchpad.net/widelands/+bug/1535732/comments/62 ff
-- 
https://code.launchpad.net/~widelands-dev/widelands/fh1_multiline_textarea/+merge/292033
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/fh1_multiline_textarea into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/revise-map-descr into lp:widelands

2016-04-15 Thread kaputtnik
Good ideas :-)

Some things:
1. The slider of the scrollbar does not change his size if there is less to 
scroll (the slider is always small) Good to see in screen resolution 1280x720 
and map Four Mountains.
2. There are obsolete information: "Map size" and "2/3/4/... Player map". These 
information is always in the table, so why should we have it in the description 
again?
3. Having non bold text for normal descriptions is fine, but for me it is hard 
to read in the first time. Maybe we could have another color for the text or a 
different background?

Showing the tags is a good idea :-)

Just a side note:
For a longer time i thought of a rework of the menus (especially in regard to 
my point 3), but i had no good ideas until today... and of course i do not know 
which possibilities there are. F.e. the checkboxes in "New game" looks a bit 
unordered and i guess some of them aren't used at all. Maybe we could make a 
poll on the website to determine what is really needed here. But creating a 
good, useful ui is a long and not easy task ... So nothing against your work :-)
-- 
https://code.launchpad.net/~widelands-dev/widelands/revise-map-descr/+merge/292031
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/revise-map-descr into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/revise-map-descr into lp:widelands

2016-04-15 Thread bunnybot
Continuous integration builds have changed state:

Travis build 1016. State: failed. Details: 
https://travis-ci.org/widelands/widelands/builds/123413309.
Appveyor build 848. State: success. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_revise_map_descr-848.
-- 
https://code.launchpad.net/~widelands-dev/widelands/revise-map-descr/+merge/292031
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/revise-map-descr into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/test-ngettext into lp:widelands

2016-04-15 Thread GunChleoc
Thanks!

@bunnybot merge
-- 
https://code.launchpad.net/~widelands-dev/widelands/test-ngettext/+merge/291587
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/test-ngettext.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/test-ngettext into lp:widelands

2016-04-15 Thread noreply
The proposal to merge lp:~widelands-dev/widelands/test-ngettext into 
lp:widelands has been updated.

Status: Needs review => Merged

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/test-ngettext/+merge/291587
-- 
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/test-ngettext.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp