mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-27 22:42:38 +01:00
Merge with master
This commit is contained in:
commit
9867b90ddb
@ -81,6 +81,7 @@
|
||||
<DeleteCurrentLine>Delete current line</DeleteCurrentLine>
|
||||
<Width>Width</Width>
|
||||
<Height>Height</Height>
|
||||
<Collapse>Collapse</Collapse>
|
||||
</General>
|
||||
<About>
|
||||
<Title>About Subtitle Edit</Title>
|
||||
|
@ -198,7 +198,8 @@ namespace Nikse.SubtitleEdit.Core
|
||||
Search = "Search",
|
||||
DeleteCurrentLine = "Delete current line",
|
||||
Width = "Width",
|
||||
Height = "Height"
|
||||
Height = "Height",
|
||||
Collapse = "Collapse"
|
||||
};
|
||||
|
||||
About = new LanguageStructure.About
|
||||
|
@ -298,6 +298,9 @@ namespace Nikse.SubtitleEdit.Core
|
||||
case "General/Height":
|
||||
language.General.Height = reader.Value;
|
||||
break;
|
||||
case "General/Collapse":
|
||||
language.General.Collapse = reader.Value;
|
||||
break;
|
||||
case "About/Title":
|
||||
language.About.Title = reader.Value;
|
||||
break;
|
||||
|
@ -85,6 +85,7 @@
|
||||
public string DeleteCurrentLine { get; set; }
|
||||
public string Width { get; set; }
|
||||
public string Height { get; set; }
|
||||
public string Collapse { get; set; }
|
||||
}
|
||||
|
||||
public class About
|
||||
|
@ -41,10 +41,13 @@ namespace Nikse.SubtitleEdit.Core
|
||||
if (string.IsNullOrEmpty(fileName) && !string.IsNullOrEmpty(originalFileName))
|
||||
{
|
||||
fileName = originalFileName;
|
||||
originalFileName = null;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(fileName))
|
||||
{
|
||||
Files = Files.Where(p => !string.IsNullOrEmpty(p.FileName)).ToList();
|
||||
Files.Insert(0, new RecentFileEntry { FileName = string.Empty });
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1789,9 +1792,9 @@ $HorzAlign = Center
|
||||
//too slow... :( - settings = Deserialize(settingsFileName); // 688 msecs
|
||||
settings = CustomDeserialize(settingsFileName); // 15 msecs
|
||||
|
||||
if (settings.General.AutoConvertToUtf8 && !settings.General.DefaultEncoding.StartsWith("UTF-8", StringComparison.Ordinal))
|
||||
if (settings.General.DefaultEncoding.StartsWith("utf-8", StringComparison.Ordinal))
|
||||
{
|
||||
settings.General.DefaultEncoding = "UTF-8 with BOM";
|
||||
settings.General.DefaultEncoding = TextEncoding.Utf8WithBom;
|
||||
}
|
||||
}
|
||||
catch (Exception exception)
|
||||
|
@ -2152,11 +2152,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
var ext = file.Extension.ToLowerInvariant();
|
||||
|
||||
// save last first visible index + first selected index from listview
|
||||
if (!string.IsNullOrEmpty(_fileName))
|
||||
{
|
||||
Configuration.Settings.RecentFiles.Add(_fileName, FirstVisibleIndex, FirstSelectedIndex, _videoFileName, originalFileName, Configuration.Settings.General.CurrentVideoOffsetInMs);
|
||||
}
|
||||
|
||||
Configuration.Settings.RecentFiles.Add(_fileName, FirstVisibleIndex, FirstSelectedIndex, _videoFileName, originalFileName, Configuration.Settings.General.CurrentVideoOffsetInMs);
|
||||
Configuration.Settings.General.CurrentVideoOffsetInMs = 0;
|
||||
|
||||
openFileDialog1.InitialDirectory = file.DirectoryName;
|
||||
@ -4097,7 +4093,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
if (ContinueNewOrExit())
|
||||
{
|
||||
if (Configuration.Settings.General.ShowRecentFiles && !string.IsNullOrEmpty(_fileName))
|
||||
if (Configuration.Settings.General.ShowRecentFiles)
|
||||
{
|
||||
Configuration.Settings.RecentFiles.Add(_fileName, FirstVisibleIndex, FirstSelectedIndex, _videoFileName, _subtitleAlternateFileName, Configuration.Settings.General.CurrentVideoOffsetInMs);
|
||||
}
|
||||
|
22
src/Forms/Settings.Designer.cs
generated
22
src/Forms/Settings.Designer.cs
generated
@ -28,6 +28,7 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.buttonOK = new System.Windows.Forms.Button();
|
||||
this.buttonCancel = new System.Windows.Forms.Button();
|
||||
this.tabControlSettings = new System.Windows.Forms.TabControl();
|
||||
@ -369,6 +370,8 @@
|
||||
this.labelStatus = new System.Windows.Forms.Label();
|
||||
this.openFileDialogFFmpeg = new System.Windows.Forms.OpenFileDialog();
|
||||
this.buttonReset = new System.Windows.Forms.Button();
|
||||
this.contextMenuStripShortcuts = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.toolStripMenuItemShortcutsCollapse = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.tabControlSettings.SuspendLayout();
|
||||
this.tabPageGeneral.SuspendLayout();
|
||||
this.groupBoxMiscellaneous.SuspendLayout();
|
||||
@ -447,6 +450,7 @@
|
||||
this.groupBoxNetworkSession.SuspendLayout();
|
||||
this.groupBoxProxySettings.SuspendLayout();
|
||||
this.groupBoxProxyAuthentication.SuspendLayout();
|
||||
this.contextMenuStripShortcuts.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// buttonOK
|
||||
@ -1525,6 +1529,7 @@
|
||||
this.treeViewShortcuts.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.treeViewShortcuts.ContextMenuStrip = this.contextMenuStripShortcuts;
|
||||
this.treeViewShortcuts.HideSelection = false;
|
||||
this.treeViewShortcuts.Location = new System.Drawing.Point(16, 47);
|
||||
this.treeViewShortcuts.Name = "treeViewShortcuts";
|
||||
@ -4490,6 +4495,20 @@
|
||||
this.buttonReset.UseVisualStyleBackColor = true;
|
||||
this.buttonReset.Click += new System.EventHandler(this.buttonReset_Click);
|
||||
//
|
||||
// contextMenuStripShortcuts
|
||||
//
|
||||
this.contextMenuStripShortcuts.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolStripMenuItemShortcutsCollapse});
|
||||
this.contextMenuStripShortcuts.Name = "contextMenuStripShortcuts";
|
||||
this.contextMenuStripShortcuts.Size = new System.Drawing.Size(120, 26);
|
||||
//
|
||||
// toolStripMenuItemShortcutsCollapse
|
||||
//
|
||||
this.toolStripMenuItemShortcutsCollapse.Name = "toolStripMenuItemShortcutsCollapse";
|
||||
this.toolStripMenuItemShortcutsCollapse.Size = new System.Drawing.Size(119, 22);
|
||||
this.toolStripMenuItemShortcutsCollapse.Text = "Collapse";
|
||||
this.toolStripMenuItemShortcutsCollapse.Click += new System.EventHandler(this.toolStripMenuItemShortcutsCollapse_Click);
|
||||
//
|
||||
// Settings
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
@ -4622,6 +4641,7 @@
|
||||
this.groupBoxProxySettings.PerformLayout();
|
||||
this.groupBoxProxyAuthentication.ResumeLayout(false);
|
||||
this.groupBoxProxyAuthentication.PerformLayout();
|
||||
this.contextMenuStripShortcuts.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@ -4970,5 +4990,7 @@
|
||||
private System.Windows.Forms.Button buttonReset;
|
||||
private System.Windows.Forms.Label labelDialogStyle;
|
||||
private System.Windows.Forms.ComboBox comboBoxDialogStyle;
|
||||
private System.Windows.Forms.ContextMenuStrip contextMenuStripShortcuts;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemShortcutsCollapse;
|
||||
}
|
||||
}
|
@ -894,7 +894,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
MakeShortcutsTreeview(language);
|
||||
ShowShortcutsTreeview();
|
||||
|
||||
toolStripMenuItemShortcutsCollapse.Text = Configuration.Settings.Language.General.Collapse;
|
||||
labelShortcutsSearch.Text = Configuration.Settings.Language.General.Search;
|
||||
buttonShortcutsClear.Text = Configuration.Settings.Language.DvdSubRip.Clear;
|
||||
textBoxShortcutSearch.Left = labelShortcutsSearch.Left + labelShortcutsSearch.Width + 5;
|
||||
@ -3203,5 +3203,10 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
Init();
|
||||
}
|
||||
}
|
||||
|
||||
private void toolStripMenuItemShortcutsCollapse_Click(object sender, EventArgs e)
|
||||
{
|
||||
treeViewShortcuts.CollapseAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -117,6 +117,9 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="contextMenuStripShortcuts.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>464, 17</value>
|
||||
</metadata>
|
||||
<metadata name="colorDialogSSAStyle.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
|
40
src/Forms/SettingsProfileExport.Designer.cs
generated
40
src/Forms/SettingsProfileExport.Designer.cs
generated
@ -28,12 +28,17 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.labelProfiles = new System.Windows.Forms.Label();
|
||||
this.buttonOK = new System.Windows.Forms.Button();
|
||||
this.buttonCancel = new System.Windows.Forms.Button();
|
||||
this.listViewExportStyles = new System.Windows.Forms.ListView();
|
||||
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.saveFileDialogStyle = new System.Windows.Forms.SaveFileDialog();
|
||||
this.contextMenuStripSelect = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.selectAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.inverseSelectionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.contextMenuStripSelect.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// labelProfiles
|
||||
@ -49,7 +54,7 @@
|
||||
//
|
||||
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonOK.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.buttonOK.Location = new System.Drawing.Point(186, 200);
|
||||
this.buttonOK.Location = new System.Drawing.Point(249, 331);
|
||||
this.buttonOK.Name = "buttonOK";
|
||||
this.buttonOK.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonOK.TabIndex = 8;
|
||||
@ -62,7 +67,7 @@
|
||||
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.buttonCancel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.buttonCancel.Location = new System.Drawing.Point(267, 200);
|
||||
this.buttonCancel.Location = new System.Drawing.Point(330, 331);
|
||||
this.buttonCancel.Name = "buttonCancel";
|
||||
this.buttonCancel.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonCancel.TabIndex = 9;
|
||||
@ -78,11 +83,12 @@
|
||||
this.listViewExportStyles.CheckBoxes = true;
|
||||
this.listViewExportStyles.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.columnHeader1});
|
||||
this.listViewExportStyles.ContextMenuStrip = this.contextMenuStripSelect;
|
||||
this.listViewExportStyles.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
|
||||
this.listViewExportStyles.HideSelection = false;
|
||||
this.listViewExportStyles.Location = new System.Drawing.Point(12, 34);
|
||||
this.listViewExportStyles.Name = "listViewExportStyles";
|
||||
this.listViewExportStyles.Size = new System.Drawing.Size(330, 160);
|
||||
this.listViewExportStyles.Size = new System.Drawing.Size(393, 291);
|
||||
this.listViewExportStyles.TabIndex = 7;
|
||||
this.listViewExportStyles.UseCompatibleStateImageBehavior = false;
|
||||
this.listViewExportStyles.View = System.Windows.Forms.View.Details;
|
||||
@ -91,11 +97,33 @@
|
||||
//
|
||||
this.saveFileDialogStyle.OverwritePrompt = false;
|
||||
//
|
||||
// contextMenuStripSelect
|
||||
//
|
||||
this.contextMenuStripSelect.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.selectAllToolStripMenuItem,
|
||||
this.inverseSelectionToolStripMenuItem});
|
||||
this.contextMenuStripSelect.Name = "contextMenuStripSelect";
|
||||
this.contextMenuStripSelect.Size = new System.Drawing.Size(181, 70);
|
||||
//
|
||||
// selectAllToolStripMenuItem
|
||||
//
|
||||
this.selectAllToolStripMenuItem.Name = "selectAllToolStripMenuItem";
|
||||
this.selectAllToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.selectAllToolStripMenuItem.Text = "Select all";
|
||||
this.selectAllToolStripMenuItem.Click += new System.EventHandler(this.selectAllToolStripMenuItem_Click);
|
||||
//
|
||||
// inverseSelectionToolStripMenuItem
|
||||
//
|
||||
this.inverseSelectionToolStripMenuItem.Name = "inverseSelectionToolStripMenuItem";
|
||||
this.inverseSelectionToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.inverseSelectionToolStripMenuItem.Text = "Inverse selection";
|
||||
this.inverseSelectionToolStripMenuItem.Click += new System.EventHandler(this.inverseSelectionToolStripMenuItem_Click);
|
||||
//
|
||||
// SettingsProfileExport
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(354, 233);
|
||||
this.ClientSize = new System.Drawing.Size(417, 364);
|
||||
this.Controls.Add(this.labelProfiles);
|
||||
this.Controls.Add(this.buttonOK);
|
||||
this.Controls.Add(this.buttonCancel);
|
||||
@ -110,6 +138,7 @@
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "SettingsProfileExport";
|
||||
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SettingsProfileExport_KeyDown);
|
||||
this.contextMenuStripSelect.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@ -123,5 +152,8 @@
|
||||
private System.Windows.Forms.ListView listViewExportStyles;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader1;
|
||||
private System.Windows.Forms.SaveFileDialog saveFileDialogStyle;
|
||||
private System.Windows.Forms.ContextMenuStrip contextMenuStripSelect;
|
||||
private System.Windows.Forms.ToolStripMenuItem selectAllToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem inverseSelectionToolStripMenuItem;
|
||||
}
|
||||
}
|
@ -20,6 +20,9 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
listViewExportStyles.Items.Add(new ListViewItem(profile.Name) { Checked = true, Tag = profile });
|
||||
}
|
||||
|
||||
selectAllToolStripMenuItem.Text = Configuration.Settings.Language.FixCommonErrors.SelectAll;
|
||||
inverseSelectionToolStripMenuItem.Text = Configuration.Settings.Language.FixCommonErrors.InverseSelection;
|
||||
|
||||
Text = Configuration.Settings.Language.Settings.ExportProfiles;
|
||||
buttonOK.Text = Configuration.Settings.Language.General.Ok;
|
||||
buttonCancel.Text = Configuration.Settings.Language.General.Cancel;
|
||||
@ -67,5 +70,21 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
DialogResult = DialogResult.Cancel;
|
||||
}
|
||||
}
|
||||
|
||||
private void selectAllToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
foreach (ListViewItem item in listViewExportStyles.Items)
|
||||
{
|
||||
item.Checked = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void inverseSelectionToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
foreach (ListViewItem item in listViewExportStyles.Items)
|
||||
{
|
||||
item.Checked = !item.Checked;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -117,6 +117,9 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="contextMenuStripSelect.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>173, 17</value>
|
||||
</metadata>
|
||||
<metadata name="saveFileDialogStyle.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
|
Loading…
Reference in New Issue
Block a user