Allow ASSA tag helper for all formats - thx OmrSi :)

This commit is contained in:
Nikolaj Olsson 2021-06-18 13:19:55 +02:00
parent 5e1d587469
commit 338f81418e
3 changed files with 27 additions and 6 deletions

View File

@ -1213,9 +1213,9 @@ To use an API key go to "Options -> Settings -> Tools" to enter your Googl
</ToolBar> </ToolBar>
<ContextMenu> <ContextMenu>
<SizeAllColumnsToFit>Size all columns to fit</SizeAllColumnsToFit> <SizeAllColumnsToFit>Size all columns to fit</SizeAllColumnsToFit>
<AdvancedSubStationAlphaSetStyle>Advanced Sub Station Alpha - set style</AdvancedSubStationAlphaSetStyle> <SetStyle>Set style</SetStyle>
<SubStationAlphaSetStyle>Sub Station Alpha - set style</SubStationAlphaSetStyle>
<SetActor>Set actor</SetActor> <SetActor>Set actor</SetActor>
<SetOverrideTags>Set override tags</SetOverrideTags>
<SubStationAlphaStyles>Sub Station Alpha styles...</SubStationAlphaStyles> <SubStationAlphaStyles>Sub Station Alpha styles...</SubStationAlphaStyles>
<AdvancedSubStationAlphaStyles>Advanced Sub Station Alpha styles...</AdvancedSubStationAlphaStyles> <AdvancedSubStationAlphaStyles>Advanced Sub Station Alpha styles...</AdvancedSubStationAlphaStyles>
<TimedTextSetRegion>Timed Text - set region</TimedTextSetRegion> <TimedTextSetRegion>Timed Text - set region</TimedTextSetRegion>

View File

@ -9823,13 +9823,13 @@ namespace Nikse.SubtitleEdit.Forms
return; return;
} }
if (_shortcuts.MainTextBoxAssaIntellisense == e.KeyData && IsAssa()) if (_shortcuts.MainTextBoxAssaIntellisense == e.KeyData)
{ {
_intellisenceList = DoIntellisense(textBoxListViewText, _intellisenceList); _intellisenceList = DoIntellisense(textBoxListViewText, _intellisenceList);
e.SuppressKeyPress = true; e.SuppressKeyPress = true;
return; return;
} }
else if (_shortcuts.MainTextBoxAssaRemoveTag == e.KeyData && IsAssa()) else if (_shortcuts.MainTextBoxAssaRemoveTag == e.KeyData)
{ {
MakeHistoryForUndo("text change"); //TODO: fix language tag MakeHistoryForUndo("text change"); //TODO: fix language tag
AssaTagHelper.RemoveTagAtCursor(textBoxListViewText); AssaTagHelper.RemoveTagAtCursor(textBoxListViewText);
@ -25615,13 +25615,13 @@ namespace Nikse.SubtitleEdit.Forms
return; return;
} }
if (_shortcuts.MainTextBoxAssaIntellisense == e.KeyData && IsAssa()) if (_shortcuts.MainTextBoxAssaIntellisense == e.KeyData)
{ {
_intellisenceListOriginal = DoIntellisense(textBoxListViewTextOriginal, _intellisenceListOriginal); _intellisenceListOriginal = DoIntellisense(textBoxListViewTextOriginal, _intellisenceListOriginal);
e.SuppressKeyPress = true; e.SuppressKeyPress = true;
return; return;
} }
else if (_shortcuts.MainTextBoxAssaRemoveTag == e.KeyData && IsAssa()) else if (_shortcuts.MainTextBoxAssaRemoveTag == e.KeyData)
{ {
MakeHistoryForUndo("text change"); //TODO: fix language tag MakeHistoryForUndo("text change"); //TODO: fix language tag
AssaTagHelper.RemoveTagAtCursor(textBoxListViewTextOriginal); AssaTagHelper.RemoveTagAtCursor(textBoxListViewTextOriginal);

View File

@ -4027,6 +4027,27 @@ namespace Nikse.SubtitleEdit.Logic
case "Main/Menu/ContextMenu/SizeAllColumnsToFit": case "Main/Menu/ContextMenu/SizeAllColumnsToFit":
language.Main.Menu.ContextMenu.SizeAllColumnsToFit = reader.Value; language.Main.Menu.ContextMenu.SizeAllColumnsToFit = reader.Value;
break; 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": case "Main/Menu/ContextMenu/TimedTextStyles":
language.Main.Menu.ContextMenu.TimedTextStyles = reader.Value; language.Main.Menu.ContextMenu.TimedTextStyles = reader.Value;
break; break;