From 48c5e2d21ee04ddd02fd1319f1bcbe9ce8e18a63 Mon Sep 17 00:00:00 2001 From: Nikolaj Olsson Date: Wed, 8 Aug 2018 19:46:22 +0200 Subject: [PATCH] Fix shortcut "Column, Delete text" - thx OmrSi :) Fix #3003 --- LanguageMaster.xml | 1 + libse/Language.cs | 1 + libse/LanguageDeserializer.cs | 3 +++ libse/LanguageStructure.cs | 1 + libse/Settings.cs | 5 +++++ src/Forms/Main.cs | 3 ++- src/Forms/Settings.cs | 1 + 7 files changed, 14 insertions(+), 1 deletion(-) diff --git a/LanguageMaster.xml b/LanguageMaster.xml index 1d949506c..8201ba66a 100644 --- a/LanguageMaster.xml +++ b/LanguageMaster.xml @@ -1980,6 +1980,7 @@ can edit in same subtitle file (collaboration) Shortcut already defined: {0} Toggle translation and original in video/audio preview Column, delete text + Column, delete text and shift up Column, insert text Column, paste Column, text up diff --git a/libse/Language.cs b/libse/Language.cs index 3287f076e..78a39586a 100644 --- a/libse/Language.cs +++ b/libse/Language.cs @@ -2270,6 +2270,7 @@ can edit in same subtitle file (collaboration)", ShortcutIsAlreadyDefinedX = "Shortcut already defined: {0}", ToggleTranslationAndOriginalInPreviews = "Toggle translation and original in video/audio preview", ListViewColumnDelete = "Column, delete text", + ListViewColumnDeleteAndShiftUp = "Column, delete text and shift up", ListViewColumnInsert = "Column, insert text", ListViewColumnPaste = "Column, paste", ListViewColumnTextUp = "Column, text up", diff --git a/libse/LanguageDeserializer.cs b/libse/LanguageDeserializer.cs index b26c21c07..35006acf2 100644 --- a/libse/LanguageDeserializer.cs +++ b/libse/LanguageDeserializer.cs @@ -5377,6 +5377,9 @@ namespace Nikse.SubtitleEdit.Core case "Settings/ListViewColumnDelete": language.Settings.ListViewColumnDelete = reader.Value; break; + case "Settings/ListViewColumnDeleteAndShiftUp": + language.Settings.ListViewColumnDeleteAndShiftUp = reader.Value; + break; case "Settings/ListViewColumnInsert": language.Settings.ListViewColumnInsert = reader.Value; break; diff --git a/libse/LanguageStructure.cs b/libse/LanguageStructure.cs index f42af79bc..1e07eae99 100644 --- a/libse/LanguageStructure.cs +++ b/libse/LanguageStructure.cs @@ -2149,6 +2149,7 @@ public string ShortcutIsAlreadyDefinedX { get; set; } public string ToggleTranslationAndOriginalInPreviews { get; set; } public string ListViewColumnDelete { get; set; } + public string ListViewColumnDeleteAndShiftUp { get; set; } public string ListViewColumnInsert { get; set; } public string ListViewColumnPaste { get; set; } public string ListViewColumnTextUp { get; set; } diff --git a/libse/Settings.cs b/libse/Settings.cs index 4fc148e78..4d19e4b37 100644 --- a/libse/Settings.cs +++ b/libse/Settings.cs @@ -1043,6 +1043,7 @@ namespace Nikse.SubtitleEdit.Core public string MainListViewCopyTextFromOriginalToCurrent { get; set; } public string MainListViewAutoDuration { get; set; } public string MainListViewColumnDeleteText { get; set; } + public string MainListViewColumnDeleteTextAndShiftUp { get; set; } public string MainListViewColumnInsertText { get; set; } public string MainListViewColumnPaste { get; set; } public string MainListViewColumnTextUp { get; set; } @@ -3080,6 +3081,9 @@ namespace Nikse.SubtitleEdit.Core subNode = node.SelectSingleNode("MainListViewColumnDeleteText"); if (subNode != null) settings.Shortcuts.MainListViewColumnDeleteText = subNode.InnerText; + subNode = node.SelectSingleNode("MainListViewColumnDeleteTextAndShiftUp"); + if (subNode != null) + settings.Shortcuts.MainListViewColumnDeleteTextAndShiftUp = subNode.InnerText; subNode = node.SelectSingleNode("MainListViewColumnInsertText"); if (subNode != null) settings.Shortcuts.MainListViewColumnInsertText = subNode.InnerText; @@ -3976,6 +3980,7 @@ namespace Nikse.SubtitleEdit.Core textWriter.WriteElementString("MainListViewCopyTextFromOriginalToCurrent", settings.Shortcuts.MainListViewCopyTextFromOriginalToCurrent); textWriter.WriteElementString("MainListViewAutoDuration", settings.Shortcuts.MainListViewAutoDuration); textWriter.WriteElementString("MainListViewColumnDeleteText", settings.Shortcuts.MainListViewColumnDeleteText); + textWriter.WriteElementString("MainListViewColumnDeleteTextAndShiftUp", settings.Shortcuts.MainListViewColumnDeleteTextAndShiftUp); textWriter.WriteElementString("MainListViewColumnInsertText", settings.Shortcuts.MainListViewColumnInsertText); textWriter.WriteElementString("MainListViewColumnPaste", settings.Shortcuts.MainListViewColumnPaste); textWriter.WriteElementString("MainListViewColumnTextUp", settings.Shortcuts.MainListViewColumnTextUp); diff --git a/src/Forms/Main.cs b/src/Forms/Main.cs index b29f0bc92..110436386 100644 --- a/src/Forms/Main.cs +++ b/src/Forms/Main.cs @@ -16667,7 +16667,8 @@ namespace Nikse.SubtitleEdit.Forms _mainEditReverseStartAndEndingForRTL = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainEditReverseStartAndEndingForRTL); _mainListViewCopyText = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainListViewCopyText); copyOriginalTextToCurrentToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainListViewCopyTextFromOriginalToCurrent); - toolStripMenuItemColumnDeleteText.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainListViewColumnDeleteText); + columnDeleteTextOnlyToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainListViewColumnDeleteText); + toolStripMenuItemColumnDeleteText.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainListViewColumnDeleteTextAndShiftUp); ShiftTextCellsDownToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainListViewColumnInsertText); toolStripMenuItemPasteSpecial.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainListViewColumnPaste); moveTextUpToolStripMenuItem.ShortcutKeys = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainListViewColumnTextUp); diff --git a/src/Forms/Settings.cs b/src/Forms/Settings.cs index 62b385b01..e5efe886f 100644 --- a/src/Forms/Settings.cs +++ b/src/Forms/Settings.cs @@ -824,6 +824,7 @@ namespace Nikse.SubtitleEdit.Forms AddNode(listViewNode, language.CopyTextOnlyFromOriginalToCurrent, nameof(Configuration.Settings.Shortcuts.MainListViewCopyTextFromOriginalToCurrent), true); AddNode(listViewNode, language.AutoDurationSelectedLines, nameof(Configuration.Settings.Shortcuts.MainListViewAutoDuration)); AddNode(listViewNode, language.ListViewColumnDelete, nameof(Configuration.Settings.Shortcuts.MainListViewColumnDeleteText), true); + AddNode(listViewNode, language.ListViewColumnDeleteAndShiftUp, nameof(Configuration.Settings.Shortcuts.MainListViewColumnDeleteTextAndShiftUp), true); AddNode(listViewNode, language.ListViewColumnInsert, nameof(Configuration.Settings.Shortcuts.MainListViewColumnInsertText), true); AddNode(listViewNode, language.ListViewColumnPaste, nameof(Configuration.Settings.Shortcuts.MainListViewColumnPaste), true); AddNode(listViewNode, language.ListViewColumnTextUp, nameof(Configuration.Settings.Shortcuts.MainListViewColumnTextUp), true);