Set text for shortcut

This commit is contained in:
Nikolaj Olsson 2023-12-07 20:13:12 +01:00
parent f98c0a1eda
commit 7ee3b3e227
9 changed files with 15 additions and 8 deletions

View File

@ -8,6 +8,7 @@
* Add Arabic translation - thx Yahya
* Add new json subtitle format - thx Lucretia
* Add auto-translate via Papago
* Add new shortcut "Set end and start of next after gap" - thx rRobis
* IMPROVED:
* Update Polish translation - thx admas
* Update Finnish translation - thx Teijo S

View File

@ -2556,6 +2556,7 @@ can edit in same subtitle file (collaboration)</Information>
<AdjustViaEndAutoStart>Adjust via end position</AdjustViaEndAutoStart>
<AdjustViaEndAutoStartAndGoToNext>Adjust via end position and go to next</AdjustViaEndAutoStartAndGoToNext>
<AdjustSetEndMinusGapAndStartNextHere>Set end minus gap, go to next and start next here</AdjustSetEndMinusGapAndStartNextHere>
<AdjustSetEndAndStartNextAfterGap>Set end and start of next after gap</AdjustSetEndAndStartNextAfterGap>
<AdjustSetStartTimeAndGoToNext>Set start and go to next</AdjustSetStartTimeAndGoToNext>
<AdjustSetEndTimeAndGoToNext>Set end and go to next</AdjustSetEndTimeAndGoToNext>
<AdjustSetEndTimeAndPause>Set end and pause</AdjustSetEndTimeAndPause>

View File

@ -2632,7 +2632,7 @@ $HorzAlign = Center
public string MainAdjustViaEndAutoStart { get; set; }
public string MainAdjustViaEndAutoStartAndGoToNext { get; set; }
public string MainAdjustSetEndMinusGapAndStartNextHere { get; set; }
public string MainAdjustSetEndAndStartOfNextPlusGap { get; set; }
public string MainSetEndAndStartNextAfterGap { get; set; }
public string MainAdjustSetStartAutoDurationAndGoToNext { get; set; }
public string MainAdjustSetEndNextStartAndGoToNext { get; set; }
public string MainAdjustStartDownEndUpAndGoToNext { get; set; }
@ -10687,10 +10687,10 @@ $HorzAlign = Center
shortcuts.MainAdjustSetEndMinusGapAndStartNextHere = subNode.InnerText;
}
subNode = node.SelectSingleNode("MainAdjustSetEndAndStartOfNextPlusGap");
subNode = node.SelectSingleNode("MainSetEndAndStartNextAfterGap");
if (subNode != null)
{
shortcuts.MainAdjustSetEndAndStartOfNextPlusGap = subNode.InnerText;
shortcuts.MainSetEndAndStartNextAfterGap = subNode.InnerText;
}
subNode = node.SelectSingleNode("MainAdjustSetStartAutoDurationAndGoToNext");
@ -12708,7 +12708,7 @@ $HorzAlign = Center
textWriter.WriteElementString("MainAdjustViaEndAutoStart", shortcuts.MainAdjustViaEndAutoStart);
textWriter.WriteElementString("MainAdjustViaEndAutoStartAndGoToNext", shortcuts.MainAdjustViaEndAutoStartAndGoToNext);
textWriter.WriteElementString("MainAdjustSetEndMinusGapAndStartNextHere", shortcuts.MainAdjustSetEndMinusGapAndStartNextHere);
textWriter.WriteElementString("MainAdjustSetEndAndStartOfNextPlusGap", shortcuts.MainAdjustSetEndAndStartOfNextPlusGap);
textWriter.WriteElementString("MainSetEndAndStartNextAfterGap", shortcuts.MainSetEndAndStartNextAfterGap);
textWriter.WriteElementString("MainAdjustSetStartAutoDurationAndGoToNext", shortcuts.MainAdjustSetStartAutoDurationAndGoToNext);
textWriter.WriteElementString("MainAdjustSetEndNextStartAndGoToNext", shortcuts.MainAdjustSetEndNextStartAndGoToNext);
textWriter.WriteElementString("MainAdjustStartDownEndUpAndGoToNext", shortcuts.MainAdjustStartDownEndUpAndGoToNext);

View File

@ -2486,12 +2486,12 @@ $DROP=[DROPVALUE]" + Environment.NewLine + Environment.NewLine +
if (float.TryParse(comboBoxBorderWidth.SelectedItem.ToString().Replace(',', '.'), NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out var f))
{
return f;
return f * 1.25f;
}
if (float.TryParse(Utilities.RemoveNonNumbers(comboBoxBorderWidth.SelectedItem.ToString()).Replace(',', '.'), NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out f))
{
return f;
return f * 1.25f;
}
return 0;

View File

@ -1844,7 +1844,7 @@ namespace Nikse.SubtitleEdit.Forms.Options
AddNode(createAndAdjustNode, language.AdjustSetEndAndOffsetTheRestAndGoToNext, nameof(Configuration.Settings.Shortcuts.MainAdjustSetEndAndOffsetTheRestAndGoToNext));
AddNode(createAndAdjustNode, language.AdjustSetEndNextStartAndGoToNext, nameof(Configuration.Settings.Shortcuts.MainAdjustSetEndNextStartAndGoToNext));
AddNode(createAndAdjustNode, language.AdjustSetEndMinusGapAndStartNextHere, nameof(Configuration.Settings.Shortcuts.MainAdjustSetEndMinusGapAndStartNextHere));
AddNode(createAndAdjustNode, "Set end and start of next after gap", nameof(Configuration.Settings.Shortcuts.MainAdjustSetEndAndStartOfNextPlusGap));
AddNode(createAndAdjustNode, language.AdjustSetEndAndStartNextAfterGap, nameof(Configuration.Settings.Shortcuts.MainSetEndAndStartNextAfterGap));
AddNode(createAndAdjustNode, language.AdjustViaEndAutoStart, nameof(Configuration.Settings.Shortcuts.MainAdjustViaEndAutoStart));
AddNode(createAndAdjustNode, language.AdjustViaEndAutoStartAndGoToNext, nameof(Configuration.Settings.Shortcuts.MainAdjustViaEndAutoStartAndGoToNext));
AddNode(createAndAdjustNode, language.AdjustSelected100MsBack, nameof(Configuration.Settings.Shortcuts.MainAdjustSelected100MsBack));

View File

@ -2914,6 +2914,7 @@ can edit in same subtitle file (collaboration)",
AdjustViaEndAutoStart = "Adjust via end position",
AdjustViaEndAutoStartAndGoToNext = "Adjust via end position and go to next",
AdjustSetEndMinusGapAndStartNextHere = "Set end minus gap, go to next and start next here",
AdjustSetEndAndStartNextAfterGap = "Set end and start of next after gap",
AdjustSetStartTimeAndGoToNext = "Set start and go to next",
AdjustSetEndTimeAndGoToNext = "Set end and go to next",
AdjustSetEndTimeAndPause = "Set end and pause",

View File

@ -6955,6 +6955,9 @@ namespace Nikse.SubtitleEdit.Logic
case "Settings/AdjustSetEndMinusGapAndStartNextHere":
language.Settings.AdjustSetEndMinusGapAndStartNextHere = reader.Value;
break;
case "Settings/AdjustSetEndAndStartNextAfterGap":
language.Settings.AdjustSetEndAndStartNextAfterGap = reader.Value;
break;
case "Settings/AdjustSetStartTimeAndGoToNext":
language.Settings.AdjustSetStartTimeAndGoToNext = reader.Value;
break;

View File

@ -2731,6 +2731,7 @@
public string AdjustViaEndAutoStart { get; set; }
public string AdjustViaEndAutoStartAndGoToNext { get; set; }
public string AdjustSetEndMinusGapAndStartNextHere { get; set; }
public string AdjustSetEndAndStartNextAfterGap { get; set; }
public string AdjustSetStartTimeAndGoToNext { get; set; }
public string AdjustSetEndTimeAndGoToNext { get; set; }
public string AdjustSetEndTimeAndPause { get; set; }

View File

@ -470,7 +470,7 @@ namespace Nikse.SubtitleEdit.Logic
MainAdjustInsertViaEndAutoStart = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainAdjustViaEndAutoStart);
MainAdjustInsertViaEndAutoStartAndGoToNext = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainAdjustViaEndAutoStartAndGoToNext);
MainAdjustSetEndMinusGapAndStartNextHere = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainAdjustSetEndMinusGapAndStartNextHere);
MainAdjustSetEndAndStartOfNextPlusGap = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainAdjustSetEndAndStartOfNextPlusGap);
MainAdjustSetEndAndStartOfNextPlusGap = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainSetEndAndStartNextAfterGap);
MainAdjustSetStartAutoDurationAndGoToNext = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainAdjustSetStartAutoDurationAndGoToNext);
MainAdjustSetEndNextStartAndGoToNext = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainAdjustSetEndNextStartAndGoToNext);
MainAdjustStartDownEndUpAndGoToNext = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainAdjustStartDownEndUpAndGoToNext);