Author: mordante
Date: Sun Apr 12 18:16:24 2009
New Revision: 34798
URL: http://svn.gna.org/viewcvs/wesnoth?rev=34798&view=rev
Log:
Limit the maximum length of the mp command dialog.
This limit is only imposed on Windows and Mac, since Linux is not affected by
the problem. This is a workaround for bug #13333.
Modified:
branches/1.6/RELEASE_NOTES
branches/1.6/changelog
branches/1.6/players_changelog
branches/1.6/src/gui/dialogs/mp_cmd_wrapper.cpp
Modified: branches/1.6/RELEASE_NOTES
URL:
http://svn.gna.org/viewcvs/wesnoth/branches/1.6/RELEASE_NOTES?rev=34798&r1=34797&r2=34798&view=diff
==============================================================================
--- branches/1.6/RELEASE_NOTES (original)
+++ branches/1.6/RELEASE_NOTES Sun Apr 12 18:16:24 2009
@@ -13,7 +13,10 @@
***
-REPLACE ME WITH CONTENT...
+On Windows and Mac a log text in the mp command dialog could give an error
+which threw players out the lobby. This problem seems to be an upstream problem
+and is being further investigated. As workaround the length of the input is
+limited to a save length. (The chatline is not affected.)
***
Modified: branches/1.6/changelog
URL:
http://svn.gna.org/viewcvs/wesnoth/branches/1.6/changelog?rev=34798&r1=34797&r2=34798&view=diff
==============================================================================
--- branches/1.6/changelog (original)
+++ branches/1.6/changelog Sun Apr 12 18:16:24 2009
@@ -32,6 +32,8 @@
(impacts "submerge" animations and AI settings)
* Fixed a bug with auto-stored WML variables not being restored correctly
* Fixed a crash when sighted event killed the attacked unit
+ * Limit the maximum length of the mp command dialog as workaround for bug
+ #13333 (This workaround is only implemented for Windows and Mac)
Version 1.6a:
* User interface:
Modified: branches/1.6/players_changelog
URL:
http://svn.gna.org/viewcvs/wesnoth/branches/1.6/players_changelog?rev=34798&r1=34797&r2=34798&view=diff
==============================================================================
--- branches/1.6/players_changelog (original)
+++ branches/1.6/players_changelog Sun Apr 12 18:16:24 2009
@@ -19,6 +19,8 @@
* Miscellaneous and bugfixes:
* Fix a lock-up issue when no music could be played.
+ * Limit the maximum length of the mp command dialog as workaround for
+ a 'crash'. (Windows and Mac only.)
Version 1.6:
* Graphics:
Modified: branches/1.6/src/gui/dialogs/mp_cmd_wrapper.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/branches/1.6/src/gui/dialogs/mp_cmd_wrapper.cpp?rev=34798&r1=34797&r2=34798&view=diff
==============================================================================
--- branches/1.6/src/gui/dialogs/mp_cmd_wrapper.cpp (original)
+++ branches/1.6/src/gui/dialogs/mp_cmd_wrapper.cpp Sun Apr 12 18:16:24 2009
@@ -57,7 +57,18 @@
{
ttext_box* message =
dynamic_cast<ttext_box*>(window.find_widget("message", false));
- if(message) window.keyboard_capture(message);
+ if(message) {
+ /**
+ * @todo For some reason the text wrapping fails on Windows and
Mac,
+ * this causes an exception to be thrown, which brings the user
back
+ * to the main menu. So avoid that problem by imposing a maximum
+ * length (the number of letters W that fit).
+ */
+#if defined(_WIN32) || defined(__APPLE__)
+ message->set_maximum_length(18);
+#endif
+ window.keyboard_capture(message);
+ }
message = dynamic_cast<ttext_box*>(window.find_widget("reason", false));
if(message) message->set_active(preferences::is_authenticated());
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits