diff options
author | sr55 <[email protected]> | 2009-06-29 20:05:04 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2009-06-29 20:05:04 +0000 |
commit | fafb7a774fba159de59fd54e5bf10b53a2382f7d (patch) | |
tree | 7e6ec763fb01a49e12f204dbfe3ca011557d3979 /win/C#/Functions/PresetLoader.cs | |
parent | 36d3b711916f38c606a4ed5db77608a07d5efbbe (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/PresetLoader.cs')
-rw-r--r-- | win/C#/Functions/PresetLoader.cs | 25 |
1 files changed, 17 insertions, 8 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)
|