Added new shortcut: Copy text from original to current - thx megasmile :)

This commit is contained in:
niksedk 2015-01-16 19:12:46 +01:00
parent cc4a39658a
commit 103b074fbc
7 changed files with 17 additions and 1 deletions

View File

@ -1610,6 +1610,7 @@ can edit in same subtitle file (collaboration)</Information>
<ToggleDialogDashes>Toggle dialog dashes</ToggleDialogDashes>
<Alignment>Alignment (selected lines)</Alignment>
<CopyTextOnly>Copy text only to clip board (selected lines)</CopyTextOnly>
<CopyTextOnlyFromOriginalToCurrent>Copy text from original to current</CopyTextOnlyFromOriginalToCurrent>
<AutoDurationSelectedLines>Auto-duration (selected lines)</AutoDurationSelectedLines>
<ReverseStartAndEndingForRTL>Reverse RTL start/end</ReverseStartAndEndingForRTL>
<VerticalZoom>Vertical zoom in</VerticalZoom>

View File

@ -14132,6 +14132,7 @@ namespace Nikse.SubtitleEdit.Forms
_mainListViewGoToNextError = Utilities.GetKeys(Configuration.Settings.Shortcuts.MainListViewGoToNextError);
_mainEditReverseStartAndEndingForRTL = Utilities.GetKeys(Configuration.Settings.Shortcuts.MainEditReverseStartAndEndingForRTL);
_mainListViewCopyText = Utilities.GetKeys(Configuration.Settings.Shortcuts.MainListViewCopyText);
copyOriginalTextToCurrentToolStripMenuItem.ShortcutKeys = Utilities.GetKeys(Configuration.Settings.Shortcuts.MainListViewCopyTextFromOriginalToCurrent);
toolStripMenuItemColumnDeleteText.ShortcutKeys = Utilities.GetKeys(Configuration.Settings.Shortcuts.MainListViewColumnDeleteText);
ShiftTextCellsDownToolStripMenuItem.ShortcutKeys = Utilities.GetKeys(Configuration.Settings.Shortcuts.MainListViewColumnInsertText);
toolStripMenuItemPasteSpecial.ShortcutKeys = Utilities.GetKeys(Configuration.Settings.Shortcuts.MainListViewColumnPaste);

View File

@ -738,8 +738,10 @@ namespace Nikse.SubtitleEdit.Forms
listViewNode.Nodes.Add(Configuration.Settings.Language.Settings.MergeDialog + GetShortcutText(Configuration.Settings.Shortcuts.MainMergeDialog));
listViewNode.Nodes.Add(Configuration.Settings.Language.Settings.ToggleFocus + GetShortcutText(Configuration.Settings.Shortcuts.MainToggleFocus));
listViewNode.Nodes.Add(Configuration.Settings.Language.Settings.ToggleDialogDashes + GetShortcutText(Configuration.Settings.Shortcuts.MainListViewToggleDashes));
listViewNode.Nodes.Add(Configuration.Settings.Language.Settings.Alignment + GetShortcutText(Configuration.Settings.Shortcuts.MainListViewAlignment));
listViewNode.Nodes.Add(Configuration.Settings.Language.Settings.Alignment + GetShortcutText(Configuration.Settings.Shortcuts.MainListViewAlignment));
listViewNode.Nodes.Add(Configuration.Settings.Language.Settings.CopyTextOnly + GetShortcutText(Configuration.Settings.Shortcuts.MainListViewCopyText));
if (!string.IsNullOrEmpty(Configuration.Settings.Language.Settings.CopyTextOnlyFromOriginalToCurrent))
listViewNode.Nodes.Add(Configuration.Settings.Language.Settings.CopyTextOnlyFromOriginalToCurrent + GetShortcutText(Configuration.Settings.Shortcuts.MainListViewCopyTextFromOriginalToCurrent));
listViewNode.Nodes.Add(Configuration.Settings.Language.Settings.AutoDurationSelectedLines + GetShortcutText(Configuration.Settings.Shortcuts.MainListViewAutoDuration));
listViewNode.Nodes.Add(Configuration.Settings.Language.Settings.ListViewColumnDelete + GetShortcutText(Configuration.Settings.Shortcuts.MainListViewColumnDeleteText));
listViewNode.Nodes.Add(Configuration.Settings.Language.Settings.ListViewColumnInsert + GetShortcutText(Configuration.Settings.Shortcuts.MainListViewColumnInsertText));
@ -1465,6 +1467,8 @@ namespace Nikse.SubtitleEdit.Forms
Configuration.Settings.Shortcuts.MainListViewAlignment = GetShortcut(node.Text);
else if (text == Configuration.Settings.Language.Settings.CopyTextOnly.Replace("&", string.Empty))
Configuration.Settings.Shortcuts.MainListViewCopyText = GetShortcut(node.Text);
else if (Configuration.Settings.Language.Settings.CopyTextOnlyFromOriginalToCurrent != null && text == Configuration.Settings.Language.Settings.CopyTextOnlyFromOriginalToCurrent.Replace("&", string.Empty))
Configuration.Settings.Shortcuts.MainListViewCopyTextFromOriginalToCurrent = GetShortcut(node.Text);
else if (text == Configuration.Settings.Language.Settings.AutoDurationSelectedLines.Replace("&", string.Empty))
Configuration.Settings.Shortcuts.MainListViewAutoDuration = GetShortcut(node.Text);
else if (text == Configuration.Settings.Language.Settings.ListViewColumnDelete.Replace("&", string.Empty))

