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

2017-02-23 Thread Klaus Halfmann
Review: Approve compile, test

Fine for me, played 30m around some savegame.

Did not do a complete codereview
-- 
https://code.launchpad.net/~widelands-dev/widelands/align-align/+merge/317871
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/align-align.

___
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/align-align into lp:widelands

2017-02-23 Thread Klaus Halfmann
So now Align is HAlign and VAlign at the same time.
The originla Align is reprocuded by struct Alignment with halign and valign.

OK, we left the Era of 8bit, so no need to conserve that Memory.

Currently compiling but not in paralell to have some time for checking.
-- 
https://code.launchpad.net/~widelands-dev/widelands/align-align/+merge/317871
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/align-align.

___
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/fh1-sub2div into lp:widelands

2017-02-23 Thread noreply
The proposal to merge lp:~widelands-dev/widelands/fh1-sub2div into lp:widelands 
has been updated.

Status: Needs review => Merged

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

___
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/fh1-sub2div into lp:widelands

2017-02-23 Thread bunnybot
Continuous integration builds have changed state:

Travis build 1983. State: passed. Details: 
https://travis-ci.org/widelands/widelands/builds/204691912.
Appveyor build 1818. State: success. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_fh1_sub2div-1818.
-- 
https://code.launchpad.net/~widelands-dev/widelands/fh1-sub2div/+merge/318138
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/fh1-sub2div.

___
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-sub2div into lp:widelands

2017-02-23 Thread GunChleoc
Thanks for the review :)

This means that I can finish up the next branch for the new font handler.

BTW bunnybot will now wait with the merge until Travis has passed.

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

___
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/align-align into lp:widelands

2017-02-23 Thread GunChleoc
I refactored everything so that we have 1 enum class again.

There is room for a new function to vertically center text - I have added NOCOM 
comments to all the instances where this could be used.

Let's see how many warnings Clang will give you now, we might do some renaming 
in the enum to end up with 3 parameters only. I have added a NOCOM comment 
there as well, just in case.
-- 
https://code.launchpad.net/~widelands-dev/widelands/align-align/+merge/317871
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/align-align.

___
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-sub2div into lp:widelands

2017-02-23 Thread Klaus Halfmann
Review: Approve compile, test, review

Works for me, lets work for Travis/Appvoyer, for completness
-- 
https://code.launchpad.net/~widelands-dev/widelands/fh1-sub2div/+merge/318138
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/fh1-sub2div.

___
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-sub2div into lp:widelands

2017-02-23 Thread Klaus Halfmann
Code looks straight forward 1,$ s/sub/div/ ;-)

will comipile this and take a look
-- 
https://code.launchpad.net/~widelands-dev/widelands/fh1-sub2div/+merge/318138
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/fh1-sub2div 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/fh1-sub2div into lp:widelands

2017-02-23 Thread GunChleoc
GunChleoc has proposed merging lp:~widelands-dev/widelands/fh1-sub2div into 
lp:widelands.

Commit message:
Renamed "sub" tag to "div" in new font renderer.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/fh1-sub2div/+merge/318138

A simple renaming of a font renderer tag.

I agreed with SirVer on this renaming when I first started working on the new 
font renderer. Since I've started working on the renderer again, I'd like this 
in before I start changing any markup.
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/fh1-sub2div into lp:widelands.
=== modified file 'src/graphic/text/rt_parse.cc'
--- src/graphic/text/rt_parse.cc	2017-01-25 18:55:59 +
+++ src/graphic/text/rt_parse.cc	2017-02-23 17:31:14 +
@@ -189,7 +189,7 @@
 		tc.allowed_children.insert("p");
 		tc.allowed_children.insert("vspace");
 		tc.allowed_children.insert("font");
-		tc.allowed_children.insert("sub");
+		tc.allowed_children.insert("div");
 		tc.text_allowed = false;
 		tc.has_closing_tag = true;
 		tag_constraints_["rt"] = tc;
@@ -223,7 +223,7 @@
 		tc.has_closing_tag = false;
 		tag_constraints_["space"] = tc;
 	}
