This commit is contained in:
niksedk 2014-03-22 17:51:02 +01:00
commit a7eb372631
14 changed files with 34 additions and 34 deletions

View File

@ -2333,7 +2333,7 @@ $DROP=[DROPVALUE]" + Environment.NewLine + Environment.NewLine +
for (int i=0; i<1000; i++)
comboBoxBottomMargin.Items.Add(i);
if (Configuration.Settings.Tools.ExportBottomMargin >= 0 && Configuration.Settings.Tools.ExportBottomMargin < comboBoxBottomMargin.Items.Count)
comboBoxBottomMargin.SelectedIndex = Configuration.Settings.Tools.ExportBottomMargin;
comboBoxBottomMargin.SelectedIndex = Configuration.Settings.Tools.ExportBottomMargin;
if (exportType == "BLURAYSUP" || exportType == "IMAGE/FRAME" && Configuration.Settings.Tools.ExportBluRayBottomMargin >= 0 && Configuration.Settings.Tools.ExportBluRayBottomMargin < comboBoxBottomMargin.Items.Count)
comboBoxBottomMargin.SelectedIndex = Configuration.Settings.Tools.ExportBluRayBottomMargin;
@ -2390,10 +2390,10 @@ $DROP=[DROPVALUE]" + Environment.NewLine + Environment.NewLine +
if (Configuration.Settings.Tools.Export3DType >= 0 && Configuration.Settings.Tools.Export3DType < comboBox3D.Items.Count)
comboBox3D.SelectedIndex = Configuration.Settings.Tools.Export3DType;
if (Configuration.Settings.Tools.Export3DDepth >= numericUpDownDepth3D.Minimum && Configuration.Settings.Tools.Export3DDepth <= numericUpDownDepth3D.Maximum)
numericUpDownDepth3D.Value = Configuration.Settings.Tools.Export3DDepth;
numericUpDownDepth3D.Value = Configuration.Settings.Tools.Export3DDepth;
if (Configuration.Settings.Tools.ExportHorizontalAlignment >= 0 && Configuration.Settings.Tools.ExportHorizontalAlignment < comboBoxHAlign.Items.Count)
comboBoxHAlign.SelectedIndex = Configuration.Settings.Tools.ExportHorizontalAlignment;
comboBoxHAlign.SelectedIndex = Configuration.Settings.Tools.ExportHorizontalAlignment;
subtitleListView1.Fill(_subtitle);
subtitleListView1.SelectIndexAndEnsureVisible(0);

View File

@ -5057,7 +5057,7 @@ namespace Nikse.SubtitleEdit.Forms
}
private void ButtonAutoBreakClick(object sender, EventArgs e)
{
{
if (textBoxListViewText.Text.Length > 0)
{
string oldText = textBoxListViewText.Text;

View File

@ -2260,7 +2260,7 @@ namespace Nikse.SubtitleEdit.Forms
{
ImportSubtitleFromTransportStream(fileName);
return;
}
}
if ((ext == ".mp4" || ext == ".m4v" || ext == ".3gp")
&& fi.Length > 10000)
@ -7072,7 +7072,7 @@ namespace Nikse.SubtitleEdit.Forms
// Remove the dialogue marker from the next subtitle.
next.Text = next.Text.Remove(0, dialogueMarker.Length);
}
// If the second subtitle starts with "...":
Boolean nextSubtitleStartsWithEllipsis = next.Text.StartsWith("...");
if (nextSubtitleStartsWithEllipsis)
@ -7118,7 +7118,7 @@ namespace Nikse.SubtitleEdit.Forms
{
// Undo
MakeHistoryForUndo(_language.BeforeLineUpdatedInListView);
// Define firstWord. If idx > 0, there is a first word.
// If not, firstWord is the whole text of the next subtitle.
string firstWord = ( idx > 0 ? s.Substring(0,idx).Trim() : next.Text);
@ -7154,7 +7154,7 @@ namespace Nikse.SubtitleEdit.Forms
// Remove the position tag from the first word.
firstWord = firstWord.Remove(0, firstWord.IndexOf("}") + 1);
}
// If the second subtitle (next) starts with a tag:
String startTag = "";
if (firstWord.StartsWith("<") && firstWord.Contains(">"))
@ -7193,10 +7193,10 @@ namespace Nikse.SubtitleEdit.Forms
// Add positionTag + startTag + dialogueMarker + "..." + text to 'next'.
if (idx > 0)
next.Text = positionTag + startTag + dialogueMarker + (nextSubtitleStartsWithEllipsis ? "..." : "") + Utilities.AutoBreakLine(next.Text.Trim());
// Add text + firstWord + "..." + endTag to First line.
p.Text = (idx == 0 ? startTag : "") + Utilities.AutoBreakLine(p.Text.Trim() + " " + firstWord.Trim()) + (idx > 0 && firstSubtitleEndsWithEllipsis ? "..." : "") + endTag;
}
SubtitleListview1.SetText(firstIndex, p.Text);

View File

@ -38,7 +38,7 @@ namespace Nikse.SubtitleEdit.Forms
tabPageGetPlugins.Text = _language.GetPlugins;
buttonDownload.Text = _language.Download;
buttonRemove.Text = _language.Remove;
buttonRemove.Text = _language.Remove;
buttonOK.Text = Configuration.Settings.Language.General.OK;
linkLabelOpenPluginFolder.Text = _language.OpenPluginsFolder;
labelDescription1.Text = _language.GetPluginsInfo1;
@ -158,7 +158,7 @@ namespace Nikse.SubtitleEdit.Forms
{
buttonUpdateAll.Text = Configuration.Settings.Language.PluginsGet.UpdateAll;
buttonUpdateAll.Visible = true;
}
}
}
}

View File

@ -680,7 +680,7 @@ namespace Nikse.SubtitleEdit.Forms
syncNode.Nodes.Add(Configuration.Settings.Language.Main.Menu.Synchronization.AdjustAllTimes + GetShortcutText(Configuration.Settings.Shortcuts.MainSynchronizationAdjustTimes));
syncNode.Nodes.Add(Configuration.Settings.Language.Main.Menu.Synchronization.VisualSync + GetShortcutText(Configuration.Settings.Shortcuts.MainSynchronizationVisualSync));
syncNode.Nodes.Add(Configuration.Settings.Language.Main.Menu.Synchronization.PointSync + GetShortcutText(Configuration.Settings.Shortcuts.MainSynchronizationPointSync));
syncNode.Nodes.Add(Configuration.Settings.Language.Main.Menu.Tools.ChangeFrameRate + GetShortcutText(Configuration.Settings.Shortcuts.MainSynchronizationChangeFrameRate));
syncNode.Nodes.Add(Configuration.Settings.Language.Main.Menu.Tools.ChangeFrameRate + GetShortcutText(Configuration.Settings.Shortcuts.MainSynchronizationChangeFrameRate));
treeViewShortcuts.Nodes.Add(syncNode);
var listViewNode = new TreeNode(Configuration.Settings.Language.Main.Controls.ListView);

View File

@ -7135,7 +7135,7 @@ namespace Nikse.SubtitleEdit.Forms
}
private void ContextMenuStripListviewOpening(object sender, CancelEventArgs e)
{
{
if (subtitleListView1.SelectedItems.Count == 0)
e.Cancel = true;
@ -7179,7 +7179,7 @@ namespace Nikse.SubtitleEdit.Forms
toolStripMenuItemInspectNOcrMatches.Visible = false;
toolStripSeparatorImageCompare.Visible = false;
nOcrTrainingToolStripMenuItem.Visible = false;
}
}
}
private void SaveImageAsToolStripMenuItemClick(object sender, EventArgs e)

View File

@ -421,7 +421,7 @@
public string Transparency { get; set; }
public string ImageFormat { get; set; }
public string SimpleRendering { get; set; }
public string AntiAliasingWithTransparency { get; set; }
public string AntiAliasingWithTransparency { get; set; }
public string Text3D { get; set; }
public string SideBySide3D { get; set; }
public string HalfTopBottom3D { get; set; }

View File

