diff --git a/src/ChangeLog.txt b/src/ChangeLog.txt index a9e46e2dc..403dd3d67 100644 --- a/src/ChangeLog.txt +++ b/src/ChangeLog.txt @@ -5,14 +5,14 @@ Subtitle Edit Changelog * Added Finnish language - thx Veikko * IMPROVED: * VLC audio extraction now generates smaller wave file - thx utocne - (transcoding parameters now in Settings.xml) + (transcoding parameters now in Settings.xml) * Added "Find text" to Point Sync + Set Sync Point - thx eMWu * Unbreak/auto-break buttons now also work on selected lines - thx XhmikosR * FIXED: * Crash in "Fix common errors" - thx Dragan B * New-line character in Final Cut Pro Xml format - thx Axel Schmidt - * Bug in "Import plain text" regarding "Auto split text" - * Crash in AutoBr line + * Bug in "Import plain text" regarding "Auto split text" + * Crash in AutoBr line * Crash/bug in vobsub reading - thx T.S. * Crash when reading vobsub files with errors - thx Sofiaguy * EBU stl format reading now skips user data - thx Peter @@ -49,8 +49,8 @@ Subtitle Edit Changelog * Wrong positioning of some texts (mostly at startup) - thx Trottel * Fix crash in image export (due to blank lines) - thx Mahdi * Line-breaking now works better with font tags - thx Trottel/XhmikosR - * Moving subtitles in timeline (waveform/spectrogram) with - mouse is now fast again + * Moving subtitles in timeline (waveform/spectrogram) with mouse + is now fast again 3.2.4 (11th March 2012) diff --git a/src/Controls/AudioVisualizer.cs b/src/Controls/AudioVisualizer.cs index 841bb21dd..43bcc9277 100644 --- a/src/Controls/AudioVisualizer.cs +++ b/src/Controls/AudioVisualizer.cs @@ -544,7 +544,7 @@ namespace Nikse.SubtitleEdit.Controls else if (_zoomFactor * _wavePeaks.Header.SampleRate > 51) e.Graphics.DrawString("#" + paragraph.Number + " " + paragraph.StartTime.ToShortString(), Font, textBrush, new PointF(currentRegionLeft + 3, Height - 32)); else if (_zoomFactor * _wavePeaks.Header.SampleRate > 25) - e.Graphics.DrawString("#" + paragraph.Number, Font, textBrush, new PointF(currentRegionLeft + 3, Height - 32)); + e.Graphics.DrawString("#" + paragraph.Number, Font, textBrush, new PointF(currentRegionLeft + 3, Height - 32)); } } diff --git a/src/Controls/SubtitleListView.cs b/src/Controls/SubtitleListView.cs index b72a6d31d..12d1cc02a 100644 --- a/src/Controls/SubtitleListView.cs +++ b/src/Controls/SubtitleListView.cs @@ -547,7 +547,7 @@ namespace Nikse.SubtitleEdit.Controls { item.SubItems[ColumnIndexStart].Text = paragraph.StartTime.ToString(); item.SubItems[ColumnIndexEnd].Text = paragraph.EndTime.ToString(); - item.SubItems[ColumnIndexDuration].Text = string.Format("{0},{1:000}", paragraph.Duration.Seconds, paragraph.Duration.Milliseconds); + item.SubItems[ColumnIndexDuration].Text = string.Format("{0},{1:000}", paragraph.Duration.Seconds, paragraph.Duration.Milliseconds); } Items[index].SubItems[ColumnIndexText].Text = paragraph.Text.Replace(Environment.NewLine, _lineSeparatorString); } @@ -664,7 +664,7 @@ namespace Nikse.SubtitleEdit.Controls else { item.SubItems[ColumnIndexDuration].Text = string.Format("{0},{1:000}", paragraph.Duration.Seconds, paragraph.Duration.Milliseconds); - item.SubItems[ColumnIndexEnd].Text = paragraph.EndTime.ToString(); + item.SubItems[ColumnIndexEnd].Text = paragraph.EndTime.ToString(); } } } @@ -691,7 +691,7 @@ namespace Nikse.SubtitleEdit.Controls else { item.SubItems[ColumnIndexStart].Text = paragraph.StartTime.ToString(); - item.SubItems[ColumnIndexEnd].Text = paragraph.EndTime.ToString(); + item.SubItems[ColumnIndexEnd].Text = paragraph.EndTime.ToString(); } } } diff --git a/src/Controls/TimeUpDown.cs b/src/Controls/TimeUpDown.cs index a1021cdb7..e80cdfcd9 100644 --- a/src/Controls/TimeUpDown.cs +++ b/src/Controls/TimeUpDown.cs @@ -19,13 +19,13 @@ namespace Nikse.SubtitleEdit.Controls public TimeMode Mode { - get - { + get + { if (Configuration.Settings == null) return TimeMode.HHMMSSMS; if (Configuration.Settings.General.UseTimeFormatHHMMSSFF) return TimeMode.HHMMSSFF; - return TimeMode.HHMMSSMS; + return TimeMode.HHMMSSMS; } } @@ -38,7 +38,7 @@ namespace Nikse.SubtitleEdit.Controls } void NumericUpDownValueChanged(object sender, EventArgs e) - { + { double? millisecs = GetTotalMilliseconds(); if (millisecs.HasValue) { @@ -69,7 +69,7 @@ namespace Nikse.SubtitleEdit.Controls SetTotalMilliseconds(millisecs.Value - Logic.SubtitleFormats.SubtitleFormat.FramesToMilliseconds(1)); else if (millisecs.Value > 0) SetTotalMilliseconds(0); - } + } } if (TimeCodeChanged != null) @@ -179,7 +179,7 @@ namespace Nikse.SubtitleEdit.Controls if (Mode == TimeMode.HHMMSSMS) maskedTextBox1.Text = value.ToString(); else - maskedTextBox1.Text = value.ToHHMMSSFF(); + maskedTextBox1.Text = value.ToHHMMSSFF(); } else { diff --git a/src/Forms/AddWareForm.cs b/src/Forms/AddWareForm.cs index 6ec88d432..7eb4834fe 100644 --- a/src/Forms/AddWareForm.cs +++ b/src/Forms/AddWareForm.cs @@ -45,7 +45,7 @@ namespace Nikse.SubtitleEdit.Forms string targetFile = Path.GetTempFileName() + ".wav"; // string parameters = "-I dummy -vvv \"" + SourceVideoFileName + "\" --sout=#transcode{vcodec=none,acodec=s16l}:file{dst=\"" + targetFile + "\"} vlc://quit"; string parameters = "-I dummy -vvv --no-sout-video --sout #transcode{" + Configuration.Settings.General.VlcWaveTranscodeSettings + "}:std{mux=wav,access=file,dst=\"" + targetFile + "\"} \"" + SourceVideoFileName + "\" vlc://quit"; - + string vlcPath; diff --git a/src/Forms/ExportPngXml.cs b/src/Forms/ExportPngXml.cs index f247bfde0..195376c6c 100644 --- a/src/Forms/ExportPngXml.cs +++ b/src/Forms/ExportPngXml.cs @@ -310,7 +310,7 @@ namespace Nikse.SubtitleEdit.Forms string numberString = string.Format("{0:00000}", imagesSavedCount); string fileName = Path.Combine(folderBrowserDialog1.SelectedPath, numberString + "." + comboBoxImageFormat.Text.ToLower()); empty.Save(fileName, ImageFormat); - + MessageBox.Show(string.Format(Configuration.Settings.Language.ExportPngXml.XImagesSavedInY, imagesSavedCount, folderBrowserDialog1.SelectedPath)); } else @@ -410,7 +410,7 @@ namespace Nikse.SubtitleEdit.Forms string fileName = Path.Combine(folderBrowserDialog1.SelectedPath, numberString + "." + comboBoxImageFormat.Text.ToLower()); empty.Save(fileName, imageFormat); imagesSavedCount++; - } + } } int endFrame = (int)Math.Round(param.P.EndTime.TotalMilliseconds / (1000.0 / param.FramesPerSeconds)); diff --git a/src/Forms/GoogleTranslate.cs b/src/Forms/GoogleTranslate.cs index 11ea606e2..b755e8e41 100644 --- a/src/Forms/GoogleTranslate.cs +++ b/src/Forms/GoogleTranslate.cs @@ -123,7 +123,7 @@ namespace Nikse.SubtitleEdit.Forms FillComboWithLanguages(comboBoxTo); i = 0; - string uiCultureTL = Configuration.Settings.Tools.GoogleTranslateLastTargetLanguage; + string uiCultureTL = Configuration.Settings.Tools.GoogleTranslateLastTargetLanguage; if (uiCultureTL == defaultFromLanguage) { foreach (string s in Utilities.GetDictionaryLanguages()) @@ -230,7 +230,7 @@ namespace Nikse.SubtitleEdit.Forms buttonOK.Enabled = true; buttonCancel.Enabled = true; - Configuration.Settings.Tools.GoogleTranslateLastTargetLanguage = (comboBoxTo.SelectedItem as ComboBoxItem).Value; + Configuration.Settings.Tools.GoogleTranslateLastTargetLanguage = (comboBoxTo.SelectedItem as ComboBoxItem).Value; } } diff --git a/src/Forms/Main.cs b/src/Forms/Main.cs index d301c7f56..3544a8d60 100644 --- a/src/Forms/Main.cs +++ b/src/Forms/Main.cs @@ -5704,7 +5704,7 @@ namespace Nikse.SubtitleEdit.Forms } else { - numericUpDownDuration.Value = (decimal)seconds; + numericUpDownDuration.Value = (decimal)seconds; } } @@ -5726,7 +5726,7 @@ namespace Nikse.SubtitleEdit.Forms var temp = new Paragraph(currentParagraph); if (Configuration.Settings.General.UseTimeFormatHHMMSSFF) - { + { int frames = (int)(Convert.ToDouble(numericUpDownDuration.Value) % 1.0 * 100.0); if (frames > Configuration.Settings.General.CurrentFrameRate-1) { @@ -5736,13 +5736,13 @@ namespace Nikse.SubtitleEdit.Forms int restFrames = (int)(frames % (Configuration.Settings.General.CurrentFrameRate-1)); if (frames == 99) numericUpDownDuration.Value = (decimal)(seconds + (((int)(Configuration.Settings.General.CurrentFrameRate - 1)) / 100.0)); - else + else numericUpDownDuration.Value = (decimal)(seconds + extraSeconds + restFrames / 100.0); numericUpDownDuration.ValueChanged += NumericUpDownDurationValueChanged; } } - temp.EndTime.TotalMilliseconds = currentParagraph.StartTime.TotalMilliseconds + GetDurationInMilliseconds(); + temp.EndTime.TotalMilliseconds = currentParagraph.StartTime.TotalMilliseconds + GetDurationInMilliseconds(); if (_makeHistory) MakeHistoryForUndoOnlyIfNotResent(string.Format(_language.DisplayTimeAdjustedX, "#" + currentParagraph.Number + ": " + oldDuration + " -> " + temp.Duration)); @@ -5956,7 +5956,7 @@ namespace Nikse.SubtitleEdit.Forms } else { - textBoxListViewText.Text = Utilities.UnbreakLine(textBoxListViewText.Text); + textBoxListViewText.Text = Utilities.UnbreakLine(textBoxListViewText.Text); } } @@ -7727,12 +7727,12 @@ namespace Nikse.SubtitleEdit.Forms toolStripLabelFrameRate.Visible = Configuration.Settings.General.ShowFrameRate; toolStripComboBoxFrameRate.Visible = Configuration.Settings.General.ShowFrameRate; toolStripButtonGetFrameRate.Visible = Configuration.Settings.General.ShowFrameRate; - } + } SaveSubtitleListviewIndexes(); SubtitleListview1.Fill(_subtitle, _subtitleAlternate); RestoreSubtitleListviewIndexes(); - RefreshSelectedParagraph(); + RefreshSelectedParagraph(); } else if (e.Modifiers == (Keys.Control | Keys.Shift) && e.KeyCode == Keys.U) // Ctrl+Shift+U = switch original/current { diff --git a/src/Logic/Settings.cs b/src/Logic/Settings.cs index 7af428b1f..c993318ac 100644 --- a/src/Logic/Settings.cs +++ b/src/Logic/Settings.cs @@ -1666,7 +1666,7 @@ namespace Nikse.SubtitleEdit.Logic textWriter.WriteElementString("ListViewDurationWidth", settings.General.ListViewDurationWidth.ToString(CultureInfo.InvariantCulture)); textWriter.WriteElementString("ListViewTextWidth", settings.General.ListViewTextWidth.ToString(CultureInfo.InvariantCulture)); textWriter.WriteElementString("VlcWaveTranscodeSettings", settings.General.VlcWaveTranscodeSettings); - + textWriter.WriteEndElement(); @@ -1684,7 +1684,7 @@ namespace Nikse.SubtitleEdit.Logic textWriter.WriteElementString("Interjections", settings.Tools.Interjections); textWriter.WriteElementString("MicrosoftBingApiId", settings.Tools.MicrosoftBingApiId); textWriter.WriteElementString("GoogleApiKey", settings.Tools.GoogleApiKey); - textWriter.WriteElementString("GoogleTranslateLastTargetLanguage", settings.Tools.GoogleTranslateLastTargetLanguage); + textWriter.WriteElementString("GoogleTranslateLastTargetLanguage", settings.Tools.GoogleTranslateLastTargetLanguage); textWriter.WriteElementString("ListViewSyntaxColorDurationSmall", settings.Tools.ListViewSyntaxColorDurationSmall.ToString()); textWriter.WriteElementString("ListViewSyntaxColorDurationBig", settings.Tools.ListViewSyntaxColorDurationBig.ToString()); textWriter.WriteElementString("ListViewSyntaxColorLongLines", settings.Tools.ListViewSyntaxColorLongLines.ToString()); diff --git a/src/Logic/SubtitleFormats/Ebu.cs b/src/Logic/SubtitleFormats/Ebu.cs index 571e2df20..771e2def5 100644 --- a/src/Logic/SubtitleFormats/Ebu.cs +++ b/src/Logic/SubtitleFormats/Ebu.cs @@ -525,7 +525,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats { subtitle.Paragraphs.Add(p); last = p; - } + } lastExtensionBlockNumber = tti.ExtensionBlockNumber; } } diff --git a/src/Logic/VobSub/SubPicture.cs b/src/Logic/VobSub/SubPicture.cs index f36fc72a2..827b0fcb2 100644 --- a/src/Logic/VobSub/SubPicture.cs +++ b/src/Logic/VobSub/SubPicture.cs @@ -90,7 +90,7 @@ namespace Nikse.SubtitleEdit.Logic.VobSub commandIndex = displayControlSequenceTableAddress + 4 + _pixelDataAddressOffset; if (commandIndex >= _data.Length) break; // invalid index - + int command = _data[commandIndex]; int numberOfCommands = 0; while (command != 0xFF && numberOfCommands < 1000 && commandIndex < _data.Length)