summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels
diff options
context:
space:
mode:
authorsr55 <[email protected]>2018-11-24 13:27:07 +0000
committersr55 <[email protected]>2018-11-24 13:27:07 +0000
commitb431d10e788041f8ebc576ff8101a4c57f82f48a (patch)
tree17e9736b561ebbb6ac27c088381e6ce1d6183ff9 /win/CS/HandBrakeWPF/ViewModels
parent84a395ec86b092d91ae1757d1f2a70e54de0c547 (diff)
WinGui: Allow Add All / Add Selection to queue to be added to the toolbar similar to the mac ui. Enabled via the toolbar right click context menu.
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index 1d5c7187d..9c0788bf6 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -1231,6 +1231,15 @@ namespace HandBrakeWPF.ViewModels
}
}
+ public bool ShowAddAllToQueue => this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowAddAllToQueue);
+ public bool ShowAddSelectionToQueue => this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowAddSelectionToQueue);
+
+ public string ShowAddAllMenuName =>
+ string.Format("{0} {1}", (!this.ShowAddAllToQueue ? Resources.MainView_Show : Resources.MainView_Hide), Resources.MainView_ShowAddAllToQueue);
+
+ public string ShowAddSelectionMenuName =>
+ string.Format("{0} {1}", (!this.ShowAddSelectionToQueue ? Resources.MainView_Show : Resources.MainView_Hide), Resources.MainView_ShowAddSelectionToQueue);
+
#endregion
#region Commands
@@ -2272,6 +2281,18 @@ namespace HandBrakeWPF.ViewModels
this.NotifyOfPropertyChange(() => this.QueueRecoveryArchivesExist);
}
+ public void FlipAddAllToQueue()
+ {
+ bool value = !this.ShowAddAllToQueue;
+ this.userSettingService.SetUserSetting(UserSettingConstants.ShowAddAllToQueue, value);
+ }
+
+ public void FlipAddSelectionToQueue()
+ {
+ bool value = !this.ShowAddSelectionToQueue;
+ this.userSettingService.SetUserSetting(UserSettingConstants.ShowAddSelectionToQueue, value);
+ }
+
#endregion
#region Private Methods
@@ -2778,6 +2799,12 @@ namespace HandBrakeWPF.ViewModels
this.QueueViewModel.WhenDone(this.userSettingService.GetUserSetting<string>(UserSettingConstants.WhenCompleteAction), false);
break;
}
+
+
+ this.NotifyOfPropertyChange(() => this.ShowAddAllToQueue);
+ this.NotifyOfPropertyChange(() => this.ShowAddSelectionToQueue);
+ this.NotifyOfPropertyChange(() => this.ShowAddAllMenuName);
+ this.NotifyOfPropertyChange(() => this.ShowAddSelectionMenuName);
}
/// <summary>