Sub options for "Focus waveform spectrogram on mouse enter", "Also focus list view on list view mouse enter"

git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@2398 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
niksedk 2014-01-19 07:56:17 +00:00
parent d5e3ae1c90
commit a518419ceb
8 changed files with 61 additions and 23 deletions

View File

@ -3726,6 +3726,7 @@
this.SubtitleListview1.DragEnter += new System.Windows.Forms.DragEventHandler(this.SubtitleListview1_DragEnter);
this.SubtitleListview1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SubtitleListview1KeyDown);
this.SubtitleListview1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.SubtitleListview1_MouseDoubleClick);
this.SubtitleListview1.MouseEnter += new System.EventHandler(this.SubtitleListview1_MouseEnter);
//
// groupBoxEdit
//

View File

@ -18621,9 +18621,16 @@ namespace Nikse.SubtitleEdit.Forms
private void audioVisualizer_MouseEnter(object sender, EventArgs e)
{
if (Configuration.Settings.VideoControls.WaveFormFocusOnMouseOver && !audioVisualizer.Focused && audioVisualizer.CanFocus)
if (Configuration.Settings.VideoControls.WaveFormFocusOnMouseEnter && audioVisualizer.WavePeaks != null && !audioVisualizer.Focused && audioVisualizer.CanFocus)
audioVisualizer.Focus();
}
private void SubtitleListview1_MouseEnter(object sender, EventArgs e)
{
if (Configuration.Settings.VideoControls.WaveFormFocusOnMouseEnter && Configuration.Settings.VideoControls.WaveFormListViewFocusOnMouseEnter &&
!SubtitleListview1.Focused && SubtitleListview1.CanFocus)
SubtitleListview1.Focus();
}
}
}

View File

@ -690,7 +690,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD2
CAAAAk1TRnQBSQFMAgEBAgEAAagBIAGoASABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
CAAAAk1TRnQBSQFMAgEBAgEAAbABIAGwASABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA

View File

