Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1823612-llvm8-build-errors into lp:widelands

2019-04-09 Thread GunChleoc
Which changes do you mean exactly? Please point me to the commit in the commit 
log for this branch, or to the line in the code.

All that the AI change does is to assign a value to the same element only once 
instead of twice. Do you want me to record the value assignment that I deleted 
in a comment?
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1823612-llvm8-build-errors/+merge/365644
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1823612-llvm8-build-errors.

___
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/editor-resize-map into lp:widelands

2019-04-09 Thread GunChleoc
I have given this a very quick spin.

I don't think that it is obvious to the user that they need to click on the map 
after selecting the values. Best add a Multilinetextarea with a hint.

I think it would also be good to have dropdown menus for the map size rather 
than spin boxes - selecting them will be much faster that way. You could put 
this into a separate class and use it everywhere in the editor where map sized 
are being set.
-- 
https://code.launchpad.net/~widelands-dev/widelands/editor-resize-map/+merge/365638
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/editor-resize-map.

___
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/bug-1823612-llvm8-build-errors into lp:widelands

2019-04-09 Thread bunnybot
Continuous integration builds have changed state:

Travis build 4706. State: errored. Details: 
https://travis-ci.org/widelands/widelands/builds/517922834.
Appveyor build 4492. State: success. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1823612_llvm8_build_errors-4492.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1823612-llvm8-build-errors/+merge/365644
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1823612-llvm8-build-errors.

___
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/bug-1823612-llvm8-build-errors into lp:widelands

2019-04-09 Thread hessenfarmer
BTW: what was the reason for change the Program result code, as the previous 
revision did already compile with clang 8?
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1823612-llvm8-build-errors/+merge/365644
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1823612-llvm8-build-errors.

___
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/bug-1823612-llvm8-build-errors into lp:widelands

2019-04-09 Thread TiborB
Yes, it is obviously a typo but I suggest not to touch it unless it is followed 
by some training. BTW, I plan to came return and spend some time on AI in about 
two months
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1823612-llvm8-build-errors/+merge/365644
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1823612-llvm8-build-errors.

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

2019-04-09 Thread kaputtnik
kaputtnik has proposed merging 
lp:~widelands-dev/widelands-website/screshot_ordering into lp:widelands-website.

Commit message:
Allow ordering of screenshots by applying a new database column.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1823634 in Widelands Website: "Allow reordering of screenshots"
  https://bugs.launchpad.net/widelands-website/+bug/1823634

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands-website/screshot_ordering/+merge/365763

Add a new database column 'position' to the model of wlscreens_screenshot. This 
makes it possible to reorder the screenshots after uploading.

In the admin page a list of screenshots is added to a category. E.g. clicking 
on Category 'Build 20' all screenshots for 'Build 20' will be listet. One can 
edit (upload, change) the screenshots in this list. So one don't have to edit 
each screenshot by its own.

Removed: url for displaying screenshots by one category, which leads only into 
a 404.

Changed: Replaced the view function with a django class based view.

I thought also to have the screenshot list paginated, to speed up loading time, 
but i didn't found a good solution to display the pagination bar. This can be 
done later on.

To get this in:
merge the branch
run: ./manage.py migrate
restart the website
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands-website/screshot_ordering into lp:widelands-website.
=== modified file 'wlscreens/admin.py'
--- wlscreens/admin.py	2016-12-13 18:28:51 +
+++ wlscreens/admin.py	2019-04-09 18:52:10 +
@@ -4,11 +4,14 @@
 from models import Category, Screenshot
 from django.contrib import admin
 
-
+class ScreenshotsInline(admin.TabularInline):
+model = Screenshot
+
 class CategoryAdmin(admin.ModelAdmin):
 prepopulated_fields = {'slug': ('name',)}
 search_fields = ['name']
 list_display = ['name']
+inlines = [ScreenshotsInline,]
 
 admin.site.register(Category, CategoryAdmin)
 

