diff options
Diffstat (limited to 'win/CS')
31 files changed, 288 insertions, 222 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/EventArgs/ScanProgressEventArgs.cs b/win/CS/HandBrake.ApplicationServices/EventArgs/ScanProgressEventArgs.cs index fd0d01fe3..ff84bd7d5 100644 --- a/win/CS/HandBrake.ApplicationServices/EventArgs/ScanProgressEventArgs.cs +++ b/win/CS/HandBrake.ApplicationServices/EventArgs/ScanProgressEventArgs.cs @@ -29,5 +29,11 @@ namespace HandBrake.ApplicationServices.EventArgs /// </summary>
[DataMember]
public int Titles { get; set; }
+
+ /// <summary>
+ /// Gets or sets the percentage.
+ /// </summary>
+ [DataMember]
+ public decimal Percentage { get; set; }
}
}
diff --git a/win/CS/HandBrake.ApplicationServices/Isolation/IsolatedEncodeService.cs b/win/CS/HandBrake.ApplicationServices/Isolation/IsolatedEncodeService.cs index 3ddae9b1f..31c1d8cec 100644 --- a/win/CS/HandBrake.ApplicationServices/Isolation/IsolatedEncodeService.cs +++ b/win/CS/HandBrake.ApplicationServices/Isolation/IsolatedEncodeService.cs @@ -82,6 +82,17 @@ namespace HandBrake.ApplicationServices.Isolation }
/// <summary>
+ /// Gets the log index.
+ /// </summary>
+ public int LogIndex
+ {
+ get
+ {
+ return -1;
+ }
+ }
+
+ /// <summary>
/// Gets a value indicating whether IsEncoding.
/// </summary>
public bool IsEncoding
diff --git a/win/CS/HandBrake.ApplicationServices/Parsing/Parser.cs b/win/CS/HandBrake.ApplicationServices/Parsing/Parser.cs index f17a6a51b..7cb7100fc 100644 --- a/win/CS/HandBrake.ApplicationServices/Parsing/Parser.cs +++ b/win/CS/HandBrake.ApplicationServices/Parsing/Parser.cs @@ -28,7 +28,8 @@ namespace HandBrake.ApplicationServices.Parsing /// <param name="sender">The object who's raising the event</param>
/// <param name="currentTitle">The title number currently being processed</param>
/// <param name="titleCount">The total number of titiles to be processed</param>
- public delegate void ScanProgressEventHandler(object sender, int currentTitle, int titleCount);
+ /// <param name="percentage">Percentage complete.</param>
+ public delegate void ScanProgressEventHandler(object sender, int currentTitle, int titleCount, decimal percentage);
/// <summary>
/// A delegate to handle encode progress updates // EXPERIMENTAL
@@ -97,18 +98,18 @@ namespace HandBrake.ApplicationServices.Parsing {
string tmp = base.ReadLine();
- buffer.Append(tmp + Environment.NewLine);
-
Match m = null;
- if (tmp.Contains("Scanning title"))
- m = Regex.Match(tmp, "^Scanning title ([0-9]*) of ([0-9]*)");
+ if (tmp != null && tmp.Contains("Scanning title"))
+ m = Regex.Match(tmp, "^Scanning title ([0-9]*) of ([0-9]*)([a-z0-9 ,]*), ([0-9.]*)");
+ else if (!string.IsNullOrEmpty(tmp))
+ buffer.Append(tmp + Environment.NewLine);
if (OnReadLine != null)
OnReadLine(this, tmp);
if (m != null)
if (m.Success && OnScanProgress != null)
- OnScanProgress(this, int.Parse(m.Groups[1].Value), int.Parse(m.Groups[2].Value));
+ OnScanProgress(this, int.Parse(m.Groups[1].Value), int.Parse(m.Groups[2].Value), decimal.Parse(m.Groups[4].Value, CultureInfo.InvariantCulture));
return tmp;
}
diff --git a/win/CS/HandBrake.ApplicationServices/Properties/AssemblyInfo.cs.tmpl b/win/CS/HandBrake.ApplicationServices/Properties/AssemblyInfo.cs.tmpl index c9a9da245..99c4ed362 100644 --- a/win/CS/HandBrake.ApplicationServices/Properties/AssemblyInfo.cs.tmpl +++ b/win/CS/HandBrake.ApplicationServices/Properties/AssemblyInfo.cs.tmpl @@ -38,5 +38,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.9.6.$WCREV$")]
+[assembly: AssemblyVersion("0.9.9.$WCREV$")]
[assembly: NeutralResourcesLanguage("")]
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs b/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs index 866edb794..555b004f2 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs @@ -15,8 +15,6 @@ namespace HandBrake.ApplicationServices.Services.Base using System.Text;
using System.Text.RegularExpressions;
- using Caliburn.Micro;
-
using HandBrake.ApplicationServices.EventArgs;
using HandBrake.ApplicationServices.Exceptions;
using HandBrake.ApplicationServices.Model;
@@ -41,11 +39,6 @@ namespace HandBrake.ApplicationServices.Services.Base private readonly IUserSettingService userSettingService;
/// <summary>
- /// Windows 7 API Pack wrapper
- /// </summary>
- private readonly Win7 windowsSeven = new Win7();
-
- /// <summary>
/// The Log File Header
/// </summary>
private readonly StringBuilder header;
@@ -76,6 +69,8 @@ namespace HandBrake.ApplicationServices.Services.Base GeneralUtilities.CreateCliLogHeader(
userSettingService.GetUserSetting<string>(ASUserSettingConstants.HandBrakeVersion),
userSettingService.GetUserSetting<int>(ASUserSettingConstants.HandBrakeBuild));
+
+ this.LogIndex = 0;
}
#region Events
@@ -119,24 +114,18 @@ namespace HandBrake.ApplicationServices.Services.Base }
/// <summary>
- /// Gets LogBuffer.
+ /// Gets the log index.
/// </summary>
- public StringBuilder LogBuffer
- {
- get
- {
- return this.logBuffer;
- }
- }
+ public int LogIndex { get; private set; }
/// <summary>
- /// Gets WindowsSeven.
+ /// Gets LogBuffer.
/// </summary>
- public Win7 WindowsSeven
+ public StringBuilder LogBuffer
{
get
{
- return this.windowsSeven;
+ return this.logBuffer;
}
}
@@ -152,15 +141,11 @@ namespace HandBrake.ApplicationServices.Services.Base /// </param>
public void InvokeEncodeStatusChanged(EncodeProgressEventArgs e)
{
- Execute.OnUIThread(
- () =>
- {
- EncodeProgessStatus handler = this.EncodeStatusChanged;
- if (handler != null)
- {
- handler(this, e);
- }
- });
+ EncodeProgessStatus handler = this.EncodeStatusChanged;
+ if (handler != null)
+ {
+ handler(this, e);
+ }
}
/// <summary>
@@ -171,15 +156,13 @@ namespace HandBrake.ApplicationServices.Services.Base /// </param>
public void InvokeEncodeCompleted(EncodeCompletedEventArgs e)
{
- Execute.OnUIThread(
- () =>
- {
- EncodeCompletedStatus handler = this.EncodeCompleted;
- if (handler != null)
- {
- handler(this, e);
- }
- });
+ EncodeCompletedStatus handler = this.EncodeCompleted;
+ if (handler != null)
+ {
+ handler(this, e);
+ }
+
+ this.LogIndex = 0; // Reset
}
/// <summary>
@@ -190,14 +173,11 @@ namespace HandBrake.ApplicationServices.Services.Base /// </param>
public void InvokeEncodeStarted(EventArgs e)
{
- Execute.OnUIThread(() =>
- {
- EventHandler handler = this.EncodeStarted;
- if (handler != null)
- {
- handler(this, e);
- }
- });
+ EventHandler handler = this.EncodeStarted;
+ if (handler != null)
+ {
+ handler(this, e);
+ }
}
#endregion
@@ -261,7 +241,6 @@ namespace HandBrake.ApplicationServices.Services.Base }
}
-
/// <summary>
/// Pase the CLI status output (from standard output)
/// </summary>
@@ -393,6 +372,8 @@ namespace HandBrake.ApplicationServices.Services.Base {
try
{
+ this.LogIndex = this.LogIndex + 1;
+
lock (this.LogBuffer)
{
this.LogBuffer.AppendLine(message);
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode.cs index 577067050..b4f572521 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Encode.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Encode.cs @@ -11,7 +11,6 @@ namespace HandBrake.ApplicationServices.Services {
using System;
using System.Diagnostics;
- using System.Globalization;
using System.IO;
using System.Windows.Forms;
@@ -66,7 +65,7 @@ namespace HandBrake.ApplicationServices.Services public Encode(IUserSettingService userSettingService)
: base(userSettingService)
{
- this.userSettingService = userSettingService;
+ this.userSettingService = userSettingService;
}
#region Properties
@@ -135,7 +134,7 @@ namespace HandBrake.ApplicationServices.Services userSettingService.GetUserSetting<int>(ASUserSettingConstants.PreviewScanCount),
userSettingService.GetUserSetting<int>(ASUserSettingConstants.Verbosity),
userSettingService.GetUserSetting<bool>(ASUserSettingConstants.DisableLibDvdNav))
- : QueryGeneratorUtility.GenerateQuery(new EncodeTask(this.currentTask.Task),
+ : QueryGeneratorUtility.GenerateQuery(new EncodeTask(this.currentTask.Task),
userSettingService.GetUserSetting<int>(ASUserSettingConstants.PreviewScanCount),
userSettingService.GetUserSetting<int>(ASUserSettingConstants.Verbosity),
userSettingService.GetUserSetting<bool>(ASUserSettingConstants.DisableLibDvdNav));
@@ -263,21 +262,16 @@ namespace HandBrake.ApplicationServices.Services }
Execute.OnUIThread(() =>
+ {
+ if (this.userSettingService.GetUserSetting<bool>(ASUserSettingConstants.PreventSleep))
{
- if (this.WindowsSeven.IsWindowsSeven)
- {
- this.WindowsSeven.SetTaskBarProgressToNoProgress();
- }
-
- if (this.userSettingService.GetUserSetting<bool>(ASUserSettingConstants.PreventSleep))
- {
- Win32.AllowSleep();
- }
+ Win32.AllowSleep();
+ }
+ });
- this.currentTask.Status = QueueItemStatus.Completed;
- this.IsEncoding = false;
- this.InvokeEncodeCompleted(new EncodeCompletedEventArgs(true, null, string.Empty));
- });
+ this.currentTask.Status = QueueItemStatus.Completed;
+ this.IsEncoding = false;
+ this.InvokeEncodeCompleted(new EncodeCompletedEventArgs(true, null, string.Empty));
}
/// <summary>
@@ -296,14 +290,14 @@ namespace HandBrake.ApplicationServices.Services {
if (!String.IsNullOrEmpty(e.Data))
{
- if (initShutdown && this.LogBuffer.Length < 25000000)
+ if (initShutdown && this.LogBuffer.Length < 25000000)
{
initShutdown = false; // Reset this flag.
}
if (this.LogBuffer.Length > 25000000 && !initShutdown) // Approx 23.8MB and make sure it's only printed once
{
- this.ProcessLogMessage("ERROR: Initiating automatic shutdown of encode process. The size of the log file inidcates that there is an error! ");
+ this.ProcessLogMessage("ERROR: Initiating automatic shutdown of encode process. The size of the log file indicates that there is an error! ");
initShutdown = true;
this.Stop();
}
@@ -328,28 +322,14 @@ namespace HandBrake.ApplicationServices.Services EncodeProgressEventArgs eventArgs = this.ReadEncodeStatus(e.Data, this.startTime);
if (eventArgs != null)
{
- Execute.OnUIThread(
- () =>
- {
- if (!this.IsEncoding)
- {
- // We can get events out of order since the CLI progress is monitored on a background thread.
- // So make sure we don't send a status update after an encode complete event.
- return;
- }
-
- this.InvokeEncodeStatusChanged(eventArgs);
-
- if (this.WindowsSeven.IsWindowsSeven)
- {
- int percent;
- int.TryParse(
- Math.Round(eventArgs.PercentComplete).ToString(CultureInfo.InvariantCulture),
- out percent);
-
- this.WindowsSeven.SetTaskBarProgress(percent);
- }
- });
+ if (!this.IsEncoding)
+ {
+ // We can get events out of order since the CLI progress is monitored on a background thread.
+ // So make sure we don't send a status update after an encode complete event.
+ return;
+ }
+
+ this.InvokeEncodeStatusChanged(eventArgs);
}
}
}
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IEncode.cs b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IEncode.cs index 915d66788..fbb59ec2b 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IEncode.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IEncode.cs @@ -67,6 +67,11 @@ namespace HandBrake.ApplicationServices.Services.Interfaces string ActivityLog { get; }
/// <summary>
+ /// Gets the log index. The current log row counter.
+ /// </summary>
+ int LogIndex { get; }
+
+ /// <summary>
/// Start with a LibHb EncodeJob Object
/// </summary>
/// <param name="job">
diff --git a/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs b/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs index 0d1998a59..33453dad8 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs @@ -254,14 +254,6 @@ namespace HandBrake.ApplicationServices.Services };
this.InvokeEncodeStatusChanged(args);
-
- if (this.WindowsSeven.IsWindowsSeven)
- {
- int percent;
- int.TryParse(Math.Round(e.FractionComplete).ToString(CultureInfo.InvariantCulture), out percent);
-
- this.WindowsSeven.SetTaskBarProgress(percent);
- }
}
/// <summary>
@@ -282,11 +274,6 @@ namespace HandBrake.ApplicationServices.Services ? new EncodeCompletedEventArgs(false, null, string.Empty)
: new EncodeCompletedEventArgs(true, null, string.Empty));
- if (this.WindowsSeven.IsWindowsSeven)
- {
- this.WindowsSeven.SetTaskBarProgressToNoProgress();
- }
-
if (this.userSettingService.GetUserSetting<bool>(ASUserSettingConstants.PreventSleep))
{
Win32.AllowSleep();
diff --git a/win/CS/HandBrake.ApplicationServices/Services/ScanService.cs b/win/CS/HandBrake.ApplicationServices/Services/ScanService.cs index cc99b916b..40329f14d 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/ScanService.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/ScanService.cs @@ -370,12 +370,14 @@ namespace HandBrake.ApplicationServices.Services /// <param name="sender">the sender</param>
/// <param name="currentTitle">the current title being scanned</param>
/// <param name="titleCount">the total number of titles</param>
- private void OnScanProgress(object sender, int currentTitle, int titleCount)
+ /// <param name="percentage">The Percentage</param>
+ private void OnScanProgress(object sender, int currentTitle, int titleCount, decimal percentage)
{
ScanProgressEventArgs eventArgs = new ScanProgressEventArgs
{
CurrentTitle = currentTitle,
- Titles = titleCount
+ Titles = titleCount,
+ Percentage = percentage
};
if (this.ScanStatusChanged != null)
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/LanguageUtilities.cs b/win/CS/HandBrake.ApplicationServices/Utilities/LanguageUtilities.cs index 93d15dda0..833c6d989 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/LanguageUtilities.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/LanguageUtilities.cs @@ -24,7 +24,7 @@ namespace HandBrake.ApplicationServices.Utilities {
IDictionary<string, string> languageMap = new Dictionary<string, string>
{
- {"Any", "und"},
+ {"(Any)", "und"},
{"Afar", "aar"},
{"Abkhazian", "abk"},
{"Afrikaans", "afr"},
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Properties/AssemblyInfo.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Properties/AssemblyInfo.cs index 3990704fe..7536fd261 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Properties/AssemblyInfo.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("HandBrake Team")]
[assembly: AssemblyProduct("HandBrake.Interop")]
-[assembly: AssemblyCopyright("Copyright © HandBrake Team 2011")]
+[assembly: AssemblyCopyright("Copyright © HandBrake Team 2013")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
diff --git a/win/CS/HandBrake.Server/Properties/AssemblyInfo.cs b/win/CS/HandBrake.Server/Properties/AssemblyInfo.cs index 872727ded..48e4f9485 100644 --- a/win/CS/HandBrake.Server/Properties/AssemblyInfo.cs +++ b/win/CS/HandBrake.Server/Properties/AssemblyInfo.cs @@ -6,11 +6,11 @@ using System.Runtime.InteropServices; // set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("HandBrake.Server")]
-[assembly: AssemblyDescription("")]
+[assembly: AssemblyDescription("An application that decouples libhb from the UI.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("HandBrake Team")]
[assembly: AssemblyProduct("HandBrake.Server")]
-[assembly: AssemblyCopyright("Copyright © 2013")]
+[assembly: AssemblyCopyright("Copyright © 2013")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
diff --git a/win/CS/HandBrakeWPF/Installer/Installer.nsi b/win/CS/HandBrakeWPF/Installer/Installer.nsi index 3110e6703..fd1b72b5b 100644 --- a/win/CS/HandBrakeWPF/Installer/Installer.nsi +++ b/win/CS/HandBrakeWPF/Installer/Installer.nsi @@ -8,8 +8,8 @@ ; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "HandBrake"
-!define PRODUCT_VERSION "0.9.8"
-!define PRODUCT_VERSION_NUMBER "0.9.8"
+!define PRODUCT_VERSION "0.9.9"
+!define PRODUCT_VERSION_NUMBER "0.9.9"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\Handbrake.exe"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
diff --git a/win/CS/HandBrakeWPF/Installer/Installer64.nsi b/win/CS/HandBrakeWPF/Installer/Installer64.nsi index 663c6fdcf..6840fb270 100644 --- a/win/CS/HandBrakeWPF/Installer/Installer64.nsi +++ b/win/CS/HandBrakeWPF/Installer/Installer64.nsi @@ -8,8 +8,8 @@ ; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "HandBrake"
-!define PRODUCT_VERSION "0.9.8"
-!define PRODUCT_VERSION_NUMBER "0.9.8"
+!define PRODUCT_VERSION "0.9.9"
+!define PRODUCT_VERSION_NUMBER "0.9.9"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\Handbrake.exe"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
diff --git a/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs b/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs index a30401a56..a202e0bbb 100644 --- a/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs +++ b/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Windows; // set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("HandBrake")]
-[assembly: AssemblyDescription("HandBrake is an open-source, GPL-licensed, multiplatform, multithreaded video transcoder.")]
+[assembly: AssemblyDescription("HandBrake is an open-source, GPL-licensed, multiplatform,video transcoder.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("HandBrake Team")]
[assembly: AssemblyProduct("HandBrake")]
@@ -56,5 +56,5 @@ using System.Windows; // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.9.8.4532")]
+[assembly: AssemblyVersion("0.9.9.5314")]
[assembly: NeutralResourcesLanguage("")]
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs.tmpl b/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs.tmpl index 8d77fdd8a..d42127e97 100644 --- a/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs.tmpl +++ b/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs.tmpl @@ -56,5 +56,5 @@ using System.Windows; // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.9.8.$WCREV$")]
+[assembly: AssemblyVersion("0.9.9.$WCREV$")]
[assembly: NeutralResourcesLanguage("")]
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs b/win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs index 8f424b65a..2dd1814ee 100644 --- a/win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs +++ b/win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs @@ -127,6 +127,17 @@ namespace HandBrakeWPF.Services }
/// <summary>
+ /// Gets the log index.
+ /// </summary>
+ public int LogIndex
+ {
+ get
+ {
+ return this.encodeService.LogIndex;
+ }
+ }
+
+ /// <summary>
/// Gets a value indicating whether IsEncoding.
/// </summary>
public bool IsEncoding
diff --git a/win/CS/HandBrakeWPF/ViewModels/EncoderOptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/EncoderOptionsViewModel.cs index e578d9688..f1da43828 100644 --- a/win/CS/HandBrakeWPF/ViewModels/EncoderOptionsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/EncoderOptionsViewModel.cs @@ -9,6 +9,8 @@ namespace HandBrakeWPF.ViewModels
{
+ using System.Collections.Generic;
+
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Parsing;
using HandBrake.Interop.Model.Encoding;
@@ -21,6 +23,11 @@ namespace HandBrakeWPF.ViewModels public class EncoderOptionsViewModel : ViewModelBase, IEncoderOptionsViewModel, ITabInterface
{
/// <summary>
+ /// The cached options.
+ /// </summary>
+ private readonly Dictionary<VideoEncoder, string> cachedOptions = new Dictionary<VideoEncoder, string>();
+
+ /// <summary>
/// Initializes a new instance of the <see cref="EncoderOptionsViewModel"/> class.
/// </summary>
public EncoderOptionsViewModel()
@@ -34,6 +41,16 @@ namespace HandBrakeWPF.ViewModels public EncodeTask Task { get; set; }
/// <summary>
+ /// Gets or sets the preset.
+ /// </summary>
+ public Preset Preset { get; set; }
+
+ /// <summary>
+ /// Gets or sets the current video encoder.
+ /// </summary>
+ public VideoEncoder CurrentVideoEncoder { get; set; }
+
+ /// <summary>
/// Gets or sets the options string.
/// </summary>
public string AdvancedOptionsString
@@ -64,6 +81,7 @@ namespace HandBrakeWPF.ViewModels public void SetSource(Title selectedTitle, Preset currentPreset, EncodeTask task)
{
this.Task = task;
+ this.Preset = currentPreset;
this.NotifyOfPropertyChange(() => this.AdvancedOptionsString);
}
@@ -79,6 +97,7 @@ namespace HandBrakeWPF.ViewModels public void SetPreset(Preset preset, EncodeTask task)
{
this.Task = task;
+ this.Preset = preset;
this.AdvancedOptionsString = preset.Task.AdvancedEncoderOptions;
}
@@ -102,6 +121,28 @@ namespace HandBrakeWPF.ViewModels /// </param>
public void SetEncoder(VideoEncoder encoder)
{
+ // Cache the existing string so it can be reused if the user changes the encoder back.
+ if (!string.IsNullOrEmpty(this.AdvancedOptionsString))
+ {
+ this.cachedOptions[CurrentVideoEncoder] = this.AdvancedOptionsString;
+ }
+
+ this.CurrentVideoEncoder = encoder;
+
+ // Set the option from the cached version if we have one.
+ string advacnedOptionsString;
+ if (cachedOptions.TryGetValue(encoder, out advacnedOptionsString)
+ && !string.IsNullOrEmpty(advacnedOptionsString))
+ {
+ this.AdvancedOptionsString = advacnedOptionsString;
+ }
+ else
+ {
+ this.AdvancedOptionsString = this.Preset != null && this.Preset.Task != null
+ && !string.IsNullOrEmpty(this.Preset.Task.AdvancedEncoderOptions)
+ ? this.Preset.Task.AdvancedEncoderOptions
+ : string.Empty;
+ }
}
/// <summary>
diff --git a/win/CS/HandBrakeWPF/ViewModels/Interfaces/ILogViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/Interfaces/ILogViewModel.cs index 6aa1020d4..6c7a7a2c8 100644 --- a/win/CS/HandBrakeWPF/ViewModels/Interfaces/ILogViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/Interfaces/ILogViewModel.cs @@ -14,5 +14,9 @@ namespace HandBrakeWPF.ViewModels.Interfaces /// </summary>
public interface ILogViewModel
{
+ /// <summary>
+ /// Gets or sets the selected tab.
+ /// </summary>
+ int SelectedTab { get; set; }
}
}
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/ViewModels/LogViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/LogViewModel.cs index 4c97ab412..ad76a56b2 100644 --- a/win/CS/HandBrakeWPF/ViewModels/LogViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/LogViewModel.cs @@ -10,7 +10,6 @@ namespace HandBrakeWPF.ViewModels
{
using System;
- using System.Collections.Generic;
using System.Diagnostics;
using System.Windows;
@@ -37,9 +36,15 @@ namespace HandBrakeWPF.ViewModels private readonly IScanServiceWrapper scanService;
/// <summary>
- /// Backing field for the selected mode
+ /// The selected tab.
/// </summary>
- private int selectedMode;
+ private int selectedTab;
+
+ /// <summary>
+ /// The encode log index.
+ /// </summary>
+ private int encodeLogIndex;
+
#endregion
/// <summary>
@@ -56,46 +61,44 @@ namespace HandBrakeWPF.ViewModels this.encodeService = encodeService;
this.scanService = scanService;
this.Title = "Log Viewer";
-
- this.SelectedMode = this.encodeService.IsEncoding ? 0 : 1;
+ this.encodeLogIndex = 0;
}
/// <summary>
- /// Gets Log.
+ /// Gets or sets the selected tab.
/// </summary>
- public string Log
+ public int SelectedTab
{
get
{
- return this.SelectedMode == 0 ? this.encodeService.ActivityLog : this.scanService.ActivityLog;
+ return this.selectedTab;
+ }
+ set
+ {
+ this.selectedTab = value;
+ this.NotifyOfPropertyChange(() => this.SelectedTab);
}
}
/// <summary>
- /// Gets LogModes.
+ /// Gets Log.
/// </summary>
- public IEnumerable<string> LogModes
+ public string ScanLog
{
get
{
- return new List<string> { "Encode Log", "Scan Log" };
+ return this.scanService.ActivityLog;
}
}
/// <summary>
- /// Gets or sets SelectedMode.
+ /// Gets the encodelog.
/// </summary>
- public int SelectedMode
+ public string EncodeLog
{
get
{
- return selectedMode;
- }
- set
- {
- selectedMode = value;
- this.NotifyOfPropertyChange(() => this.SelectedMode);
- this.ChangeLogDisplay();
+ return this.encodeService.ActivityLog;
}
}
@@ -115,7 +118,7 @@ namespace HandBrakeWPF.ViewModels /// </summary>
public void CopyLog()
{
- Clipboard.SetDataObject(this.Log, true);
+ Clipboard.SetDataObject(this.SelectedTab == 1 ? this.ScanLog : this.EncodeLog, true);
}
/// <summary>
@@ -123,13 +126,16 @@ namespace HandBrakeWPF.ViewModels /// </summary>
protected override void OnActivate()
{
- this.scanService.ScanStared += ScanServiceScanStared;
this.scanService.ScanCompleted += ScanServiceScanCompleted;
- this.encodeService.EncodeStarted += EncodeServiceEncodeStarted;
this.encodeService.EncodeCompleted += EncodeServiceEncodeCompleted;
this.encodeService.EncodeStatusChanged += this.EncodeServiceEncodeStatusChanged;
this.scanService.ScanStatusChanged += this.ScanServiceScanStatusChanged;
+ this.scanService.ScanStared += this.scanService_ScanStared;
+ this.encodeService.EncodeStarted += this.encodeService_EncodeStarted;
base.OnActivate();
+
+ this.NotifyOfPropertyChange(() => this.ScanLog);
+ this.NotifyOfPropertyChange(() => this.EncodeLog);
}
/// <summary>
@@ -143,7 +149,7 @@ namespace HandBrakeWPF.ViewModels /// </param>
private void ScanServiceScanStatusChanged(object sender, ScanProgressEventArgs e)
{
- this.NotifyOfPropertyChange(() => this.Log);
+ this.NotifyOfPropertyChange(() => this.ScanLog);
}
/// <summary>
@@ -157,7 +163,12 @@ namespace HandBrakeWPF.ViewModels /// </param>
private void EncodeServiceEncodeStatusChanged(object sender, EncodeProgressEventArgs e)
{
- this.NotifyOfPropertyChange(() => this.Log);
+ if (encodeLogIndex != this.encodeService.LogIndex || this.encodeService.LogIndex == -1)
+ {
+ this.NotifyOfPropertyChange(() => this.EncodeLog);
+ }
+
+ encodeLogIndex = this.encodeService.LogIndex;
}
/// <summary>
@@ -168,26 +179,18 @@ namespace HandBrakeWPF.ViewModels /// </param>
protected override void OnDeactivate(bool close)
{
- this.scanService.ScanStared -= ScanServiceScanStared;
this.scanService.ScanCompleted -= ScanServiceScanCompleted;
- this.encodeService.EncodeStarted -= EncodeServiceEncodeStarted;
this.encodeService.EncodeCompleted -= EncodeServiceEncodeCompleted;
this.encodeService.EncodeStatusChanged -= this.EncodeServiceEncodeStatusChanged;
this.scanService.ScanStatusChanged -= this.ScanServiceScanStatusChanged;
+ this.scanService.ScanStared -= this.scanService_ScanStared;
+ this.encodeService.EncodeStarted -= this.encodeService_EncodeStarted;
base.OnDeactivate(close);
}
/// <summary>
- /// Change the Log Display
- /// </summary>
- private void ChangeLogDisplay()
- {
- this.NotifyOfPropertyChange(() => this.Log);
- }
-
- /// <summary>
- /// Encode Started Event Handler
+ /// Scan Completed Event Handler.
/// </summary>
/// <param name="sender">
/// The sender.
@@ -195,13 +198,13 @@ namespace HandBrakeWPF.ViewModels /// <param name="e">
/// The e.
/// </param>
- private void EncodeServiceEncodeStarted(object sender, EventArgs e)
+ private void ScanServiceScanCompleted(object sender, ScanCompletedEventArgs e)
{
- this.SelectedMode = 0;
+ this.NotifyOfPropertyChange(() => this.ScanLog);
}
/// <summary>
- /// Scan Started Event Handler
+ /// Encode Completed Event Handler.
/// </summary>
/// <param name="sender">
/// The sender.
@@ -209,13 +212,13 @@ namespace HandBrakeWPF.ViewModels /// <param name="e">
/// The e.
/// </param>
- private void ScanServiceScanStared(object sender, EventArgs e)
+ private void EncodeServiceEncodeCompleted(object sender, EncodeCompletedEventArgs e)
{
- this.SelectedMode = 1;
+ this.NotifyOfPropertyChange(() => this.EncodeLog);
}
/// <summary>
- /// Scan Completed Event Handler.
+ /// The encode service encode started.
/// </summary>
/// <param name="sender">
/// The sender.
@@ -223,13 +226,13 @@ namespace HandBrakeWPF.ViewModels /// <param name="e">
/// The e.
/// </param>
- private void ScanServiceScanCompleted(object sender, ScanCompletedEventArgs e)
+ private void encodeService_EncodeStarted(object sender, EventArgs e)
{
- this.NotifyOfPropertyChange(() => this.Log);
+ this.SelectedTab = 0;
}
/// <summary>
- /// Encode Completed Event Handler.
+ /// The scan service scan stared.
/// </summary>
/// <param name="sender">
/// The sender.
@@ -237,9 +240,9 @@ namespace HandBrakeWPF.ViewModels /// <param name="e">
/// The e.
/// </param>
- private void EncodeServiceEncodeCompleted(object sender, EncodeCompletedEventArgs e)
+ private void scanService_ScanStared(object sender, EventArgs e)
{
- this.NotifyOfPropertyChange(() => this.Log);
+ this.SelectedTab = 1;
}
}
}
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 4875fd6bf..04d466062 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -95,6 +95,11 @@ namespace HandBrakeWPF.ViewModels private readonly IEncodeServiceWrapper encodeService;
/// <summary>
+ /// Windows 7 API Pack wrapper
+ /// </summary>
+ private readonly Win7 windowsSeven = new Win7();
+
+ /// <summary>
/// HandBrakes Main Window Title
/// </summary>
private string windowName;
@@ -173,6 +178,11 @@ namespace HandBrakeWPF.ViewModels /// The Source Menu Backing Field
/// </summary>
private IEnumerable<SourceMenuItem> sourceMenu;
+
+ /// <summary>
+ /// The last percentage complete value.
+ /// </summary>
+ private int lastEncodePercentage;
#endregion
/// <summary>
@@ -1002,11 +1012,15 @@ namespace HandBrakeWPF.ViewModels if (window != null)
{
+ ILogViewModel logvm = (ILogViewModel)window.DataContext;
+ logvm.SelectedTab = this.IsEncoding ? 0 : 1;
window.Activate();
}
else
{
- this.WindowManager.ShowWindow(IoC.Get<ILogViewModel>());
+ ILogViewModel logvm = IoC.Get<ILogViewModel>();
+ logvm.SelectedTab = this.IsEncoding ? 0 : 1;
+ this.WindowManager.ShowWindow(logvm);
}
}
@@ -1749,8 +1763,8 @@ namespace HandBrakeWPF.ViewModels /// </param>
private void ScanStatusChanged(object sender, HandBrake.ApplicationServices.EventArgs.ScanProgressEventArgs e)
{
- this.SourceLabel = "Scanning Title " + e.CurrentTitle + " of " + e.Titles;
- this.StatusLabel = "Scanning Title " + e.CurrentTitle + " of " + e.Titles;
+ this.SourceLabel = string.Format("Scanning Title {0} of {1} ({2}%)", e.CurrentTitle, e.Titles, e.Percentage);
+ this.StatusLabel = string.Format("Scanning Title {0} of {1} ({2}%)", e.CurrentTitle, e.Titles, e.Percentage);
}
/// <summary>
@@ -1847,6 +1861,12 @@ namespace HandBrakeWPF.ViewModels /// </param>
private void EncodeStatusChanged(object sender, HandBrake.ApplicationServices.EventArgs.EncodeProgressEventArgs e)
{
+ int percent;
+ int.TryParse(
+ Math.Round(e.PercentComplete).ToString(CultureInfo.InvariantCulture),
+ out percent);
+
+
Execute.OnUIThread(
() =>
{
@@ -1861,6 +1881,13 @@ namespace HandBrakeWPF.ViewModels e.EstimatedTimeLeft,
e.ElapsedTime,
this.queueProcessor.Count);
+
+ if (lastEncodePercentage != percent && this.windowsSeven.IsWindowsSeven)
+ {
+ this.windowsSeven.SetTaskBarProgress(percent);
+ }
+
+ lastEncodePercentage = percent;
}
});
}
@@ -1902,6 +1929,11 @@ namespace HandBrakeWPF.ViewModels {
this.ProgramStatusLabel = "Queue Finished";
this.IsEncoding = false;
+
+ if (this.windowsSeven.IsWindowsSeven)
+ {
+ this.windowsSeven.SetTaskBarProgressToNoProgress();
+ }
});
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs index b611e14d6..4f2bc251b 100644 --- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs @@ -1536,7 +1536,7 @@ namespace HandBrakeWPF.ViewModels this.preferredLanguages.Add(item);
// In the available languages should be no "Any" and no selected language.
- if ((item != "Any") && (!this.userSettingService.GetUserSetting<StringCollection>(UserSettingConstants.SelectedLanguages).Contains(item)))
+ if ((item != "(Any)") && (!this.userSettingService.GetUserSetting<StringCollection>(UserSettingConstants.SelectedLanguages).Contains(item)))
{
this.availableLanguages.Add(item);
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs index 4f344db08..79532b9ee 100644 --- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs @@ -101,7 +101,7 @@ namespace HandBrakeWPF.ViewModels this.errorService = errorService;
this.Title = "Queue";
this.JobsPending = "No encodes pending";
- this.JobStatus = "There are no jobs currently encoding";
+ this.JobStatus = "There are no jobs currently encoding";
}
#endregion
@@ -263,9 +263,9 @@ namespace HandBrakeWPF.ViewModels {
MessageBoxResult result =
this.errorService.ShowMessageBox(
- "This encode is currently in progress. If you delete it, the encode will be stoped. Are you sure you wish to proceed?",
- "Warning",
- MessageBoxButton.YesNo,
+ "This encode is currently in progress. If you delete it, the encode will be stoped. Are you sure you wish to proceed?",
+ "Warning",
+ MessageBoxButton.YesNo,
MessageBoxImage.Question);
if (result == MessageBoxResult.Yes)
@@ -330,7 +330,7 @@ namespace HandBrakeWPF.ViewModels /// </summary>
public void Import()
{
- VistaOpenFileDialog dialog = new VistaOpenFileDialog { Filter = "HandBrake Queue Files (*.hbq)|*.hbq", CheckFileExists = true };
+ VistaOpenFileDialog dialog = new VistaOpenFileDialog { Filter = "HandBrake Queue Files (*.hbq)|*.hbq", CheckFileExists = true };
dialog.ShowDialog();
this.queueProcessor.RestoreQueue(dialog.FileName);
@@ -374,7 +374,7 @@ namespace HandBrakeWPF.ViewModels {
this.Load();
- this.WhenDoneAction = this.userSettingService.GetUserSetting<string>(ASUserSettingConstants.WhenCompleteAction);
+ this.WhenDoneAction = this.userSettingService.GetUserSetting<string>(ASUserSettingConstants.WhenCompleteAction);
this.queueProcessor.JobProcessingStarted += this.queueProcessor_JobProcessingStarted;
this.queueProcessor.QueueCompleted += this.queueProcessor_QueueCompleted;
@@ -414,19 +414,23 @@ namespace HandBrakeWPF.ViewModels private void EncodeService_EncodeStatusChanged(
object sender, EncodeProgressEventArgs e)
{
- if (this.IsEncoding)
+ Caliburn.Micro.Execute.OnUIThread(() =>
{
- this.JobStatus =
- string.Format(
- "Encoding: Pass {0} of {1}, {2:00.00}%, FPS: {3:000.0}, Avg FPS: {4:000.0}, Time Remaining: {5}, Elapsed: {6:hh\\:mm\\:ss}",
- e.Task,
- e.TaskCount,
- e.PercentComplete,
- e.CurrentFrameRate,
- e.AverageFrameRate,
- e.EstimatedTimeLeft,
- e.ElapsedTime);
- }
+ if (this.IsEncoding)
+ {
+ this.JobStatus =
+ string.Format(
+ "Encoding: Pass {0} of {1}, {2:00.00}%, FPS: {3:000.0}, Avg FPS: {4:000.0}, Time Remaining: {5}, Elapsed: {6:hh\\:mm\\:ss}",
+ e.Task,
+ e.TaskCount,
+ e.PercentComplete,
+ e.CurrentFrameRate,
+ e.AverageFrameRate,
+ e.EstimatedTimeLeft,
+ e.ElapsedTime);
+ }
+
+ });
}
/// <summary>
diff --git a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs index 3fcca18aa..9149fde39 100644 --- a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs @@ -14,12 +14,9 @@ namespace HandBrakeWPF.ViewModels using System.IO;
using System.Linq;
- using Caliburn.Micro;
-
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Model.Encoding;
using HandBrake.ApplicationServices.Parsing;
- using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrake.ApplicationServices.Utilities;
using HandBrakeWPF.Commands;
@@ -52,13 +49,7 @@ namespace HandBrakeWPF.ViewModels /// <summary>
/// Initializes a new instance of the <see cref="HandBrakeWPF.ViewModels.SubtitlesViewModel"/> class.
/// </summary>
- /// <param name="windowManager">
- /// The window manager.
- /// </param>
- /// <param name="userSettingService">
- /// The user Setting Service.
- /// </param>
- public SubtitlesViewModel(IWindowManager windowManager, IUserSettingService userSettingService)
+ public SubtitlesViewModel()
{
this.Task = new EncodeTask();
diff --git a/win/CS/HandBrakeWPF/Views/ChaptersView.xaml b/win/CS/HandBrakeWPF/Views/ChaptersView.xaml index a5fa6a6da..0895579f5 100644 --- a/win/CS/HandBrakeWPF/Views/ChaptersView.xaml +++ b/win/CS/HandBrakeWPF/Views/ChaptersView.xaml @@ -29,6 +29,11 @@ VerticalAlignment="Stretch" HorizontalAlignment="Stretch" AutoGenerateColumns="False"
CanUserSortColumns="False" CanUserReorderColumns="False" CanUserResizeColumns="False" CanUserResizeRows="False"
CanUserAddRows="False" CanUserDeleteRows="False">
+ <DataGrid.CellStyle>
+ <Style TargetType="DataGridCell">
+ <Setter Property="MinHeight" Value="22" />
+ </Style>
+ </DataGrid.CellStyle>
<DataGrid.ContextMenu>
<ContextMenu>
<MenuItem Header="Import Names" cal:Message.Attach="[Event Click] = [Action Import]" />
diff --git a/win/CS/HandBrakeWPF/Views/LogView.xaml b/win/CS/HandBrakeWPF/Views/LogView.xaml index cb6687251..f8b2c9327 100644 --- a/win/CS/HandBrakeWPF/Views/LogView.xaml +++ b/win/CS/HandBrakeWPF/Views/LogView.xaml @@ -20,21 +20,7 @@ ToolBarTray.IsLocked="True"
Loaded="ToolBarLoaded"
>
-
-
- <TextBlock Margin="10,0,10,0"
- VerticalAlignment="Center"
- FontWeight="Bold"
- Text="Choose Log:" />
- <ComboBox Width="120
- " Margin="0,0,10,0" Background="LightSteelBlue" Height="22" FontWeight="Black"
- HorizontalAlignment="Right" VerticalAlignment="Center"
- ItemsSource="{Binding LogModes}"
- SelectedIndex="{Binding SelectedMode}"
- />
-
- <Separator />
-
+
<Button cal:Message.Attach="[Event Click] = [Action CopyLog]" Margin="10,0,0,0">
<StackPanel Orientation="Horizontal">
<Image Width="16" Source="Images/copy.png" />
@@ -50,13 +36,26 @@ </ToolBar>
- <TextBox Grid.Row="1"
+ <TabControl Grid.Row="1" SelectedIndex="{Binding SelectedTab}">
+ <TabItem Header="Encode Log">
+ <TextBox Grid.Row="1"
AcceptsReturn="True"
IsReadOnly="True"
ScrollViewer.VerticalScrollBarVisibility="Visible"
- Text="{Binding Log,
- Mode=OneWay}"
+ Text="{Binding EncodeLog, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
TextWrapping="Wrap" />
+ </TabItem>
+
+ <TabItem Header="Scan Log">
+ <TextBox Grid.Row="1"
+ AcceptsReturn="True"
+ IsReadOnly="True"
+ ScrollViewer.VerticalScrollBarVisibility="Visible"
+ Text="{Binding ScanLog, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
+ TextWrapping="Wrap" />
+ </TabItem>
+
+ </TabControl>
</Grid>
</Grid>
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml index 1a020b603..2ffd46574 100644 --- a/win/CS/HandBrakeWPF/Views/MainView.xaml +++ b/win/CS/HandBrakeWPF/Views/MainView.xaml @@ -28,6 +28,7 @@ <Setter Property="Padding" Value="5,1" />
<Setter Property="FontSize" Value="11.5" />
<Setter Property="VerticalAlignment" Value="Center" />
+ <Setter Property="MinHeight" Value="22" />
</Style>
<Style x:Key="textBlockOrangeStyle" TargetType="TextBlock">
diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml b/win/CS/HandBrakeWPF/Views/OptionsView.xaml index 83735e414..0394adbff 100644 --- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml +++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml @@ -12,6 +12,7 @@ <Setter Property="Padding" Value="5,1" />
<Setter Property="FontSize" Value="11.5" />
<Setter Property="VerticalAlignment" Value="Center" />
+ <Setter Property="MinHeight" Value="22" />
</Style>
<Style TargetType="TextBlock">
@@ -20,6 +21,7 @@ <Style TargetType="TextBox">
<Setter Property="Padding" Value="5,2" />
+ <Setter Property="MinHeight" Value="22" />
</Style>
<Style TargetType="CheckBox">
@@ -154,7 +156,7 @@ </StackPanel>
<TextBlock Text="Available Options: {source_path} or {source_folder_name} (Not Both)" />
- <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
+ <StackPanel Orientation="Horizontal" Margin="0,15,0,0">
<TextBlock VerticalAlignment="Center" Text="Format:" />
<TextBox Name="autoNameFormat" Text="{Binding AutonameFormat}" Width="180" ToolTip=" {Source} = Source Name, {Title} = Title Number, {Chapters} = Selected Chapters, {Date} = Todays Date," />
</StackPanel>
diff --git a/win/CS/HandBrakeWPF/Views/ShellView.xaml b/win/CS/HandBrakeWPF/Views/ShellView.xaml index 9bfee4bc1..bfc65c035 100644 --- a/win/CS/HandBrakeWPF/Views/ShellView.xaml +++ b/win/CS/HandBrakeWPF/Views/ShellView.xaml @@ -4,7 +4,7 @@ xmlns:Data="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
xmlns:Converters="clr-namespace:HandBrakeWPF.Converters" Title="{Data:Binding Path=WindowTitle}"
Width="1015"
- Height="670"
+ Height="680"
MinWidth="1015"
MinHeight="670"
AllowDrop="True"
diff --git a/win/CS/HandBrakeWPF/Views/Styles/Styles.xaml b/win/CS/HandBrakeWPF/Views/Styles/Styles.xaml index 9c3f001c8..407666234 100644 --- a/win/CS/HandBrakeWPF/Views/Styles/Styles.xaml +++ b/win/CS/HandBrakeWPF/Views/Styles/Styles.xaml @@ -16,7 +16,7 @@ </Style>
<Style TargetType="{x:Type ComboBox}">
- <Setter Property="Height" Value="22"/>
+ <Setter Property="MinHeight" Value="22"/>
<Setter Property="Margin" Value="0,2,0,2" />
</Style>
@@ -25,7 +25,7 @@ </Style>
<Style TargetType="{x:Type Button}">
- <Setter Property="Height" Value="22"/>
+ <Setter Property="MinHeight" Value="22"/>
</Style>
<Style TargetType="{x:Type RadioButton}">
diff --git a/win/CS/HandBrakeWPF/defaultsettings.xml b/win/CS/HandBrakeWPF/defaultsettings.xml index 48576180a..0b10fc645 100644 --- a/win/CS/HandBrakeWPF/defaultsettings.xml +++ b/win/CS/HandBrakeWPF/defaultsettings.xml @@ -229,7 +229,7 @@ <string>daysBetweenUpdateCheck</string>
</key>
<value>
- <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:int" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">7</anyType>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:int" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">30</anyType>
</value>
</item>
<item>
@@ -253,7 +253,7 @@ <string>NativeLanguage</string>
</key>
<value>
- <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">Any</anyType>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">(Any)</anyType>
</value>
</item>
<item>
@@ -261,7 +261,7 @@ <string>NativeLanguageSubtitles</string>
</key>
<value>
- <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">Any</anyType>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">(Any)</anyType>
</value>
</item>
<item>
|