@ -162,6 +162,7 @@
this.buttonWaveFormsFolderEmpty = new System.Windows.Forms.Button();
this.labelWaveFormsFolderInfo = new System.Windows.Forms.Label();
this.groupBoxWaveFormAppearence = new System.Windows.Forms.GroupBox();
this.checkBoxWaveformHoverFocus = new System.Windows.Forms.CheckBox();
this.labelWaveformBorderHitMs2 = new System.Windows.Forms.Label();
this.numericUpDownWaveformBorderHitMs = new System.Windows.Forms.NumericUpDown();
this.labelWaveformBorderHitMs1 = new System.Windows.Forms.Label();
@ -266,7 +267,7 @@
this.fontDialogSSAStyle = new System.Windows.Forms.FontDialog();
this.labelStatus = new System.Windows.Forms.Label();
this.openFileDialogFFMPEG = new System.Windows.Forms.OpenFileDialog();
this.checkBoxWaveformHoverFocus = new System.Windows.Forms.CheckBox();
this.checkBoxListViewMouseEnterFocus = new System.Windows.Forms.CheckBox();
this.tabControlSettings.SuspendLayout();
this.tabPageGenerel.SuspendLayout();
this.groupBoxMiscellaneous.SuspendLayout();
@ -1844,6 +1845,7 @@
//
// groupBoxWaveFormAppearence
//
this.groupBoxWaveFormAppearence.Controls.Add(this.checkBoxListViewMouseEnterFocus);
this.groupBoxWaveFormAppearence.Controls.Add(this.checkBoxWaveformHoverFocus);
this.groupBoxWaveFormAppearence.Controls.Add(this.labelWaveformBorderHitMs2);
this.groupBoxWaveFormAppearence.Controls.Add(this.numericUpDownWaveformBorderHitMs);
@ -1868,10 +1870,21 @@
this.groupBoxWaveFormAppearence.TabStop = false;
this.groupBoxWaveFormAppearence.Text = "Wave form appearence";
//
// checkBoxWaveformHoverFocus
//
this.checkBoxWaveformHoverFocus.AutoSize = true;
this.checkBoxWaveformHoverFocus.Location = new System.Drawing.Point(262, 78);
this.checkBoxWaveformHoverFocus.Name = "checkBoxWaveformHoverFocus";
this.checkBoxWaveformHoverFocus.Size = new System.Drawing.Size(149, 17);
this.checkBoxWaveformHoverFocus.TabIndex = 15;
this.checkBoxWaveformHoverFocus.Text = "Set focus on mouse enter";
this.checkBoxWaveformHoverFocus.UseVisualStyleBackColor = true;
this.checkBoxWaveformHoverFocus.CheckedChanged += new System.EventHandler(this.checkBoxWaveformHoverFocus_CheckedChanged);
//
// labelWaveformBorderHitMs2
//
this.labelWaveformBorderHitMs2.AutoSize = true;
this.labelWaveformBorderHitMs2.Location = new System.Drawing.Point(454, 115);
this.labelWaveformBorderHitMs2.Location = new System.Drawing.Point(454, 144);
this.labelWaveformBorderHitMs2.Name = "labelWaveformBorderHitMs2";
this.labelWaveformBorderHitMs2.Size = new System.Drawing.Size(62, 13);
this.labelWaveformBorderHitMs2.TabIndex = 14;
@ -1879,7 +1892,7 @@
//
// numericUpDownWaveformBorderHitMs
//
this.numericUpDownWaveformBorderHitMs.Location = new System.Drawing.Point(392, 113);
this.numericUpDownWaveformBorderHitMs.Location = new System.Drawing.Point(392, 142);
this.numericUpDownWaveformBorderHitMs.Minimum = new decimal(new int[] {
10,
0,
@ -1897,7 +1910,7 @@
// labelWaveformBorderHitMs1
//
this.labelWaveformBorderHitMs1.AutoSize = true;
this.labelWaveformBorderHitMs1.Location = new System.Drawing.Point(259, 115);
this.labelWaveformBorderHitMs1.Location = new System.Drawing.Point(259, 144);
this.labelWaveformBorderHitMs1.Name = "labelWaveformBorderHitMs1";
this.labelWaveformBorderHitMs1.Size = new System.Drawing.Size(127, 13);
this.labelWaveformBorderHitMs1.TabIndex = 13;
@ -3088,15 +3101,15 @@
//
this.openFileDialogFFMPEG.FileName = "openFileDialog1";
//
// checkBoxWaveformHoverFocus
// checkBoxListViewMouseEnterFocus
//
this.checkBoxWaveformHoverFocus.AutoSize = true;
this.checkBoxWaveformHoverFocus.Location = new System.Drawing.Point(262, 78);
this.checkBoxWaveformHoverFocus.Name = "checkBoxWaveformHoverFocus";
this.checkBoxWaveformHoverFocus.Size = new System.Drawing.Size(143, 17);
this.checkBoxWaveformHoverFocus.TabIndex = 15;
this.checkBoxWaveformHoverFocus.Text = "Set focus at mouse over";
this.checkBoxWaveformHoverFocus.UseVisualStyleBackColor = true;
this.checkBoxListViewMouseEnterFocus.AutoSize = true;
this.checkBoxListViewMouseEnterFocus.Location = new System.Drawing.Point(281, 96);
this.checkBoxListViewMouseEnterFocus.Name = "checkBoxListViewMouseEnterFocus";
this.checkBoxListViewMouseEnterFocus.Size = new System.Drawing.Size(214, 17);
this.checkBoxListViewMouseEnterFocus.TabIndex = 16;
this.checkBoxListViewMouseEnterFocus.Text = "Focus list view on list view mouse enter";
this.checkBoxListViewMouseEnterFocus.UseVisualStyleBackColor = true;
//
// Settings
//
@ -3440,5 +3453,6 @@
private System.Windows.Forms.CheckBox checkBoxUseFFMPEG;
private System.Windows.Forms.OpenFileDialog openFileDialogFFMPEG;
private System.Windows.Forms.CheckBox checkBoxWaveformHoverFocus;
private System.Windows.Forms.CheckBox checkBoxListViewMouseEnterFocus;
}
}

View File

