Skip to content

Commit e5884fe

Browse files
Sync addons-source@maintenance/gramps60 with upstream/gramps-project (2026-06-05)
2 parents 3685448 + 779a41b commit e5884fe

22 files changed

Lines changed: 1175 additions & 27 deletions

ChatWithTree/ChatWithTree.gpr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
id="ChatWithTree", # Unique ID for your addon
99
name=_("Chat With Tree Interactive Addon"), # Display name in Gramps, translatable
1010
description=_("Chat With Tree with the help of AI Large Language Model, needs litellm module"),
11-
version = '0.0.28',
11+
version = '0.0.29',
1212
gramps_target_version="6.0", # Specify the Gramps version you are targeting
1313
status=STABLE,
1414
audience=EVERYONE,

ChatWithTree/ChatWithTree.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,27 +171,41 @@ def _apply_css_styles(self):
171171
Defines and applies CSS styles to the Gramplet's widgets.
172172
"""
173173
css_provider = Gtk.CssProvider()
174+
# The message-bubble backgrounds are intentionally light pastels
175+
# (Mantis 14143) -- they colour-code message type and were chosen
176+
# against a white parent. The foreground was implicitly the GTK
177+
# theme's default, which is LIGHT under a dark theme -- so the
178+
# result was light-on-light text. Lock the foreground to black
179+
# for the bubble classes so the contrast holds regardless of the
180+
# active GTK theme. The chat listbox background is also locked
181+
# so the empty-chat area doesn't go dark-on-white in dark mode.
174182
css = """
175183
#chat-listbox {
176184
background-color: white;
185+
color: black;
177186
}
178187
.message-box {
179188
background-color: #f0f0f0; /* Default background */
189+
color: black;
180190
padding: 10px;
181191
margin: 5px;
182192
border-radius: 15px;
183193
}
184194
.user-message-box {
185195
background-color: #dcf8c6; /* Light green for user messages */
196+
color: black;
186197
}
187198
.tree-reply-box {
188199
background-color: #d1e2f4; /* Light blue for replies */
200+
color: black;
189201
}
190202
.error-reply-box {
191203
background-color: #f4e2d1; /* Light red for errors */
204+
color: black;
192205
}
193206
.tree-toolcall-box {
194207
background-color: #fce8b2; /* Light yellow for tool calls */
208+
color: black;
195209
}
196210
197211
"""

DynamicWeb/dynamicweb.gpr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
id="DynamicWeb",
1616
name=_("Dynamic Web Report"),
1717
description=_("Produces dynamic web pages for the database"),
18-
version = '0.0.101',
18+
version = '0.0.102',
1919
gramps_target_version="6.0",
2020
status=STABLE,
2121
fname="dynamicweb.py",

DynamicWeb/templates/dwr_default/data/dwr.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3601,7 +3601,15 @@ function mapUpdate()
36013601
{
36023602
var OsmPointStyle = function(feature, resolution)
36033603
{
3604-
var x_marker = parseInt(feature.values_.name.replace('OsmPopup', ''));
3604+
// Mantis 12544: use the documented OpenLayers feature.get(prop)
3605+
// API rather than reaching into the private feature.values_
3606+
// state. OpenLayers renamed/restructured the internal property
3607+
// store, so feature.values_.name became undefined and the
3608+
// .replace() call below raised "Cannot read properties of
3609+
// undefined (reading 'name')" -- breaking OSM markers entirely.
3610+
// The OsmClick handler below already uses feature.get('name')
3611+
// for the same property; this aligns the style callback with it.
3612+
var x_marker = parseInt(feature.get('name').replace('OsmPopup', ''));
36053613
var ip = GetIconProps(x_marker);
36063614
var iconStyle = new ol.style.Style({
36073615
image: new ol.style.Icon(({

Form/CensusCheckQuickview.gpr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
id = 'censuscheckquickview',
99
name = _("CensusCheck"),
1010
description= _("Check whether any Census events are missing for a person and some of their descendents"),
11-
version = '1.0.4',
11+
version = '1.0.5',
1212
gramps_target_version = '6.0',
1313
status = STABLE,
1414
fname = 'CensusCheckQuickview.py',
@@ -22,7 +22,7 @@
2222
id = 'censuscheckupquickview',
2323
name = _("CensusCheckUp"),
2424
description= _("Check whether any Census events are missing for a person and some of their ancestors"),
25-
version = '1.0.4',
25+
version = '1.0.5',
2626
gramps_target_version = '6.0',
2727
status = STABLE,
2828
fname = 'CensusCheckUpQuickview.py',

Form/editform.py

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
Person,
6464
Family,
6565
Attribute,
66+
Source,
6667
)
6768
from gramps.gen.db import DbTxn
6869
from gramps.gen.display.name import displayer as name_displayer
@@ -380,6 +381,20 @@ def save(self, button):
380381
if not self.event.get_handle():
381382
self.db.add_event(self.event, trans)
382383

384+
# Mantis 11054 (nick_h's narrow guard): if the source the
385+
# citation references was deleted while this form was open,
386+
# write a replacement source rather than committing a
387+
# dangling-reference citation. No behaviour change when the
388+
# reference is intact.
389+
source_handle = self.citation.get_reference_handle()
390+
if source_handle and self.db.get_source_from_handle(source_handle) is None:
391+
replacement = Source()
392+
replacement.set_title(
393+
_("[Source recreated after deletion mid-form-edit]")
394+
)
395+
self.db.add_source(replacement, trans)
396+
self.citation.set_reference_handle(replacement.get_handle())
397+
383398
citation_handle = self.citation.get_handle()
384399
if not self.citation.get_handle():
385400
self.db.add_citation(self.citation, trans)
@@ -891,6 +906,12 @@ def save(self, trans):
891906
for order, row in enumerate(self.model):
892907
all_people.append(row[0])
893908
person = self.db.get_person_from_handle(row[0])
909+
# Mantis 11054 (nick_h's narrow guard): if the person was
910+
# deleted while this form was open, drop the row rather than
911+
# commit a None-target reference. No behaviour change when
912+
# the reference is intact.
913+
if person is None:
914+
continue
894915
event_ref = get_event_ref(self.event, person, self.role)
895916

896917
# Write attributes
@@ -903,6 +924,10 @@ def save(self, trans):
903924
# Remove links to people no longer on form
904925
for handle in set(self.initial_people) - set(all_people):
905926
person = self.db.get_person_from_handle(handle)
927+
# Mantis 11054: same narrow guard — the person we tried to
928+
# detach is already gone, nothing to commit.
929+
if person is None:
930+
continue
906931
ref_list = [
907932
event_ref
908933
for event_ref in person.get_event_ref_list()
@@ -1061,6 +1086,11 @@ def save(self, trans):
10611086
return
10621087

10631088
obj = self.dbstate.db.get_person_from_handle(self.handle)
1089+
# Mantis 11054 (nick_h's narrow guard): the person the form is
1090+
# attached to was deleted while the form was open — skip this
1091+
# section entirely rather than commit a None-target reference.
1092+
if obj is None:
1093+
return
10641094
event_ref = get_event_ref(self.event, obj, self.role)
10651095

10661096
row = []
@@ -1072,6 +1102,10 @@ def save(self, trans):
10721102
# Remove link to person no longer on form
10731103
if self.initial_handle and self.handle != self.initial_handle:
10741104
person = self.db.get_person_from_handle(self.initial_handle)
1105+
# Mantis 11054: the previously-attached person is already
1106+
# gone, nothing to detach.
1107+
if person is None:
1108+
return
10751109
ref_list = [
10761110
event_ref
10771111
for event_ref in obj.get_event_ref_list()
@@ -1259,6 +1293,11 @@ def save(self, trans):
12591293
return
12601294

12611295
obj = self.dbstate.db.get_family_from_handle(self.handle)
1296+
# Mantis 11054 (nick_h's narrow guard): the family the form is
1297+
# attached to was deleted while the form was open — skip this
1298+
# section entirely rather than commit a None-target reference.
1299+
if obj is None:
1300+
return
12621301
event_ref = get_event_ref(self.event, obj, self.role)
12631302

12641303
row = []
@@ -1274,6 +1313,10 @@ def save(self, trans):
12741313
# Remove link to family no longer on form
12751314
if self.initial_handle and self.handle != self.initial_handle:
12761315
family = self.db.get_family_from_handle(self.initial_handle)
1316+
# Mantis 11054: the previously-attached family is already
1317+
# gone, nothing to detach.
1318+
if family is None:
1319+
return
12771320
ref_list = [
12781321
event_ref
12791322
for event_ref in obj.get_event_ref_list()

Form/formgramplet.gpr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
name=_("Form Gramplet"),
3232
description=_("Gramplet interface for Forms"),
3333
status=STABLE,
34-
version = '2.0.54',
34+
version = '2.0.55',
3535
gramps_target_version="6.0",
3636
navtypes=["Person"],
3737
fname="formgramplet.py",

0 commit comments

Comments
 (0)