=== added file 'wlscreens/migrations/0002_auto_20190409_0924.py'
--- wlscreens/migrations/0002_auto_20190409_0924.py	1970-01-01 00:00:00 +
+++ wlscreens/migrations/0002_auto_20190409_0924.py	2019-04-09 18:52:10 +
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.20 on 2019-04-09 09:24
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+dependencies = [
+('wlscreens', '0001_initial'),
+]
+
+operations = [
+migrations.AlterModelOptions(
+name='screenshot',
+options={'ordering': ['position']},
+),
+migrations.AddField(
+model_name='screenshot',
+name='position',
+field=models.IntegerField(blank=True, default=0, help_text=b'The position inside the category', null=True),
+),
+]

=== modified file 'wlscreens/models.py'
--- wlscreens/models.py	2019-03-31 11:08:21 +
+++ wlscreens/models.py	2019-04-09 18:52:10 +
@@ -35,9 +35,6 @@
 
 return super(Category, self).save(*args, **kwargs)
 
-def get_absolute_url(self):
-return reverse('wlscreens_category', kwargs={'category_slug': self.slug})
-
 def __unicode__(self):
 return u"%s" % self.name
 
@@ -65,35 +62,54 @@
 editable=False,
 storage=OverwriteStorage(),
 )
-comment = models.TextField(null=True, blank=True)
-category = models.ForeignKey(Category, related_name='screenshots')
+comment = models.TextField(
+null=True,
+blank=True
+)
+category = models.ForeignKey(
+Category,
+related_name='screenshots'
+)
+position = models.IntegerField(
+null=True,
+blank=True,
+default=0,
+help_text='The position inside the category',
+)
 
 class Meta:
 unique_together = ('name', 'category')
+ordering = ['position',]
 
 def save(self, *args, **kwargs):
 # Open original screenshot which we want to thumbnail using PIL's Image
 # object
-image = Image.open(self.screenshot)
-
-# Convert to RGB if necessary
-if image.mode not in ('L', 'RGB'):
-image = image.convert('RGB')
-
-image.thumbnail(settings.THUMBNAIL_SIZE, Image.ANTIALIAS)
-
-# Save the thumbnail
-temp_handle = StringIO()
-image.save(temp_handle, 'png')
-temp_handle.seek(0)
-
-# Save to the thumbnail field
-suf = SimpleUploadedFile(os.path.split(self.screenshot.name)[-1],
- temp_handle.read(), content_type='image/png')
-self.thumbnail.save(suf.name + '.png', suf, save=False)
-
-# Save this photo instance
-super(Screenshot, self).save(*args, **kwargs)
+try:
+image = Image.open(self.screenshot)
+
+# Convert to RGB if necessary
+ 

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1823612-llvm8-build-errors into lp:widelands

2019-04-09 Thread hessenfarmer
Found at least one questionable change in ai code see inline.
needs intensive testing of programs especially for the mines

Diff comments:

> 
> === modified file 'src/ai/defaultai.cc'
> --- src/ai/defaultai.cc   2019-03-24 13:13:34 +
> +++ src/ai/defaultai.cc   2019-04-09 17:16:30 +
> @@ -5458,10 +5455,9 @@
>   inputs[14] = (bo.current_stats - 50) / 10;
>   inputs[15] = 
> management_data.get_military_number_at(123) / 10;
>   inputs[16] = 0;
> - inputs[17] = (inputs_on_stock) ? 0 : -2;
> + inputs[17] = (inputs_on_stock) ? 0 : -4;
>   inputs[18] = (suppliers_exist) ? 0 : -3;
> - ;
> - inputs[17] = (inputs_on_stock) ? 0 : -4;
> + // Nothing on inputs[19]

I am pretty certain that this had been a typo writing [17] instead of [19]

>   inputs[20] =
>  (mines_per_type[bo.mines].in_construction + 
> mines_per_type[bo.mines].finished == 1) ?
> 3 :


