Skip to content

Commit e3835d8

Browse files
Sync addons-source@maintenance/gramps61 with upstream/gramps-project (2026-05-27)
2 parents fe9a87d + 7f9d2ce commit e3835d8

56 files changed

Lines changed: 2136 additions & 1060 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CombinedView/combinedview.gpr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
id="combinedview",
2424
name=_("Combined"),
2525
description=_("A view showing relationships and events for a person"),
26-
version = '2.0.17',
26+
version = '2.0.18',
2727
gramps_target_version="6.1",
2828
status=STABLE,
2929
fname="combinedview.py",

CombinedView/combinedview.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,8 @@ def filter_editor(self, *obj):
474474
return
475475

476476
def edit_active(self, *obj):
477-
self.active_page.edit_active()
477+
if self.active_page is not None:
478+
self.active_page.edit_active()
478479

479480
def change_db(self, db):
480481
#reset the connects
@@ -498,9 +499,18 @@ def object_changed(self, obj_type, handle):
498499
def change_object(self, obj_tuple):
499500

500501
if obj_tuple is None:
502+
# No active object, e.g. the family tree was closed. Clear the
503+
# display instead of leaving people from the closed tree on
504+
# screen: their handles no longer resolve, so editing one would
505+
# raise HandleError (bug #12572, bug #14226).
506+
for page in self.pages.values():
507+
page.disable_actions(self.uimanager)
508+
self.uimanager.update_menu()
509+
list(map(self.header.remove, self.header.get_children()))
510+
list(map(self.stack.remove, self.stack.get_children()))
511+
self.active_page = None
501512
return
502513

503-
504514
if self.redrawing:
505515
return False
506516
self.redrawing = True

GrampsWebSync/grampswebsync.gpr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
id="gramps_web_sync",
2929
name=_("Gramps Web Sync"),
3030
description=_("Synchronizes a local database with a Gramps Web instance."),
31-
version = '1.3.11',
31+
version = '1.3.12',
3232
gramps_target_version="6.1",
3333
status=STABLE,
3434
fname="grampswebsync.py",

GrampsWebSync/grampswebsync.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ def __init__(self, dbstate, user, options_class, name, *args, **kwargs) -> None:
180180

181181
self.db1 = dbstate.db
182182
self.db2 = None
183+
self._closing = False
183184
self._download_timestamp = 0
184185
self._changes: Actions | None = None
185186
self._sync: WebApiSyncDiffHandler | None = None
@@ -213,6 +214,14 @@ def build_menu_names(self, obj): # type: ignore
213214
def do_close(self, assistant):
214215
"""Close the assistant."""
215216
LOG.debug("Closing Gramps Web Sync addon.")
217+
self._closing = True
218+
if self.db2 is not None:
219+
LOG.debug("Closing in-memory remote database.")
220+
self.db2.close()
221+
self.db2 = None
222+
# Clear the diff handler which holds references to both db1 and db2
223+
self._sync = None
224+
self._changes = None
216225
position = self.window.get_position() # crock
217226
self.assistant.hide()
218227
self.window.move(position[0], position[1])
@@ -500,6 +509,8 @@ def async_compare_dbs(self):
500509

501510
def get_diff_actions(self) -> None:
502511
"""Download the remote data, import it and compare it to local."""
512+
if self._closing:
513+
return
503514
LOG.info("Downloading Gramps XML file.")
504515
path = self.handle_server_errors(self.api.download_xml)
505516
if path is None:
@@ -545,6 +556,8 @@ def async_transfer_media(self):
545556

