From b286339ce0fbe6eb7e9b03e93b471ba8defd9b4e Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Thu, 20 Jan 2011 05:57:53 +0000 Subject: [PATCH] Eliminate a few uses of VideoContext::Get() Originally committed to SVN as r5251. --- aegisub/src/dialog_shift_times.cpp | 2 +- aegisub/src/dialog_timing_processor.cpp | 2 +- aegisub/src/dialog_translation.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/aegisub/src/dialog_shift_times.cpp b/aegisub/src/dialog_shift_times.cpp index 5f6846a16..82801fd53 100644 --- a/aegisub/src/dialog_shift_times.cpp +++ b/aegisub/src/dialog_shift_times.cpp @@ -98,7 +98,7 @@ DialogShiftTimes::DialogShiftTimes (agi::Context *context) ShiftTime->SetToolTip(_("Enter time in h:mm:ss.cs notation")); RadioTime->SetToolTip(_("Shift by time")); ShiftFrame->Disable(); - if (!VideoContext::Get()->TimecodesLoaded()) RadioFrames->Disable(); + if (!context->videoController->TimecodesLoaded()) RadioFrames->Disable(); else { ShiftFrame->SetToolTip(_("Enter number of frames to shift by")); RadioFrames->SetToolTip(_("Shift by frames")); diff --git a/aegisub/src/dialog_timing_processor.cpp b/aegisub/src/dialog_timing_processor.cpp index d4b1bc258..ca553ebac 100644 --- a/aegisub/src/dialog_timing_processor.cpp +++ b/aegisub/src/dialog_timing_processor.cpp @@ -220,7 +220,7 @@ void DialogTimingProcessor::UpdateControls() { adjacentBias->Enable(adjsEnable->IsChecked()); // Keyframes are only available if timecodes are loaded - bool keysAvailable = VideoContext::Get()->KeyFramesLoaded(); + bool keysAvailable = c->videoController->KeyFramesLoaded(); bool enableKeys = keysEnable->IsChecked() && keysAvailable; keysStartBefore->Enable(enableKeys); keysStartAfter->Enable(enableKeys); diff --git a/aegisub/src/dialog_translation.cpp b/aegisub/src/dialog_translation.cpp index 08d5a0aea..988f51d61 100644 --- a/aegisub/src/dialog_translation.cpp +++ b/aegisub/src/dialog_translation.cpp @@ -259,9 +259,9 @@ bool DialogTranslation::JumpToLine(int n,int block) { void DialogTranslation::UpdatePreview () { if (enablePreview) { try { - if (VideoContext::Get()->IsLoaded()) { + if (video->IsLoaded()) { AssDialogue *cur = grid->GetDialogue(curline); - VideoContext::Get()->JumpToTime(cur->Start.GetMS()); + video->JumpToTime(cur->Start.GetMS()); } } catch (...) {