From 338f81418e973976db5de2cfd3d1b37d7078042b Mon Sep 17 00:00:00 2001 From: Nikolaj Olsson Date: Fri, 18 Jun 2021 13:19:55 +0200 Subject: [PATCH] Allow ASSA tag helper for all formats - thx OmrSi :) --- LanguageMaster.xml | 4 ++-- src/ui/Forms/Main.cs | 8 ++++---- src/ui/Logic/LanguageDeserializer.cs | 21 +++++++++++++++++++++ 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/LanguageMaster.xml b/LanguageMaster.xml index 854178d1e..1aaf488d0 100644 --- a/LanguageMaster.xml +++ b/LanguageMaster.xml @@ -1213,9 +1213,9 @@ To use an API key go to "Options -> Settings -> Tools" to enter your Googl Size all columns to fit - Advanced Sub Station Alpha - set style - Sub Station Alpha - set style + Set style Set actor + Set override tags Sub Station Alpha styles... Advanced Sub Station Alpha styles... Timed Text - set region diff --git a/src/ui/Forms/Main.cs b/src/ui/Forms/Main.cs index 1a55ccbf6..39bcfb22b 100644 --- a/src/ui/Forms/Main.cs +++ b/src/ui/Forms/Main.cs @@ -9823,13 +9823,13 @@ namespace Nikse.SubtitleEdit.Forms return; } - if (_shortcuts.MainTextBoxAssaIntellisense == e.KeyData && IsAssa()) + if (_shortcuts.MainTextBoxAssaIntellisense == e.KeyData) { _intellisenceList = DoIntellisense(textBoxListViewText, _intellisenceList); e.SuppressKeyPress = true; return; } - else if (_shortcuts.MainTextBoxAssaRemoveTag == e.KeyData && IsAssa()) + else if (_shortcuts.MainTextBoxAssaRemoveTag == e.KeyData) { MakeHistoryForUndo("text change"); //TODO: fix language tag AssaTagHelper.RemoveTagAtCursor(textBoxListViewText); @@ -25615,13 +25615,13 @@ namespace Nikse.SubtitleEdit.Forms return; } - if (_shortcuts.MainTextBoxAssaIntellisense == e.KeyData && IsAssa()) + if (_shortcuts.MainTextBoxAssaIntellisense == e.KeyData) { _intellisenceListOriginal = DoIntellisense(textBoxListViewTextOriginal, _intellisenceListOriginal); e.SuppressKeyPress = true; return; } - else if (_shortcuts.MainTextBoxAssaRemoveTag == e.KeyData && IsAssa()) + else if (_shortcuts.MainTextBoxAssaRemoveTag == e.KeyData) { MakeHistoryForUndo("text change"); //TODO: fix language tag AssaTagHelper.RemoveTagAtCursor(textBoxListViewTextOriginal); diff --git a/src/ui/Logic/LanguageDeserializer.cs b/src/ui/Logic/LanguageDeserializer.cs index a6415a9a2..0c26d1dcb 100644 --- a/src/ui/Logic/LanguageDeserializer.cs +++ b/src/ui/Logic/LanguageDeserializer.cs @@ -4027,6 +4027,27 @@ namespace Nikse.SubtitleEdit.Logic case "Main/Menu/ContextMenu/SizeAllColumnsToFit": language.Main.Menu.ContextMenu.SizeAllColumnsToFit = reader.Value; break; + case "Main/Menu/ContextMenu/SetStyle": + language.Main.Menu.ContextMenu.SetStyle = reader.Value; + break; + case "Main/Menu/ContextMenu/SetActor": + language.Main.Menu.ContextMenu.SetActor = reader.Value; + break; + case "Main/Menu/ContextMenu/SetOverrideTags": + language.Main.Menu.ContextMenu.SetOverrideTags = reader.Value; + break; + case "Main/Menu/ContextMenu/SubStationAlphaStyles": + language.Main.Menu.ContextMenu.SubStationAlphaStyles = reader.Value; + break; + case "Main/Menu/ContextMenu/AdvancedSubStationAlphaStyles": + language.Main.Menu.ContextMenu.AdvancedSubStationAlphaStyles = reader.Value; + break; + case "Main/Menu/ContextMenu/TimedTextSetRegion": + language.Main.Menu.ContextMenu.TimedTextSetRegion = reader.Value; + break; + case "Main/Menu/ContextMenu/TimedTextSetStyle": + language.Main.Menu.ContextMenu.TimedTextSetStyle = reader.Value; + break; case "Main/Menu/ContextMenu/TimedTextStyles": language.Main.Menu.ContextMenu.TimedTextStyles = reader.Value; break;