diff --git a/Changelog.md b/Changelog.md index 0f970b23..3b5522b7 100644 --- a/Changelog.md +++ b/Changelog.md @@ -15,6 +15,8 @@ - nero aac encoder binaries removed. (stax76) - On systems with UTF-8 code page invalid d2v and idx files were created. (stax76, [#435](/../../issues/435)) - Get-MediaInfo shows Range, Primaries, Transfer, Matrix. (stax76) +- Fix wrong aspect ratio calculation in batch mode. (stax76, [#428](/../../issues/428)) +- Options dialog starts faster. (stax76) 2.1.7.0 Stable (2021-01-07) diff --git a/Forms/MainForm.vb b/Forms/MainForm.vb index 5b0c750c..7bc52e36 100644 --- a/Forms/MainForm.vb +++ b/Forms/MainForm.vb @@ -4224,13 +4224,29 @@ Public Class MainForm If lng.IsCommon Then prefAudio.AddMenu(lng.ToString + " (" + lng.TwoLetterCode + ", " + lng.ThreeLetterCode + ")", Sub() prefAudio.Edit.Text += " " + lng.ThreeLetterCode) - Else - prefAudio.AddMenu("More | " + lng.ToString.Substring(0, 1).ToUpper + " | " + lng.ToString + - " (" + lng.TwoLetterCode + ", " + lng.ThreeLetterCode + ")", - Sub() prefAudio.Edit.Text += " " + lng.ThreeLetterCode) End If Next + Dim moreAudio = prefAudio.AddMenu("More", DirectCast(Nothing, Action)) + Dim moreAudioFirst = prefAudio.AddMenu("More | temp", DirectCast(Nothing, Action)) + + Dim moreAudioAction = Sub() + For Each lng In Language.Languages + prefAudio.AddMenu("More | " + lng.ToString.Substring(0, 1).ToUpper + " | " + lng.ToString + + " (" + lng.TwoLetterCode + ", " + lng.ThreeLetterCode + ")", + Sub() prefAudio.Edit.Text += " " + lng.ThreeLetterCode) + Next + End Sub + + AddHandler moreAudio.DropDownOpened, Sub() + If moreAudio.DropDownItems.Count > 1 Then + Exit Sub + End If + + moreAudioFirst.Visible = False + moreAudioAction() + End Sub + Dim cut = ui.AddMenu(Of CuttingMode) cut.Text = "Cutting Method" cut.Help = "Defines which method to use for cutting." @@ -4314,13 +4330,29 @@ Public Class MainForm If lng.IsCommon Then prefSub.AddMenu(lng.ToString + " (" + lng.TwoLetterCode + ", " + lng.ThreeLetterCode + ")", Sub() prefSub.Edit.Text += " " + lng.ThreeLetterCode) - Else - prefSub.AddMenu("More | " + lng.ToString.Substring(0, 1).ToUpper + " | " + lng.ToString + - " (" + lng.TwoLetterCode + ", " + lng.ThreeLetterCode + ")", - Sub() prefSub.Edit.Text += " " + lng.ThreeLetterCode) End If Next + Dim moreSub = prefSub.AddMenu("More", DirectCast(Nothing, Action)) + Dim moreSubFirst = prefSub.AddMenu("More | temp", DirectCast(Nothing, Action)) + + Dim moreSubAction = Sub() + For Each lng In Language.Languages + prefSub.AddMenu("More | " + lng.ToString.Substring(0, 1).ToUpper + " | " + lng.ToString + + " (" + lng.TwoLetterCode + ", " + lng.ThreeLetterCode + ")", + Sub() prefSub.Edit.Text += " " + lng.ThreeLetterCode) + Next + End Sub + + AddHandler moreSub.DropDownOpened, Sub() + If moreSub.DropDownItems.Count > 1 Then + Exit Sub + End If + + moreSubFirst.Visible = False + moreSubAction() + End Sub + Dim tbm = ui.AddTextMenu(subPage) tbm.Text = "Track Name" tbm.Help = "Track name used for muxing, may contain macros." diff --git a/UI/Controls/SimpleUI.vb b/UI/Controls/SimpleUI.vb index 986aeb43..267ae251 100644 --- a/UI/Controls/SimpleUI.vb +++ b/UI/Controls/SimpleUI.vb @@ -1036,11 +1036,11 @@ Public Class SimpleUI TextCustomMenu.GetMenu(menu, Button, Nothing, AddressOf MenuClick) End Sub - Sub AddMenu(menuText As String, menuValue As String) - AddMenu(menuText, Function() menuValue) - End Sub + Function AddMenu(menuText As String, menuValue As String) As ActionMenuItem + Return AddMenu(menuText, Function() menuValue) + End Function - Sub AddMenu(menuText As String, menuFunc As Func(Of String)) + Function AddMenu(menuText As String, menuFunc As Func(Of String)) As ActionMenuItem Dim action = Sub() Dim v = menuFunc.Invoke @@ -1049,12 +1049,12 @@ Public Class SimpleUI End If End Sub - AddMenu(menuText, action) - End Sub + Return AddMenu(menuText, action) + End Function - Sub AddMenu(menuText As String, menuAction As Action) - ActionMenuItem.Add(Button.ContextMenuStrip.Items, menuText, menuAction) - End Sub + Function AddMenu(menuText As String, menuAction As Action) As ActionMenuItem + Return ActionMenuItem.Add(Button.ContextMenuStrip.Items, menuText, menuAction) + End Function End Class Public Class ColorPickerBlock