mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 11:12:36 +01:00
Fixing shortcuts from 72bcc93c74
+ added an extra one
This commit is contained in:
parent
3405755824
commit
f1db81ded2
@ -1828,6 +1828,7 @@ can edit in same subtitle file (collaboration)</Information>
|
|||||||
<AdjustSetStartTimeKeepDuration>Set start time, keep duration</AdjustSetStartTimeKeepDuration>
|
<AdjustSetStartTimeKeepDuration>Set start time, keep duration</AdjustSetStartTimeKeepDuration>
|
||||||
<AdjustSetEndAndOffsetTheRest>Set end, offset the rest</AdjustSetEndAndOffsetTheRest>
|
<AdjustSetEndAndOffsetTheRest>Set end, offset the rest</AdjustSetEndAndOffsetTheRest>
|
||||||
<AdjustSetEndAndOffsetTheRestAndGoToNext>Set end, offset the rest and go to next</AdjustSetEndAndOffsetTheRestAndGoToNext>
|
<AdjustSetEndAndOffsetTheRestAndGoToNext>Set end, offset the rest and go to next</AdjustSetEndAndOffsetTheRestAndGoToNext>
|
||||||
|
<AdjustExtendCurrentSubtitle>Extend current line to next subtitle or max duration</AdjustExtendCurrentSubtitle>
|
||||||
<MainCreateStartDownEndUp>Create new at key-down, set end time at key-up</MainCreateStartDownEndUp>
|
<MainCreateStartDownEndUp>Create new at key-down, set end time at key-up</MainCreateStartDownEndUp>
|
||||||
<MergeDialog>Merge dialog (insert dashes)</MergeDialog>
|
<MergeDialog>Merge dialog (insert dashes)</MergeDialog>
|
||||||
<GoToNext>Go to next line</GoToNext>
|
<GoToNext>Go to next line</GoToNext>
|
||||||
@ -1835,7 +1836,6 @@ can edit in same subtitle file (collaboration)</Information>
|
|||||||
<GoToCurrentSubtitleStart>Go to current line start</GoToCurrentSubtitleStart>
|
<GoToCurrentSubtitleStart>Go to current line start</GoToCurrentSubtitleStart>
|
||||||
<GoToCurrentSubtitleEnd>Go to current line end</GoToCurrentSubtitleEnd>
|
<GoToCurrentSubtitleEnd>Go to current line end</GoToCurrentSubtitleEnd>
|
||||||
<GoToNextSubtitleAndFocusVideo>Go to next line and set video position</GoToNextSubtitleAndFocusVideo>
|
<GoToNextSubtitleAndFocusVideo>Go to next line and set video position</GoToNextSubtitleAndFocusVideo>
|
||||||
<ExtendCurrentSubtitle>Extend current line to next subtitle or max duration</ExtendCurrentSubtitle>
|
|
||||||
<ToggleFocus>Toggle focus between list view and subtitle text box</ToggleFocus>
|
<ToggleFocus>Toggle focus between list view and subtitle text box</ToggleFocus>
|
||||||
<ToggleDialogDashes>Toggle dialog dashes</ToggleDialogDashes>
|
<ToggleDialogDashes>Toggle dialog dashes</ToggleDialogDashes>
|
||||||
<Alignment>Alignment (selected lines)</Alignment>
|
<Alignment>Alignment (selected lines)</Alignment>
|
||||||
@ -1854,6 +1854,7 @@ can edit in same subtitle file (collaboration)</Information>
|
|||||||
<WaveformPlayFirstSelectedSubtitle>Play first selected subtitle</WaveformPlayFirstSelectedSubtitle>
|
<WaveformPlayFirstSelectedSubtitle>Play first selected subtitle</WaveformPlayFirstSelectedSubtitle>
|
||||||
<WaveformFocusListView>Focus list view</WaveformFocusListView>
|
<WaveformFocusListView>Focus list view</WaveformFocusListView>
|
||||||
<WaveformGoToNextSceneChange>Go to next scene change</WaveformGoToNextSceneChange>
|
<WaveformGoToNextSceneChange>Go to next scene change</WaveformGoToNextSceneChange>
|
||||||
|
<WaveformToggleSceneChange>Toggle scene change</WaveformToggleSceneChange>
|
||||||
<GoBack1Frame>One frame back</GoBack1Frame>
|
<GoBack1Frame>One frame back</GoBack1Frame>
|
||||||
<GoForward1Frame>One frame forward</GoForward1Frame>
|
<GoForward1Frame>One frame forward</GoForward1Frame>
|
||||||
<GoBack100Milliseconds>100 ms back</GoBack100Milliseconds>
|
<GoBack100Milliseconds>100 ms back</GoBack100Milliseconds>
|
||||||
|
@ -2117,7 +2117,7 @@ can edit in same subtitle file (collaboration)",
|
|||||||
GoToCurrentSubtitleStart = "Go to current line start",
|
GoToCurrentSubtitleStart = "Go to current line start",
|
||||||
GoToCurrentSubtitleEnd = "Go to current line end",
|
GoToCurrentSubtitleEnd = "Go to current line end",
|
||||||
GoToNextSubtitleAndFocusVideo = "Go to next line and set video position",
|
GoToNextSubtitleAndFocusVideo = "Go to next line and set video position",
|
||||||
ExtendCurrentSubtitle = "Extend current line to next subtitle or max duration",
|
AdjustExtendCurrentSubtitle = "Extend current line to next subtitle or max duration",
|
||||||
ToggleFocus = "Toggle focus between list view and subtitle text box",
|
ToggleFocus = "Toggle focus between list view and subtitle text box",
|
||||||
ToggleDialogDashes = "Toggle dialog dashes",
|
ToggleDialogDashes = "Toggle dialog dashes",
|
||||||
Alignment = "Alignment (selected lines)",
|
Alignment = "Alignment (selected lines)",
|
||||||
@ -2136,6 +2136,7 @@ can edit in same subtitle file (collaboration)",
|
|||||||
WaveformPlayFirstSelectedSubtitle = "Play first selected subtitle",
|
WaveformPlayFirstSelectedSubtitle = "Play first selected subtitle",
|
||||||
WaveformFocusListView = "Focus list view",
|
WaveformFocusListView = "Focus list view",
|
||||||
WaveformGoToNextSceneChange = "Go to next scene change",
|
WaveformGoToNextSceneChange = "Go to next scene change",
|
||||||
|
WaveformToggleSceneChange = "Toggle scene change",
|
||||||
GoBack1Frame = "One frame back",
|
GoBack1Frame = "One frame back",
|
||||||
GoForward1Frame = "One frame forward",
|
GoForward1Frame = "One frame forward",
|
||||||
GoBack100Milliseconds = "100 ms back",
|
GoBack100Milliseconds = "100 ms back",
|
||||||
|
@ -4933,6 +4933,9 @@ namespace Nikse.SubtitleEdit.Core
|
|||||||
case "Settings/AdjustSetEndAndOffsetTheRestAndGoToNext":
|
case "Settings/AdjustSetEndAndOffsetTheRestAndGoToNext":
|
||||||
language.Settings.AdjustSetEndAndOffsetTheRestAndGoToNext = reader.Value;
|
language.Settings.AdjustSetEndAndOffsetTheRestAndGoToNext = reader.Value;
|
||||||
break;
|
break;
|
||||||
|
case "Settings/AdjustExtendCurrentSubtitle":
|
||||||
|
language.Settings.AdjustExtendCurrentSubtitle = reader.Value;
|
||||||
|
break;
|
||||||
case "Settings/MainCreateStartDownEndUp":
|
case "Settings/MainCreateStartDownEndUp":
|
||||||
language.Settings.MainCreateStartDownEndUp = reader.Value;
|
language.Settings.MainCreateStartDownEndUp = reader.Value;
|
||||||
break;
|
break;
|
||||||
@ -4954,9 +4957,6 @@ namespace Nikse.SubtitleEdit.Core
|
|||||||
case "Settings/GoToNextSubtitleAndFocusVideo":
|
case "Settings/GoToNextSubtitleAndFocusVideo":
|
||||||
language.Settings.GoToNextSubtitleAndFocusVideo = reader.Value;
|
language.Settings.GoToNextSubtitleAndFocusVideo = reader.Value;
|
||||||
break;
|
break;
|
||||||
case "Settings/ExtendCurrentSubtitle":
|
|
||||||
language.Settings.ExtendCurrentSubtitle = reader.Value;
|
|
||||||
break;
|
|
||||||
case "Settings/ToggleFocus":
|
case "Settings/ToggleFocus":
|
||||||
language.Settings.ToggleFocus = reader.Value;
|
language.Settings.ToggleFocus = reader.Value;
|
||||||
break;
|
break;
|
||||||
@ -5011,6 +5011,9 @@ namespace Nikse.SubtitleEdit.Core
|
|||||||
case "Settings/WaveformGoToNextSceneChange":
|
case "Settings/WaveformGoToNextSceneChange":
|
||||||
language.Settings.WaveformGoToNextSceneChange = reader.Value;
|
language.Settings.WaveformGoToNextSceneChange = reader.Value;
|
||||||
break;
|
break;
|
||||||
|
case "Settings/WaveformToggleSceneChange":
|
||||||
|
language.Settings.WaveformToggleSceneChange = reader.Value;
|
||||||
|
break;
|
||||||
case "Settings/GoBack1Frame":
|
case "Settings/GoBack1Frame":
|
||||||
language.Settings.GoBack1Frame = reader.Value;
|
language.Settings.GoBack1Frame = reader.Value;
|
||||||
break;
|
break;
|
||||||
|
@ -1990,6 +1990,7 @@
|
|||||||
public string AdjustSetStartTimeKeepDuration { get; set; }
|
public string AdjustSetStartTimeKeepDuration { get; set; }
|
||||||
public string AdjustSetEndAndOffsetTheRest { get; set; }
|
public string AdjustSetEndAndOffsetTheRest { get; set; }
|
||||||
public string AdjustSetEndAndOffsetTheRestAndGoToNext { get; set; }
|
public string AdjustSetEndAndOffsetTheRestAndGoToNext { get; set; }
|
||||||
|
public string AdjustExtendCurrentSubtitle { get; set; }
|
||||||
public string MainCreateStartDownEndUp { get; set; }
|
public string MainCreateStartDownEndUp { get; set; }
|
||||||
public string MergeDialog { get; set; }
|
public string MergeDialog { get; set; }
|
||||||
public string GoToNext { get; set; }
|
public string GoToNext { get; set; }
|
||||||
@ -1997,7 +1998,6 @@
|
|||||||
public string GoToCurrentSubtitleStart { get; set; }
|
public string GoToCurrentSubtitleStart { get; set; }
|
||||||
public string GoToCurrentSubtitleEnd { get; set; }
|
public string GoToCurrentSubtitleEnd { get; set; }
|
||||||
public string GoToNextSubtitleAndFocusVideo { get; set; }
|
public string GoToNextSubtitleAndFocusVideo { get; set; }
|
||||||
public string ExtendCurrentSubtitle { get; set; }
|
|
||||||
public string ToggleFocus { get; set; }
|
public string ToggleFocus { get; set; }
|
||||||
public string ToggleDialogDashes { get; set; }
|
public string ToggleDialogDashes { get; set; }
|
||||||
public string Alignment { get; set; }
|
public string Alignment { get; set; }
|
||||||
@ -2016,6 +2016,7 @@
|
|||||||
public string WaveformPlayFirstSelectedSubtitle { get; set; }
|
public string WaveformPlayFirstSelectedSubtitle { get; set; }
|
||||||
public string WaveformFocusListView { get; set; }
|
public string WaveformFocusListView { get; set; }
|
||||||
public string WaveformGoToNextSceneChange { get; set; }
|
public string WaveformGoToNextSceneChange { get; set; }
|
||||||
|
public string WaveformToggleSceneChange { get; set; }
|
||||||
public string GoBack1Frame { get; set; }
|
public string GoBack1Frame { get; set; }
|
||||||
public string GoForward1Frame { get; set; }
|
public string GoForward1Frame { get; set; }
|
||||||
public string GoBack100Milliseconds { get; set; }
|
public string GoBack100Milliseconds { get; set; }
|
||||||
|
@ -36,7 +36,7 @@ namespace Nikse.SubtitleEdit.Core
|
|||||||
|
|
||||||
public void Add(string fileName, int firstVisibleIndex, int firstSelectedIndex, string videoFileName, string originalFileName, long videoOffset)
|
public void Add(string fileName, int firstVisibleIndex, int firstSelectedIndex, string videoFileName, string originalFileName, long videoOffset)
|
||||||
{
|
{
|
||||||
var newList = new List<RecentFileEntry> { new RecentFileEntry { FileName = fileName, FirstVisibleIndex = firstVisibleIndex, FirstSelectedIndex = firstSelectedIndex, VideoFileName = videoFileName, OriginalFileName = originalFileName, VideoOffsetInMs = videoOffset } };
|
var newList = new List<RecentFileEntry> { new RecentFileEntry { FileName = fileName, FirstVisibleIndex = firstVisibleIndex, FirstSelectedIndex = firstSelectedIndex, VideoFileName = videoFileName, OriginalFileName = originalFileName, VideoOffsetInMs = videoOffset } };
|
||||||
int index = 0;
|
int index = 0;
|
||||||
foreach (var oldRecentFile in Files)
|
foreach (var oldRecentFile in Files)
|
||||||
{
|
{
|
||||||
@ -933,6 +933,7 @@ namespace Nikse.SubtitleEdit.Core
|
|||||||
public string WaveformAddTextHereFromClipboard { get; set; }
|
public string WaveformAddTextHereFromClipboard { get; set; }
|
||||||
public string WaveformFocusListView { get; set; }
|
public string WaveformFocusListView { get; set; }
|
||||||
public string WaveformGoToNextSceneChange { get; set; }
|
public string WaveformGoToNextSceneChange { get; set; }
|
||||||
|
public string WaveformToggleSceneChange { get; set; }
|
||||||
public string MainTranslateCustomSearch1 { get; set; }
|
public string MainTranslateCustomSearch1 { get; set; }
|
||||||
public string MainTranslateCustomSearch2 { get; set; }
|
public string MainTranslateCustomSearch2 { get; set; }
|
||||||
public string MainTranslateCustomSearch3 { get; set; }
|
public string MainTranslateCustomSearch3 { get; set; }
|
||||||
@ -2748,7 +2749,10 @@ namespace Nikse.SubtitleEdit.Core
|
|||||||
settings.Shortcuts.WaveformFocusListView = subNode.InnerText;
|
settings.Shortcuts.WaveformFocusListView = subNode.InnerText;
|
||||||
subNode = node.SelectSingleNode("WaveformGoToNextSceneChange");
|
subNode = node.SelectSingleNode("WaveformGoToNextSceneChange");
|
||||||
if (subNode != null)
|
if (subNode != null)
|
||||||
settings.Shortcuts.WaveformGoToNextSceneChange = subNode.InnerText;
|
settings.Shortcuts.WaveformGoToNextSceneChange = subNode.InnerText;
|
||||||
|
subNode = node.SelectSingleNode("WaveformToggleSceneChange");
|
||||||
|
if (subNode != null)
|
||||||
|
settings.Shortcuts.WaveformToggleSceneChange = subNode.InnerText;
|
||||||
subNode = node.SelectSingleNode("MainTranslateCustomSearch1");
|
subNode = node.SelectSingleNode("MainTranslateCustomSearch1");
|
||||||
if (subNode != null)
|
if (subNode != null)
|
||||||
settings.Shortcuts.MainTranslateCustomSearch1 = subNode.InnerText;
|
settings.Shortcuts.MainTranslateCustomSearch1 = subNode.InnerText;
|
||||||
@ -3389,7 +3393,8 @@ namespace Nikse.SubtitleEdit.Core
|
|||||||
textWriter.WriteElementString("WaveformAddTextHere", settings.Shortcuts.WaveformAddTextHere);
|
textWriter.WriteElementString("WaveformAddTextHere", settings.Shortcuts.WaveformAddTextHere);
|
||||||
textWriter.WriteElementString("WaveformAddTextHereFromClipboard", settings.Shortcuts.WaveformAddTextHereFromClipboard);
|
textWriter.WriteElementString("WaveformAddTextHereFromClipboard", settings.Shortcuts.WaveformAddTextHereFromClipboard);
|
||||||
textWriter.WriteElementString("WaveformFocusListView", settings.Shortcuts.WaveformFocusListView);
|
textWriter.WriteElementString("WaveformFocusListView", settings.Shortcuts.WaveformFocusListView);
|
||||||
textWriter.WriteElementString("WaveformGoToNextSceneChange", settings.Shortcuts.WaveformGoToNextSceneChange);
|
textWriter.WriteElementString("WaveformGoToNextSceneChange", settings.Shortcuts.WaveformGoToNextSceneChange);
|
||||||
|
textWriter.WriteElementString("WaveformToggleSceneChange", settings.Shortcuts.WaveformToggleSceneChange);
|
||||||
textWriter.WriteElementString("MainTranslateCustomSearch1", settings.Shortcuts.MainTranslateCustomSearch1);
|
textWriter.WriteElementString("MainTranslateCustomSearch1", settings.Shortcuts.MainTranslateCustomSearch1);
|
||||||
textWriter.WriteElementString("MainTranslateCustomSearch2", settings.Shortcuts.MainTranslateCustomSearch2);
|
textWriter.WriteElementString("MainTranslateCustomSearch2", settings.Shortcuts.MainTranslateCustomSearch2);
|
||||||
textWriter.WriteElementString("MainTranslateCustomSearch3", settings.Shortcuts.MainTranslateCustomSearch3);
|
textWriter.WriteElementString("MainTranslateCustomSearch3", settings.Shortcuts.MainTranslateCustomSearch3);
|
||||||
|
@ -505,18 +505,35 @@ namespace Nikse.SubtitleEdit.Controls
|
|||||||
DrawTimeLine(graphics, waveformHeight);
|
DrawTimeLine(graphics, waveformHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int currentPositionPos = SecondsToXPosition(_currentVideoPositionSeconds - StartPositionSeconds);
|
||||||
|
bool currentPosDone = false;
|
||||||
|
|
||||||
// scene changes
|
// scene changes
|
||||||
if (_sceneChanges != null)
|
if (_sceneChanges != null)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
foreach (double time in _sceneChanges)
|
int index = 0;
|
||||||
|
while (index < _sceneChanges.Count)
|
||||||
{
|
{
|
||||||
|
double time = _sceneChanges[index++];
|
||||||
int pos = SecondsToXPosition(time - StartPositionSeconds);
|
int pos = SecondsToXPosition(time - StartPositionSeconds);
|
||||||
if (pos > 0 && pos < Width)
|
if (pos > 0 && pos < Width)
|
||||||
{
|
{
|
||||||
using (var p = new Pen(Color.AntiqueWhite))
|
if (Math.Abs(currentPositionPos - pos) < 0.01)
|
||||||
graphics.DrawLine(p, pos, 0, pos, Height);
|
{ // scene change and current pos is the save - draw 2 pixels + current pos dotted
|
||||||
|
currentPosDone = true;
|
||||||
|
using (var p = new Pen(Color.AntiqueWhite, 2))
|
||||||
|
graphics.DrawLine(p, pos, 0, pos, Height);
|
||||||
|
using (var p = new Pen(Color.Turquoise, 2) { DashStyle = DashStyle.Dash })
|
||||||
|
graphics.DrawLine(p, currentPositionPos, 0, currentPositionPos, Height);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
using (var p = new Pen(Color.AntiqueWhite))
|
||||||
|
graphics.DrawLine(p, pos, 0, pos, Height);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -527,13 +544,12 @@ namespace Nikse.SubtitleEdit.Controls
|
|||||||
}
|
}
|
||||||
|
|
||||||
// current video position
|
// current video position
|
||||||
if (_currentVideoPositionSeconds > 0)
|
if (_currentVideoPositionSeconds > 0 && !currentPosDone)
|
||||||
{
|
{
|
||||||
int pos = SecondsToXPosition(_currentVideoPositionSeconds - StartPositionSeconds);
|
if (currentPositionPos > 0 && currentPositionPos < Width)
|
||||||
if (pos > 0 && pos < Width)
|
|
||||||
{
|
{
|
||||||
using (var p = new Pen(Color.Turquoise))
|
using (var p = new Pen(Color.Turquoise))
|
||||||
graphics.DrawLine(p, pos, 0, pos, Height);
|
graphics.DrawLine(p, currentPositionPos, 0, currentPositionPos, Height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
private Keys _videoPlayFirstSelected = Keys.None;
|
private Keys _videoPlayFirstSelected = Keys.None;
|
||||||
private Keys _mainVideoFullscreen = Keys.None;
|
private Keys _mainVideoFullscreen = Keys.None;
|
||||||
private Keys _mainGoToNextSubtitleAndFocusVideo = Keys.None;
|
private Keys _mainGoToNextSubtitleAndFocusVideo = Keys.None;
|
||||||
private Keys _mainExtendCurrentSubtitle = Keys.None;
|
private Keys _mainAdjustExtendCurrentSubtitle = Keys.None;
|
||||||
private Keys _mainTextBoxSplitAtCursor = Keys.None;
|
private Keys _mainTextBoxSplitAtCursor = Keys.None;
|
||||||
private Keys _mainTextBoxMoveLastWordDown = Keys.None;
|
private Keys _mainTextBoxMoveLastWordDown = Keys.None;
|
||||||
private Keys _mainTextBoxMoveFirstWordFromNextUp = Keys.None;
|
private Keys _mainTextBoxMoveFirstWordFromNextUp = Keys.None;
|
||||||
@ -201,6 +201,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
private Keys _waveformAddTextAtHereFromClipboard = Keys.None;
|
private Keys _waveformAddTextAtHereFromClipboard = Keys.None;
|
||||||
private Keys _waveformFocusListView = Keys.None;
|
private Keys _waveformFocusListView = Keys.None;
|
||||||
private Keys _waveformGoToNextSceneChange = Keys.None;
|
private Keys _waveformGoToNextSceneChange = Keys.None;
|
||||||
|
private Keys _waveformToggleSceneChange = Keys.None;
|
||||||
private Keys _mainTranslateCustomSearch1 = Keys.None;
|
private Keys _mainTranslateCustomSearch1 = Keys.None;
|
||||||
private Keys _mainTranslateCustomSearch2 = Keys.None;
|
private Keys _mainTranslateCustomSearch2 = Keys.None;
|
||||||
private Keys _mainTranslateCustomSearch3 = Keys.None;
|
private Keys _mainTranslateCustomSearch3 = Keys.None;
|
||||||
@ -10872,7 +10873,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
}
|
}
|
||||||
e.SuppressKeyPress = true;
|
e.SuppressKeyPress = true;
|
||||||
}
|
}
|
||||||
else if (_mainGeneralGoToStartOfCurrentSubtitle == e.KeyData)
|
else if (_mainGoToNextSubtitleAndFocusVideo == e.KeyData)
|
||||||
{
|
{
|
||||||
int newIndex = _subtitleListViewIndex + 1;
|
int newIndex = _subtitleListViewIndex + 1;
|
||||||
if (newIndex < _subtitle.Paragraphs.Count)
|
if (newIndex < _subtitle.Paragraphs.Count)
|
||||||
@ -10888,27 +10889,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
ShowSubtitle();
|
ShowSubtitle();
|
||||||
e.SuppressKeyPress = true;
|
e.SuppressKeyPress = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (_mainExtendCurrentSubtitle == e.KeyData)
|
|
||||||
{
|
|
||||||
if (SubtitleListview1.SelectedItems.Count == 1)
|
|
||||||
{
|
|
||||||
var idx = SubtitleListview1.SelectedItems[0].Index;
|
|
||||||
var p = _subtitle.Paragraphs[idx];
|
|
||||||
var next = _subtitle.GetParagraphOrDefault(idx + 1);
|
|
||||||
if (next == null || next.StartTime.TotalMilliseconds > p.EndTime.TotalMilliseconds + Configuration.Settings.General.SubtitleMaximumDisplayMilliseconds + Configuration.Settings.General.MinimumMillisecondsBetweenLines)
|
|
||||||
{
|
|
||||||
p.EndTime.TotalMilliseconds = p.StartTime.TotalMilliseconds + Configuration.Settings.General.SubtitleMaximumDisplayMilliseconds;
|
|
||||||
}
|
|
||||||
else if (next != null && next.StartTime.TotalMilliseconds > p.EndTime.TotalMilliseconds)
|
|
||||||
{
|
|
||||||
p.EndTime.TotalMilliseconds = next.StartTime.TotalMilliseconds - Configuration.Settings.General.MinimumMillisecondsBetweenLines;
|
|
||||||
}
|
|
||||||
RefreshSelectedParagraph();
|
|
||||||
e.SuppressKeyPress = true;
|
|
||||||
}
|
|
||||||
e.SuppressKeyPress = true;
|
|
||||||
}
|
|
||||||
else if (_mainGeneralFileSaveAll == e.KeyData)
|
else if (_mainGeneralFileSaveAll == e.KeyData)
|
||||||
{
|
{
|
||||||
ToolStripButtonSaveClick(sender, e);
|
ToolStripButtonSaveClick(sender, e);
|
||||||
@ -11289,7 +11270,8 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
else if (e.KeyData == _mainVideoFullscreen) // fullscreen
|
else if (e.KeyData == _mainVideoFullscreen) // fullscreen
|
||||||
{
|
{
|
||||||
GoFullscreen();
|
GoFullscreen();
|
||||||
}
|
e.SuppressKeyPress = true;
|
||||||
|
}
|
||||||
else if (audioVisualizer.Focused && audioVisualizer.NewSelectionParagraph != null && e.KeyData == _waveformAddTextAtHere)
|
else if (audioVisualizer.Focused && audioVisualizer.NewSelectionParagraph != null && e.KeyData == _waveformAddTextAtHere)
|
||||||
{
|
{
|
||||||
addParagraphHereToolStripMenuItem_Click(null, null);
|
addParagraphHereToolStripMenuItem_Click(null, null);
|
||||||
@ -11317,7 +11299,29 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
e.SuppressKeyPress = true;
|
e.SuppressKeyPress = true;
|
||||||
}
|
}
|
||||||
|
else if (audioVisualizer.SceneChanges != null && mediaPlayer.IsPaused && e.KeyData == _waveformToggleSceneChange)
|
||||||
|
{
|
||||||
|
var cp = mediaPlayer.CurrentPosition;
|
||||||
|
var idx = GetSceneChangeIndex(cp);
|
||||||
|
if (idx >= 0)
|
||||||
|
{ // remove scene change
|
||||||
|
if (idx < audioVisualizer.SceneChanges.Count)
|
||||||
|
{
|
||||||
|
audioVisualizer.SceneChanges[idx] = -1;
|
||||||
|
SceneChangeHelper.SaveSceneChanges(_videoFileName, audioVisualizer.SceneChanges.Where(p => p > 0).ToList());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ // add scene change
|
||||||
|
var list = audioVisualizer.SceneChanges.Where(p => p > 0).ToList();
|
||||||
|
list.Add(cp);
|
||||||
|
list.Sort();
|
||||||
|
audioVisualizer.SceneChanges = list;
|
||||||
|
SceneChangeHelper.SaveSceneChanges(_videoFileName, list);
|
||||||
|
}
|
||||||
|
e.SuppressKeyPress = true;
|
||||||
|
}
|
||||||
else if (audioVisualizer.Focused && e.KeyCode == Keys.Delete)
|
else if (audioVisualizer.Focused && e.KeyCode == Keys.Delete)
|
||||||
{
|
{
|
||||||
ToolStripMenuItemDeleteClick(null, null);
|
ToolStripMenuItemDeleteClick(null, null);
|
||||||
@ -11382,6 +11386,26 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
SetEndAndOffsetTheRest(true);
|
SetEndAndOffsetTheRest(true);
|
||||||
e.SuppressKeyPress = true;
|
e.SuppressKeyPress = true;
|
||||||
}
|
}
|
||||||
|
else if (_mainAdjustExtendCurrentSubtitle == e.KeyData)
|
||||||
|
{
|
||||||
|
if (SubtitleListview1.SelectedItems.Count == 1)
|
||||||
|
{
|
||||||
|
var idx = SubtitleListview1.SelectedItems[0].Index;
|
||||||
|
var p = _subtitle.Paragraphs[idx];
|
||||||
|
var next = _subtitle.GetParagraphOrDefault(idx + 1);
|
||||||
|
if (next == null || next.StartTime.TotalMilliseconds > p.EndTime.TotalMilliseconds + Configuration.Settings.General.SubtitleMaximumDisplayMilliseconds + Configuration.Settings.General.MinimumMillisecondsBetweenLines)
|
||||||
|
{
|
||||||
|
p.EndTime.TotalMilliseconds = p.StartTime.TotalMilliseconds + Configuration.Settings.General.SubtitleMaximumDisplayMilliseconds;
|
||||||
|
}
|
||||||
|
else if (next != null && next.StartTime.TotalMilliseconds > p.EndTime.TotalMilliseconds)
|
||||||
|
{
|
||||||
|
p.EndTime.TotalMilliseconds = next.StartTime.TotalMilliseconds - Configuration.Settings.General.MinimumMillisecondsBetweenLines;
|
||||||
|
}
|
||||||
|
RefreshSelectedParagraph();
|
||||||
|
e.SuppressKeyPress = true;
|
||||||
|
}
|
||||||
|
e.SuppressKeyPress = true;
|
||||||
|
}
|
||||||
else if (_mainAdjustSetEndAndGotoNext == e.KeyData)
|
else if (_mainAdjustSetEndAndGotoNext == e.KeyData)
|
||||||
{
|
{
|
||||||
ButtonSetEndAndGoToNextClick(null, null);
|
ButtonSetEndAndGoToNextClick(null, null);
|
||||||
@ -11492,7 +11516,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
{
|
{
|
||||||
double videoPosition = mediaPlayer.CurrentPosition;
|
double videoPosition = mediaPlayer.CurrentPosition;
|
||||||
if (!mediaPlayer.IsPaused)
|
if (!mediaPlayer.IsPaused)
|
||||||
videoPosition -= Configuration.Settings.General.SetStartEndHumanDelay / TimeCode.BaseUnit;
|
videoPosition -= Configuration.Settings.General.SetStartEndHumanDelay/TimeCode.BaseUnit;
|
||||||
int index = SubtitleListview1.SelectedItems[0].Index;
|
int index = SubtitleListview1.SelectedItems[0].Index;
|
||||||
MakeHistoryForUndoOnlyIfNotResent(string.Format(_language.VideoControls.BeforeChangingTimeInWaveformX, "#" + _subtitle.Paragraphs[index].Number + " " + _subtitle.Paragraphs[index].Text));
|
MakeHistoryForUndoOnlyIfNotResent(string.Format(_language.VideoControls.BeforeChangingTimeInWaveformX, "#" + _subtitle.Paragraphs[index].Number + " " + _subtitle.Paragraphs[index].Text));
|
||||||
|
|
||||||
@ -14884,7 +14908,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
_video5000MsRight = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainVideo5000MsRight);
|
_video5000MsRight = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainVideo5000MsRight);
|
||||||
_videoPlayFirstSelected = UiUtil.GetKeys(Configuration.Settings.Shortcuts.GeneralPlayFirstSelected);
|
_videoPlayFirstSelected = UiUtil.GetKeys(Configuration.Settings.Shortcuts.GeneralPlayFirstSelected);
|
||||||
_mainGoToNextSubtitleAndFocusVideo = UiUtil.GetKeys(Configuration.Settings.Shortcuts.GeneralGoToNextSubtitleAndFocusVideo);
|
_mainGoToNextSubtitleAndFocusVideo = UiUtil.GetKeys(Configuration.Settings.Shortcuts.GeneralGoToNextSubtitleAndFocusVideo);
|
||||||
_mainExtendCurrentSubtitle = UiUtil.GetKeys(Configuration.Settings.Shortcuts.GeneralExtendCurrentSubtitle);
|
_mainAdjustExtendCurrentSubtitle = UiUtil.GetKeys(Configuration.Settings.Shortcuts.GeneralExtendCurrentSubtitle);
|
||||||
_mainVideoFullscreen = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainVideoFullscreen);
|
_mainVideoFullscreen = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainVideoFullscreen);
|
||||||
|
|
||||||
spellCheckToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainSpellCheck);
|
spellCheckToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainSpellCheck);
|
||||||
@ -14955,6 +14979,8 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
_waveformAddTextAtHereFromClipboard = UiUtil.GetKeys(Configuration.Settings.Shortcuts.WaveformAddTextHereFromClipboard);
|
_waveformAddTextAtHereFromClipboard = UiUtil.GetKeys(Configuration.Settings.Shortcuts.WaveformAddTextHereFromClipboard);
|
||||||
_waveformFocusListView = UiUtil.GetKeys(Configuration.Settings.Shortcuts.WaveformFocusListView);
|
_waveformFocusListView = UiUtil.GetKeys(Configuration.Settings.Shortcuts.WaveformFocusListView);
|
||||||
_waveformGoToNextSceneChange = UiUtil.GetKeys(Configuration.Settings.Shortcuts.WaveformGoToNextSceneChange);
|
_waveformGoToNextSceneChange = UiUtil.GetKeys(Configuration.Settings.Shortcuts.WaveformGoToNextSceneChange);
|
||||||
|
_waveformToggleSceneChange = UiUtil.GetKeys(Configuration.Settings.Shortcuts.WaveformToggleSceneChange);
|
||||||
|
|
||||||
_mainTranslateCustomSearch1 = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainTranslateCustomSearch1);
|
_mainTranslateCustomSearch1 = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainTranslateCustomSearch1);
|
||||||
_mainTranslateCustomSearch2 = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainTranslateCustomSearch2);
|
_mainTranslateCustomSearch2 = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainTranslateCustomSearch2);
|
||||||
_mainTranslateCustomSearch3 = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainTranslateCustomSearch3);
|
_mainTranslateCustomSearch3 = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainTranslateCustomSearch3);
|
||||||
|
@ -655,7 +655,6 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
AddNode(generalNode, language.GoToCurrentSubtitleStart, nameof(Configuration.Settings.Shortcuts.GeneralGoToStartOfCurrentSubtitle));
|
AddNode(generalNode, language.GoToCurrentSubtitleStart, nameof(Configuration.Settings.Shortcuts.GeneralGoToStartOfCurrentSubtitle));
|
||||||
AddNode(generalNode, language.GoToCurrentSubtitleEnd, nameof(Configuration.Settings.Shortcuts.GeneralGoToEndOfCurrentSubtitle));
|
AddNode(generalNode, language.GoToCurrentSubtitleEnd, nameof(Configuration.Settings.Shortcuts.GeneralGoToEndOfCurrentSubtitle));
|
||||||
AddNode(generalNode, language.GoToNextSubtitleAndFocusVideo, nameof(Configuration.Settings.Shortcuts.GeneralGoToNextSubtitleAndFocusVideo));
|
AddNode(generalNode, language.GoToNextSubtitleAndFocusVideo, nameof(Configuration.Settings.Shortcuts.GeneralGoToNextSubtitleAndFocusVideo));
|
||||||
AddNode(generalNode, language.ExtendCurrentSubtitle, nameof(Configuration.Settings.Shortcuts.GeneralExtendCurrentSubtitle));
|
|
||||||
treeViewShortcuts.Nodes.Add(generalNode);
|
treeViewShortcuts.Nodes.Add(generalNode);
|
||||||
|
|
||||||
var fileNode = new TreeNode(Configuration.Settings.Language.Main.Menu.File.Title);
|
var fileNode = new TreeNode(Configuration.Settings.Language.Main.Menu.File.Title);
|
||||||
@ -788,6 +787,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
AddNode(adjustNode, language.AdjustSelected100MsBack, nameof(Configuration.Settings.Shortcuts.MainAdjustSelected100MsBack));
|
AddNode(adjustNode, language.AdjustSelected100MsBack, nameof(Configuration.Settings.Shortcuts.MainAdjustSelected100MsBack));
|
||||||
AddNode(adjustNode, language.AdjustSetEndAndOffsetTheRest, nameof(Configuration.Settings.Shortcuts.MainAdjustSetEndAndOffsetTheRest));
|
AddNode(adjustNode, language.AdjustSetEndAndOffsetTheRest, nameof(Configuration.Settings.Shortcuts.MainAdjustSetEndAndOffsetTheRest));
|
||||||
AddNode(adjustNode, language.AdjustSetEndAndOffsetTheRestAndGoToNext, nameof(Configuration.Settings.Shortcuts.MainAdjustSetEndAndOffsetTheRestAndGoToNext));
|
AddNode(adjustNode, language.AdjustSetEndAndOffsetTheRestAndGoToNext, nameof(Configuration.Settings.Shortcuts.MainAdjustSetEndAndOffsetTheRestAndGoToNext));
|
||||||
|
AddNode(adjustNode, language.AdjustExtendCurrentSubtitle, nameof(Configuration.Settings.Shortcuts.GeneralExtendCurrentSubtitle));
|
||||||
treeViewShortcuts.Nodes.Add(adjustNode);
|
treeViewShortcuts.Nodes.Add(adjustNode);
|
||||||
|
|
||||||
var audioVisualizerNode = new TreeNode(language.WaveformAndSpectrogram);
|
var audioVisualizerNode = new TreeNode(language.WaveformAndSpectrogram);
|
||||||
@ -804,6 +804,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
AddNode(audioVisualizerNode, Configuration.Settings.Language.Main.VideoControls.InsertNewSubtitleAtVideoPosition, nameof(Configuration.Settings.Shortcuts.MainWaveformInsertAtCurrentPosition));
|
AddNode(audioVisualizerNode, Configuration.Settings.Language.Main.VideoControls.InsertNewSubtitleAtVideoPosition, nameof(Configuration.Settings.Shortcuts.MainWaveformInsertAtCurrentPosition));
|
||||||
AddNode(audioVisualizerNode, language.WaveformFocusListView, nameof(Configuration.Settings.Shortcuts.WaveformFocusListView));
|
AddNode(audioVisualizerNode, language.WaveformFocusListView, nameof(Configuration.Settings.Shortcuts.WaveformFocusListView));
|
||||||
AddNode(audioVisualizerNode, language.WaveformGoToNextSceneChange, nameof(Configuration.Settings.Shortcuts.WaveformGoToNextSceneChange));
|
AddNode(audioVisualizerNode, language.WaveformGoToNextSceneChange, nameof(Configuration.Settings.Shortcuts.WaveformGoToNextSceneChange));
|
||||||
|
AddNode(audioVisualizerNode, language.WaveformToggleSceneChange, nameof(Configuration.Settings.Shortcuts.WaveformToggleSceneChange));
|
||||||
treeViewShortcuts.Nodes.Add(audioVisualizerNode);
|
treeViewShortcuts.Nodes.Add(audioVisualizerNode);
|
||||||
|
|
||||||
foreach (TreeNode node in treeViewShortcuts.Nodes)
|
foreach (TreeNode node in treeViewShortcuts.Nodes)
|
||||||
|
@ -1836,7 +1836,7 @@ editar o mesmo ficheiro de legenda (colaboração)</Information>
|
|||||||
<GoToCurrentSubtitleStart>Ir para o início da linha actual</GoToCurrentSubtitleStart>
|
<GoToCurrentSubtitleStart>Ir para o início da linha actual</GoToCurrentSubtitleStart>
|
||||||
<GoToCurrentSubtitleEnd>Ir para o final da linha actual</GoToCurrentSubtitleEnd>
|
<GoToCurrentSubtitleEnd>Ir para o final da linha actual</GoToCurrentSubtitleEnd>
|
||||||
<GoToNextSubtitleAndFocusVideo>Ir para a próxima linha e definir a posição de vídeo</GoToNextSubtitleAndFocusVideo>
|
<GoToNextSubtitleAndFocusVideo>Ir para a próxima linha e definir a posição de vídeo</GoToNextSubtitleAndFocusVideo>
|
||||||
<ExtendCurrentSubtitle>Alongar a linha actual até à próxima linha ou até à máxima duração</ExtendCurrentSubtitle>
|
<AdjustExtendCurrentSubtitle>Alongar a linha actual até à próxima linha ou até à máxima duração</AdjustExtendCurrentSubtitle>
|
||||||
<ToggleFocus>Alternar o realce entre a caixa de texto da legenda e o separador (Lista) na janela principal</ToggleFocus>
|
<ToggleFocus>Alternar o realce entre a caixa de texto da legenda e o separador (Lista) na janela principal</ToggleFocus>
|
||||||
<ToggleDialogDashes>Alternar hífens de diálogo</ToggleDialogDashes>
|
<ToggleDialogDashes>Alternar hífens de diálogo</ToggleDialogDashes>
|
||||||
<Alignment>Alinhamento (linhas seleccionadas)</Alignment>
|
<Alignment>Alinhamento (linhas seleccionadas)</Alignment>
|
||||||
|
Loading…
Reference in New Issue
Block a user