diff options
author | sr55 <[email protected]> | 2015-04-22 19:48:04 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2015-04-22 19:48:04 +0000 |
commit | 81aecad6b76087e4118ec1809398e9f1a9685d4c (patch) | |
tree | 32c27d5b42ec567b96c3395bbbe662862bf0bb4a | |
parent | 87ea09d9f07c0353bda7aa8d566077bde3528e76 (diff) |
WinGui: Some minor UI Improvements. Including Waiting Queue Count on the "Show Queue" toolbar icon.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7117 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | win/CS/HandBrakeWPF/Controls/AlertPanel.xaml | 4 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Controls/SourceSelection.xaml | 2 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Controls/StatusPanel.xaml | 4 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Properties/Resources.Designer.cs | 42 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Properties/Resources.resx | 18 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs | 1 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 30 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/MainView.xaml | 9 |
8 files changed, 79 insertions, 31 deletions
diff --git a/win/CS/HandBrakeWPF/Controls/AlertPanel.xaml b/win/CS/HandBrakeWPF/Controls/AlertPanel.xaml index 5e8b756ee..06cbdfe3d 100644 --- a/win/CS/HandBrakeWPF/Controls/AlertPanel.xaml +++ b/win/CS/HandBrakeWPF/Controls/AlertPanel.xaml @@ -14,7 +14,7 @@ <RowDefinition Height="*" />
</Grid.RowDefinitions>
- <StackPanel Grid.Row="0" Background="Black" Opacity="0.45" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
+ <StackPanel Grid.Row="0" Background="Black" Opacity="0.5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
<Grid VerticalAlignment="Center" Grid.Row="1" HorizontalAlignment="Stretch"
Background="{Binding Background, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}">
@@ -51,7 +51,7 @@ </Grid>
- <StackPanel Grid.Row="2" Background="Black" Opacity="0.45" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
+ <StackPanel Grid.Row="2" Background="Black" Opacity="0.5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
</Grid>
diff --git a/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml b/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml index 4c0307575..17fc82164 100644 --- a/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml +++ b/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml @@ -106,6 +106,6 @@ </Grid>
- <StackPanel Grid.Column="1" Background="Black" Opacity="0.45" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
+ <StackPanel Grid.Column="1" Background="Black" Opacity="0.5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
</Grid>
</UserControl>
diff --git a/win/CS/HandBrakeWPF/Controls/StatusPanel.xaml b/win/CS/HandBrakeWPF/Controls/StatusPanel.xaml index 62d09fa8e..bd7bbbbad 100644 --- a/win/CS/HandBrakeWPF/Controls/StatusPanel.xaml +++ b/win/CS/HandBrakeWPF/Controls/StatusPanel.xaml @@ -15,7 +15,7 @@ <RowDefinition Height="*" />
</Grid.RowDefinitions>
- <StackPanel Grid.Row="0" Background="Black" Opacity="0.45" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
+ <StackPanel Grid.Row="0" Background="Black" Opacity="0.5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
<Grid VerticalAlignment="Center" Grid.Row="1" HorizontalAlignment="Stretch"
Background="{Binding Background, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}">
@@ -51,7 +51,7 @@ </Grid>
- <StackPanel Grid.Row="2" Background="Black" Opacity="0.45" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
+ <StackPanel Grid.Row="2" Background="Black" Opacity="0.5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
</Grid>
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs index 3d98340ec..e79141139 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs +++ b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs @@ -394,7 +394,7 @@ namespace HandBrakeWPF.Properties { }
/// <summary>
- /// Looks up a localized string similar to Please choose a destination for the file..
+ /// Looks up a localized string similar to Please choose a destination for where you would like the encoded file to be saved..
/// </summary>
public static string Main_ChooseDestination {
get {
@@ -439,7 +439,7 @@ namespace HandBrakeWPF.Properties { }
/// <summary>
- /// 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..
+ /// 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..
/// </summary>
public static string Main_MatchingFileOverwriteWarning {
get {
@@ -586,6 +586,15 @@ namespace HandBrakeWPF.Properties { }
/// <summary>
+ /// Looks up a localized string similar to Show Queue{0}.
+ /// </summary>
+ public static string Main_QueueLabel {
+ get {
+ return ResourceManager.GetString("Main_QueueLabel", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to Scan Cancelled..
/// </summary>
public static string Main_ScanCancelled {
@@ -663,7 +672,7 @@ namespace HandBrakeWPF.Properties { }
/// <summary>
- /// Looks up a localized string similar to You must first scan a source and setup your job before starting an encode..
+ /// Looks up a localized string similar to You must first scan a source and setup your job before starting an encode. Click the 'Source' button on the toolbar to continue..
/// </summary>
public static string Main_ScanSource {
get {
@@ -672,15 +681,6 @@ namespace HandBrakeWPF.Properties { }
/// <summary>
- /// Looks up a localized string similar to You must first scan a source and setup your job before adding to the queue..
- /// </summary>
- public static string Main_ScanSourceFirst {
- get {
- return ResourceManager.GetString("Main_ScanSourceFirst", resourceCulture);
- }
- }
-
- /// <summary>
/// Looks up a localized string similar to Please select a preset..
/// </summary>
public static string Main_SelectPreset {
@@ -727,6 +727,24 @@ namespace HandBrakeWPF.Properties { }
/// <summary>
+ /// Looks up a localized string similar to Start.
+ /// </summary>
+ public static string Main_Start {
+ get {
+ return ResourceManager.GetString("Main_Start", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Start Queue.
+ /// </summary>
+ public static string Main_StartQueue {
+ get {
+ return ResourceManager.GetString("Main_StartQueue", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// 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..
/// </summary>
public static string Main_TurnOnAutoFileNaming {
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.resx b/win/CS/HandBrakeWPF/Properties/Resources.resx index 17eae8444..72cdf9600 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.resx +++ b/win/CS/HandBrakeWPF/Properties/Resources.resx @@ -368,9 +368,6 @@ In order to use the QuickSync encoder, you must: <data name="Main_AutoAdd_AudioAndSubWarning" xml:space="preserve">
<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>
</data>
- <data name="Main_ScanSourceFirst" xml:space="preserve">
- <value>You must first scan a source and setup your job before adding to the queue.</value>
- </data>
<data name="Main_TurnOnAutoFileNaming" xml:space="preserve">
<value>You must turn on automatic file naming AND set a default path in preferences before you can add to the queue.</value>
</data>
@@ -387,7 +384,7 @@ In order to use the QuickSync encoder, you must: <value>HandBrake is already encoding.</value>
</data>
<data name="Main_ChooseDestination" xml:space="preserve">
- <value>Please choose a destination for the file.</value>
+ <value>Please choose a destination for where you would like the encoded file to be saved.</value>
</data>
<data name="Main_DestinationOverwrite" xml:space="preserve">
<value>The current file already exists, do you wish to overwrite it?</value>
@@ -458,7 +455,7 @@ The previous user_presets.xml file was backed up.</value> <value>Scanning Title {0} of {1} ({2}%)</value>
</data>
<data name="Main_ScanSource" xml:space="preserve">
- <value>You must first scan a source and setup your job before starting an encode.</value>
+ <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>
</data>
<data name="Main_SelectPreset" xml:space="preserve">
<value>Please select a preset.</value>
@@ -529,7 +526,7 @@ Non-Live Options: {date} {time} {quality} {bitrate} (These only change if you s Not both at the same time!</value>
</data>
<data name="Main_MatchingFileOverwriteWarning" xml:space="preserve">
- <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>
+ <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>
</data>
<data name="Main_UnableToLoadHelpMessage" xml:space="preserve">
<value>Your system prevented HandBrake from launching a web browser.</value>
@@ -573,4 +570,13 @@ This could be due to one of the following reasons: The Activity log may have further information.</value>
</data>
+ <data name="Main_QueueLabel" xml:space="preserve">
+ <value>Show Queue{0}</value>
+ </data>
+ <data name="Main_Start" xml:space="preserve">
+ <value>Start</value>
+ </data>
+ <data name="Main_StartQueue" xml:space="preserve">
+ <value>Start Queue</value>
+ </data>
</root>
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs b/win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs index 797d74e08..15e05347b 100644 --- a/win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs +++ b/win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs @@ -25,7 +25,6 @@ namespace HandBrakeWPF.Services.Queue using HandBrakeWPF.Services.Queue.Model;
using Execute = Caliburn.Micro.Execute;
- using IQueueProcessor = HandBrakeWPF.Services.Queue.Interfaces.IQueueProcessor;
using QueueCompletedEventArgs = HandBrakeWPF.EventArgs.QueueCompletedEventArgs;
using QueueProgressEventArgs = HandBrakeWPF.EventArgs.QueueProgressEventArgs;
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index c521ee235..7d9e9d2c2 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -1135,6 +1135,28 @@ namespace HandBrakeWPF.ViewModels }
}
+ /// <summary>
+ /// Gets the add to queue label.
+ /// </summary>
+ public string QueueLabel
+ {
+ get
+ {
+ return string.Format(Resources.Main_QueueLabel, this.queueProcessor.Count > 0 ? string.Format(" ({0})", this.queueProcessor.Count) : string.Empty);
+ }
+ }
+
+ /// <summary>
+ /// Gets the start label.
+ /// </summary>
+ public string StartLabel
+ {
+ get
+ {
+ return this.queueProcessor.Count > 0 ? Resources.Main_StartQueue : Resources.Main_Start;
+ }
+ }
+
#endregion
#region Load and Shutdown Handling
@@ -1295,7 +1317,7 @@ namespace HandBrakeWPF.ViewModels {
if (this.ScannedSource == null || string.IsNullOrEmpty(this.ScannedSource.ScanPath) || this.ScannedSource.Titles.Count == 0)
{
- this.errorService.ShowMessageBox(Resources.Main_ScanSourceFirst, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
+ this.errorService.ShowMessageBox(Resources.Main_ScanSource, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
return false;
}
@@ -1353,7 +1375,7 @@ namespace HandBrakeWPF.ViewModels {
if (this.ScannedSource == null || this.ScannedSource.Titles == null || this.ScannedSource.Titles.Count == 0)
{
- this.errorService.ShowMessageBox(Resources.Main_ScanSourceFirst, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
+ this.errorService.ShowMessageBox(Resources.Main_ScanSource, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
@@ -1382,7 +1404,7 @@ namespace HandBrakeWPF.ViewModels {
if (this.ScannedSource == null || this.ScannedSource.Titles == null || this.ScannedSource.Titles.Count == 0)
{
- this.errorService.ShowMessageBox(Resources.Main_ScanSourceFirst, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
+ this.errorService.ShowMessageBox(Resources.Main_ScanSource, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
@@ -2303,6 +2325,8 @@ namespace HandBrakeWPF.ViewModels () =>
{
this.ProgramStatusLabel = string.Format(Resources.Main_XEncodesPending, this.queueProcessor.Count);
+ this.NotifyOfPropertyChange(() => this.QueueLabel);
+ this.NotifyOfPropertyChange(() => this.StartLabel);
});
}
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml index cf42b439e..36c7237c6 100644 --- a/win/CS/HandBrakeWPF/Views/MainView.xaml +++ b/win/CS/HandBrakeWPF/Views/MainView.xaml @@ -6,6 +6,7 @@ xmlns:Micro="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:commands="clr-namespace:HandBrakeWPF.Commands"
+ xmlns:Properties="clr-namespace:HandBrakeWPF.Properties"
AllowDrop="True"
FontSize="11"
Micro:Message.Attach="[Event Loaded] = [Action Load]"
@@ -97,7 +98,7 @@ VerticalAlignment="Top"
>
<MenuItem Header="_File">
- <MenuItem Header="_Cancel Scan" Command="{Binding CancelScanCommand}" />
+ <MenuItem Header="Choose Source" Micro:Message.Attach="[Event Click] = [Action SelectSourceWindow]" />
<Separator />
<MenuItem Header="_Exit" Micro:Message.Attach="[Event Click] = [Action ExitApplication]" InputGestureText="Alt + F4" />
</MenuItem>
@@ -201,7 +202,7 @@ />
<Label Margin="8,0,0,0"
VerticalAlignment="Center"
- Content="Start"
+ Content="{Binding StartLabel, FallbackValue='Start'}"
/>
</StackPanel>
</Button>
@@ -264,7 +265,7 @@ />
<Label Margin="8,0,0,0"
VerticalAlignment="Center"
- Content="Add To Queue"
+ Content="Add to Queue"
/>
</StackPanel>
<Button.Style>
@@ -311,7 +312,7 @@ />
<Label Margin="8,0,0,0"
VerticalAlignment="Center"
- Content="Show Queue"
+ Content="{Binding QueueLabel, FallbackValue='Show Queue'}"
/>
</StackPanel>
</Button>
|