Compare commits

..

254 Commits

Author SHA1 Message Date
John Ralls b57b8d0b75 Update Gramps & dependencies for 5.1.6 release. 2023-07-02 14:39:41 -07:00
Nick Hall 9fe57a2eb2 Bump to 5.1.7 2023-06-29 21:44:40 +01:00
Nick Hall ddfc88946a Release Gramps 5.1.6 2023-06-29 21:37:13 +01:00
Nick Hall 52e4790753 Update Changelog and NEWS files 2023-06-29 21:28:47 +01:00
Nick Hall 8a2c94a3dd Update copyright date 2023-06-29 18:42:00 +01:00
SNoiraud e40b727a57 Narrative web: problem with small pictures.
Fixes #012884
2023-06-28 21:50:08 +01:00
SNoiraud 160d5952f2 Implement the "<CTRL>J" for the family view
Fixes #012882
2023-06-28 21:42:08 +01:00
Jon Schewe 482199d29c Avoid application crash on invalid user input
If the user inputs an invalid date this change keeps the application
from crashing when such a date is found. The invalid date
information is reported to the user in the log.

Fixes #12658.
2023-06-28 20:58:37 +01:00
Nick Hall bfa7c0c9f4 Fix export where private citations are excluded 2023-06-28 19:05:25 +01:00
prculley 614332aac8 Fix Event compare tool to display enclosed places properly 2023-05-14 22:50:01 +01:00
SNoiraud 0a981f0ca6 Check that view exists before calling post_create method
Avoids 'NoneType' object has no attribute 'post_create' error.

Fixes #12638
2023-05-14 22:47:55 +01:00
Jingxuan He 9e81014fc6 Fix a wrong operator bug in the web calendar report 2023-05-14 22:27:59 +01:00
Himanshu Gohel 2da93aad1f Revert "Enclose tree report image path and file name in braces"
Fixes #12437 by reverting commit 75921ceaf4 due to
reports of regression where processing of the generated TeX file fails due to
bad path specificiation for image files.

Change was introduced in bug fix for #10495.

Bugs #12437 and #12697 reported the regression and confirmed that reverting the
change fixes the regression.
2023-05-14 22:13:38 +01:00
SNoiraud 97434a0136 Geography View: Fix number of arguments in add_bookmark method
add_bookmark() takes 2 positional arguments but 3 were given

Fixes #12718
2023-05-14 21:54:33 +01:00
GaryGriffin 181e2d8540 Use date-specific place in report substitution variables
Fix place title in graphical reports which have user-defined display formats
to use date-specific alternate name.

This impacts Ancestor Tree, Descendant Tree, and Family Descendant Tree.

Fixes #12763.
2023-05-14 21:38:49 +01:00
John Ralls 36d03137dd Try to import berkeleydb if bsddb3 isn't found.
berkelydb is usable for python >= 3.6 and required for
python >= 3.10. See https://www.jcea.es/programacion/pybsddb.htm.
2023-05-14 21:11:55 +01:00
Vincent Smeets f6ac1999dd HtmlDoc: Create a unique filename for cropped images 2023-05-14 21:00:28 +01:00
D.A.Lordemann a99b48711f Fix corrupted NOTE tag in Gedcom export
Remove Python2 code obsoleted by Python3, which was corrupting GEDCOM export of Gramps Notes text that includes multi-byte utf-8 characters.

Fixes #12709.
2023-05-14 19:03:52 +01:00
SNoiraud d5d86e9139 Fix IndexError that sometimes occurs when changing view
This occurs when restarting Gramps.

Fixes #12636, #12304, #12429, #12623, #12695.
2023-05-14 18:49:17 +01:00
SNoiraud 4ebba02b6b Fix crash when invalid note link
Fixes #012854
2023-05-12 22:11:29 +01:00
SNoiraud e535fcefa5 Tags with color names don't work in pedigree views
Color tags work correctly in all views except in pedigree views.
These views modify colors:
...
 context.set_source_rgba(*(self.bordercolor[:3] + (0.4,)))
... and
 context.set_source_rgb(*self.bgcolor[:3])

As it works everywhere except in these views, I think it is a bug
even if we cannot enter color names in tags

Fixes #012866
2023-05-12 21:57:24 +01:00
SNoiraud 0170e2b1e6 Crash when invalid event date 2023-04-05 18:41:27 +02:00
SNoiraud 54799df049 ListModel: Only the first level is managed
When we use checkboxes in columns.
The path was converted to int. Why ?
But when we have multiple level, the path format is "x:y" for two levels,
"x:y:z" for three levels, etc
2023-04-04 19:38:10 +02:00
Nick Hall b97facb66f Update Gramps CI workflow to run on Ubuntu 20.04
Ubuntu 18.04 became fully unsupported on 1 Dec 2022.
2023-03-07 21:56:08 +00:00
John Ralls aae38a6861 mac: Patch bsddb to use berkeleydb instead of bsddb3 module. 2022-12-27 15:25:07 -08:00
John Ralls e0ee86c36a Mac build: Patch berkeleydb configure to work on Apple Silicon. 2022-12-27 11:45:08 -08:00
John Ralls e3e89e6592 [mac] Update Exiv2 download URL, moved to github. 2022-12-26 13:56:57 -08:00
John Ralls 2cde1f0cdb Repackage Gramps 5.1.5 with Gtk updates fixing use on macOS 13 Ventura. 2022-12-24 14:27:46 -08:00
Nick Hall 2ca3839904 Fix spouse's name and underlined call names in records
Fixes #12391
2022-03-19 17:51:06 +00:00
Nick Hall 66cac5e852 Fix package installation failures in CI 2022-03-16 22:21:22 +00:00
Sam Manzi 99ec8e876b Update INCOMPLETE_TRANSLATIONS
* Remove: he

* Add: zh_HK, zh_TW
2022-02-12 22:44:46 +00:00
Ross Gammon b27480f7a1 Update Debian folder after 5.1.5 release 2022-02-12 21:44:57 +00:00
John Ralls e0e81cf56a Package Gramps 5.1.5 for macOS. 2022-02-05 17:12:38 -08:00
Nick Hall 6df7c46400 Bump to 5.1.6 2022-02-05 23:33:10 +00:00
Nick Hall b98f166a6d Release Gramps 5.1.5 2022-02-05 23:28:04 +00:00
Nick Hall 33e78d47db Update Changelog and NEWS files 2022-02-05 23:23:27 +00:00
Nick Hall c753ca66b0 Remove Travis CI configuration 2022-02-05 22:04:48 +00:00
Nick Hall ff87829b99 Fix badges in README file 2022-02-05 22:01:11 +00:00
Nick Hall a1ec516340 Update copyright date 2022-02-05 19:25:53 +00:00
SNoiraud 60b4866296 Strange behavior for the scrollbar in the bottombar
Fixes #012438
2022-02-04 22:13:05 +00:00
romjerome 3ad5248af0 Fix place object element order in DTD and RNG schemas
Element placeobj content does not follow the DTD and RNG,
expecting (ptitle? , pname+)

Fixes #12500
2022-02-04 21:44:15 +00:00
Nick Hall aa7d9c10c8 Merge pull request #1323 from izikeros/pl 2022-02-01 22:25:43 +00:00
Krystian Safjan 9f458578c0 Fixes suggested after review by @stojex 2022-02-01 22:17:38 +00:00
Krystian Safjan 3418027e50 Update Polish translation
- Consistent usage of "Tag": was "Tag" or "Atrybut", note that
  "Attribute" (atrybut) is something different than tag
- "Magazyn" (repository) renamed to "Repozytorium"
- other fixes and addons
2022-02-01 22:16:17 +00:00
SNoiraud 8eed6b869a Solve InterpolationSyntaxError if "%" in a string
The grampletpane module save data in a config file for all
the gramplets added in the dashboard.
The python configparser module doesn't like if we have a "%"
character in a string.

Fixes #012423
2022-02-01 21:57:37 +00:00
SNoiraud f5202a9ab8 '<' not supported between 2 instances of IndexMark
Fixes #012467
2022-02-01 21:45:32 +00:00
Nick Hall b8e5eacbbe Remove debug sattements in unit tests 2022-02-01 21:36:44 +00:00
Nick Hall 810d2fca24 Fix negative Span when dates are not Gregorian
Fixes #12525
2022-02-01 21:33:53 +00:00
Leonhaeuser 7c0e138ad2 get German translation with manual in sync (Display name editor) 2022-01-29 13:22:40 +01:00
Nick Hall 85535c0f5b Merge pull request #1291 from SNoiraud/B12395 2022-01-28 22:18:50 +00:00
SNoiraud b52d90221f Incorrect grouping if no ma/patronymic surname 2022-01-28 22:05:26 +00:00
SNoiraud bfcbd38610 Group As override is ignored for ma/patronymic surnames
Fixes #12395

discourse:
https://gramps.discourse.group/t/patronymic-and-matronymic-name/1684/5
2022-01-28 22:05:17 +00:00
Nick Hall 2ada529a21 Merge pull request #1290 from SNoiraud/B12374 2022-01-28 21:49:56 +00:00
SNoiraud 8d355ee184 Add comments for the lat-lon field of editplace 2022-01-28 21:41:57 +00:00
SNoiraud d5b28435e0 Place editor, lat and long text are swapped
Fixes #012374
2022-01-28 21:41:57 +00:00
prculley 61189d3930 Fix Statusbar progress being shown before use
Fixes #12373
2022-01-28 21:32:12 +00:00
prculley fec961d992 Fix exception when removing a group name in Sqlite db when group
name is already missing.

Fixes #12367
2022-01-28 21:31:51 +00:00
prculley 8ceccb4a28 Fix error when trying to close name editor during long name group
mapping view rebuild.

Fixes #12328
2022-01-28 21:30:27 +00:00
SNoiraud 6ba9722dee OsmGpsMap-CRITICAL: Map source setup called twice
Fixes #012352
2022-01-28 21:17:30 +00:00
Ross Gammon 4a9f658dd4 Fix probably alive test
The probably alive funtion was fixed just prior to the Gramps 5.1.4
release. It appears the relevant unit test was not updated to match.
The relevant commit:
https://github.com/gramps-project/gramps/commit/a685b96f700dcfc6b953413cb3adc8be61d87438
2022-01-28 19:52:42 +00:00
Nick Hall c9537b355e Use GitHub Actions to run continuous integration checks 2022-01-28 19:46:52 +00:00
John Ralls 49c3fa0f3f Update Exiv2, PYExiv2, and json-glib. 2022-01-28 09:06:08 -08:00
Ross Gammon eb002718b1 Update Debian folder for Gramps 5.1.4 release 2022-01-27 21:45:22 +00:00
pehlm 19c714d57a Minor update of Swedish translation 2022-01-25 17:56:25 +01:00
Tian Shixiong b392ce01e0 Minor update to zh_CN translation 2022-01-24 15:40:16 +00:00
Leonhaeuser b43b6bdd6d small German translation fixes 2021-11-03 19:43:17 +01:00
Leonhaeuser c027276466 Fixed German translation error of "Character set encoding" 2021-11-01 22:16:40 +01:00
Leonhaeuser 898b6b26e8 Fixed German translation error of "Graph generations" 2021-10-25 21:54:26 +02:00
John Ralls ab2df73268 Repackage Gramps.app to work with macOS 12. 2021-10-16 13:51:55 -07:00
John Ralls e1794090e1 [macOS]Add entitlements path to bundle-file so Gramps.app is signed with it. 2021-10-16 13:51:55 -07:00
Leonhaeuser 87860fcfd2 Fixed German translation error of "filter person" 2021-09-19 13:15:21 +02:00
Leonhaeuser 79986e1f5e fixed error in German translation found during manual translation also fixed in master 2021-08-30 18:06:20 +02:00
Leonhaeuser 0f38a1a645 fixed German translation of 'Descendant families of' already done in trunk Weblate 2021-08-11 22:36:58 +02:00
John Ralls 14618917c2 Add python-fontconfig to the macOS build.
Needed to enable using genealogical symbols.
2021-08-10 16:18:41 -07:00
John Ralls ae7a2500de Inlude fontconfig's etc/fonts in macOS app bundle.
Graphviz now uses fontconfig to find its fonts.
Fixes #12370
2021-07-29 15:13:45 -07:00
John Ralls 358a6b118b Bundle release of Gramps 5.1.4. 2021-07-26 13:23:19 -07:00
Nick Hall 9352f0c438 Bump to 5.1.5 2021-07-26 20:53:53 +01:00
Nick Hall 1ab4cbfa63 Release Gramps 5.1.4 2021-07-26 20:49:30 +01:00
Nick Hall 1fd319e13a Update Changelog and NEWS files 2021-07-26 20:45:57 +01:00
Nick Hall 7cb8489ba2 Update copyright date 2021-07-26 15:43:24 +01:00
SNoiraud a685b96f70 probably-alive incorrect if death without date 2021-07-26 15:38:25 +01:00
SNoiraud b24ebd5d77 fix the commit in master without bug report:
commit: 410cffe832
2021-07-22 18:50:17 +01:00
SNoiraud 6dcb1d00d5 Place editor, copy and paste of lat and long text
no longer auto-populating latitude and longitude fields

Fixes #012349
2021-07-22 18:50:17 +01:00
prculley a3b37b9627 Fix for crash when changing views if part of toolbar is not shown
because of a small screen when changing views.

Fixes #12048
2021-07-22 18:49:03 +01:00
prculley 034720321c Fix bottombar always showing after restrt, even when not wanted
Fixes #12338
2021-07-22 18:47:46 +01:00
Tian Shixiong 09f01a69d5 Update and fix Simplified Chinese translation 2021-07-21 18:53:11 +01:00
Leonhaeuser 597f3ebedf fixed smal German translation Error for item also fixed in Weblate GUI for master 2021-07-16 22:27:20 +02:00
Tian Shixiong c7b5e149fa Update Simplified Chinese translation 2021-07-08 23:20:13 +01:00
pehlm f7203aa029 One update Swedish translation 2021-07-05 15:50:44 +02:00
John Ralls 9cca728a66 Better to use locale.get_collation than locale.collation. 2021-07-03 21:54:57 -07:00
John Ralls df270adc94 Wrap call to dbapi.check_collection to prevent a forced API change. 2021-07-03 21:49:01 -07:00
John Ralls c177c13f99 Merge John Ralls's 'bug12343' into maintenance/gramps51. 2021-07-03 06:54:09 -07:00
John Ralls 15f1bb0201 Fix URL for berkeleydb patch. 2021-07-01 15:40:58 -07:00
John Ralls f75aa9302a Always use filtered collation names.
Store the Sqlite3 collations in the __collations array to short-circuit
re-creation.

Fixes https://gramps-project.org/bugs/view.php?id=12343.
2021-07-01 11:45:23 -07:00
prculley 708c83dc58 Revert "An experimental fix for bug12048"
This reverts commit 3c1c21163c.
commited by mistake
2021-06-25 09:59:15 -05:00
prculley 0a809904dc Revert "Change to timeout, rather than idle_add, and dereference toolbars in order they were added"
This reverts commit f91d3e94ab.
commited by mistake.
2021-06-25 09:58:34 -05:00
Leonhaeuser e8f50deabc Fixed different German translations for "What's next" also fixed in master (Weblate) 2021-06-25 11:40:13 +02:00
Leonhaeuser 486fae91ce German relation calculator fixed issue if more then 24 generations between the two person 2021-06-23 10:23:33 +02:00
niememat 9ee5468bda Fix translation in Finnish 2021-06-22 13:22:45 +03:00
Tian Shixiong eac6a935f6 Correct and improve Simplified Chinese translation
Correct some terribly wrong and low quality translation,
even machine translation.

Improve some existing translation for better user experience
as a software, use more written language.
2021-06-17 16:37:09 +08:00
Tian Shixiong cc68b7acfc Improve and correct Simplified Chinese translation 2021-06-10 18:37:26 +01:00
Tian Shixiong c321e7f0d6 Improve and correct the Simplified Chinese translation 2021-05-28 14:04:35 +08:00
Tian Shixiong e13a852523 Update and improve Simplified Chinese translation 2021-05-26 12:51:15 +01:00
Tian Shixiong 3c4c433a84 Update Simplified Chinese translation 2021-05-20 14:01:20 +08:00
Jan Sparreboom e8268cb37e Update Dutch translation 2021-05-15 23:12:19 +01:00
Nick Hall 721d964741 Merge pull request #1137 from tiansworld/workl10n 2021-05-15 15:52:07 +01:00
Tian Shixiong 7d4ec1be73 Correct and Update Simplified Chinese translation 2021-05-15 15:44:39 +01:00
Tian Shixiong 36ce375a2a Update Simplified Chinese translation 2021-05-15 15:44:39 +01:00
Leonhaeuser 9f6afcc7db Corrected some German translation errors found during handbook revision 2021-05-14 21:23:35 +02:00
John Ralls c66fc6423d Add file logging for macOS.
When Gramps is launched from macOS's LaunchServices it doesn't have
a sys.stderr attached so the default stream logger goes to /dev/null.
Use a FileHandler in tht case, writing the log to $TMPDIR/gramps-pid.log.

