Backticks as shortcut for repr() are removed from Python 3. Although all their usages were already commented out, I fixed it anyway in case the code is uncommented.
Also fixes the toggle panels that show the addons description and the filter
textbox in the non new-widgets codepath.
These changes mostly effect the non new-wigets codepath. The new-widgets
codepath (which already had a sorting feature) still works like before
except that it was adjusted to the changes to the cfg file.
The dialog is not tested currently, which causes the GUI2 unit test to
fail (imagine that). Since the class constructor requires a hefty amount
of fluff to work (in particular, a display_context object), might as
well just disable it for the time being.
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.
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'.
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.
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.
- 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
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.
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
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.
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.