summaryrefslogtreecommitdiffstats
path: root/win/C#/Functions
diff options
context:
space:
mode:
Diffstat (limited to 'win/C#/Functions')
-rw-r--r--win/C#/Functions/Common.cs32
-rw-r--r--win/C#/Functions/QueryParser.cs5
2 files changed, 19 insertions, 18 deletions
diff --git a/win/C#/Functions/Common.cs b/win/C#/Functions/Common.cs
index 3f68b6346..19029fdb1 100644
--- a/win/C#/Functions/Common.cs
+++ b/win/C#/Functions/Common.cs
@@ -197,10 +197,7 @@ namespace Handbrake.Functions
mainWindow.check_iPodAtom.CheckState = CheckState.Unchecked;
// Now load all the new settings onto the main window
- if (presetQuery.Source != "")
- mainWindow.text_source.Text = presetQuery.Source;
-
- selectLongestTitle(mainWindow);
+ mainWindow.drp_dvdtitle.Text = "Automatic";
mainWindow.drop_chapterStart.Text = "Auto";
mainWindow.drop_chapterFinish.Text = "Auto";
@@ -220,9 +217,6 @@ namespace Handbrake.Functions
// Destination tab
#region destination
- if (presetQuery.Destination != "")
- mainWindow.text_destination.Text = presetQuery.Destination;
-
mainWindow.drp_videoEncoder.Text = presetQuery.VideoEncoder;
if (presetQuery.Format != null)
@@ -251,15 +245,25 @@ namespace Handbrake.Functions
#endregion
-
-
// Picture Settings Tab
#region Picture
- mainWindow.drp_crop.SelectedIndex = 1;
- mainWindow.text_top.Text = presetQuery.CropTop;
- mainWindow.text_bottom.Text = presetQuery.CropBottom;
- mainWindow.text_left.Text = presetQuery.CropLeft;
- mainWindow.text_right.Text = presetQuery.CropRight;
+
+ if (presetQuery.CropTop == "0" && presetQuery.CropBottom == "0" && presetQuery.CropLeft == "0" && presetQuery.CropRight == "0")
+ {
+ mainWindow.drp_crop.SelectedIndex = 2;
+ }
+ else if (presetQuery.CropTop != null && presetQuery.CropBottom != null && presetQuery.CropLeft != null && presetQuery.CropRight != null)
+ {
+ mainWindow.drp_crop.SelectedIndex = 1;
+ mainWindow.text_top.Text = presetQuery.CropTop;
+ mainWindow.text_bottom.Text = presetQuery.CropBottom;
+ mainWindow.text_left.Text = presetQuery.CropLeft;
+ mainWindow.text_right.Text = presetQuery.CropRight;
+ }
+ else
+ {
+ mainWindow.drp_crop.SelectedIndex = 0;
+ }
mainWindow.drp_deInterlace_option.Text = presetQuery.DeInterlace;
mainWindow.drp_deNoise.Text = presetQuery.DeNoise;
diff --git a/win/C#/Functions/QueryParser.cs b/win/C#/Functions/QueryParser.cs
index 8970a562f..ec07ba3d5 100644
--- a/win/C#/Functions/QueryParser.cs
+++ b/win/C#/Functions/QueryParser.cs
@@ -784,7 +784,7 @@ namespace Handbrake.Functions
#region Regular Expressions
//Source
- Regex r1 = new Regex(@"(-i)(?:\s\"")([a-zA-Z0-9:\\\s\.]+)(?:\"")");
+ Regex r1 = new Regex(@"(-i)(?:\s\"")([a-zA-Z0-9_\-:\\\s\.]+)(?:\"")");
Match source = r1.Match(input.Replace('"', '\"'));
Match title = Regex.Match(input, @"-t ([0-9]*)");
Match chapters = Regex.Match(input, @"-c ([0-9-]*)");
@@ -1238,9 +1238,7 @@ namespace Handbrake.Functions
//H264 Tab
//
if (x264.Success != false)
- {
thisQuery.q_h264 = x264.ToString().Replace("-x ", "");
- }
//
//Progam Options
@@ -1275,7 +1273,6 @@ namespace Handbrake.Functions
return "Automatic";
}
}
-
private static string getAudioEncoder(string audioEnc)
{
switch (audioEnc)