-	{  // sub tag
+	{  // div tag
 		TagConstraint tc;
 		tc.allowed_attrs.insert("padding");
 		tc.allowed_attrs.insert("padding_r");
@@ -239,11 +239,11 @@
 		tc.allowed_children.insert("p");
 		tc.allowed_children.insert("vspace");
 		tc.allowed_children.insert("font");
-		tc.allowed_children.insert("sub");
+		tc.allowed_children.insert("div");
 
 		tc.text_allowed = false;
 		tc.has_closing_tag = true;
-		tag_constraints_["sub"] = tc;
+		tag_constraints_["div"] = tc;
 	}
 	{  // p tag
 		TagConstraint tc;
@@ -256,7 +256,7 @@
 		tc.allowed_children.insert("space");
 		tc.allowed_children.insert("br");
 		tc.allowed_children.insert("img");
-		tc.allowed_children.insert("sub");
+		tc.allowed_children.insert("div");
 		tc.text_allowed = true;
 		tc.has_closing_tag = true;
 		tag_constraints_["p"] = tc;
@@ -277,7 +277,7 @@
 		tc.allowed_children.insert("vspace");
 		tc.allowed_children.insert("p");
 		tc.allowed_children.insert("font");
-		tc.allowed_children.insert("sub");
+		tc.allowed_children.insert("div");
 		tc.text_allowed = true;
 		tc.has_closing_tag = true;
 		tag_constraints_["font"] = tc;

=== modified file 'src/graphic/text/rt_render.cc'
--- src/graphic/text/rt_render.cc	2017-01-25 18:55:59 +
+++ src/graphic/text/rt_render.cc	2017-02-23 17:31:14 +
@@ -652,17 +652,17 @@
 };
 
 /*
- * This is a sub tag node. It is also the same as a full rich text render node.
+ * This is a div tag node. It is also the same as a full rich text render node.
  */
-class SubTagRenderNode : public RenderNode {
+class DivTagRenderNode : public RenderNode {
 public:
-	SubTagRenderNode(NodeStyle& ns)
+	DivTagRenderNode(NodeStyle& ns)
 	   : RenderNode(ns),
 	 background_color_(0, 0, 0),
 	 is_background_color_set_(false),
 	 background_image_(nullptr) {
 	}
-	virtual ~SubTagRenderNode() {
+	virtual ~DivTagRenderNode() {
 		for (RenderNode* n : nodes_to_render_) {
 			delete n;
 		}
@@ -1140,9 +1140,9 @@
 	}
 };
 
-class SubTagHandler : public TagHandler {
+class DivTagHandler : public TagHandler {
 public:
-	SubTagHandler(Tag& tag,
+	DivTagHandler(Tag& tag,
 	  FontCache& fc,
 	  NodeStyle ns,
 	  ImageCache* image_cache,
@@ -1153,7 +1153,7 @@
 	   : TagHandler(tag, fc, ns, image_cache, init_renderer_style, fontsets),
 	 shrink_to_fit_(shrink_to_fit),
 	 w_(max_w),
-	 render_node_(new SubTagRenderNode(ns)) {
+		  render_node_(new DivTagRenderNode(ns)) {
 	}
 
 	void enter() override {
@@ -1238,7 +1238,7 @@
 		nodes.push_back(render_node_);
 	}
 
-	// Handle attributes that are in sub, but not in rt.
+	// Handle attributes that are in div, but not in rt.
 	virtual void handle_unique_attributes() {
 		const AttrMap& a = tag_.attrs();
 		if (a.has("width")) {
@@ -1278,10 +1278,10 @@
 
 private:
 	uint16_t w_;
-	SubTagRenderNode* render_node_;
+	DivTagRenderNode* render_node_;
 };
 
-class RTTagHandler : public SubTagHandler {
+class RTTagHandler : public DivTagHandler {
 public:
 	RTTagHandler(Tag& tag,
 	 FontCache& fc,
@@ -1290,10 +1290,10 @@
 	 RendererStyle& init_renderer_style,
 	 const UI::FontSets& fontsets,
 	 uint16_t w)
-	   : SubTagHandler(tag, fc, ns, image_cache, init_renderer_style, fontsets, w, true) {
+		: DivTagHandler(tag, fc, ns, image_cache, init_renderer_style, fontsets, w, true) {
 	}
 
-	// Handle attributes that are in rt, but not in sub.
+	// Handle attributes that are in rt, but not in div.
 	void handle_unique_attributes() override {
 		const AttrMap& a = tag_.attrs();
 		WordSpacerNode::show_spaces(a.has("db_show_spaces") ? a["db_show_spaces"].get_bool() : 0);
@@ -1329,7 +1329,7 @@
 	if (map.empty()) {
 		map["br"] = _taghandler;
 		map["font"] = 

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

2017-02-23 Thread bunnybot
Continuous integration builds have changed state:

Travis build 1982. State: passed. Details: 
https://travis-ci.org/widelands/widelands/builds/204562651.
Appveyor build 1817. State: success. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_align_align-1817.
-- 
https://code.launchpad.net/~widelands-dev/widelands/align-align/+merge/317871
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/align-align.

___
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/align-align into lp:widelands

2017-02-23 Thread Klaus Halfmann
Review: Resubmit

OK found it. 
I tried to play tricks with the mirror_aligment in src/graphic/richtext.cc,
but got it wrong
-- 
https://code.launchpad.net/~widelands-dev/widelands/align-align/+merge/317871
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/align-align.

___
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