View File

@ -1885,6 +1885,7 @@ can edit in same subtitle file (collaboration)",
ToggleDialogDashes = "Toggle dialog dashes",
Alignment = "Alignment (selected lines)",
CopyTextOnly = "Copy text only to clip board (selected lines)",
CopyTextOnlyFromOriginalToCurrent = "Copy text from original to current",
AutoDurationSelectedLines = "Auto-duration (selected lines)",
ReverseStartAndEndingForRTL = "Reverse RTL start/end",
VerticalZoom = "Vertical zoom in",

View File

@ -4430,6 +4430,9 @@ namespace Nikse.SubtitleEdit.Logic
case "Settings/CopyTextOnly":
language.Settings.CopyTextOnly = reader.Value;
break;
case "Settings/CopyTextOnlyFromOriginalToCurrent":
language.Settings.CopyTextOnlyFromOriginalToCurrent = reader.Value;
break;
case "Settings/AutoDurationSelectedLines":
language.Settings.AutoDurationSelectedLines = reader.Value;
break;

View File

@ -1778,6 +1778,7 @@
public string ToggleDialogDashes { get; set; }
public string Alignment { get; set; }
public string CopyTextOnly { get; set; }
public string CopyTextOnlyFromOriginalToCurrent { get; set; }
public string AutoDurationSelectedLines { get; set; }
public string ReverseStartAndEndingForRTL { get; set; }
public string VerticalZoom { get; set; }

View File

@ -820,6 +820,7 @@ namespace Nikse.SubtitleEdit.Logic
public string MainListViewToggleDashes { get; set; }
public string MainListViewAlignment { get; set; }
public string MainListViewCopyText { get; set; }
public string MainListViewCopyTextFromOriginalToCurrent { get; set; }
public string MainListViewAutoDuration { get; set; }
public string MainListViewColumnDeleteText { get; set; }
public string MainListViewColumnInsertText { get; set; }
@ -2371,6 +2372,9 @@ namespace Nikse.SubtitleEdit.Logic
subNode = node.SelectSingleNode("MainListViewCopyText");
if (subNode != null)
settings.Shortcuts.MainListViewCopyText = subNode.InnerText;
subNode = node.SelectSingleNode("MainListViewCopyTextFromOriginalToCurrent");
if (subNode != null)
settings.Shortcuts.MainListViewCopyTextFromOriginalToCurrent = subNode.InnerText;
subNode = node.SelectSingleNode("MainListViewAutoDuration");
if (subNode != null)
settings.Shortcuts.MainListViewAutoDuration = subNode.InnerText;
@ -3056,6 +3060,7 @@ namespace Nikse.SubtitleEdit.Logic
textWriter.WriteElementString("MainListViewToggleDashes", settings.Shortcuts.MainListViewToggleDashes);
textWriter.WriteElementString("MainListViewAlignment", settings.Shortcuts.MainListViewAlignment);
textWriter.WriteElementString("MainListViewCopyText", settings.Shortcuts.MainListViewCopyText);
textWriter.WriteElementString("MainListViewCopyTextFromOriginalToCurrent", settings.Shortcuts.MainListViewCopyTextFromOriginalToCurrent);
textWriter.WriteElementString("MainListViewAutoDuration", settings.Shortcuts.MainListViewAutoDuration);
textWriter.WriteElementString("MainListViewColumnDeleteText", settings.Shortcuts.MainListViewColumnDeleteText);
textWriter.WriteElementString("MainListViewColumnInsertText", settings.Shortcuts.MainListViewColumnInsertText);