Author: mordante
Date: Mon Jul 2 19:06:58 2007
New Revision: 18619
URL: http://svn.gna.org/viewcvs/wesnoth?rev=18619&view=rev
Log:
another fix for GCC-3.3 which doesn't like show() is some cases.
Modified:
trunk/src/game.cpp
trunk/src/multiplayer_wait.cpp
Modified: trunk/src/game.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game.cpp?rev=18619&r1=18618&r2=18619&view=diff
==============================================================================
--- trunk/src/game.cpp (original)
+++ trunk/src/game.cpp Mon Jul 2 19:06:58 2007
@@ -692,7 +692,9 @@
if(state_.version != game_config::version) {
if(state_.version < game_config::min_savegame_version) {
- gui::message_dialog(disp(), "", _("This save is
from a version too old to be loaded.")).show();
+ /* GCC-3.3 needs a temp var otherwise
compilation fails */
+ gui::message_dialog dlg(disp(), "", _("This
save is from a version too old to be loaded."));
+ dlg.show();
return false;
}
@@ -992,13 +994,17 @@
std::string success_message = "Add-on \'" +
addons.at(index) + "\' deleted.";
- gui::basic_dialog(disp(), _("Add-on deleted"),
success_message,
- gui::OK_ONLY).show();
+ /* GCC-3.3 needs a temp var otherwise
compilation fails */
+ gui::basic_dialog dlg(disp(), _("Add-on
deleted"), success_message,
+ gui::OK_ONLY);
+ dlg.show();
}
else
{
- gui::basic_dialog(disp(), _("Error"), _("Add-on
could not be deleted -- a file was not found."),
- gui::OK_ONLY).show();
+ /* GCC-3.3 needs a temp var otherwise
compilation fails */
+ gui::basic_dialog dlg2(disp(), _("Error"),
_("Add-on could not be deleted -- a file was not found."),
+ gui::OK_ONLY);
+ dlg2.show();
}
}
else // Cancel or unexpected result
@@ -1415,12 +1421,16 @@
} catch(network::error& e) {
std::cerr << "caught network error...\n";
if(e.message != "") {
-
gui::basic_dialog(disp(),"",e.message,gui::OK_ONLY).show();
+ /* GCC-3.3 needs a temp var otherwise compilation fails
*/
+ gui::basic_dialog dlg(disp(),"",e.message,gui::OK_ONLY);
+ dlg.show();
}
} catch(config::error& e) {
std::cerr << "caught config::error...\n";
if(e.message != "") {
-
gui::basic_dialog(disp(),"",e.message,gui::OK_ONLY).show();
+ /* GCC-3.3 needs a temp var otherwise compilation fails
*/
+ gui::basic_dialog
dlg2(disp(),"",e.message,gui::OK_ONLY);
+ dlg2.show();
}
} catch(gamemap::incorrect_format_exception& e) {
gui::show_error_message(disp(), std::string(_("The game map
could not be loaded: ")) + e.msg_);
Modified: trunk/src/multiplayer_wait.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/multiplayer_wait.cpp?rev=18619&r1=18618&r2=18619&view=diff
==============================================================================
--- trunk/src/multiplayer_wait.cpp (original)
+++ trunk/src/multiplayer_wait.cpp Mon Jul 2 19:06:58 2007
@@ -338,7 +338,9 @@
ui::process_network_data(data, sock);
if(data["message"] != "") {
-
gui::basic_dialog(disp(),_("Response"),data["message"],gui::OK_ONLY).show();
+ /* GCC-3.3 needs a temp var otherwise compilation fails */
+ gui::basic_dialog
dlg(disp(),_("Response"),data["message"],gui::OK_ONLY);
+ dlg.show();
}
if(data["failed"] == "yes") {
set_result(QUIT);
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits