61796 Commits

Author SHA1 Message Date
Ignacio R. Morelle
74a81069b9 Merge pull request #447 from CelticMinstrel/master
Interface to fine-tune displayed labels (and some other label stuff)
2015-08-08 01:29:15 -03:00
Celtic Minstrel
f619b4cc63 Update build stuff
(Sconscript, CMakeLists, tests, project files)
2015-08-07 22:50:34 -04:00
Celtic Minstrel
e130a960cb Update credits and changelog 2015-08-07 22:50:24 -04:00
aquileia
79b7bf1777 Windows Installer: Update icons 2015-08-08 04:24:01 +02:00
aquileia
d8b5e7b3c1 Windows installer: Remove userdata dir selection
Due to UAC, especially virtualization of the Programs directory, it is preferable to force 'My Games' as the location.
2015-08-08 03:53:05 +02:00
aquileia
c7ffe8dfd7 Windows installer: Update to NSIS 3
Compatibility changes:
- Plugins moved to a different directory

New Features:
- Unicode installer
- Could now detect Windows 8 - 10
2015-08-08 03:53:05 +02:00
aquileia
4a272b301d Windows installer: Use FILE /oname to avoid copying files 2015-08-08 03:53:04 +02:00
aquileia
1c3fa278ff Windows installer: Cut down on shortcuts
From the impressive number of 9 start menu shortcuts, 2 were removed.

An additional 4 were removed for Windows 8, where the app list can't collapse folders.
2015-08-08 03:53:04 +02:00
aquileia
12066d87c5 Windows Installer: Translate 'Battle for Wesnoth' and shortcuts
The title is now localized, as are the start menu shortcuts. As localized
titles can be longer than the English string, a third line was explicitly
added to the welcome page (else NSIS cuts the line in half).

The manual shortcut points to the translated manual version, if available.

Due to lack of Unicode support in NSIS 2, only translations matching the
codepage are displayed correctly.

The desktop.ini file isn't removed during uninstallation as it may contain
info on other programs, e.g. if the player chose to place the shortcuts in
'Games'.
2015-08-08 03:53:04 +02:00
aquileia
46af40eb61 Windows Installer: Add GPL translations
Source:
https://www.gnu.org/licenses/old-licenses/gpl-2.0-translations.html
http://www.gnu.org/licenses/translations.html