546557
def _async_transfer_media(self):
547558
"""Upload/download media files."""
559+
if self._closing:
560+
return
548561
self.handle_server_errors(self.download_files)
549562
if self.conclusion.error:
550563
return
@@ -665,6 +678,8 @@ def _async_commit_actions_to_remote(
665678
self, payload: dict[str, "Any"], force: bool
666679
) -> None:
667680
"""Upload/download media files."""
681+
if self._closing:
682+
return
668683
LOG.debug("Committing changes to remote database.")
669684
self.handle_server_errors(
670685
self.api.commit,

HasTagSubstr/hastagsubstr.gpr.py

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
#
2+
# Gramps - a GTK+/GNOME based genealogy program
3+
#
4+
# Copyright (C) 2025 Doug Blank <doug.blank@gmail.com>
5+
#
6+
# This program is free software; you can redistribute it and/or modify
7+
# it under the terms of the GNU General Public License as published by
8+
# the Free Software Foundation; either version 2 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# This program is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU General Public License
17+
# along with this program; if not, write to the Free Software
18+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19+
#
20+
"""Filter rules to match objects with a tag whose name contains a substring."""
21+
22+
register(
23+
RULE,
24+
id="PersonHasTagSubstr",
25+
name=_("People with a tag containing <substring>"),
26+
description=_("Matches people with a tag whose name contains the given substring"),
27+
version = '1.0.1',
28+
authors=["Doug Blank"],
29+
authors_email=["doug.blank@gmail.com"],
30+
gramps_target_version="6.1",
31+
status=STABLE,
32+
fname="hastagsubstr.py",
33+
ruleclass="PersonHasTagSubstr",
34+
namespace="Person",
35+
)
36+
37+
register(
38+
RULE,
39+
id="FamilyHasTagSubstr",
40+
name=_("Families with a tag containing <substring>"),
41+
description=_(
42+
"Matches families with a tag whose name contains the given substring"
43+
),
44+
version = '1.0.1',
45+
authors=["Doug Blank"],
46+
authors_email=["doug.blank@gmail.com"],
47+
gramps_target_version="6.1",
48+
status=STABLE,
49+
fname="hastagsubstr.py",
50+
ruleclass="FamilyHasTagSubstr",
51+
namespace="Family",
52+
)
53+
54+
register(
55+
RULE,
56+
id="EventHasTagSubstr",
57+
name=_("Events with a tag containing <substring>"),
58+
description=_(
59+
"Matches events with a tag whose name contains the given substring"
60+
),
61+
version = '1.0.1',
62+
authors=["Doug Blank"],
63+
authors_email=["doug.blank@gmail.com"],
64+
gramps_target_version="6.1",
65+
status=STABLE,
66+
fname="hastagsubstr.py",
67+
ruleclass="EventHasTagSubstr",
68+
namespace="Event",
69+
)
70+
71+
register(
72+
RULE,
73+
id="PlaceHasTagSubstr",
74+
name=_("Places with a tag containing <substring>"),
75+
description=_(
76+
"Matches places with a tag whose name contains the given substring"
77+
),
78+
version = '1.0.1',
79+
authors=["Doug Blank"],
80+
authors_email=["doug.blank@gmail.com"],
81+
gramps_target_version="6.1",
82+
status=STABLE,
83+
fname="hastagsubstr.py",
84+
ruleclass="PlaceHasTagSubstr",
85+
namespace="Place",
86+
)
87+
88+
register(
89+
RULE,
90+
id="SourceHasTagSubstr",
91+
name=_("Sources with a tag containing <substring>"),
92+
description=_(
93+
"Matches sources with a tag whose name contains the given substring"
94+
),
95+
version = '1.0.1',
96+
authors=["Doug Blank"],
97+
authors_email=["doug.blank@gmail.com"],
98+
gramps_target_version="6.1",
99+
status=STABLE,
100+
fname="hastagsubstr.py",
101+
ruleclass="SourceHasTagSubstr",
102+
namespace="Source",
103+
)
104+
105+
register(
106+
RULE,
107+
id="CitationHasTagSubstr",
108+
name=_("Citations with a tag containing <substring>"),
109+
description=_(
110+
"Matches citations with a tag whose name contains the given substring"
111+
),
112+
version = '1.0.1',
113+
authors=["Doug Blank"],
114+
authors_email=["doug.blank@gmail.com"],
115+
gramps_target_version="6.1",
116+
status=STABLE,
117+
fname="hastagsubstr.py",
118+
ruleclass="CitationHasTagSubstr",
119+
namespace="Citation",
120+
)
121+
122+
register(
123+
RULE,
124+
id="RepositoryHasTagSubstr",
125+
name=_("Repositories with a tag containing <substring>"),
126+
description=_(
127+
"Matches repositories with a tag whose name contains the given substring"
128+
),
129+
version = '1.0.1',
130+
authors=["Doug Blank"],
131+
authors_email=["doug.blank@gmail.com"],
132+
gramps_target_version="6.1",
133+
status=STABLE,
134+
fname="hastagsubstr.py",
135+
ruleclass="RepositoryHasTagSubstr",
136+
namespace="Repository",
137+
)
138+
139+
register(
140+
RULE,
141+
id="MediaHasTagSubstr",
142+
name=_("Media objects with a tag containing <substring>"),
143+
description=_(
144+
"Matches media objects with a tag whose name contains the given substring"
145+
),
146+
version = '1.0.1',
147+
authors=["Doug Blank"],
148+
authors_email=["doug.blank@gmail.com"],
149+
gramps_target_version="6.1",
150+
status=STABLE,
151+
fname="hastagsubstr.py",
152+
ruleclass="MediaHasTagSubstr",
153+
namespace="Media",
154+
)
155+
156+
register(
157+
RULE,
158+
id="NoteHasTagSubstr",
159+
name=_("Notes with a tag containing <substring>"),
160+
description=_(
161+
"Matches notes with a tag whose name contains the given substring"
162+
),
163+
version = '1.0.1',
164+
authors=["Doug Blank"],
165+
authors_email=["doug.blank@gmail.com"],
166+
gramps_target_version="6.1",
167+
status=STABLE,
168+
fname="hastagsubstr.py",
169+
ruleclass="NoteHasTagSubstr",
170+
namespace="Note",
171+
)

0 commit comments

Comments
 (0)