Removed default volume from settings, now just remebers it (also removed language tags etc) - thx fox :)

git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@1660 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
niksedk 2013-02-21 16:57:59 +00:00
parent 359d497516
commit c70abba55a
6 changed files with 7 additions and 65 deletions

View File

@ -1205,7 +1205,7 @@ namespace Nikse.SubtitleEdit.Controls
_pictureBoxVolumeBar.Width = (int)(max * percent / 100.0);
if (_videoPlayer != null)
_videoPlayer.Volume = (int)percent;
Configuration.Settings.General.VideoPlayerDefaultVolume = (int)percent;
}
private void PictureBoxVolumeBarBackgroundMouseDown(object sender, MouseEventArgs e)

View File

@ -7269,9 +7269,7 @@ namespace Nikse.SubtitleEdit.Forms
Configuration.Settings.RecentFiles.Add(_fileName, FirstVisibleIndex, FirstSelectedIndex, _videoFileName, _subtitleAlternateFileName);
SaveUndockedPositions();
SaveListViewWidths();
Configuration.Settings.Save();
if (mediaPlayer.VideoPlayer != null)
@ -12345,7 +12343,7 @@ namespace Nikse.SubtitleEdit.Forms
splitContainer1.SplitterDistance = Configuration.Settings.General.SplitContainer1SplitterDistance;
splitContainerListViewAndText.SplitterDistance = Configuration.Settings.General.SplitContainerListViewAndTextSplitterDistance;
}
mediaPlayer.InitializeVolume(Configuration.Settings.General.VideoPlayerDefaultVolume);
LoadPlugins();
}

View File

@ -139,9 +139,6 @@
this.labelVideoPlayerPreviewFontSize = new System.Windows.Forms.Label();
this.comboBoxlVideoPlayerPreviewFontSize = new System.Windows.Forms.ComboBox();
this.checkBoxVideoPlayerShowStopButton = new System.Windows.Forms.CheckBox();
this.comboBoxVideoPlayerDefaultVolume = new System.Windows.Forms.ComboBox();
this.labelDefaultVol = new System.Windows.Forms.Label();
this.labelVolDescr = new System.Windows.Forms.Label();
this.groupBoxVideoEngine = new System.Windows.Forms.GroupBox();
this.labelVideoPlayerVLC = new System.Windows.Forms.Label();
this.radioButtonVideoPlayerVLC = new System.Windows.Forms.RadioButton();
@ -1512,9 +1509,6 @@
this.groupBoxVideoPlayerDefault.Controls.Add(this.labelVideoPlayerPreviewFontSize);
this.groupBoxVideoPlayerDefault.Controls.Add(this.comboBoxlVideoPlayerPreviewFontSize);
this.groupBoxVideoPlayerDefault.Controls.Add(this.checkBoxVideoPlayerShowStopButton);
this.groupBoxVideoPlayerDefault.Controls.Add(this.comboBoxVideoPlayerDefaultVolume);
this.groupBoxVideoPlayerDefault.Controls.Add(this.labelDefaultVol);
this.groupBoxVideoPlayerDefault.Controls.Add(this.labelVolDescr);
this.groupBoxVideoPlayerDefault.Location = new System.Drawing.Point(7, 135);
this.groupBoxVideoPlayerDefault.Name = "groupBoxVideoPlayerDefault";
this.groupBoxVideoPlayerDefault.Size = new System.Drawing.Size(813, 98);
@ -1526,7 +1520,7 @@
this.checkBoxVideoPlayerShowFullscreenButton.AutoSize = true;
this.checkBoxVideoPlayerShowFullscreenButton.Location = new System.Drawing.Point(9, 65);
this.checkBoxVideoPlayerShowFullscreenButton.Name = "checkBoxVideoPlayerShowFullscreenButton";
this.checkBoxVideoPlayerShowFullscreenButton.Size = new System.Drawing.Size(134, 17);
this.checkBoxVideoPlayerShowFullscreenButton.Size = new System.Drawing.Size(136, 17);
this.checkBoxVideoPlayerShowFullscreenButton.TabIndex = 12;
this.checkBoxVideoPlayerShowFullscreenButton.Text = "Show fullscreen button";
this.checkBoxVideoPlayerShowFullscreenButton.UseVisualStyleBackColor = true;
@ -1536,7 +1530,7 @@
this.checkBoxVideoPlayerShowMuteButton.AutoSize = true;
this.checkBoxVideoPlayerShowMuteButton.Location = new System.Drawing.Point(9, 42);
this.checkBoxVideoPlayerShowMuteButton.Name = "checkBoxVideoPlayerShowMuteButton";
this.checkBoxVideoPlayerShowMuteButton.Size = new System.Drawing.Size(112, 17);
this.checkBoxVideoPlayerShowMuteButton.Size = new System.Drawing.Size(114, 17);
this.checkBoxVideoPlayerShowMuteButton.TabIndex = 11;
this.checkBoxVideoPlayerShowMuteButton.Text = "Show mute button";
this.checkBoxVideoPlayerShowMuteButton.UseVisualStyleBackColor = true;
@ -1544,7 +1538,7 @@
// labelVideoPlayerPreviewFontSize
//
this.labelVideoPlayerPreviewFontSize.AutoSize = true;
this.labelVideoPlayerPreviewFontSize.Location = new System.Drawing.Point(331, 54);
this.labelVideoPlayerPreviewFontSize.Location = new System.Drawing.Point(331, 21);
this.labelVideoPlayerPreviewFontSize.Name = "labelVideoPlayerPreviewFontSize";
this.labelVideoPlayerPreviewFontSize.Size = new System.Drawing.Size(128, 13);
this.labelVideoPlayerPreviewFontSize.TabIndex = 14;
@ -1568,7 +1562,7 @@
"18",
"19",
"20"});
this.comboBoxlVideoPlayerPreviewFontSize.Location = new System.Drawing.Point(465, 51);
this.comboBoxlVideoPlayerPreviewFontSize.Location = new System.Drawing.Point(465, 18);
this.comboBoxlVideoPlayerPreviewFontSize.Name = "comboBoxlVideoPlayerPreviewFontSize";
this.comboBoxlVideoPlayerPreviewFontSize.Size = new System.Drawing.Size(121, 21);
this.comboBoxlVideoPlayerPreviewFontSize.TabIndex = 13;
@ -1578,40 +1572,11 @@
this.checkBoxVideoPlayerShowStopButton.AutoSize = true;
this.checkBoxVideoPlayerShowStopButton.Location = new System.Drawing.Point(9, 19);
this.checkBoxVideoPlayerShowStopButton.Name = "checkBoxVideoPlayerShowStopButton";
this.checkBoxVideoPlayerShowStopButton.Size = new System.Drawing.Size(109, 17);
this.checkBoxVideoPlayerShowStopButton.Size = new System.Drawing.Size(111, 17);
this.checkBoxVideoPlayerShowStopButton.TabIndex = 10;
this.checkBoxVideoPlayerShowStopButton.Text = "Show stop button";
this.checkBoxVideoPlayerShowStopButton.UseVisualStyleBackColor = true;
//
// comboBoxVideoPlayerDefaultVolume
//
this.comboBoxVideoPlayerDefaultVolume.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxVideoPlayerDefaultVolume.FormattingEnabled = true;
this.comboBoxVideoPlayerDefaultVolume.Location = new System.Drawing.Point(447, 20);
this.comboBoxVideoPlayerDefaultVolume.Name = "comboBoxVideoPlayerDefaultVolume";
this.comboBoxVideoPlayerDefaultVolume.Size = new System.Drawing.Size(121, 21);
this.comboBoxVideoPlayerDefaultVolume.TabIndex = 12;
//
// labelDefaultVol
//
this.labelDefaultVol.AutoSize = true;
this.labelDefaultVol.Location = new System.Drawing.Point(329, 23);
this.labelDefaultVol.Name = "labelDefaultVol";
this.labelDefaultVol.Size = new System.Drawing.Size(79, 13);
this.labelDefaultVol.TabIndex = 6;
this.labelDefaultVol.Text = "Default volume";
//
// labelVolDescr
//
this.labelVolDescr.AutoSize = true;
this.labelVolDescr.Font = new System.Drawing.Font("Tahoma", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelVolDescr.ForeColor = System.Drawing.Color.Gray;
this.labelVolDescr.Location = new System.Drawing.Point(574, 24);
this.labelVolDescr.Name = "labelVolDescr";
this.labelVolDescr.Size = new System.Drawing.Size(150, 11);
this.labelVolDescr.TabIndex = 9;
this.labelVolDescr.Text = "0 is no sound, 100 is higest volume";
//
// groupBoxVideoEngine
//
this.groupBoxVideoEngine.Controls.Add(this.labelVideoPlayerVLC);
@ -3065,9 +3030,6 @@
private System.Windows.Forms.Label labelSubMaxLen;
private System.Windows.Forms.TabPage tabPageVideoPlayer;
private System.Windows.Forms.CheckBox checkBoxVideoPlayerShowStopButton;
private System.Windows.Forms.ComboBox comboBoxVideoPlayerDefaultVolume;
private System.Windows.Forms.Label labelDefaultVol;
private System.Windows.Forms.Label labelVolDescr;
private System.Windows.Forms.GroupBox groupBoxVideoEngine;
private System.Windows.Forms.Label labelVideoPlayerMPlayer;
private System.Windows.Forms.Label labelDirectShowDescription;

View File

@ -114,11 +114,6 @@ namespace Nikse.SubtitleEdit.Forms
if (!Utilities.IsQuartsDllInstalled)
radioButtonVideoPlayerDirectShow.Enabled = false;
comboBoxVideoPlayerDefaultVolume.Items.Clear();
for (int i=0; i<= 100; i++)
comboBoxVideoPlayerDefaultVolume.Items.Add(i.ToString());
if (gs.VideoPlayerDefaultVolume >= 0 && gs.VideoPlayerDefaultVolume <= 100)
comboBoxVideoPlayerDefaultVolume.SelectedIndex = gs.VideoPlayerDefaultVolume;
checkBoxVideoPlayerShowStopButton.Checked = gs.VideoPlayerShowStopButton;
checkBoxVideoPlayerShowMuteButton.Checked = gs.VideoPlayerShowMuteButton;
checkBoxVideoPlayerShowFullscreenButton.Checked = gs.VideoPlayerShowFullscreenButton;
@ -282,11 +277,6 @@ namespace Nikse.SubtitleEdit.Forms
checkBoxVideoPlayerShowMuteButton.Text = language.ShowMuteButton;
checkBoxVideoPlayerShowFullscreenButton.Text = language.ShowFullscreenButton;
labelDefaultVol.Text = language.DefaultVolume;
comboBoxVideoPlayerDefaultVolume.Left = labelDefaultVol.Left + labelDefaultVol.Width;
labelVolDescr.Text = language.VolumeNotes;
labelVolDescr.Left = comboBoxVideoPlayerDefaultVolume.Left + comboBoxVideoPlayerDefaultVolume.Width + 4;
labelVideoPlayerPreviewFontSize.Text = language.PreviewFontSize;
comboBoxlVideoPlayerPreviewFontSize.Left = labelVideoPlayerPreviewFontSize.Left + labelVideoPlayerPreviewFontSize.Width;
@ -914,13 +904,9 @@ namespace Nikse.SubtitleEdit.Forms
gs.VideoPlayer = "VLC";
else
gs.VideoPlayer = "DirectShow";
gs.VideoPlayerDefaultVolume = comboBoxVideoPlayerDefaultVolume.SelectedIndex;
if (gs.VideoPlayerDefaultVolume < 0 || gs.VideoPlayerDefaultVolume > 100)
comboBoxVideoPlayerDefaultVolume.SelectedIndex = 50;
gs.VideoPlayerShowStopButton = checkBoxVideoPlayerShowStopButton.Checked;
gs.VideoPlayerShowMuteButton = checkBoxVideoPlayerShowMuteButton.Checked;
gs.VideoPlayerShowFullscreenButton = checkBoxVideoPlayerShowFullscreenButton.Checked;
gs.VideoPlayerPreviewFontSize = int.Parse(comboBoxlVideoPlayerPreviewFontSize.Items[0].ToString()) + comboBoxlVideoPlayerPreviewFontSize.SelectedIndex;
Configuration.Settings.VideoControls.CustomSearchText1 = comboBoxCustomSearch1.Text;

View File

@ -1520,8 +1520,6 @@ can edit in same subtitle file (collaboration)",
ShowStopButton = "Show stop button",
ShowMuteButton = "Show mute button",
ShowFullscreenButton = "Show fullscreen button",
DefaultVolume = "Default volume",
VolumeNotes = "0 is no sound, 100 is highest volume",
PreviewFontSize = "Subtitle preview font size",
MainWindowVideoControls = "Main window video controls",
CustomSearchTextAndUrl = "Custom search text and url",

View File

@ -1425,8 +1425,6 @@
public string ShowStopButton { get; set; }
public string ShowMuteButton { get; set; }
public string ShowFullscreenButton { get; set; }
public string DefaultVolume { get; set; }
public string VolumeNotes { get; set; }
public string PreviewFontSize { get; set; }
public string MainWindowVideoControls { get; set; }
public string CustomSearchTextAndUrl { get; set; }