Skip to content

Commit

Permalink
Added the feature of selecting and exporting a separate list of recor…
Browse files Browse the repository at this point in the history
…ds (notes, multimedia, locations) to a GEDCOM file
  • Loading branch information
Serg-Norseman committed Jun 28, 2024
1 parent e86aefa commit 6302ede
Show file tree
Hide file tree
Showing 29 changed files with 262 additions and 164 deletions.
2 changes: 2 additions & 0 deletions locales/Afrikaans.lng
Original file line number Diff line number Diff line change
Expand Up @@ -992,3 +992,5 @@
980=Single Bevels
981=Double Bevels
982=Cross Corners

983=Select list
2 changes: 2 additions & 0 deletions locales/Belarusian.lng
Original file line number Diff line number Diff line change
Expand Up @@ -992,3 +992,5 @@
980=Single Bevels
981=Double Bevels
982=Cross Corners

983=Select list
2 changes: 2 additions & 0 deletions locales/Chinese Simplified.lng
Original file line number Diff line number Diff line change
Expand Up @@ -992,3 +992,5 @@
980=Single Bevels
981=Double Bevels
982=Cross Corners

983=Select list
2 changes: 2 additions & 0 deletions locales/Dutch.lng
Original file line number Diff line number Diff line change
Expand Up @@ -992,3 +992,5 @@
980=Single Bevels
981=Double Bevels
982=Cross Corners

983=Select list
2 changes: 2 additions & 0 deletions locales/English.lng
Original file line number Diff line number Diff line change
Expand Up @@ -992,3 +992,5 @@
980=Single Bevels ; tree border style
981=Double Bevels ; tree border style
982=Cross Corners ; tree border style

983=Select list
2 changes: 2 additions & 0 deletions locales/Hungarian.lng
Original file line number Diff line number Diff line change
Expand Up @@ -992,3 +992,5 @@
980=Single Bevels
981=Double Bevels
982=Cross Corners

983=Select list
2 changes: 2 additions & 0 deletions locales/Icelandic.lng
Original file line number Diff line number Diff line change
Expand Up @@ -992,3 +992,5 @@
980=Single Bevels
981=Double Bevels
982=Cross Corners

983=Select list
2 changes: 2 additions & 0 deletions locales/Japanese.lng
Original file line number Diff line number Diff line change
Expand Up @@ -992,3 +992,5 @@
980=Single Bevels
981=Double Bevels
982=Cross Corners

983=Select list
2 changes: 2 additions & 0 deletions locales/Kazakh (Cyrillic).lng
Original file line number Diff line number Diff line change
Expand Up @@ -992,3 +992,5 @@
980=Single Bevels
981=Double Bevels
982=Cross Corners

983=Select list
2 changes: 2 additions & 0 deletions locales/Portuguese.lng
Original file line number Diff line number Diff line change
Expand Up @@ -992,3 +992,5 @@
980=Single Bevels
981=Double Bevels
982=Cross Corners

983=Select list
2 changes: 2 additions & 0 deletions locales/Serbian (Latin).lng
Original file line number Diff line number Diff line change
Expand Up @@ -992,3 +992,5 @@
980=Single Bevels
981=Double Bevels
982=Cross Corners

983=Select list
2 changes: 2 additions & 0 deletions locales/Spanish.lng
Original file line number Diff line number Diff line change
Expand Up @@ -992,3 +992,5 @@
980=Single Bevels
981=Double Bevels
982=Cross Corners

983=Select list
2 changes: 2 additions & 0 deletions locales/czech.lng
Original file line number Diff line number Diff line change
Expand Up @@ -992,3 +992,5 @@
980=Single Bevels
981=Double Bevels
982=Cross Corners

983=Select list
2 changes: 2 additions & 0 deletions locales/french.lng
Original file line number Diff line number Diff line change
Expand Up @@ -992,3 +992,5 @@
980=Single Bevels
981=Double Bevels
982=Cross Corners

983=Select list
2 changes: 2 additions & 0 deletions locales/german.lng
Original file line number Diff line number Diff line change
Expand Up @@ -992,3 +992,5 @@
980=Single Bevels
981=Double Bevels
982=Cross Corners

983=Select list
1 change: 1 addition & 0 deletions locales/help_enu/gkhHistory.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ <h1>Change log</h1>

<p>
<b>14.06.2024 [v2.30.1 &amp; v3.6.1]</b><ul>
<li>The feature of selecting and exporting a separate list of records (notes, multimedia, locations) to a GEDCOM file has been added to the database splitting tool.
<li>Added saving of column width settings for all lists.
<li>Completed Spanish localization [Miguel Á. Pérez Valdenebro].
<li>Added remembering and the feature to select from a list of causes and agencies of events.
Expand Down
1 change: 1 addition & 0 deletions locales/help_rus/gkhHistory.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ <h1>История версий</h1>

