]> granicus.if.org Git - handbrake/commitdiff
WinGui: Range of bug fixes and UI tweaks.
authorsr55 <sr55.hb@outlook.com>
Sun, 20 May 2012 15:39:03 +0000 (15:39 +0000)
committersr55 <sr55.hb@outlook.com>
Sun, 20 May 2012 15:39:03 +0000 (15:39 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4691 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs
win/CS/HandBrake.ApplicationServices/Services/PresetService.cs
win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs
win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
win/CS/HandBrakeWPF/Views/SubtitlesView.xaml
win/CS/HandBrakeWPF/Views/VideoView.xaml
win/CS/HandBrakeWPF/Views/VideoView.xaml.cs

index 24161a27beb6fa13ccea71265cf0e7152eb8b463..f2d5828f502360b2379c401244b519f6bc62c3ce 100644 (file)
@@ -33,6 +33,7 @@ namespace HandBrake.ApplicationServices.Model
             this.x264Preset = x264Preset.None;\r
             this.x264Profile = x264Profile.None;\r
             this.X264Tune = x264Tune.None;\r
+            this.Modulus = 16;\r
         }\r
 \r
         /// <summary>\r
index f22f84596158924dd6ad7688816f7984e4c05b73..68bf8048196898fb98c1addd411730907245db6b 100644 (file)
@@ -218,7 +218,6 @@ namespace HandBrake.ApplicationServices.Services
             this.UpdatePresetFiles();\r
         }\r
 \r
-\r
         /// <summary>\r
         /// Get a Preset\r
         /// </summary>\r
@@ -256,9 +255,6 @@ namespace HandBrake.ApplicationServices.Services
         /// <summary>\r
         /// Reads the CLI's CLI output format and load's them into the preset List Preset\r
         /// </summary>\r
-        /// <param name="cliPath">\r
-        /// The Path to the CLI, leave blank for current folder.\r
-        /// </param>\r
         public void UpdateBuiltInPresets()\r
         {\r
             // Create a new tempory file and execute the CLI to get the built in Presets.\r
@@ -312,6 +308,7 @@ namespace HandBrake.ApplicationServices.Services
                                     CropSettings = pic,\r
                                     Description = string.Empty, // Maybe one day we will populate this.\r
                                     IsBuildIn = true,\r
+                                    UsePictureFilters = true,\r
                                     Task = QueryParserUtility.Parse(presetName[2])\r
                                 };\r
 \r
index a6f29357f1f9cb1d6238da00077ac5f9517a1efb..0403fa8814b12a4045c6061104e0cd9ff8ffa4e3 100644 (file)
@@ -58,7 +58,12 @@ namespace HandBrakeWPF.Converters.Video
                 return EnumHelper<VideoEncoder>.GetEnumDisplayValuesSubset(encoders);\r
             }\r
 \r
-            return EnumHelper<VideoEncoder>.GetDisplay((VideoEncoder)values[0]);\r
+            if (values[0].GetType() == typeof(VideoEncoder))\r
+            {\r
+                return EnumHelper<VideoEncoder>.GetDisplay((VideoEncoder)values[0]);\r
+            }\r
+\r
+            return null;\r
         }\r
 \r
         /// <summary>\r
index e3fddb8279c839da4072d345d84d5e2ea7e96499..cbed5a1bce5e2830aeb5427a259ac6548946e4b9 100644 (file)
@@ -494,7 +494,7 @@ namespace HandBrakeWPF.ViewModels
                 this.Height = preset.Task.Height ?? (sourceResolution.Height - this.CropTop - this.CropBottom);\r
             }\r
 \r
-            if (this.Task.Anamorphic == Anamorphic.Custom)\r
+            if (preset.Task.Anamorphic == Anamorphic.Custom)\r
             {\r
                 this.DisplayWidth = preset.Task.DisplayWidth != null ? int.Parse(preset.Task.DisplayWidth.ToString()) : 0;\r
                 this.ParWidth = preset.Task.PixelAspectX;\r
@@ -503,7 +503,7 @@ namespace HandBrakeWPF.ViewModels
 \r
             this.MaintainAspectRatio = preset.Task.KeepDisplayAspect;\r
 \r
-            if (this.Task.Modulus.HasValue)\r
+            if (preset.Task.Modulus.HasValue)\r
             {\r
                 this.SelectedModulus = preset.Task.Modulus;\r
             }\r
index b5344788d4f545478d1fe0d8354231fe17ba7cb9..e6e6c8c01e361b44f4e8df8fc758769663443472 100644 (file)
@@ -69,11 +69,9 @@ namespace HandBrakeWPF.ViewModels
         /// The window manager.\r
         /// </param>\r
         /// <param name="queueProcessor">\r
-        /// \r
         /// The Queue Processor Service \r
         /// </param>\r
         /// <param name="errorService">\r
-        /// \r
         /// The Error Service \r
         /// </param>\r
         public QueueViewModel(IWindowManager windowManager, IQueueProcessor queueProcessor, IErrorService errorService)\r
@@ -331,7 +329,7 @@ namespace HandBrakeWPF.ViewModels
         /// </param>\r
         private void QueueManager_QueueChanged(object sender, EventArgs e)\r
         {\r
-            // TODO\r
+            this.JobsPending = string.Format("{0} jobs pending", this.queueProcessor.QueueManager.Count);\r
         }\r
 \r
         /// <summary>\r
index 99097a0b088c94429492b3e7efa0bb4253c77cfb..ae87c95b1de03439d6b2cb37c2b257bba0c3cd26 100644 (file)
@@ -27,7 +27,7 @@
                 <ColumnDefinition Width="Auto" />\r
             </Grid.ColumnDefinitions>\r
             <Button Content="Add" Name="AddTrack" Grid.Column="0" Width="75" Margin="0,0,10,0" cal:Message.Attach="[Event Click] = [Action Add]" />\r
-            <Button Content="Import SRT" Grid.Column="2" Width="75" cal:Message.Attach="[Event Click] = [Action Import]" />\r
+            <Button Content="Import SRT" Grid.Column="2" Width="85" cal:Message.Attach="[Event Click] = [Action Import]" />\r
         </Grid>\r
 \r
         <ListBox Grid.Row="2" ItemsSource="{Binding Task.SubtitleTracks}" \r
index b49ae924ba817212ac0d4ae9861b36f580eec01c..153c36fec3becf682e04f1fdce1aa639aed0b874 100644 (file)
@@ -53,7 +53,7 @@
                     <TextBlock Text="Franerate (FPS):" Width="100"/>\r
                     <StackPanel Orientation="Vertical">\r
                         <ComboBox Width="120" ItemsSource="{Binding Framerates}" SelectedItem="{Binding SelectedFramerate}" />\r
-                        <RadioButton Content="Constant Framerate" IsChecked="{Binding IsConstantFramerate}" />\r
+                        <RadioButton Content="Constant Framerate" IsChecked="{Binding IsConstantFramerate}" Margin="0,10,0,0" />\r
                         <RadioButton Content="Variable Framerate" IsChecked="{Binding IsVariableFramerate}" Visibility="{Binding ShowPeakFramerate, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}" />\r
                         <RadioButton Content="Peak Framerate" IsChecked="{Binding IsPeakFramerate}" Visibility="{Binding ShowPeakFramerate, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}" />\r
                     </StackPanel>\r
index f59435f02fce28c0468a34ffd3935c9dc0dde087..8a0842a96bdc0304e17d651906fa379912404db8 100644 (file)
@@ -1,24 +1,24 @@
-using System;\r
-using System.Collections.Generic;\r
-using System.Linq;\r
-using System.Text;\r
-using System.Windows;\r
-using System.Windows.Controls;\r
-using System.Windows.Data;\r
-using System.Windows.Documents;\r
-using System.Windows.Input;\r
-using System.Windows.Media;\r
-using System.Windows.Media.Imaging;\r
-using System.Windows.Navigation;\r
-using System.Windows.Shapes;\r
+// --------------------------------------------------------------------------------------------------------------------\r
+// <copyright file="VideoView.xaml.cs" company="HandBrake Project (http://handbrake.fr)">\r
+//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
+// </copyright>\r
+// <summary>\r
+//   Interaction logic for VideoView.xaml\r
+// </summary>\r
+// --------------------------------------------------------------------------------------------------------------------\r
 \r
 namespace HandBrakeWPF.Views\r
 {\r
+    using System.Windows.Controls;\r
+\r
     /// <summary>\r
     /// Interaction logic for VideoView.xaml\r
     /// </summary>\r
     public partial class VideoView : UserControl\r
     {\r
+        /// <summary>\r
+        /// Initializes a new instance of the <see cref="VideoView"/> class.\r
+        /// </summary>\r
         public VideoView()\r
         {\r
             InitializeComponent();\r