mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-27 14:32:35 +01:00
Added export to plain text + a setting for mouse wheel scroll direction in waveform
git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@730 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
parent
246a1dd090
commit
37a4290a54
@ -1220,6 +1220,5 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
bmpDestination.Dispose();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
33
src/Forms/Main.Designer.cs
generated
33
src/Forms/Main.Designer.cs
generated
@ -90,6 +90,8 @@
|
||||
this.toolStripMenuItemCavena890 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.eBUSTLToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.pACScreenElectronicsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.plainTextToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.plainTextWithoutLineBreaksToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@ -929,7 +931,9 @@
|
||||
this.toolStripMenuItemExportPngXml,
|
||||
this.toolStripMenuItemCavena890,
|
||||
this.eBUSTLToolStripMenuItem,
|
||||
this.pACScreenElectronicsToolStripMenuItem});
|
||||
this.pACScreenElectronicsToolStripMenuItem,
|
||||
this.plainTextToolStripMenuItem,
|
||||
this.plainTextWithoutLineBreaksToolStripMenuItem});
|
||||
this.toolStripMenuItemExport.Name = "toolStripMenuItemExport";
|
||||
this.toolStripMenuItemExport.Size = new System.Drawing.Size(334, 22);
|
||||
this.toolStripMenuItemExport.Text = "Export";
|
||||
@ -937,31 +941,45 @@
|
||||
// toolStripMenuItemExportPngXml
|
||||
//
|
||||
this.toolStripMenuItemExportPngXml.Name = "toolStripMenuItemExportPngXml";
|
||||
this.toolStripMenuItemExportPngXml.Size = new System.Drawing.Size(222, 22);
|
||||
this.toolStripMenuItemExportPngXml.Size = new System.Drawing.Size(245, 22);
|
||||
this.toolStripMenuItemExportPngXml.Text = "BDN xml/png...";
|
||||
this.toolStripMenuItemExportPngXml.Click += new System.EventHandler(this.toolStripMenuItemExportPngXml_Click);
|
||||
//
|
||||
// toolStripMenuItemCavena890
|
||||
//
|
||||
this.toolStripMenuItemCavena890.Name = "toolStripMenuItemCavena890";
|
||||
this.toolStripMenuItemCavena890.Size = new System.Drawing.Size(222, 22);
|
||||
this.toolStripMenuItemCavena890.Size = new System.Drawing.Size(245, 22);
|
||||
this.toolStripMenuItemCavena890.Text = "Cavena 890...";
|
||||
this.toolStripMenuItemCavena890.Click += new System.EventHandler(this.toolStripMenuItemCavena890_Click);
|
||||
//
|
||||
// eBUSTLToolStripMenuItem
|
||||
//
|
||||
this.eBUSTLToolStripMenuItem.Name = "eBUSTLToolStripMenuItem";
|
||||
this.eBUSTLToolStripMenuItem.Size = new System.Drawing.Size(222, 22);
|
||||
this.eBUSTLToolStripMenuItem.Size = new System.Drawing.Size(245, 22);
|
||||
this.eBUSTLToolStripMenuItem.Text = "EBU STL...";
|
||||
this.eBUSTLToolStripMenuItem.Click += new System.EventHandler(this.eBUSTLToolStripMenuItem_Click);
|
||||
//
|
||||
// pACScreenElectronicsToolStripMenuItem
|
||||
//
|
||||
this.pACScreenElectronicsToolStripMenuItem.Name = "pACScreenElectronicsToolStripMenuItem";
|
||||
this.pACScreenElectronicsToolStripMenuItem.Size = new System.Drawing.Size(222, 22);
|
||||
this.pACScreenElectronicsToolStripMenuItem.Size = new System.Drawing.Size(245, 22);
|
||||
this.pACScreenElectronicsToolStripMenuItem.Text = "PAC (Screen Electronics)...";
|
||||
this.pACScreenElectronicsToolStripMenuItem.Click += new System.EventHandler(this.pACScreenElectronicsToolStripMenuItem_Click);
|
||||
//
|
||||
// plainTextToolStripMenuItem
|
||||
//
|
||||
this.plainTextToolStripMenuItem.Name = "plainTextToolStripMenuItem";
|
||||
this.plainTextToolStripMenuItem.Size = new System.Drawing.Size(245, 22);
|
||||
this.plainTextToolStripMenuItem.Text = "Plain text...";
|
||||
this.plainTextToolStripMenuItem.Click += new System.EventHandler(this.plainTextToolStripMenuItem_Click);
|
||||
//
|
||||
// plainTextWithoutLineBreaksToolStripMenuItem
|
||||
//
|
||||
this.plainTextWithoutLineBreaksToolStripMenuItem.Name = "plainTextWithoutLineBreaksToolStripMenuItem";
|
||||
this.plainTextWithoutLineBreaksToolStripMenuItem.Size = new System.Drawing.Size(245, 22);
|
||||
this.plainTextWithoutLineBreaksToolStripMenuItem.Text = "Plain text without line breaks...";
|
||||
this.plainTextWithoutLineBreaksToolStripMenuItem.Click += new System.EventHandler(this.plainTextWithoutLineBreaksToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator10
|
||||
//
|
||||
this.toolStripSeparator10.Name = "toolStripSeparator10";
|
||||
@ -2099,6 +2117,7 @@
|
||||
this.audioVisualizer.StartPositionSeconds = 0D;
|
||||
this.audioVisualizer.TabIndex = 6;
|
||||
this.audioVisualizer.TextColor = System.Drawing.Color.Gray;
|
||||
this.audioVisualizer.VerticalZoomPercent = 1D;
|
||||
this.audioVisualizer.WaveFormNotLoadedText = "Click to add wave form";
|
||||
this.audioVisualizer.WavePeaks = null;
|
||||
this.audioVisualizer.ZoomFactor = 1D;
|
||||
@ -3121,6 +3140,7 @@
|
||||
//
|
||||
// textBoxListViewTextAlternate
|
||||
//
|
||||
this.textBoxListViewTextAlternate.AllowDrop = true;
|
||||
this.textBoxListViewTextAlternate.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.textBoxListViewTextAlternate.ContextMenuStrip = this.contextMenuStripTextBoxListView;
|
||||
@ -3459,6 +3479,7 @@
|
||||
//
|
||||
// textBoxListViewText
|
||||
//
|
||||
this.textBoxListViewText.AllowDrop = true;
|
||||
this.textBoxListViewText.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.textBoxListViewText.ContextMenuStrip = this.contextMenuStripTextBoxListView;
|
||||
@ -4016,6 +4037,8 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemCavena890;
|
||||
private Controls.SETextBox textBoxListViewTextAlternate;
|
||||
private System.Windows.Forms.ToolStripMenuItem textCharssecToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem plainTextToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem plainTextWithoutLineBreaksToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -891,6 +891,10 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
toolStripMenuItemCavena890.Text = _language.Menu.File.ExportCavena890;
|
||||
eBUSTLToolStripMenuItem.Text = _language.Menu.File.ExportEbu;
|
||||
pACScreenElectronicsToolStripMenuItem.Text = _language.Menu.File.ExportPac;
|
||||
plainTextToolStripMenuItem.Text = _language.Menu.File.ExportPlainText;
|
||||
plainTextToolStripMenuItem.Visible = !string.IsNullOrEmpty(_language.Menu.File.ExportPlainText); //TODO: Remove in 3.3
|
||||
plainTextWithoutLineBreaksToolStripMenuItem.Text = _language.Menu.File.ExportPlainTextWithoutLineBreaks;
|
||||
plainTextWithoutLineBreaksToolStripMenuItem.Visible = !string.IsNullOrEmpty(_language.Menu.File.ExportPlainTextWithoutLineBreaks); //TODO: Remove in 3.3
|
||||
exitToolStripMenuItem.Text = _language.Menu.File.Exit;
|
||||
|
||||
editToolStripMenuItem.Text = _language.Menu.Edit.Title;
|
||||
@ -2274,6 +2278,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
audioVisualizer.Color = Configuration.Settings.VideoControls.WaveFormColor;
|
||||
audioVisualizer.BackgroundColor = Configuration.Settings.VideoControls.WaveFormBackgroundColor;
|
||||
audioVisualizer.TextColor = Configuration.Settings.VideoControls.WaveFormTextColor;
|
||||
audioVisualizer.MouseWheelScrollUpIsForward = Configuration.Settings.VideoControls.WaveFormMouseWheelScrollUpIsForward;
|
||||
|
||||
if (oldSubtitleFontSettings != Configuration.Settings.General.SubtitleFontName +
|
||||
Configuration.Settings.General.SubtitleFontBold +
|
||||
@ -11505,5 +11510,42 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
_findHelper.MatchInOriginal = true;
|
||||
}
|
||||
|
||||
private void plainTextToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
ExportTextOnly(false);
|
||||
}
|
||||
|
||||
private void plainTextWithoutLineBreaksToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
ExportTextOnly(true);
|
||||
}
|
||||
|
||||
private void ExportTextOnly(bool removeLineBreaks)
|
||||
{
|
||||
if (SubtitleListview1.Items.Count > 0)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(openFileDialog1.InitialDirectory))
|
||||
saveFileDialog1.InitialDirectory = openFileDialog1.InitialDirectory;
|
||||
saveFileDialog1.Title = _language.ExportPlainTextAs;
|
||||
saveFileDialog1.Filter = _language.TextFiles + "|*.txt";
|
||||
if (saveFileDialog1.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
foreach (Paragraph p in _subtitle.Paragraphs)
|
||||
{
|
||||
sb.AppendLine(Utilities.RemoveHtmlTags(p.Text));
|
||||
}
|
||||
string text = sb.ToString().Trim();
|
||||
if (removeLineBreaks)
|
||||
{
|
||||
text = text.Replace(Environment.NewLine, " ");
|
||||
text = text.Replace(" ", " ").Replace(" ", " ");
|
||||
}
|
||||
File.WriteAllText(saveFileDialog1.FileName, text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -681,7 +681,7 @@
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD2
|
||||
CAAAAk1TRnQBSQFMAgEBAgEAAagBCwGoAQsBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
CAAAAk1TRnQBSQFMAgEBAgEAAQgBDAEIAQwBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
|
753
src/Forms/Settings.Designer.cs
generated
753
src/Forms/Settings.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@ -231,6 +231,8 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
groupBoxWaveFormAppearence.Text = language.WaveFormAppearance;
|
||||
checkBoxWaveFormShowGrid.Text = language.WaveFormShowGridLines;
|
||||
checkBoxReverseMouseWheelScrollDirection.Text = language.ReverseMouseWheelScrollDirection;
|
||||
checkBoxReverseMouseWheelScrollDirection.Visible = !string.IsNullOrEmpty(language.ReverseMouseWheelScrollDirection); // TODO: Remove in 3.3
|
||||
buttonWaveFormGridColor.Text = language.WaveFormGridColor;
|
||||
buttonWaveFormColor.Text = language.WaveFormColor;
|
||||
buttonWaveFormSelectedColor.Text = language.WaveFormSelectedColor;
|
||||
@ -421,7 +423,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
comboBoxSpectrogramAppearance.SelectedIndex = 0;
|
||||
else
|
||||
comboBoxSpectrogramAppearance.SelectedIndex = 1;
|
||||
|
||||
checkBoxReverseMouseWheelScrollDirection.Checked = Configuration.Settings.VideoControls.WaveFormMouseWheelScrollUpIsForward;
|
||||
|
||||
TreeNode fileNode = new TreeNode(Configuration.Settings.Language.Main.Menu.File.Title);
|
||||
fileNode.Nodes.Add(Configuration.Settings.Language.Main.Menu.File.New + GetShortcutText(Configuration.Settings.Shortcuts.MainFileNew));
|
||||
@ -810,11 +812,11 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
Configuration.Settings.VideoControls.WaveFormBackgroundColor = panelWaveFormBackgroundColor.BackColor;
|
||||
Configuration.Settings.VideoControls.WaveFormTextColor = panelWaveFormTextColor.BackColor;
|
||||
Configuration.Settings.VideoControls.GenerateSpectrogram = checkBoxGenerateSpectrogram.Checked;
|
||||
|
||||
if (comboBoxSpectrogramAppearance.SelectedIndex == 0)
|
||||
Configuration.Settings.VideoControls.SpectrogramAppearance = "OneColorGradient";
|
||||
else
|
||||
Configuration.Settings.VideoControls.SpectrogramAppearance = "Classic";
|
||||
Configuration.Settings.VideoControls.WaveFormMouseWheelScrollUpIsForward = checkBoxReverseMouseWheelScrollDirection.Checked;
|
||||
|
||||
//Main File
|
||||
foreach (TreeNode node in treeViewShortcuts.Nodes[0].Nodes)
|
||||
|
@ -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.
|
||||
-->
|
||||
|
@ -758,6 +758,8 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
SpellCheckCompletedXCorrections = "Spell check completed. {0} lines were modified.",
|
||||
OpenOtherSubtitle = "Open other subtitle",
|
||||
BeforeToggleDialogueDashes = "Before toggle of dialogue dashes",
|
||||
TextFiles = "Text files",
|
||||
ExportPlainTextAs = "Export plain text as",
|
||||
|
||||
Menu = new LanguageStructure.Main.MainMenu
|
||||
{
|
||||
@ -786,6 +788,8 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
ExportCavena890 = "Cavena 890...",
|
||||
ExportEbu = "EBU stl...",
|
||||
ExportPac = "PAC (Screen Electronics)...",
|
||||
ExportPlainText = "Export plain text...",
|
||||
ExportPlainTextWithoutLineBreaks = "Export plain text without line breaks...",
|
||||
Exit = "E&xit"
|
||||
},
|
||||
|
||||
@ -1205,6 +1209,7 @@ can edit in same subtitle file (collaboration)",
|
||||
WaveFormAppearance = "Wave form appearance",
|
||||
WaveFormGridColor = "Grid color",
|
||||
WaveFormShowGridLines = "Show grid lines",
|
||||
ReverseMouseWheelScrollDirection = "Reverse mouse wheel scroll direction",
|
||||
WaveFormColor = "Color",
|
||||
WaveFormSelectedColor = "Selected color",
|
||||
WaveFormBackgroundColor = "Back color",
|
||||
|
@ -680,6 +680,8 @@
|
||||
public string SpellCheckCompletedXCorrections { get; set; }
|
||||
public string OpenOtherSubtitle { get; set; }
|
||||
public string BeforeToggleDialogueDashes { get; set; }
|
||||
public string ExportPlainTextAs { get; set; }
|
||||
public string TextFiles { get; set; }
|
||||
|
||||
public class MainMenu
|
||||
{
|
||||
@ -708,6 +710,8 @@
|
||||
public string ExportCavena890 { get; set; }
|
||||
public string ExportEbu { get; set; }
|
||||
public string ExportPac { get; set; }
|
||||
public string ExportPlainText { get; set; }
|
||||
public string ExportPlainTextWithoutLineBreaks { get; set; }
|
||||
public string Exit { get; set; }
|
||||
}
|
||||
public class EditMenu
|
||||
@ -1134,6 +1138,7 @@
|
||||
public string WaveFormAppearance { get; set; }
|
||||
public string WaveFormGridColor { get; set; }
|
||||
public string WaveFormShowGridLines { get; set; }
|
||||
public string ReverseMouseWheelScrollDirection { get; set; }
|
||||
public string WaveFormColor { get; set; }
|
||||
public string WaveFormSelectedColor { get; set; }
|
||||
public string WaveFormBackgroundColor { get; set; }
|
||||
|
Loading…
Reference in New Issue
Block a user