mirror of https://github.com/odrling/Aegisub
Eliminate some uses of VideoContext::Get()
Originally committed to SVN as r5254.
This commit is contained in:
parent
9c07798cb5
commit
e8b8f876bd
|
@ -69,7 +69,7 @@ DialogDetachedVideo::DialogDetachedVideo(FrameMain *parent, agi::Context *contex
|
||||||
SetExtraStyle((GetExtraStyle() & ~wxWS_EX_BLOCK_EVENTS) | wxWS_EX_PROCESS_UI_UPDATES);
|
SetExtraStyle((GetExtraStyle() & ~wxWS_EX_BLOCK_EVENTS) | wxWS_EX_PROCESS_UI_UPDATES);
|
||||||
|
|
||||||
// Set title
|
// Set title
|
||||||
wxFileName fn(VideoContext::Get()->videoName);
|
wxFileName fn(context->videoController->videoName);
|
||||||
SetTitle(wxString::Format(_("Video: %s"),fn.GetFullName().c_str()));
|
SetTitle(wxString::Format(_("Video: %s"),fn.GetFullName().c_str()));
|
||||||
|
|
||||||
// Set a background panel
|
// Set a background panel
|
||||||
|
|
|
@ -103,7 +103,7 @@ DialogResample::DialogResample(agi::Context *c)
|
||||||
ResY = new wxTextCtrl(this,-1,"",wxDefaultPosition,wxSize(50,-1),0,NumValidator(wxString::Format("%i",sh)));
|
ResY = new wxTextCtrl(this,-1,"",wxDefaultPosition,wxSize(50,-1),0,NumValidator(wxString::Format("%i",sh)));
|
||||||
wxStaticText *ResText = new wxStaticText(this,-1,_("x"));
|
wxStaticText *ResText = new wxStaticText(this,-1,_("x"));
|
||||||
wxButton *FromVideo = new wxButton(this,BUTTON_DEST_FROM_VIDEO,_("From video"));
|
wxButton *FromVideo = new wxButton(this,BUTTON_DEST_FROM_VIDEO,_("From video"));
|
||||||
if (!VideoContext::Get()->IsLoaded()) FromVideo->Enable(false);
|
if (!c->videoController->IsLoaded()) FromVideo->Enable(false);
|
||||||
ResSizer->Add(ResX,1,wxRIGHT,5);
|
ResSizer->Add(ResX,1,wxRIGHT,5);
|
||||||
ResSizer->Add(ResText,0,wxALIGN_CENTER | wxRIGHT,5);
|
ResSizer->Add(ResText,0,wxALIGN_CENTER | wxRIGHT,5);
|
||||||
ResSizer->Add(ResY,1,wxRIGHT,5);
|
ResSizer->Add(ResY,1,wxRIGHT,5);
|
||||||
|
@ -331,8 +331,8 @@ void DialogResample::OnResample (wxCommandEvent &event) {
|
||||||
/// @param event
|
/// @param event
|
||||||
///
|
///
|
||||||
void DialogResample::OnGetDestRes (wxCommandEvent &event) {
|
void DialogResample::OnGetDestRes (wxCommandEvent &event) {
|
||||||
ResX->SetValue(wxString::Format(_T("%i"),VideoContext::Get()->GetWidth()));
|
ResX->SetValue(wxString::Format(_T("%i"),c->videoController->GetWidth()));
|
||||||
ResY->SetValue(wxString::Format(_T("%i"),VideoContext::Get()->GetHeight()));
|
ResY->SetValue(wxString::Format(_T("%i"),c->videoController->GetHeight()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue