mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-27 22:42:38 +01:00
Fixed some line splitting + remembers history when setting min. display time - thx Trottel :)
git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@818 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
parent
1aac5f3c75
commit
916aa6f1af
1692
src/Forms/Main.Designer.cs
generated
1692
src/Forms/Main.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@ -4674,6 +4674,19 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
a = a + "</i>";
|
||||
b = "<i>" + b;
|
||||
}
|
||||
if (a.StartsWith("-") && (a.EndsWith(".") || a.EndsWith("!") || a.EndsWith("?")) &&
|
||||
b.StartsWith("-") && (b.EndsWith(".") || b.EndsWith("!") || b.EndsWith("?")))
|
||||
{
|
||||
a = a.TrimStart('-').TrimStart();
|
||||
b = b.TrimStart('-').TrimStart();
|
||||
}
|
||||
if (a.StartsWith("<i>-") && (a.EndsWith(".</i>") || a.EndsWith("!</i>") || a.EndsWith("?</i>")) &&
|
||||
b.StartsWith("<i>-") && (b.EndsWith(".</i>") || b.EndsWith("!</i>") || b.EndsWith("?</i>")))
|
||||
{
|
||||
a = a.Remove(3,1).Replace(" ", " ");
|
||||
b = b.Remove(3, 1).Replace(" ", " ");
|
||||
}
|
||||
|
||||
currentParagraph.Text = Utilities.AutoBreakLine(a);
|
||||
newParagraph.Text = Utilities.AutoBreakLine(b);
|
||||
}
|
||||
@ -4728,8 +4741,31 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
else if (lines.Length == 2 && (lines[0].EndsWith(".") || lines[0].EndsWith("!") || lines[0].EndsWith("?")))
|
||||
{
|
||||
originalCurrent.Text = Utilities.AutoBreakLine(lines[0]);
|
||||
originalNew.Text = Utilities.AutoBreakLine(lines[1]);
|
||||
string a = lines[0].Trim();
|
||||
string b = lines[1].Trim();
|
||||
if (oldText.TrimStart().StartsWith("<i>") && oldText.TrimEnd().EndsWith("</i>") &&
|
||||
Utilities.CountTagInText(oldText, "<i>") == 1 && Utilities.CountTagInText(oldText, "</i>") == 1)
|
||||
{
|
||||
a = a + "</i>";
|
||||
b = "<i>" + b;
|
||||
}
|
||||
if (a.StartsWith("-") && (a.EndsWith(".") || a.EndsWith("!") || a.EndsWith("?")) &&
|
||||
b.StartsWith("-") && (b.EndsWith(".") || b.EndsWith("!") || b.EndsWith("?")))
|
||||
{
|
||||
a = a.TrimStart('-').TrimStart();
|
||||
b = b.TrimStart('-').TrimStart();
|
||||
}
|
||||
if (a.StartsWith("<i>-") && (a.EndsWith(".</i>") || a.EndsWith("!</i>") || a.EndsWith("?</i>")) &&
|
||||
b.StartsWith("<i>-") && (b.EndsWith(".</i>") || b.EndsWith("!</i>") || b.EndsWith("?</i>")))
|
||||
{
|
||||
a = a.Remove(3, 1).Replace(" ", " ");
|
||||
b = b.Remove(3, 1).Replace(" ", " ");
|
||||
}
|
||||
|
||||
lines[0] = a;
|
||||
lines[1] = b;
|
||||
originalCurrent.Text = Utilities.AutoBreakLine(a);
|
||||
originalNew.Text = Utilities.AutoBreakLine(b);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -7735,7 +7771,9 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
if (setMinDisplayDiff.ShowDialog() == System.Windows.Forms.DialogResult.OK && setMinDisplayDiff.FixCount > 0)
|
||||
{
|
||||
MakeHistoryForUndo(_language.BeforeSetMinimumDisplayTimeBetweenParagraphs);
|
||||
_subtitle = setMinDisplayDiff.FixedSubtitle;
|
||||
_subtitle.Paragraphs.Clear();
|
||||
foreach (Paragraph p in setMinDisplayDiff.FixedSubtitle.Paragraphs)
|
||||
_subtitle.Paragraphs.Add(p);
|
||||
_subtitle.CalculateFrameNumbersFromTimeCodesNoCheck(CurrentFrameRate);
|
||||
ShowStatus(string.Format(_language.XMinimumDisplayTimeBetweenParagraphsChanged, setMinDisplayDiff.FixCount));
|
||||
SaveSubtitleListviewIndexes();
|
||||
|
@ -1,17 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
@ -26,36 +26,36 @@
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
@ -681,7 +681,7 @@
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD2
|
||||
CAAAAk1TRnQBSQFMAgEBAgEAAaABDAGgAQwBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
CAAAAk1TRnQBSQFMAgEBAgEAAagBDAGoAQwBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
|
@ -595,6 +595,7 @@
|
||||
<Compile Include="Logic\SubtitleFormats\GpacTtxt.cs" />
|
||||
<Compile Include="Logic\SubtitleFormats\Pac.cs" />
|
||||
<Compile Include="Logic\SubtitleFormats\PinnacleImpression.cs" />
|
||||
<Compile Include="Logic\SubtitleFormats\PListCaption.cs" />
|
||||
<Compile Include="Logic\SubtitleFormats\QuickTimeText.cs" />
|
||||
<Compile Include="Logic\SubtitleFormats\RealTime.cs" />
|
||||
<Compile Include="Logic\SubtitleFormats\Scenarist.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user