Eliminate a few uses of VideoContext::Get()

Originally committed to SVN as r5251.
This commit is contained in:
Thomas Goyne 2011-01-20 05:57:53 +00:00
parent 9ec1e1ba79
commit b286339ce0
3 changed files with 4 additions and 4 deletions

View file

@ -98,7 +98,7 @@ DialogShiftTimes::DialogShiftTimes (agi::Context *context)
ShiftTime->SetToolTip(_("Enter time in h:mm:ss.cs notation")); ShiftTime->SetToolTip(_("Enter time in h:mm:ss.cs notation"));
RadioTime->SetToolTip(_("Shift by time")); RadioTime->SetToolTip(_("Shift by time"));
ShiftFrame->Disable(); ShiftFrame->Disable();
if (!VideoContext::Get()->TimecodesLoaded()) RadioFrames->Disable(); if (!context->videoController->TimecodesLoaded()) RadioFrames->Disable();
else { else {
ShiftFrame->SetToolTip(_("Enter number of frames to shift by")); ShiftFrame->SetToolTip(_("Enter number of frames to shift by"));
RadioFrames->SetToolTip(_("Shift by frames")); RadioFrames->SetToolTip(_("Shift by frames"));

View file

@ -220,7 +220,7 @@ void DialogTimingProcessor::UpdateControls() {
adjacentBias->Enable(adjsEnable->IsChecked()); adjacentBias->Enable(adjsEnable->IsChecked());
// Keyframes are only available if timecodes are loaded // Keyframes are only available if timecodes are loaded
bool keysAvailable = VideoContext::Get()->KeyFramesLoaded(); bool keysAvailable = c->videoController->KeyFramesLoaded();
bool enableKeys = keysEnable->IsChecked() && keysAvailable; bool enableKeys = keysEnable->IsChecked() && keysAvailable;
keysStartBefore->Enable(enableKeys); keysStartBefore->Enable(enableKeys);
keysStartAfter->Enable(enableKeys); keysStartAfter->Enable(enableKeys);

View file

@ -259,9 +259,9 @@ bool DialogTranslation::JumpToLine(int n,int block) {
void DialogTranslation::UpdatePreview () { void DialogTranslation::UpdatePreview () {
if (enablePreview) { if (enablePreview) {
try { try {
if (VideoContext::Get()->IsLoaded()) { if (video->IsLoaded()) {
AssDialogue *cur = grid->GetDialogue(curline); AssDialogue *cur = grid->GetDialogue(curline);
VideoContext::Get()->JumpToTime(cur->Start.GetMS()); video->JumpToTime(cur->Start.GetMS());
} }
} }
catch (...) { catch (...) {