diff --git a/libse/Settings.cs b/libse/Settings.cs index c7db33999..86cc67651 100644 --- a/libse/Settings.cs +++ b/libse/Settings.cs @@ -129,7 +129,7 @@ namespace Nikse.SubtitleEdit.Core public string BatchConvertFormat { get; set; } public string BatchConvertAssStyles { get; set; } public string BatchConvertSsaStyles { get; set; } - public bool BatchConvertUseStyleFromSource { get; set; } + public bool BatchConvertUseStyleFromSource { get; set; } public string BatchConvertExportCustomTextTemplate { get; set; } public string ModifySelectionText { get; set; } public string ModifySelectionRule { get; set; } @@ -156,7 +156,7 @@ namespace Nikse.SubtitleEdit.Core public string ExportFcpVideoResolution { get; set; } public Color ExportFontColor { get; set; } public Color ExportBorderColor { get; set; } - public Color ExportShadowColor { get; set; } + public Color ExportShadowColor { get; set; } public int ExportBoxBorderSize { get; set; } public string ExportBottomMarginUnit { get; set; } public int ExportBottomMarginPercent { get; set; } @@ -923,6 +923,9 @@ namespace Nikse.SubtitleEdit.Core public string MainFileSaveOriginalAs { get; set; } public string MainFileSaveAs { get; set; } public string MainFileSaveAll { get; set; } + public string MainFileCloseOriginal { get; set; } + public string MainFileImportPlainText { get; set; } + public string MainFileImportTimeCodes { get; set; } public string MainFileExportEbu { get; set; } public string MainEditUndo { get; set; } public string MainEditRedo { get; set; } @@ -939,6 +942,7 @@ namespace Nikse.SubtitleEdit.Core public string MainToolsFixCommonErrors { get; set; } public string MainToolsFixCommonErrorsPreview { get; set; } public string MainToolsMergeShortLines { get; set; } + public string MainToolsMakeEmptyFromCurrent { get; set; } public string MainToolsSplitLongLines { get; set; } public string MainToolsRenumber { get; set; } public string MainToolsRemoveTextForHI { get; set; } @@ -946,6 +950,8 @@ namespace Nikse.SubtitleEdit.Core public string MainToolsAutoDuration { get; set; } public string MainToolsBatchConvert { get; set; } public string MainToolsBeamer { get; set; } + public string MainVideoOpen { get; set; } + public string MainVideoClose { get; set; } public string MainVideoPause { get; set; } public string MainVideoPlayPauseToggle { get; set; } public string MainVideoShowHideVideo { get; set; } @@ -969,6 +975,7 @@ namespace Nikse.SubtitleEdit.Core public string MainSynchronizationAdjustTimes { get; set; } public string MainSynchronizationVisualSync { get; set; } public string MainSynchronizationPointSync { get; set; } + public string MainSynchronizationPointSyncViaFile { get; set; } public string MainSynchronizationChangeFrameRate { get; set; } public string MainListViewItalic { get; set; } public string MainListViewToggleDashes { get; set; } @@ -2747,6 +2754,15 @@ namespace Nikse.SubtitleEdit.Core subNode = node.SelectSingleNode("MainFileSaveAll"); if (subNode != null) settings.Shortcuts.MainFileSaveAll = subNode.InnerText; + subNode = node.SelectSingleNode("MainFileCloseOriginal"); + if (subNode != null) + settings.Shortcuts.MainFileCloseOriginal = subNode.InnerText; + subNode = node.SelectSingleNode("MainFileImportPlainText"); + if (subNode != null) + settings.Shortcuts.MainFileImportPlainText = subNode.InnerText; + subNode = node.SelectSingleNode("MainFileImportTimeCodes"); + if (subNode != null) + settings.Shortcuts.MainFileImportTimeCodes = subNode.InnerText; subNode = node.SelectSingleNode("MainFileExportEbu"); if (subNode != null) settings.Shortcuts.MainFileExportEbu = subNode.InnerText; @@ -2783,6 +2799,9 @@ namespace Nikse.SubtitleEdit.Core subNode = node.SelectSingleNode("MainToolsMergeShortLines"); if (subNode != null) settings.Shortcuts.MainToolsMergeShortLines = subNode.InnerText; + subNode = node.SelectSingleNode("MainToolsMakeEmptyFromCurrent"); + if (subNode != null) + settings.Shortcuts.MainToolsMakeEmptyFromCurrent = subNode.InnerText; subNode = node.SelectSingleNode("MainToolsSplitLongLines"); if (subNode != null) settings.Shortcuts.MainToolsSplitLongLines = subNode.InnerText; @@ -2813,6 +2832,12 @@ namespace Nikse.SubtitleEdit.Core subNode = node.SelectSingleNode("MainEditModifySelection"); if (subNode != null) settings.Shortcuts.MainEditModifySelection = subNode.InnerText; + subNode = node.SelectSingleNode("MainVideoOpen"); + if (subNode != null) + settings.Shortcuts.MainVideoOpen = subNode.InnerText; + subNode = node.SelectSingleNode("MainVideoClose"); + if (subNode != null) + settings.Shortcuts.MainVideoClose = subNode.InnerText; subNode = node.SelectSingleNode("MainVideoPause"); if (subNode != null) settings.Shortcuts.MainVideoPause = subNode.InnerText; @@ -2882,6 +2907,9 @@ namespace Nikse.SubtitleEdit.Core subNode = node.SelectSingleNode("MainSynchronizationPointSync"); if (subNode != null) settings.Shortcuts.MainSynchronizationPointSync = subNode.InnerText; + subNode = node.SelectSingleNode("MainSynchronizationPointSyncViaFile"); + if (subNode != null) + settings.Shortcuts.MainSynchronizationPointSyncViaFile = subNode.InnerText; subNode = node.SelectSingleNode("MainSynchronizationChangeFrameRate"); if (subNode != null) settings.Shortcuts.MainSynchronizationChangeFrameRate = subNode.InnerText; @@ -3371,7 +3399,7 @@ namespace Nikse.SubtitleEdit.Core textWriter.WriteElementString("BatchConvertFormat", settings.Tools.BatchConvertFormat); textWriter.WriteElementString("BatchConvertAssStyles", settings.Tools.BatchConvertAssStyles); textWriter.WriteElementString("BatchConvertSsaStyles", settings.Tools.BatchConvertSsaStyles); - textWriter.WriteElementString("BatchConvertUseStyleFromSource", settings.Tools.BatchConvertUseStyleFromSource.ToString()); + textWriter.WriteElementString("BatchConvertUseStyleFromSource", settings.Tools.BatchConvertUseStyleFromSource.ToString()); textWriter.WriteElementString("BatchConvertExportCustomTextTemplate", settings.Tools.BatchConvertExportCustomTextTemplate); textWriter.WriteElementString("ModifySelectionRule", settings.Tools.ModifySelectionRule); textWriter.WriteElementString("ModifySelectionText", settings.Tools.ModifySelectionText); @@ -3399,7 +3427,7 @@ namespace Nikse.SubtitleEdit.Core textWriter.WriteElementString("ExportFontColor", settings.Tools.ExportFontColor.ToArgb().ToString(CultureInfo.InvariantCulture)); textWriter.WriteElementString("ExportBorderColor", settings.Tools.ExportBorderColor.ToArgb().ToString(CultureInfo.InvariantCulture)); textWriter.WriteElementString("ExportShadowColor", settings.Tools.ExportShadowColor.ToArgb().ToString(CultureInfo.InvariantCulture)); - textWriter.WriteElementString("ExportBoxBorderSize", settings.Tools.ExportBoxBorderSize.ToString(CultureInfo.InvariantCulture)); + textWriter.WriteElementString("ExportBoxBorderSize", settings.Tools.ExportBoxBorderSize.ToString(CultureInfo.InvariantCulture)); textWriter.WriteElementString("ExportBottomMarginUnit", settings.Tools.ExportBottomMarginUnit); textWriter.WriteElementString("ExportBottomMarginPercent", settings.Tools.ExportBottomMarginPercent.ToString(CultureInfo.InvariantCulture)); textWriter.WriteElementString("ExportBottomMarginPixels", settings.Tools.ExportBottomMarginPixels.ToString(CultureInfo.InvariantCulture)); @@ -3670,6 +3698,9 @@ namespace Nikse.SubtitleEdit.Core textWriter.WriteElementString("MainFileSaveOriginalAs", settings.Shortcuts.MainFileSaveOriginalAs); textWriter.WriteElementString("MainFileSaveAs", settings.Shortcuts.MainFileSaveAs); textWriter.WriteElementString("MainFileSaveAll", settings.Shortcuts.MainFileSaveAll); + textWriter.WriteElementString("MainFileImportPlainText", settings.Shortcuts.MainFileImportPlainText); + textWriter.WriteElementString("MainFileImportTimeCodes", settings.Shortcuts.MainFileImportTimeCodes); + textWriter.WriteElementString("MainFileExportEbu", settings.Shortcuts.MainFileExportEbu); textWriter.WriteElementString("MainFileExportEbu", settings.Shortcuts.MainFileExportEbu); textWriter.WriteElementString("MainEditUndo", settings.Shortcuts.MainEditUndo); textWriter.WriteElementString("MainEditRedo", settings.Shortcuts.MainEditRedo); @@ -3682,6 +3713,7 @@ namespace Nikse.SubtitleEdit.Core textWriter.WriteElementString("MainToolsFixCommonErrors", settings.Shortcuts.MainToolsFixCommonErrors); textWriter.WriteElementString("MainToolsFixCommonErrorsPreview", settings.Shortcuts.MainToolsFixCommonErrorsPreview); textWriter.WriteElementString("MainToolsMergeShortLines", settings.Shortcuts.MainToolsMergeShortLines); + textWriter.WriteElementString("MainToolsMakeEmptyFromCurrent", settings.Shortcuts.MainToolsMakeEmptyFromCurrent); textWriter.WriteElementString("MainToolsSplitLongLines", settings.Shortcuts.MainToolsSplitLongLines); textWriter.WriteElementString("MainToolsRenumber", settings.Shortcuts.MainToolsRenumber); textWriter.WriteElementString("MainToolsRemoveTextForHI", settings.Shortcuts.MainToolsRemoveTextForHI); @@ -3692,6 +3724,8 @@ namespace Nikse.SubtitleEdit.Core textWriter.WriteElementString("MainToolsToggleTranslationOriginalInPreviews", settings.Shortcuts.MainEditToggleTranslationOriginalInPreviews); textWriter.WriteElementString("MainEditInverseSelection", settings.Shortcuts.MainEditInverseSelection); textWriter.WriteElementString("MainEditModifySelection", settings.Shortcuts.MainEditModifySelection); + textWriter.WriteElementString("MainVideoOpen", settings.Shortcuts.MainVideoOpen); + textWriter.WriteElementString("MainVideoClose", settings.Shortcuts.MainVideoClose); textWriter.WriteElementString("MainVideoPause", settings.Shortcuts.MainVideoPause); textWriter.WriteElementString("MainVideoPlayPauseToggle", settings.Shortcuts.MainVideoPlayPauseToggle); textWriter.WriteElementString("MainVideoShowHideVideo", settings.Shortcuts.MainVideoShowHideVideo); @@ -3715,6 +3749,7 @@ namespace Nikse.SubtitleEdit.Core textWriter.WriteElementString("MainSynchronizationAdjustTimes", settings.Shortcuts.MainSynchronizationAdjustTimes); textWriter.WriteElementString("MainSynchronizationVisualSync", settings.Shortcuts.MainSynchronizationVisualSync); textWriter.WriteElementString("MainSynchronizationPointSync", settings.Shortcuts.MainSynchronizationPointSync); + textWriter.WriteElementString("MainSynchronizationPointSyncViaFile", settings.Shortcuts.MainSynchronizationPointSyncViaFile); textWriter.WriteElementString("MainSynchronizationChangeFrameRate", settings.Shortcuts.MainSynchronizationChangeFrameRate); textWriter.WriteElementString("MainListViewItalic", settings.Shortcuts.MainListViewItalic); textWriter.WriteElementString("MainListViewToggleDashes", settings.Shortcuts.MainListViewToggleDashes); diff --git a/src/Forms/Main.cs b/src/Forms/Main.cs index 2db07b229..436ad00d2 100644 --- a/src/Forms/Main.cs +++ b/src/Forms/Main.cs @@ -15766,6 +15766,9 @@ namespace Nikse.SubtitleEdit.Forms saveOriginalAstoolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainFileSaveOriginalAs); saveAsToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainFileSaveAs); _mainGeneralFileSaveAll = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainFileSaveAll); + removeOriginalToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainFileCloseOriginal); + toolStripMenuItemImportText.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainFileImportPlainText); + toolStripMenuItemImportTimeCodes.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainFileImportTimeCodes); eBUSTLToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainFileExportEbu); toolStripMenuItemUndo.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainEditUndo); @@ -15782,6 +15785,7 @@ namespace Nikse.SubtitleEdit.Forms fixToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainToolsFixCommonErrors); toolStripMenuItemAutoMergeShortLines.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainToolsMergeShortLines); + toolStripMenuItemMakeEmptyFromCurrent.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainToolsMakeEmptyFromCurrent); toolStripMenuItemAutoSplitLongLines.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainToolsSplitLongLines); startNumberingFromToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainToolsRenumber); removeTextForHearImpairedToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainToolsRemoveTextForHI); @@ -15789,6 +15793,8 @@ namespace Nikse.SubtitleEdit.Forms toolStripMenuItemShowOriginalInPreview.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainEditToggleTranslationOriginalInPreviews); toolStripMenuItemBatchConvert.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainToolsBatchConvert); + openVideoToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainVideoOpen); + closeVideoToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainVideoClose); showhideVideoToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainVideoShowHideVideo); _toggleVideoDockUndock = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainVideoToggleVideoControls); _videoPause = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainVideoPause); @@ -15820,6 +15826,7 @@ namespace Nikse.SubtitleEdit.Forms toolStripMenuItemAdjustAllTimes.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainSynchronizationAdjustTimes); visualSyncToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainSynchronizationVisualSync); toolStripMenuItemPointSync.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainSynchronizationPointSync); + pointSyncViaOtherSubtitleToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainSynchronizationPointSyncViaFile); toolStripMenuItemChangeFrameRate2.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainSynchronizationChangeFrameRate); italicToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainListViewItalic); _mainToolsAutoDuration = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainToolsAutoDuration); diff --git a/src/Forms/Settings.cs b/src/Forms/Settings.cs index 4c32f6f2b..69c74e7e6 100644 --- a/src/Forms/Settings.cs +++ b/src/Forms/Settings.cs @@ -705,7 +705,10 @@ namespace Nikse.SubtitleEdit.Forms AddNode(fileNode, Configuration.Settings.Language.Main.Menu.File.SaveAs, nameof(Configuration.Settings.Shortcuts.MainFileSaveAs), true); AddNode(fileNode, Configuration.Settings.Language.Main.Menu.File.SaveOriginal, nameof(Configuration.Settings.Shortcuts.MainFileSaveOriginal), true); AddNode(fileNode, Configuration.Settings.Language.Main.SaveOriginalSubtitleAs, nameof(Configuration.Settings.Shortcuts.MainFileSaveOriginalAs), true); + AddNode(fileNode, Configuration.Settings.Language.Main.Menu.File.CloseOriginal, nameof(Configuration.Settings.Shortcuts.MainFileCloseOriginal), true); AddNode(fileNode, language.MainFileSaveAll, nameof(Configuration.Settings.Shortcuts.MainFileSaveAll)); + AddNode(fileNode, Configuration.Settings.Language.Main.Menu.File.ImportText, nameof(Configuration.Settings.Shortcuts.MainFileCloseOriginal), true); + AddNode(fileNode, Configuration.Settings.Language.Main.Menu.File.ImportTimecodes, nameof(Configuration.Settings.Shortcuts.MainFileCloseOriginal), true); AddNode(fileNode, Configuration.Settings.Language.Main.Menu.File.Export + " -> " + Configuration.Settings.Language.Main.Menu.File.ExportEbu, nameof(Configuration.Settings.Shortcuts.MainFileExportEbu), true); treeViewShortcuts.Nodes.Add(fileNode); @@ -727,6 +730,7 @@ namespace Nikse.SubtitleEdit.Forms AddNode(toolsNode, Configuration.Settings.Language.Main.Menu.Tools.StartNumberingFrom, nameof(Configuration.Settings.Shortcuts.MainToolsRenumber), true); AddNode(toolsNode, Configuration.Settings.Language.Main.Menu.Tools.RemoveTextForHearingImpaired, nameof(Configuration.Settings.Shortcuts.MainToolsRemoveTextForHI), true); AddNode(toolsNode, Configuration.Settings.Language.Main.Menu.Tools.ChangeCasing, nameof(Configuration.Settings.Shortcuts.MainToolsChangeCasing), true); + AddNode(toolsNode, Configuration.Settings.Language.Main.Menu.Tools.MakeNewEmptyTranslationFromCurrentSubtitle, nameof(Configuration.Settings.Shortcuts.MainToolsMakeEmptyFromCurrent), true); AddNode(toolsNode, Configuration.Settings.Language.Main.Menu.Tools.SplitLongLines, nameof(Configuration.Settings.Shortcuts.MainToolsSplitLongLines), true); AddNode(toolsNode, Configuration.Settings.Language.Main.Menu.Tools.MergeShortLines, nameof(Configuration.Settings.Shortcuts.MainToolsMergeShortLines), true); AddNode(toolsNode, Configuration.Settings.Language.Main.Menu.ContextMenu.AutoDurationCurrentLine, nameof(Configuration.Settings.Shortcuts.MainToolsAutoDuration)); @@ -734,6 +738,8 @@ namespace Nikse.SubtitleEdit.Forms treeViewShortcuts.Nodes.Add(toolsNode); var videoNode = new TreeNode(Configuration.Settings.Language.Main.Menu.Video.Title); + AddNode(videoNode, Configuration.Settings.Language.Main.Menu.Video.OpenVideo, nameof(Configuration.Settings.Shortcuts.MainVideoOpen), true); + AddNode(videoNode, Configuration.Settings.Language.Main.Menu.Video.CloseVideo, nameof(Configuration.Settings.Shortcuts.MainVideoClose), true); AddNode(videoNode, language.TogglePlayPause, nameof(Configuration.Settings.Shortcuts.MainVideoPlayPauseToggle)); AddNode(videoNode, language.Pause, nameof(Configuration.Settings.Shortcuts.MainVideoPause)); AddNode(videoNode, Configuration.Settings.Language.Main.Menu.Video.ShowHideVideo, nameof(Configuration.Settings.Shortcuts.MainVideoShowHideVideo), true); @@ -763,6 +769,7 @@ namespace Nikse.SubtitleEdit.Forms AddNode(syncNode, Configuration.Settings.Language.Main.Menu.Synchronization.AdjustAllTimes, nameof(Configuration.Settings.Shortcuts.MainSynchronizationAdjustTimes), true); AddNode(syncNode, Configuration.Settings.Language.Main.Menu.Synchronization.VisualSync, nameof(Configuration.Settings.Shortcuts.MainSynchronizationVisualSync), true); AddNode(syncNode, Configuration.Settings.Language.Main.Menu.Synchronization.PointSync, nameof(Configuration.Settings.Shortcuts.MainSynchronizationPointSync), true); + AddNode(syncNode, Configuration.Settings.Language.Main.Menu.Synchronization.PointSyncViaOtherSubtitle, nameof(Configuration.Settings.Shortcuts.MainSynchronizationPointSyncViaFile), true); AddNode(syncNode, Configuration.Settings.Language.Main.Menu.Tools.ChangeFrameRate, nameof(Configuration.Settings.Shortcuts.MainSynchronizationChangeFrameRate), true); treeViewShortcuts.Nodes.Add(syncNode);