<p>
<b>14.06.2024 [v2.30.1 &amp; v3.6.1]</b><ul>
<li>В инструмент разделения базы данных добавлена фича выбора и экспорта отдельного списка записей (заметки, мультимедиа, локации) в GEDCOM-файл.
<li>Добавлено запоминание настроек ширины столбцов всех списков.
<li>Завершена локализация на испанский язык [Miguel Á. Pérez Valdenebro].
<li>Добавлено запоминание и возможность выбора из списка причин и удостоверяющих организаций событий.
Expand Down
2 changes: 2 additions & 0 deletions locales/italian.lng
Original file line number Diff line number Diff line change
Expand Up @@ -992,3 +992,5 @@
980=Single Bevels
981=Double Bevels
982=Cross Corners

983=Select list
2 changes: 2 additions & 0 deletions locales/polish.lng
Original file line number Diff line number Diff line change
Expand Up @@ -992,3 +992,5 @@
980=Single Bevels
981=Double Bevels
982=Cross Corners

983=Select list
2 changes: 2 additions & 0 deletions locales/russian.lng
Original file line number Diff line number Diff line change
Expand Up @@ -992,3 +992,5 @@
980=Одинарные скосы
981=Двойные скосы
982=Перекрестные углы

983=Выбрать список
2 changes: 2 additions & 0 deletions locales/ukrainian.lng
Original file line number Diff line number Diff line change
Expand Up @@ -992,3 +992,5 @@
980=Single Bevels
981=Double Bevels
982=Cross Corners

983=Select list
28 changes: 25 additions & 3 deletions projects/GKCore/GKCore/Controllers/TreeSplitController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ namespace GKCore.Controllers
/// </summary>
public class TreeSplitController : DialogController<ITreeSplitDlg>
{
private bool fIndiMode;
private readonly List<GDMRecord> fSplitList;

public TreeSplitController(ITreeSplitDlg view) : base(view)
Expand All @@ -55,7 +56,7 @@ public override void UpdateView()
int num = tree.RecordsCount;
for (int i = 0; i < num; i++) {
GDMRecord rec = tree[i];
if (rec is GDMIndividualRecord) {
if (fIndiMode && rec is GDMIndividualRecord) {
cnt++;
GDMIndividualRecord iRec = rec as GDMIndividualRecord;
string st = iRec.XRef + " / " + GKUtils.GetNameString(iRec, false);
Expand All @@ -65,6 +66,14 @@ public override void UpdateView()
} else {
fView.SelectedList.AddItem(null, st);
}
} else {
string st = rec.XRef + " / " + GKUtils.GetRecordName(tree, rec, false);

if (fSplitList.IndexOf(rec) < 0) {
//fView.SkippedList.AddItem(null, st);
} else {
fView.SelectedList.AddItem(null, st);
}
}
}
fView.Title = fSplitList.Count.ToString() + @" / " + cnt.ToString();
Expand All @@ -76,6 +85,7 @@ public override void UpdateView()

public void Select(TreeTools.TreeWalkMode walkMode)
{
fIndiMode = true;
Select(fBase.GetSelectedPerson(), walkMode);
}

Expand All @@ -92,6 +102,17 @@ public void Select(GDMIndividualRecord startPerson, TreeTools.TreeWalkMode walkM
UpdateView();
}

public void SelectList()
{
fIndiMode = false;

fSplitList.Clear();
var baseList = fBase.GetContentList(fBase.GetSelectedRecordType());
fSplitList.AddRange(baseList);

UpdateView();
}

public async void Delete()
{
int num = fSplitList.Count;
Expand Down Expand Up @@ -140,11 +161,12 @@ public override void SetLocale()
GetControl<IButton>("btnSelectFamily").Text = LangMan.LS(LSID.SelFamily);
GetControl<IButton>("btnSelectAncestors").Text = LangMan.LS(LSID.SelAncestors);
GetControl<IButton>("btnSelectDescendants").Text = LangMan.LS(LSID.SelDescendants);
GetControl<IButton>("btnSelectList").Text = LangMan.LS(LSID.SelList);
GetControl<IButton>("btnDelete").Text = LangMan.LS(LSID.DoDelete);
GetControl<IButton>("btnSave").Text = LangMan.LS(LSID.MIFileSaveAs);

fView.SelectedList.AddColumn(LangMan.LS(LSID.Person), 300, false);
fView.SkippedList.AddColumn(LangMan.LS(LSID.Person), 300, false);
fView.SelectedList.AddColumn(LangMan.LS(LSID.Record), 300, false);
fView.SkippedList.AddColumn(LangMan.LS(LSID.Record), 300, false);
}
}
}
6 changes: 5 additions & 1 deletion projects/GKCore/GKCore/LangMan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,9 @@ public enum LSID
/* 981 */ TBS_DoubleBevels,
/* 982 */ TBS_CrossCorners,

/* 000 */ Last = TBS_CrossCorners
/* 983 */ SelList,

/* 000 */ Last = SelList
}


Expand Down Expand Up @@ -2067,6 +2069,8 @@ public static class LangMan
/* 980 */ "Single Bevels",
/* 981 */ "Double Bevels",
/* 982 */ "Cross Corners",

/* 983 */ "Select list",
};

private static readonly LangManager fLangMan = new LangManager();
Expand Down
Loading

0 comments on commit 6302ede

Please sign in to comment.