Skip to content

Commit

Permalink
Small updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Serg-Norseman committed May 30, 2023
1 parent b2422b7 commit d2c1328
Show file tree
Hide file tree
Showing 9 changed files with 94 additions and 12 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## 30.05.2023 [v2.26.1 & v3.2.1]
- Fixed font selection in tree diagram options (GKv3).
- Missing text issue on very large tree diagrams with very small font (GKv3) is partially resolved.
- Added option (tree diagram window, mode menu) to display person IDs in trees (GKv2/3).
- Crash when saving very wide trees to bitmap files (GKv2/3) has been fixed.
- Fixed output and saving trees with background color or image to file (GKv2/3).
- Fixed display of the Russian language when executing scripts (GKv3).
- Adjusted line colors in trees (GKv2/3).
- Fixed display of notes in lists (GKv3).
- The display of portraits in the person edit dialog (GKv2) has been fixed.

## 14.05.2023 [v2.26.0/Windows & v3.2.0/Linux,MacOS,Windows]
- Added an option to remember the overall size of the records info panels.
- Added control and closing of dependent windows when the main one is closed.
Expand Down
2 changes: 1 addition & 1 deletion deploy/DEBIAN/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ gedkeeper (3.2.1-1~rc1) unstable; urgency=low
* Packaged release
* See changelog.md for changes

-- Sergey V. Zhdanovskih (aka Norseman) <[email protected]> 14 May 2023 00:00:00 +0300
-- Sergey V. Zhdanovskih (aka Norseman) <[email protected]> 30 May 2023 00:00:00 +0300
2 changes: 1 addition & 1 deletion deploy/gedkeeper.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<developer_name>Sergey V. Zhdanovskih</developer_name>

<releases>
<release version="3.2.1" date="2023-05-14">
<release version="3.2.1" date="2023-05-30">
<description>
</description>
</release>
Expand Down
14 changes: 14 additions & 0 deletions locales/help_enu/gkhHistory.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,20 @@

<h1>Change log</h1>

<p>
<b>30.05.2023 [v2.26.1 &amp; v3.2.1]</b><ul>
<li>Fixed font selection in tree diagram options (GKv3).
<li>Missing text issue on very large tree diagrams with very small font (GKv3) is partially resolved.
<li>Added option (tree diagram window, mode menu) to display person IDs in trees (GKv2/3).
<li>Crash when saving very wide trees to bitmap files (GKv2/3) has been fixed.
<li>Fixed output and saving trees with background color or image to file (GKv2/3).
<li>Fixed display of the Russian language when executing scripts (GKv3).
<li>Adjusted line colors in trees (GKv2/3).
<li>Fixed display of notes in lists (GKv3).
<li>The display of portraits in the person edit dialog (GKv2) has been fixed.
</ul>
</p>

<p>
<b>14.05.2023 [v2.26.0/Windows &amp; v3.2.0/Linux,MacOS,Windows]</b><ul>
<li>Added an option to remember the overall size of the records info panels.
Expand Down
2 changes: 1 addition & 1 deletion locales/help_rus/gkhHistory.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<h1>История версий</h1>

<p>
<b>??.??.2023 [v2.26.1 &amp; v3.2.1]</b><ul>
<b>30.05.2023 [v2.26.1 &amp; v3.2.1]</b><ul>
<li>Исправлен выбор шрифта в опциях диаграмм деревьев (GKv3).
<li>Частично решена проблема пропадающего текста на очень больших диаграммах деревьев с очень маленьким шрифтом (GKv3).
<li>Добавлена опция (окно диаграмм деревьев, меню режимов) отображения идентификаторов персон в деревьях (GKv2/3).
Expand Down
7 changes: 7 additions & 0 deletions projects/GKCore/GKCore/GKData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ public static class GKData
public const string APP_VERSION_2X = "2.26.1.0";
public const string APP_VERSION_3X = "3.2.1.0";

#if !GK3
public const string UpdateURL = "https://sourceforge.net/projects/gedkeeper/files/gk_version.xml";
#else
public const string UpdateURL = "https://sourceforge.net/projects/gedkeeper/files/gk3_version.xml";
#endif


public const string APP_MAIL = "[email protected]";

