]> granicus.if.org Git - handbrake/commitdiff
WinGui: Fix an issue with the x264 CQ Granulairty on certain cultures. Change the...
authorsr55 <sr55.hb@outlook.com>
Thu, 31 May 2012 00:50:26 +0000 (00:50 +0000)
committersr55 <sr55.hb@outlook.com>
Thu, 31 May 2012 00:50:26 +0000 (00:50 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4709 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
win/CS/HandBrakeWPF/Views/MainView.xaml

index 548523eee32abc3b7400bc8145e4ac2c35f872bf..df13c1482462e79ba532dee36bf90ad43ce9fcc6 100644 (file)
@@ -589,6 +589,22 @@ namespace HandBrakeWPF.ViewModels
 \r
         #region Properties for Settings\r
 \r
+        /// <summary>\r
+        /// Gets or sets Destination.\r
+        /// </summary>\r
+        public string Destination\r
+        {\r
+            get\r
+            {\r
+                return this.CurrentTask.Destination;\r
+            }\r
+            set\r
+            {\r
+                this.CurrentTask.Destination = value;\r
+                this.NotifyOfPropertyChange(() => this.Destination);\r
+            }\r
+        }\r
+\r
         /// <summary>\r
         /// Gets or sets SelectedTitle.\r
         /// </summary>\r
@@ -624,7 +640,7 @@ namespace HandBrakeWPF.ViewModels
 \r
                     if (this.UserSettingService.GetUserSetting<bool>(UserSettingConstants.AutoNaming))\r
                     {\r
-                        this.CurrentTask.Destination = AutoNameHelper.AutoName(this.CurrentTask, this.SourceName);\r
+                        this.Destination = AutoNameHelper.AutoName(this.CurrentTask, this.SourceName);\r
                     }\r
                     this.NotifyOfPropertyChange(() => this.CurrentTask);\r
 \r
@@ -666,6 +682,11 @@ namespace HandBrakeWPF.ViewModels
                 this.CurrentTask.StartPoint = value;\r
                 this.NotifyOfPropertyChange(() => this.SelectedStartPoint);\r
                 this.Duration = this.DurationCalculation();\r
+\r
+                if (this.UserSettingService.GetUserSetting<bool>(UserSettingConstants.AutoNaming))\r
+                {\r
+                    this.Destination = AutoNameHelper.AutoName(this.CurrentTask, this.SourceName);\r
+                }\r
             }\r
         }\r
 \r
@@ -683,6 +704,11 @@ namespace HandBrakeWPF.ViewModels
                 this.CurrentTask.EndPoint = value;\r
                 this.NotifyOfPropertyChange(() => this.SelectedEndPoint);\r
                 this.Duration = this.DurationCalculation();\r
+\r
+                if (this.UserSettingService.GetUserSetting<bool>(UserSettingConstants.AutoNaming))\r
+                {\r
+                    this.Destination = AutoNameHelper.AutoName(this.CurrentTask, this.SourceName);\r
+                }\r
             }\r
         }\r
 \r
@@ -988,7 +1014,7 @@ namespace HandBrakeWPF.ViewModels
                 return;\r
             }\r
 \r
-            if (string.IsNullOrEmpty(this.CurrentTask.Destination))\r
+            if (string.IsNullOrEmpty(this.Destination))\r
             {\r
                 this.errorService.ShowMessageBox("The Destination field was empty.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);\r
                 return;\r
@@ -1000,7 +1026,7 @@ namespace HandBrakeWPF.ViewModels
                 return;\r
             }\r
 \r
-            if (File.Exists(this.CurrentTask.Destination))\r
+            if (File.Exists(this.Destination))\r
             {\r
                 MessageBoxResult result = this.errorService.ShowMessageBox("The current file already exists, do you wish to overwrite it?", "Question", MessageBoxButton.YesNo, MessageBoxImage.Question);\r
                 if (result == MessageBoxResult.No)\r
@@ -1110,7 +1136,7 @@ namespace HandBrakeWPF.ViewModels
                         break;\r
                 }\r
 \r
-                this.CurrentTask.Destination = dialog.FileName;\r
+                this.Destination = dialog.FileName;\r
                 this.NotifyOfPropertyChange(() => this.CurrentTask);\r
             } \r
         }\r
@@ -1312,7 +1338,7 @@ namespace HandBrakeWPF.ViewModels
             // Update The browse file extension display\r
             if (Path.HasExtension(newExtension))\r
             {\r
-                this.CurrentTask.Destination = Path.ChangeExtension(this.CurrentTask.Destination, newExtension);\r
+                this.Destination = Path.ChangeExtension(this.Destination, newExtension);\r
             }\r
 \r
             // Update the UI Display\r
index 6f9500e0d36c53861039ed21fc11b046624af002..47189db9b9963c0b654056f211d6afbf50c896db 100644 (file)
@@ -1678,7 +1678,7 @@ namespace HandBrakeWPF.ViewModels
             userSettingService.SetUserSetting(ASUserSettingConstants.ShowCLI, this.ShowCliWindow);\r
             userSettingService.SetUserSetting(ASUserSettingConstants.ClearCompletedFromQueue, this.ClearQueueOnEncodeCompleted);\r
             userSettingService.SetUserSetting(ASUserSettingConstants.PreviewScanCount, this.SelectedPreviewCount);\r
-            userSettingService.SetUserSetting(ASUserSettingConstants.X264Step, double.Parse(this.SelectedGranulairty));\r
+            userSettingService.SetUserSetting(ASUserSettingConstants.X264Step, double.Parse(this.SelectedGranulairty, CultureInfo.InvariantCulture));\r
 \r
             int value;\r
             if (int.TryParse(this.MinLength.ToString(), out value))\r
index 4b68d6b3e5fbdb629964c3266e155240498668f3..0b8347c0b0a9077b76970bc7add0f155c1d1cad0 100644 (file)
                     <Label Content="Destination" FontWeight="Bold" />\r
                     <StackPanel Orientation="Horizontal">\r
                         <Label Content="File" Margin="8,0,0,0" />\r
-                        <TextBox Name="Destination" Margin="8,0,0,0" Width="600" Text="{Binding CurrentTask.Destination, UpdateSourceTrigger=PropertyChanged}" />\r
+                        <TextBox Name="Destination" Margin="8,0,0,0" Width="600" Text="{Binding Destination, UpdateSourceTrigger=PropertyChanged}" />\r
                         <Button Name="DestinationBrowser" Margin="8,0,0,0" Content="Browse" Micro:Message.Attach="[Event Click] = [Action BrowseDestination]" />\r
                     </StackPanel>\r
                 </StackPanel>\r