49903 Commits

Author SHA1 Message Date
Mark de Wever
9ebb260d01 Add config::has_child().
This allows to easily query whether a certain child exists.
2012-05-20 09:56:13 +00:00
Mark de Wever
018ff27c62 Fixes a GCC warning in a better way.
It replaces 2012-05-19T21:30:22Z!shadowm@wesnoth.org. It also adds a generic warning for unreachable code.
2012-05-20 09:56:10 +00:00
Mark de Wever
0ef2b762ef Add clang 3.0 compiler fixes.
The clang compiler was not happy with the uages of the enumerate stream
operator macros. This minor change makes clang happy again.
2012-05-20 09:56:07 +00:00
Mark de Wever
cefb8ee330 Add hint for the compiler that FAIL is a failure.
In some contexts the compiler may warn since the wml_exception has no
attribute indicating it will never return. The answer is throwing a
dummy exception.
2012-05-20 09:56:05 +00:00
Elvish_Hunter
276faf7956 Removed the remaining instances of 'okay' and lower-caps 'ok'...
...from mainline campaigns, as pointed by Espreon
2012-05-20 09:53:12 +00:00
Mark de Wever
4ed714ea78 Move tconst_clone to its own file.
This allows code outside of the gui code to use it as well.
2012-05-20 09:26:19 +00:00
Ignacio R. Morelle
a46cc6ed2a Various indentation/spacing fixes for the players_changelog 2012-05-20 08:33:08 +00:00
Ignacio R. Morelle
071bd055bd Add changelog entries for the Add-ons help section,
...and update players_changelog

All of the add-on client changes mentioned in the full changelog affect
the UI, so all of them have been copied over.
2012-05-20 08:25:08 +00:00
Ignacio R. Morelle
7d44fc73b5 addon/mg: Update changelog 2012-05-20 08:14:19 +00:00
Ignacio R. Morelle
f4e5f7b1da addon/mg: Improve display of long add-on titles and authors in the main list
* Long titles now can get word-wrapped up to a limit of two lines (after
   which they are truncated). This allows to display "Invasion from the
   Unknown" at 800x480 without truncating it at "Un" (20 characters).
   The horizontal limit for word-wrapping is 150 pixels.

 * Author names are now truncated at 14 characters instead of 16, adding
   an ellipsis if necessary to suggest the possibility of reading the
   full name elsewhere (in this case, in the Description window).
2012-05-19 23:03:49 +00:00
Ignacio R. Morelle
c5b9288dda addon/mg: Include add-on status lines below their titles in the add-ons list
This replaces the previous color-keyed items approach with color-keyed
status lines, as well.

Additionally, tweaked the color-keying logic.
2012-05-19 21:30:59 +00:00
Ignacio R. Morelle
c5c5993e1f gui2: Prevent "control reaches end of non-void function" warning on gcc 4.7
This is a quick fix and mordante should review it later.

gcc 4.7 doesn't seem to be happy with gui2::tplacer_::build()'s switch
statement and appears to expect more cases despite
gui2::tplacer_::tgrow_direction doesn't have more members. The warning
in question:

  src/gui/auxiliary/placer.cpp:43:1: error: control reaches end of non-void function [-Werror=return-type]
2012-05-19 21:30:22 +00:00
Nils Kneuper
2e813ed5b3 updated Galician translation 2012-05-19 21:02:12 +00:00
Steven Panek
0d84d6028a Pass two for improvements on the add-ons help section.
Thanks to Alarantalara for suggestions and input.
2012-05-19 21:00:54 +00:00
Ignacio R. Morelle
e7756f5766 gui2/taddon_description: "Outdated in the server" -> "Outdated on server" 2012-05-19 20:33:42 +00:00
Ignacio R. Morelle
eff649a7cf gui2/taddon_description: Tweak status lines for Published add-ons
Instead of displaying just "Published" for a published add-on regardless
of whether it is installed or not, display "Published, not installed"
when it isn't. This is a rarer situation than a published add-on being
installed, hence we don't need a "Published, installed" status line.
2012-05-19 20:33:22 +00:00
Mark de Wever
72126809c1 Use the new tplacer_ class in the pane.
Used for both placement and size. The value is hard-coded at the moment,
but other settings have been tested.

The code is used to experiment with a different approach of the
implementation of a listbox.
2012-05-19 20:33:10 +00:00
Steven Panek
57a8fab097 Pass one for improvements on the add-ons help section. 2012-05-19 20:07:20 +00:00
Mark de Wever
3c66f576d4 Adds helper code to assist in widget placement.
The code is used to experiment with a different approach of the
implementation of a listbox.
2012-05-19 20:06:35 +00:00
Mark de Wever
2d9f94398d Adds code for writing enumerate stream operators.
The code has been copy-pasted from another project I've been working on, with
some minor adaptions to compile with Wesnoth:

- Removed dependency on C++11 and use the support in boost instead.

- Changed the error reporting to use the Wesnoth code.
2012-05-19 20:02:59 +00:00
Ignacio R. Morelle
4282b64c43 Remove declaration of an external that isn't defined anywhere 2012-05-19 20:01:40 +00:00
Mark de Wever
cd5bc7f11a Added FAIL and FAIL_WITH_DEV_MESSAGE macros.
These macros allow to throw an wml_exception without any condition. This
can be used when a code path is reached that should be unreachable with
valid WML.
2012-05-19 19:35:44 +00:00
Fabian Müller
050cff18a7 patch #3270 Fix for bug #19120 2012-05-19 15:57:33 +00:00
Steven Panek
11254903b9 Updated the Ukrainian translation. 2012-05-19 15:03:35 +00:00
Ignacio R. Morelle
3037876524 addons/help: Mention the possibility of sorting the add-on list...
...by clicking on the column headers

