fix #372
This commit is contained in:
@@ -13,6 +13,9 @@
|
|||||||
- Fix start-size=session not working.
|
- Fix start-size=session not working.
|
||||||
- Fix chapters that are script created after the media file is loaded.
|
- Fix chapters that are script created after the media file is loaded.
|
||||||
- Width of command palette slightly increased.
|
- Width of command palette slightly increased.
|
||||||
|
- The default key bindings for 0 and 9 change the volume like mpv.
|
||||||
|
- When a menu item is defined multiple times with different key bindings,
|
||||||
|
all key bindings are shown in the menu.
|
||||||
- libmpv zhongfly 2022-06-19
|
- libmpv zhongfly 2022-06-19
|
||||||
|
|
||||||
input.conf changes:
|
input.conf changes:
|
||||||
|
|||||||
@@ -173,7 +173,6 @@ Esc quit #menu: Exit
|
|||||||
MBTN_Right script-message-to mpvnet show-menu
|
MBTN_Right script-message-to mpvnet show-menu
|
||||||
6 script-message-to mpvnet show-progress
|
6 script-message-to mpvnet show-progress
|
||||||
KP6 script-message-to mpvnet show-progress
|
KP6 script-message-to mpvnet show-progress
|
||||||
9 ab-loop
|
|
||||||
KP9 ab-loop
|
KP9 ab-loop
|
||||||
7 script-message-to mpvnet cycle-audio
|
7 script-message-to mpvnet cycle-audio
|
||||||
Sharp script-message-to mpvnet cycle-audio
|
Sharp script-message-to mpvnet cycle-audio
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ namespace mpvnet
|
|||||||
public ElementHost CommandPaletteHost { get; set; }
|
public ElementHost CommandPaletteHost { get; set; }
|
||||||
public IntPtr mpvWindowHandle { get; set; }
|
public IntPtr mpvWindowHandle { get; set; }
|
||||||
public static MainForm Instance { get; set; }
|
public static MainForm Instance { get; set; }
|
||||||
|
public Dictionary<string, WpfControls.MenuItem> MenuItemDuplicate = new Dictionary<string, WpfControls.MenuItem>();
|
||||||
|
|
||||||
new WpfControls.ContextMenu ContextMenu { get; set; }
|
new WpfControls.ContextMenu ContextMenu { get; set; }
|
||||||
AutoResetEvent MenuAutoResetEvent { get; } = new AutoResetEvent(false);
|
AutoResetEvent MenuAutoResetEvent { get; } = new AutoResetEvent(false);
|
||||||
@@ -678,15 +679,23 @@ namespace mpvnet
|
|||||||
|
|
||||||
foreach (CommandItem item in items)
|
foreach (CommandItem item in items)
|
||||||
{
|
{
|
||||||
var tempItem = item;
|
CommandItem tempItem = item;
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(tempItem.Path))
|
if (string.IsNullOrEmpty(tempItem.Path))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (MenuItemDuplicate.ContainsKey(tempItem.Path))
|
||||||
|
{
|
||||||
|
var mi = MenuItemDuplicate[tempItem.Path];
|
||||||
|
mi.InputGestureText = mi.InputGestureText + ", " + tempItem.Input;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
var menuItem = MenuHelp.Add(ContextMenu.Items, tempItem.Path);
|
var menuItem = MenuHelp.Add(ContextMenu.Items, tempItem.Path);
|
||||||
|
|
||||||
if (menuItem != null)
|
if (menuItem != null)
|
||||||
{
|
{
|
||||||
|
MenuItemDuplicate[tempItem.Path] = menuItem;
|
||||||
menuItem.Click += (sender, args) => {
|
menuItem.Click += (sender, args) => {
|
||||||
try {
|
try {
|
||||||
App.RunTask(() => {
|
App.RunTask(() => {
|
||||||
@@ -706,6 +715,7 @@ namespace mpvnet
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Core_FileLoaded()
|
void Core_FileLoaded()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user