WinGui: Some minor UI Improvements. Including Waiting Queue Count on the "Show Queue...
authorsr55 <sr55.hb@outlook.com>
Wed, 22 Apr 2015 19:48:04 +0000 (19:48 +0000)
committersr55 <sr55.hb@outlook.com>
Wed, 22 Apr 2015 19:48:04 +0000 (19:48 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7117 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/HandBrakeWPF/Controls/AlertPanel.xaml
win/CS/HandBrakeWPF/Controls/SourceSelection.xaml
win/CS/HandBrakeWPF/Controls/StatusPanel.xaml
win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
win/CS/HandBrakeWPF/Properties/Resources.resx
win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs
win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
win/CS/HandBrakeWPF/Views/MainView.xaml

index 5e8b756eee511653738aab407c0693018b945136..06cbdfe3dcda626aaf3676a20669415c48af5654 100644 (file)
@@ -14,7 +14,7 @@
             <RowDefinition Height="*" />\r
         </Grid.RowDefinitions>\r
 \r
-        <StackPanel Grid.Row="0" Background="Black" Opacity="0.45" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>\r
+        <StackPanel Grid.Row="0" Background="Black" Opacity="0.5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>\r
 \r
         <Grid VerticalAlignment="Center" Grid.Row="1" HorizontalAlignment="Stretch"\r
                        Background="{Binding Background, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}">\r
@@ -51,7 +51,7 @@
             \r
         </Grid>\r
 \r
-        <StackPanel Grid.Row="2" Background="Black" Opacity="0.45" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>\r
+        <StackPanel Grid.Row="2" Background="Black" Opacity="0.5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>\r
 \r
     </Grid>\r
 \r
index 4c03075758786a6abe5aed361599ce9446376642..17fc821645122a0bbeff97b303e721a3bc67c3fb 100644 (file)
         </Grid>\r
             \r
 \r
-        <StackPanel Grid.Column="1" Background="Black" Opacity="0.45" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>\r
+        <StackPanel Grid.Column="1" Background="Black" Opacity="0.5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>\r
     </Grid>\r
 </UserControl>\r
index 62d09fa8e9ae0ba21a657de4c430f0c28e380957..bd7bbbbade86404def09e6e69e2739c62ae97885 100644 (file)
@@ -15,7 +15,7 @@
             <RowDefinition Height="*" />\r
         </Grid.RowDefinitions>\r
 \r
-        <StackPanel Grid.Row="0" Background="Black" Opacity="0.45" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>\r
+        <StackPanel Grid.Row="0" Background="Black" Opacity="0.5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>\r
 \r
         <Grid VerticalAlignment="Center" Grid.Row="1" HorizontalAlignment="Stretch"\r
                        Background="{Binding Background, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}">\r
@@ -51,7 +51,7 @@
             \r
         </Grid>\r
 \r
-        <StackPanel Grid.Row="2" Background="Black" Opacity="0.45" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>\r
+        <StackPanel Grid.Row="2" Background="Black" Opacity="0.5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>\r
 \r
     </Grid>\r
 \r
index 3d98340ec784e48b6f44697712d5721321e61b7d..e7914113956c8cbc59a47f5d506efc95eb212a5c 100644 (file)
@@ -394,7 +394,7 @@ namespace HandBrakeWPF.Properties {
         }\r
         \r
         /// <summary>\r
-        ///   Looks up a localized string similar to Please choose a destination for the file..\r
+        ///   Looks up a localized string similar to Please choose a destination for where you would like the encoded file to be saved..\r
         /// </summary>\r
         public static string Main_ChooseDestination {\r
             get {\r
@@ -439,7 +439,7 @@ namespace HandBrakeWPF.Properties {
         }\r
         \r
         /// <summary>\r
-        ///   Looks up a localized string similar to You cannot encode to a file with the same path and name as the source file. Please update the destination filename so that it does not match the source file..\r
+        ///   Looks up a localized string similar to You cannot encode to a file with the same path and filename as the source file. Please update the destination filename so that it does not match the source file..\r
         /// </summary>\r
         public static string Main_MatchingFileOverwriteWarning {\r
             get {\r
@@ -585,6 +585,15 @@ namespace HandBrakeWPF.Properties {
             }\r
         }\r
         \r
+        /// <summary>\r
+        ///   Looks up a localized string similar to Show Queue{0}.\r
+        /// </summary>\r
+        public static string Main_QueueLabel {\r
+            get {\r
+                return ResourceManager.GetString("Main_QueueLabel", resourceCulture);\r
+            }\r
+        }\r
+        \r
         /// <summary>\r
         ///   Looks up a localized string similar to Scan Cancelled..\r
         /// </summary>\r
@@ -663,7 +672,7 @@ namespace HandBrakeWPF.Properties {
         }\r
         \r
         /// <summary>\r
-        ///   Looks up a localized string similar to You must first scan a source and setup your job before starting an encode..\r
+        ///   Looks up a localized string similar to You must first scan a source and setup your job before starting an encode. Click the &apos;Source&apos; button on the toolbar to continue..\r
         /// </summary>\r
         public static string Main_ScanSource {\r
             get {\r
@@ -671,15 +680,6 @@ namespace HandBrakeWPF.Properties {
             }\r
         }\r
         \r
-        /// <summary>\r
-        ///   Looks up a localized string similar to You must first scan a source and setup your job before adding to the queue..\r
-        /// </summary>\r
-        public static string Main_ScanSourceFirst {\r
-            get {\r
-                return ResourceManager.GetString("Main_ScanSourceFirst", resourceCulture);\r
-            }\r
-        }\r
-        \r
         /// <summary>\r
         ///   Looks up a localized string similar to Please select a preset..\r
         /// </summary>\r
@@ -726,6 +726,24 @@ namespace HandBrakeWPF.Properties {
             }\r
         }\r
         \r
+        /// <summary>\r
+        ///   Looks up a localized string similar to Start.\r
+        /// </summary>\r
+        public static string Main_Start {\r
+            get {\r
+                return ResourceManager.GetString("Main_Start", resourceCulture);\r
+            }\r
+        }\r
+        \r
+        /// <summary>\r
+        ///   Looks up a localized string similar to Start Queue.\r
+        /// </summary>\r
+        public static string Main_StartQueue {\r
+            get {\r
+                return ResourceManager.GetString("Main_StartQueue", resourceCulture);\r
+            }\r
+        }\r
+        \r
         /// <summary>\r
         ///   Looks up a localized string similar to You must turn on automatic file naming AND set a default path in preferences before you can add to the queue..\r
         /// </summary>\r
index 17eae84442dd9f446d43fac26043aa02192b17ee..72cdf960003113a5c5eb61c0e8fbeca7aa642d62 100644 (file)
@@ -368,9 +368,6 @@ In order to use the QuickSync encoder, you must:
   <data name="Main_AutoAdd_AudioAndSubWarning" xml:space="preserve">\r
     <value>Warning: It is not currently possible to use this feature if you require specific subtitle or audio tracks that the automatic selection feature (see options) doesn't support! Tracks are reset with every new source / title selected.</value>\r
   </data>\r
-  <data name="Main_ScanSourceFirst" xml:space="preserve">\r
-    <value>You must first scan a source and setup your job before adding to the queue.</value>\r
-  </data>\r
   <data name="Main_TurnOnAutoFileNaming" xml:space="preserve">\r
     <value>You must turn on automatic file naming AND set a default path in preferences before you can add to the queue.</value>\r
   </data>\r
@@ -387,7 +384,7 @@ In order to use the QuickSync encoder, you must:
     <value>HandBrake is already encoding.</value>\r
   </data>\r
   <data name="Main_ChooseDestination" xml:space="preserve">\r
-    <value>Please choose a destination for the file.</value>\r
+    <value>Please choose a destination for where you would like the encoded file to be saved.</value>\r
   </data>\r
   <data name="Main_DestinationOverwrite" xml:space="preserve">\r
     <value>The current file already exists, do you wish to overwrite it?</value>\r
@@ -458,7 +455,7 @@ The previous user_presets.xml file was backed up.</value>
     <value>Scanning Title {0} of {1} ({2}%)</value>\r
   </data>\r
   <data name="Main_ScanSource" xml:space="preserve">\r
-    <value>You must first scan a source and setup your job before starting an encode.</value>\r
+    <value>You must first scan a source and setup your job before starting an encode. Click the 'Source' button on the toolbar to continue.</value>\r
   </data>\r
   <data name="Main_SelectPreset" xml:space="preserve">\r
     <value>Please select a preset.</value>\r
@@ -529,7 +526,7 @@ Non-Live Options: {date} {time} {quality} {bitrate}  (These only change if you s
 Not both at the same time!</value>\r
   </data>\r
   <data name="Main_MatchingFileOverwriteWarning" xml:space="preserve">\r
-    <value>You cannot encode to a file with the same path and name as the source file. Please update the destination filename so that it does not match the source file.</value>\r
+    <value>You cannot encode to a file with the same path and filename as the source file. Please update the destination filename so that it does not match the source file.</value>\r
   </data>\r
   <data name="Main_UnableToLoadHelpMessage" xml:space="preserve">\r
     <value>Your system prevented HandBrake from launching a web browser.</value>\r
@@ -573,4 +570,13 @@ This could be due to one of the following reasons:
 \r
 The Activity log may have further information.</value>\r
   </data>\r
+  <data name="Main_QueueLabel" xml:space="preserve">\r
+    <value>Show Queue{0}</value>\r
+  </data>\r
+  <data name="Main_Start" xml:space="preserve">\r
+    <value>Start</value>\r
+  </data>\r
+  <data name="Main_StartQueue" xml:space="preserve">\r
+    <value>Start Queue</value>\r
+  </data>\r
 </root>
\ No newline at end of file
index 797d74e0863b918ba5e282e2ff514090bca955c3..15e05347b40d2ab1a7fd679bada0a2e7c758b2c4 100644 (file)
@@ -25,7 +25,6 @@ namespace HandBrakeWPF.Services.Queue
     using HandBrakeWPF.Services.Queue.Model;\r
 \r
     using Execute = Caliburn.Micro.Execute;\r
-    using IQueueProcessor = HandBrakeWPF.Services.Queue.Interfaces.IQueueProcessor;\r
     using QueueCompletedEventArgs = HandBrakeWPF.EventArgs.QueueCompletedEventArgs;\r
     using QueueProgressEventArgs = HandBrakeWPF.EventArgs.QueueProgressEventArgs;\r
 \r
index c521ee235c7db2e20ab8a29ea20fff93eb5a787f..7d9e9d2c243cc8f0b5880a0c996acfa255962129 100644 (file)
@@ -1135,6 +1135,28 @@ namespace HandBrakeWPF.ViewModels
             }\r
         }\r
 \r
+        /// <summary>\r
+        /// Gets the add to queue label.\r
+        /// </summary>\r
+        public string QueueLabel\r
+        {\r
+            get\r
+            {\r
+                return string.Format(Resources.Main_QueueLabel, this.queueProcessor.Count > 0 ? string.Format(" ({0})", this.queueProcessor.Count) : string.Empty);\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets the start label.\r
+        /// </summary>\r
+        public string StartLabel\r
+        {\r
+            get\r
+            {\r
+                return this.queueProcessor.Count > 0 ? Resources.Main_StartQueue : Resources.Main_Start;\r
+            }\r
+        }\r
+\r
         #endregion\r
 \r
         #region Load and Shutdown Handling\r
@@ -1295,7 +1317,7 @@ namespace HandBrakeWPF.ViewModels
         {\r
             if (this.ScannedSource == null || string.IsNullOrEmpty(this.ScannedSource.ScanPath) || this.ScannedSource.Titles.Count == 0)\r
             {\r
-                this.errorService.ShowMessageBox(Resources.Main_ScanSourceFirst, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);\r
+                this.errorService.ShowMessageBox(Resources.Main_ScanSource, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);\r
                 return false;\r
             }\r
 \r
@@ -1353,7 +1375,7 @@ namespace HandBrakeWPF.ViewModels
         {\r
             if (this.ScannedSource == null || this.ScannedSource.Titles == null || this.ScannedSource.Titles.Count == 0)\r
             {\r
-                this.errorService.ShowMessageBox(Resources.Main_ScanSourceFirst, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);\r
+                this.errorService.ShowMessageBox(Resources.Main_ScanSource, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);\r
                 return;\r
             }\r
 \r
@@ -1382,7 +1404,7 @@ namespace HandBrakeWPF.ViewModels
         {\r
             if (this.ScannedSource == null || this.ScannedSource.Titles == null || this.ScannedSource.Titles.Count == 0)\r
             {\r
-                this.errorService.ShowMessageBox(Resources.Main_ScanSourceFirst, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);\r
+                this.errorService.ShowMessageBox(Resources.Main_ScanSource, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);\r
                 return;\r
             }\r
 \r
@@ -2303,6 +2325,8 @@ namespace HandBrakeWPF.ViewModels
               () =>\r
               {\r
                   this.ProgramStatusLabel = string.Format(Resources.Main_XEncodesPending, this.queueProcessor.Count);\r
+                  this.NotifyOfPropertyChange(() => this.QueueLabel);\r
+                  this.NotifyOfPropertyChange(() => this.StartLabel);\r
               });\r
         }\r
 \r
index cf42b439ef00db9804c4b7eb19cb4e65c10def08..36c7237c6e7569aefd0de3d69ad76f514814e682 100644 (file)
@@ -6,6 +6,7 @@
              xmlns:Micro="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"\r
              xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"\r
              xmlns:commands="clr-namespace:HandBrakeWPF.Commands"\r
+             xmlns:Properties="clr-namespace:HandBrakeWPF.Properties"\r
              AllowDrop="True"\r
         FontSize="11"\r
         Micro:Message.Attach="[Event Loaded] = [Action Load]"\r
@@ -97,7 +98,7 @@
                   VerticalAlignment="Top"\r
                   >\r
                 <MenuItem Header="_File">\r
-                    <MenuItem Header="_Cancel Scan" Command="{Binding CancelScanCommand}" />\r
+                    <MenuItem Header="Choose Source" Micro:Message.Attach="[Event Click] = [Action SelectSourceWindow]" />\r
                     <Separator />\r
                     <MenuItem Header="_Exit" Micro:Message.Attach="[Event Click] = [Action ExitApplication]"  InputGestureText="Alt + F4" />\r
                 </MenuItem>\r
                                />\r
                         <Label Margin="8,0,0,0"\r
                                VerticalAlignment="Center"\r
-                               Content="Start"\r
+                               Content="{Binding StartLabel, FallbackValue='Start'}"\r
                                />\r
                     </StackPanel>\r
                 </Button>\r
                                                />\r
                                         <Label Margin="8,0,0,0"\r
                                                VerticalAlignment="Center"\r
-                                               Content="Add To Queue"\r
+                                               Content="Add to Queue"\r
                                                />\r
                                     </StackPanel>\r
                                     <Button.Style>\r
                                />\r
                         <Label Margin="8,0,0,0"\r
                                VerticalAlignment="Center"\r
-                               Content="Show Queue"\r
+                               Content="{Binding QueueLabel, FallbackValue='Show Queue'}"\r
                                />\r
                     </StackPanel>\r
                 </Button>\r