Commit graph

19 commits

Author SHA1 Message Date
Mark de Wever
ab9342904e Fix a compiler error. 2009-10-17 20:21:58 +00:00
Mark de Wever
ee5cee21f6 Fix double click event dispatching.
Soliton ran into the problem that when using his touchpad to double
click on a campaign it might directly select the difficulty and dismiss
the next dialog. When using a mouse the problem didn't occur.

The output of events for the mouse were:
Push DOUBLE_CLICK_EVENT.
Process DOUBLE_CLICK_EVENT.
Window dtor.

The output of events for the touchpad were:
Push DOUBLE_CLICK_EVENT.
Window dtor.
Process DOUBLE_CLICK_EVENT.

This explains why the events are send to the next dialog. It doesn't
explain why it happens, but that might be the touchpad driver or OS.

The problem is solved by removing the extra events after closing the
dialog. Avoiding the events to be generated is tricky since a gui2
dialog can open a gui1 one, when that happens double clicks need to be
enabled temporary and then again disabled when that dialog closes.
2009-10-17 20:12:10 +00:00
Mark de Wever
5af294d470 Make sure a dialog is not shown on a faked screen.
cjhopman discovered the problem when running Wesnoth with --no-gui.
2009-05-31 06:00:26 +00:00
Mark de Wever
692e5f78bc Add the autoclose feature for dialogs/windows.
This might not be really useful for normal usage, but allows the
unit tests to show a window. (This will be implemented later.)
2009-04-30 20:56:41 +00:00
Ignacio R. Morelle
50e4162272 You Fail at Copy-Paste, part 2. 2009-04-12 23:48:53 +00:00
Mark de Wever
27a0c47800 Wiki cleanups.
Move the GUIWindowWML items to GUIWindowDefinitionWML...

...and added an initial header and footer.
2009-03-08 11:51:40 +00:00
Mark de Wever
a5d1d2e969 New year copyright update. 2009-01-01 10:27:41 +00:00
Nils Kneuper
c84f995e88 add declarations of the textdomain to all files from the domains...
...-lib and -test even if they got no translateable strings the
declaration is done via this define: #define GETTEXT_DOMAIN
"wesnoth-lib" a short "how to get .cpp files translated" is left in
src/gettext.hpp
2008-12-28 21:40:02 +00:00
Mark de Wever
90a090ac76 Let the window builder return a pointer.
The current design of twindow (and some other widget classes) have the
problem that they shouldn't be copied. The code doesn't copy the
objects as long as the compiler does a return value optimization,
which indicates a bad class design. By turning the return value into a
pointer the copying is no longer needed.
2008-12-25 14:36:20 +00:00
Mark de Wever
f92ec60b51 Move tinteger_selector_ to its own header. 2008-11-27 17:41:18 +00:00
Eric S. Raymond
9223460daa Remove unused headers. 2008-11-09 04:35:13 +00:00
Mark de Wever
f9a15e6f0e Move all log macros for the widget library to log.hpp. 2008-09-28 14:46:18 +00:00
Mark de Wever
be54f822a0 Make the restore of the window background conditionally. 2008-08-24 18:25:23 +00:00
Mark de Wever
bafcd9cdb5 Revert 2008-08-24T18:17:56Z!koraq@xs4all.nl, too much code was committed.
Forgot to do a partial commit after a failed commit :/
2008-08-24 18:23:52 +00:00
Mark de Wever
918e77a789 Make the restore of the window background conditionally. 2008-08-24 18:17:56 +00:00
Mark de Wever
5420ef0ba1 Fix invalid log domains, spotted by ilor. 2008-08-12 20:31:04 +00:00
Mark de Wever
10840e969c Move the return values from tbutton to twindow, where it belongs. 2008-08-06 12:27:03 +00:00
Mark de Wever
a125396585 Add a new method to more automatically handle fields in a dialog.
Converted the tmp_connect dialog to use this new method.
2008-07-25 16:16:49 +00:00
Mark de Wever
5693ac8027 Oops forgot to add the dialog files. 2008-06-10 21:40:19 +00:00