From 43ee820f6f512afb1bcc4fc6e944da49a1496dc0 Mon Sep 17 00:00:00 2001 From: Dendraspis Date: Tue, 7 Jul 2020 21:09:11 +0200 Subject: [PATCH 1/6] Rename bnSkip_Click() to bnNext_Click() --- Forms/MainForm.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Forms/MainForm.vb b/Forms/MainForm.vb index 08d97323..17e4dea4 100644 --- a/Forms/MainForm.vb +++ b/Forms/MainForm.vb @@ -3121,7 +3121,7 @@ Public Class MainForm AudioTextChanged(tbAudioFile1, p.Audio1) End Sub - Sub bnSkip_Click() Handles bnNext.Click + Sub bnNext_Click() Handles bnNext.Click If Not CanIgnoreTip Then MsgWarn("The current assistant warning cannot be skipped.") Exit Sub From 7666d98d6c466a18095a73c4669e956dd47e22c0 Mon Sep 17 00:00:00 2001 From: Dendraspis Date: Tue, 7 Jul 2020 22:40:52 +0200 Subject: [PATCH 2/6] Adds modifier keys for NEXT button (#220) --- Forms/MainForm.vb | 18 ++++++++++++------ General/JobManager.vb | 19 +++++++++++++++++-- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/Forms/MainForm.vb b/Forms/MainForm.vb index 08d97323..a3229b64 100644 --- a/Forms/MainForm.vb +++ b/Forms/MainForm.vb @@ -3194,8 +3194,12 @@ Public Class MainForm End Select End If - AddJob(False, Nothing) - ShowJobsDialog() + Dim position = If(Control.ModifierKeys.HasFlag(Keys.Shift), 0, -1) + AddJob(False, Nothing, position) + + If Control.ModifierKeys.HasFlag(Keys.Control) Then + ShowJobsDialog() + End If Else Assistant() End If @@ -3948,12 +3952,14 @@ Public Class MainForm showConfirmation As Boolean, - templateName As String) + templateName As String, + + Optional position As Integer = -1) - AddJob(showConfirmation, templateName, True) + AddJob(showConfirmation, templateName, True, position) End Sub - Sub AddJob(showConfirmation As Boolean, templateName As String, showAssistant As Boolean) + Sub AddJob(showConfirmation As Boolean, templateName As String, showAssistant As Boolean, Optional position As Integer = -1) If Not g.VerifyRequirements() Then Exit Sub End If @@ -3965,7 +3971,7 @@ Public Class MainForm Dim jobPath = JobManager.GetJobPath() SaveProjectPath(jobPath) - JobManager.AddJob(jobPath, jobPath) + JobManager.AddJob(jobPath, jobPath, position) If showConfirmation Then MsgInfo("Job added") diff --git a/General/JobManager.vb b/General/JobManager.vb index d75d8db1..94d08d61 100644 --- a/General/JobManager.vb +++ b/General/JobManager.vb @@ -87,7 +87,7 @@ Public Class JobManager SaveJobs(jobs) End Sub - Shared Sub AddJob(name As String, path As String) + Shared Sub AddJob(name As String, path As String, Optional position As Integer = -1) Dim jobs = GetJobs() For Each job In jobs.ToArray @@ -96,7 +96,22 @@ Public Class JobManager End If Next - jobs.Add(New Job(name, path)) + If position = -1 Then + jobs.Add(New Job(name, path)) + ElseIf position >= 0 Then + If jobs.Count > position Then + jobs.Insert(position, New Job(name, path)) + Else + jobs.Add(New Job(name, path)) + End If + Else + If -jobs.Count - 1 <= position Then + jobs.Insert(jobs.Count + position + 1, New Job(name, path)) + Else + jobs.Add(New Job(name, path)) + End If + End If + SaveJobs(jobs) End Sub From 934d0bb9ba3b78f2e13f4dd442084853b4eb36e2 Mon Sep 17 00:00:00 2001 From: Dendraspis Date: Tue, 7 Jul 2020 22:51:26 +0200 Subject: [PATCH 3/6] Forgotten NOT --- Forms/MainForm.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Forms/MainForm.vb b/Forms/MainForm.vb index a3229b64..4199f08a 100644 --- a/Forms/MainForm.vb +++ b/Forms/MainForm.vb @@ -3197,7 +3197,7 @@ Public Class MainForm Dim position = If(Control.ModifierKeys.HasFlag(Keys.Shift), 0, -1) AddJob(False, Nothing, position) - If Control.ModifierKeys.HasFlag(Keys.Control) Then + If Not Control.ModifierKeys.HasFlag(Keys.Control) Then ShowJobsDialog() End If Else From b57246488d44f983678893b85a959e65dd667b46 Mon Sep 17 00:00:00 2001 From: Frank Skare Date: Fri, 17 Jul 2020 15:29:55 +0200 Subject: [PATCH 4/6] improve VSScript.dll load behaviour --- FrameServer/VapourSynthServer.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/FrameServer/VapourSynthServer.cpp b/FrameServer/VapourSynthServer.cpp index be901020..8c0aa143 100644 --- a/FrameServer/VapourSynthServer.cpp +++ b/FrameServer/VapourSynthServer.cpp @@ -43,18 +43,18 @@ HRESULT __stdcall VapourSynthServer::OpenFile(WCHAR* file) { try { - HMODULE dll = LoadLibrary(L"VSScript.dll"); - - if (!dll) - { - std::string msg = GetWinErrorMessage(GetLastError()); - throw std::runtime_error("Failed to load VapourSynth:\r\n\r\n" + msg); - } - static bool wasResolved = false; if (!wasResolved) { + HMODULE dll = LoadLibrary(L"VSScript.dll"); + + if (!dll) + { + std::string msg = GetWinErrorMessage(GetLastError()); + throw std::runtime_error("Failed to load VapourSynth:\r\n\r\n" + msg); + } + bool x64 = sizeof(void*) == 8; std::array resolvePairs = { From 344b29adca08165858c1fcabbcef53683fa44634 Mon Sep 17 00:00:00 2001 From: Frank Skare Date: Fri, 17 Jul 2020 16:41:13 +0200 Subject: [PATCH 5/6] tooltip and other minor changes --- Changelog.md | 3 +++ Forms/MainForm.vb | 21 ++++++++++++++++----- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/Changelog.md b/Changelog.md index 12a9aac0..03e50eac 100644 --- a/Changelog.md +++ b/Changelog.md @@ -5,6 +5,9 @@ - mkvtoolnix 48 - ec3 file extension support for eac3 files. - R210/V210 video output using ffmpeg. +- The final assistant tip supports SHIFT key to add the job at the top + of the job list and CTRL to prevent showing the jobs dialog. + It's documented via tooltip, right-click on Next button. (Dendraspis) 2.1.3.7 Beta diff --git a/Forms/MainForm.vb b/Forms/MainForm.vb index 4199f08a..64527994 100644 --- a/Forms/MainForm.vb +++ b/Forms/MainForm.vb @@ -29,7 +29,7 @@ Public Class MainForm Public WithEvents tbAudioFile1 As StaxRip.UI.TextBoxEx Public WithEvents llEditAudio1 As ButtonLabel Public WithEvents llEditAudio0 As ButtonLabel - Public WithEvents bnNext As System.Windows.Forms.Button + Public WithEvents bnNext As ButtonEx Public WithEvents tbSourceFile As StaxRip.UI.TextBoxEx Public WithEvents tbTargetFile As StaxRip.UI.TextBoxEx Public WithEvents gbAssistant As System.Windows.Forms.GroupBox @@ -91,7 +91,7 @@ Public Class MainForm ' Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() - Me.bnNext = New System.Windows.Forms.Button() + Me.bnNext = New ButtonEx() Me.llEditAudio0 = New StaxRip.UI.ButtonLabel() Me.gbAssistant = New System.Windows.Forms.GroupBox() Me.tlpAssistant = New System.Windows.Forms.TableLayoutPanel() @@ -3194,10 +3194,12 @@ Public Class MainForm End Select End If - Dim position = If(Control.ModifierKeys.HasFlag(Keys.Shift), 0, -1) + Dim position = If(ModifierKeys.HasFlag(Keys.Shift), 0, -1) AddJob(False, Nothing, position) - If Not Control.ModifierKeys.HasFlag(Keys.Control) Then + If ModifierKeys.HasFlag(Keys.Control) Then + bnNext.ShowBold() + Else ShowJobsDialog() End If Else @@ -3959,7 +3961,12 @@ Public Class MainForm AddJob(showConfirmation, templateName, True, position) End Sub - Sub AddJob(showConfirmation As Boolean, templateName As String, showAssistant As Boolean, Optional position As Integer = -1) + Sub AddJob( + showConfirmation As Boolean, + templateName As String, + showAssistant As Boolean, + Optional position As Integer = -1) + If Not g.VerifyRequirements() Then Exit Sub End If @@ -5707,6 +5714,10 @@ Public Class MainForm .SetTip("Shows a menu with Container/Muxer profiles", llMuxer) .SetTip("Shows a menu with video encoder profiles", lgbEncoder.Label) .SetTip("Shows a menu with AviSynth filter options", lgbFilters.Label) + .SetTip("Next assistant tip." + BR2 + + "The final tip to add a job supports modifier keys:" + BR2 + + "SHIFT adds a job on top of the job list." + BR2 + + "CTRL prevents showing the Jobs dialog.", bnNext) End With End Sub From ffaff70cd1973b72a548320879497690bfe7c06e Mon Sep 17 00:00:00 2001 From: Frank Skare Date: Fri, 17 Jul 2020 16:48:30 +0200 Subject: [PATCH 6/6] update changelog --- Changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Changelog.md b/Changelog.md index 03e50eac..0e689257 100644 --- a/Changelog.md +++ b/Changelog.md @@ -5,6 +5,7 @@ - mkvtoolnix 48 - ec3 file extension support for eac3 files. - R210/V210 video output using ffmpeg. +- Include beta versions for update checker and show changelog (Dendraspis) - The final assistant tip supports SHIFT key to add the job at the top of the job list and CTRL to prevent showing the jobs dialog. It's documented via tooltip, right-click on Next button. (Dendraspis)