@@ -43,7 +43,7 @@ EVT_BUTTON(OPEN_WITH, MainFrameDerived::OnOpenWith)
4343EVT_LIST_ITEM_ACTIVATED(wxID_HARDDISK, MainFrameDerived::OnOpenProject)
4444EVT_LISTBOX_DCLICK(wxID_FLOPPY,MainFrameDerived::OnRevealEditor)
4545EVT_LISTBOX_DCLICK(wxID_HOME,MainFrameDerived::OnRevealInstallLocation)
46- EVT_NOTEBOOK_PAGE_CHANGING (NOTEBOOK, MainFrameDerived::OnPageChanging)
46+ EVT_NOTEBOOK_PAGE_CHANGED (NOTEBOOK, MainFrameDerived::OnPageChanging)
4747EVT_BUTTON(Nav_Back, MainFrameDerived::OnNavigateBack)
4848EVT_BUTTON(Nav_Forward, MainFrameDerived::OnNavigateForwards)
4949EVT_BUTTON(Nav_Home, MainFrameDerived::OnNavigateHome)
@@ -78,6 +78,8 @@ MainFrameDerived::MainFrameDerived() : MainFrame(NULL){
7878 ReloadData ();
7979 }
8080 // if no projects to load, the interface will be blank
81+
82+ timeout = new wxTimer (this ,TIMER);
8183}
8284
8385/* *
@@ -187,24 +189,22 @@ void MainFrameDerived::OnPageChanging(wxBookCtrlEvent& event){
187189 if (!learnView){
188190 // show the web view if its not currently allocated
189191 learnView = wxWebView::New (learn_pane,WEBVIEW,lastURL);
190- #if defined _WIN32
191- learnView->MSWSetEmulationLevel ();
192- #endif
192+
193193 webSizer->Add (learnView,1 ,wxEXPAND,wxALL);
194194 // force layout so that the view appears
195195 learnSizer->Layout ();
196196 }
197197 else {
198198 // reset timeout
199199 if (learnView){
200- timeout. StartOnce (TIMER_LENGTH);
200+ timeout-> StartOnce (TIMER_LENGTH);
201201 }
202202 }
203203 }
204204 else {
205205 // set a timer to deallocate the view
206206 if (learnView){
207- timeout. StartOnce (TIMER_LENGTH);
207+ timeout-> StartOnce (TIMER_LENGTH);
208208 }
209209 }
210210}
0 commit comments