@ -296,7 +296,8 @@ namespace Nikse.SubtitleEdit.Forms
checkBoxWaveFormShowGrid.Text = language.WaveFormShowGridLines;
checkBoxReverseMouseWheelScrollDirection.Text = language.ReverseMouseWheelScrollDirection;
checkBoxAllowOverlap.Text = language.WaveFormAllowOverlap;
checkBoxWaveformHoverFocus.Text = language.WaveFormFocusMouseOver;
checkBoxWaveformHoverFocus.Text = language.WaveFormFocusMouseEnter;
checkBoxListViewMouseEnterFocus.Text = language.WaveFormListViewFocusMouseEnter;
labelWaveformBorderHitMs1.Text = language.WaveformBorderHitMs1;
labelWaveformBorderHitMs2.Text = language.WaveformBorderHitMs2;
numericUpDownWaveformBorderHitMs.Left = labelWaveformBorderHitMs1.Left + labelWaveformBorderHitMs1.Width;
@ -535,7 +536,9 @@ namespace Nikse.SubtitleEdit.Forms
comboBoxSpectrogramAppearance.SelectedIndex = 1;
checkBoxReverseMouseWheelScrollDirection.Checked = Configuration.Settings.VideoControls.WaveFormMouseWheelScrollUpIsForward;
checkBoxAllowOverlap.Checked = Configuration.Settings.VideoControls.WaveFormAllowOverlap;
checkBoxWaveformHoverFocus.Checked = Configuration.Settings.VideoControls.WaveFormFocusOnMouseOver;
checkBoxWaveformHoverFocus.Checked = Configuration.Settings.VideoControls.WaveFormFocusOnMouseEnter;
checkBoxListViewMouseEnterFocus.Checked = Configuration.Settings.VideoControls.WaveFormListViewFocusOnMouseEnter;
checkBoxListViewMouseEnterFocus.Enabled = Configuration.Settings.VideoControls.WaveFormFocusOnMouseEnter;
if (Configuration.Settings.VideoControls.WaveformBorderHitMs >= numericUpDownWaveformBorderHitMs.Minimum &&
Configuration.Settings.VideoControls.WaveformBorderHitMs <= numericUpDownWaveformBorderHitMs.Maximum)
numericUpDownWaveformBorderHitMs.Value = Configuration.Settings.VideoControls.WaveformBorderHitMs;
@ -1093,7 +1096,8 @@ namespace Nikse.SubtitleEdit.Forms
Configuration.Settings.VideoControls.SpectrogramAppearance = "Classic";
Configuration.Settings.VideoControls.WaveFormMouseWheelScrollUpIsForward = checkBoxReverseMouseWheelScrollDirection.Checked;
Configuration.Settings.VideoControls.WaveFormAllowOverlap = checkBoxAllowOverlap.Checked;
Configuration.Settings.VideoControls.WaveFormFocusOnMouseOver = checkBoxWaveformHoverFocus.Checked;
Configuration.Settings.VideoControls.WaveFormFocusOnMouseEnter = checkBoxWaveformHoverFocus.Checked;
Configuration.Settings.VideoControls.WaveFormListViewFocusOnMouseEnter = checkBoxListViewMouseEnterFocus.Checked;
Configuration.Settings.VideoControls.WaveformBorderHitMs = Convert.ToInt32(numericUpDownWaveformBorderHitMs.Value);
Configuration.Settings.General.UseFFMPEGForWaveExtraction = checkBoxUseFFMPEG.Checked;
Configuration.Settings.General.FFMPEGLocation = textBoxFFMPEGPath.Text;
@ -2543,5 +2547,10 @@ namespace Nikse.SubtitleEdit.Forms
textBoxFFMPEGPath.Text = openFileDialogFFMPEG.FileName;
}
private void checkBoxWaveformHoverFocus_CheckedChanged(object sender, EventArgs e)
{
checkBoxListViewMouseEnterFocus.Enabled = checkBoxWaveformHoverFocus.Checked;
}
}
}

View File

