From 5b3697fbdebfad054b1228732508ceda2e90b2ad Mon Sep 17 00:00:00 2001 From: Frank Skare Date: Fri, 8 May 2020 08:26:44 +0200 Subject: [PATCH] built-in WM_APPCOMMAND support --- Changelog.md | 4 +- mpv.net/DynamicGUI/OptionSettingControl.xaml | 16 +- mpv.net/DynamicGUI/StringSettingControl.xaml | 16 +- mpv.net/Misc/App.cs | 8 +- mpv.net/Misc/Help.cs | 126 ++++++++++--- mpv.net/Misc/Misc.cs | 30 --- mpv.net/Misc/Theme.cs | 2 +- mpv.net/WPF/AboutWindow.xaml | 6 +- mpv.net/WPF/CommandPaletteWindow.xaml | 10 +- mpv.net/WPF/ConfWindow.xaml | 18 +- mpv.net/WPF/EverythingWindow.xaml | 10 +- mpv.net/WPF/InputWindow.xaml | 6 +- mpv.net/WPF/LearnWindow.xaml | 6 +- mpv.net/WPF/LearnWindow.xaml.cs | 183 +++---------------- mpv.net/WPF/Resources.xaml | 8 +- mpv.net/WPF/SearchTextBoxUserControl.xaml | 18 +- mpv.net/WPF/SetupWindow.xaml | 6 +- mpv.net/WinForms/MainForm.cs | 28 ++- mpv.net/mpv.net.csproj | 2 +- mpv.net/mpv/Core.cs | 10 +- scripts/powershell/show-in-file-explorer.ps1 | 14 ++ 21 files changed, 232 insertions(+), 295 deletions(-) create mode 100644 scripts/powershell/show-in-file-explorer.ps1 diff --git a/Changelog.md b/Changelog.md index 77cf372..af38ff3 100644 --- a/Changelog.md +++ b/Changelog.md @@ -2,7 +2,9 @@ 5.4.7.2 Beta (not yet released) ============ - +- WM_APPCOMMAND (mpv calls this media-keys) based input is no longer + directly passed to mpv but rather handled in mpv.net translating + the commands to mpv keys and sent via keypress input command to mpv 5.4.7.1 Beta diff --git a/mpv.net/DynamicGUI/OptionSettingControl.xaml b/mpv.net/DynamicGUI/OptionSettingControl.xaml index ae7b97e..533e8a1 100644 --- a/mpv.net/DynamicGUI/OptionSettingControl.xaml +++ b/mpv.net/DynamicGUI/OptionSettingControl.xaml @@ -4,7 +4,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:DynamicGUI" - xmlns:UI="clr-namespace:UI" + xmlns:mpvnet="clr-namespace:mpvnet" mc:Ignorable="d" d:DesignHeight="450" @@ -17,8 +17,8 @@ Margin="0,10" BorderThickness="0" IsReadOnly="True" - Foreground="{x:Static UI:Theme.Heading}" - Background="{x:Static UI:Theme.Background}" /> + Foreground="{x:Static mpvnet:Theme.Heading}" + Background="{x:Static mpvnet:Theme.Background}" /> @@ -32,7 +32,7 @@ FontSize="16" FontWeight="Normal" VerticalAlignment="Top" - Foreground="{x:Static UI:Theme.Foreground}"/> + Foreground="{x:Static mpvnet:Theme.Foreground}"/> + Foreground="{x:Static mpvnet:Theme.Foreground2}" + Background="{x:Static mpvnet:Theme.Background}"/> @@ -54,8 +54,8 @@ BorderThickness="0" IsReadOnly="True" Margin="0,10,0,0" - Foreground="{x:Static UI:Theme.Foreground}" - Background="{x:Static UI:Theme.Background}"/> + Foreground="{x:Static mpvnet:Theme.Foreground}" + Background="{x:Static mpvnet:Theme.Background}"/> diff --git a/mpv.net/DynamicGUI/StringSettingControl.xaml b/mpv.net/DynamicGUI/StringSettingControl.xaml index 6ac6246..025786f 100644 --- a/mpv.net/DynamicGUI/StringSettingControl.xaml +++ b/mpv.net/DynamicGUI/StringSettingControl.xaml @@ -4,7 +4,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:DynamicGUI" - xmlns:UI="clr-namespace:UI" + xmlns:mpvnet="clr-namespace:mpvnet" mc:Ignorable="d" d:DesignHeight="450" d:DesignWidth="800"> @@ -16,8 +16,8 @@ Margin="0,10" BorderThickness="0" IsReadOnly="True" - Foreground="{x:Static UI:Theme.Heading}" - Background="{x:Static UI:Theme.Background}"/> + Foreground="{x:Static mpvnet:Theme.Heading}" + Background="{x:Static mpvnet:Theme.Background}"/> @@ -29,9 +29,9 @@ Width="150" Height="20" HorizontalAlignment="Left" - Foreground="{x:Static UI:Theme.Foreground}" - Background="{x:Static UI:Theme.Background}" - CaretBrush="{x:Static UI:Theme.Foreground}" + Foreground="{x:Static mpvnet:Theme.Foreground}" + Background="{x:Static mpvnet:Theme.Background}" + CaretBrush="{x:Static mpvnet:Theme.Foreground}" TextChanged="ValueTextBox_TextChanged"/>