This will help particularly in analyzing crashes where python shuts down
as there's no crash report in that case.
2021-05-11 15:58:00 -07:00
prculley f91d3e94ab Change to timeout, rather than idle_add, and dereference toolbars in order they were added 2021-05-11 15:58:00 -07:00
prculley 3c1c21163c An experimental fix for bug12048 2021-05-11 15:58:00 -07:00
John Ralls 09709ec0c6 Update PyICU to 2.7.2 in macOS build. 2021-05-06 14:24:17 -07:00
Paul Culley bb7f5fa522 Fix libplaceview to avoid exception when mapservice is no longer present (#1193)
Fixes #12263
2021-05-06 10:19:03 -05:00
Paul Culley 9957506f35 Fix References Gramplet for inadequate updates when other objects change (#1192)
Fixes #12248
2021-05-06 10:18:11 -05:00
Serge Noiraud eb4ce9ff79 geofamily crashes if a family has no father (#1188) 2021-05-06 10:14:49 -05:00
Serge Noiraud 1d72f4b23d Home Person setting does not convey in a Merge (#1187)
* Home Person setting does not convey in a Merge

Fixes #012235

* better pylint score
2021-05-06 10:14:26 -05:00
Paul Culley 5ad5f08a2b Fix CSV export of view to only put single CR character. (#1186)
Fixes #12158
2021-05-06 10:13:02 -05:00
Paul Culley 9e43f060d1 Add Media filter rule 'HasMedia' to list of media rules for editor (#1182)
Fixes #12212
2021-05-06 10:11:16 -05:00
Leonhaeuser bc1ed688c4 corrected German translation of "confidence" 2021-04-28 23:04:23 +02:00
Leonhaeuser 9d358d06f5 German corrected translation of 'attribute' 2021-04-26 18:02:29 +02:00
Leonhaeuser 16b1945a0e Fixed translation error of "display name editor" into German 2021-04-25 12:12:50 +02:00
Leonhaeuser 5e9be68ad5 some translation fixes for German 2021-04-24 22:05:49 +02:00
pehlm cd3ef08ffb Changed immigration too, Swedish 2021-04-24 15:21:33 +02:00
pehlm 773e763093 Correction of Swedish translation 2021-04-24 13:17:11 +02:00
Helder Geovane Gomes de Lima 0badfb6b47 Update Portuguese translation (pt_BR) (#1199)
This pull request is an updated version of the patch I've provided at <https://gramps-project.org/bugs/view.php?id=10547> in 2018, now based on branch 5.1
2021-04-22 15:38:01 +02:00
Leonhaeuser 5af80da5cd Corrected translation of markup in German translation 2021-04-19 23:22:48 +02:00
Leonhaeuser 0045f134c6 Fixed translation of tags in German translation 2021-04-17 00:07:47 +02:00
Leonhaeuser 1035f8930f German translation for type unified 2021-04-14 00:22:56 +02:00
romjerome d4bceeb6ff 11656: typo, spelling correction
contribution by Philippe
2021-04-13 09:14:24 +02:00
romjerome c8fc88cfe7 Need to set locale.textdomain under linux (#1198)
_build_popup_ui() ignores translated strings without locale.textdomain set.
2021-04-13 08:53:04 +02:00
Leonhaeuser b4b6d52306 Fixed German translation of number for places 2021-04-13 00:04:11 +02:00
John Ralls 4f390c6b33 Update dependencies.
Includes moving berkeleydb and pybsddb over from gtk-osx.
2021-04-11 16:18:46 -07:00
Leonhaeuser 0442c34258 Some small fixes in German translation 2021-03-21 00:18:46 +01:00
Leonhaeuser c903f5e5a5 Update German translation for csv import/export 2021-03-11 22:59:42 +01:00
Leonhaeuser 3329860f50 small fix in German translation 2021-03-01 23:21:46 +01:00
Matthias Kemmer e7401f3aaa Change category of 'MatchesEventFilter' (#1130) 2021-02-19 11:45:38 -06:00
Paul Culley 1a48e8a03e Fix issue where separator between top and bottom bar of View creeps up. (#1122)
Fixes #11973
2021-02-19 11:44:32 -06:00
Paul Culley 9a4adab9d6 Fix Locations Gramplet (Enclosed by) to properly displaycertain nested places. (#1127)
when the smallest place has undated enclosure and larger places are dated.

Issue #11691
2021-02-19 11:32:33 -06:00
Paul Culley bb0647274b Fix Family Tree Manager drop error on Windows (#1132)
Fixes #10734
2021-02-19 11:31:43 -06:00
Paul Culley f6bfb46fc0 Fix exportvcalendar error is "is not" with a literal (Python 3.8 issue) (#1135)
Fixes #12000
2021-02-19 11:31:06 -06:00
Serge Noiraud b6fa5da8ee Handle not found when copying source from the (#1175)
Citation tree

Fixes #12170
2021-02-19 11:25:02 -06:00
Paul Culley 14c2d0e1b6 DbLoader: Fix call to 'file' function, which doesn't exist in Python3 (#1173) 2021-02-19 11:23:47 -06:00
Paul Culley 226e8c549a Fix write_lock_file exception when USERNAME is missing (#1171)
Fixes #12150
2021-02-19 11:23:06 -06:00
Paul Culley d173809d8c Fix EditPlace so Tab key doesn't get stuck on Private icon (#1168)
Fixes #12139
2021-02-19 11:22:35 -06:00
Paul Culley 63c52fa1bb Fix Tag report for places that have a hierarchy. (#1162)
Fixes #12124
2021-02-19 11:21:11 -06:00
Paul Culley 455628d44a Fix exception when cancelling out of a db upgrade in GUI (#1154)
Fixes #12063
2021-02-19 11:18:18 -06:00
Leonhaeuser 670bb355cb additional small German translation fixes 2021-02-12 21:36:51 +01:00
Leonhaeuser 202c7a9bf6 Small fixes German translation 2021-02-11 12:06:22 +01:00
Leonhaeuser 72955840f1 fix wrong translation of source text in German translation 2021-02-06 22:06:22 +01:00
Leonhaeuser b8e73d5ee1 fixed small error in German translation 2021-02-06 00:04:33 +01:00
Leonhaeuser 990db39664 small fixes German translation 2021-01-26 18:59:23 +01:00
Nick Hall 9c0dca6bd1 Merge pull request #1053 from cjmayo:themeicon 2020-11-14 19:29:58 +00:00
Chris Mayo 02e0c1c67d Install 128x128 and 256x256 application icons
Created with ImageMagick using e.g.:

convert -background none ../../../gramps.svg -geometry 256x256 gramps.png
2020-11-14 19:23:25 +00:00
Chris Mayo ebf1715468 Install MIME type icons into the hicolor theme
The gnome theme is defunct.

Remove gnome-mime- prefix from icon filenames.
2020-11-14 19:23:24 +00:00
Nick Hall c10f2da00e Install application icons into correct directories 2020-11-14 19:10:34 +00:00
vantu5z 9f71372a97 Update Russian translation 2020-10-15 16:06:19 +03:00
Zdeněk Hataš 0993d9cfc3 Update Czech translation - typo fixes 2020-09-25 09:02:45 +02:00
Tian Shixiong 34471834ab Update Simplified Chinese translation 2020-09-24 22:37:57 +01:00
Jan Sparreboom ff912f844c Update Dutch translation 2020-09-24 21:36:52 +01:00
Lajos Nemeséri 45eac501a9 Revised and updated hu translation 2020-09-24 19:41:31 +01:00
Juan Saavedra d4e85c2397 Update Spanish translation 2020-09-24 17:52:35 +01:00
bokfink c7a4d287f0 Fix error in Birthday and Anniversary report (#1113)
Fixes an error triggered when the first person_handle in the list
has a death event, but no birth event (get_birth_ref() == None)
and does not have family relationships (spouse_handle == None).
These conditions lead to the local variable short_name not being
declared before it comes time to process death events.

Fixes #11766
2020-09-14 11:13:08 -05:00
Paul Culley c0d622c16a Fix graphdoc to properly escape characters in ids for Graphviz (#1111)
Fixes #11741
2020-09-14 11:10:20 -05:00
John Ralls b38f77f2aa Replace inspect.stack() with inspect.currentframe() (#1104)
* Replace inspect.stack() with inspect.currentframe()

Fixes #11874

Works around https://bugs.python.org/issue12920 which causes every
call to inspect.trace() to fail because __main__ is always the
starting point.

* Fix a few Codecov complaints from files touched by previous commit.

Ignoring the "duplicate code" issue caused by the empty comment line
at the beginning of every file.
2020-09-14 11:08:58 -05:00
RossGammon d91fc9e2fb Update Debian directory after producing the deb file for the 5.1.3 (#1100)
Release.

Co-authored-by: Ross Gammon <rossgammon@debian.org>
2020-09-14 11:05:21 -05:00
Paul Culley 198602be61 Fix crash sorting on columns in Selectors with TreeModels (#1099)
Fixes #11750
2020-09-14 11:04:12 -05:00
Paul Culley 3f9f3215ee Fix progress bar freeze due to changes in Gtk (#1103)
Fixes #11642
2020-09-14 11:02:48 -05:00
Paul Culley beb388a30d Fix svgdrawdoc for text containing XML invalid characters (#1110)
Fixes #11929
2020-09-14 11:00:43 -05:00
John Ralls 29e78d4253 Further changes for bundling with Python 3.8. 2020-08-30 14:46:35 -07:00
John Ralls b80dcaf701 Add libgeocode-glib to bundle so that it actually works. 2020-08-30 14:44:51 -07:00
Leonhaeuser a876d94fbc German tzranslation two smal corrections 2020-08-26 18:08:42 +02:00
John Ralls 95e1e8cb67 [mac] Set __file__ if gramps_launcher.py is run as __main__.
Fixes #11874.
2020-08-25 17:14:10 -07:00
Zdeněk Hataš 4147bc728a Update Czech translation 2020-08-21 11:02:14 +02:00
John Ralls 3a9a7053ec Bundle release of Gramps 5.1.3. 2020-08-20 14:41:57 -07:00
John Ralls b96fd8a274 Add geocode-glib to build. 2020-08-20 14:14:53 -07:00
pehlm 26cf0601d8 Update Swedish translation 2020-08-12 20:32:03 +02:00
prculley c59278ef20 Bump to 5.1.4 2020-08-12 12:05:25 -05:00
prculley 767557be61 Release Gramps 5.1.3 2020-08-12 11:28:29 -05:00
prculley 495d4e58ae Remove duplicates in Translations 2020-08-11 09:24:38 -05:00
prculley fd90a80cf8 Clean up translations for Default/Home Person 2020-08-10 17:16:12 -05:00
Leonhaeuser f6c0103f32 Update German translation 2020-08-10 22:48:17 +02:00
Serge Noiraud 04c1dc8503 Events View: "Main Participants" column does not (#1075)
show the full list of participants when expanded.

Fixes #11805
2020-08-10 15:08:51 -05:00
Paul Culley 8172e1017e Fix Charts/Pedigreeview tooltip Polish translation (#1092)
Fixes #11852
2020-08-10 12:01:49 -05:00
Krystian Safjan ea30c3599b Fix and add objects to Polish translation of Gramps (#1088) 2020-08-10 12:00:54 -05:00
John Ralls 5f3ca40633 Use current Gtk release instead of Gtk-3.14. 2020-08-06 10:57:49 -07:00
John Ralls 9c64dafaea Upgrade pymodules for Python 3.8 compatibility. 2020-08-06 10:57:49 -07:00
prculley 13d83919b9 Fix XML export when 'Group-as" name contains XML invalid chars
Fixes #11834
2020-07-25 10:15:39 -05:00
SNoiraud 62d5a136a4 NarWeb: Province place-type is not displayed 2020-07-25 10:15:07 -05:00
prculley b57061d7c9 Fix ManagedWindow so that new windows don't appear offscreen
when system 'screen' sizes change in part time multi-monitor setups.

Fixes #11831
2020-07-25 10:13:57 -05:00
prculley f7be7ab63f Fix menus when db fails to open due to upgrade/downgrade etc.
Fixes #11604
2020-07-25 10:10:56 -05:00
prculley 97923e7530 Fix issue with attach source tool, results panel
Fixes #11780
2020-07-25 10:09:52 -05:00
prculley 75aabf570d Fix GEDCOM export; don't include ADDR when address is missing
Fixes #11825
2020-07-25 10:08:58 -05:00
SNoiraud 41f1e91600 Coordinates containing a comma instead of a period
Fixes #11823
2020-07-25 10:08:22 -05:00
Leonhaeuser 981c0dfc5c German translation fixed typo 2020-07-23 20:28:59 +02:00
niememat d558a9a004 Update finnish translation 2020-07-17 00:41:16 +03:00
Tian Shixiong 914bd6c0d3 Update Simplified Chinese translation for gramps51 branch 2020-07-09 09:42:35 -05:00
Serge Noiraud e8eb5bf0a1 NarrativeWeb should show patronymic in individuals (#1048)
In the individuals and in surnames pages, we should show the complete name
like defined in the display tab from the narrative web configuration.

Fixes #04404
2020-07-08 16:07:37 -05:00
Serge Noiraud b523530fb0 Narrated Website Google Maps Output JS Warning (#1038)
SensorNotRequired:
The sensor parameter is no longer required for the Maps JavaScript API.
It won't prevent the Maps JavaScript API from working correctly, but we
recommend that you remove the sensor parameter from the script element.

Fixes #011654
2020-07-08 16:00:15 -05:00
giansalvo 0d698c13cc Fix bug 0011078: 'Default person' instead of 'Home person'
- modified button hints
- modified filter rules names and descriptions
- modified .pot and .po files
- substituted 'home person' with 'Home Person'
2020-07-07 15:40:47 -05:00
Leonhaeuser 4232032ce3 Germen fixed translation error of Media: 2020-07-07 00:05:35 +02:00
Leonhaeuser 8f4b51c837 Fix typo 2020-07-04 21:22:12 +02:00
Leonhaeuser f2caecd621 update German translation 2020-07-01 20:02:15 +02:00
Nick Hall c26d6902d1 Use event attribute types in the event reference editor
In the event reference editor, custom event attribute types
should be used rather than the default person attribute types.

Fixes #11576.
2020-06-30 15:55:11 -05:00
SNoiraud b00b1f37f1 Fix typo in gui/configure.py and translation files
Fixes #11665
2020-06-30 15:48:26 -05:00
prculley 9230de61be Fix Verify tool bug caused by bad change in GObject introspection
Fixes: #11708
2020-06-30 15:27:19 -05:00
pehlm 9906f1e4ab A little adjustment to Swedish translation 2020-06-22 22:28:51 +02:00
pehlm a68c0f7aa7 Updates to Swedish translation 2020-06-21 10:22:55 +02:00
Nick Hall 513b27531d Remove Japanese from the incomplete translations
Japanese now has a coverage of 83.2% which is above the 70%
threshold.
2020-06-20 18:27:12 +01:00
Megumi Sakata b8f007c4dd Update Japanese translation 2020-06-20 18:02:57 +01:00
Serge Noiraud e375df1e2a Navweb: incorrect link type for osm css files (#1071)
Fixes #011787
2020-06-07 20:10:01 +02:00
prculley df81a10fe8 Fix import test for change cause by commit a2c66417 which was
Fix GEDCOM import for bad source title when sources precede references.
2020-06-07 10:44:10 -05:00
prculley fa53805534 Merge branch 'maintenance/gramps51' of https://github.com/gramps-project/gramps into maintenance/gramps51 2020-06-07 09:59:37 -05:00
vantu5z e614a79cef update Russian translation 2020-06-03 10:23:56 +03:00
prculley 343633a189 Fix some reports for CLI where warning message about Value not found
Fixes #11621
2020-05-15 15:03:15 -05:00
prculley eb14abbf3e Fix Genealogy Tree reports for crash in CLI
Fixes #11621
2020-05-15 15:03:15 -05:00
prculley 5154d0c016 Add uistate to tree views filter initialization
Fixes #11657
2020-05-15 15:00:05 -05:00
prculley a2c6641774 Fix GEDCOM import for bad source title when sources precede references.
Fixes #11610
2020-05-15 14:59:13 -05:00
prculley 924d82a7c4 Fix RemoveUnused tool for crash caused by Gtk introspection bug
Fixes #11634
2020-05-15 14:58:20 -05:00
prculley f1f8847a86 Fix some Python syntax errors that appear in v3.8.x
Fixes #11641
2020-05-15 14:56:59 -05:00
SNoiraud 748fbd0949 Age: test if the death is the same day as birth 2020-05-15 14:55:15 -05:00
SNoiraud e2e659dc94 Suppress age = 0 days in events list
If the reference event date is equal to the event date, don't show the age
except if the date is estimated, calculated, ...

Fixes #0007745
2020-05-15 14:55:15 -05:00
prculley 6cbc2b896d Fix Dashboard Gramplets to update during db close when not shown
Fixes #11632
2020-05-15 14:53:43 -05:00
prculley d210275a4e Fix Windows GUI mode startup for crash with some languages
Fixes: #11612. #11490, #11518, #9179, #9201, #9266
2020-05-15 14:50:54 -05:00
prculley 0a3a65ffb0 Fix dbapi to support "Abandon Changes & Quit" feature
Fixes #11599
2020-05-15 14:49:55 -05:00
prculley e34b98033e Fix GrampsType for comparison bug with empty string as one value
Fixes #11563
2020-05-15 14:47:06 -05:00
prculley 96de0ceb4e Fix Verify tool bug caused by bad change in GObject introspection
Fixes: #11708
2020-05-07 09:39:09 -05:00
niememat 58335cfee2 Fix translation in Finnish 2020-04-24 15:35:00 +03:00
Joan Creus 2ce48d3793 Updating Catalan translation 2020-04-18 13:06:40 +02:00
Joan Creus f91063884e Updating Catalan translation 2020-04-18 12:57:30 +02:00
prculley 06732b1b5d Fix Date Display so that it uses LC_TIME if defined
Fixes #11230
2020-04-13 11:51:23 -05:00
prculley 26b78c17af Fix StyledText so serialize will match for style list order changes
Fixes #11529
2020-04-13 11:45:15 -05:00
prculley d83fff3b62 Try to fix exceptions on ManagedWindow close
Issues #10252, #10642, #10821, #11163, #11440, #11476, #11482, #11508
2020-04-13 11:36:24 -05:00
John Ralls 823bcaac0d Merge John Ralls's 'bug11639' into maintenance/gramps51 2020-04-08 13:09:17 -07:00
Leonhaeuser b9c324ef37 update Germn translation 2020-04-08 19:17:13 +02:00
Serge Noiraud 23d2c8e694 Same date of birth and death gives an error. (#1011)
Fixes #011553
2020-04-04 09:52:50 +02:00
Serge Noiraud 28dc2e5158 Geography: add a popup for a bad tiles path (#1025) 2020-04-04 09:49:41 +02:00
Serge Noiraud 2baa6f5e40 Narweb: image size limit doesn't match tooltip (#1004)
Fixes #011536
2020-04-04 09:45:54 +02:00
John Ralls eb1b4c1eb5 Protect SQLite3 locale from old-style Unicode locale characters.
PySQLite3 requires that collation names have only ascii alphanumerics
and _. ICU locales use old-style Unicode specifiers and passing them to
create_locale will raise an exception. Translate those characters into
underscores.

Fixes #11639
2020-04-01 09:01:37 -07:00
vantu5z 51f2052cfe update Russian translation 2020-03-26 16:47:52 +03:00
Translator5 ccf6d59b17 [Language: Russian] Maintenance/gramps51 (#1027)
* some Russian translations updates

Новый перевод для неких случаев, но улучшающие понимание и выглядит более уместно. Также применены русские переводы слов, которые использовали до того англицизмы
2020-03-25 15:24:06 +03:00
Joan Creus 74d72f4dd0 Updating Catalan translation 2020-03-03 00:00:28 +01:00
Joan Creus 9ce92f41e3 Updating Catalan translation 2020-02-29 18:00:08 +01:00
Bernard Banko 77cdbb11b5 V&O changed to PZV to avoid ampersand 2020-02-25 23:44:55 +01:00
pehlm 72277db766 Minor update to Swedish translation 2020-02-07 18:30:09 +01:00
prculley 7ae77abead Fix GEDCOM export of estimated/calculated dates with modifers
Fixes #11513
2020-02-04 15:57:40 +00:00
Ross Gammon 04b1463746 New debian release - update changelog 2020-02-04 15:49:02 +00:00
vantu5z 1eeae2edf8 update Russian translation 2020-01-31 14:06:03 +03:00
Bernard Banko 740adc7070 Slovenian translation update 2020-01-26 21:45:38 +01:00
prculley a2dbdbb61a Fix typo in Russian translation 2020-01-23 09:33:24 -06:00
système 8d5b0c83ce typos in french translation #11534 #10534 2020-01-21 20:27:05 +01:00
Fedik 01afe251fb Ukrainian translation update 2020-01-21 18:20:30 +02:00
John Ralls 152ed0b6bc Mac release of 5.1.2. 2020-01-11 13:14:41 -08:00
prculley 5624fb1490 Bump to v5.1.3 2020-01-10 11:43:58 -06:00
199 changed files with 94394 additions and 90610 deletions
+77
View File
@@ -0,0 +1,77 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2022 Nick Hall
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
name: Gramps CI
on:
push:
branches: [ maintenance/gramps51 ]
pull_request:
branches: [ maintenance/gramps51 ]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install gir1.2-pango-1.0
sudo apt-get install gir1.2-gtk-3.0
sudo apt-get install xdg-utils
sudo apt-get install librsvg2-common
sudo apt-get install libglib2.0-dev
sudo apt-get install intltool
sudo apt-get install python3-gi
sudo apt-get install python3-cairo
sudo apt-get install python3-gi-cairo
sudo apt-get install python3-bsddb3
sudo apt-get install python3-dev
sudo apt-get install python3-nose
sudo apt-get install python3-mock
sudo apt-get install python3-icu
sudo apt-get install python3-coverage
sudo apt-get install python3-jsonschema
sudo apt-get install libxml2-utils
sudo apt-get install python3-lxml
sudo apt-get install python-libxml2
sudo apt-get install zlib1g-dev
sudo apt-get install python3-setuptools
- name: Install addons
run: |
mkdir -p ~/.gramps/gramps51/plugins/
wget https://github.com/gramps-project/addons/raw/master/gramps51/download/CliMerge.addon.tgz
tar -C ~/.gramps/gramps51/plugins -xzf CliMerge.addon.tgz
wget https://github.com/gramps-project/addons/raw/master/gramps51/download/ExportRaw.addon.tgz
tar -C ~/.gramps/gramps51/plugins -xzf ExportRaw.addon.tgz
- name: Build
run: |
python3 setup.py build
- name: Run unit test suite
run: |
python3 setup.py test
- name: Trailing whitespace check
run: |
if git --no-pager grep --color -n --full-name '[ ]$' -- \*.py; then
echo "ERROR - Trailing whitespace found in source file(s)";
exit 1;
fi
-129
View File
@@ -1,129 +0,0 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2015-2015 Doug Blank
# Copyright (C) 2016 DaAwesomeP
# Copyright (C) 2016 QuLogic
# Copyright (C) 2016 Tim G L Lyons
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# After changing this file, check it on:
# http://lint.travis-ci.org/
sudo: required
dist: trusty
language: python
python:
- 3.3 # This is irrelevant, because the virtualenv is not used at all
# FIXME: The minimum requirement for Gramps is Python 3.2, so a test environment
# for Python 3.2 should be added to this environment which is Python 3.3. It
# will not be possible to run coverage under Python 3.2, because coverage is
# Python 3.3 (or above) only.
addons:
apt:
packages:
- gir1.2-pango-1.0
- gir1.2-gtk-3.0
- xdg-utils
- librsvg2-common
- libglib2.0-dev
- intltool
# - python3-gobject Provided by python3-gi
- python3-gi
- python3-cairo
- python3-gi-cairo
- python3-bsddb3
- python3-dev
- python3-nose
- python3-mock
- python3-pyicu
- python3-coverage
- python3-jsonschema
# lxml dependencies. for merge_ref_test to work
# - libxml2-dev
# - libxslt1-dev
- libxml2-utils
- python3-lxml
- python-libxml2
# ubuntu 14.04 requires this in addition to libxml2-dev and
# libxslt1-dev for compiling lxml.
# https://github.com/deanmalmgren/textract/issues/19
- zlib1g-dev
before_install:
install:
# The working directory is set to /home/travis/build/gramps-project/gramps
# by the automatic git checkout.
# Download Sean Ross-Ross's Pure Python module containing a framework to
# manipulate and analyze python asts and bytecode. This is loaded to
# /home/travis/build/gramps-project/gramps/meta
# FIXME: This should be loaded from the release directory at
# https://pypi.python.org/pypi/meta
- git clone -b master https://github.com/srossross/meta
# Build Gramps package. This seems to copy everything to
# /home/travis/build/scripts-3.3
- python setup.py build
before_script:
# Create the Gramps database directory.
- mkdir -p ~/.gramps/grampsdb/
# set PYTHONPATH so the directly installed module (meta) is picked up from
# /home/travis/build/gramps-project/gramps/meta
- export PYTHONPATH=meta
# set module exclusions. --exclude=TestUser because of older version of mock
# without configure_mock
- export EXCLUDE="--exclude=TestcaseGenerator"
# --exclude=merge_ref_test"
# set GRAMPS_RESOURCES for locale, data,image and documentation
- export GRAMPS_RESOURCES=.
# Install addons
- mkdir -p ~/.gramps/gramps51/plugins/
- wget https://github.com/gramps-project/addons/raw/master/gramps51/download/CliMerge.addon.tgz
- tar -C ~/.gramps/gramps51/plugins -xzf CliMerge.addon.tgz
- wget https://github.com/gramps-project/addons/raw/master/gramps51/download/ExportRaw.addon.tgz
- tar -C ~/.gramps/gramps51/plugins -xzf ExportRaw.addon.tgz
script:
# Ignore the virtualenv entirely. Use nosetests3, python3 (3.4.0) and coverage
# from /usr/bin. Use libraries from /usr/lib/python3.4,
# /usr/local/lib/python3.4/dist-packages and /usr/lib/python3/dist-packages
- nosetests3 --nologcapture --with-coverage --cover-package=gramps $EXCLUDE
gramps
# FIXME: This should have run from the current directory, rather than from
# gramps, because there is some test code in that directory.
# give an error for any trailing whitespace
- if git --no-pager grep --color -n --full-name '[ ]$' -- \*.py; then
echo "ERROR - Trailing whitespace found in source file(s)";
exit 1;
fi
after_success:
# apt-get installs python3-coverage, but codecov only invokes coverage, so make
# a link
- sudo ln /usr/bin/python3-coverage /usr/bin/coverage
# We have to use the bash script because the apt-get coverage does not install
# codecov. If we used pip to install codecov, it would run inside the
# virtualenv, and that doesn't work. Change the path to ensure that codecov
# picks up coverage from /usr/bin, rather than from
# /home/travis/virtualenv/python3.3.6/bin/
- PATH=/usr/bin:$PATH bash <(curl -s https://codecov.io/bash)
+114 -368
View File
@@ -1,428 +1,174 @@
2020-01-10 Serge Noiraud <Serge.Noiraud@laposte.net>
2023-06-29 Nick Hall <nick-h@gramps-project.org>
* gramps/plugins/webreport/basepage.py: Narrated Web: bad event
links on media pages (#983) * Navweb: Don't use media regions in some case: - If we don't show families - If we don't show events Fixes #011500 * Navweb: side effect between event and media pages When a media is processed in the media display section for an event
page, it's remove from the media_list, so when we try to create the
media regions in the media page, the media list is empty and we
can't display the regions. * Narweb: Don't show the regions for a thumbnail
* docs/conf.py, gramps/gen/const.py: Update copyright date
2020-01-09 Nick Hall <nick-h@gramps-project.org>
2023-05-13 SNoiraud <Serge.Noiraud@free.fr>
* gramps/gen/utils/place.py, gramps/gui/editors/editplace.py,
gramps/gui/editors/editplaceref.py: Revert pull request #965 This reverts commit 801be844655694fd10106a340b3d7c3e11895e9e.
* gramps/plugins/webreport/media.py: Narrative web: problem with
small pictures. Fixes #012884
2020-01-09 Serge Noiraud <Serge.Noiraud@laposte.net>
2023-05-09 SNoiraud <Serge.Noiraud@free.fr>
* gramps/plugins/webreport/contact.py,
gramps/plugins/webreport/home.py,
gramps/plugins/webreport/introduction.py,
gramps/plugins/webreport/narrativeweb.py: Narweb: Private notes for
home, intro and contact (#953) If the notes are private, we can't use them in these pages.
* gramps/plugins/view/familyview.py: Implement the "<CTRL>J" for the
family view Fixes #012882
2020-01-09 Paul Culley <paulr2787@gmail.com>
2022-07-11 Jon Schewe <jpschewe@mtu.net>
* data/lds.xml, gramps/plugins/test/tools_test.py: Update LDS Temple
list (#984)
* gramps/plugins/webreport/basepage.py: Avoid application crash on
invalid user input If the user inputs an invalid date this change keeps the application
from crashing when such a date is found. The invalid date
information is reported to the user in the log. Fixes #12658.
2020-01-09 Paul Culley <paulr2787@gmail.com>
2023-05-13 Nick Hall <nick-h@gramps-project.org>
* gramps/gen/utils/place.py, gramps/gui/editors/editplace.py,
gramps/gui/editors/editplaceref.py: Fix Lat/Long translated NSEW
display and entry in rtl language;Store Lat/Long in place objects
with NSEW always in English (#965) * Fix Lat/Long translated NSEW display and entry in rtl language * Store Lat/Long in place objects with NSEW always in English Issue #11335
* gramps/plugins/export/exportgedcom.py: Fix export where private
citations are excluded
2020-01-09 Paul Culley <paulr2787@gmail.com>
2022-06-01 prculley <paulr2787@gmail.com>
* gramps/gui/plug/_guioptions.py: Make GuiDestinationOption Folder
Icon start in users directory (#979) Fixes #10917
* gramps/plugins/tool/eventcmp.py: Fix Event compare tool to display
enclosed places properly
2020-01-09 Paul Culley <paulr2787@gmail.com>
2022-06-08 SNoiraud <Serge.Noiraud@free.fr>
* gramps/gui/dbloader.py: Fix import file chooser filter to accept
upper case extensions (#962) * Fix import file chooser filter to accept upper case extensions Fixes #11463 * Allow import file filter to accept case insensitive extensions Co-authored-by: Nick Hall <nick-h@gramps-project.org>
* gramps/gui/viewmanager.py: Check that view exists before calling
post_create method Avoids 'NoneType' object has no attribute 'post_create' error. Fixes #12638
2020-01-09 Paul Culley <paulr2787@gmail.com>
2022-06-15 Jingxuan He <LostBenjamin@users.noreply.github.com>
* gramps/gen/db/generic.py: Fix db to warn/prevent opening newer
schema versions (#945)
* gramps/plugins/webreport/webcal.py: Fix a wrong operator bug in
the web calendar report
2020-01-09 Paul Culley <paulr2787@gmail.com>
2022-10-08 Himanshu Gohel <1551217+hgohel@users.noreply.github.com>
* gramps/plugins/importer/importprogen.py,
gramps/plugins/lib/libprogen.py: Fix Progen import to correctly
handle AKA surnames (#959) * Fix Progen import dialog and progress meter for correct parent
window * Fix Progen import to correctly handle AKA surnames Fixes #11462
* gramps/gen/plug/docgen/treedoc.py: Revert "Enclose tree report
image path and file name in braces" Fixes #12437 by reverting commit
75921ceaf40f3ced597d99c43794b98f81e49957 due to reports of
regression where processing of the generated TeX file fails due to
bad path specificiation for image files. Change was introduced in bug fix for #10495. Bugs #12437 and #12697 reported the regression and confirmed that
reverting the change fixes the regression.
2020-01-09 Paul Culley <paulr2787@gmail.com>
2022-10-22 SNoiraud <Serge.Noiraud@free.fr>
* gramps/gui/plug/export/_exportassistant.py,
gramps/plugins/export/exportpkg.py: Fix ExportPkg so errors are not
lost, and has progress bar for media (#957) * Fix Export Assistant so error messages get correct parent window * Fix ExportPkg so errors are not lost, and has progress bar for
media Fixes #11457
* gramps/plugins/lib/maps/geography.py: Geography View: Fix number
of arguments in add_bookmark method add_bookmark() takes 2 positional arguments but 3 were given Fixes #12718
2020-01-09 Paul Culley <paulr2787@gmail.com>
2022-12-08 GaryGriffin <genealogy@garygriffin.net>
* gramps/plugins/lib/libgedcom.py: Fix GEDCOM import when family is
missing; import created a missing note (#971) Fixes #11472
* gramps/plugins/lib/libsubstkeyword.py: Use date-specific place in
report substitution variables Fix place title in graphical reports which have user-defined display
formats to use date-specific alternate name. This impacts Ancestor Tree, Descendant Tree, and Family Descendant
Tree. Fixes #12763.
2020-01-09 Paul Culley <paulr2787@gmail.com>
2022-12-27 John Ralls <jralls@ceridwen.us>
* gramps/gui/widgets/grampletpane.py: Fix Dashboard for adding
Gramplet crash in Slovenian (#978) Fixes #11491
* gramps/grampsapp.py, gramps/gui/aboutdialog.py,
gramps/gui/logger/_errorreportassistant.py,
gramps/plugins/db/bsddb/bsddbtxn.py,
gramps/plugins/db/bsddb/cursor.py, gramps/plugins/db/bsddb/read.py,
gramps/plugins/db/bsddb/summary.py,
gramps/plugins/db/bsddb/test/cursor_test.py,
gramps/plugins/db/bsddb/undoredo.py,
gramps/plugins/db/bsddb/upgrade.py,
gramps/plugins/db/bsddb/write.py, gramps/plugins/gramplet/leak.py,
mac/patches/gramps-berkeleydb.patch: Try to import berkeleydb if
bsddb3 isn't found. berkelydb is usable for python >= 3.6 and required for python >=
3.10. See https://www.jcea.es/programacion/pybsddb.htm.
2020-01-07 Zdeněk Hataš <zdenek.hatas@gmail.com>
2023-02-12 Vincent Smeets <Vincent.VSmeets@GMail.com>
* po/cs.po: Update Czech translation
* gramps/plugins/docgen/htmldoc.py: HtmlDoc: Create a unique
filename for cropped images
2019-12-30 Joan Creus <joan.creusandreu@gmail.com>
2022-10-24 D.A.Lordemann <LordemannD@gmail.com>
* po/ca.po: Updating Catalan translation
* gramps/plugins/export/exportgedcom.py: Fix corrupted NOTE tag in
Gedcom export Remove Python2 code obsoleted by Python3, which was corrupting
GEDCOM export of Gramps Notes text that includes multi-byte utf-8
characters. Fixes #12709.
2019-12-21 Joan Creus <joan.creusandreu@gmail.com>
2022-09-27 SNoiraud <Serge.Noiraud@free.fr>
* po/ca.po: Updating Catalan translation
* gramps/gui/viewmanager.py: Fix IndexError that sometimes occurs
when changing view This occurs when restarting Gramps. Fixes #12636, #12304, #12429, #12623, #12695.
2019-12-15 Jiří Vejda <jiri.vejda@gmail.com>
2023-03-18 SNoiraud <Serge.Noiraud@free.fr>
* gramps/gen/datehandler/_date_cs.py: Update date parsing for czech
locale (#968) * Fixes bug ID 0011470: some date variants in CS language are not
consider valid
* gramps/gen/proxy/referencedbyselection.py,
gramps/gui/widgets/styledtexteditor.py,
gramps/plugins/lib/libhtmlbackend.py: Fix crash when invalid note
link Fixes #012854
2019-12-15 romjerome <romjerome@users.noreply.github.com>
2023-04-17 SNoiraud <Serge.Noiraud@free.fr>
* po/fr.po: update french translation (#969)
* gramps/gui/utils.py: Tags with color names don't work in pedigree
views Color tags work correctly in all views except in pedigree views.
These views modify colors: ... context.set_source_rgba(*(self.bordercolor[:3] + (0.4,))) ... and context.set_source_rgb(*self.bgcolor[:3]) As it works everywhere except in these views, I think it is a bug
even if we cannot enter color names in tags Fixes #012866
2019-12-13 romjerome <romjerome@users.noreply.github.com>
2023-04-05 SNoiraud <Serge.Noiraud@free.fr>
* gramps/gen/proxy/private.py: fix tagref support (#956) Add missing code for event, repository, source, citation and place
* gramps/gui/views/treemodels/eventmodel.py: Crash when invalid
event date
2019-12-13 romjerome <romjerome@users.noreply.github.com>
2023-04-04 SNoiraud <Serge.Noiraud@free.fr>
* gramps/gen/plug/docgen/treedoc.py: [Tree doc Tex] fix "-" char on
place name (#961) * fix "-" char on place name "-" can lead to confusion, generating text out of the box with PDF
file format
* gramps/gui/listmodel.py: ListModel: Only the first level is
managed When we use checkboxes in columns. The path was converted to int.
Why ? But when we have multiple level, the path format is "x:y" for
two levels, "x:y:z" for three levels, etc
2019-12-09 romjerome <romjerome@users.noreply.github.com>
2023-03-07 Nick Hall <nick-h@gramps-project.org>
* gramps/gen/plug/docgen/treedoc.py: typo on custom size (#963)
* .github/workflows/gramps-ci.yml: Update Gramps CI workflow to run
on Ubuntu 20.04 Ubuntu 18.04 became fully unsupported on 1 Dec 2022.
2019-11-10 Paul Culley <paulr2787@gmail.com>
2022-12-27 John Ralls <jralls@ceridwen.us>
* po/nb.po: Fix duplicated "døde døde" Norwegion Translation for
libnarrate (#950) Fixes #11429
* mac/gramps.modules: mac: Patch bsddb to use berkeleydb instead of
bsddb3 module.
2019-11-04 Paul Culley <paulr2787@gmail.com>
2022-12-27 John Ralls <jralls@ceridwen.us>
* gramps/gui/editors/objectentries.py: Fix up Event Editors Place
display for bidi text with Gramps ID (#924) Fixes #10124 Fix up Event Editors Place display for bidi text with Gramps ID (PR
924) Some versions of Gtk/Pango have trouble with text containing both
LTR and RTL characters. The bug notes this shows up in our Event
Editor on the 'Place" field, where we have the place displayer title
and the Gramps ID concatenated into the same string. In older versions of Gtk (3.18.9 tested) the bracket around the
Gramps ID would get mangled to the beginning of the string: <images> In newer versions of Gtk (3.24.3 tested) it was better to start
with: <images> The older version of Gtk/Pango doesn't seem to properly interpret
all of the potential Unicode bidi control characters, so the fix
shown is the best I can do. The fixed version of the newer Gtk
version is what is desired. I note that the Place displayer should be fixed up to use more
appropriate separators than just commas for RTL text, but that is
another issue.
* mac/gramps.modules, mac/patches/berkeleydb-4.8-mutex.patch: Mac
build: Patch berkeleydb configure to work on Apple Silicon.
2019-11-04 Paul Culley <paulr2787@gmail.com>
2022-12-26 John Ralls <jralls@ceridwen.us>
* gramps/gui/editors/editplace.py,
gramps/gui/editors/editplaceref.py,
gramps/gui/views/treemodels/placemodel.py,
gramps/gui/widgets/undoableentry.py: Fix issues with RTL languages
and LAT/LONG (#922) * Fix display of GPS coordinates in Places view for RTL languages Issue #11335 * Fix place editor lat/long entry for RTL languages Fixes #11335
* mac/gramps.modules: [mac] Update Exiv2 download URL, moved to
github.
2019-11-04 Paul Culley <paulr2787@gmail.com>
2022-12-24 John Ralls <jralls@ceridwen.us>
* gramps/plugins/export/exportgedcom.py: Fix GEDCOM export to avoid
translated GrampsType strings (#947) Fixes #11410 The bug submitter noticed that the GEDCOM export contained
translated strings in the MEDI lines of his export. GEDCOM should
contain English values for most such cases where 'types' are
exported. I scanned the export code for other potential cases, and found: * Certain unexpected event types on individuals (Marriage) * Certain unexpected event types on families (Immigration,
Residence, etc.) * Pedigree types that were not standardized on PEDI,_FREL,_MREL
(Sponsored, Unknown) * Family Attributes other than Number if children (Caste,
Description, National etc.) * Personal Attributes other than Caste, Description, ID, National,
number of children, SSN (Occupation etc.) * The MEDI types of this bug report...
* mac/Info.plist, mac/gramps.bundle, mac/gramps.modules: Repackage
Gramps 5.1.5 with Gtk updates fixing use on macOS 13 Ventura.
2019-11-05 Serge Noiraud <Serge.Noiraud@laposte.net>
2022-03-08 Nick Hall <nick-h@gramps-project.org>
* data/css/Web_Basic-Ash.css, data/css/Web_Basic-Blue.css,
data/css/Web_Basic-Cypress.css, data/css/Web_Basic-Lilac.css,
data/css/Web_Basic-Peach.css, data/css/Web_Basic-Spruce.css,
data/css/Web_Mainz.css, data/css/Web_Nebraska.css,
gramps/plugins/webreport/media.py: Narrativeweb: Referenced regions
problems (#946) When image width > 800, the referenced regions are incorrectly
placed Fixes #11414
* gramps/plugins/lib/librecords.py: Fix spouse's name and underlined
call names in records Fixes #12391
2019-11-04 Paul Culley <paulr2787@gmail.com>
2022-03-16 Nick Hall <nick-h@gramps-project.org>
* gramps/gui/plug/_windows.py: Allow Tools with Notbook tabs to
expand to fill the window (#944) Fixes #10762 User "petpil" (Gramps Bugtracker) noted that the Calculate Estimated
Dates addon would not expand the size of its window content when the
window was stretched. That addon used the ToolManagedWindowBatch
which uses a Gtk Notebook to support several tabs. He also submitted
a patch which fixes the problem. The Gtk.Container.add method originally used apparently did not have
expand/fill settings to allow the expansion. The Gtk.Box.pack_start
used instead does. I tested this with all the users of ToolManagedWindowBatch and
ToolManagedWindow which inherit from ToolManagedWindowBase, and did
not see any bad/unexpected side effects. The Calculate Estimated
Dates addon was the only one that really could use this, as it was
the only one which I spotted using a potentially large widget in the
notebook tab.
* .github/workflows/gramps-ci.yml: Fix package installation failures
in CI
2019-11-02 Fedik <getthesite@gmail.com>
2019-12-09 Sam Manzi <manzi.sam@gmail.com>
* po/uk.po: Ukrainian translation update
* gramps/gen/utils/grampslocale.py: Update INCOMPLETE_TRANSLATIONS * Remove: he * Add: zh_HK, zh_TW
2019-11-02 Fedik <getthesite@gmail.com>
2022-02-12 Ross Gammon <rossgammon@debian.org>
* po/uk.po: Ukrainian translation update
* debian/changelog, debian/copyright,
debian/patches/fix-probably_alive_test.patch, debian/patches/series:
Update Debian folder after 5.1.5 release
2019-10-29 Nick Hall <nick-h@gramps-project.org>
2022-02-05 John Ralls <jralls@ceridwen.us>
* gramps/plugins/gramplet/agestats.py: Limit Age Stats gramplet
settings to appropriate values (#936) * Max ages should be divisible by 5 to avoid out of range errors. * The chart width should be greater than 45 to look right and avoid division by zero errors.
* mac/Info.plist, mac/gramps.modules: Package Gramps 5.1.5 for
macOS.
2019-10-29 Paul Culley <paulr2787@gmail.com>
2022-02-05 Nick Hall <nick-h@gramps-project.org>
* gramps/gui/configure.py: Fix the Preferences 'Age display
precision' value getting lost (#940) Fixes #11384 It turns out the changes was actually changing the wrong config
setting... I had to look this one up. Using a lambda like this is called a
'closure' by some; what is happening is that the value 'constant' is
being evaluated at the time the lambda is called, not when it is
assigned. So in this particular bit of code the preference setting
was actually changing 'preferences.family-relation-type' (the value
of the variable 'constant' set a bit after the lambda definition. I reverted this particular bit of code, as I think this kind of
Python knowledge is pretty obscure (I could have just used a
different unique name for the 'constant' variable).
2019-10-25 Paul Culley <paulr2787@gmail.com>
* po/es.po: Fix Spanish translation for dates (#943) Fixes #10836
2019-10-24 avma <avi.markovitz@gmail.com>
* po/he.po: Hebrew translation-current version 5.12 (#939) ...I've completed all strings (using the recent .POT)...
2019-10-23 Paul Culley <paulr2787@gmail.com>
* gramps/cli/grampscli.py, gramps/gen/db/generic.py: Fix Window
family tree title for non-ASCII chars on Windows (#932) Fixes #11390 As it says, if Family Tree name contained non-ASCII characters, the
titlebar on Windows would display it wrong. Turned out to be reading
of a utf8 file without the 'encoding' set. On Windows this results
in using the default encoding which is one of the code pages, NOT
utf8.
2019-10-23 Paul Culley <paulr2787@gmail.com>
* gramps/gui/configure.py: Fix Preferences/Genealogical Symbols when
only one font is present (#930) that passes If user has only a single font available that passes check for the
Genealogical Symbols being all present, the original code crashed.
Apparently never tested... #598 Fixes #11395
2019-10-21 niememat <niememat@gmail.com>
* po/fi.po: Fix translation in Finnish
2019-10-18 Milo Ivir <mail@milotype.de>
* po/hr.po: Update Croatian translation
2019-10-19 Leonhaeuser <mirko@leonhaeuser.de>
* po/de.po: update German translation
2019-10-18 Zdeněk Hataš <zdenek.hatas@gmail.com>
* po/cs.po: Update Czech translation
2019-10-18 niememat <niememat@gmail.com>
* po/fi.po: Fix translation in Finnish
2019-10-17 pehlm <par.ekholm@pekholm.org>
* po/sv.po: Update Swedish translation
2019-10-17 niememat <niememat@gmail.com>
* po/fi.po: Update finnish translation
2019-10-16 Paul Culley <paulr2787@gmail.com>
* gramps/gui/widgets/monitoredwidgets.py,
gramps/gui/widgets/undoableentry.py: Fix various Entry fields so
Undo/Redo works (#920) Fixes #11380, #11339 In prior versions of Gramps you could use the undo/redo keys to edit
items in the text entries. This no longer works. This is related to the changes to suppress odd characters and
leading/trailing spaces. The Gtk.Entry.set_text() call is
effectively clearing the undo/redo list at every keystroke or when
you leave the field. In this PR I move the odd characters cleanup into
UndoableEntry.do_insert_text instead of MonitoredEntry. I scanned the users of MonitoredEntry and they all appeared to use
Glade files, I scanned the glade files for anyone using just plain
Entry (none found), they all appeared to use UndoableEntry or
ValidatableMaskedEntry, so this should cover everyone.
2019-10-17 Sam Manzi <manzi.sam@gmail.com>
* po/gramps.pot: Update translation template due to pr #918 (#933)
2019-10-17 romjerome <romjerome@users.noreply.github.com>
* po/POTFILES.in, po/POTFILES.skip: Update POTFILES.in/skip for
missing translations (#918) * Update POTFILES.in * Update POTFILES.skip * Update POTFILES.in add missing 'removespaces.glade' reference
2019-10-17 Serge Noiraud <Serge.Noiraud@laposte.net>
* data/css/ancestortree.css, gramps/plugins/webreport/buchheim.py,
gramps/plugins/webreport/person.py: Narrative web: Ancestor's tree
Fix display looks weird (#929) * Narrative web: Ancestor's tree display looks weird Solves the following: - Person boxes overlap - Some person boxes partially visible or hidden Fixes #11382 * Narrative web: some cleanup in ancestortree.css * Narrative web : ancestor tree and long names. * Adapt ancestor tree css file for all themes
2019-10-17 romjerome <romjerome@users.noreply.github.com>
* gramps/gui/utils.py, gramps/plugins/view/pedigreeview.py: Fix tag
colors on PedigreeView (#915) Fixes #11363 * Handle long and short hex format black color * Fix hex_to_rgb_float utility function
2019-10-16 Paul Culley <paulr2787@gmail.com>
* gramps/grampsapp.py: Fix Gramps -v error when Gtk is not present
(#923) Via email a user noted a bug when "Gramps -v" was used with Gtk not
installed (and gi was). When the "gi.require_version('Gtk', '3.0')"
was added during Gramps 5.0.0 timeframe, a corresponding exception
was not.
2019-10-17 Serge Noiraud <Serge.Noiraud@laposte.net>
* gramps/plugins/webreport/basepage.py,
gramps/plugins/webreport/narrativeweb.py,
gramps/plugins/webreport/webcal.py: NarrativeWeb: dates not
localised in place pages (#916) * NarrativeWeb: dates not localised in place pages Fixes #11357 * WEBCAL: home link translated to lowercase Fixes #11358
2019-10-17 Baizley <Baizley@users.noreply.github.com>
* gramps/plugins/view/pedigreeview.py: Patch for PedigreeView not
reflecting changes to birthday or death (#921) Fixes #11366 * Make PedigreeView listen on event update signals. The PedigreeView was not listening for updates on events, so changes
to a birthday or death would not be reflected in the view. * Remove comment about signal side-effects.
2019-10-16 Paul Culley <paulr2787@gmail.com>
* gramps/plugins/docgen/odfdoc.py: Fix improper escaping in odt
output for TOC/Bookmark etc. (#928) Fixes #11378 For the index, toc, bookmark etc. normal XML escape is correct, the
original code also added sub-tags for line break and tab which was
NOT correct.
2019-10-16 Paul Culley <paulr2787@gmail.com>
* gramps/cli/plug/__init__.py: Fix CLI parser to accept negative
integers as valid (#927) Fixes #11381
2019-10-16 Paul Culley <paulr2787@gmail.com>
* gramps/plugins/drawreport/descendtree.py: Fix Descendant Tree
report for HandleError when no parents on family (#925) Fixes #11365
2019-10-10 niememat <niememat@gmail.com>
* po/fi.po: Fix translation in Finnish
2019-10-08 Nick Hall <nick-h@gramps-project.org>
* : Merge pull request #910 from prculley:reorder
2019-09-20 prculley <paulr2787@gmail.com>
* gramps/plugins/tool/reorderids.py: Fix Reorder ID tool so
subsequent db additions used next possible ID Fixes #11346
2019-10-08 niememat <niememat@gmail.com>
* po/fi.po: Fix translation in Finnish
2019-10-05 niememat <niememat@gmail.com>
* po/fi.po: Fix translation in Finnish
2019-09-22 SNoiraud <serge.noiraud@laposte.net>
* data/css/Web_Mainz.css: Narrativeweb: Mainz problem with short
text in one note Issue occurs on the homepage and introduction page. Fixes #11349
2019-10-03 Nick Hall <nick-h@gramps-project.org>
* : Merge pull request #913 from prculley:bug11316
2019-09-21 prculley <paulr2787@gmail.com>
* gramps/plugins/export/exportftree.py,
gramps/plugins/export/exportgeneweb.py,
gramps/plugins/export/exportvcalendar.py: Fix exports to have
consistent results
2019-09-21 prculley <paulr2787@gmail.com>
* gramps/plugins/export/exportvcalendar.py: Upgrade export VCalendar
to v2.0, so can export utf8 Fixes #11316
2019-09-21 SNoiraud <serge.noiraud@laposte.net>
* gramps/plugins/webreport/webcal.py: WEBCAL: Wrong web calendar
title on home page Fixes #11354 This PR solves the possibility to have ">", "<" in the title
2019-09-20 prculley <paulr2787@gmail.com>
* gramps/gui/configure.py: Fix Preferences so <ctrl>PageUp/PageDn
doesn't stick on Dates tab Fixes #11351
2019-09-15 ailintom <ilintomich@gmail.com>
* gramps/plugins/graph/gvfamilylines.py,
gramps/plugins/graph/gvhourglass.py,
gramps/plugins/graph/gvrelgraph.py: Escape for name, dates and
places in graph reports Currently dates and places contain XML special characters (example:
birth date = "1867 <?>"), the item is rendered incorrectly in the
report, when images are included. Escaping special characters with
html.escape solves the problem. Also fixes the & sign in the name, which earlier caused the report
to fail.
2019-09-24 Paul Culley <paulr2787@gmail.com>
* gramps/gui/views/navigationview.py: Fix 'Go' menu direct object
selection, goes to wrong place (#907) Fixes #11341 Fixes up the scrambled 'Go' menu, got messed up in the UIManager
upgrade.
2019-09-20 Zdeněk Hataš <zdenek.hatas@gmail.com>
* po/cs.po: Update Czech translation
2019-09-18 pehlm <par.ekholm@pekholm.org>
* po/sv.po: Swedish translation, some changes
2019-09-18 RossGammon <rossgammon@mail.dk>
* debian/changelog, debian/control: [Debian ( .deb file)]Release511
updates (#909) * Add python3-fontconfig to recommends * Finalise Debian changelog for 5.1.1-1 release
2019-09-14 John Ralls <jralls@ceridwen.us>
* mac/Info.plist, mac/gramps.modules: Release Gramps 5.1.1 on MacOS.
2019-08-25 John Ralls <jralls@ceridwen.us>
* mac/Info.plist, mac/gramps.bundle: Assorted fixes for building
Gramps 5.0.
2019-09-14 Nick Hall <nick-h@gramps-project.org>
* gramps/gen/const.py, gramps/version.py: Bump to 5.1.2
2019-09-14 Nick Hall <nick-h@gramps-project.org>
* gramps/gen/const.py: Release Gramps 5.1.1
2019-09-14 Nick Hall <nick-h@gramps-project.org>
* ChangeLog, NEWS, po/ChangeLog: Update Changelog and NEWS files
* Bump to 5.1.6
+206 -1
View File
@@ -1,3 +1,208 @@
2023-06-29
Version 5.1.6
* Update copyright date.
* Narrative web: problem with small pictures. Fixes #12884.
* Implement the "<CTRL>J" for the family view. Fixes #12882.
* Avoid application crash on invalid user input. If the user inputs an invalid
date this change keeps the application from crashing. The invalid date
information is reported to the user in the log. Fixes #12658.
* Fix export where private citations are excluded.
* Fix Event Compare tool to display enclosed places properly.
* Check that view exists before calling post_create method. Avoids 'NoneType'
object has no attribute 'post_create' error. Fixes #12638.
* Fix a wrong operator bug in the web calendar report.
* Revert "Enclose tree report image path and file name in braces" due to reports
of regression where processing of the generated TeX file fails due to bad path
specificiation for image files. Fixes #12437 and #12697.
* Geography View: Fix number of arguments in add_bookmark method. Fixes #12718.
* Use date-specific place in report substitution variables. Fix place title in
graphical reports which have user-defined display formats to use date-specific
alternate name. This impacts the Ancestor Tree, Descendant Tree, and Family
Descendant Tree reports. Fixes #12763.
* Try to import berkeleydb if bsddb3 isn't found. berkelydb is usable for
python >= 3.6 and required for python >= 3.10.
See https://www.jcea.es/programacion/pybsddb.htm.
* HtmlDoc: Create a unique filename for cropped images.
* Fix corrupted NOTE tag in Gedcom export. Remove Python2 code obsoleted by
Python3, which was corrupting Gedcom export of Gramps Notes text that includes
multi-byte utf-8 characters. Fixes #12709.
* Fix IndexError that sometimes occurs when changing view This occurs when
restarting Gramps. Fixes #12636, #12304, #12429, #12623, #12695.
* Fix crash when invalid note link. Fixes #12854.
* Fix tags with color names in pedigree views. Fixes #12866.
* Crash when invalid event date.
* ListModel: Fix multiple level paths when we use checkboxes in columns.
The path was previously converted to int.
* Update Gramps CI workflow to run on Ubuntu 20.04. Ubuntu 18.04 became fully
unsupported on 1 Dec 2022.
* Fix package installation failures in CI.
* Fix spouse's name and underlined call names in records. Fixes #12391.
* Update INCOMPLETE_TRANSLATIONS list. Remove: he, Add: zh_HK, zh_TW.
* Update Debian folder after 5.1.5 release.
* Mac:
* Patch bsddb to use berkeleydb instead of bsddb3 module.
* Patch berkeleydb configure to work on Apple Silicon.
* Update Exiv2 download URL, moved to github.
* Repackage Gramps 5.1.5 with Gtk updates fixing use on macOS 13 Ventura.
2022-02-05
Version 5.1.5
* Update translations: de, pl, sv, zh_CN.
* Remove Travis CI configuration.
* Fix badges in README file.
* Update copyright date.
* Strange behavior for the scrollbar in the bottombar. Fixes #12438.
* Fix place object element order in DTD and RNG schemas. Element placeobj
content does not follow the DTD and RNG, expecting (ptitle? , pname+).
Fixes #12500.
* Solve InterpolationSyntaxError if "%" in a string. The grampletpane module
saves data in a config file for all the gramplets added in the dashboard. The
python configparser module doesn't like if we have a "%" character in a string.
Fixes #12423.
* '<' not supported between 2 instances of IndexMark. Fixes #12467.
* Remove debug statements in unit tests.
* Fix negative Span when dates are not Gregorian. Fixes #12525.
* Incorrect grouping if no ma/patronymic surname.
* Group As override is ignored for ma/patronymic surnames. Fixes #12395.
See: https://gramps.discourse.group/t/patronymic-and-matronymic-name/1684/5
* Add comments for the lat-lon field of editplace.
* Place editor, lat and long text are swapped. Fixes #12374.
* Fix Statusbar progress being shown before use. Fixes #12373.
* Fix exception when removing a group name in Sqlite db when group name is
already missing. Fixes #12367.
* Fix error when trying to close name editor during long name group mapping
view rebuild. Fixes #12328.
* OsmGpsMap-CRITICAL: Map source setup called twice Fixes #12352.
* Fix probably alive function unit test.
* Use GitHub Actions to run continuous integration checks.
* Mac:
* Update Exiv2, PYExiv2, and json-glib.
* Repackage Gramps.app to work with macOS 12.
* Add entitlements path to bundle-file so Gramps.app is signed with it.
* Add python-fontconfig to the macOS build. Needed to enable using
genealogical symbols.
* Inlude fontconfig's etc/fonts in macOS app bundle. Graphviz now uses
fontconfig to find its fonts. Fixes #12370.
2021-07-26
Version 5.1.4
* Update translations: cs, de, es, fi, fr, hu, nl, pt_BR, ru, sv, zh_CN.
* Update copyright date.
* Fix probably alive if death without date.
* Place editor, copy and paste of lat and long text no longer
auto-populating latitude and longitude fields.
* Fix for crash when changing views if part of toolbar is not shown because
of a small screen when changing views.
* Fix bottombar always showing after restart, even when not wanted.
* Always use filtered collation names. Store the Sqlite3 collations in the
__collations array to short-circuit re-creation.
* Fix issue with German relation calculator fixed issue when more than 24
generations between the two people.
* Add file logging for macOS. When Gramps is launched from macOS's
LaunchServices it doesn't have a sys.stderr attached so the default stream
logger goes to /dev/null. Use a FileHandler in tht case, writing the log
to $TMPDIR/gramps-pid.log. This will help particularly in analyzing
crashes where python shuts down as there's no crash report in that case.
* Fix libplaceview to avoid exception when mapservice is no longer present.
* Fix References Gramplet for inadequate updates when other objects change.
* Fix geofamily crash if a family has no father.
* Home Person setting does not convey in a merge.
* Fix CSV export of view to only put single CR character.
* Add Media filter rule 'HasMedia' to list of media rules for editor.
* Need to set locale.textdomain under linux. _build_popup_ui() ignores
translated strings without locale.textdomain set.
* Change category of 'MatchesEventFilter'.
* Fix issue where separator between top and bottom bar of View creeps up.
* Fix Locations Gramplet (Enclosed by) to properly display certain nested
places when the smallest place has undated enclosure and larger places are
dated.
* Fix Family Tree Manager drop error on Windows.
* Fix exportvcalendar error is "is not" with a literal (Python 3.8 issue)
* Handle not found when copying source from the citation tree.
* Fix call to 'file' function, which doesn't exist in Python3.
* Fix write_lock_file exception when USERNAME is missing.
* Fix EditPlace so Tab key doesn't get stuck on Private icon.
* Fix Tag report for places that have a hierarchy.
* Fix exception when cancelling out of a db upgrade in GUI.
* Icon file changes:
* Install 128x128 and 256x256 application icons.
* Install MIME type icons into the hicolor theme.
* Remove gnome-mime- prefix from icon filenames.
* Install application icons into correct directories.
* Fix error in Birthday and Anniversary report. Fixes an error triggered
when the first person_handle in the list has a death event, but no birth
event and does not have family relationships. These conditions lead to
the local variable short_name not being declared before it comes time to
process death events.
* Fix graphdoc to properly escape characters in ids for Graphviz.
* Replace inspect.stack() with inspect.currentframe().
Works around https://bugs.python.org/issue12920 which causes every
call to inspect.trace() to fail because __main__ is always the
starting point.
* Fix crash sorting on columns in Selectors with TreeModels.
* Fix progress bar freeze due to changes in Gtk.
* Fix svgdrawdoc for text containing XML invalid characters.
* Mac:
* Update PyICU to 2.7.2 in macOS build.
* Update dependencies. Includes moving berkeleydb and pybsddb over from
gtk-osx.
* Further changes for bundling with Python 3.8.
* Set __file__ if gramps_launcher.py is run as __main__.
* Add geocode-glib to build.
2020-08-11
Version 5.1.3
* Update ca, de, fi, fr, ja, pl, ru, sl, sv, uk, zh_CN translation
* Events View: "Main Participants" column does not show the full list
of participants when expanded.
* mac/gramps.modules: Use current Gtk release instead of Gtk-3.14.
* mac/gramps.modules: Upgrade pymodules for Python 3.8 compatibility.
* Fix XML export when 'Group-as" name contains XML invalid chars
* Fix NarWeb: Province place-type is not displayed
* Fix ManagedWindow so that new windows don't appear offscreen when
system 'screen' sizes change in part time multi-monitor setups.
* Fix menus when db fails to open due to upgrade/downgrade etc.
* Fix issue with attach source tool, results panel
* Fix GEDCOM export; don't include ADDR when address is missing
* EditPlace: Allow Coordinates containing a comma instead of a period
* NarrativeWeb:
* Should show patronymic in individuals.
In the individuals and in surnames pages, we should show the
complete name like defined in the display tab from the narrative web
configuration.
* Fix Narrated Website Google Maps Output JS Warning SensorNotRequired
* Fix incorrect link type for osm css files
* Fix image size limit doesn't match tooltip
* Update all translations for changes from 'Default' to 'Home' Person
* Change GUI references to 'Home Person' instead of 'Default Person'
* Use event attribute types in the event reference editor.
In the event reference editor, custom event attribute types should
be used rather than the default person attribute types.
* Fix Verify tool bug caused by bad change in GObject introspection
* Fix RemoveUnused tool for crash caused by Gtk introspection bug
* Fix import test for change cause by previous change which was:
Fix GEDCOM import for bad source title when sources precede references.
* Fix GEDCOM import for bad source title when sources precede references.
* Fix some reports for CLI where warning message about Value not found
* Fix Genealogy Tree reports for crash in CLI
* Add uistate to tree views filter initialization
* Fix some Python syntax errors that appear in v3.8.x
* Suppress age = 0 days in events list. If the reference event date is equal
to the event date, don't show the age except if the date is estimated,
calculated, etc.
* Fix Dashboard Gramplets to update during db close when not shown
* Fix Windows GUI mode startup for crash with some languages
* Fix dbapi to support "Abandon Changes & Quit" feature
* Fix GrampsType for comparison bug with empty string as one value
* Fix Date Display so that it uses LC_TIME if defined
* Fix StyledText so serialize will match for style list order changes
* Try to fix exceptions on ManagedWindow close
* Fix Mac SQLite3 locale bug when locale contains non-ascii characters
* Fix issue when Person has Same date of birth and death; gives an error.
* Geography: add a popup for a bad tiles path
* Fix GEDCOM export of estimated/calculated dates with modifers
* Bump to v5.1.3
2020-01-14
Version 5.1.2
* Narweb: Private notes for home, intro and contact. If the notes are private,
@@ -41,7 +246,7 @@ Version 5.1.2
* [Tree doc Tex] fix typo on custom size
* Fix duplicated "døde døde" Norwegion Translation for libnarrate
* Fix up Event Editors Place display for bidi text with Gramps ID
* Fix issues with RTL languages and LAT/LONG
* Fix issues with RTL languages and LAT/LONG
* Fix display of GPS coordinates in Places view for RTL languages
* Fix place editor lat/long entry for RTL languages
* Fix GEDCOM export to avoid translated GrampsType strings
+6 -3
View File
@@ -1,5 +1,8 @@
The Gramps Project ( https://gramps-project.org ) [![Build Status](https://travis-ci.org/gramps-project/gramps.svg?branch=master)](https://travis-ci.org/gramps-project/gramps)[![codecov.io](https://codecov.io/github/gramps-project/gramps/coverage.svg?branch=master)](https://codecov.io/github/gramps-project/gramps?branch=master)
The Gramps Project ( https://gramps-project.org )
===================
[![GitHub CI](https://github.com/gramps-project/gramps/actions/workflows/gramps-ci.yml/badge.svg?event=push&branch=maintenance/gramps51)](https://github.com/gramps-project/gramps/actions/workflows/gramps-ci.yml?query=branch%3Amaintenance%2Fgramps51)
[![codecov.io](https://codecov.io/github/gramps-project/gramps/coverage.svg?branch=maintenance/gramps51)](https://app.codecov.io/gh/gramps-project/gramps/branch/maintenance%2Fgramps51)
We strive to produce a genealogy program that is both intuitive for hobbyists and feature-complete for professional genealogists.
Please read the **COPYING** file first.
@@ -63,7 +66,7 @@ The following packages are **STRONGLY RECOMMENDED** to be installed:
sorting is done through built-in libraries. PyICU is
fairly widely available through the package managers of
distributions. See http://pyicu.osafoundation.org/
(These are Python bindings for the ICU package.
(These are Python bindings for the ICU package.
https://pypi.python.org/pypi/PyICU/)
* **Ghostscript**
@@ -72,7 +75,7 @@ The following packages are **STRONGLY RECOMMENDED** to be installed:
The following packages are optional:
------------------------------------
* **gtkspell**
* **gtkspell**
Enable spell checking in the notes. Gtkspell depends on
enchant. A version of gtkspell with gobject introspection

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

+1 -1
View File
@@ -251,7 +251,7 @@ PLACES
<!ELEMENT places (placeobj)*>
<!ELEMENT placeobj (ptitle?, pname+, code?, coord?, placeref*, location*,
<!ELEMENT placeobj (ptitle?, code?, pname+, coord?, placeref*, location*,
objref*, url*, noteref*, citationref*, tagref*)>
<!ATTLIST placeobj
id CDATA #IMPLIED
+1 -1
View File
@@ -453,10 +453,10 @@
<ref name="primary-object"/>
<attribute name="type"><text/></attribute>
<optional><element name="ptitle"><text/></element></optional>
<optional><element name="code"><text/></element></optional>
<oneOrMore><element name="pname">
<ref name="placename-content"/>
</element></oneOrMore>
<optional><element name="code"><text/></element></optional>
<optional><element name="coord">
<attribute name="long"><text/></attribute>
<attribute name="lat"><text/></attribute>
+6 -6
View File
@@ -1,12 +1,12 @@
0 HEAD
1 SOUR Gramps
2 VERS 5.0.2
2 VERS 5.1.2
2 NAME Gramps
1 DATE 4 AUG 2019
2 TIME 15:26:44
1 DATE 7 JAN 2020
2 TIME 13:39:43
1 SUBM @SUBM@
1 FILE C:\Users\prc\AppData\Roaming\gramps\temp\exp_sample_ged.ged
1 COPR Copyright (c) 2019 Alex Roitman,,,.
1 COPR Copyright (c) 2020 Alex Roitman,,,.
1 GEDC
2 VERS 5.5.1
2 FORM LINEAGE-LINKED
@@ -911,7 +911,7 @@
2 DATE I think 1970 to 1971
2 PLAC San Francisco, San Francisco Co., CA
1 SLGC
2 DATE EST ABT 1999
2 DATE ABT 1999
2 FAMC @F0016@
2 TEMP DENVE
2 PLAC Denver, Denver Co., CO, Denver Co., Colorado, USA
@@ -1424,7 +1424,7 @@
0 @N0018@ NOTE Another Citation Note
0 @N0019@ NOTE A bad photo for sure
0 @O0000@ OBJE
1 FILE c:\users\prc\workspace\grampsm\main\data\tests\O0.jpg
1 FILE d:\users\prc\documents\gramps\data\tests\O0.jpg
2 FORM jpg
2 TITL Michael O'Toole 2015-11
1 NOTE @N0019@
+3 -3
View File
@@ -3,7 +3,7 @@
"http://gramps-project.org/xml/1.7.1/grampsxml.dtd">
<database xmlns="http://gramps-project.org/xml/1.7.1/">
<header>
<created date="2019-08-04" version="5.0.2"/>
<created date="1999-12-25" version="5.1.3"/>
<researcher>
<resname>Alex Roitman,,,</resname>
<resaddr>Not Provided</resaddr>
@@ -1302,7 +1302,7 @@
</reporef>
</source>
<source handle="_0000008500000085" change="1" id="S0000">
<stitle>@S0@</stitle>
<stitle>Marriage Certificae</stitle>
<noteref hlink="_000000e7000000e7"/>
<reporef hlink="_000000e6000000e6" callno="what-321-ever" medium="Photo"/>
</source>
@@ -1705,7 +1705,7 @@ Unknown tag Line 1111:
<range start="0" end="163"/>
</style>
</note>
<note handle="_000000f9000000f9" change="1564950708" id="N0036" type="General">
<note handle="_000000f9000000f9" change="1591544255" id="N0036" type="General">
<text>Objects referenced by this note were missing in a file imported on 12/25/1999 12:00:00 AM.</text>
</note>
</notes>
+30
View File
@@ -1,3 +1,33 @@
gramps (5.1.5-1) unstable; urgency=medium
* New release
* Update copyright file
* Drop patch, incorporated upstream
-- Ross Gammon <rossgammon@debian.org> Sat, 12 Feb 2022 17:01:21 +0100
gramps (5.1.4-1) unstable; urgency=medium
* New release
* Add new copyrights
* Update watch file
* Patch probably alive test to fix FTBFS
-- Ross Gammon <rossgammon@debian.org> Sun, 15 Aug 2021 18:31:56 +0200
gramps (5.1.3-1) focal; urgency=medium
* New release
* Update debian/copyright for Alex Roitman
-- Ross Gammon <rosco2@ubuntu.com> Sun, 16 Aug 2020 20:23:34 +0200
gramps (5.1.2-1) unstable; urgency=medium
* New release
-- Ross Gammon <rossgammon@debian.org> Sat, 11 Jan 2020 19:07:08 +0100
gramps (5.1.1-1) unstable; urgency=medium
* New release
+3 -1
View File
@@ -46,7 +46,7 @@ Copyright: 2000-2007, Alex Roitman
2009, Florian Heinle
2009, Gerald W. Britton
2009, Igal Shapira
2009-2018, Nick Hall
2009-2022, Nick Hall
2009, Pander Musubi
2009, Robert Ham
2009, Swoon on bug tracker
@@ -92,6 +92,8 @@ Copyright: 2000-2007, Alex Roitman
2018, Robin van der Vliet
2018, Theo van Rijn
2019, Matthias Kemmer
2020, Jan Sparreboom
2021, Mirko Leonhaeuser
License: GPL-2+
Files: debian/*
+3 -5
View File
@@ -1,8 +1,6 @@
version=3
version=4
opts=\
dversionmangle=s/(\~|\+)(debian|dfsg|ds|deb)(\.\d+)?$//,\
filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/$1\.tar\.gz/,\
filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/gramps-project-$1\.tar\.gz/,\
repacksuffix=~dfsg \
https://github.com/gramps-project/gramps/tags \
.*/archive/v?([\d\.]+).tar.gz
.*/v?(\d\S+)\.tar\.gz
+1 -1
View File
@@ -57,7 +57,7 @@ master_doc = 'index'
# General information about the project.
project = 'Gramps'
copyright = '2001-2019, The Gramps Project'
copyright = '2001-2023, The Gramps Project'
author = 'Donald N. Allingham'
# The version info for the project you're documenting, acts as replacement for
+2 -2
View File
@@ -519,8 +519,8 @@ class CommandLineReport:
self.format = tree_format["class"]
if self.format is None:
# Pick the first one as the default.
self.format = tree_format.FORMATS[0]["class"]
_chosen_format = tree_format.FORMATS[0]["type"]
self.format = treedoc.FORMATS[0]["class"]
_chosen_format = treedoc.FORMATS[0]["type"]
else:
self.format = None
if _chosen_format and _format_str:
+2 -2
View File
@@ -145,7 +145,7 @@ sys.path.insert(0, ROOT_DIR)
git_revision = get_git_revision(ROOT_DIR).replace('\n', '')
if sys.platform == 'win32' and git_revision == "":
git_revision = get_git_revision(os.path.split(ROOT_DIR)[1])
#VERSION += git_revision
VERSION += git_revision
#VERSION += "-1"
#
@@ -225,7 +225,7 @@ GTK_GETTEXT_DOMAIN = 'gtk30'
#
#-------------------------------------------------------------------------
COPYRIGHT_MSG = "© 2001-2006 Donald N. Allingham\n" \
"© 2007-2020 The Gramps Developers"
"© 2007-2023 The Gramps Developers"
COMMENTS = _("Gramps\n (Genealogical Research and Analysis "
"Management Programming System)\n"
"is a personal genealogy program.")
+11 -6
View File
@@ -35,6 +35,7 @@ import logging
# Gramps modules
#
#-------------------------------------------------------------------------
from ..utils.grampslocale import GrampsLocale
from ..const import GRAMPS_LOCALE as glocale
_ = glocale.translation.sgettext
# import prerequisites for localized handlers
@@ -72,16 +73,20 @@ from . import _date_uk
from . import _date_zh_CN
from . import _date_zh_TW
# the following makes sure we use the LC_TIME value for date display & parsing
dlocale = GrampsLocale(lang=glocale.calendar)
# Initialize global parser
try:
if LANG in LANG_TO_PARSER:
parser = LANG_TO_PARSER[LANG](plocale=glocale)
parser = LANG_TO_PARSER[LANG](plocale=dlocale)
else:
parser = LANG_TO_PARSER[LANG_SHORT](plocale=glocale)
parser = LANG_TO_PARSER[LANG_SHORT](plocale=dlocale)
except:
logging.warning(
_("Date parser for '%s' not available, using default") % LANG)
parser = LANG_TO_PARSER["C"](plocale=glocale)
parser = LANG_TO_PARSER["C"](plocale=dlocale)
# Initialize global displayer
try:
@@ -92,13 +97,13 @@ except:
try:
if LANG in LANG_TO_DISPLAY:
displayer = LANG_TO_DISPLAY[LANG](val, blocale=glocale)
displayer = LANG_TO_DISPLAY[LANG](val, blocale=dlocale)
else:
displayer = LANG_TO_DISPLAY[LANG_SHORT](val, blocale=glocale)
displayer = LANG_TO_DISPLAY[LANG_SHORT](val, blocale=dlocale)
except:
logging.warning(
_("Date displayer for '%s' not available, using default") % LANG)
displayer = LANG_TO_DISPLAY["C"](val, blocale=glocale)
displayer = LANG_TO_DISPLAY["C"](val, blocale=dlocale)
# Import utility functions
+27 -25
View File
@@ -83,35 +83,37 @@ class DateParserNL(DateParser):
month_to_int["xbris"] = 12
modifier_to_int = {
'voor' : Date.MOD_BEFORE,
'na' : Date.MOD_AFTER,
'tegen' : Date.MOD_ABOUT,
'om' : Date.MOD_ABOUT,
'rond' : Date.MOD_ABOUT,
'circa' : Date.MOD_ABOUT,
'ca.' : Date.MOD_ABOUT,
'voor' : Date.MOD_BEFORE,
'na' : Date.MOD_AFTER,
'ca.' : Date.MOD_ABOUT,
'circa' : Date.MOD_ABOUT,
'om' : Date.MOD_ABOUT,
'omstreeks' : Date.MOD_ABOUT,
'ongeveer' : Date.MOD_ABOUT,
'rond' : Date.MOD_ABOUT,
'tegen' : Date.MOD_ABOUT,
}
calendar_to_int = {
'gregoriaans' : Date.CAL_GREGORIAN,
'greg.' : Date.CAL_GREGORIAN,
'juliaans' : Date.CAL_JULIAN,
'jul.' : Date.CAL_JULIAN,
'hebreeuws' : Date.CAL_HEBREW,
'hebr.' : Date.CAL_HEBREW,
'islamitisch' : Date.CAL_ISLAMIC,
'isl.' : Date.CAL_ISLAMIC,
'franse republiek': Date.CAL_FRENCH,
'fran.' : Date.CAL_FRENCH,
'persisch' : Date.CAL_PERSIAN,
'zweeds' : Date.CAL_SWEDISH,
'z' : Date.CAL_SWEDISH,
'gregoriaans' : Date.CAL_GREGORIAN,
'greg.' : Date.CAL_GREGORIAN,
'juliaans' : Date.CAL_JULIAN,
'jul.' : Date.CAL_JULIAN,
'hebreeuws' : Date.CAL_HEBREW,
'hebr.' : Date.CAL_HEBREW,
'islamitisch' : Date.CAL_ISLAMIC,
'isl.' : Date.CAL_ISLAMIC,
'frans republiekeins' : Date.CAL_FRENCH,
'fran.' : Date.CAL_FRENCH,
'persisch' : Date.CAL_PERSIAN,
'zweeds' : Date.CAL_SWEDISH,
'z' : Date.CAL_SWEDISH,
}
quality_to_int = {
'geschat' : Date.QUAL_ESTIMATED,
'geschat' : Date.QUAL_ESTIMATED,
'gesch.' : Date.QUAL_ESTIMATED,
'berekend' : Date.QUAL_CALCULATED,
'berekend' : Date.QUAL_CALCULATED,
'ber.' : Date.QUAL_CALCULATED,
}
@@ -147,17 +149,17 @@ class DateDisplayNL(DateDisplay):
calendar = (
"", "juliaans", "hebreeuws",
"franse republiek", "persisch", "islamitisch",
"frans republikeins", "persisch", "islamitisch",
"zweeds" )
_mod_str = ("", "voor ", "na ", "rond ", "", "", "")
_mod_str = ("", "voor ", "na ", "omstreeks ", "", "", "")
_qual_str = ("", "geschat ", "berekend ")
_bce_str = "%s v. Chr."
formats = (
"JJJJ-MM-DD (ISO)", "Numerisch DD/MM/JJ", "Maand Dag, Jaar",
"JJJJ-MM-DD (ISO)", "Numeriek DD/MM/JJJJ", "Maand Dag, Jaar",
"Mnd. Dag Jaar", "Dag Maand Jaar", "Dag Mnd. Jaar"
)
# this definition must agree with its "_display_gregorian" method
+5 -4
View File
@@ -52,7 +52,6 @@ methods should be changed to generate exceptions. Possibly by globally changing
#
#-------------------------------------------------------------------------
import logging
import os
import inspect
from abc import ABCMeta
from types import FunctionType
@@ -160,10 +159,12 @@ def wrapper(method):
"""
class_name = args[0].__class__.__name__
func_name = method.__name__
caller_frame = inspect.stack()[1]
frame = inspect.currentframe()
c_frame = frame.f_back
c_code = c_frame.f_code
LOG.debug('calling %s.%s()... from file %s, line %s in %s',
class_name, func_name, os.path.split(caller_frame[1])[1],
caller_frame[2], caller_frame[3])
class_name, func_name, c_code.co_filename, c_frame.f_lineno,
c_code.co_name)
return method(*args, **keywargs)
return wrapped
+1 -1
View File
@@ -535,7 +535,7 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
self.undo_history_callback = None
self.modified = 0
self.transaction = None
self.abort_possible = False
self.abort_possible = True
self._bm_changes = 0
self.has_changed = False
self.surname_list = []
+6 -8
View File
@@ -78,15 +78,13 @@ class DbTxn(defaultdict):
elapsed_time = time.time() - self.start_time
if __debug__:
caller_frame = inspect.stack()[1]
frame = inspect.currentframe()
c_frame = frame.f_back
c_code = c_frame.f_code
_LOG.debug(" **** DbTxn %s exited. Called from file %s, "
"line %s, in %s **** %.2f seconds" %
((hex(id(self)),)+
(os.path.split(caller_frame[1])[1],)+
tuple(caller_frame[i] for i in range(2, 4))+
(elapsed_time,)
)
)
"line %s, in %s **** %.2f seconds",
hex(id(self)), c_code.co_filename, c_frame.f_lineno,
c_code.co_name, elapsed_time)
return False
+11 -7
View File
@@ -42,6 +42,8 @@ from ..const import PLUGINS_DIR, USER_PLUGINS
from ..constfunc import win, get_env_var
from ..config import config
from .dbconst import DBLOGNAME, DBLOCKFN, DBBACKEND
from ..const import GRAMPS_LOCALE as glocale
_ = glocale.translation.gettext
#-------------------------------------------------------------------------
#
@@ -70,12 +72,14 @@ def make_database(plugin_id):
database = getattr(mod, pdata.databaseclass)
db = database()
import inspect
caller_frame = inspect.stack()[1]
frame = inspect.currentframe()
c_frame = frame.f_back
c_code = c_frame.f_code
_LOG.debug("Database class instance created Class:%s instance:%s. "
"Called from File %s, line %s, in %s"
% ((db.__class__.__name__, hex(id(db)))
+ (os.path.split(caller_frame[1])[1],)
+ tuple(caller_frame[i] for i in range(2, 4))))
"Called from File %s, line %s, in %s",
db.__class__.__name__, hex(id(db)), c_code.co_filename,
c_frame.f_lineno, c_code.co_name)
return db
else:
raise Exception("can't load database backend: '%s'" % plugin_id)
@@ -209,8 +213,8 @@ def write_lock_file(name):
if win():
user = get_env_var('USERNAME')
host = get_env_var('USERDOMAIN')
if host is None:
host = ""
if not user:
user = _("Unknown")
else:
host = os.uname()[1]
# An ugly workaround for os.getlogin() issue with Konsole
+5 -4
View File
@@ -29,7 +29,6 @@ Provide the database state class
#
#------------------------------------------------------------------------
import sys
import os
import logging
import inspect
@@ -88,10 +87,12 @@ class DbState(Callback):
"""
class_name = self.__class__.__name__
func_name = "is_open"
caller_frame = inspect.stack()[1]
frame = inspect.currentframe()
c_frame = frame.f_back
c_code = c_frame.f_code
_LOG.debug('calling %s.%s()... from file %s, line %s in %s',
class_name, func_name, os.path.split(caller_frame[1])[1],
caller_frame[2], caller_frame[3])
class_name, func_name, c_code.co_filename, c_frame.f_lineno,
c_code.co_name)
return (self.db is not None) and self.db.is_open()
def change_database(self, database):
+21 -2
View File
@@ -999,6 +999,8 @@ class NameDisplay:
1. if group name is defined, use that
2. if group name is defined for the primary surname, use that
3. use primary surname itself otherwise
4. if no primary surname, do we have a ma/patronymic surname ?
in this case, group name will be the ma/patronymic name.
:param pn: raw unserialized data of name
:type pn: tuple
@@ -1007,8 +1009,25 @@ class NameDisplay:
"""
if pn[_GROUP]:
return pn[_GROUP]
return db.get_name_group_mapping(_raw_primary_surname_only(
pn[_SURNAME_LIST]))
name = pn[_GROUP]
if not name:
# if we have no primary surname, perhaps we have a
# patronymic/matronynic name ?
srnme = pn[_ORIGINPATRO]
surname = []
for _surname in srnme:
if (_surname[_TYPE_IN_LIST][0] == _ORIGINPATRO
or _surname[_TYPE_IN_LIST][0] == _ORIGINMATRO):
# Yes, we have one.
surname = [_surname]
# name1 is the ma/patronymic name.
name1 = _raw_patro_surname_only(surname)
if name1 and len(srnme) == 1:
name = db.get_name_group_mapping(name1)
if not name:
name = db.get_name_group_mapping(_raw_primary_surname_only(
pn[_SURNAME_LIST]))
return name
def _make_fn(self, format_str, d, args):
"""
@@ -51,6 +51,7 @@ editor_rule_list = [
MediaPrivate,
MatchesFilter,
MatchesSourceConfidence,
HasMedia,
HasAttribute,
ChangedSince,
HasTag,
@@ -41,9 +41,9 @@ from .. import Rule
class IsDefaultPerson(Rule):
"""Rule that checks for a default person in the database"""
name = _('Default person')
name = _('Home Person')
category = _('General filters')
description = _("Matches the default person")
description = _("Matches the Home Person")
def prepare(self, db, user):
p = db.get_default_person()
@@ -44,10 +44,10 @@ class IsLessThanNthGenerationAncestorOfDefaultPerson(Rule):
not more than N generations away"""
labels = [ _('Number of generations:') ]
name = _('Ancestors of the default person '
name = _('Ancestors of the Home Person '
'not more than <N> generations away')
category = _('Ancestral filters')
description = _("Matches ancestors of the default person "
description = _("Matches ancestors of the Home Person "
"not more than N generations away")
def prepare(self, db, user):
@@ -52,7 +52,7 @@ class MatchesEventFilter(MatchesEventFilterBase):
name = _('Persons with events matching the <event filter>')
description = _("Matches persons who have events that match a certain"
" event filter")
category = _('General filters')
category = _('Event filters')
# we want to have this filter show event filters
namespace = 'Event'
@@ -98,9 +98,10 @@ class BaseTest(unittest.TestCase):
filter_.set_invert(invert)
stime = perf_counter()
results = filter_.apply(self.db)
if __debug__:
rulename = inspect.stack()[1][3]
print("%s: %.2f\n" % (rulename, perf_counter() - stime))
# if __debug__:
# frame = inspect.currentframe()
# rulename = frame.f_back.f_code.co_name
# print("%s: %.2f\n" % (rulename, perf_counter() - stime))
return set(results)
def test_Complex_1(self):
@@ -346,7 +347,7 @@ class BaseTest(unittest.TestCase):
"""
rule = ProbablyAlive(['1900'])
res = self.filter_with_rule(rule)
self.assertEqual(len(res), 766)
self.assertEqual(len(res), 733)
def test_RegExpName(self):
"""
+4 -4
View File
@@ -77,14 +77,14 @@ class Span:
self.precision = 2
self.negative = False
if self.valid:
if self.date1.calendar != Date.CAL_GREGORIAN:
self.date1 = self.date1.to_calendar("gregorian")
if self.date2.calendar != Date.CAL_GREGORIAN:
self.date2 = self.date2.to_calendar("gregorian")
if self.date1.sortval < self.date2.sortval:
self.date1 = date2
self.date2 = date1
self.negative = True
if self.date1.calendar != Date.CAL_GREGORIAN:
self.date1 = self.date1.to_calendar("gregorian")
if self.date2.calendar != Date.CAL_GREGORIAN:
self.date2 = self.date2.to_calendar("gregorian")
if self.date1.get_modifier() == Date.MOD_NONE:
if self.date2.get_modifier() == Date.MOD_NONE:
val = self.date1.sortval - self.date2.sortval
+4 -2
View File
@@ -288,10 +288,12 @@ class GrampsType(object, metaclass=GrampsTypeMeta):
else:
return self.__value == value[0]
else:
if value.value == self._CUSTOM:
if value.value == self._CUSTOM and self.__value == self._CUSTOM:
return self.__string == value.string
else:
elif value.value != self._CUSTOM and self.__value != self._CUSTOM:
return self.__value == value.value
else:
return False
def __ne__(self, value):
return not self.__eq__(value)
+1
View File
@@ -299,6 +299,7 @@ class StyledText:
"""
if self._tags:
the_tags = [tag.serialize() for tag in self._tags]
the_tags.sort()
else:
the_tags = []
+31 -1
View File
@@ -38,7 +38,7 @@ from ...datehandler import get_date_formats, set_format
from ...datehandler import parser as _dp
from ...datehandler import displayer as _dd
from ...datehandler._datedisplay import DateDisplayEn
from ...lib.date import Date, DateError, Today, calendar_has_fixed_newyear
from ...lib.date import Date, DateError, Today, calendar_has_fixed_newyear, Span
date_tests = {}
@@ -432,6 +432,36 @@ class ArithmeticDateTest(BaseDateTest):
self.assertEqual(val1, val2,
"'%s' should be '%s' but was '%s'" % (exp1, val2, val1))
#-------------------------------------------------------------------------
#
# SpanTest
#
#-------------------------------------------------------------------------
class SpanTest(BaseDateTest):
"""
Test spans.
"""
tests = [((2000, 1, 31), (2000, 1, 1), 30),
((1799, 11, 19), (8, 2, 18, Date.CAL_FRENCH), 10),
((8, 2, 18, Date.CAL_FRENCH), (1799, 11, 4), 5),
((8, 2, 18, Date.CAL_FRENCH), (3, 2, 9, Date.CAL_FRENCH), 1836)]
def test_evaluate(self):
for value1, value2, duration in self.tests:
date1 = self._get_date(value1)
date2 = self._get_date(value2)
span1 = Span(date1, date2)
self.assertEqual(int(span1), duration)
span2 = Span(date2, date1)
self.assertEqual(int(span2), -duration)
def _get_date(self, value):
date = Date()
if len(value) == 4:
date.set_calendar(value[3])
date.set_yr_mon_day(value[0], value[1], value[2])
return date
#-------------------------------------------------------------------------
#
# SwedishDateTest
+3 -3
View File
@@ -64,11 +64,11 @@ class Test1(unittest.TestCase):
C = self.C.join([self.A, self.S, deepcopy(self.B)])
C = C.replace('X', StyledText('_', [self.T3]))
_C = ('123_456\ncleartext\nabc_def',
[((1, ''), 'v1', [(0, 2), (2, 3)]),
((0, ''), 'v3', [(3, 4)]),
[((0, ''), 'v3', [(3, 4)]),
((0, ''), 'v3', [(21, 22)]),
((1, ''), 'v1', [(0, 2), (2, 3)]),
((1, ''), 'v1', [(4, 6)]),
((2, ''), 'v2', [(19, 21), (18, 21)]),
((0, ''), 'v3', [(21, 22)]),
((2, ''), 'v2', [(22, 23), (22, 25)])])
self.assertEqual(C.serialize(), _C)
+14 -9
View File
@@ -31,8 +31,8 @@ Provide merge capabilities for persons.
#-------------------------------------------------------------------------
from ..db import DbTxn
from ..const import GRAMPS_LOCALE as glocale
_ = glocale.translation.sgettext
from ..errors import MergeError
_ = glocale.translation.sgettext
#-------------------------------------------------------------------------
#
@@ -49,11 +49,12 @@ class MergePersonQuery:
self.titanic = titanic
if self.check_for_spouse(self.phoenix, self.titanic):
raise MergeError(_("Spouses cannot be merged. To merge these "
"people, you must first break the relationship between them."))
"people, you must first break the relationship"
" between them."))
if self.check_for_child(self.phoenix, self.titanic):
raise MergeError(_("A parent and child cannot be merged. To merge "
"these people, you must first break the relationship between "
"them."))
"these people, you must first break the relatio"
"nship between them."))
def check_for_spouse(self, person1, person2):
"""Return if person1 and person2 are spouses of eachother."""
@@ -80,12 +81,12 @@ class MergePersonQuery:
main_family.merge(family)
for childref in family.get_child_ref_list():
child = self.database.get_person_from_handle(
childref.get_reference_handle())
childref.get_reference_handle())
if main_family_handle in child.parent_family_list:
child.remove_handle_references('Family', [family_handle])
else:
child.replace_handle_reference('Family', family_handle,
main_family_handle)
main_family_handle)
self.database.commit_person(child, trans)
if self.phoenix:
self.phoenix.remove_family_handle(family_handle)
@@ -143,7 +144,8 @@ class MergePersonQuery:
for family_handle in self.phoenix.get_parent_family_handle_list():
family = self.database.get_family_from_handle(family_handle)
if family.has_handle_reference('Person', old_handle):
family.replace_handle_reference('Person', old_handle,new_handle)
family.replace_handle_reference('Person', old_handle,
new_handle)
self.database.commit_family(family, trans)
family_merge_guard = False
@@ -182,7 +184,10 @@ class MergePersonQuery:
self.database.commit_family(family, trans)
parent_list.append(parents)
if self.database.get_default_handle() == old_handle:
self.database.set_default_person_handle(None)
hp_hdl = self.database.get_default_handle()
if (hp_hdl in (self.phoenix.get_handle(), self.titanic.get_handle())
and hp_hdl != self.phoenix.get_handle()):
self.database.set_default_person_handle(self.phoenix.get_handle())
self.database.remove_person(old_handle, trans)
return family_merge_ok
+1 -1
View File
@@ -83,7 +83,7 @@ class BasePluginManager:
def __init__(self):
""" This function should only be run once by get_instance() """
if BasePluginManager.__instance is not 1:
if BasePluginManager.__instance != 1:
raise Exception("This class is a singleton. "
"Use the get_instance() method")
+1 -1
View File
@@ -1135,7 +1135,7 @@ class PluginRegister:
def __init__(self):
""" This function should only be run once by get_instance() """
if PluginRegister.__instance is not 1:
if PluginRegister.__instance != 1:
raise Exception("This class is a singleton. "
"Use the get_instance() method")
self.stable_only = True
+8 -4
View File
@@ -113,6 +113,10 @@ else:
_GS_CMD = where_is("gs")
def esc(id_txt):
return id_txt.replace('"', '\\"')
#------------------------------------------------------------------------------
#
# GVOptions
@@ -575,7 +579,7 @@ class GVDocBase(BaseDoc, GVDoc):
text += ' URL="%s"' % url
text += " ]"
self.write(' "%s" %s;\n' % (node_id, text))
self.write(' "%s" %s;\n' % (esc(node_id), text))
def add_link(self, id1, id2, style="", head="", tail="", comment=""):
"""
@@ -583,7 +587,7 @@ class GVDocBase(BaseDoc, GVDoc):
Implements GVDocBase.add_link().
"""
self.write(' "%s" -> "%s"' % (id1, id2))
self.write(' "%s" -> "%s"' % (esc(id1), esc(id2)))
if style or head or tail:
self.write(' [')
@@ -635,7 +639,7 @@ class GVDocBase(BaseDoc, GVDoc):
Implements GVDocBase.add_samerank().
"""
self.write(' {rank=same "%s" "%s"}\n' % (id1, id2))
self.write(' {rank=same "%s" "%s"}\n' % (esc(id1), esc(id2)))
def rewrite_label(self, id, label):
"""
@@ -643,7 +647,7 @@ class GVDocBase(BaseDoc, GVDoc):
Implements GVDocBase.rewrite_label().
"""
self.write(' "%s" [label = "%s"]\n' % (id, label))
self.write(' "%s" [label = "%s"]\n' % (esc(id), label))
def start_subgraph(self, graph_id):
""" Implement GVDocBase.start_subgraph() """
+1 -2
View File
@@ -460,8 +460,7 @@ class TreeDocBase(BaseDoc, TreeDoc):
if os.path.isfile(path):
if win():
path = path.replace('\\', '/')
self.write(level+1, 'image = {{%s}%s},\n' %
os.path.splitext(path))
self.write(level+1, 'image = {%s},\n' % path)
break # first image only
self.write(level, '}\n')
+3
View File
@@ -62,6 +62,7 @@ class EnumeratedListOption(Option):
:type value: int
:return: nothing
"""
self.ini_value = value
Option.__init__(self, label, value)
self.__items = []
self.__xml_items = []
@@ -138,6 +139,8 @@ class EnumeratedListOption(Option):
"""
if value in (v for v, d in self.__items):
Option.set_value(self, value)
elif value == self.ini_value:
return
else:
logging.warning(_("Value '%(val)s' not found for option '%(opt)s'") %
{'val' : str(value), 'opt' : self.get_label()})
+1 -1
View File
@@ -346,7 +346,7 @@ class ReferencedBySelectionProxyDb(ProxyDbBase):
for tag in note.text.get_tags():
if tag.name == 'Link':
if tag.value.startswith("gramps://"):
obj_class, prop, value = tag.value[9:].split("/")
obj_class, prop, value = tag.value[9:].split("/", 2)
if obj_class == "Media": # bug6493
obj_class = "Media"
if prop == "handle":
+2
View File
@@ -142,6 +142,8 @@ class ProbablyAlive:
# person died more than MAX after current year
if death_date.is_valid():
birth_date = death_date.copy_offset_ymd(year=-self.MAX_AGE_PROB_ALIVE)
else:
birth_date = death_date
explain = _("death date")
if not death_date and birth_date:
+10 -6
View File
@@ -324,12 +324,16 @@ class Callback:
return
# Check signal exists
frame = inspect.currentframe()
c_frame = frame.f_back
c_code = c_frame.f_code
frame_info = (c_code.co_filename, c_frame.f_lineno, c_code.co_name)
if signal_name not in self.__signal_map:
self._warn("Attempt to emit to unknown signal: %s\n"
" from: file: %s\n"
" line: %d\n"
" func: %s\n"
% ((str(signal_name), ) + inspect.stack()[1][1:4]))
% ((str(signal_name), ) + frame_info))
return
# check that the signal is not already being emitted. This prevents
@@ -340,7 +344,7 @@ class Callback:
" from: file: %s\n"
" line: %d\n"
" func: %s\n"
% ((str(signal_name), ) + inspect.stack()[1][1:4]))
% ((str(signal_name), ) + frame_info))
return
try:
@@ -358,7 +362,7 @@ class Callback:
" from: file: %s\n"
" line: %d\n"
" func: %s\n"
% ((str(signal_name), ) + inspect.stack()[1][1:4]))
% ((str(signal_name), ) + frame_info))
return
# type check arguments
@@ -369,7 +373,7 @@ class Callback:
" from: file: %s\n"
" line: %d\n"
" func: %s\n"
% ((str(signal_name), ) + inspect.stack()[1][1:4]))
% ((str(signal_name), ) + frame_info))
return
if len(args) > 0:
@@ -379,7 +383,7 @@ class Callback:
" from: file: %s\n"
" line: %d\n"
" func: %s\n"
% ((str(signal_name), ) + inspect.stack()[1][1:4]))
% ((str(signal_name), ) + frame_info))
return
if arg_types is not None:
@@ -391,7 +395,7 @@ class Callback:
" line: %d\n"
" func: %s\n"
" arg passed was: %s, type of arg passed %s, type should be: %s\n"
% ((str(signal_name), ) + inspect.stack()[1][1:4] +\
% ((str(signal_name), ) + frame_info +\
(args[i], repr(type(args[i])), repr(arg_types[i]))))
return
if signal_name in self.__callback_map:
+1 -1
View File
@@ -49,7 +49,7 @@ class CSVTab(TabbedDoc):
else:
self.filename = filename
self.f = open(self.filename, "w",
self.f = open(self.filename, "w", newline='',
encoding='utf_8_sig' if win() else 'utf_8')
self.writer = csv.writer(self.f)
+3 -1
View File
@@ -117,7 +117,7 @@ _LOCALE_NAMES = {
_RTL_LOCALES = ('ar', 'he')
# locales with less than 70% currently translated
INCOMPLETE_TRANSLATIONS = ('ar', 'bg', 'he', 'ja', 'sq', 'ta', 'tr')
INCOMPLETE_TRANSLATIONS = ('ar', 'bg', 'sq', 'ta', 'tr', 'zh_HK', 'zh_TW')
def _check_mswin_locale(locale):
msloc = None
@@ -525,6 +525,8 @@ class GrampsLocale:
# with locale instead of gettext. Win32 doesn't support bindtextdomain.
if self.localedir:
if not sys.platform == 'win32':
# bug12278, _build_popup_ui() under linux and macOS
locale.textdomain(self.localedomain)
locale.bindtextdomain(self.localedomain, self.localedir)
else:
self._win_bindtextdomain(self.localedomain.encode('utf-8'),
+36 -12
View File
@@ -126,16 +126,33 @@ if win():
pass # ok
elif not os.path.isdir(HOME_DIR):
os.makedirs(HOME_DIR)
sys.stdout = sys.stderr = open(logfile, "w")
stderrh = logging.StreamHandler(sys.stderr)
stderrh.setFormatter(form)
stderrh.setLevel(logging.DEBUG)
sys.stdout = sys.stderr = open(logfile, "w", encoding='utf-8')
# macOS sets stderr to /dev/null when running without a terminal,
# e.g. if Gramps.app is lauched by double-clicking on it in
# finder. Write to a file instead.
if mac() and not sys.stdin.isatty():
from tempfile import gettempdir
# Setup the base level logger, this one gets
# everything.
l = logging.getLogger()
l.setLevel(logging.WARNING)
l.addHandler(stderrh)
log_file_name = 'gramps-' + str(os.getpid()) + '.log'
log_file_path = os.path.join(gettempdir(), log_file_name)
log_file_handler = logging.FileHandler(log_file_path, mode='a',
encoding='utf-8')
log_file_handler.setFormatter(form)
log_file_handler.setLevel(logging.DEBUG)
logger = logging.getLogger()
logger.setLevel(logging.WARNING)
logger.addHandler(log_file_handler)
else:
stderrh = logging.StreamHandler(sys.stderr)
stderrh.setFormatter(form)
stderrh.setLevel(logging.DEBUG)
# Setup the base level logger, this one gets
# everything.
l = logging.getLogger()
l.setLevel(logging.WARNING)
l.addHandler(stderrh)
def exc_hook(err_type, value, t_b):
@@ -308,9 +325,16 @@ def show_settings():
.replace('(', '').replace(')', '')
bsddb_location_str = bsddb.__file__
except:
bsddb_str = 'not found'
bsddb_db_str = 'not found'
bsddb_location_str = 'not found'
try:
import berkeleydb as bsddb
bsddb_str = bsddb.__version__
bsddb_db_str = str(bsddb.db.version()).replace(', ', '.')\
.replace('(', '').replace(')', '')
bsddb_location_str = bsddb.__file__
except:
bsddb_str = 'not found'
bsddb_db_str = 'not found'
bsddb_location_str = 'not found'
try:
import sqlite3
+5 -1
View File
@@ -68,7 +68,11 @@ try:
import bsddb3 as bsddb ## ok, in try/except
BSDDB_STR = ellipses(str(bsddb.__version__) + " " + str(bsddb.db.version()))
except:
BSDDB_STR = 'not found'
try:
import berkeleydb as bsddb
BSDDB_STR = ellipses(str(bsddb.__version__) + " " + str(bsddb.db.version()))
except:
BSDDB_STR = 'not found'
try:
import sqlite3
+38 -21
View File
@@ -471,27 +471,36 @@ class ClipCitation(ClipHandleWrapper):
def refresh(self):
if self._handle:
citation = clipdb.get_citation_from_handle(self._handle)
if citation:
self._title = citation.get_gramps_id()
notelist = list(map(clipdb.get_note_from_handle,
citation.get_note_list()))
srctxtlist = [note for note in notelist
if note.get_type() == NoteType.SOURCE_TEXT]
page = citation.get_page()
if not page:
page = _('not available|NA')
text = ""
if srctxtlist:
text = " ".join(srctxtlist[0].get().split())
#String must be unicode for truncation to work for non
#ascii characters
text = str(text)
if len(text) > 60:
text = text[:60] + "..."
self._value = _("Volume/Page: %(pag)s -- %(sourcetext)s") % {
'pag' : page,
'sourcetext' : text}
try:
citation = clipdb.get_citation_from_handle(self._handle)
if citation:
self._title = citation.get_gramps_id()
notelist = list(map(clipdb.get_note_from_handle,
citation.get_note_list()))
srctxtlist = [note for note in notelist
if note.get_type() == NoteType.SOURCE_TEXT]
page = citation.get_page()
if not page:
page = _('not available|NA')
text = ""
if srctxtlist:
text = " ".join(srctxtlist[0].get().split())
#String must be unicode for truncation to work for non
#ascii characters
text = str(text)
if len(text) > 60:
text = text[:60] + "..."
self._value = _("Volume/Page: %(pag)s -- %(sourcetext)s"
) % { 'pag' : page,
'sourcetext' : text}
except:
# We are in the Source tree view. The shortcuts only
# work for citations.
print("We cannot copy the source from this view."
" Use drag and drop.")
self._title = self._value = ''
self._pickle = self._type = self._objclass = None
self._handle = self._dbid = self._dbname = None
class ClipRepoRef(ClipObjWrapper):
@@ -1281,6 +1290,14 @@ class ClipboardListView:
model.insert_before(node, data)
else:
model.insert_after(node, data)
elif isinstance(data[1], ClipCitation):
if data[3]:
# we have a real citation
model.append(data)
#else:
# We are in a Source treeview and trying
# to copy a source with a shortcut.
# Use drag and drop to do that.
else:
model.append(data)
+2 -2
View File
@@ -1241,7 +1241,7 @@ class GrampsPreferences(ConfigureDialog):
row, 'preferences.place-auto', start=0, stop=1,
extra_callback=self.auto_title_changed,
tooltip=_("Enables automatic place title generation "
"using specifed format."))
"using specified format."))
self.auto_title_changed(cb_widget)
hbox.pack_start(self.pformat, True, True, 0)
hbox.pack_start(self.fmt_btn, False, False, 0)
@@ -1573,7 +1573,7 @@ class GrampsPreferences(ConfigureDialog):
self.add_checkbox(grid, _('Add tag on import'), current_line,
cb_const, stop=2,
extra_callback=self.toggle_tag_on_import,
tooltip=_("Specifed tag will be added on import.\n"
tooltip=_("Specified tag will be added on import.\n"
"Clear to set default value."))
grid.attach(self.tag_format_entry, 2, current_line, 1, 1)
+1 -3
View File
@@ -532,7 +532,7 @@ class GrampsImportFileDialog(ManagedWindow):
return True
else:
try:
f = file(filename,'w')
f = open(filename, 'w')
f.close()
os.remove(filename)
except IOError:
@@ -548,7 +548,6 @@ class GrampsImportFileDialog(ManagedWindow):
self.import_info = None
self._begin_progress()
self.uistate.set_sensitive(False)
self.uistate.viewmanager.enable_menu(False)
try:
#an importer can return an object with info, object.info_text()
@@ -569,7 +568,6 @@ class GrampsImportFileDialog(ManagedWindow):
except Exception:
_LOG.error("Failed to import database.", exc_info=True)
self.uistate.set_sensitive(True)
self.uistate.viewmanager.enable_menu(True)
self._end_progress()
def build_menu_names(self, obj): # this is meaningless since it's modal
+1 -1
View File
@@ -1013,7 +1013,7 @@ class DbManager(CLIDbManager, ManagedWindow):
"""
Handle the reception of drag data
"""
drag_value = selection.get_data().decode()
drag_value = selection.get_data().decode().strip(' \r\n\x00')
fname = None
type = None
title = None
+4 -1
View File
@@ -520,7 +520,10 @@ class DisplayState(Callback):
history.push(handle)
def set_sensitive(self, state):
self.window.set_sensitive(state)
tbar = self.uimanager.get_widget('ToolBar')
tbar.set_sensitive(state)
self.viewmanager.hpane.set_sensitive(state)
self.uimanager.enable_all_actions(state)
def db_changed(self, db):
db.connect('long-op-start', self.progress_monitor.add_op)
@@ -46,7 +46,7 @@ from html import escape
#
#-------------------------------------------------------------------------
from ...widgets.undoablebuffer import UndoableBuffer
from gramps.gen.lib import EventRoleType
from gramps.gen.lib import (EventRoleType, EventType, Date)
from gramps.gen.datehandler import get_date, get_date_valid
from gramps.gen.config import config
from gramps.gen.utils.db import get_participant_from_event
@@ -175,7 +175,12 @@ class EventRefModel(Gtk.TreeStore):
"""
date = event.get_date_object()
if date and self.start_date:
return (date - self.start_date).format(precision=age_precision)
if (date == self.start_date and date.modifier == Date.MOD_NONE
and not (event.get_type().is_death_fallback() or
event.get_type() == EventType.DEATH)):
return ""
else:
return (date - self.start_date).format(precision=age_precision)
else:
return ""
+10 -9
View File
@@ -38,7 +38,7 @@ from gramps.gen.lib import EventType, NoteType
from gramps.gen.db import DbTxn
from ..glade import Glade
from .displaytabs import (CitationEmbedList, NoteTab, GalleryTab,
EventBackRefList, AttrEmbedList)
EventBackRefList, EventAttrEmbedList)
from ..widgets import (PrivacyButton, MonitoredEntry,
MonitoredDate, MonitoredDataType, MonitoredTagList)
from .editreference import RefTab, EditReference
@@ -209,10 +209,10 @@ class EditEventRef(EditReference):
self._add_tab(notebook, self.srcref_list)
self.track_ref_for_deletion("srcref_list")
self.attr_list = AttrEmbedList(self.dbstate,
self.uistate,
self.track,
self.source.get_attribute_list())
self.attr_list = EventAttrEmbedList(self.dbstate,
self.uistate,
self.track,
self.source.get_attribute_list())
self._add_tab(notebook, self.attr_list)
self.track_ref_for_deletion("attr_list")
@@ -247,10 +247,11 @@ class EditEventRef(EditReference):
self._add_tab(notebook, self.backref_tab)
self.track_ref_for_deletion("backref_tab")
self.attr_ref_list = AttrEmbedList(self.dbstate,
self.uistate,
self.track,
self.source_ref.get_attribute_list())
self.attr_ref_list = EventAttrEmbedList(
self.dbstate,
self.uistate,
self.track,
self.source_ref.get_attribute_list())
self._add_tab(notebook_ref, self.attr_ref_list)
self.track_ref_for_deletion("attr_ref_list")
+9 -3
View File
@@ -366,6 +366,7 @@ class EditName(EditSecondary):
5/ local set, not global set --> set (change local)
6/ local set, global set --> set (set to global if possible)
"""
ngm = False # name group mapping setting
closeit = True
surname = self.obj.get_primary_surname().get_surname()
group_as= self.obj.get_group_as()
@@ -388,7 +389,7 @@ class EditName(EditSecondary):
val = q.run()
if val:
#delete the grouping link on database
self.db.set_name_group_mapping(surname, None)
ngm = None # delay setting until dialog closes
self.obj.set_group_as("")
else :
closeit = False
@@ -421,9 +422,9 @@ class EditName(EditSecondary):
val = q.run()
if val:
if group_as == surname :
self.db.set_name_group_mapping(surname, None)
ngm = None # delay setting until dialog closes
else:
self.db.set_name_group_mapping(surname, group_as)
ngm = group_as # delay setting until dialog closes
self.obj.set_group_as("")
else:
if self.global_group_set :
@@ -455,10 +456,15 @@ class EditName(EditSecondary):
pass
if closeit:
db = self.db # close cleanup loses self.db, so save for later
if self.callback:
self.callback(self.obj)
self.callback = None
self.close()
# bug 12328 to avoid gui interaction during view rebuild, delay
# the rebuild until closeing this dialog
if ngm is not False:
db.set_name_group_mapping(surname, ngm)
def _cleanup_on_exit(self):
"""
+36 -3
View File
@@ -186,10 +186,43 @@ class EditPlace(EditPrimary):
self.db.readonly)
def set_latlongitude(self, value):
"""
This method is useful for directly copying the coordinates
of openstreetmap, googlemaps, and perhaps other if they
provide coordinates like it is define in conv_lat_lon
(see gramps/gen/utils/place.py)
To copy the coordinates:
- openstreetmap:
1 - choose the place where you want to save the coordinates.
2 - right click on this place
3 - select "show address"
4 - On the left side of the map, copy the coordinates of
"Result from internal"
5 - In the latlon field of the edit place window of gramps,
type <CTRL> V
- googlemap:
1 - choose the place where you want to save the coordinates.
2 - right click on this place
3 - select the coordinates at the top of the popup window.
They are automaticaly copied.
4 - In the latlon field of the edit place window of gramps,
type <CTRL> V
"""
try:
coma = value.index(',')
self.longitude.set_text(value[coma+1:].strip())
self.latitude.set_text(value[:coma].strip())
# Bug 12349, 12374
parts = value.split(', ')
if len(parts) == 2:
latitude = parts[0].strip().replace(',', '.')
longitude = parts[1].strip().replace(',', '.')
else:
latitude, longitude = value.split(',')
self.longitude.set_text(longitude)
self.latitude.set_text(latitude)
self.top.get_object("lat_entry").validate(force=True)
self.top.get_object("lon_entry").validate(force=True)
self.obj.set_latitude(self.latitude.get_value())
+10 -3
View File
@@ -180,9 +180,16 @@ class EditPlaceRef(EditReference):
def set_latlongitude(self, value):
try:
coma = value.index(',')
self.longitude.set_text(value[coma+1:].strip())
self.latitude.set_text(value[:coma].strip())
# Bug 12349, 12374
parts = value.split(', ')
if len(parts) == 2:
latitude = parts[0].strip().replace(',', '.')
longitude = parts[1].strip().replace(',', '.')
else:
latitude, longitude = value.split(',')
self.longitude.set_text(longitude)
self.latitude.set_text(latitude)
self.top.get_object("lat_entry").validate(force=True)
self.top.get_object("lon_entry").validate(force=True)
self.source.set_latitude(self.latitude.get_value())
+5 -3
View File
@@ -1,11 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<!-- Generated with glade 3.22.2 -->
<interface>
<requires lib="gtk+" version="3.10"/>
<requires lib="grampswidgets" version="0.0"/>
<object class="GtkDialog" id="editplace">
<property name="can_focus">False</property>
<property name="type_hint">dialog</property>
<child type="titlebar">
<placeholder/>
</child>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox19">
<property name="visible">True</property>
@@ -101,7 +103,7 @@
<child>
<object class="GtkLabel" id="comment1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Either use the two fields below to enter coordinates (latitude and longitude),</property>
<property name="hexpand">True</property>
+1 -1
View File
@@ -490,7 +490,7 @@ def _display_welcome_message(parent=None):
Display a welcome message to the user.
(This docstring seems very legacy/historical, not accurate.)
"""
#_display_generic_message("master", 'behavior.betawarn', parent=parent)
_display_generic_message("master", 'behavior.betawarn', parent=parent)
def _display_generic_message(warning_type, config_key, parent=None):
"""
+2 -2
View File
@@ -233,7 +233,7 @@ class ListModel:
new_value = not self.model[path][col]
self.model[path][col] = new_value
if col in self.function:
self.function[col](int(path), new_value)
self.function[col](path, new_value)
def __edited_cb(self, cell, path, new_text, col):
"""
@@ -241,7 +241,7 @@ class ListModel:
"""
self.model[path][col] = new_text
if col in self.function:
self.function[col](int(path), new_text)
self.function[col](path, new_text)
def unselect(self):
"""
+5 -1
View File
@@ -37,7 +37,11 @@ try:
import bsddb3 as bsddb # ok, in try/except
BSDDB_STR = str(bsddb.__version__) + " " + str(bsddb.db.version())
except:
BSDDB_STR = 'not found'
try:
import berkeleydb as bsddb
BSDDB_STR = str(bsddb.__version__) + " " + str(bsddb.db.version())
except:
BSDDB_STR = 'not found'
try:
import sqlite3
+22
View File
@@ -32,6 +32,14 @@ the create/deletion of dialog windows.
import os
from io import StringIO
import html
import logging
#-------------------------------------------------------------------------
#
# Set up logging
#
#-------------------------------------------------------------------------
_LOG = logging.getLogger(".")
#-------------------------------------------------------------------------
#
# GNOME/GTK
@@ -575,6 +583,9 @@ class ManagedWindow:
Takes care of closing children and removing itself from menu.
"""
if hasattr(self, 'opened') and not self.opened:
_LOG.warning("Tried to close a ManagedWindow more than once.")
return # in case close somehow gets called again
self.opened = False
self._save_position(save_config=False) # the next line will save it
self._save_size()
@@ -622,6 +633,17 @@ class ManagedWindow:
if self.horiz_position_key is not None:
horiz_position = config.get(self.horiz_position_key)
vert_position = config.get(self.vert_position_key)
# make sure some of left side shows on screen
# for part time multi monitor setups
screen = Gtk.Window().get_screen()
s_width = screen.get_width()
s_height = screen.get_height()
if horiz_position > s_width - 50 or vert_position > s_height - 50:
(p_width, p_height) = self.parent_window.get_size()
(p_horiz, p_vert) = self.parent_window.get_position()
(w_width, w_height) = self.window.get_size()
horiz_position = p_horiz + ((p_width - w_width) // 2)
vert_position = p_vert + ((p_height - w_height) // 2)
self.window.move(horiz_position, vert_position)
def _save_position(self, save_config=True):
+9 -4
View File
@@ -814,9 +814,12 @@ class ToolManagedWindowBase(ManagedWindow):
buffer_location = view.window_to_buffer_coords(Gtk.TextWindowType.TEXT,
int(event.x),
int(event.y))
iter = view.get_iter_at_location(*buffer_location)
_iter = view.get_iter_at_location(*buffer_location)
if isinstance(_iter, tuple): # Gtk changed api in recent versions
_iter = _iter[1]
for (tag, person_handle) in self.tags:
if iter.has_tag(tag):
if _iter.has_tag(tag):
_window = view.get_window(Gtk.TextWindowType.TEXT)
_window.set_cursor(self.link_cursor)
return False # handle event further, if necessary
@@ -827,9 +830,11 @@ class ToolManagedWindowBase(ManagedWindow):
buffer_location = view.window_to_buffer_coords(Gtk.TextWindowType.TEXT,
int(event.x),
int(event.y))
iter = view.get_iter_at_location(*buffer_location)
_iter = view.get_iter_at_location(*buffer_location)
if isinstance(_iter, tuple): # Gtk changed api in recent versions
_iter = _iter[1]
for (tag, person_handle) in self.tags:
if iter.has_tag(tag):
if _iter.has_tag(tag):
person = self.db.get_person_from_handle(person_handle)
if event.button == 1:
if event.type == Gdk.EventType.DOUBLE_BUTTON_PRESS:
+1 -1
View File
@@ -71,7 +71,7 @@ class GuiPluginManager(Callback):
def __init__(self):
""" This function should only be run once by get_instance() """
if GuiPluginManager.__instance is not 1:
if GuiPluginManager.__instance != 1:
raise Exception("This class is a singleton. "
"Use the get_instance() method")
-1
View File
@@ -325,7 +325,6 @@ class BaseSelector(ManagedWindow):
self.sortorder = Gtk.SortType.ASCENDING
else:
self.sortorder = Gtk.SortType.DESCENDING
self.model.reverse_order()
self.build_tree()
return True
+10
View File
@@ -496,6 +496,16 @@ class UIManager():
"""
return group.act_group.lookup_action(actionname)
def enable_all_actions(self, state):
for group in self.action_groups:
if group.act_group:
for item in group.actionlist:
action = group.act_group.lookup_action(item[ACTION_NAME])
if action:
# We check in case the group has not been inserted into
# UIManager yet
action.set_enabled(group.sensitive if state else False)
def dump_all_accels(self):
''' A function used diagnostically to see what accels are present.
This will only dump the current accel set, if other non-open windows
+17 -1
View File
@@ -450,7 +450,7 @@ def open_file_with_default_application(path, uistate):
GLib.timeout_add_seconds(1, poll_external, (proc, errstrings, uistate))
return
def process_pending_events(max_count=10):
def process_pending_events(max_count=20):
"""
Process pending events, but don't get into an infinite loop.
"""
@@ -549,11 +549,26 @@ def color_graph_box(alive=False, gender=Person.MALE):
# color functions. For hsv and hls values, use import colorsys !
def name_to_hex(value):
"""
Convert a named color to a 6 digit hexadecimal value to rgb.
"""
if value[:1] != "#":
# We have color names like "green", "orange", "yellow",...
# We need to convert them to hex format
Color = Gdk.RGBA()
Color.parse(value)
value = "#%02x%02x%02x" % (int(Color.red * 255),
int(Color.green * 255),
int(Color.blue * 255))
return value
def hex_to_rgb_float(value):
"""
Convert a 6 or 12 digit hexademical value to rgb. Returns tuple of floats
between 0 and 1.
"""
value = name_to_hex(value)
value = value.lstrip('#')
lenv = len(value)
return tuple(int(value[i:i+lenv//3], 16)/16.0**(lenv//3)
@@ -563,6 +578,7 @@ def hex_to_rgb(value):
"""
Convert a 6 or 12 digit hexadecimal value to rgb. Returns tuple of integers.
"""
value = name_to_hex(value)
value = value.lstrip('#')
lenv = len(value)
return tuple(int(value[i:i+lenv//3], 16) for i in range(0, lenv, lenv//3))
+44 -68
View File
@@ -56,6 +56,7 @@ LOG = logging.getLogger(".")
#-------------------------------------------------------------------------
from gi.repository import Gtk
from gi.repository import Gdk
from gi.repository import GLib
#-------------------------------------------------------------------------
#
@@ -273,13 +274,13 @@ class ViewManager(CLIManager):
Gdk.ModifierType.CONTROL_MASK | Gdk.ModifierType.MOD1_MASK)
vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
self.window.add(vbox)
hpane = Gtk.Paned()
self.hpane = Gtk.Paned()
self.ebox = Gtk.EventBox()
self.navigator = Navigator(self)
self.ebox.add(self.navigator.get_top())
hpane.pack1(self.ebox, False, False)
hpane.show()
self.hpane.pack1(self.ebox, False, False)
self.hpane.show()
self.notebook = Gtk.Notebook()
self.notebook.set_scrollable(True)
@@ -288,13 +289,14 @@ class ViewManager(CLIManager):
self.__init_lists()
self.__build_ui_manager()
hpane.add2(self.notebook)
self.hpane.add2(self.notebook)
toolbar = self.uimanager.get_widget('ToolBar')
toolbar.show_all()
self.statusbar = Statusbar()
self.statusbar.show()
vbox.pack_end(self.statusbar, False, True, 0)
vbox.pack_start(toolbar, False, True, 0)
vbox.pack_end(hpane, True, True, 0)
vbox.pack_end(self.hpane, True, True, 0)
vbox.show()
self.uistate = DisplayState(self.window, self.statusbar,
@@ -784,7 +786,12 @@ class ViewManager(CLIManager):
self.__create_page(page_def[0], page_def[1])
self.notebook.set_current_page(page_num)
return self.pages[page_num]
try:
return self.pages[page_num]
except IndexError:
# The following is to avoid 'IndexError: list index out of range'
# Should solve bug 12636
return self.pages[0]
def get_category(self, cat_name):
"""
@@ -835,6 +842,8 @@ class ViewManager(CLIManager):
hbox.add(Gtk.Label(label=pdata.name))
hbox.show_all()
page_num = self.notebook.append_page(page.get_display(), hbox)
if self.active_page:
self.active_page.post_create()
if not self.file_loaded:
self.uimanager.set_actions_visible(self.actiongroup, False)
self.uimanager.set_actions_visible(self.readonlygroup, False)
@@ -875,23 +884,30 @@ class ViewManager(CLIManager):
"""
Perform necessary actions when a page is changed.
"""
if not self.dbstate.is_open():
return
self.__disconnect_previous_page()
self.active_page = self.pages[page_num]
# The following is to avoid 'IndexError: list index out of range'
# Bugs: 12304, 12429, 12623, 12695
try:
self.active_page = self.pages[page_num]
except IndexError:
self.active_page = self.pages[0]
self.__connect_active_page(page_num)
self.active_page.set_active()
while Gtk.events_pending():
Gtk.main_iteration()
self.uimanager.update_menu()
# bug 12048 this avoids crash if part of toolbar in view is not shown
# because of a small screen when changing views. Part of the Gtk code
# was deleting a toolbar object too soon; and another part of Gtk still
# had a reference.
def page_changer(self):
self.uimanager.update_menu()
self.active_page.change_page()
return False
while Gtk.events_pending():
Gtk.main_iteration()
self.active_page.change_page()
GLib.idle_add(page_changer, self,
priority=GLib.PRIORITY_DEFAULT_IDLE - 10)
def __delete_pages(self):
"""
@@ -961,8 +977,7 @@ class ViewManager(CLIManager):
self.dbstate.db.close(user=self.user)
(filename, title) = value
self.db_loader.read_file(filename)
if self.dbstate.db.is_open():
self._post_load_newdb(filename, 'x-directory/normal', title)
self._post_load_newdb(filename, 'x-directory/normal', title)
else:
if dialog.after_change != "":
# We change the title of the main window.
@@ -997,7 +1012,8 @@ class ViewManager(CLIManager):
The method called after load of a new database.
Inherit CLI method to add GUI part
"""
self._post_load_newdb_nongui(filename, title)
if self.dbstate.db.is_open():
self._post_load_newdb_nongui(filename, title)
self._post_load_newdb_gui(filename, filetype, title)
def _post_load_newdb_gui(self, filename, filetype, title=None):
@@ -1012,11 +1028,16 @@ class ViewManager(CLIManager):
if title:
name = title
rw = not self.dbstate.db.readonly
if rw:
msg = "%s - Gramps" % name
isopen = self.dbstate.is_open()
if not isopen:
rw = False
msg = "Gramps"
else:
msg = "%s (%s) - Gramps" % (name, _('Read Only'))
rw = not self.dbstate.db.readonly
if rw:
msg = "%s - Gramps" % name
else:
msg = "%s (%s) - Gramps" % (name, _('Read Only'))
self.uistate.window.set_title(msg)
if(bool(config.get('behavior.runcheck')) and QuestionDialog2(
@@ -1035,7 +1056,7 @@ class ViewManager(CLIManager):
config.set('behavior.runcheck', False)
self.__change_page(self.notebook.get_current_page())
self.uimanager.set_actions_visible(self.actiongroup, rw)
self.uimanager.set_actions_visible(self.readonlygroup, True)
self.uimanager.set_actions_visible(self.readonlygroup, isopen)
self.uimanager.set_actions_visible(self.undoactions, rw)
self.uimanager.set_actions_visible(self.redoactions, rw)
@@ -1060,51 +1081,6 @@ class ViewManager(CLIManager):
config.set('paths.recent-file', '')
config.save()
def enable_menu(self, enable):
""" Enable/disable the menues. Used by the dbloader for import to
prevent other operations during import. Needed because simpler methods
don't work under Gnome with application menus at top of screen (instead
of Gramps window).
Note: enable must be set to False on first call.
"""
if not enable:
self.action_st = (
self.uimanager.get_actions_sensitive(self.actiongroup),
self.uimanager.get_actions_sensitive(self.readonlygroup),
self.uimanager.get_actions_sensitive(self.undoactions),
self.uimanager.get_actions_sensitive(self.redoactions),
self.uimanager.get_actions_sensitive(self.fileactions),
self.uimanager.get_actions_sensitive(self.toolactions),
self.uimanager.get_actions_sensitive(self.reportactions),
self.uimanager.get_actions_sensitive(
self.recent_manager.action_group))
self.uimanager.set_actions_sensitive(self.actiongroup, enable)
self.uimanager.set_actions_sensitive(self.readonlygroup, enable)
self.uimanager.set_actions_sensitive(self.undoactions, enable)
self.uimanager.set_actions_sensitive(self.redoactions, enable)
self.uimanager.set_actions_sensitive(self.fileactions, enable)
self.uimanager.set_actions_sensitive(self.toolactions, enable)
self.uimanager.set_actions_sensitive(self.reportactions, enable)
self.uimanager.set_actions_sensitive(
self.recent_manager.action_group, enable)
else:
self.uimanager.set_actions_sensitive(
self.actiongroup, self.action_st[0])
self.uimanager.set_actions_sensitive(
self.readonlygroup, self.action_st[1])
self.uimanager.set_actions_sensitive(
self.undoactions, self.action_st[2])
self.uimanager.set_actions_sensitive(
self.redoactions, self.action_st[3])
self.uimanager.set_actions_sensitive(
self.fileactions, self.action_st[4])
self.uimanager.set_actions_sensitive(
self.toolactions, self.action_st[5])
self.uimanager.set_actions_sensitive(
self.reportactions, self.action_st[6])
self.uimanager.set_actions_sensitive(
self.recent_manager.action_group, self.action_st[7])
def __change_undo_label(self, label, update_menu=True):
"""
Change the UNDO label
+1 -1
View File
@@ -321,7 +321,7 @@ class NavigationView(PageView):
else:
from ..dialog import WarningDialog
WarningDialog(_("No Home Person"),
_("You need to set a 'default person' to go to. "
_("You need to set a 'Home Person' to go to. "
"Select the People View, select the person you want as "
"'Home Person', then confirm your choice "
"via the menu Edit -> Set Home Person."),
+14 -6
View File
@@ -138,6 +138,7 @@ class PageView(DbGUIElement, metaclass=ABCMeta):
self.sidebar = None
self.bottombar = None
self.widget = None
self.vpane = None
DbGUIElement.__init__(self, dbstate.db)
@@ -154,18 +155,20 @@ class PageView(DbGUIElement, metaclass=ABCMeta):
self.ident + "_bottombar",
defaults[1])
hpane = Gtk.Paned()
vpane = Gtk.Paned(orientation=Gtk.Orientation.VERTICAL)
hpane.pack1(vpane, resize=True, shrink=False)
self.vpane = Gtk.Paned(orientation=Gtk.Orientation.VERTICAL)
hpane.pack1(self.vpane, resize=True, shrink=False)
hpane.pack2(self.sidebar, resize=False, shrink=False)
hpane.show()
vpane.show()
self.vpane.show()
self.widget = self.build_widget()
self.widget.show_all()
self.widget.set_name('view')
vpane.pack1(self.widget, resize=True, shrink=False)
vpane.pack2(self.bottombar, resize=False, shrink=True)
self._setup_slider_config(vpane, 'vpane.slider-position')
self.vpane.pack1(self.widget, resize=True, shrink=False)
self.vpane.pack2(self.bottombar, resize=False, shrink=False)
self.vpane.show()
self._config.register('vpane.slider-position', -1)
self.vpane.set_position(self._config.get('vpane.slider-position'))
self.sidebar_toggled(self.sidebar.get_property('visible'))
self.hpane_sig = hpane.connect("draw", self.set_page_slider)
@@ -343,6 +346,11 @@ class PageView(DbGUIElement, metaclass=ABCMeta):
self.bottombar.set_inactive()
self.active = False
def post_create(self):
if self.vpane:
self._setup_slider_config(self.vpane, 'vpane.slider-position')
self.vpane = None
@abstractmethod
def build_tree(self):
"""
+4 -1
View File
@@ -130,7 +130,8 @@ class EventModel(FlatBaseModel):
handle = data[0]
cached, value = self.get_cached_value(handle, "PARTICIPANT")
if not cached:
value = get_participant_from_event(self.db, data[COLUMN_HANDLE])
value = get_participant_from_event(self.db, data[COLUMN_HANDLE],
all_=True) # all participants
self.set_cached_value(handle, "PARTICIPANT", value)
return value
@@ -159,6 +160,8 @@ class EventModel(FlatBaseModel):
date_str = get_date(event)
if date_str != "":
retval = escape(date_str)
else:
retval = ""
if not get_date_valid(event):
return INVALID_DATE_FORMAT % retval
else:
+2 -1
View File
@@ -587,7 +587,8 @@ class TreeBaseModel(GObject.GObject, Gtk.TreeModel, BaseModel):
if dfilter:
cdb = CacheProxyDb(self.db)
for handle in dfilter.apply(cdb, tree=True,
user=User(parent=self.uistate.window)):
user=User(parent=self.uistate.window,
uistate=self.uistate)):
status_ppl.heartbeat()
data = data_map(handle)
add_func(handle, data)
-4
View File
@@ -371,10 +371,6 @@ class GrampletBar(Gtk.Notebook):
"""
Add a tab to the notebook for the given gramplet.
"""
width = -1 # Allow tab width to adjust (smaller) to sidebar
height = min(int(self.uistate.screen_height() * 0.20), 400)
gramplet.set_size_request(width, height)
label = self.__create_tab_label(gramplet)
page_num = self.append_page(gramplet, label)
return page_num
+6
View File
@@ -1239,6 +1239,12 @@ class GrampletPane(Gtk.ScrolledWindow):
else:
cnt = 0
for item in base_opts["data"]:
# If we have a "%" in a string,
# escape it by writing "%%"
# to avoid InterpolationSyntaxError
# in python configparser module.
if isinstance(item, str):
item = item.replace("%", "%%")
fp.write("data[%d]=%s\n" % (cnt, item))
cnt += 1
else:
+2 -2
View File
@@ -396,7 +396,7 @@ class StyledTextEditor(Gtk.TextView):
simple_access = SimpleAccess(win_obj.dbstate.db)
url = link_tag.data
if url.startswith("gramps://"):
obj_class, prop, value = url[9:].split("/")
obj_class, prop, value = url[9:].split("/", 2)
display = simple_access.display(obj_class, prop, value) or url
return display + ((_("\nCommand-Click to follow link") if mac() else
_("\nCtrl-Click to follow link"))
@@ -809,7 +809,7 @@ class StyledTextEditor(Gtk.TextView):
win_obj = find_parent_with_attr(self, attr="dbstate")
if win_obj:
# Edit the object:
obj_class, prop, value = url[9:].split("/")
obj_class, prop, value = url[9:].split("/", 2)
from ..editors import EditObject
EditObject(win_obj.dbstate,
win_obj.uistate,
+10 -9
View File
@@ -29,7 +29,6 @@ BSDDBTxn class: Wrapper for BSDDB transaction-oriented methods
#-------------------------------------------------------------------------
import logging
import inspect
import os
#-------------------------------------------------------------------------
#
@@ -73,14 +72,13 @@ class BSDDBTxn:
"""
# Conditional on __debug__ because all that frame stuff may be slow
if __debug__:
caller_frame = inspect.stack()[1]
frame = inspect.currentframe()
c_frame = frame.f_back
c_code = c_frame.f_code
_LOG.debug(" BSDDBTxn %s instantiated. Called from file %s,"
" line %s, in %s" %
((hex(id(self)),)+
(os.path.split(caller_frame[1])[1],)+
(tuple(caller_frame[i] for i in range(2, 4)))
)
)
" line %s, in %s", hex(id(self)), c_code.co_filename,
c_frame.f_lineno, c_code.co_name)
self.env = env
self.db = db
self.txn = None
@@ -220,7 +218,10 @@ class BSDDBTxn:
# test code
if __name__ == "__main__":
print("1")
from bsddb3 import db, dbshelve
try:
from bsddb3 import db, dbshelve
except:
from berkeleydb import db, dbshelve
print("2")
x = db.DBEnv()
print("3")
+10 -7
View File
@@ -29,14 +29,17 @@ from pickle import dumps, loads
try:
from bsddb3 import db
except:
try:
from berkeleydb import db
except:
# FIXME: make this more abstract to deal with other backends
class db:
DB_RMW = 0
DB_FIRST = 0
DB_LAST = 0
DB_CURRENT = 0
DB_PREV = 0
DB_NEXT = 0
class db:
DB_RMW = 0
DB_FIRST = 0
DB_LAST = 0
DB_CURRENT = 0
DB_PREV = 0
DB_NEXT = 0
#-------------------------------------------------------------------------
#
+9 -6
View File
@@ -41,12 +41,15 @@ from functools import partial
try:
from bsddb3 import db
except:
# FIXME: make this more abstract to deal with other backends
class db:
DBRunRecoveryError = 0
DBAccessError = 0
DBPageNotFoundError = 0
DBInvalidArgError = 0
try:
from berkeleydb import db
except:
# FIXME: make this more abstract to deal with other backends
class db:
DBRunRecoveryError = 0
DBAccessError = 0
DBPageNotFoundError = 0
DBInvalidArgError = 0
import re
import logging
+4 -2
View File
@@ -22,8 +22,10 @@
## specific to bsddb
import os
from bsddb3 import dbshelve, db
try:
from bsddb3 import dbshelve, db
except:
from berkeleydb import db, dbshelve
from gramps.gen.db import META, PERSON_TBL
from gramps.gen.db.dbconst import BDBVERSFN
+4 -2
View File
@@ -23,8 +23,10 @@ import os
import tempfile
import shutil
from bsddb3 import dbshelve, db
try:
from bsddb3 import dbshelve, db
except:
from berkeleydb import db, dbshelve
from ..read import DbBsddbTreeCursor
class Data:
+8 -5
View File
@@ -36,12 +36,15 @@ from collections import deque
try:
from bsddb3 import db
except:
try:
from berkeleydb import db
except:
# FIXME: make this more abstract to deal with other backends
class db:
DBRunRecoveryError = 0
DBAccessError = 0
DBPageNotFoundError = 0
DBInvalidArgError = 0
class db:
DBRunRecoveryError = 0
DBAccessError = 0
DBPageNotFoundError = 0
DBInvalidArgError = 0
from gramps.gen.const import GRAMPS_LOCALE as glocale
_ = glocale.translation.gettext
+4 -2
View File
@@ -32,8 +32,10 @@ import os
import re
import time
import logging
from bsddb3 import db
try:
from bsddb3 import db
except:
from berkeleydb import db
#-------------------------------------------------------------------------
#
# Gramps modules
+8 -2
View File
@@ -40,8 +40,14 @@ import logging
from sys import maxsize, getfilesystemencoding, version_info
from ast import literal_eval as safe_eval
from bsddb3 import dbshelve, db
from bsddb3.db import DB_CREATE, DB_AUTO_COMMIT, DB_DUP, DB_DUPSORT, DB_RDONLY
try:
from bsddb3 import dbshelve, db
except:
from berkeleydb import db, dbshelve
try:
from bsddb3.db import DB_CREATE, DB_AUTO_COMMIT, DB_DUP, DB_DUPSORT, DB_RDONLY
except:
from berkeleydb.db import DB_CREATE, DB_AUTO_COMMIT, DB_DUP, DB_DUPSORT, DB_RDONLY
DBFLAGS_O = DB_CREATE | DB_AUTO_COMMIT # Default flags for database open
DBFLAGS_R = DB_RDONLY # Flags to open a database read-only
+23 -29
View File
@@ -224,6 +224,16 @@ class DBAPI(DbGeneric):
if self.transaction == None:
self.dbapi.rollback()
def _collation(self, locale):
"""
Get the adjusted collation if there is one, falling back on
the locale.collation.
"""
collation = self.dbapi.check_collation(locale)
if collation == None:
return locale.get_collation()
return collation
def transaction_begin(self, transaction):
"""
Transactions are handled automatically by the db layer.
@@ -231,6 +241,10 @@ class DBAPI(DbGeneric):
_LOG.debug(" %sDBAPI %s transaction begin for '%s'",
"Batch " if transaction.batch else "",
hex(id(self)), transaction.get_description())
if transaction.batch:
# A batch transaction does not store the commits
# Aborting the session completely will become impossible.
self.abort_possible = False
self.transaction = transaction
self.dbapi.begin()
return transaction
@@ -360,12 +374,9 @@ class DBAPI(DbGeneric):
:type locale: A GrampsLocale object.
"""
if sort_handles:
if locale != glocale:
self.dbapi.check_collation(locale)
self.dbapi.execute('SELECT handle FROM person '
'ORDER BY surname '
'COLLATE "%s"' % locale.get_collation())
'COLLATE "%s"' % self._collation(locale))
else:
self.dbapi.execute("SELECT handle FROM person")
rows = self.dbapi.fetchall()
@@ -382,9 +393,6 @@ class DBAPI(DbGeneric):
:type locale: A GrampsLocale object.
"""
if sort_handles:
if locale != glocale:
self.dbapi.check_collation(locale)
sql = ('SELECT family.handle ' +
'FROM family ' +
'LEFT JOIN person AS father ' +
@@ -399,7 +407,7 @@ class DBAPI(DbGeneric):
'THEN mother.given_name ' +
'ELSE father.given_name ' +
'END) ' +
'COLLATE "%s"' % locale.get_collation())
'COLLATE "%s"' % self._collation(locale))
self.dbapi.execute(sql)
else:
self.dbapi.execute("SELECT handle FROM family")
@@ -426,12 +434,9 @@ class DBAPI(DbGeneric):
:type locale: A GrampsLocale object.
"""
if sort_handles:
if locale != glocale:
self.dbapi.check_collation(locale)
self.dbapi.execute('SELECT handle FROM citation '
'ORDER BY page '
'COLLATE "%s"' % locale.get_collation())
'COLLATE "%s"' % self._collation(locale))
else:
self.dbapi.execute("SELECT handle FROM citation")
rows = self.dbapi.fetchall()
@@ -448,12 +453,9 @@ class DBAPI(DbGeneric):
:type locale: A GrampsLocale object.
"""
if sort_handles:
if locale != glocale:
self.dbapi.check_collation(locale)
self.dbapi.execute('SELECT handle FROM source '
'ORDER BY title '
'COLLATE "%s"' % locale.get_collation())
'COLLATE "%s"' % self._collation(locale))
else:
self.dbapi.execute("SELECT handle from source")
rows = self.dbapi.fetchall()
@@ -470,12 +472,9 @@ class DBAPI(DbGeneric):
:type locale: A GrampsLocale object.
"""
if sort_handles:
if locale != glocale:
self.dbapi.check_collation(locale)
self.dbapi.execute('SELECT handle FROM place '
'ORDER BY title '
'COLLATE "%s"' % locale.get_collation())
'COLLATE "%s"' % self._collation(locale))
else:
self.dbapi.execute("SELECT handle FROM place")
rows = self.dbapi.fetchall()
@@ -501,12 +500,9 @@ class DBAPI(DbGeneric):
:type locale: A GrampsLocale object.
"""
if sort_handles:
if locale != glocale:
self.dbapi.check_collation(locale)
self.dbapi.execute('SELECT handle FROM media '
'ORDER BY desc '
'COLLATE "%s"' % locale.get_collation())
'COLLATE "%s"' % self._collation(locale))
else:
self.dbapi.execute("SELECT handle FROM media")
rows = self.dbapi.fetchall()
@@ -532,12 +528,9 @@ class DBAPI(DbGeneric):
:type locale: A GrampsLocale object.
"""
if sort_handles:
if locale != glocale:
self.dbapi.check_collation(locale)
self.dbapi.execute('SELECT handle FROM tag '
'ORDER BY name '
'COLLATE "%s"' % locale.get_collation())
'COLLATE "%s"' % self._collation(locale))
else:
self.dbapi.execute("SELECT handle FROM tag")
rows = self.dbapi.fetchall()
@@ -584,12 +577,13 @@ class DBAPI(DbGeneric):
"WHERE name = ?", [grouping, name])
elif row and grouping is None:
self.dbapi.execute("DELETE FROM name_group WHERE name = ?", [name])
grouping = ''
else:
self.dbapi.execute(
"INSERT INTO name_group (name, grouping) VALUES (?, ?)",
[name, grouping])
self._txn_commit()
if grouping is None:
grouping = ''
self.emit('person-groupname-rebuild', (name, grouping))
def _commit_base(self, obj, obj_key, trans, change_time):
+7 -1
View File
@@ -101,6 +101,7 @@ class Connection:
self.__cursor = self.__connection.cursor()
self.__connection.create_function("regexp", 2, regexp)
self.__collations = []
self.__tmap = str.maketrans('-.@=;', '_____')
self.check_collation(glocale)
def check_collation(self, locale):
@@ -110,9 +111,14 @@ class Connection:
:param locale: Locale to be checked.
:param type: A GrampsLocale object.
"""
collation = locale.get_collation()
#PySQlite3 permits only ascii alphanumerics and underscores in
#collation names so first translate any old-style Unicode locale
#delimiters to underscores.
collation = locale.get_collation().translate(self.__tmap)
if collation not in self.__collations:
self.__connection.create_collation(collation, locale.strcoll)
self.__collations.append(collation)
return collation
def execute(self, *args, **kwargs):
"""
+4 -1
View File
@@ -556,7 +556,10 @@ class HtmlDoc(BaseDoc, TextDoc):
"""
self._empty = 0
size = int(max(w_cm, h_cm) * float(150.0/2.54))
refname = "is%s" % os.path.basename(name)
if crop:
refname = "is-%d-%d-%d-%d-%s" % (crop[0], crop[1], crop[2], crop[3], os.path.basename(name))
else:
refname = "is%s" % os.path.basename(name)
imdir = self._backend.datadirfull()
+4 -4
View File
@@ -31,7 +31,7 @@ SVG document generator.
#
#-------------------------------------------------------------------------
from io import StringIO
from xml.sax.saxutils import escape
#-------------------------------------------------------------------------
#
# Gramps modules
@@ -147,7 +147,7 @@ class SvgDrawDoc(BaseDoc, DrawDoc):
linex = xpos + (width - self.string_width(font, line)) / 2
self.buffer.write(
'<tspan x="%4.2f" dy="%d">' % (linex, size) +
line +
escape(line) +
'</tspan>'
)
self.buffer.write('</text>\n')
@@ -273,7 +273,7 @@ class SvgDrawDoc(BaseDoc, DrawDoc):
self.buffer.write(' font-family:serif;')
self.buffer.write(
'">' +
line +
escape(line) +
'</text>\n'
)
@@ -307,7 +307,7 @@ class SvgDrawDoc(BaseDoc, DrawDoc):
self.buffer.write('font-family:serif;')
self.buffer.write(
'">' +
text +
escape(text) +
'</text>\n'
)
+2 -1
View File
@@ -267,7 +267,8 @@ class Calendar(Report):
day_col * cell_width + cell_width/2,
header + week_row * cell_height)
list_ = self.calendar.get(month, {}).get(thisday.day, [])
list_.sort() # to get CAL-Holiday on bottom
# sort the list to get CAL-Holiday on bottom
list_.sort(key=lambda x: (x[0], x[1]))
position = spacing
for (format, p, m_list) in list_:
for line in reversed(p.split("\n")):
+8 -13
View File
@@ -160,10 +160,9 @@ def breakup(txt, limit):
data = []
while len(txt) > limit:
# look for non-space pair to break between
# do not break within a UTF-8 byte sequence, i. e. first char >127
# fix issue #0012709 by removing Python2 code obsoleted by Python3
idx = limit
while (idx > 0 and (txt[idx - 1].isspace() or txt[idx].isspace() or
ord(txt[idx - 1]) > 127)):
while (idx > 0 and (txt[idx - 1].isspace() or txt[idx].isspace())):
idx -= 1
if idx == 0:
#no words to break on, just break at limit anyway
@@ -1250,20 +1249,14 @@ class GedcomWriter(UpdateCallback):
if start != Date.EMPTY:
cal = date.get_calendar()
mod = date.get_modifier()
quality = date.get_quality()
if quality in libgedcom.DATE_QUALITY:
qual_text = libgedcom.DATE_QUALITY[quality] + " "
else:
qual_text = ""
quality = None if mod else date.get_quality()
if mod == Date.MOD_SPAN:
val = "%sFROM %s TO %s" % (
qual_text,
val = "FROM %s TO %s" % (
libgedcom.make_gedcom_date(start, cal, mod, None),
libgedcom.make_gedcom_date(date.get_stop_date(),
cal, mod, None))
elif mod == Date.MOD_RANGE:
val = "%sBET %s AND %s" % (
qual_text,
val = "BET %s AND %s" % (
libgedcom.make_gedcom_date(start, cal, mod, None),
libgedcom.make_gedcom_date(date.get_stop_date(),
cal, mod, None))
@@ -1350,6 +1343,8 @@ class GedcomWriter(UpdateCallback):
"""
citation = self.dbase.get_citation_from_handle(citation_handle)
if citation is None: # removed by proxy
return
src_handle = citation.get_reference_handle()
if src_handle is None:
@@ -1559,7 +1554,7 @@ class GedcomWriter(UpdateCallback):
@type addr: [a super-type of] LocationBase
"""
if addr.get_street() or addr.get_locality() or addr.get_city() or \
addr.get_state() or addr.get_postal_code or addr.get_country():
addr.get_state() or addr.get_postal_code() or addr.get_country():
self._writeln(level, 'ADDR', addr.get_street())
if addr.get_locality():
self._writeln(level + 1, 'CONT', addr.get_locality())
+1 -1
View File
@@ -202,7 +202,7 @@ class CalendarWriter:
date = event.get_date_object()
place_handle = event.get_place_handle()
date_string = self.format_date(date, 1)
if date_string is not "":
if date_string != "":
# self.writeln("")
self.writeln("BEGIN:VEVENT")
time_s = time.gmtime(event.change)
+1 -1
View File
@@ -376,7 +376,7 @@ class GrampsXmlWriter(UpdateCallback):
for key in group_map:
value = self.db.get_name_group_mapping(key)
self.g.write(' <map type="group_as" key="%s" value="%s"/>\n'
% (self.fix(key), value))
% (self.fix(key), self.fix(value)))
self.g.write(" </namemaps>\n")
def write_bookmarks(self):

Some files were not shown because too many files have changed in this diff Show More