Minor refact

This commit is contained in:
niksedk 2021-11-05 18:48:12 +01:00
parent 56585a6fc9
commit 7942b5e91a
4 changed files with 37 additions and 37 deletions

View File

@ -2044,7 +2044,7 @@ $HorzAlign = Center
public string MainEditFixRTLViaUnicodeChars { get; set; }
public string MainEditRemoveRTLUnicodeChars { get; set; }
public string MainEditReverseStartAndEndingForRTL { get; set; }
public string MainToggleVideoControls { get; set; }
public string MainVideoToggleControls { get; set; }
public string MainEditToggleTranslationOriginalInPreviews { get; set; }
public string MainEditInverseSelection { get; set; }
public string MainEditModifySelection { get; set; }
@ -2152,10 +2152,10 @@ $HorzAlign = Center
public string MainListViewColumnTextUp { get; set; }
public string MainListViewColumnTextDown { get; set; }
public string MainListViewGoToNextError { get; set; }
public string MainListViewRemoveBlankLines { get; set; }
public string ApplyAssaOverrideTags { get; set; }
public string SetAssaPosition { get; set; }
public string SetAssaResolution { get; set; }
public string GeneralListViewRemoveBlankLines { get; set; }
public string GeneralApplyAssaOverrideTags { get; set; }
public string GeneralSetAssaPosition { get; set; }
public string GeneralSetAssaResolution { get; set; }
public string MainListViewRemoveTimeCodes { get; set; }
public string MainTextBoxSplitAtCursor { get; set; }
public string MainTextBoxSplitAtCursorAndVideoPos { get; set; }
@ -2257,7 +2257,7 @@ $HorzAlign = Center
public string Waveform1000MsRight { get; set; }
public string MainTranslateGoogleIt { get; set; }
public string MainTranslateGoogleTranslateIt { get; set; }
public string MainAutoTranslate { get; set; }
public string MainTranslateAuto { get; set; }
public string MainTranslateCustomSearch1 { get; set; }
public string MainTranslateCustomSearch2 { get; set; }
public string MainTranslateCustomSearch3 { get; set; }
@ -2330,7 +2330,7 @@ $HorzAlign = Center
MainWaveformInsertAtCurrentPosition = "Insert";
MainInsertBefore = "Control+Shift+Insert";
MainTextBoxAutoBreak = "Control+R";
MainAutoTranslate = "Control+Shift+G";
MainTranslateAuto = "Control+Shift+G";
MainAdjustExtendToNextSubtitle = "Control+Shift+E";
MainAdjustExtendToPreviousSubtitle = "Alt+Shift+E";
WaveformVerticalZoom = "Shift+Add";
@ -2577,7 +2577,7 @@ $HorzAlign = Center
settings.Version.StartsWith("3.5.14", StringComparison.Ordinal) ||
settings.Version.StartsWith("3.5.13", StringComparison.Ordinal))
{
settings.Shortcuts.MainAutoTranslate = "Control+Shift+G";
settings.Shortcuts.MainTranslateAuto = "Control+Shift+G";
settings.Tools.MicrosoftTranslatorTokenEndpoint = "https://api.cognitive.microsoft.com/sts/v1.0/issueToken";
}
}
@ -8031,25 +8031,25 @@ $HorzAlign = Center
subNode = node.SelectSingleNode("MainListViewRemoveBlankLines");
if (subNode != null)
{
shortcuts.MainListViewRemoveBlankLines = subNode.InnerText;
shortcuts.GeneralListViewRemoveBlankLines = subNode.InnerText;
}
subNode = node.SelectSingleNode("ApplyAssaOverrideTags");
subNode = node.SelectSingleNode("GeneralApplyAssaOverrideTags");
if (subNode != null)
{
shortcuts.ApplyAssaOverrideTags = subNode.InnerText;
shortcuts.GeneralApplyAssaOverrideTags = subNode.InnerText;
}
subNode = node.SelectSingleNode("SetAssaPosition");
subNode = node.SelectSingleNode("GeneralSetAssaPosition");
if (subNode != null)
{
shortcuts.SetAssaPosition = subNode.InnerText;
shortcuts.GeneralSetAssaPosition = subNode.InnerText;
}
subNode = node.SelectSingleNode("SetAssaResolution");
subNode = node.SelectSingleNode("GeneralSetAssaResolution");
if (subNode != null)
{
shortcuts.SetAssaResolution = subNode.InnerText;
shortcuts.GeneralSetAssaResolution = subNode.InnerText;
}
subNode = node.SelectSingleNode("MainListViewRemoveTimeCodes");
@ -8076,10 +8076,10 @@ $HorzAlign = Center
shortcuts.MainEditReverseStartAndEndingForRTL = subNode.InnerText;
}
subNode = node.SelectSingleNode("MainToggleVideoControls");
subNode = node.SelectSingleNode("MainVideoToggleControls");
if (subNode != null)
{
shortcuts.MainToggleVideoControls = subNode.InnerText;
shortcuts.MainVideoToggleControls = subNode.InnerText;
}
subNode = node.SelectSingleNode("MainTextBoxSplitAtCursor");
@ -8682,10 +8682,10 @@ $HorzAlign = Center
shortcuts.MainTranslateGoogleTranslateIt = subNode.InnerText;
}
subNode = node.SelectSingleNode("MainAutoTranslate");
subNode = node.SelectSingleNode("MainTranslateAuto");
if (subNode != null)
{
shortcuts.MainAutoTranslate = subNode.InnerText;
shortcuts.MainTranslateAuto = subNode.InnerText;
}
subNode = node.SelectSingleNode("MainTranslateCustomSearch1");
@ -9768,15 +9768,15 @@ $HorzAlign = Center
textWriter.WriteElementString("MainListViewColumnTextUp", shortcuts.MainListViewColumnTextUp);
textWriter.WriteElementString("MainListViewColumnTextDown", shortcuts.MainListViewColumnTextDown);
textWriter.WriteElementString("MainListViewGoToNextError", shortcuts.MainListViewGoToNextError);
textWriter.WriteElementString("MainListViewRemoveBlankLines", shortcuts.MainListViewRemoveBlankLines);
textWriter.WriteElementString("ApplyAssaOverrideTags", shortcuts.ApplyAssaOverrideTags);
textWriter.WriteElementString("SetAssaPosition", shortcuts.SetAssaPosition);
textWriter.WriteElementString("SetAssaResolution", shortcuts.SetAssaResolution);
textWriter.WriteElementString("MainListViewRemoveBlankLines", shortcuts.GeneralListViewRemoveBlankLines);
textWriter.WriteElementString("GeneralApplyAssaOverrideTags", shortcuts.GeneralApplyAssaOverrideTags);
textWriter.WriteElementString("GeneralSetAssaPosition", shortcuts.GeneralSetAssaPosition);
textWriter.WriteElementString("GeneralSetAssaResolution", shortcuts.GeneralSetAssaResolution);
textWriter.WriteElementString("MainListViewRemoveTimeCodes", shortcuts.MainListViewRemoveTimeCodes);
textWriter.WriteElementString("MainEditFixRTLViaUnicodeChars", shortcuts.MainEditFixRTLViaUnicodeChars);
textWriter.WriteElementString("MainEditRemoveRTLUnicodeChars", shortcuts.MainEditRemoveRTLUnicodeChars);
textWriter.WriteElementString("MainEditReverseStartAndEndingForRTL", shortcuts.MainEditReverseStartAndEndingForRTL);
textWriter.WriteElementString("MainToggleVideoControls", shortcuts.MainToggleVideoControls);
textWriter.WriteElementString("MainVideoToggleControls", shortcuts.MainVideoToggleControls);
textWriter.WriteElementString("MainTextBoxSplitAtCursor", shortcuts.MainTextBoxSplitAtCursor);
textWriter.WriteElementString("MainTextBoxSplitAtCursorAndVideoPos", shortcuts.MainTextBoxSplitAtCursorAndVideoPos);
textWriter.WriteElementString("MainTextBoxSplitSelectedLineBilingual", shortcuts.MainTextBoxSplitSelectedLineBilingual);
@ -9877,7 +9877,7 @@ $HorzAlign = Center
textWriter.WriteElementString("Waveform1000MsRight", shortcuts.Waveform1000MsRight);
textWriter.WriteElementString("MainTranslateGoogleIt", shortcuts.MainTranslateGoogleIt);
textWriter.WriteElementString("MainTranslateGoogleTranslateIt", shortcuts.MainTranslateGoogleTranslateIt);
textWriter.WriteElementString("MainAutoTranslate", shortcuts.MainAutoTranslate);
textWriter.WriteElementString("MainTranslateAuto", shortcuts.MainTranslateAuto);
textWriter.WriteElementString("MainTranslateCustomSearch1", shortcuts.MainTranslateCustomSearch1);
textWriter.WriteElementString("MainTranslateCustomSearch2", shortcuts.MainTranslateCustomSearch2);
textWriter.WriteElementString("MainTranslateCustomSearch3", shortcuts.MainTranslateCustomSearch3);

View File

@ -23175,9 +23175,9 @@ namespace Nikse.SubtitleEdit.Forms
moveTextUpToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainListViewColumnTextUp);
moveTextDownToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainListViewColumnTextDown);
toolStripMenuItemReverseRightToLeftStartEnd.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainEditReverseStartAndEndingForRTL);
translateToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainAutoTranslate);
applyCustomStylesToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.ApplyAssaOverrideTags);
setPositionToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.SetAssaPosition);
translateToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainTranslateAuto);
applyCustomStylesToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.GeneralApplyAssaOverrideTags);
setPositionToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.GeneralSetAssaPosition);
audioVisualizer.InsertAtVideoPositionShortcut = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainWaveformInsertAtCurrentPosition);
audioVisualizer.Move100MsLeft = UiUtil.GetKeys(Configuration.Settings.Shortcuts.Waveform100MsLeft);

View File

@ -1284,10 +1284,10 @@ namespace Nikse.SubtitleEdit.Forms.Options
AddNode(generalNode, language.ToggleView, nameof(Configuration.Settings.Shortcuts.GeneralToggleView));
AddNode(generalNode, language.ToggleMode, nameof(Configuration.Settings.Shortcuts.GeneralToggleMode));
AddNode(generalNode, language.TogglePreviewOnVideo, nameof(Configuration.Settings.Shortcuts.GeneralTogglePreviewOnVideo));
AddNode(generalNode, language.RemoveBlankLines, nameof(Configuration.Settings.Shortcuts.MainListViewRemoveBlankLines));
AddNode(generalNode, language.ApplyAssaOverrideTags, nameof(Configuration.Settings.Shortcuts.ApplyAssaOverrideTags), true);
AddNode(generalNode, language.SetAssaPosition, nameof(Configuration.Settings.Shortcuts.SetAssaPosition), true);
AddNode(generalNode, language.SetAssaResolution, nameof(Configuration.Settings.Shortcuts.SetAssaResolution));
AddNode(generalNode, language.RemoveBlankLines, nameof(Configuration.Settings.Shortcuts.GeneralListViewRemoveBlankLines));
AddNode(generalNode, language.ApplyAssaOverrideTags, nameof(Configuration.Settings.Shortcuts.GeneralApplyAssaOverrideTags), true);
AddNode(generalNode, language.SetAssaPosition, nameof(Configuration.Settings.Shortcuts.GeneralSetAssaPosition), true);
AddNode(generalNode, language.SetAssaResolution, nameof(Configuration.Settings.Shortcuts.GeneralSetAssaResolution));
AddNode(generalNode, language.Help, nameof(Configuration.Settings.Shortcuts.GeneralHelp), true);
_shortcuts.Nodes.Add(generalNode);
@ -1390,7 +1390,7 @@ namespace Nikse.SubtitleEdit.Forms.Options
AddNode(videoNode, language.PlayRateSlower, nameof(Configuration.Settings.Shortcuts.MainVideoSlower));
AddNode(videoNode, language.PlayRateFaster, nameof(Configuration.Settings.Shortcuts.MainVideoFaster));
AddNode(videoNode, language.VideoResetSpeedAndZoom, nameof(Configuration.Settings.Shortcuts.MainVideoReset));
AddNode(videoNode, language.MainToggleVideoControls, nameof(Configuration.Settings.Shortcuts.MainToggleVideoControls));
AddNode(videoNode, language.MainToggleVideoControls, nameof(Configuration.Settings.Shortcuts.MainVideoToggleControls));
AddNode(videoNode, language.VideoToggleContrast, nameof(Configuration.Settings.Shortcuts.MainVideoToggleContrast));
AddNode(videoNode, language.VideoToggleBrightness, nameof(Configuration.Settings.Shortcuts.MainVideoToggleBrightness));
_shortcuts.Nodes.Add(videoNode);
@ -1481,7 +1481,7 @@ namespace Nikse.SubtitleEdit.Forms.Options
var translateNode = new ShortcutNode(LanguageSettings.Current.Main.VideoControls.Translate);
AddNode(translateNode, LanguageSettings.Current.Main.VideoControls.GoogleIt, nameof(Configuration.Settings.Shortcuts.MainTranslateGoogleIt));
AddNode(translateNode, LanguageSettings.Current.Main.VideoControls.GoogleTranslate, nameof(Configuration.Settings.Shortcuts.MainTranslateGoogleTranslateIt));
AddNode(translateNode, LanguageSettings.Current.Main.VideoControls.AutoTranslate, nameof(Configuration.Settings.Shortcuts.MainAutoTranslate), true);
AddNode(translateNode, LanguageSettings.Current.Main.VideoControls.AutoTranslate, nameof(Configuration.Settings.Shortcuts.MainTranslateAuto), true);
AddNode(translateNode, language.CustomSearch1, nameof(Configuration.Settings.Shortcuts.MainTranslateCustomSearch1));
AddNode(translateNode, language.CustomSearch2, nameof(Configuration.Settings.Shortcuts.MainTranslateCustomSearch2));
AddNode(translateNode, language.CustomSearch3, nameof(Configuration.Settings.Shortcuts.MainTranslateCustomSearch3));

View File

@ -241,7 +241,7 @@ namespace Nikse.SubtitleEdit.Logic
MainGeneralGoToStartOfCurrentSubtitle = UiUtil.GetKeys(Configuration.Settings.Shortcuts.GeneralGoToStartOfCurrentSubtitle);
MainGeneralGoToEndOfCurrentSubtitle = UiUtil.GetKeys(Configuration.Settings.Shortcuts.GeneralGoToEndOfCurrentSubtitle);
MainGeneralFileSaveAll = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainFileSaveAll);
MainGeneralSetAssaResolution = UiUtil.GetKeys(Configuration.Settings.Shortcuts.SetAssaResolution);
MainGeneralSetAssaResolution = UiUtil.GetKeys(Configuration.Settings.Shortcuts.GeneralSetAssaResolution);
MainVideoPlayFromJustBefore = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainVideoPlayFromJustBefore);
MainVideoPlayFromBeginning = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainVideoPlayFromBeginning);
VideoPause = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainVideoPause);
@ -318,12 +318,12 @@ namespace Nikse.SubtitleEdit.Logic
MainListViewColor3 = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainListViewColor3);
MainListViewColor4 = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainListViewColor4);
MainListViewGoToNextError = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainListViewGoToNextError);
MainListViewRemoveBlankLines = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainListViewRemoveBlankLines);
MainListViewRemoveBlankLines = UiUtil.GetKeys(Configuration.Settings.Shortcuts.GeneralListViewRemoveBlankLines);
MainListViewRemoveTimeCodes = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainListViewRemoveTimeCodes);
MainEditFixRTLViaUnicodeChars = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainEditFixRTLViaUnicodeChars);
MainEditRemoveRTLUnicodeChars = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainEditRemoveRTLUnicodeChars);
MainEditReverseStartAndEndingForRtl = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainEditReverseStartAndEndingForRTL);
MainToggleVideoControls = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainToggleVideoControls);
MainToggleVideoControls = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainVideoToggleControls);
MainListViewCopyText = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainListViewCopyText);
MainTextBoxSplitAtCursor = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainTextBoxSplitAtCursor);
MainTextBoxSplitAtCursorAndVideoPos = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainTextBoxSplitAtCursorAndVideoPos);