forked from mia/Aegisub
Eliminate a few uses of VideoContext::Get()
Originally committed to SVN as r5251.
This commit is contained in:
parent
9ec1e1ba79
commit
b286339ce0
3 changed files with 4 additions and 4 deletions
|
@ -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"));
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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 (...) {
|
||||||
|
|
Loading…
Reference in a new issue