changelog updated
This commit is contained in:
@@ -5,8 +5,8 @@
|
|||||||
and it will suppress auto-load-folder. To get a 'Add to mpv.net playlist'
|
and it will suppress auto-load-folder. To get a 'Add to mpv.net playlist'
|
||||||
context menu item in explorer with multi selection support use my
|
context menu item in explorer with multi selection support use my
|
||||||
[Open with++](https://github.com/stax76/OpenWithPlusPlus#add-to-mpvnet-playlist) shell extension, as far as I know multi selection
|
[Open with++](https://github.com/stax76/OpenWithPlusPlus#add-to-mpvnet-playlist) shell extension, as far as I know multi selection
|
||||||
can not be done using the Registry
|
can not be done using the Registry but only via shell extension
|
||||||
- window-size mpv property support added
|
- window-size mpv property support added ([default bindings](https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/inputConf.txt#L137))
|
||||||
|
|
||||||
### 5.4.2
|
### 5.4.2
|
||||||
|
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ this decision was made to keep the code simple and lightweight.
|
|||||||
|
|
||||||
Python scripting is implemented with IronPython which uses Python 2.7.
|
Python scripting is implemented with IronPython which uses Python 2.7.
|
||||||
|
|
||||||
The main window is WinForms based and uses less than 600 lines of code,
|
The main window is WinForms based and uses less than 750 lines of code,
|
||||||
all other windows are WPF based and use even less code.
|
all other windows are WPF based and use even less code.
|
||||||
|
|
||||||
The config editor adds it's controls dynamically and uses [TOML](https://en.wikipedia.org/wiki/TOML) to define it's
|
The config editor adds it's controls dynamically and uses [TOML](https://en.wikipedia.org/wiki/TOML) to define it's
|
||||||
|
|||||||
@@ -373,10 +373,12 @@ namespace mpvnet
|
|||||||
if (!content.Contains("#menu:"))
|
if (!content.Contains("#menu:"))
|
||||||
{
|
{
|
||||||
var defaultItems = CommandItem.GetItems(Properties.Resources.inputConf);
|
var defaultItems = CommandItem.GetItems(Properties.Resources.inputConf);
|
||||||
|
|
||||||
foreach (CommandItem item in items)
|
foreach (CommandItem item in items)
|
||||||
foreach (CommandItem defaultItem in defaultItems)
|
foreach (CommandItem defaultItem in defaultItems)
|
||||||
if (item.Command == defaultItem.Command)
|
if (item.Command == defaultItem.Command)
|
||||||
defaultItem.Input = item.Input;
|
defaultItem.Input = item.Input;
|
||||||
|
|
||||||
items = defaultItems;
|
items = defaultItems;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -384,7 +386,9 @@ namespace mpvnet
|
|||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(item.Path))
|
if (string.IsNullOrEmpty(item.Path))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
string path = item.Path.Replace("&", "&&");
|
string path = item.Path.Replace("&", "&&");
|
||||||
|
|
||||||
MenuItem menuItem = ContextMenu.Add(path, () => {
|
MenuItem menuItem = ContextMenu.Add(path, () => {
|
||||||
try {
|
try {
|
||||||
mp.command(item.Command);
|
mp.command(item.Command);
|
||||||
@@ -392,6 +396,7 @@ namespace mpvnet
|
|||||||
Msg.ShowException(ex);
|
Msg.ShowException(ex);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (menuItem != null)
|
if (menuItem != null)
|
||||||
menuItem.ShortcutKeyDisplayString = item.Input + " ";
|
menuItem.ShortcutKeyDisplayString = item.Input + " ";
|
||||||
}
|
}
|
||||||
@@ -489,16 +494,20 @@ namespace mpvnet
|
|||||||
NativeHelp.SubtractWindowBorders(Handle, ref r);
|
NativeHelp.SubtractWindowBorders(Handle, ref r);
|
||||||
int c_w = r.Right - r.Left, c_h = r.Bottom - r.Top;
|
int c_w = r.Right - r.Left, c_h = r.Bottom - r.Top;
|
||||||
Size s = mp.VideoSize;
|
Size s = mp.VideoSize;
|
||||||
|
|
||||||
if (s == Size.Empty)
|
if (s == Size.Empty)
|
||||||
s = new Size(16, 9);
|
s = new Size(16, 9);
|
||||||
|
|
||||||
float aspect = s.Width / (float)s.Height;
|
float aspect = s.Width / (float)s.Height;
|
||||||
int d_w = Convert.ToInt32(c_h * aspect - c_w);
|
int d_w = Convert.ToInt32(c_h * aspect - c_w);
|
||||||
int d_h = Convert.ToInt32(c_w / aspect - c_h);
|
int d_h = Convert.ToInt32(c_w / aspect - c_h);
|
||||||
int[] d_corners = { d_w, d_h, -d_w, -d_h };
|
int[] d_corners = { d_w, d_h, -d_w, -d_h };
|
||||||
int[] corners = { rc.Left, rc.Top, rc.Right, rc.Bottom };
|
int[] corners = { rc.Left, rc.Top, rc.Right, rc.Bottom };
|
||||||
int corner = NativeHelp.GetResizeBorder(m.WParam.ToInt32());
|
int corner = NativeHelp.GetResizeBorder(m.WParam.ToInt32());
|
||||||
|
|
||||||
if (corner >= 0)
|
if (corner >= 0)
|
||||||
corners[corner] -= d_corners[corner];
|
corners[corner] -= d_corners[corner];
|
||||||
|
|
||||||
Marshal.StructureToPtr<Native.RECT>(new Native.RECT(corners[0], corners[1], corners[2], corners[3]), m.LParam, false);
|
Marshal.StructureToPtr<Native.RECT>(new Native.RECT(corners[0], corners[1], corners[2], corners[3]), m.LParam, false);
|
||||||
m.Result = new IntPtr(1);
|
m.Result = new IntPtr(1);
|
||||||
return;
|
return;
|
||||||
@@ -581,6 +590,7 @@ namespace mpvnet
|
|||||||
{
|
{
|
||||||
if (mp.Border && FormBorderStyle == FormBorderStyle.None)
|
if (mp.Border && FormBorderStyle == FormBorderStyle.None)
|
||||||
FormBorderStyle = FormBorderStyle.Sizable;
|
FormBorderStyle = FormBorderStyle.Sizable;
|
||||||
|
|
||||||
if (!mp.Border && FormBorderStyle == FormBorderStyle.Sizable)
|
if (!mp.Border && FormBorderStyle == FormBorderStyle.Sizable)
|
||||||
FormBorderStyle = FormBorderStyle.None;
|
FormBorderStyle = FormBorderStyle.None;
|
||||||
}
|
}
|
||||||
@@ -608,7 +618,10 @@ namespace mpvnet
|
|||||||
protected override void OnShown(EventArgs e)
|
protected override void OnShown(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnShown(e);
|
base.OnShown(e);
|
||||||
if (mp.GPUAPI == "vulkan") mp.ProcessCommandLine(false);
|
|
||||||
|
if (mp.GPUAPI == "vulkan")
|
||||||
|
mp.ProcessCommandLine(false);
|
||||||
|
|
||||||
var wpfColor = WPF.WPF.ThemeColor;
|
var wpfColor = WPF.WPF.ThemeColor;
|
||||||
Color color = Color.FromArgb(wpfColor.A, wpfColor.R, wpfColor.G, wpfColor.B);
|
Color color = Color.FromArgb(wpfColor.A, wpfColor.R, wpfColor.G, wpfColor.B);
|
||||||
ToolStripRendererEx.InitColors(color, App.IsDarkMode, App.ThemedMenu);
|
ToolStripRendererEx.InitColors(color, App.IsDarkMode, App.ThemedMenu);
|
||||||
@@ -669,6 +682,7 @@ namespace mpvnet
|
|||||||
protected override void OnDragEnter(DragEventArgs e)
|
protected override void OnDragEnter(DragEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnDragEnter(e);
|
base.OnDragEnter(e);
|
||||||
|
|
||||||
if (e.Data.GetDataPresent(DataFormats.FileDrop) || e.Data.GetDataPresent(DataFormats.Text))
|
if (e.Data.GetDataPresent(DataFormats.FileDrop) || e.Data.GetDataPresent(DataFormats.Text))
|
||||||
e.Effect = DragDropEffects.Copy;
|
e.Effect = DragDropEffects.Copy;
|
||||||
}
|
}
|
||||||
@@ -676,8 +690,10 @@ namespace mpvnet
|
|||||||
protected override void OnDragDrop(DragEventArgs e)
|
protected override void OnDragDrop(DragEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnDragDrop(e);
|
base.OnDragDrop(e);
|
||||||
|
|
||||||
if (e.Data.GetDataPresent(DataFormats.FileDrop))
|
if (e.Data.GetDataPresent(DataFormats.FileDrop))
|
||||||
mp.Load(e.Data.GetData(DataFormats.FileDrop) as String[], true, Control.ModifierKeys.HasFlag(Keys.Control));
|
mp.Load(e.Data.GetData(DataFormats.FileDrop) as String[], true, Control.ModifierKeys.HasFlag(Keys.Control));
|
||||||
|
|
||||||
if (e.Data.GetDataPresent(DataFormats.Text))
|
if (e.Data.GetDataPresent(DataFormats.Text))
|
||||||
mp.Load(new[] { e.Data.GetData(DataFormats.Text).ToString() }, true, Control.ModifierKeys.HasFlag(Keys.Control));
|
mp.Load(new[] { e.Data.GetData(DataFormats.Text).ToString() }, true, Control.ModifierKeys.HasFlag(Keys.Control));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,7 +119,8 @@ namespace mpvnet
|
|||||||
public static void ProcessProperty(string name, string value)
|
public static void ProcessProperty(string name, string value)
|
||||||
{
|
{
|
||||||
if (name.Any(char.IsUpper))
|
if (name.Any(char.IsUpper))
|
||||||
Msg.ShowError("Uppercase char detected: " + name, "mpv properties using the command line and the mpv.conf config file are required to be lowercase.");
|
Msg.ShowError("Uppercase char detected: " + name,
|
||||||
|
"mpv properties using the command line and the mpv.conf config file are required to be lowercase.");
|
||||||
|
|
||||||
switch (name)
|
switch (name)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user