diff --git a/src/libse/Common/Settings.cs b/src/libse/Common/Settings.cs index 259ecab52..32598405b 100644 --- a/src/libse/Common/Settings.cs +++ b/src/libse/Common/Settings.cs @@ -3122,6 +3122,7 @@ $HorzAlign = Center //} public static bool UseLegacyHtmlColor = true; + public static bool IsVersion3 = false; public static Settings GetSettings() { @@ -3139,10 +3140,10 @@ $HorzAlign = Center settings.General.DefaultEncoding = TextEncoding.Utf8WithBom; } - //if (settings.Version.StartsWith("3.", StringComparison.Ordinal)) - //{ - // UseHexAlphaBefore = true; - //} + if (settings.Version.StartsWith("3.", StringComparison.Ordinal)) + { + IsVersion3 = true; + } settings.General.UseLegacyHtmlColor = false; UseLegacyHtmlColor = false; @@ -12003,7 +12004,7 @@ $HorzAlign = Center if (s.Length == 8) { - if (UseLegacyHtmlColor) + if (UseLegacyHtmlColor && IsVersion3) { if (!int.TryParse(s.Substring(0, 2), NumberStyles.HexNumber, null, out var alpha)) { diff --git a/src/ui/Controls/NikseComboBox.cs b/src/ui/Controls/NikseComboBox.cs index c20304092..ee52042ea 100644 --- a/src/ui/Controls/NikseComboBox.cs +++ b/src/ui/Controls/NikseComboBox.cs @@ -899,7 +899,11 @@ namespace Nikse.SubtitleEdit.Controls } _popUp = new NikseComboBoxPopUp(_listView, SelectedIndex, x, y); - _popUp.ShowDialog(Parent); + var result = _popUp.ShowDialog(Parent); + if (result == DialogResult.OK && _listView.SelectedItems.Count > 0) + { + SelectedIndex = _listView.SelectedItems[0].Index; + } _listView?.Dispose(); _listView = null; _listViewShown = false; diff --git a/src/ui/Forms/SeMsgBox/MessageBoxForm.Designer.cs b/src/ui/Forms/SeMsgBox/MessageBoxForm.Designer.cs index 35701ebdf..9dcc235e9 100644 --- a/src/ui/Forms/SeMsgBox/MessageBoxForm.Designer.cs +++ b/src/ui/Forms/SeMsgBox/MessageBoxForm.Designer.cs @@ -198,6 +198,7 @@ this.seTextBox2.Multiline = true; this.seTextBox2.Name = "seTextBox2"; this.seTextBox2.Padding = new System.Windows.Forms.Padding(1); + this.seTextBox2.ReadOnly = false; this.seTextBox2.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.None; this.seTextBox2.SelectedText = ""; this.seTextBox2.SelectionLength = 0; @@ -231,6 +232,7 @@ this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "MessageBoxForm"; + this.Shown += new System.EventHandler(this.MessageBoxForm_Shown); this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.MessageBoxForm_KeyDown); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxIcon)).EndInit(); this.contextMenuStrip1.ResumeLayout(false); diff --git a/src/ui/Forms/SeMsgBox/MessageBoxForm.cs b/src/ui/Forms/SeMsgBox/MessageBoxForm.cs index d466c8dfa..b4f059133 100644 --- a/src/ui/Forms/SeMsgBox/MessageBoxForm.cs +++ b/src/ui/Forms/SeMsgBox/MessageBoxForm.cs @@ -127,9 +127,11 @@ namespace Nikse.SubtitleEdit.Forms.SeMsgBox if (text.Length > 500) { + seTextBox2.ReadOnly = true; seTextBox2.Text = text; labelText.Visible = false; seTextBox2.ContextMenuStrip = contextMenuStrip1; + seTextBox2.SelectionLength = 0; return; } @@ -241,5 +243,13 @@ namespace Nikse.SubtitleEdit.Forms.SeMsgBox { Clipboard.SetText(_text); } + + private void MessageBoxForm_Shown(object sender, EventArgs e) + { + if (buttonOK.Visible) + { + buttonOK.Focus(); + } + } } } diff --git a/src/ui/Forms/SeMsgBox/MessageBoxForm.resx b/src/ui/Forms/SeMsgBox/MessageBoxForm.resx index 30b0c898c..c05980a7a 100644 --- a/src/ui/Forms/SeMsgBox/MessageBoxForm.resx +++ b/src/ui/Forms/SeMsgBox/MessageBoxForm.resx @@ -125,7 +125,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAm - CgAAAk1TRnQBSQFMAgEBBAEAATABAAEwAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + CgAAAk1TRnQBSQFMAgEBBAEAATgBAAE4AQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA diff --git a/src/ui/Resources/HunspellDictionaries.xml b/src/ui/Resources/HunspellDictionaries.xml index 8be900787..edad31963 100644 --- a/src/ui/Resources/HunspellDictionaries.xml +++ b/src/ui/Resources/HunspellDictionaries.xml @@ -284,8 +284,8 @@ Sinhala Sinhala - http://extensions.openoffice.org/en/download/4346 - Sinhala by laknath + https://extensions.openoffice.org/en/download/3940 + Sinhala by chamendri Slovak diff --git a/src/ui/Resources/HunspellDictionaries.xml.gz b/src/ui/Resources/HunspellDictionaries.xml.gz index b7a9cf4bb..b97eda8a9 100644 Binary files a/src/ui/Resources/HunspellDictionaries.xml.gz and b/src/ui/Resources/HunspellDictionaries.xml.gz differ diff --git a/src/ui/SubtitleEdit.csproj b/src/ui/SubtitleEdit.csproj index 7ab0f62f5..141fb6517 100644 --- a/src/ui/SubtitleEdit.csproj +++ b/src/ui/SubtitleEdit.csproj @@ -2510,7 +2510,6 @@ -