@ -1710,7 +1710,8 @@ can edit in same subtitle file (collaboration)",
WaveFormShowGridLines = "Show grid lines",
ReverseMouseWheelScrollDirection = "Reverse mouse wheel scroll direction",
WaveFormAllowOverlap = "Allow overlap (when moving/resizing)",
WaveFormFocusMouseOver = "Set focus on mouse over",
WaveFormFocusMouseEnter = "Set focus on mouse enter",
WaveFormListViewFocusMouseEnter = "Also set list view focus on mouse enter in list view",
WaveformBorderHitMs1 = "Border marker hit must be within",
WaveformBorderHitMs2 = "milliseconds",
WaveFormColor = "Color",

View File

@ -1605,7 +1605,8 @@
public string WaveFormShowGridLines { get; set; }
public string ReverseMouseWheelScrollDirection { get; set; }
public string WaveFormAllowOverlap { get; set; }
public string WaveFormFocusMouseOver { get; set; }
public string WaveFormFocusMouseEnter { get; set; }
public string WaveFormListViewFocusMouseEnter { get; set; }
public string WaveformBorderHitMs1 { get; set; }
public string WaveformBorderHitMs2 { get; set; }
public string WaveFormColor { get; set; }

View File

@ -579,7 +579,8 @@ namespace Nikse.SubtitleEdit.Logic
public string LastActiveTab { get; set; }
public bool WaveFormDrawGrid { get; set; }
public bool WaveFormAllowOverlap { get; set; }
public bool WaveFormFocusOnMouseOver { get; set; }
public bool WaveFormFocusOnMouseEnter { get; set; }
public bool WaveFormListViewFocusOnMouseEnter { get; set; }
public int WaveformBorderHitMs { get; set; }
public Color WaveFormGridColor { get; set; }
public Color WaveFormColor { get; set; }
@ -1826,9 +1827,12 @@ namespace Nikse.SubtitleEdit.Logic
subNode = node.SelectSingleNode("WaveFormAllowOverlap");
if (subNode != null)
settings.VideoControls.WaveFormAllowOverlap = Convert.ToBoolean(subNode.InnerText);
subNode = node.SelectSingleNode("WaveFormFocusOnMouseOver");
subNode = node.SelectSingleNode("WaveFormFocusOnMouseEnter");
if (subNode != null)
settings.VideoControls.WaveFormFocusOnMouseOver = Convert.ToBoolean(subNode.InnerText);
settings.VideoControls.WaveFormFocusOnMouseEnter = Convert.ToBoolean(subNode.InnerText);
subNode = node.SelectSingleNode("WaveFormListViewFocusOnMouseEnter");
if (subNode != null)
settings.VideoControls.WaveFormListViewFocusOnMouseEnter = Convert.ToBoolean(subNode.InnerText);
subNode = node.SelectSingleNode("WaveformBorderHitMs");
if (subNode != null)
settings.VideoControls.WaveformBorderHitMs = Convert.ToInt32(subNode.InnerText);
@ -2668,7 +2672,8 @@ namespace Nikse.SubtitleEdit.Logic
textWriter.WriteElementString("LastActiveTab", settings.VideoControls.LastActiveTab);
textWriter.WriteElementString("WaveFormDrawGrid", settings.VideoControls.WaveFormDrawGrid.ToString());
textWriter.WriteElementString("WaveFormAllowOverlap", settings.VideoControls.WaveFormAllowOverlap.ToString());
textWriter.WriteElementString("WaveFormFocusOnMouseOver", settings.VideoControls.WaveFormFocusOnMouseOver.ToString());
textWriter.WriteElementString("WaveFormFocusOnMouseEnter", settings.VideoControls.WaveFormFocusOnMouseEnter.ToString());
textWriter.WriteElementString("WaveFormListViewFocusOnMouseEnter", settings.VideoControls.WaveFormListViewFocusOnMouseEnter.ToString());
textWriter.WriteElementString("WaveformBorderHitMs", settings.VideoControls.WaveformBorderHitMs.ToString());
textWriter.WriteElementString("WaveFormGridColor", settings.VideoControls.WaveFormGridColor.ToArgb().ToString());
textWriter.WriteElementString("WaveFormColor", settings.VideoControls.WaveFormColor.ToArgb().ToString());