eliot-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Eliot-dev] eliot/wxwin mainframe.cc [cppdic]


From: eliot-dev
Subject: [Eliot-dev] eliot/wxwin mainframe.cc [cppdic]
Date: Sun, 09 Dec 2007 15:41:06 +0000

CVSROOT:        /cvsroot/eliot
Module name:    eliot
Branch:         cppdic
Changes by:     Olivier Teulière <ipkiss>      07/12/09 15:41:06

Modified files:
        wxwin          : mainframe.cc 

Log message:
        Fixed a crash in the wx interface when there is no config file

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/eliot/wxwin/mainframe.cc?cvsroot=eliot&only_with_tag=cppdic&r1=1.21.2.4&r2=1.21.2.5

Patches:
Index: mainframe.cc
===================================================================
RCS file: /cvsroot/eliot/eliot/wxwin/mainframe.cc,v
retrieving revision 1.21.2.4
retrieving revision 1.21.2.5
diff -u -b -r1.21.2.4 -r1.21.2.5
--- mainframe.cc        4 Dec 2007 19:32:11 -0000       1.21.2.4
+++ mainframe.cc        9 Dec 2007 15:41:06 -0000       1.21.2.5
@@ -166,6 +166,15 @@
     for (int i = 0 ; i < MAX_FRAME_ID; i++)
         auxframes_ptr[i] = NULL;
 
+    wxBoxSizer *listsizer = new wxBoxSizer(wxVERTICAL);
+    rack = new wxTextCtrl(this, Rack_ID, wxU(""), wxPoint(-1, -1), wxSize(-1, 
-1), wxTE_PROCESS_ENTER);
+    listsizer->Add(rack, 0, wxEXPAND | wxALL, 1);
+    rack->SetToolTip(_("Tirage"));
+#ifdef ENABLE_RESLIST_IN_MAIN
+    reslist = new GfxResult(this,(MainFrame*)this,m_game);
+    listsizer->Add(reslist, 1, wxEXPAND | wxLEFT | wxRIGHT, 1);
+#endif
+
     wxString dicpath = config.getDicPath();
     try
     {
@@ -184,15 +193,6 @@
         OnMenuConfGameDic(event);
     }
 
-    wxBoxSizer *listsizer = new wxBoxSizer(wxVERTICAL);
-    rack = new wxTextCtrl(this, Rack_ID, wxU(""), wxPoint(-1, -1), wxSize(-1, 
-1), wxTE_PROCESS_ENTER);
-    listsizer->Add(rack, 0, wxEXPAND | wxALL, 1);
-    rack->SetToolTip(_("Tirage"));
-#ifdef ENABLE_RESLIST_IN_MAIN
-    reslist = new GfxResult(this,(MainFrame*)this,m_game);
-    listsizer->Add(reslist, 1, wxEXPAND | wxLEFT | wxRIGHT, 1);
-#endif
-
     InitMenu();
 
     statusbar = CreateStatusBar(2, 0, Status_ID);
@@ -375,7 +375,7 @@
 
     m_game = GameFactory::Instance()->createTraining(*m_dic);
     m_game->start();
-    rack->SetValue(wxU(""));
+    rack->SetValue(wxT(""));
     InitFrames();
 #ifdef ENABLE_RESLIST_IN_MAIN
     reslist->SetGame(m_game);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]