Skip to content

Commit 6aff4ec

Browse files
committed
New Learn tab windows support
interface_derived ~ changed tab event to finished changing ~ changed timer to heap object
1 parent 54e4aad commit 6aff4ec

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

source/interface_derived.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ EVT_BUTTON(OPEN_WITH, MainFrameDerived::OnOpenWith)
4343
EVT_LIST_ITEM_ACTIVATED(wxID_HARDDISK, MainFrameDerived::OnOpenProject)
4444
EVT_LISTBOX_DCLICK(wxID_FLOPPY,MainFrameDerived::OnRevealEditor)
4545
EVT_LISTBOX_DCLICK(wxID_HOME,MainFrameDerived::OnRevealInstallLocation)
46-
EVT_NOTEBOOK_PAGE_CHANGING(NOTEBOOK, MainFrameDerived::OnPageChanging)
46+
EVT_NOTEBOOK_PAGE_CHANGED(NOTEBOOK, MainFrameDerived::OnPageChanging)
4747
EVT_BUTTON(Nav_Back, MainFrameDerived::OnNavigateBack)
4848
EVT_BUTTON(Nav_Forward, MainFrameDerived::OnNavigateForwards)
4949
EVT_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
}

source/interface_derived.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class MainFrameDerived : public MainFrame{
4545
wxWebView* learnView = NULL;
4646
const string homeurl = "https://learn.unity.com";
4747
wxString lastURL = wxString(homeurl);
48-
wxTimer timeout = wxTimer(this,TIMER);
48+
wxTimer* timeout;
4949

5050
//webview events
5151
/** Backwards button hit */

0 commit comments

Comments
 (0)