Removed most of the wxWidgets 2.8 compatibility code
Originally committed to SVN as r3280.
This commit is contained in:
parent
075439f405
commit
072520bf5f
11 changed files with 2 additions and 117 deletions
|
@ -991,11 +991,7 @@ void BaseGrid::OnKeyPress(wxKeyEvent &event) {
|
||||||
if (key == WXK_LEFT || key == WXK_RIGHT) {
|
if (key == WXK_LEFT || key == WXK_RIGHT) {
|
||||||
if (VideoContext::Get()->IsLoaded()) {
|
if (VideoContext::Get()->IsLoaded()) {
|
||||||
parentFrame->videoBox->videoSlider->SetFocus();
|
parentFrame->videoBox->videoSlider->SetFocus();
|
||||||
#if wxCHECK_VERSION(2,9,0)
|
|
||||||
parentFrame->videoBox->videoSlider->GetEventHandler()->ProcessEvent(event);
|
parentFrame->videoBox->videoSlider->GetEventHandler()->ProcessEvent(event);
|
||||||
#else
|
|
||||||
parentFrame->videoBox->videoSlider->AddPendingEvent(event);
|
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
event.Skip();
|
event.Skip();
|
||||||
|
@ -1086,11 +1082,7 @@ void BaseGrid::OnKeyPress(wxKeyEvent &event) {
|
||||||
|
|
||||||
// Other events, send to audio display
|
// Other events, send to audio display
|
||||||
if (VideoContext::Get()->audio->loaded) {
|
if (VideoContext::Get()->audio->loaded) {
|
||||||
#if wxCHECK_VERSION(2,9,0)
|
|
||||||
VideoContext::Get()->audio->GetEventHandler()->ProcessEvent(event);
|
VideoContext::Get()->audio->GetEventHandler()->ProcessEvent(event);
|
||||||
#else
|
|
||||||
VideoContext::Get()->audio->AddPendingEvent(event);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else event.Skip();
|
else event.Skip();
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,11 +120,7 @@ END_EVENT_TABLE()
|
||||||
void DialogDetachedVideo::OnKey(wxKeyEvent &event) {
|
void DialogDetachedVideo::OnKey(wxKeyEvent &event) {
|
||||||
// Send to parent... except that it doesn't work
|
// Send to parent... except that it doesn't work
|
||||||
event.Skip();
|
event.Skip();
|
||||||
#if wxCHECK_VERSION(2,9,0)
|
|
||||||
GetParent()->GetEventHandler()->ProcessEvent(event);
|
GetParent()->GetEventHandler()->ProcessEvent(event);
|
||||||
#else
|
|
||||||
GetParent()->AddPendingEvent(event);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -177,9 +177,5 @@ wxThread::ExitCode DialogProgressThread::Entry() {
|
||||||
void DialogProgressThread::Close() {
|
void DialogProgressThread::Close() {
|
||||||
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED,wxID_CANCEL);
|
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED,wxID_CANCEL);
|
||||||
dialog->canceled = NULL;
|
dialog->canceled = NULL;
|
||||||
#if wxCHECK_VERSION(2,9,0)
|
|
||||||
dialog->GetEventHandler()->ProcessEvent(event);
|
dialog->GetEventHandler()->ProcessEvent(event);
|
||||||
#else
|
|
||||||
dialog->AddPendingEvent(event);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -889,11 +889,7 @@ void DialogStyleManager::OnCurrentImport(wxCommandEvent &event) {
|
||||||
|
|
||||||
// Get selection
|
// Get selection
|
||||||
wxArrayInt selections;
|
wxArrayInt selections;
|
||||||
#if wxCHECK_VERSION(2,9,0)
|
|
||||||
int res = wxGetSelectedChoices(selections,_("Choose styles to import:"),_("Import Styles"),styles);
|
int res = wxGetSelectedChoices(selections,_("Choose styles to import:"),_("Import Styles"),styles);
|
||||||
#else
|
|
||||||
int res = wxGetMultipleChoices(selections,_("Choose styles to import:"),_("Import Styles"),styles);
|
|
||||||
#endif
|
|
||||||
if (res == -1 || selections.Count() == 0) return;
|
if (res == -1 || selections.Count() == 0) return;
|
||||||
bool modified = false;
|
bool modified = false;
|
||||||
|
|
||||||
|
|
|
@ -237,11 +237,7 @@ END_EVENT_TABLE()
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
// Redirect grid events to grid
|
// Redirect grid events to grid
|
||||||
void FrameMain::OnGridEvent (wxCommandEvent &event) {
|
void FrameMain::OnGridEvent (wxCommandEvent &event) {
|
||||||
#if wxCHECK_VERSION(2,9,0)
|
|
||||||
SubsBox->GetEventHandler()->ProcessEvent(event);
|
SubsBox->GetEventHandler()->ProcessEvent(event);
|
||||||
#else
|
|
||||||
SubsBox->AddPendingEvent(event);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -486,11 +486,7 @@ void AegisubApp::OnMouseWheel(wxMouseEvent &event) {
|
||||||
wxPoint pt;
|
wxPoint pt;
|
||||||
wxWindow *target = wxFindWindowAtPointer(pt);
|
wxWindow *target = wxFindWindowAtPointer(pt);
|
||||||
if (frame && (target == frame->audioBox->audioDisplay || target == frame->SubsBox)) {
|
if (frame && (target == frame->audioBox->audioDisplay || target == frame->SubsBox)) {
|
||||||
#if wxCHECK_VERSION(2,9,0)
|
|
||||||
if (target->IsShownOnScreen()) target->GetEventHandler()->ProcessEvent(event);
|
if (target->IsShownOnScreen()) target->GetEventHandler()->ProcessEvent(event);
|
||||||
#else
|
|
||||||
if (target->IsShownOnScreen()) target->AddPendingEvent(event);
|
|
||||||
#endif
|
|
||||||
else event.Skip();
|
else event.Skip();
|
||||||
}
|
}
|
||||||
else event.Skip();
|
else event.Skip();
|
||||||
|
|
|
@ -185,16 +185,7 @@ SubsEditBox::SubsEditBox (wxWindow *parent,SubtitlesGrid *gridp) : wxPanel(paren
|
||||||
MiddleBotSizer->Add(ByFrame,0,wxRIGHT | wxALIGN_CENTER | wxEXPAND,5);
|
MiddleBotSizer->Add(ByFrame,0,wxRIGHT | wxALIGN_CENTER | wxEXPAND,5);
|
||||||
|
|
||||||
// Text editor
|
// Text editor
|
||||||
int textStyle = 0;
|
int textStyle = wxBORDER_SUNKEN;
|
||||||
#if wxCHECK_VERSION(2,9,0)
|
|
||||||
textStyle = wxBORDER_SUNKEN;
|
|
||||||
#else
|
|
||||||
#ifdef _WIN32
|
|
||||||
textStyle = wxWindow::GetThemedBorderStyle();
|
|
||||||
#else
|
|
||||||
textStyle = wxBORDER_SUNKEN;
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
TextEdit = new SubsTextEditCtrl(this,EDIT_BOX,_T(""),wxDefaultPosition,wxSize(300,50),textStyle);
|
TextEdit = new SubsTextEditCtrl(this,EDIT_BOX,_T(""),wxDefaultPosition,wxSize(300,50),textStyle);
|
||||||
TextEdit->PushEventHandler(new SubsEditBoxEvent(this));
|
TextEdit->PushEventHandler(new SubsEditBoxEvent(this));
|
||||||
TextEdit->control = this;
|
TextEdit->control = this;
|
||||||
|
|
|
@ -756,11 +756,7 @@ void SubsTextEditCtrl::OnMouseEvent(wxMouseEvent &event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
event.Skip();
|
event.Skip();
|
||||||
#if wxCHECK_VERSION(2,9,0)
|
|
||||||
GetParent()->GetEventHandler()->ProcessEvent(event);
|
GetParent()->GetEventHandler()->ProcessEvent(event);
|
||||||
#else
|
|
||||||
GetParent()->AddPendingEvent(event);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -802,7 +798,7 @@ void SubsTextEditCtrl::ShowPopupMenu(int activePos) {
|
||||||
for (int i=0;i<nSugs;i++) {
|
for (int i=0;i<nSugs;i++) {
|
||||||
wxMenuItem *itm;
|
wxMenuItem *itm;
|
||||||
itm = menu.Append(EDIT_MENU_SUGGESTIONS+i,sugs[i]);
|
itm = menu.Append(EDIT_MENU_SUGGESTIONS+i,sugs[i]);
|
||||||
#if wxCHECK_VERSION(2, 8, 0) && defined(__WINDOWS__)
|
#ifdef __WINDOWS__
|
||||||
itm->SetFont(font);
|
itm->SetFont(font);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,11 +97,7 @@ void TTXTSubtitleFormat::ReadFile(wxString filename,wxString forceEncoding) {
|
||||||
if (doc.GetRoot()->GetName() != _T("TextStream")) throw _T("Invalid TTXT file.");
|
if (doc.GetRoot()->GetName() != _T("TextStream")) throw _T("Invalid TTXT file.");
|
||||||
|
|
||||||
// Check version
|
// Check version
|
||||||
#if wxCHECK_VERSION(2,9,0)
|
|
||||||
wxString verStr = doc.GetRoot()->GetAttribute(_T("version"),_T(""));
|
wxString verStr = doc.GetRoot()->GetAttribute(_T("version"),_T(""));
|
||||||
#else
|
|
||||||
wxString verStr = doc.GetRoot()->GetPropVal(_T("version"),_T(""));
|
|
||||||
#endif
|
|
||||||
version = -1;
|
version = -1;
|
||||||
if (verStr == _T("1.0")) version = 0;
|
if (verStr == _T("1.0")) version = 0;
|
||||||
else if (verStr == _T("1.1")) version = 1;
|
else if (verStr == _T("1.1")) version = 1;
|
||||||
|
@ -142,11 +138,7 @@ void TTXTSubtitleFormat::ReadFile(wxString filename,wxString forceEncoding) {
|
||||||
// Process a dialogue line
|
// Process a dialogue line
|
||||||
bool TTXTSubtitleFormat::ProcessLine(wxXmlNode *node) {
|
bool TTXTSubtitleFormat::ProcessLine(wxXmlNode *node) {
|
||||||
// Get time
|
// Get time
|
||||||
#if wxCHECK_VERSION(2,9,0)
|
|
||||||
wxString sampleTime = node->GetAttribute(_T("sampleTime"),_T("00:00:00.000"));
|
wxString sampleTime = node->GetAttribute(_T("sampleTime"),_T("00:00:00.000"));
|
||||||
#else
|
|
||||||
wxString sampleTime = node->GetPropVal(_T("sampleTime"),_T("00:00:00.000"));
|
|
||||||
#endif
|
|
||||||
AssTime time;
|
AssTime time;
|
||||||
time.ParseASS(sampleTime);
|
time.ParseASS(sampleTime);
|
||||||
|
|
||||||
|
@ -156,11 +148,7 @@ bool TTXTSubtitleFormat::ProcessLine(wxXmlNode *node) {
|
||||||
|
|
||||||
// Get text
|
// Get text
|
||||||
wxString text;
|
wxString text;
|
||||||
#if wxCHECK_VERSION(2,9,0)
|
|
||||||
if (version == 0) text = node->GetAttribute(_T("text"),_T(""));
|
if (version == 0) text = node->GetAttribute(_T("text"),_T(""));
|
||||||
#else
|
|
||||||
if (version == 0) text = node->GetPropVal(_T("text"),_T(""));
|
|
||||||
#endif
|
|
||||||
else text = node->GetNodeContent();
|
else text = node->GetNodeContent();
|
||||||
|
|
||||||
// Create line
|
// Create line
|
||||||
|
@ -223,11 +211,7 @@ void TTXTSubtitleFormat::WriteFile(wxString filename,wxString encoding) {
|
||||||
// Create XML structure
|
// Create XML structure
|
||||||
wxXmlDocument doc;
|
wxXmlDocument doc;
|
||||||
wxXmlNode *root = new wxXmlNode(NULL,wxXML_ELEMENT_NODE,_T("TextStream"));
|
wxXmlNode *root = new wxXmlNode(NULL,wxXML_ELEMENT_NODE,_T("TextStream"));
|
||||||
#if wxCHECK_VERSION(2,9,0)
|
|
||||||
root->AddAttribute(_T("version"),_T("1.1"));
|
root->AddAttribute(_T("version"),_T("1.1"));
|
||||||
#else
|
|
||||||
root->AddProperty(_T("version"),_T("1.1"));
|
|
||||||
#endif
|
|
||||||
doc.SetRoot(root);
|
doc.SetRoot(root);
|
||||||
|
|
||||||
// Create header
|
// Create header
|
||||||
|
@ -260,25 +244,16 @@ void TTXTSubtitleFormat::WriteFile(wxString filename,wxString encoding) {
|
||||||
void TTXTSubtitleFormat::WriteHeader(wxXmlNode *root) {
|
void TTXTSubtitleFormat::WriteHeader(wxXmlNode *root) {
|
||||||
// Write stream header
|
// Write stream header
|
||||||
wxXmlNode *node = new wxXmlNode(wxXML_ELEMENT_NODE,_T("TextStreamHeader"));
|
wxXmlNode *node = new wxXmlNode(wxXML_ELEMENT_NODE,_T("TextStreamHeader"));
|
||||||
#if wxCHECK_VERSION(2,9,0)
|
|
||||||
node->AddAttribute(_T("width"),_T("400"));
|
node->AddAttribute(_T("width"),_T("400"));
|
||||||
node->AddAttribute(_T("height"),_T("60"));
|
node->AddAttribute(_T("height"),_T("60"));
|
||||||
node->AddAttribute(_T("layer"),_T("0"));
|
node->AddAttribute(_T("layer"),_T("0"));
|
||||||
node->AddAttribute(_T("translation_x"),_T("0"));
|
node->AddAttribute(_T("translation_x"),_T("0"));
|
||||||
node->AddAttribute(_T("translation_y"),_T("0"));
|
node->AddAttribute(_T("translation_y"),_T("0"));
|
||||||
#else
|
|
||||||
node->AddProperty(_T("width"),_T("400"));
|
|
||||||
node->AddProperty(_T("height"),_T("60"));
|
|
||||||
node->AddProperty(_T("layer"),_T("0"));
|
|
||||||
node->AddProperty(_T("translation_x"),_T("0"));
|
|
||||||
node->AddProperty(_T("translation_y"),_T("0"));
|
|
||||||
#endif
|
|
||||||
root->AddChild(node);
|
root->AddChild(node);
|
||||||
root = node;
|
root = node;
|
||||||
|
|
||||||
// Write sample description
|
// Write sample description
|
||||||
node = new wxXmlNode(wxXML_ELEMENT_NODE,_T("TextSampleDescription"));
|
node = new wxXmlNode(wxXML_ELEMENT_NODE,_T("TextSampleDescription"));
|
||||||
#if wxCHECK_VERSION(2,9,0)
|
|
||||||
node->AddAttribute(_T("horizontalJustification"),_T("center"));
|
node->AddAttribute(_T("horizontalJustification"),_T("center"));
|
||||||
node->AddAttribute(_T("verticalJustification"),_T("bottom"));
|
node->AddAttribute(_T("verticalJustification"),_T("bottom"));
|
||||||
node->AddAttribute(_T("backColor"),_T("0 0 0 0"));
|
node->AddAttribute(_T("backColor"),_T("0 0 0 0"));
|
||||||
|
@ -286,59 +261,31 @@ void TTXTSubtitleFormat::WriteHeader(wxXmlNode *root) {
|
||||||
node->AddAttribute(_T("fillTextRegion"),_T("no"));
|
node->AddAttribute(_T("fillTextRegion"),_T("no"));
|
||||||
node->AddAttribute(_T("continuousKaraoke"),_T("no"));
|
node->AddAttribute(_T("continuousKaraoke"),_T("no"));
|
||||||
node->AddAttribute(_T("scroll"),_T("None"));
|
node->AddAttribute(_T("scroll"),_T("None"));
|
||||||
#else
|
|
||||||
node->AddProperty(_T("horizontalJustification"),_T("center"));
|
|
||||||
node->AddProperty(_T("verticalJustification"),_T("bottom"));
|
|
||||||
node->AddProperty(_T("backColor"),_T("0 0 0 0"));
|
|
||||||
node->AddProperty(_T("verticalText"),_T("no"));
|
|
||||||
node->AddProperty(_T("fillTextRegion"),_T("no"));
|
|
||||||
node->AddProperty(_T("continuousKaraoke"),_T("no"));
|
|
||||||
node->AddProperty(_T("scroll"),_T("None"));
|
|
||||||
#endif
|
|
||||||
root->AddChild(node);
|
root->AddChild(node);
|
||||||
root = node;
|
root = node;
|
||||||
|
|
||||||
// Write font table
|
// Write font table
|
||||||
node = new wxXmlNode(wxXML_ELEMENT_NODE,_T("FontTable"));
|
node = new wxXmlNode(wxXML_ELEMENT_NODE,_T("FontTable"));
|
||||||
wxXmlNode *subNode = new wxXmlNode(wxXML_ELEMENT_NODE,_T("FontTableEntry"));
|
wxXmlNode *subNode = new wxXmlNode(wxXML_ELEMENT_NODE,_T("FontTableEntry"));
|
||||||
#if wxCHECK_VERSION(2,9,0)
|
|
||||||
subNode->AddAttribute(_T("fontName"),_T("Sans"));
|
subNode->AddAttribute(_T("fontName"),_T("Sans"));
|
||||||
subNode->AddAttribute(_T("fontID"),_T("1"));
|
subNode->AddAttribute(_T("fontID"),_T("1"));
|
||||||
#else
|
|
||||||
subNode->AddProperty(_T("fontName"),_T("Sans"));
|
|
||||||
subNode->AddProperty(_T("fontID"),_T("1"));
|
|
||||||
#endif
|
|
||||||
node->AddChild(subNode);
|
node->AddChild(subNode);
|
||||||
root->AddChild(node);
|
root->AddChild(node);
|
||||||
|
|
||||||
// Write text box
|
// Write text box
|
||||||
node = new wxXmlNode(wxXML_ELEMENT_NODE,_T("TextBox"));
|
node = new wxXmlNode(wxXML_ELEMENT_NODE,_T("TextBox"));
|
||||||
#if wxCHECK_VERSION(2,9,0)
|
|
||||||
node->AddAttribute(_T("top"),_T("0"));
|
node->AddAttribute(_T("top"),_T("0"));
|
||||||
node->AddAttribute(_T("left"),_T("0"));
|
node->AddAttribute(_T("left"),_T("0"));
|
||||||
node->AddAttribute(_T("bottom"),_T("60"));
|
node->AddAttribute(_T("bottom"),_T("60"));
|
||||||
node->AddAttribute(_T("right"),_T("400"));
|
node->AddAttribute(_T("right"),_T("400"));
|
||||||
#else
|
|
||||||
node->AddProperty(_T("top"),_T("0"));
|
|
||||||
node->AddProperty(_T("left"),_T("0"));
|
|
||||||
node->AddProperty(_T("bottom"),_T("60"));
|
|
||||||
node->AddProperty(_T("right"),_T("400"));
|
|
||||||
#endif
|
|
||||||
root->AddChild(node);
|
root->AddChild(node);
|
||||||
|
|
||||||
// Write style
|
// Write style
|
||||||
node = new wxXmlNode(wxXML_ELEMENT_NODE,_T("Style"));
|
node = new wxXmlNode(wxXML_ELEMENT_NODE,_T("Style"));
|
||||||
#if wxCHECK_VERSION(2,9,0)
|
|
||||||
node->AddAttribute(_T("styles"),_T("Normal"));
|
node->AddAttribute(_T("styles"),_T("Normal"));
|
||||||
node->AddAttribute(_T("fontID"),_T("1"));
|
node->AddAttribute(_T("fontID"),_T("1"));
|
||||||
node->AddAttribute(_T("fontSize"),_T("18"));
|
node->AddAttribute(_T("fontSize"),_T("18"));
|
||||||
node->AddAttribute(_T("color"),_T("ff ff ff ff"));
|
node->AddAttribute(_T("color"),_T("ff ff ff ff"));
|
||||||
#else
|
|
||||||
node->AddProperty(_T("styles"),_T("Normal"));
|
|
||||||
node->AddProperty(_T("fontID"),_T("1"));
|
|
||||||
node->AddProperty(_T("fontSize"),_T("18"));
|
|
||||||
node->AddProperty(_T("color"),_T("ff ff ff ff"));
|
|
||||||
#endif
|
|
||||||
root->AddChild(node);
|
root->AddChild(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -350,13 +297,8 @@ void TTXTSubtitleFormat::WriteLine(wxXmlNode *root, AssDialogue *line) {
|
||||||
wxXmlNode *node,*subNode;
|
wxXmlNode *node,*subNode;
|
||||||
if (prev && prev->End != line->Start) {
|
if (prev && prev->End != line->Start) {
|
||||||
node = new wxXmlNode(wxXML_ELEMENT_NODE,_T("TextSample"));
|
node = new wxXmlNode(wxXML_ELEMENT_NODE,_T("TextSample"));
|
||||||
#if wxCHECK_VERSION(2,9,0)
|
|
||||||
node->AddAttribute(_T("sampleTime"),_T("0") + prev->End.GetASSFormated(true));
|
node->AddAttribute(_T("sampleTime"),_T("0") + prev->End.GetASSFormated(true));
|
||||||
node->AddAttribute(_T("xml:space"),_T("preserve"));
|
node->AddAttribute(_T("xml:space"),_T("preserve"));
|
||||||
#else
|
|
||||||
node->AddProperty(_T("sampleTime"),_T("0") + prev->End.GetASSFormated(true));
|
|
||||||
node->AddProperty(_T("xml:space"),_T("preserve"));
|
|
||||||
#endif
|
|
||||||
subNode = new wxXmlNode(wxXML_TEXT_NODE,_T(""),_T(""));
|
subNode = new wxXmlNode(wxXML_TEXT_NODE,_T(""),_T(""));
|
||||||
node->AddChild(subNode);
|
node->AddChild(subNode);
|
||||||
root->AddChild(node);
|
root->AddChild(node);
|
||||||
|
@ -364,13 +306,8 @@ void TTXTSubtitleFormat::WriteLine(wxXmlNode *root, AssDialogue *line) {
|
||||||
|
|
||||||
// Generate and insert node
|
// Generate and insert node
|
||||||
node = new wxXmlNode(wxXML_ELEMENT_NODE,_T("TextSample"));
|
node = new wxXmlNode(wxXML_ELEMENT_NODE,_T("TextSample"));
|
||||||
#if wxCHECK_VERSION(2,9,0)
|
|
||||||
node->AddAttribute(_T("sampleTime"),_T("0") + line->Start.GetASSFormated(true));
|
node->AddAttribute(_T("sampleTime"),_T("0") + line->Start.GetASSFormated(true));
|
||||||
node->AddAttribute(_T("xml:space"),_T("preserve"));
|
node->AddAttribute(_T("xml:space"),_T("preserve"));
|
||||||
#else
|
|
||||||
node->AddProperty(_T("sampleTime"),_T("0") + line->Start.GetASSFormated(true));
|
|
||||||
node->AddProperty(_T("xml:space"),_T("preserve"));
|
|
||||||
#endif
|
|
||||||
subNode = new wxXmlNode(wxXML_TEXT_NODE,_T(""),line->Text);
|
subNode = new wxXmlNode(wxXML_TEXT_NODE,_T(""),line->Text);
|
||||||
node->AddChild(subNode);
|
node->AddChild(subNode);
|
||||||
root->AddChild(node);
|
root->AddChild(node);
|
||||||
|
|
|
@ -471,13 +471,6 @@ wxGLContext *VideoContext::GetGLContext(wxGLCanvas *canvas) {
|
||||||
// Everywhere else, we can just create a wxGLContext using the documented interface
|
// Everywhere else, we can just create a wxGLContext using the documented interface
|
||||||
// and be over with it after that.
|
// and be over with it after that.
|
||||||
// Also see bug #850.
|
// Also see bug #850.
|
||||||
#if wxCHECK_VERSION(2,9,0)
|
|
||||||
#else
|
|
||||||
if (!glContext) {
|
|
||||||
glContext = canvas->GetContext();
|
|
||||||
ownGlContext = false;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#ifndef __WXMAC__
|
#ifndef __WXMAC__
|
||||||
if (!glContext) {
|
if (!glContext) {
|
||||||
glContext = new wxGLContext(canvas);
|
glContext = new wxGLContext(canvas);
|
||||||
|
|
|
@ -370,11 +370,7 @@ void VideoSlider::OnKeyDown(wxKeyEvent &event) {
|
||||||
|
|
||||||
// Forward up/down to grid
|
// Forward up/down to grid
|
||||||
if (key == WXK_UP || key == WXK_DOWN) {
|
if (key == WXK_UP || key == WXK_DOWN) {
|
||||||
#if wxCHECK_VERSION(2,9,0)
|
|
||||||
grid->GetEventHandler()->ProcessEvent(event);
|
grid->GetEventHandler()->ProcessEvent(event);
|
||||||
#else
|
|
||||||
grid->AddPendingEvent(event);
|
|
||||||
#endif
|
|
||||||
grid->SetFocus();
|
grid->SetFocus();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue