diff options
author | sr55 <[email protected]> | 2010-12-10 22:30:58 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2010-12-10 22:30:58 +0000 |
commit | cf788c533099077382471b72312108b0786525a1 (patch) | |
tree | a53da0ac49e87584d8d1a09517fa759d28436b38 /win | |
parent | 9895dd6481c3399c38867c0a25a825a48728a63a (diff) |
WinGui:
- Fix queue editing. Some settings were lost after clicking "Edit" on the queue context menu.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3705 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r-- | win/C#/frmMain.Designer.cs | 122 | ||||
-rw-r--r-- | win/C#/frmMain.cs | 56 |
2 files changed, 96 insertions, 82 deletions
diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs index 122ee638d..16f6979a8 100644 --- a/win/C#/frmMain.Designer.cs +++ b/win/C#/frmMain.Designer.cs @@ -111,6 +111,7 @@ namespace Handbrake this.Label47 = new System.Windows.Forms.Label();
this.Label3 = new System.Windows.Forms.Label();
this.tab_audio = new System.Windows.Forms.TabPage();
+ this.AudioSettings = new Handbrake.Controls.AudioPanel();
this.AudioMenuRowHeightHack = new System.Windows.Forms.ImageList(this.components);
this.tab_video = new System.Windows.Forms.TabPage();
this.checkMaximumFramerate = new System.Windows.Forms.CheckBox();
@@ -123,13 +124,17 @@ namespace Handbrake this.lbl_SliderValue = new System.Windows.Forms.Label();
this.lbl_framerate = new System.Windows.Forms.Label();
this.tab_picture = new System.Windows.Forms.TabPage();
+ this.PictureSettings = new Handbrake.Controls.PictureSettings();
this.Check_ChapterMarkers = new System.Windows.Forms.CheckBox();
this.tabs_panel = new System.Windows.Forms.TabControl();
this.tab_filters = new System.Windows.Forms.TabPage();
+ this.Filters = new Handbrake.Controls.Filters();
this.tab_subtitles = new System.Windows.Forms.TabPage();
+ this.Subtitles = new Handbrake.Controls.Subtitles();
this.tab_chapters = new System.Windows.Forms.TabPage();
this.label31 = new System.Windows.Forms.Label();
this.tab_advanced = new System.Windows.Forms.TabPage();
+ this.x264Panel = new Handbrake.Controls.x264Panel();
this.tab_query = new System.Windows.Forms.TabPage();
this.btn_clear = new System.Windows.Forms.Button();
this.label34 = new System.Windows.Forms.Label();
@@ -174,11 +179,6 @@ namespace Handbrake this.SourceLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
this.openPreset = new System.Windows.Forms.OpenFileDialog();
this.File_ChapterImport = new System.Windows.Forms.OpenFileDialog();
- this.PictureSettings = new Handbrake.Controls.PictureSettings();
- this.Filters = new Handbrake.Controls.Filters();
- this.AudioSettings = new Handbrake.Controls.AudioPanel();
- this.Subtitles = new Handbrake.Controls.Subtitles();
- this.x264Panel = new Handbrake.Controls.x264Panel();
notifyIconMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
notifyIconMenu.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.slider_videoQuality)).BeginInit();
@@ -282,7 +282,7 @@ namespace Handbrake this.check_turbo.Enabled = false;
this.check_turbo.Location = new System.Drawing.Point(146, 143);
this.check_turbo.Name = "check_turbo";
- this.check_turbo.Size = new System.Drawing.Size(101, 17);
+ this.check_turbo.Size = new System.Drawing.Size(99, 17);
this.check_turbo.TabIndex = 7;
this.check_turbo.Text = "Turbo first Pass";
this.ToolTip.SetToolTip(this.check_turbo, "Makes the first pass of a 2 pass encode faster.");
@@ -938,6 +938,15 @@ namespace Handbrake this.tab_audio.Text = "Audio";
this.tab_audio.UseVisualStyleBackColor = true;
//
+ // AudioSettings
+ //
+ this.AudioSettings.BackColor = System.Drawing.Color.Transparent;
+ this.AudioSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.AudioSettings.Location = new System.Drawing.Point(0, 0);
+ this.AudioSettings.Name = "AudioSettings";
+ this.AudioSettings.Size = new System.Drawing.Size(715, 310);
+ this.AudioSettings.TabIndex = 0;
+ //
// AudioMenuRowHeightHack
//
this.AudioMenuRowHeightHack.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
@@ -977,7 +986,7 @@ namespace Handbrake this.checkMaximumFramerate.BackColor = System.Drawing.Color.Transparent;
this.checkMaximumFramerate.Location = new System.Drawing.Point(125, 89);
this.checkMaximumFramerate.Name = "checkMaximumFramerate";
- this.checkMaximumFramerate.Size = new System.Drawing.Size(132, 17);
+ this.checkMaximumFramerate.Size = new System.Drawing.Size(131, 17);
this.checkMaximumFramerate.TabIndex = 19;
this.checkMaximumFramerate.Text = "Peak Framerate (VFR)";
this.checkMaximumFramerate.UseVisualStyleBackColor = false;
@@ -988,7 +997,7 @@ namespace Handbrake this.radio_cq.BackColor = System.Drawing.Color.Transparent;
this.radio_cq.Location = new System.Drawing.Point(365, 97);
this.radio_cq.Name = "radio_cq";
- this.radio_cq.Size = new System.Drawing.Size(110, 17);
+ this.radio_cq.Size = new System.Drawing.Size(105, 17);
this.radio_cq.TabIndex = 18;
this.radio_cq.Text = "Constant Quality:";
this.radio_cq.UseVisualStyleBackColor = false;
@@ -1001,7 +1010,7 @@ namespace Handbrake this.radio_avgBitrate.Checked = true;
this.radio_avgBitrate.Location = new System.Drawing.Point(365, 64);
this.radio_avgBitrate.Name = "radio_avgBitrate";
- this.radio_avgBitrate.Size = new System.Drawing.Size(116, 17);
+ this.radio_avgBitrate.Size = new System.Drawing.Size(112, 17);
this.radio_avgBitrate.TabIndex = 17;
this.radio_avgBitrate.TabStop = true;
this.radio_avgBitrate.Text = "Avg Bitrate (kbps):";
@@ -1014,7 +1023,7 @@ namespace Handbrake this.radio_targetFilesize.BackColor = System.Drawing.Color.Transparent;
this.radio_targetFilesize.Location = new System.Drawing.Point(365, 37);
this.radio_targetFilesize.Name = "radio_targetFilesize";
- this.radio_targetFilesize.Size = new System.Drawing.Size(108, 17);
+ this.radio_targetFilesize.Size = new System.Drawing.Size(107, 17);
this.radio_targetFilesize.TabIndex = 16;
this.radio_targetFilesize.Text = "Target Size (MB):";
this.radio_targetFilesize.UseVisualStyleBackColor = false;
@@ -1037,7 +1046,7 @@ namespace Handbrake this.check_2PassEncode.BackColor = System.Drawing.Color.Transparent;
this.check_2PassEncode.Location = new System.Drawing.Point(125, 120);
this.check_2PassEncode.Name = "check_2PassEncode";
- this.check_2PassEncode.Size = new System.Drawing.Size(104, 17);
+ this.check_2PassEncode.Size = new System.Drawing.Size(106, 17);
this.check_2PassEncode.TabIndex = 6;
this.check_2PassEncode.Text = "2-Pass Encoding";
this.check_2PassEncode.UseVisualStyleBackColor = false;
@@ -1087,13 +1096,25 @@ namespace Handbrake this.tab_picture.Text = "Picture";
this.tab_picture.UseVisualStyleBackColor = true;
//
+ // PictureSettings
+ //
+ this.PictureSettings.BackColor = System.Drawing.Color.Transparent;
+ this.PictureSettings.CurrentlySelectedPreset = null;
+ this.PictureSettings.Enabled = false;
+ this.PictureSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.PictureSettings.Location = new System.Drawing.Point(0, 0);
+ this.PictureSettings.Name = "PictureSettings";
+ this.PictureSettings.PresetMaximumResolution = new System.Drawing.Size(0, 0);
+ this.PictureSettings.Size = new System.Drawing.Size(666, 279);
+ this.PictureSettings.TabIndex = 0;
+ //
// Check_ChapterMarkers
//
this.Check_ChapterMarkers.AutoSize = true;
this.Check_ChapterMarkers.BackColor = System.Drawing.Color.Transparent;
this.Check_ChapterMarkers.Location = new System.Drawing.Point(16, 32);
this.Check_ChapterMarkers.Name = "Check_ChapterMarkers";
- this.Check_ChapterMarkers.Size = new System.Drawing.Size(140, 17);
+ this.Check_ChapterMarkers.Size = new System.Drawing.Size(136, 17);
this.Check_ChapterMarkers.TabIndex = 1;
this.Check_ChapterMarkers.Text = "Create chapter markers";
this.Check_ChapterMarkers.UseVisualStyleBackColor = false;
@@ -1126,6 +1147,15 @@ namespace Handbrake this.tab_filters.Text = "Video Filters";
this.tab_filters.UseVisualStyleBackColor = true;
//
+ // Filters
+ //
+ this.Filters.BackColor = System.Drawing.Color.Transparent;
+ this.Filters.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.Filters.Location = new System.Drawing.Point(0, 0);
+ this.Filters.Name = "Filters";
+ this.Filters.Size = new System.Drawing.Size(713, 310);
+ this.Filters.TabIndex = 0;
+ //
// tab_subtitles
//
this.tab_subtitles.Controls.Add(this.Subtitles);
@@ -1137,6 +1167,15 @@ namespace Handbrake this.tab_subtitles.Text = "Subtitles";
this.tab_subtitles.UseVisualStyleBackColor = true;
//
+ // Subtitles
+ //
+ this.Subtitles.BackColor = System.Drawing.Color.Transparent;
+ this.Subtitles.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.Subtitles.Location = new System.Drawing.Point(0, 0);
+ this.Subtitles.Name = "Subtitles";
+ this.Subtitles.Size = new System.Drawing.Size(722, 310);
+ this.Subtitles.TabIndex = 0;
+ //
// tab_chapters
//
this.tab_chapters.BackColor = System.Drawing.Color.Transparent;
@@ -1175,6 +1214,16 @@ namespace Handbrake this.tab_advanced.Text = "Advanced";
this.tab_advanced.UseVisualStyleBackColor = true;
//
+ // x264Panel
+ //
+ this.x264Panel.BackColor = System.Drawing.Color.Transparent;
+ this.x264Panel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.x264Panel.Location = new System.Drawing.Point(0, 0);
+ this.x264Panel.Name = "x264Panel";
+ this.x264Panel.Size = new System.Drawing.Size(720, 306);
+ this.x264Panel.TabIndex = 0;
+ this.x264Panel.X264Query = "";
+ //
// tab_query
//
this.tab_query.Controls.Add(this.btn_clear);
@@ -1666,55 +1715,6 @@ namespace Handbrake //
this.File_ChapterImport.Filter = "CSV Files|*.csv";
//
- // PictureSettings
- //
- this.PictureSettings.BackColor = System.Drawing.Color.Transparent;
- this.PictureSettings.CurrentlySelectedPreset = null;
- this.PictureSettings.Enabled = false;
- this.PictureSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.PictureSettings.Location = new System.Drawing.Point(0, 0);
- this.PictureSettings.Name = "PictureSettings";
- this.PictureSettings.PresetMaximumResolution = new System.Drawing.Size(0, 0);
- this.PictureSettings.Size = new System.Drawing.Size(666, 279);
- this.PictureSettings.TabIndex = 0;
- //
- // Filters
- //
- this.Filters.BackColor = System.Drawing.Color.Transparent;
- this.Filters.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.Filters.Location = new System.Drawing.Point(0, 0);
- this.Filters.Name = "Filters";
- this.Filters.Size = new System.Drawing.Size(713, 310);
- this.Filters.TabIndex = 0;
- //
- // AudioSettings
- //
- this.AudioSettings.BackColor = System.Drawing.Color.Transparent;
- this.AudioSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.AudioSettings.Location = new System.Drawing.Point(0, 0);
- this.AudioSettings.Name = "AudioSettings";
- this.AudioSettings.Size = new System.Drawing.Size(715, 310);
- this.AudioSettings.TabIndex = 0;
- //
- // Subtitles
- //
- this.Subtitles.BackColor = System.Drawing.Color.Transparent;
- this.Subtitles.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.Subtitles.Location = new System.Drawing.Point(0, 0);
- this.Subtitles.Name = "Subtitles";
- this.Subtitles.Size = new System.Drawing.Size(722, 310);
- this.Subtitles.TabIndex = 0;
- //
- // x264Panel
- //
- this.x264Panel.BackColor = System.Drawing.Color.Transparent;
- this.x264Panel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.x264Panel.Location = new System.Drawing.Point(0, 0);
- this.x264Panel.Name = "x264Panel";
- this.x264Panel.Size = new System.Drawing.Size(720, 306);
- this.x264Panel.TabIndex = 0;
- this.x264Panel.X264Query = "";
- //
// frmMain
//
this.AllowDrop = true;
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index 2f1467625..4d341731d 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -57,6 +57,7 @@ namespace Handbrake private DVD currentSource;
private IScan SourceScan = new ScanService();
private List<DriveInformation> drives;
+ private Job queueEdit;
// Delegates **********************************************************
private delegate void UpdateWindowHandler();
@@ -2208,6 +2209,34 @@ namespace Handbrake }
UpdateSourceLabel();
+ // This is a bit of a hack to fix the queue editing.
+ // If afte the scan, we find a job sitting in queueEdit, then the user has rescaned the source from the queue by clicking edit.
+ // When this occures, we want to repopulate their old settings.
+ if (queueEdit != null)
+ {
+ // Setup UI
+ if (queueEdit.Query != null)
+ {
+ // Send the query from the file to the Query Parser class
+ QueryParser presetQuery = QueryParser.Parse(queueEdit.Query);
+
+ // Now load the preset
+ PresetLoader.LoadPreset(this, presetQuery, "Load Back From Queue");
+
+ // Set the destination path
+ this.text_destination.Text = queueEdit.Destination;
+
+ // The x264 widgets will need updated, so do this now:
+ x264Panel.StandardizeOptString();
+ x264Panel.SetCurrentSettingsInPanel();
+
+ // Set the crop label
+ PictureSettings.SetPresetCropWarningLabel(null);
+ }
+
+ queueEdit = null;
+ }
+
// Enable the GUI components and enable any disabled components
EnableGUI();
}
@@ -2308,28 +2337,13 @@ namespace Handbrake /// </param>
public void RecievingJob(Job job)
{
- string query = job.Query;
- StartScan(job.Source, job.Title);
-
- if (query != null)
- {
- // Ok, Reset all the H264 widgets before changing the preset
- x264Panel.Reset2Defaults();
-
- // Send the query from the file to the Query Parser class
- QueryParser presetQuery = QueryParser.Parse(query);
-
- // Now load the preset
- PresetLoader.LoadPreset(this, presetQuery, "Load Back From Queue");
-
- // The x264 widgets will need updated, so do this now:
- x264Panel.StandardizeOptString();
- x264Panel.SetCurrentSettingsInPanel();
+ // Reset
+ this.currentlySelectedPreset = null;
+ x264Panel.Reset2Defaults();
- // Finally, let this window have a copy of the preset settings.
- this.currentlySelectedPreset = null;
- PictureSettings.SetPresetCropWarningLabel(null);
- }
+ // Scan
+ queueEdit = job; // Nasty but will do for now. TODO
+ StartScan(job.Source, job.Title);
}
#endregion
|