summaryrefslogtreecommitdiffstats
path: root/win/C#/Functions
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-06-29 20:05:04 +0000
committersr55 <[email protected]>2009-06-29 20:05:04 +0000
commitfafb7a774fba159de59fd54e5bf10b53a2382f7d (patch)
tree7e6ec763fb01a49e12f204dbfe3ca011557d3979 /win/C#/Functions
parent36d3b711916f38c606a4ed5db77608a07d5efbbe (diff)
WinGui:
- Added Global Event Handlers to parts of some of the user controls. - Added register and deregister event handler functions for widget changes. (This allows the preset label to be changed to custom when a user changes a widget). This isn't finalised. - Misc UI tweaks - Few bug fixes: * Preset update notification appearing behind splashscreen * Tweaks to the preset loader to make it work a bit better. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2640 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Functions')
-rw-r--r--win/C#/Functions/PresetLoader.cs25
-rw-r--r--win/C#/Functions/QueryParser.cs2
2 files changed, 18 insertions, 9 deletions
diff --git a/win/C#/Functions/PresetLoader.cs b/win/C#/Functions/PresetLoader.cs
index 82d96e660..043436c02 100644
--- a/win/C#/Functions/PresetLoader.cs
+++ b/win/C#/Functions/PresetLoader.cs
@@ -67,14 +67,12 @@ namespace Handbrake.Functions
#endregion
#region Picture
- mainWindow.PictureSettings.check_autoCrop.Checked = true;
- if (presetQuery.CropBottom == "0" && presetQuery.CropTop == "0")
- if (presetQuery.CropLeft == "0" && presetQuery.CropRight == "0")
- mainWindow.PictureSettings.check_customCrop.Checked = true;
-
+
if (pictureSettings) // only Load picture settings if the perset requires it
{
- if (presetQuery.CropTop != null)
+ mainWindow.PictureSettings.check_autoCrop.Checked = true;
+
+ if (presetQuery.CropValues != null)
{
int top, bottom, left, right;
int.TryParse(presetQuery.CropTop, out top);
@@ -98,9 +96,20 @@ namespace Handbrake.Functions
if (presetQuery.Width != 0)
mainWindow.PictureSettings.text_width.Value = presetQuery.Width;
else if (presetQuery.MaxWidth == 0)
- mainWindow.PictureSettings.text_width.Value = 0;
+ {
+ if (mainWindow.selectedTitle != null)
+ if (mainWindow.selectedTitle.Resolution.Width != 0)
+ {
+ mainWindow.PictureSettings.text_width.Value = mainWindow.selectedTitle.Resolution.Width;
+ if (presetQuery.Height == 0 && presetQuery.MaxHeight == 0)
+ mainWindow.PictureSettings.check_KeepAR.Checked = true;
+ }
+ else
+ mainWindow.PictureSettings.text_width.Value = 0;
+ }
- mainWindow.PictureSettings.text_height.Value = presetQuery.Height != 0 ? presetQuery.Height : 0;
+ if (presetQuery.Height != 0)
+ mainWindow.PictureSettings.text_height.Value = presetQuery.Height;
// Max Width/Height override Width/Height
if (presetQuery.MaxWidth != 0)
diff --git a/win/C#/Functions/QueryParser.cs b/win/C#/Functions/QueryParser.cs
index 5c1576cd4..0b7c2a395 100644
--- a/win/C#/Functions/QueryParser.cs
+++ b/win/C#/Functions/QueryParser.cs
@@ -222,7 +222,7 @@ namespace Handbrake.Functions
thisQuery.CropBottom = actCropValues[1];
thisQuery.CropLeft = actCropValues[2];
thisQuery.CropRight = actCropValues[3];
- }
+ }
if (strictAnamorphic.Success)
thisQuery.AnamorphicMode = 1;