Changes:
- Links to the English original added in the headers.
- Portuguese translations reindented to fit width of textbox.
- Reference between Chinese GPLs removed.
- UTF8 BOM added (else NSIS doesn't recognize the encoding).

Thanks to @chisquare130 (Xara) for checking the Chinese versions.
2015-08-08 03:53:03 +02:00
aquileia
01dfc6783f Windows installer: Remove components page
We only have one module anyways, thus there's no choice in the component selection menu.
2015-08-08 03:53:03 +02:00
Celtic Minstrel
d657c30a50 Labels from players in your ignore list default to hidden 2015-08-07 19:24:07 -04:00
Celtic Minstrel
af3eae9d0b Assign a label category to village names 2015-08-07 18:54:25 -04:00
Celtic Minstrel
e2a0648a15 Use team colors for player label categories 2015-08-07 18:54:13 -04:00
Celtic Minstrel
819eab2f96 Add dialog to allow user to customize which label groups are displayed 2015-08-07 16:44:50 -04:00
gfgtdf
d87b8457ed Merge pull request #446 from gfgtdf/sortable_listbox
sortable gui2 listboxes
2015-08-07 13:52:20 +02:00
gfgtdf
a4806343f5 sortable listboxes for gui2
Fixes http://gna.org/bugs/index.php?23751

Gui2 listboxes can now be sorted. As an example how to use it i changed the
gui2 loadgame dialog to use this new feature.

To make your listbox sortable you have to add togglebuttons/panels with the
id sort_n where n is a number in [0, numer_of_columns) to the [header] of
the listbox, then the listbox will be sorted when a user clicks on that
togglebutton/panel. Also you have to register the comparision functions for
each column with listbox::set_column_order.

Alternatively you can sort the listbox manually by calling listbox::order_by

This feautre still suffers from http://gna.org/bugs/?15763 . But for small
listboxes without scrollbars this is already a good feature.
2015-08-07 13:02:28 +02:00
gfgtdf
1359e6a885 tristate buttons for gui2
This commit adds the c++ code to add tristate buttons: toggle_buttons and
toggle_panels can now have an arbitrary number of states instead of just 2
(selected and not selected). The number of states is determined by the number
of [state] tags in the widgets definition.

This doesn't add tristate definitions yet, but the plan is to use tristate
buttons later for the headers of sortable lists (No-Sort, Sort-Up, Sort-Down
buttons)

TODO: figure out whether to remove the parameter from tcontrols constructor.
2015-08-07 13:00:49 +02:00
Celtic Minstrel
1c578590e1 Add sliders to set colour of label in map editor
- Needs work, not very user-friendly in my opinion
2015-08-06 23:43:16 -04:00
Celtic Minstrel
af6d3060e2 Add new "category" and "creator" properties to map labels
- The "category" property is mainly for use by scenario designers; players will be able to hide labels based on this
- The "creator" property is meant to allow players to hide labels placed by specific other players
- Map editor allows setting the "category" property
2015-08-06 23:27:11 -04:00
Elvish_Hunter
2559f97063 wmlscope: slightly improved percentage output when checking for untyped formals 2015-08-07 00:06:54 +02:00
Elvish_Hunter
63863d9f2f wmlscope: enabled image size checks
The undersized() function is supposed to warn if an image has a size below 60 x 60 pixels. I didn't manage to find any documentation about why it was commented out.
I also replaced the error message printed if the PIL library is missing with one more verbose and updated.
2015-08-07 00:04:34 +02:00
Elvish_Hunter
4d675c377f All main wml tools: used Python 3 floating point division
wmltools required integer division, so here the corresponding operator (//) is used
2015-08-06 23:49:40 +02:00
Elvish_Hunter
be62976d80 wmltools and wmlscope: fixed .keys() usages for Python 3
Most usages of the .keys() method were already safe, because they were either iterated only once, or they were wrapped in a call to sorted(), which casts them as lists
2015-08-06 23:40:48 +02:00
Elvish_Hunter
c407625ad3 wmllint: fixed .keys() usages for Python 3
In most cases, calls to the .keys() method were unnecessary, because they were used to test if a dictionary has a key; this can be done by simply using the 'in' operator on the dictionary itself.
2015-08-06 23:33:59 +02:00
Elvish_Hunter
032609e782 wmlscope: clearer message when checking for duplicated files
For now, I'm keeping the MD5 hashes in the message.
2015-08-06 23:21:20 +02:00
Elvish_Hunter
bb51399d26 wmltools: shorten code by using sorted() instead of .sort() 2015-08-06 23:16:48 +02:00
Elvish_Hunter
889eb5aa7b wmllint: fixed a bug in spellchecking caused by Python 3 map()
This bug prevented local spelling words from being added to the spellchecking dictionary, and it was caused by the fact that the map iterator was never iterated.
Replaced with an explicit for cycle.
2015-08-06 23:13:47 +02:00
gfgtdf
6cc2c93853 Better errormessage when failing to read schema.cfg 2015-08-06 15:03:32 +02:00
aquileia
4e4fdd0504 manual: Clean up localized files
Also, apply two commits for the LoW map overlays that were only committed
to 1.12.
2015-08-06 15:01:41 +02:00
Elvish_Hunter
6c4ceacb00 wmlscope: fixed a copy-pasting error 2015-08-05 22:13:10 +02:00
Elvish_Hunter
8c098c3264 wmlscope: refactored collision detection
This fixes the breakage caused by the Python 3 zip() function, which like all generators may be iterated only once; also, it finally returns a meaningful output, instead of the obscure list of filenames which was formerly returned
2015-08-05 20:38:49 +02:00
Elvish_Hunter
c1a783b038 all main wml tools: use filter(), map() and zip() from Python 3
The main difference is that these functions return generators instead of lists. This actually breaks wmlscope's collision detection, which will be fixed in my next commit.
2015-08-05 20:38:48 +02:00
Elvish_Hunter
6d67feff9f wmlscope and wmltools: removed calls to cmp() function
Just like the __cmp__ method, the cmp() function isn't available on Python 3
2015-08-05 20:38:48 +02:00
Elvish_Hunter
ad3631419c wmltools and wmliterator: removed __cmp__ method
The __cmp__ method isn't supported any more by Python 3.
Instead, one should define the six usual comparison methods, or define only two of them and let the @total_ordering decorator handle the rest
2015-08-05 20:38:48 +02:00
Elvish_Hunter
778e9296d8 wmlscope: fixed files being incorrectly opened as UTF8 instead of binary 2015-08-05 20:38:48 +02:00
Elvish_Hunter
90919e12c6 wmllint, wmlindent, wmltools: fixed dir being used as variable name
In Python, dir is an in-built function
2015-08-05 20:38:48 +02:00
gfgtdf
39ffd1e37d Merge pull request #441 from gfgtdf/lua_random
Add wesnoth.random and sync helper.shuffle
2015-08-04 23:33:13 +02:00
gfgtdf
0038448fcb make helper.shuffle synced
using helper.shuffle now doesn't casue OOS anymore used. It is possible
to get the old behaviour by passing math.random as a second parameter.
2015-08-04 22:36:54 +02:00
gfgtdf
2cd2cf47c0 add wesnoth.random lua function
wesnoth.random has the same interface as math.random. So it can
substitute that function easily.
2015-08-04 22:36:52 +02:00
gfgtdf
f5c64af8de use mt19937 also in default random generator
previously rng::next_random_impl() returned rand() which is in range
1-2^16. so random_new::generator->next_random() would return a number
1-2^16 in unsynced context and a number in 1-2^32 in synced contexts.
Now it always returns a number in 1-2^32.
2015-08-04 20:25:50 +02:00
lipk
5aab187ee6 Merge pull request #437 from aginor/sdl2
Make the game compile with SDL2.
2015-08-04 16:12:28 +02:00
gfgtdf
8c9416cfaf fix msvc compiler warning. 2015-08-04 16:00:45 +02:00
aquileia
f3ee4548fb Merge pull request #442 from pquentin/travis-wait
Prefix `apt-get -qq  with `travis_wait` to fix timeout
2015-08-04 14:27:17 +02:00
Andreas Löf
f0613f48bd Remove defunct code.
This removes code that relied on the defunct class ttexture. Since it will not be reintroduced it is instead removed completely.
2015-08-04 22:59:45 +12:00
Elvish_Hunter
499866323b GUI.pyw: fixed an obscure bug triggered by Unicode literals 2015-08-04 10:07:59 +02:00
Elvish_Hunter
cebfbba68e wmllint and wmlscope: fixed encoding declarations 2015-08-04 10:07:59 +02:00
Elvish_Hunter
eaf6a9bd09 wmltools: fixed MD5 hashing not working with UTF-8 2015-08-04 10:07:58 +02:00
Elvish_Hunter
005337ec33 wmltools: use print function 2015-08-04 10:07:58 +02:00
Elvish_Hunter
5149be176c wmliterator: used print function 2015-08-04 10:07:58 +02:00