@ -749,7 +749,7 @@ namespace Nikse.SubtitleEdit.Logic
public string MainEditModifySelection { get; set; }
public string MainToolsFixCommonErrors { get; set; }
public string MainToolsFixCommonErrorsPreview { get; set; }
public string MainToolsSplitLongLines { get; set; }
public string MainToolsSplitLongLines { get; set; }
public string MainToolsRenumber { get; set; }
public string MainToolsRemoveTextForHI { get; set; }
public string MainToolsChangeCasing { get; set; }
@ -775,7 +775,7 @@ namespace Nikse.SubtitleEdit.Logic
public string MainSynchronizationAdjustTimes { get; set; }
public string MainSynchronizationVisualSync { get; set; }
public string MainSynchronizationPointSync { get; set; }
public string MainSynchronizationChangeFrameRate { get; set; }
public string MainSynchronizationChangeFrameRate { get; set; }
public string MainListViewItalic { get; set; }
public string MainListViewToggleDashes { get; set; }
public string MainListViewAlignment { get; set; }
@ -1655,7 +1655,7 @@ namespace Nikse.SubtitleEdit.Logic
subNode = node.SelectSingleNode("UseNoLineBreakAfter");
if (subNode != null)
settings.Tools.UseNoLineBreakAfter = Convert.ToBoolean(subNode.InnerText);
settings.SubtitleSettings = new Nikse.SubtitleEdit.Logic.SubtitleSettings();
node = doc.DocumentElement.SelectSingleNode("SubtitleSettings");
@ -2227,7 +2227,7 @@ namespace Nikse.SubtitleEdit.Logic
settings.Shortcuts.MainSynchronizationPointSync = subNode.InnerText;
subNode = node.SelectSingleNode("MainSynchronizationChangeFrameRate");
if (subNode != null)
settings.Shortcuts.MainSynchronizationChangeFrameRate = subNode.InnerText;
settings.Shortcuts.MainSynchronizationChangeFrameRate = subNode.InnerText;
subNode = node.SelectSingleNode("MainListViewItalic");
if (subNode != null)
settings.Shortcuts.MainListViewItalic = subNode.InnerText;
@ -2651,7 +2651,7 @@ namespace Nikse.SubtitleEdit.Logic
textWriter.WriteElementString("ExportVobSubVideoResolution", settings.Tools.ExportVobSubVideoResolution);
textWriter.WriteElementString("ExportVobSubLanguage", settings.Tools.ExportVobSubLanguage);
textWriter.WriteElementString("ExportVobSubSimpleRendering", settings.Tools.ExportVobSubSimpleRendering.ToString());
textWriter.WriteElementString("ExportVobAntiAliasingWithTransparency", settings.Tools.ExportVobAntiAliasingWithTransparency.ToString());
textWriter.WriteElementString("ExportVobAntiAliasingWithTransparency", settings.Tools.ExportVobAntiAliasingWithTransparency.ToString());
textWriter.WriteElementString("ExportBluRayFontName", settings.Tools.ExportBluRayFontName);
textWriter.WriteElementString("ExportBluRayFontSize", settings.Tools.ExportBluRayFontSize.ToString());
textWriter.WriteElementString("ExportFcpFontName", settings.Tools.ExportFcpFontName);
@ -2665,7 +2665,7 @@ namespace Nikse.SubtitleEdit.Logic
textWriter.WriteElementString("ExportFontColor", settings.Tools.ExportFontColor.ToArgb().ToString());
textWriter.WriteElementString("ExportBorderColor", settings.Tools.ExportBorderColor.ToArgb().ToString());
textWriter.WriteElementString("ExportBottomMargin", settings.Tools.ExportBottomMargin.ToString());
textWriter.WriteElementString("ExportHorizontalAlignment", settings.Tools.ExportHorizontalAlignment.ToString());
textWriter.WriteElementString("ExportHorizontalAlignment", settings.Tools.ExportHorizontalAlignment.ToString());
textWriter.WriteElementString("ExportBluRayBottomMargin", settings.Tools.ExportBluRayBottomMargin.ToString());
textWriter.WriteElementString("ExportBluRayShadow", settings.Tools.ExportBluRayShadow.ToString());
textWriter.WriteElementString("Export3DType", settings.Tools.Export3DType.ToString());
@ -2888,7 +2888,7 @@ namespace Nikse.SubtitleEdit.Logic
textWriter.WriteElementString("MainSynchronizationAdjustTimes", settings.Shortcuts.MainSynchronizationAdjustTimes);
textWriter.WriteElementString("MainSynchronizationVisualSync", settings.Shortcuts.MainSynchronizationVisualSync);
textWriter.WriteElementString("MainSynchronizationPointSync", settings.Shortcuts.MainSynchronizationPointSync);
textWriter.WriteElementString("MainSynchronizationChangeFrameRate", settings.Shortcuts.MainSynchronizationChangeFrameRate);
textWriter.WriteElementString("MainSynchronizationChangeFrameRate", settings.Shortcuts.MainSynchronizationChangeFrameRate);
textWriter.WriteElementString("MainListViewItalic", settings.Shortcuts.MainListViewItalic);
textWriter.WriteElementString("MainListViewToggleDashes", settings.Shortcuts.MainListViewToggleDashes);
textWriter.WriteElementString("MainListViewAlignment", settings.Shortcuts.MainListViewAlignment);