public const string APP_FORUM_EN = "https://groups.google.com/g/gedkeeper-en";
Expand Down
14 changes: 6 additions & 8 deletions projects/GKCore/GKCore/UpdateMan.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* "GEDKeeper", the personal genealogical database editor.
* Copyright (C) 2009-2020 by Sergey V. Zhdanovskih.
* Copyright (C) 2009-2023 by Sergey V. Zhdanovskih.
*
* This file is part of "GEDKeeper".
*
Expand Down Expand Up @@ -32,8 +32,6 @@ namespace GKCore
/// </summary>
public static class UpdateMan
{
private const string UpdateURL = "https://sourceforge.net/projects/gedkeeper/files/gk_version.xml";

public static Version GetLastVersion(out string url)
{
Version newVersion = null;
Expand All @@ -43,7 +41,7 @@ public static Version GetLastVersion(out string url)
try {
GKUtils.InitSecurityProtocol();

HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(UpdateURL);
HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(GKData.UpdateURL);
webRequest.ContentType = "text/xml; encoding='utf-8'";
webRequest.KeepAlive = false;
webRequest.Method = "GET";
Expand Down Expand Up @@ -96,12 +94,12 @@ private static void WorkerMethod()
if (newVersion == null) return;

if (curVersion.CompareTo(newVersion) < 0) {
#if !CI_MODE
#if !CI_MODE
string question = LangMan.LS(LSID.LSID_UpdateToLatestVersion, curVersion, newVersion);
if (AppHost.StdDialogs.ShowQuestionYN(question)) {
Process.Start(url);
}
#endif
#endif
}
} catch (Exception ex) {
Logger.WriteError("UpdateMan.WorkerMethod()", ex);
Expand All @@ -111,7 +109,7 @@ private static void WorkerMethod()
public static void CheckUpdate()
{
try {
#if OS_LINUX
#if OS_LINUX
DesktopType desktopType = SysUtils.GetDesktopType();
if (desktopType == DesktopType.Unity) {
// In Ubuntu 1604 LTS (Unity desktop), this method leads to a
Expand All @@ -120,7 +118,7 @@ public static void CheckUpdate()
Logger.WriteInfo("UpdateMan.CheckUpdate(): is not supported for Unity");
return;
}
#endif
#endif

Thread worker = new Thread(WorkerMethod);
worker.SetApartmentState(ApartmentState.STA);
Expand Down
2 changes: 1 addition & 1 deletion projects/GKTests/GKCore/GKUtilsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ public void Test_GetMarriageDate()
public void Test_TruncateStrings()
{
string test = GKUtils.TruncateStrings(new GDMLines("sample text for truncate"), 10);
Assert.AreEqual("sample tex...", test);
Assert.AreEqual("sample tex", test);
}

[Test]
Expand Down
52 changes: 52 additions & 0 deletions scripts/export_descendants_dates_csv.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
function do_descendants(individual, level, ix)
if (individual ~= nil) then
local dbirth = "";
local ddeath = "";
for at = 0, get_individual_events_count(individual) - 1 do
local evt = get_individual_event(individual, at);
local ev_name = get_event_name(evt);
local ev_date = get_event_date(evt);

if (ev_date ~= nil) then
if ((ev_name == "BIRT") and (dbirth == "")) then
dbirth = ""..ev_date;
end

if ((ev_name == "DEAT") and (ddeath == "")) then
ddeath = ""..ev_date;
end
end
end

ix = ix + 1;
csv_write_cell(""..ix);
csv_write_cell(""..level);
csv_write_cell(get_individual_name(individual));
csv_write_cell(dbirth);
csv_write_cell(ddeath);

local spouses = get_individual_spouses_count(individual);
for i = 0, spouses-1 do
local spouse_family = get_individual_spouse_family(individual, i);
local childs = get_family_childs_count(spouse_family);

for k = 0, childs-1 do
local child = get_family_child(spouse_family, k);
do_descendants(child, level + 1, ix);
end
end
end
end


prs = select_record(rtIndividual);
csv_name = select_new_file();
cols = 5;
rows = 1000;
csv_create(csv_name, cols, rows);
csv_write_cell("Номер"); csv_write_cell("Уровень"); csv_write_cell("Имя"); csv_write_cell("Дата рождения"); csv_write_cell("Дата смерти");

do_descendants(prs, 0, 0);

print("Новый CSV-файл: "..csv_name..", столбцов: "..cols..", строк: "..rows);
csv_close();

0 comments on commit d2c1328

Please sign in to comment.