From e6defd3e5587b20176290b32d9f5f084869c05bf Mon Sep 17 00:00:00 2001 From: stax76 Date: Tue, 16 Jul 2024 00:04:15 +0200 Subject: [PATCH] #696 --- docs/changelog.md | 4 ++-- src/MpvNet.Windows/GuiCommand.cs | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index e22387f0..92f0dc52 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -2,13 +2,13 @@ # v7.1.1.1 Beta (????-??-??) - Korean, Russian and Turkish translation added, Japanese translation fixed. Thanks to the translation team! -- Auto build update. +- Action/Workflow/Auto build fix and update. - Full support for select.lua which is a new simple command palette script embedded into mpv/libmpv. In the context menu select.lua features can be found under 'View > On Screen Menu'. https://github.com/mpv-player/mpv/blob/master/player/lua/select.lua - The helper script 'Tools\update-mpv-and-libmpv.ps1' no longer uses command line arguments, it uses now the Path environment variable to find mpv and mpv.net. -- Actions/Workflow/Auto builds have been fixed. + # v7.1.1.0 (2024-02-03) diff --git a/src/MpvNet.Windows/GuiCommand.cs b/src/MpvNet.Windows/GuiCommand.cs index bece73a9..7cbfb390 100644 --- a/src/MpvNet.Windows/GuiCommand.cs +++ b/src/MpvNet.Windows/GuiCommand.cs @@ -14,7 +14,6 @@ using MpvNet.Windows.WPF.MsgBox; using MpvNet.Windows.Help; using MpvNet.Help; -using System; namespace MpvNet; @@ -118,6 +117,14 @@ void EditCongFile(IList args) { string file = Player.ConfigFolder + args[0]; + if (!File.Exists(file)) + { + string msg = $"{args[0]} does not exist. Would you like to create it?"; + + if (Msg.ShowQuestion(msg) == MessageBoxResult.OK) + File.WriteAllText(file, ""); + } + if (File.Exists(file)) ProcessHelp.ShellExecute(WinApiHelp.GetAppPathForExtension("txt"), "\"" + file + "\""); }