If an action could not be undone, it makes no sense to "redo" it, and
vice-versa.
(In particular, certain movement undos produce a message stating
"Possible abuse of [allow_undo]" without crashing, but then redoing
that move caused an assertion failure before this change.)
Until now there was only a single, verbose prompt for the .pbl case.
Since people may use a VCS to contribute to an add-on without having a
.pbl file, that case is also now covered by this commit.
There's a single prompt with a list of sensible content that might be
"permanently lost" on installation. The list may contain VCS or .pbl
files for now, but perhaps at some point in the future someone might
want to make it into a full list of extra files or something.
...and elaborate on their state in gui2::taddon_description instead
This means they get both the "Installed" (or "Published") line, and the
green highlight. gui2::taddon_description displays their detailed status
as "not tracking local version". This approach seems sensible since we
have limited space for the status line in the GUI1 Add-ons Manager
dialog.
As a side effect there's a hypothetical "Unknown" status line that's
only there to keep gcc 4.7 happy.
- add new files
- remove HAS_ITERATOR_DEBUGGING=0 define, since the functionality is
too useful and it should be _HAS_ITERATOR_DEBUGGING with a leading _
This happens rather often in valid code as well, so make it debug
messages. But at least in debug mode it's possible to get more
information regarding the missing child.
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.
* 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).
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]
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.
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.
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.
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.
...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.
...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.