-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1823612-llvm8-build-errors/+merge/365644
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1823612-llvm8-build-errors.

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

2019-04-09 Thread Klaus Halfmann
Review, found so far:
* restructered the sound directory wihht more subdirectories
* Help now shows --nosoundStarts the game with sound disabled.
* Using FXset one could have different soundscapes for testing or scenarions, 
interesting
* I assuem the random must be a _local_ random, as sounds are per player.
* More coommetns please, see inline comments

For the wishlist: a helpscreen explainng the sounds :-)

Checekd upto "TODO(GunChleoc): Compatibility code to avoid getting bug reports 
about unread sections. Remove after Build 21." sorry can nott do more tonight



Diff comments:

> 
> === modified file 'src/economy/road.h'
> --- src/economy/road.h2019-02-27 17:19:00 +
> +++ src/economy/road.h2019-04-09 04:52:18 +
> @@ -131,8 +131,7 @@
>   void cleanup(EditorGameBase&) override;
>  
>   void draw(uint32_t gametime,
> -   TextToDraw draw_text,
> -   const Vector2f& point_on_dst,
> +   TextToDraw draw_text, const Vector2f&, const Coords&,

mmh, i like those named varibales better, Now I must guess what "const Coords&" 
may be used for?

> float scale,
> RenderTarget* dst) override;
>  
> 
> === modified file 'src/editor/editorinteractive.cc'
> --- src/editor/editorinteractive.cc   2019-02-27 17:19:00 +
> +++ src/editor/editorinteractive.cc   2019-04-09 04:52:18 +
> @@ -405,6 +405,10 @@
>   is_painting_ = false;
>  }
>  
> +bool EditorInteractive::player_hears_field(const Widelands::Coords&) const {

Did I tell you, that I like comments?

> + return true;
> +}
> +
>  void EditorInteractive::on_buildhelp_changed(const bool value) {
>   toggle_buildhelp_->set_perm_pressed(value);
>  }


-- 
https://code.launchpad.net/~widelands-dev/widelands/cleanup-soundhandler/+merge/365001
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/cleanup-soundhandler 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/bug-1823612-llvm8-build-errors into lp:widelands

2019-04-09 Thread GunChleoc
Review: Resubmit

This is ready for review now, targeted at Build 20.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1823612-llvm8-build-errors/+merge/365644
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1823612-llvm8-build-errors.

___
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/bug-1823612-llvm8-build-errors into lp:widelands

2019-04-09 Thread bunnybot
Continuous integration builds have changed state:

Travis build 4702. State: passed. Details: 
https://travis-ci.org/widelands/widelands/builds/517666765.
Appveyor build 4488. State: success. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1823612_llvm8_build_errors-4488.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1823612-llvm8-build-errors/+merge/365644
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1823612-llvm8-build-errors 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/territorial_unify_notifications into lp:widelands

2019-04-09 Thread bunnybot
Continuous integration builds have changed state:

Travis build 4698. State: errored. Details: 
https://travis-ci.org/widelands/widelands/builds/517401116.
Appveyor build 4484. State: success. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_territorial_unify_notifications-4484.
-- 
https://code.launchpad.net/~widelands-dev/widelands/territorial_unify_notifications/+merge/362502
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/territorial_unify_notifications 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-website/mv_main_files into lp:widelands-website

2019-04-09 Thread kaputtnik
This is merged and deployed. Now we can definitely work on porting to python3 :)

I had to change the init-file to let gunicorn find the moved file 
wlwebsite_wsgi.py
-- 
https://code.launchpad.net/~widelands-dev/widelands-website/mv_main_files/+merge/365634
Your team Widelands Developers is subscribed to branch lp:widelands-website.

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

2019-04-09 Thread noreply
The proposal to merge lp:~widelands-dev/widelands-website/mv_main_files into 
lp:widelands-website has been updated.

Status: Needs review => Merged

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

___
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