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"));
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"));

View file

@ -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);

View file

@ -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 (...) {