Evidence suggests that either this has never been an obvious feature or
people have a strange obsession with downloading the first entries
before trying out the rest. It's not visually obvious, anyway, so we
might as well mention it.
2012-05-19 11:02:25 +00:00
Silas Brill
653fa89d7a Made unit_mover and animation_unit_placer inherit from boost::noncopyable 2012-05-19 10:50:42 +00:00
Ignacio R. Morelle
36e9fd78cc addon/mg: Horrible, horrible hack to ensure the add-ons list (GUI1)...
...is naturally sorted by titles rather than case-sensitive ids

This is quite a hack and it's only here in case I don't figure out a
better solution later before 1.11.0 (or get hit by a truck). It works
and that's all that matters here nowadays, anyway.

The problem this solves is basically the following:

 * The internal add-ons list is sorted by id (case-sensitively)

 * The add-ons list in GUI1 is unsorted by default, following the row
   insertion order

 * The row insertion order is that of the internal add-ons list iterator order

 * Sorting rows by title isn't possible because of the Publish/Delete entries

 * Many add-ons have titles that don't reflect their ids at all, not to
   mention that users obviously would prefer case-insensitive sorting.

A quite better solution would be to have the add-ons list take care of
all this by itself, but I haven't figured out a way yet short of
implementing a whole custom class for it (which could actually turn out
to be more efficient by getting rid of the id duplication) with
specialized iterators.
2012-05-19 10:44:14 +00:00
Ignacio R. Morelle
feceecb5e2 addon/client: Mark addons_client class as noncopyable 2012-05-19 09:13:41 +00:00
Ignacio R. Morelle
64a34fb5b7 addon/info: Remove trivial copy constructor, make remaining single-argument constructor explicit 2012-05-19 09:13:28 +00:00
Elvish_Hunter
a129e14874 [find_path]: fixed this_unit not being restored in certain situations 2012-05-19 08:49:45 +00:00
Mark de Wever
283653b31b Fix a bug in the new tcontrol constructor.
The constructor called a virtual function in it's constructor, which is
not a good idea, even worse it was pure virtual in the control class.
2012-05-19 08:46:20 +00:00
Mark de Wever
77e6286c0a Let the tcontrol use the new twidget constructor. 2012-05-19 08:46:17 +00:00
Mark de Wever
ff08f9dd5b Add a second constructor for twidget.
This constructor takes a builder object to do its building.
2012-05-19 08:46:15 +00:00
Mark de Wever
b734f7bf0e Made the id for a tooltip and helptip mandatory.
The change was already planned for 1.9.7.
2012-05-19 08:46:12 +00:00
Mark de Wever
8814152e92 Move the widget fields to the widget class.
Some fields of the tbuilder_control are actually part of the twidget
class. These are now moved to the tbuilder_widget.

Some of these fields were also used in the tbuilder_grid and are moved
likewise. This means the tbuilder_grid now has some extra fields for
debugging. (`Inherited' from the tbuilder_control.)
2012-05-19 08:46:07 +00:00
Elvish_Hunter
a45f9381b9 SotBE: fixed two variable checks in Back Home. Fixes bug #19686 2012-05-19 08:39:46 +00:00
Elvish_Hunter
691bbbed8b SotBE::8: Kapou'e talks differently if he kills the first Elf;
...also, the messages can be translated depending on the Elf's
gender. Fixes bug #19684
2012-05-19 08:34:17 +00:00
Elvish_Hunter
5bcacb91b3 SotBE: got rid of the last remaining OK from mainline campaigns 2012-05-19 08:23:13 +00:00
Mark de Wever
b5abdaf520 Remove the unused tbuilder_gridcell class. 2012-05-19 07:17:14 +00:00
Alexander van Gessel
4d0e232a03 Revert "Made turn refresh (healing, poison, etc.) occur...
...on first turn of game"

This reverts commit 2012-04-24T02:55:45Z!brilliand@gmail.com.
2012-05-18 22:45:50 +01:00
Ignacio R. Morelle
bdbd6150c2 gui1, gui2: Rename "Reselect difficulty" option to "Change difficulty"
This affects both internal ids and symbols and translatable strings.
2012-05-18 20:11:11 +00:00
Steven Panek
12d685d176 Updated the Ukrainian translation. 2012-05-18 19:17:16 +00:00
Steven Panek
84d9f5367c Updated the Latin translation. 2012-05-18 10:28:15 +00:00
Steven Panek
20265cb464 Updated the Old English translation. 2012-05-18 10:27:15 +00:00
Nils Kneuper
6020b98c0a updated Russian translation 2012-05-18 06:53:52 +00:00
Anonymissimus
179190bdc1 changelogs update 2012-05-17 20:07:16 +00:00
Anonymissimus
e3249b12ef let play_controller::player_number_ have the last side's side_number
after the loop over the sides' turns. (fix for bug #19735)
2012-05-17 20:07:06 +00:00
Anonymissimus
ffbac7f0c8 add an assert (bug #19735)
to ensure we notice out-of-bounds access
2012-05-17 20:06:54 +00:00
Nils Kneuper
e7e9ae0327 updated Chinese (Simplified) translation 2012-05-17 19:34:37 +00:00
Mark de Wever
3abebe12f3 Add a second constructor to tcontrol.
This constructor sets its state based on the structure send to it
instead of using a second call that sets the fields later.

The code is used to experiment with a different approach of the
implementation of a listbox.
2012-05-17 16:22:00 +00:00