mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-27 22:42:38 +01:00
Add "list errors" to Tools menu
This commit is contained in:
parent
85d0b121fa
commit
f8ef9db3cc
@ -27,6 +27,16 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
columnHeaderText.Text = LanguageSettings.Current.Main.Errors;
|
||||
|
||||
_subtitle = new Subtitle(subtitle);
|
||||
|
||||
ListErrors(subtitle);
|
||||
|
||||
UiUtil.FixLargeFonts(this, buttonOK);
|
||||
}
|
||||
|
||||
private void ListErrors(Subtitle subtitle)
|
||||
{
|
||||
listViewErrors.BeginUpdate();
|
||||
listViewErrors.Items.Clear();
|
||||
foreach (var p in _subtitle.Paragraphs)
|
||||
{
|
||||
var errors = GetErrors(p, _subtitle.Paragraphs.IndexOf(p), subtitle.Paragraphs);
|
||||
@ -42,6 +52,8 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
}
|
||||
|
||||
listViewErrors.EndUpdate();
|
||||
|
||||
labelCount.Text = $"{LanguageSettings.Current.FindDialog.Count}: {listViewErrors.Items.Count}";
|
||||
}
|
||||
|
||||
|
14
src/ui/Forms/Main.Designer.cs
generated
14
src/ui/Forms/Main.Designer.cs
generated
@ -558,6 +558,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
this.timerOriginalTextUndo = new System.Windows.Forms.Timer(this.components);
|
||||
this.contextMenuStripShowVideoControls = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.toolStripMenuItemShowVideoControls = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.listErrorsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
this.toolStrip1.SuspendLayout();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
@ -1750,6 +1751,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
this.toolStripMenuItemMergeLinesWithSameTimeCodes,
|
||||
this.toolStripMenuItemAutoSplitLongLines,
|
||||
this.toolStripMenuItemSortBy,
|
||||
this.listErrorsToolStripMenuItem,
|
||||
this.netflixQualityCheckToolStripMenuItem,
|
||||
this.toolStripSeparator22,
|
||||
this.toolStripMenuItemMakeEmptyFromCurrent,
|
||||
@ -4042,12 +4044,12 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
this.contextMenuStripHideVideoControls.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.hideVideoControlsToolStripMenuItem});
|
||||
this.contextMenuStripHideVideoControls.Name = "contextMenuStripVideoControls";
|
||||
this.contextMenuStripHideVideoControls.Size = new System.Drawing.Size(181, 48);
|
||||
this.contextMenuStripHideVideoControls.Size = new System.Drawing.Size(178, 26);
|
||||
//
|
||||
// hideVideoControlsToolStripMenuItem
|
||||
//
|
||||
this.hideVideoControlsToolStripMenuItem.Name = "hideVideoControlsToolStripMenuItem";
|
||||
this.hideVideoControlsToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.hideVideoControlsToolStripMenuItem.Size = new System.Drawing.Size(177, 22);
|
||||
this.hideVideoControlsToolStripMenuItem.Text = "Hide video controls";
|
||||
this.hideVideoControlsToolStripMenuItem.Click += new System.EventHandler(this.hideVideoControlsToolStripMenuItem_Click);
|
||||
//
|
||||
@ -5423,6 +5425,13 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
this.toolStripMenuItemShowVideoControls.Text = "Show video controls";
|
||||
this.toolStripMenuItemShowVideoControls.Click += new System.EventHandler(this.toolStripMenuItemShowVideoControls_Click);
|
||||
//
|
||||
// listErrorsToolStripMenuItem
|
||||
//
|
||||
this.listErrorsToolStripMenuItem.Name = "listErrorsToolStripMenuItem";
|
||||
this.listErrorsToolStripMenuItem.Size = new System.Drawing.Size(338, 22);
|
||||
this.listErrorsToolStripMenuItem.Text = "List errors...";
|
||||
this.listErrorsToolStripMenuItem.Click += new System.EventHandler(this.listErrorsToolStripMenuItem_Click);
|
||||
//
|
||||
// Main
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
@ -6024,5 +6033,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
private System.Windows.Forms.ToolStripMenuItem hideVideoControlsToolStripMenuItem;
|
||||
private System.Windows.Forms.ContextMenuStrip contextMenuStripShowVideoControls;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemShowVideoControls;
|
||||
private System.Windows.Forms.ToolStripMenuItem listErrorsToolStripMenuItem;
|
||||
}
|
||||
}
|
@ -1601,6 +1601,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
mergeSentencesToolStripMenuItem.Text = _language.MergeSentences;
|
||||
setMinimumDisplayTimeBetweenParagraphsToolStripMenuItem.Text = _language.Menu.Tools.MinimumDisplayTimeBetweenParagraphs;
|
||||
toolStripMenuItemSortBy.Text = _language.Menu.Tools.SortBy;
|
||||
listErrorsToolStripMenuItem.Text = _language.Menu.Tools.ListErrors;
|
||||
netflixQualityCheckToolStripMenuItem.Text = _language.Menu.Tools.NetflixQualityCheck;
|
||||
toolStripButtonNetflixQualityCheck.Text = _language.Menu.Tools.NetflixQualityCheck;
|
||||
|
||||
@ -5047,7 +5048,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
var oldFormat = _currentSubtitleFormat;
|
||||
_currentSubtitleFormat = newFormat;
|
||||
MakeFormatChange(newFormat, oldFormat);
|
||||
_converted = _currentSubtitleFormat != null;
|
||||
_converted = _currentSubtitleFormat != null;
|
||||
if (_converted && _subtitle.OriginalFormat == newFormat && File.Exists(_fileName))
|
||||
{
|
||||
_converted = false;
|
||||
@ -16048,6 +16049,11 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
_subtitleOriginal != null && _subtitleOriginal.Paragraphs.Count > 0 && _networkSession == null)
|
||||
{ // switch original/current
|
||||
int firstIndex = FirstSelectedIndex;
|
||||
if (firstIndex == -1)
|
||||
{
|
||||
firstIndex = _subtitleListViewIndex;
|
||||
}
|
||||
|
||||
double firstMs = -1;
|
||||
if (firstIndex >= 0)
|
||||
{
|
||||
@ -16069,15 +16075,13 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
SubtitleListview1.Fill(_subtitle, _subtitleOriginal);
|
||||
|
||||
_subtitleListViewIndex = -1;
|
||||
if (firstIndex >= 0 && _subtitle.Paragraphs.Count > firstIndex && Math.Abs(_subtitle.Paragraphs[firstIndex].StartTime.TotalMilliseconds - firstMs) < 0.01)
|
||||
if (firstIndex == -1 && _subtitle?.Paragraphs?.Count > 0)
|
||||
{
|
||||
SubtitleListview1.SelectIndexAndEnsureVisible(firstIndex, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
RefreshSelectedParagraph();
|
||||
firstIndex = 0;
|
||||
}
|
||||
|
||||
SubtitleListview1.SelectIndexAndEnsureVisible(firstIndex, true);
|
||||
|
||||
SetTitle();
|
||||
_fileDateTime = new DateTime();
|
||||
e.SuppressKeyPress = true;
|
||||
@ -16977,7 +16981,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
return;
|
||||
}
|
||||
|
||||
groupBoxVideo.SuspendLayout();
|
||||
groupBoxVideo.SuspendLayout();
|
||||
tabControlModes.Visible = on;
|
||||
var left = 5;
|
||||
if (on)
|
||||
@ -32457,7 +32461,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
if (coordinates.X < 15)
|
||||
{
|
||||
if (Configuration.Settings.General.ShowVideoControls)
|
||||
{
|
||||
{
|
||||
contextMenuStripHideVideoControls.Show(groupBoxVideo, coordinates);
|
||||
}
|
||||
else
|
||||
@ -32467,5 +32471,10 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void listErrorsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
ListSyntaxErrors();
|
||||
}
|
||||
}
|
||||
}
|
@ -797,7 +797,7 @@
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD2
|
||||
CAAAAk1TRnQBSQFMAgEBAgEAAWQBLAFkASwBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
CAAAAk1TRnQBSQFMAgEBAgEAAWwBLAFsASwBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
|
@ -1714,6 +1714,7 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
StartTime = "Start time",
|
||||
EndTime = "End time",
|
||||
Duration = "Duration",
|
||||
ListErrors = "List errors...",
|
||||
TextAlphabetically = "Text - alphabetically",
|
||||
TextSingleLineMaximumLength = "Text - single line max. length",
|
||||
TextTotalLength = "Text - total length",
|
||||
|
@ -1559,11 +1559,12 @@
|
||||
public string SplitLongLines { get; set; }
|
||||
public string MinimumDisplayTimeBetweenParagraphs { get; set; }
|
||||
public string SortBy { get; set; }
|
||||
public string NetflixQualityCheck { get; set; }
|
||||
public string Number { get; set; }
|
||||
public string StartTime { get; set; }
|
||||
public string EndTime { get; set; }
|
||||
public string Duration { get; set; }
|
||||
public string ListErrors { get; set; }
|
||||
public string NetflixQualityCheck { get; set; }
|
||||
public string TextAlphabetically { get; set; }
|
||||
public string TextSingleLineMaximumLength { get; set; }
|
||||
public string TextTotalLength { get; set; }
|
||||
|
Loading…
Reference in New Issue
Block a user