mail[Wesnoth-commits] r44630 - /trunk/src/game.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by timotei_cluj on July 24, 2010 - 12:44:
Author: timotei
Date: Sat Jul 24 12:44:11 2010
New Revision: 44630

URL: http://svn.gna.org/viewcvs/wesnoth?rev=44630&view=rev
Log:
eclipse plugin: maintain backward compatibility and
allow the user to press cancel if he started the campaign
from command line

Modified:
    trunk/src/game.cpp

Modified: trunk/src/game.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game.cpp?rev=44630&r1=44629&r2=44630&view=diff
==============================================================================
--- trunk/src/game.cpp (original)
+++ trunk/src/game.cpp Sat Jul 24 12:44:11 2010
@@ -1082,7 +1082,7 @@
 
        int campaign_num = -1;
        // No campaign selected from command line
-       if (!jump_to_campaign_.jump_)
+       if (jump_to_campaign_.campaign_id_.empty() == true)
        {
                gui2::tcampaign_selection dlg(campaigns);
 
@@ -1165,6 +1165,10 @@
                                _("Select difficulty level:"), 
gui::OK_CANCEL);
                        dlg.set_menu(difficulty_options);
                        if(dlg.show() == -1) {
+                               if (jump_to_campaign_.campaign_id_.empty() == 
false)
+                               {
+                                       jump_to_campaign_.campaign_id_ = "";
+                               }
                                // canceled difficulty dialog, relaunch the 
campaign selection dialog
                                return new_campaign();
                        }
@@ -1175,7 +1179,9 @@
                        if (jump_to_campaign_.difficulty_
                                        > 
static_cast<int>(difficulties.size()))
                        {
-                               std::cerr<<"incorrect difficulty number: 
["<<jump_to_campaign_.difficulty_<<"]. maximum is 
["<<difficulties.size()<<"].\n";
+                               std::cerr << "incorrect difficulty number: [" 
<< 
+                                       jump_to_campaign_.difficulty_ << "]. 
maximum is [" << 
+                                       difficulties.size() << "].\n";
                                return false;
                        }
                        else




Related Messages


Powered by MHonArc, Updated Sat Jul 24 13:00:13 2010