Skip to content

Commit

Permalink
Bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Serg-Norseman committed Apr 13, 2023
1 parent 20b0856 commit 085e031
Show file tree
Hide file tree
Showing 15 changed files with 29 additions and 24 deletions.
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion locales/Chinese Simplified.lng
Original file line number Diff line number Diff line change
Expand Up @@ -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}
2 changes: 1 addition & 1 deletion locales/English.lng
Original file line number Diff line number Diff line change
Expand Up @@ -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}
2 changes: 1 addition & 1 deletion locales/czech.lng
Original file line number Diff line number Diff line change
Expand Up @@ -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í
2 changes: 1 addition & 1 deletion locales/french.lng
Original file line number Diff line number Diff line change
Expand Up @@ -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}
2 changes: 1 addition & 1 deletion locales/german.lng
Original file line number Diff line number Diff line change
Expand Up @@ -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}
2 changes: 1 addition & 1 deletion locales/italian.lng
Original file line number Diff line number Diff line change
Expand Up @@ -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}
2 changes: 1 addition & 1 deletion locales/kazakh_cyrillic.lng
Original file line number Diff line number Diff line change
Expand Up @@ -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}
2 changes: 1 addition & 1 deletion locales/polish.lng
Original file line number Diff line number Diff line change
Expand Up @@ -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}
2 changes: 1 addition & 1 deletion locales/russian.lng
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@
895=Обновить
896=Сбросить фильтр
897=Сокращать диапазоны дат
898=Нажмите Enter чтобы применить
898=Нажмите Enter чтобы сохранить фильтр
899=Сегодня юбилей {0}
900=Завтра юбилей {0}
901={1} дней осталось до юбилея {0}
2 changes: 1 addition & 1 deletion locales/ukrainian.lng
Original file line number Diff line number Diff line change
Expand Up @@ -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}
12 changes: 8 additions & 4 deletions projects/GKCore/GKCore/Controllers/RecordSelectDlgController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 + "*";
}

Expand Down Expand Up @@ -134,7 +138,7 @@ public override void SetLocale()
GetControl<IButton>("btnSelect").Text = LangMan.LS(LSID.LSID_DlgSelect);
GetControl<IButton>("btnCancel").Text = LangMan.LS(LSID.LSID_DlgCancel);

SetToolTip("txtFastFilter", LangMan.LS(LSID.LSID_PressEnterToApply));
SetToolTip("txtFastFilter", LangMan.LS(LSID.LSID_PressEnterToSaveFilter));
}
}
}
4 changes: 2 additions & 2 deletions projects/GKCore/GKCore/LangMan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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}",
Expand Down
12 changes: 6 additions & 6 deletions projects/GKv2/GEDKeeper2/GKUI/Forms/RecordSelectDlg.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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;
Expand All @@ -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;
}
}
Expand Down
4 changes: 2 additions & 2 deletions projects/GKv3/GEDKeeper3/GKUI/Forms/RecordSelectDlg.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 085e031

Please sign in to comment.