55484 Commits

Author SHA1 Message Date
Ignacio R. Morelle
29f08abd6f gui2/taddon_description: Let the description area grow horizontally
Let it grow to fill the space available when it's greater than the
description box's requested size (e.g. for very short descriptions).
2014-02-14 05:07:31 -03:00
Ignacio R. Morelle
5fdadffaa4 Move hotkey/hotkey_preferences_display.cpp from libwesnoth.a to main sources
Oops.
2014-02-14 03:38:05 -03:00
Ignacio R. Morelle
1916898d01 scons: hotkey/hotkey_preferences_display.cpp is not special
The only reason game_preferences_display.cpp receives special
considerations is that it depends on a preprocessor symbol that we don't
want to trigger a full rebuild every time the relevant scons option is
changed. hotkey_preferences_display.cpp does not use that symbol
(WESNOTH_PREFIX).
2014-02-14 03:34:37 -03:00
Ignacio R. Morelle
e829d32464 Update RELEASE_NOTES 2014-02-13 23:59:34 -03:00
Ignacio R. Morelle
c3895f0a1a Update changelog for the WML error report improvements 2014-02-13 23:58:15 -03:00
Ignacio R. Morelle
30200a012c Move rules for trash terrains up to where they belong in terrain-graphics.cfg 2014-02-13 22:57:18 -03:00
Ignacio R. Morelle
a21d13f1f4 Refactored trash terrain gfx macros into a separate file, removed TRI prefix
The macro-less portions of these terrain graphics rules are now the
TRASH_A and LITTER_BASE macros. I tried to the best of my ability to
understand how they are supposed to work together, so this is the naming
scheme and parameter set I found to be the most optimal:

    #define TRASH_A TERRAIN PROB IMAGESTEM
        Covers the first and second rules, which are used on a single
        terrain pattern.
    #define LITTER_BASE TERRAIN IMAGESTEM
        Covers the third rule, which affects both trash terrains.
2014-02-13 22:54:06 -03:00
Ignacio R. Morelle
3486ad75d5 Strip optional whitespace in the test scenario's terrain map 2014-02-13 22:31:33 -03:00
Ignacio R. Morelle
cdaf2b14aa Move data/hardwired/tips.cfg to data/tips.cfg
Since the GUI2 titlescreen took over, the path to tips.cfg is not
hard-coded in the engine anymore; in fact, this commit also updates that
path, which is in data/gui/default.cfg.
2014-02-13 22:28:02 -03:00
mattsc
58185947a2 SotBE S14: minor change to dialog
The tone of the original messages just didn’t fit in with the rest of
the scenario and campaign.
2014-02-13 10:10:20 -08:00
mattsc
100c76969d Update Xcode project 2014-02-13 10:00:06 -08:00
mattsc
b45f6591b2 SotBE S13: balancing adjustments to gold and turn number 2014-02-13 09:42:13 -08:00
mattsc
985ff47602 SotBE S13: take half the villages off the map
This is for balancing reasons, to make the scenario a bit harder and
also to make carry-over smaller and more stable.
2014-02-13 09:42:13 -08:00
Ignacio R. Morelle
73583d3e95 Remove empty unused game_instance class and its source files 2014-02-13 10:17:01 -03:00
Ignacio R. Morelle
ca0cdf376d CodeBlocks project update 2014-02-13 10:00:19 -03:00
Ignacio R. Morelle
37af8d2b08 Merge branch 'staging/feature/wml-error-report-improvements' 2014-02-13 06:26:05 -03:00
Ignacio R. Morelle
204b1effd5 parser: Indent error location info on a separate line
> Unexpected characters after variable name (expected , or =) at ~add-ons/Standalone_Addon_4.cfg:1

Becomes:

> Unexpected characters after variable name (expected , or =)
>    at ~add-ons/Standalone_Addon_4.cfg:1

This is mostly intended for consistency with the new preprocessor error
location format.

Additionally, the tokenizer status information displayed when DEBUG is
defined at compile-time has changed slightly:

> $error, value '$value', previous '$previous_value' at $pos

Becomes:

> $error
>     at $pos (value '$value', previous '$previous_value')
2014-02-13 06:24:19 -03:00
Ignacio R. Morelle
95bcf34133 preprocessor: Indent error location info on a separate line
Messages such as:

> Quoted string not terminated at ~add-ons/Foo/bar.cfg
> Macro/file 'FOOBAR' is missing at ~add-ons/Baz/bat.cfg:12 included from ~add-ons/Baz/bag.cfg:2 included from ~add-ons/Baz/ban.cfg:42

Now are formatted as:

> Quoted string not terminated
>     at ~add-ons/Foo/bar.cfg
> Macro/file 'FOOBAR' is missing
>    at ~add-ons/Baz/bat.cfg:12
>    included from ~add-ons/Baz/bag.cfg:2
>    included from ~add-ons/Baz/ban.cfg:42

For messages that include the {} substitution trail, this improves
readability by making the trail a sequence of lines with file locations
rather than a massive opaque and unreadable text wall:

> Macro/file 'FOOBAR' is missing at ~add-ons/After_the_Storm//macros/scenario-segment-implementation.cfg:61 included from ~add-ons/After_the_Storm/base-loader.cfg:6 included from ~add-ons/After_the_Storm/_main.cfg:174 included from ~add-ons/After_the_Storm/base-loader.cfg:75 included from [...]

In fact, it's that particular case that motivated this report format
change. Cases where there is no substitution trail but there is still a
file location pointer are covered by this commit too mainly for the sake
of consistency and readability -- being able to see the last (first)
relevant location pointer first on a separate line should make it easier
to debug most WML issues.
2014-02-13 06:24:18 -03:00
Ignacio R. Morelle
d36e4d7923 gui2/twml_error: Indent single-element WML file lists too 2014-02-13 06:24:18 -03:00
Ignacio R. Morelle
8bacea32cb gui2/twml_error: Additional Doxygen documentation 2014-02-13 06:24:18 -03:00
Ignacio R. Morelle
f540e71f78 gui2/twml_error: Further improvements to the clipboard version of the report
* Add a list of files (missing from a previous commit) if available.
 * Include the post-summary field if available.
 * Indent the detailed report at the end.
2014-02-13 06:24:12 -03:00
Ignacio R. Morelle
9ea586aa27 Add a utils::indent() function to indent a text block with whitespace
It doesn't have any more options because U+0020 SPACE is the standard
character used for WML indentation, and the intended use case requires
fixed-width indentation anyway.
2014-02-13 06:24:03 -03:00
Ignacio R. Morelle
9a38194643 Request delivery of SDL_SYSWMEVENT events on X11 and Win32 early
Fixes the copy button in gui2::twml_error not doing anything on X11 when
used on an instance of the dialog created during the very first
loadscreen sequence before the titlescreen (e.g., when there are errors
in game data files or in unconditionally-included code from _main.cfg
files in add-ons).

Originally (2004ish), the SDL_EventState(SDL_SYSWMEVENT, SDL_ENABLE)
request was done immediately after initializing SDL video. After years
and years of added functionality, it got pushed down to right before
displaying the titlescreen, resulting in most of the loadscreen steps
being executed first.

As a result, attempting to use copy_to_clipboard() on X11 before the
titlescreen appears would result in unusual behavior from the desktop
environment (KDE here) and not really work, because while the original
copy_to_clipboard() call is done and sets the X11 clipboard owner
correctly, there is no SDL_SYSWMEVENT event to receive and handle in
events::pump() through which the actual communication with members of
the X11 neighborhood would happen (the handle_system_event() function in
src/clipboard.cpp); in other words, no clipboard contents could be sent
from Wesnoth when requested by X11 applications.

Of course, this is an X11-specific bug that didn't really affect any
other platforms. The only reason we request SDL_SYSWMEVENT delivery on
Win32 seems to be the notification popups support code introduced in
commit 2fc758377a566ce6a3d6cdd7d30ca5076e8395c0.

The obvious solution is to revert to the original state of the request
in commit 6103d56dae44df74cc816af07355bc5528a9f2f5, where it was last
intentionally changed barring the aforementioned Win32-specific change
above. It was then set to be done right after initializing the
cursor::manager, right after initializing video, so that's what we
should probably do now.
2014-02-13 06:24:03 -03:00
Ignacio R. Morelle
e4bed0ce96 gui2/twml_error: Add a button to copy the WML error report to clipboard 2014-02-13 06:24:03 -03:00
Ignacio R. Morelle
798c7402f1 gui2/twml_error: Add a post_summary field for advice on reporting add-on errors 2014-02-13 06:24:02 -03:00
Ignacio R. Morelle
9eeab249d1 gui2/twml_error: Limit maximum dialog size to 600x600 for readability 2014-02-13 06:24:02 -03:00
Ignacio R. Morelle
91e843a404 Push WML load errors into a vector before displaying, change format
The previous format had explicit line breaks after each error put into
the stringstream, which resulted in having to change every error
insertion site to change the overall report format. Now we don't insert
explicit line breaks, and instead join the vector at the very end with
two line breaks between each item for a cleaner presentation.

This also gets rid of a single trailing line break that was appearing at
the end of the report in all cases.
2014-02-13 06:24:02 -03:00
Ignacio R. Morelle
b88c8a0437 Issue WML load error reports to stderr immediately instead of queueing them
This way the format for the big unified report can be changed for the
GUI without affecting the stderr version, especially with regards to
where we place line breaks and such.
2014-02-13 06:24:02 -03:00
Ignacio R. Morelle
2659dfcb9d gui2/twml_error: Use the description scroll_label variant for the report 2014-02-13 06:24:02 -03:00
Ignacio R. Morelle
dd61db47c8 Replace gui2::tmessage with gui2::twml_error for reporting WML load errors
Note:

The hotkey/hotkey_command.hpp include is necessary to avoid build-time
errors. It was previously included through gui/dialogs/message.hpp <-
gui/widgets/control.hpp <- gui/widgets/widget.hpp <-
gui/auxiliary/event/dispatcher.hpp <- hotkey/hotkey_command.hpp.
2014-02-13 06:24:02 -03:00
Ignacio R. Morelle
585eede3a9 gui2/twml_error: Use real add-on names from _info.cfg when available 2014-02-13 06:23:55 -03:00
Ignacio R. Morelle
5934124cf5 gui2/twml_error: Replace add-on base paths with synthetic add-on names
Paths like "/home/shadowm/.wesnoth-1.11/data/add-ons/After_the_Storm/_main.cfg"
aren't very appealing to read at the start of the error message,
considering that the WML-canonical form of the path (~add-ons/.../_main.cfg)
is provided in the detailed error report later on in the same dialog.

So, in order to make the report tidier, print only the synthetic name of
the add-on guessed from the file path ("Foo Bar" for
.../data/add-ons/Foo_Bar/_main.cfg and .../data/add-ons/Foo_Bar.cfg).
2014-02-13 06:23:54 -03:00
Ignacio R. Morelle
458b36d007 gui2/twml_error: Handle an optional list of faulty files separately
This allows us to be more self-contained and require less logic in the
instantiation site for preparing the report for display.

This requires adding a new row and label for displaying the list of
faulty files, which will be hidden when the list is empty or not
provided in the display() static member function.
2014-02-13 06:23:46 -03:00
Ignacio R. Morelle
9b26df2dbb parser: Don't include extra tokenizer state information in parser::error()
Information about the current state of the tokenizer isn't really useful
to pretty much everyone dealing with WML parser errors, so keep that
unnecessary and confusing verbosity restricted to builds with the DEBUG
symbol (?) defined.

("Pretty much everyone" == users)

Partially reverts commit d6d1e7df2e485e0ee2469548a4fd05ce20b69ac4, which
introduced the extra state information.
2014-02-12 04:16:57 -03:00
Ignacio R. Morelle
d5a34a1460 gui2/twml_error: New GUI2 dialog to be used for WML parser/pp errors
This dialog features separate summary and detail sections along with a
small heading for the latter in bold face. More features may be added
later as part of my work on improving WML diagnostics, but for now we
have the bare minimum for better message formatting with a content
structure more or less identical to the current one.
2014-02-12 04:16:57 -03:00
Ignacio R. Morelle
a30c50d567 gui2/tlabel: Add 'default_bold' variant for text in bold 2014-02-12 04:16:56 -03:00
Ignacio R. Morelle
36682ce78a gui2/tgame_paths, taddon_description: Hide browse buttons if unsupported
Hide the URL/path browse buttons if we don't support the current target
platform, they are wasting space otherwise since they only trigger a
stderr error in that case.
2014-02-12 03:34:17 -03:00
Ignacio R. Morelle
ba49a6d8b8 desktop: Implement a desktop::open_object_is_supported() function 2014-02-12 03:34:02 -03:00
Ignacio R. Morelle
1ba45ce69a desktop: Additional note on open_object()'s behavior 2014-02-12 03:30:20 -03:00
Ignacio R. Morelle
e7d19b4d6d gui2/tgame_paths: Remove commented-out debug code 2014-02-12 03:19:40 -03:00
Ignacio R. Morelle
393f2a1dfb desktop: Add Doxygen description for desktop::open_object()
90% of it is stating the obvious, but you never know...
2014-02-12 03:11:19 -03:00
Ignacio R. Morelle
95aa24cd53 desktop: Rename open_in_file_manager() function to open_object()
The new name is shorter, simpler, and its scope as broad as the
implementation.
2014-02-12 03:09:04 -03:00
Ignacio R. Morelle
f426931b13 addon/mg: Catch config::error in get_addon_install_info()
config::error is thrown by the parser to signal a parser error, so we
want to catch that so it doesn't go up the stack and cause the game to
display an obscure error message referring to an "<unknown>" WML file or
even crash to desktop.
2014-02-11 23:31:56 -03:00
mattsc
77d258474e Hang Out MAI: use [ai][avoid] if [micro_ai][avoid] is not given
The scenario author now has the option to use either the default AI
[avoid] tag or a specialized [avoid] tag inside the [micro_ai] tag.  If
neither is given, the default remains all castle terrain.
2014-02-11 14:00:21 -08:00
ln-zookeeper
5cffc26832 Removed ~RIGHT from Delfador's portraits. 2014-02-11 10:51:55 +02:00
ln-zookeeper
9f27fad78f More tweaks to use of HttT portrait variations. 2014-02-11 10:44:15 +02:00
ln-zookeeper
89b11108e5 Merge branch 'master' of https://github.com/wesnoth/wesnoth-old 2014-02-11 10:36:00 +02:00
ln-zookeeper
a81dfaea0c Tweaks to the use of HttT portrait variations. 2014-02-11 10:35:43 +02:00
Ignacio R. Morelle
a2f1c64eb1 Implement [true] and [false] ConditionalWML tags
[true] and [false] describe a condition that yields true or false,
respectively. They are intended as syntactic sugar in situations where
one absolutely needs to have a conditional statement for whatever
reason.
2014-02-11 05:09:59 -03:00
Ignacio R. Morelle
5293851c8e HttT S17: Use [note] for the scenario objective note 2014-02-11 04:34:33 -03:00