From 085e03150ce068b447e4275112902d9979b86d93 Mon Sep 17 00:00:00 2001 From: "Sergey V. Zhdanovskih" Date: Thu, 13 Apr 2023 21:03:47 +0300 Subject: [PATCH] Bugfixes --- appveyor.yml | 1 + locales/Chinese Simplified.lng | 2 +- locales/English.lng | 2 +- locales/czech.lng | 2 +- locales/french.lng | 2 +- locales/german.lng | 2 +- locales/italian.lng | 2 +- locales/kazakh_cyrillic.lng | 2 +- locales/polish.lng | 2 +- locales/russian.lng | 2 +- locales/ukrainian.lng | 2 +- .../GKCore/Controllers/RecordSelectDlgController.cs | 12 ++++++++---- projects/GKCore/GKCore/LangMan.cs | 4 ++-- .../GKv2/GEDKeeper2/GKUI/Forms/RecordSelectDlg.cs | 12 ++++++------ .../GKv3/GEDKeeper3/GKUI/Forms/RecordSelectDlg.cs | 4 ++-- 15 files changed, 29 insertions(+), 24 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 2d2350856..1941560e8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -19,6 +19,7 @@ install: - nuget install NUnit.Runners -OutputDirectory packages - nuget install OpenCover -OutputDirectory packages - "SET PATH=C:\\Python34;C:\\Python34\\Scripts;%PATH%" + - python -m pip install --upgrade pip - pip install codecov skip_commits: diff --git a/locales/Chinese Simplified.lng b/locales/Chinese Simplified.lng index 07848fed1..32739a95b 100644 --- a/locales/Chinese Simplified.lng +++ b/locales/Chinese Simplified.lng @@ -899,7 +899,7 @@ 895=Refresh 896=Reset filter 897=Shorten date ranges -898=Press Enter to apply +898=Press Enter to save the filter 899=Today is jubilee of {0} 900=Tomorrow is jubilee of {0} 901={1} days remain before the jubilee of {0} diff --git a/locales/English.lng b/locales/English.lng index fff659937..d7b3064bb 100644 --- a/locales/English.lng +++ b/locales/English.lng @@ -899,7 +899,7 @@ 895=Refresh 896=Reset filter 897=Shorten date ranges -898=Press Enter to apply +898=Press Enter to save the filter 899=Today is jubilee of {0} 900=Tomorrow is jubilee of {0} 901={1} days remain before the jubilee of {0} diff --git a/locales/czech.lng b/locales/czech.lng index aaf9c2429..dd1733b10 100644 --- a/locales/czech.lng +++ b/locales/czech.lng @@ -899,7 +899,7 @@ 895=Obnovit 896=Resetovat filtr 897=Zkrátit časová období -898=Stiskněte Enter pro použití +898=Stiskněte Enter pro uložení filtru 899=Dnes je jubileum {0} 900=Zítra je jubileum {0} 901=Do jubilea {0} zbývá {1} dní diff --git a/locales/french.lng b/locales/french.lng index 2e483087c..f96bd5688 100644 --- a/locales/french.lng +++ b/locales/french.lng @@ -899,7 +899,7 @@ 895=Refresh 896=Reset filter 897=Shorten date ranges -898=Press Enter to apply +898=Press Enter to save the filter 899=Today is jubilee of {0} 900=Tomorrow is jubilee of {0} 901={1} days remain before the jubilee of {0} diff --git a/locales/german.lng b/locales/german.lng index b0a3dd37d..1f860a3fe 100644 --- a/locales/german.lng +++ b/locales/german.lng @@ -899,7 +899,7 @@ 895=Refresh 896=Reset filter 897=Shorten date ranges -898=Press Enter to apply +898=Press Enter to save the filter 899=Today is jubilee of {0} 900=Tomorrow is jubilee of {0} 901={1} days remain before the jubilee of {0} diff --git a/locales/italian.lng b/locales/italian.lng index d6bdbe6b7..db5c1db02 100644 --- a/locales/italian.lng +++ b/locales/italian.lng @@ -899,7 +899,7 @@ 895=Refresh 896=Reset filter 897=Shorten date ranges -898=Press Enter to apply +898=Press Enter to save the filter 899=Today is jubilee of {0} 900=Tomorrow is jubilee of {0} 901={1} days remain before the jubilee of {0} diff --git a/locales/kazakh_cyrillic.lng b/locales/kazakh_cyrillic.lng index 389a2aaf6..706077dab 100644 --- a/locales/kazakh_cyrillic.lng +++ b/locales/kazakh_cyrillic.lng @@ -899,7 +899,7 @@ 895=Refresh 896=Reset filter 897=Shorten date ranges -898=Press Enter to apply +898=Press Enter to save the filter 899=Today is jubilee of {0} 900=Tomorrow is jubilee of {0} 901={1} days remain before the jubilee of {0} diff --git a/locales/polish.lng b/locales/polish.lng index 04b3d99ed..88cda6266 100644 --- a/locales/polish.lng +++ b/locales/polish.lng @@ -899,7 +899,7 @@ 895=Refresh 896=Reset filter 897=Shorten date ranges -898=Press Enter to apply +898=Press Enter to save the filter 899=Today is jubilee of {0} 900=Tomorrow is jubilee of {0} 901={1} days remain before the jubilee of {0} diff --git a/locales/russian.lng b/locales/russian.lng index d1189824f..3a24d2000 100644 --- a/locales/russian.lng +++ b/locales/russian.lng @@ -899,7 +899,7 @@ 895=Обновить 896=Сбросить фильтр 897=Сокращать диапазоны дат -898=Нажмите Enter чтобы применить +898=Нажмите Enter чтобы сохранить фильтр 899=Сегодня юбилей {0} 900=Завтра юбилей {0} 901={1} дней осталось до юбилея {0} diff --git a/locales/ukrainian.lng b/locales/ukrainian.lng index d6e34b1b3..a77b2db90 100644 --- a/locales/ukrainian.lng +++ b/locales/ukrainian.lng @@ -899,7 +899,7 @@ 895=Refresh 896=Reset filter 897=Shorten date ranges -898=Press Enter to apply +898=Press Enter to save the filter 899=Today is jubilee of {0} 900=Tomorrow is jubilee of {0} 901={1} days remain before the jubilee of {0} diff --git a/projects/GKCore/GKCore/Controllers/RecordSelectDlgController.cs b/projects/GKCore/GKCore/Controllers/RecordSelectDlgController.cs index 83b133081..6cd6b6571 100644 --- a/projects/GKCore/GKCore/Controllers/RecordSelectDlgController.cs +++ b/projects/GKCore/GKCore/Controllers/RecordSelectDlgController.cs @@ -88,15 +88,19 @@ private bool SpouseSelectorHandler(GDMRecord record) return (famRec != null && famRec.HasSpouse(fTarget.TargetIndividual)); } + public void ChangeFilter() + { + string flt = fView.FilterBox.Text; + GKUtils.SaveFilter(flt, GlobalOptions.Instance.GetRSFilters(fRecType)); + UpdateFilters(); + } + public override void UpdateView() { string flt = fView.FilterBox.Text; if (string.IsNullOrEmpty(flt)) { flt = "*"; } else if (flt != "*") { - GKUtils.SaveFilter(flt, GlobalOptions.Instance.GetRSFilters(fRecType)); - UpdateFilters(); - flt = "*" + flt + "*"; } @@ -134,7 +138,7 @@ public override void SetLocale() GetControl("btnSelect").Text = LangMan.LS(LSID.LSID_DlgSelect); GetControl("btnCancel").Text = LangMan.LS(LSID.LSID_DlgCancel); - SetToolTip("txtFastFilter", LangMan.LS(LSID.LSID_PressEnterToApply)); + SetToolTip("txtFastFilter", LangMan.LS(LSID.LSID_PressEnterToSaveFilter)); } } } diff --git a/projects/GKCore/GKCore/LangMan.cs b/projects/GKCore/GKCore/LangMan.cs index 81eb58d08..0e1f2aa6b 100644 --- a/projects/GKCore/GKCore/LangMan.cs +++ b/projects/GKCore/GKCore/LangMan.cs @@ -957,7 +957,7 @@ public enum LSID /* 895 */ LSID_Refresh, /* 896 */ LSID_ResetFilter, /* 897 */ LSID_ShortenDateRanges, - /* 898 */ LSID_PressEnterToApply, + /* 898 */ LSID_PressEnterToSaveFilter, /* 899 */ LSID_AnniversaryToday, /* 900 */ LSID_AnniversaryTomorrow, @@ -1877,7 +1877,7 @@ public static class LangMan /* 895 */ "Refresh", /* 896 */ "Reset filter", /* 897 */ "Shorten date ranges", - /* 898 */ "Press Enter to apply", + /* 898 */ "Press Enter to save the filter", /* 899 */ "Today is jubilee of {0}", /* 900 */ "Tomorrow is jubilee of {0}", diff --git a/projects/GKv2/GEDKeeper2/GKUI/Forms/RecordSelectDlg.cs b/projects/GKv2/GEDKeeper2/GKUI/Forms/RecordSelectDlg.cs index 6f36c792f..809cb54a6 100644 --- a/projects/GKv2/GEDKeeper2/GKUI/Forms/RecordSelectDlg.cs +++ b/projects/GKv2/GEDKeeper2/GKUI/Forms/RecordSelectDlg.cs @@ -81,11 +81,11 @@ public RecordSelectDlg(IBaseWindow baseWin, GDMRecordType recType) protected override void Dispose(bool disposing) { if (disposing) { - /*if (fChangeTimer != null) { + if (fChangeTimer != null) { fChangeTimer.Stop(); fChangeTimer.Dispose(); fChangeTimer = null; - }*/ + } } base.Dispose(disposing); } @@ -128,11 +128,11 @@ private void btnCreate_Click(object sender, EventArgs e) } } - //private System.Timers.Timer fChangeTimer; + private System.Timers.Timer fChangeTimer; private void txtFastFilter_TextChanged(object sender, EventArgs e) { - /*if (!AppHost.TEST_MODE) { + if (!AppHost.TEST_MODE) { if (fChangeTimer == null) { fChangeTimer = new System.Timers.Timer(500); fChangeTimer.AutoReset = false; @@ -145,13 +145,13 @@ private void txtFastFilter_TextChanged(object sender, EventArgs e) fChangeTimer.Start(); } else { fController.UpdateView(); - }*/ + } } private void txtFastFilter_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { - fController.UpdateView(); + fController.ChangeFilter(); e.Handled = true; } } diff --git a/projects/GKv3/GEDKeeper3/GKUI/Forms/RecordSelectDlg.cs b/projects/GKv3/GEDKeeper3/GKUI/Forms/RecordSelectDlg.cs index fcf807582..1f7aec744 100644 --- a/projects/GKv3/GEDKeeper3/GKUI/Forms/RecordSelectDlg.cs +++ b/projects/GKv3/GEDKeeper3/GKUI/Forms/RecordSelectDlg.cs @@ -133,13 +133,13 @@ private void btnCreate_Click(object sender, EventArgs e) private void txtFastFilter_TextChanged(object sender, EventArgs e) { - //fController.UpdateView(); + fController.UpdateView(); } private void txtFastFilter_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Keys.Enter) { - fController.UpdateView(); + fController.ChangeFilter(); e.Handled = true; } }