View File

@ -153,7 +153,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
total.Append(text.Substring(i, 1));
}
}
total.Append(EncodeText(partial.ToString()));
text = total.ToString();
}

View File

@ -46,14 +46,14 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
public override string ToText(Subtitle subtitle, string title)
{
//SUBTITLE: 1 TIMEIN: 00:00:07:01 DURATION: 03:11 TIMEOUT: 00:00:10:12
//SUBTITLE: 1 TIMEIN: 00:00:07:01 DURATION: 03:11 TIMEOUT: 00:00:10:12
//Voor de oorlog
//SUBTITLE: 2 TIMEIN: 00:00:10:16 DURATION: 01:08 TIMEOUT: 00:00:11:24
//SUBTITLE: 2 TIMEIN: 00:00:10:16 DURATION: 01:08 TIMEOUT: 00:00:11:24
//Ik ben Marie Pinhas. Ik ben geboren
//in Thessaloniki in Griekenland,
//SUBTITLE: 3 TIMEIN: 00:00:12:12 DURATION: 02:10 TIMEOUT: 00:00:14:22
//SUBTITLE: 3 TIMEIN: 00:00:12:12 DURATION: 02:10 TIMEOUT: 00:00:14:22
//op 6 maart '31,
//in een heel oude Griekse familie.
@ -136,7 +136,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
if (RegexTimeCodes.IsMatch(line))
{
//SUBTITLE: 1 TIMEIN: 00:00:07:01 DURATION: 03:11 TIMEOUT: 00:00:10:12
//SUBTITLE: 1 TIMEIN: 00:00:07:01 DURATION: 03:11 TIMEOUT: 00:00:10:12
string s = line.Replace("SUBTITLE:", string.Empty).Replace("TIMEIN", string.Empty).Replace("DURATION", string.Empty).Replace("TIMEOUT", string.Empty).Replace(" ", string.Empty).Replace("\t", string.Empty);
string[] parts = s.Split(':');
try

View File

@ -123,7 +123,7 @@ namespace Nikse.SubtitleEdit.Logic.TransportStream
var ss = new SubtitleSegment(buffer, index);
while (ss.SyncByte == Helper.B00001111)
{
SubtitleSegments.Add(ss);
SubtitleSegments.Add(ss);
index += 6 + ss.SegmentLength;
if (index + 6 < buffer.Length)
ss = new SubtitleSegment(buffer, index);
@ -133,7 +133,7 @@ namespace Nikse.SubtitleEdit.Logic.TransportStream
Length = index;
int size = index - start;
DataBuffer = new byte[size];
Buffer.BlockCopy(buffer, start, DataBuffer, 0, DataBuffer.Length);
Buffer.BlockCopy(buffer, start, DataBuffer, 0, DataBuffer.Length);
// Parse segments
index = 2;

View File

@ -290,7 +290,7 @@ namespace Nikse.SubtitleEdit.Logic.TransportStream
SubtitlePacketIds.Add(key);
}
SubtitlePacketIds.Sort();
}
}
public List<TransportStreamSubtitle> GetDvbSubtitles(int packetId)
{
@ -408,7 +408,7 @@ namespace Nikse.SubtitleEdit.Logic.TransportStream
var subtitles = new List<TransportStreamSubtitle>();
int seconds = 0;
for (int i = 0; i < list.Count; i++)
{
{
var pes = list[i];
pes.ParseSegments();
if (pes.ObjectDataList.Count > 0)

View File

@ -541,7 +541,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
}
}
catch
{
{
}
}

View File

@ -301,7 +301,7 @@ namespace Nikse.SubtitleEdit.Logic.VobSub
// next display control sequence table address (use current is last)
WriteEndianWord(startDisplayControlSequenceTableAddress + 24, ms); // start of display control sequence table address
// Control command start
// Control command start
if (p.Forced)
ms.WriteByte(0); // ForcedStartDisplay==0
else