Compare commits

...

138 Commits

Author SHA1 Message Date
Vassilii Khachaturov 562fdbb06a 5554: back-port to gramps32 to debug 6757
Back-port the following commit:
	commit d43545a98a00b01228786776f74121d58bb73966
	Author: Josip Pisoj <josip@pisoj.com>
	Date:   Fri Feb 10 20:25:15 2012 +0000

		bug #5554: Automake problem

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@18851 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

svn: r23210
2013-09-27 21:40:49 +00:00
Zdeněk Hataš f83f4c8451 czech translation update
svn: r18424
2011-11-09 13:05:44 +00:00
Doug Blank 838f3adba7 5266: Christening dates displayed as Birth dates in Family editor
svn: r18350
2011-10-18 21:16:25 +00:00
Kees Bakker 7d15137109 Bugfix for 5146 and 5106 - ImportProGen fails on Windows because some files
must be read as "binary".


svn: r18059
2011-08-23 20:01:50 +00:00
Peter Landgren c210a14acc Swedish update.
svn: r17880
2011-07-01 08:16:08 +00:00
Nick Hall 92c5cceea3 5055: Issue warning when attempting to edit media reference when media object is already being edited
svn: r17874
2011-06-30 20:42:05 +00:00
Michiel Nauta 5eea9ca023 4856: Gedcom import of empty note leads to invalid database
svn: r17768
2011-06-13 08:27:50 +00:00
Michiel Nauta 19bfd81a9b 4316: [NarWeb] Missing document.png
svn: r17744
2011-06-10 17:07:10 +00:00
Peter Landgren 296d7557b7 Fix so that date, if any, in source reference is printed.
svn: r17732
2011-06-09 14:11:03 +00:00
Peter Landgren 3eea6dc8dc Fix so that date, if any, in source reference is printed.
svn: r17731
2011-06-09 14:10:20 +00:00
Michiel Nauta d7200b028a 4906: Infinitive loop when trying to remove matched person/event filter rules
svn: r17627
2011-05-30 20:23:41 +00:00
Erik De Richter a79e8f8860 updated nl translation
svn: r17554
2011-05-24 19:22:21 +00:00
Jérôme Rapinat fa60e78ee2 2521, 4923 'after' and validation (partial fix); typo on NextYear()
svn: r17546
2011-05-21 12:14:14 +00:00
Jérôme Rapinat 46979f512d 4899: according to specification, increase limite from '72' (default) to '120'
svn: r17479
2011-05-12 12:41:51 +00:00
Vassilii Khachaturov 1231c01b05 RU: annoying typo
svn: r17445
2011-05-07 18:37:43 +00:00
Michiel Nauta bdf97fabd0 4322: Upgrading a large database to new version runs out of memory; increase locktable size
svn: r17385
2011-05-02 20:10:37 +00:00
Doug Blank a8a8b41210 4875: 3.2.6-1 - Narweb - pedigree section
svn: r17370
2011-05-01 16:14:04 +00:00
Stéphane Charette 1091c221ba bump version number after the 3.2.6 release
svn: r17369
2011-05-01 07:11:19 +00:00
Stéphane Charette ccfe2230ef update for 3.2.6 release
svn: r17363
2011-05-01 06:52:33 +00:00
Kees Bakker e3bfa40a70 Bugfix for ImportProGen, bug #4869
svn: r17362
2011-04-30 20:33:16 +00:00
Stéphane Charette 1bb2a2fec0 updated gramps.pot prior to the 3.2.6 release
svn: r17356
2011-04-30 15:43:59 +00:00
Michiel Nauta 77cf544636 Add some debug statements to find cause of bug 4481/4834
svn: r17295
2011-04-27 17:45:37 +00:00
Michiel Nauta 33daf99b33 3614: Undo gives wrong text in menu of what it will do; uncontroversial patch part
svn: r17227
2011-04-23 14:19:04 +00:00
Peter Landgren 20b3131237 Issue 4000 also fixed for Gramps 3.2.6 now.
svn: r17224
2011-04-23 11:03:54 +00:00
Michiel Nauta 1a11e6ba36 4047: Cannot modify a mother on a family editor without father
svn: r17221
2011-04-23 08:54:46 +00:00
Vassilii Khachaturov 2dd4eb7526 Home person - translate consistently
svn: r17203
2011-04-22 09:24:27 +00:00
Jérôme Rapinat be37e4cc45 4848: Lithuanian date handler (display gregorian) and libtranslate
svn: r17200
2011-04-22 08:38:26 +00:00
Michiel Nauta f668c23cf2 4284: again, fix for parentless family
svn: r17174
2011-04-21 04:56:02 +00:00
Michiel Nauta 90c0f43c9d 4284: Common ancestor filter ignores persons without ancestors
svn: r17168
2011-04-20 13:33:47 +00:00
Benny Malengier 5819fa672e 4455: Gramps crashes when selecting Events due to PHON in GEDCOM
svn: r17161
2011-04-20 10:25:20 +00:00
Michiel Nauta 40f7314699 4426: Names under thumbnails in Gallery view in Narweb reports mis show characters & and '
svn: r17098
2011-04-11 17:01:23 +00:00
Jérôme Rapinat e942c940fa minor improvement (call name)
svn: r17042
2011-04-05 08:18:00 +00:00
Zdeněk Hataš 9c0f5a96ef Czech translation is now complete.
svn: r17028
2011-04-02 19:41:52 +00:00
Michiel Nauta e01b04e117 4794: Error adding new repository via source dialog
svn: r16975
2011-03-29 17:43:28 +00:00
Mirko Leonhäuser e3e6a36f3b Bugfix in German translation
svn: r16967
2011-03-28 18:31:57 +00:00
Michiel Nauta 74968f9b5a 4763: Crash because error passes instead of string
svn: r16912
2011-03-24 21:20:50 +00:00
Michiel Nauta 200b4f3015 4770: Unexpected error exporting a database to Gramps Xml format
svn: r16899
2011-03-23 20:29:47 +00:00
Luigi Toscano 35763a3c29 Italian translation updates.
svn: r16895
2011-03-23 00:14:53 +00:00
Jérôme Rapinat 8996d04cb9 4423: Web report does not handle Czech 'CH' character properly (contribution by phejl)
svn: r16843
2011-03-17 16:29:59 +00:00
Michiel Nauta 36b418ec65 4109: Command line arguments for tools ignored
svn: r16836
2011-03-16 21:55:13 +00:00
Peter Landgren 62d1419a83 Fixed typo in Swedish translation.
svn: r16830
2011-03-16 15:16:25 +00:00
Zdeněk Hataš 89cf7676e1 translation update. abbreviations left untranslated. I don't have an idea, how to convert it to my native language now.
svn: r16828
2011-03-16 14:20:15 +00:00
Michiel Nauta 22b13fc772 4758: Copy constructor of gen.lib objects uses shallow copy instead of deep copy
svn: r16826
2011-03-15 21:54:37 +00:00
Serge Noiraud 7150429195 GeoView : issue 4743 : self.title already used in pageview.py. rename it with self.title_name
svn: r16824
2011-03-14 09:50:39 +00:00
Vassilii Khachaturov 741eedcbe1 tiny cleanup
svn: r16799
2011-03-10 13:48:51 +00:00
Vassilii Khachaturov a1ae8852cf POT merge up to POT-Creation-Date: 2011-02-05 10:35+0100.
Verified today's POT only generates differences in 
the source referencing comments.



svn: r16782
2011-03-08 11:13:02 +00:00
Michiel Nauta 9bc4a82007 4041: Filter rule people with records containing <substring> fails on street name
svn: r16761
2011-03-05 10:49:01 +00:00
Boril Gourinov a414670cec Updating Bulgarian translation
svn: r16755
2011-03-04 21:20:08 +00:00
Jérôme Rapinat c1487b1e59 4692, 4519, 4390: try to avoid empty event types with a better support for web addresses on individual
svn: r16749
2011-03-03 09:27:43 +00:00
Michiel Nauta 5af7f07875 Undo revision 16674
svn: r16743
2011-03-02 11:33:36 +00:00
Jérôme Rapinat 8708c60f33 'Selected' action/string was missing
svn: r16729
2011-02-28 15:20:53 +00:00
Doug Blank a87b267515 4694: Tools->Utilities->Verify the Data->crash
svn: r16727
2011-02-28 13:47:53 +00:00
Vassilii Khachaturov 0884741057 4687: session log gramplet - overzealous l10n of signal names breaks clickable link handlers
backport my trunk fix (cleanly applies)



svn: r16725
2011-02-27 13:40:54 +00:00
Jérôme Rapinat f2f4d5974c 4689: More space for localized sentences on ProgressMeter
svn: r16711
2011-02-25 14:41:10 +00:00
Michiel Nauta b72ae432e7 correct revision 16674, readd sort_string method in case external plugins use it
svn: r16677
2011-02-19 15:08:30 +00:00
Peter Landgren 13e1d5420e Further improvment for Swedish Calendar.
svn: r16676
2011-02-19 14:14:14 +00:00
Michiel Nauta f5a8db75c2 4657: The "sort as" name is ignored
svn: r16674
2011-02-19 14:08:06 +00:00
Vassilii Khachaturov bdd110de18 Committing my fix to bug #4550 - PATCH OK'ed by dsblank
svn: r16658
2011-02-17 22:52:41 +00:00
Jérôme Rapinat 8b198624ef 4653: typo, capital letter (contribution by cderory)
svn: r16656
2011-02-17 22:11:31 +00:00
Peter Landgren 8f0bcd136b Update of Swedish translation.
svn: r16644
2011-02-17 09:19:36 +00:00
Peter Landgren 5e275bedfd Improved Swedish Calendar.
svn: r16641
2011-02-17 08:29:30 +00:00
Peter Landgren 5791d2d0d3 Fixed a typo and improved Swedish Calendar.
svn: r16640
2011-02-17 08:28:35 +00:00
Michiel Nauta 01aa78127e 4651: XML import of name with only display or sort format set fails
svn: r16633
2011-02-16 18:57:13 +00:00
Jérôme Rapinat 10342a03cc dupplicated */12/26 (France)
svn: r16629
2011-02-16 14:16:35 +00:00
Jérôme Rapinat 1fd757e6fa cleanup France; http://fr.wikipedia.org/wiki/Jour_f%C3%A9ri%C3%A9#.C2.A0France
svn: r16628
2011-02-16 14:14:58 +00:00
Michiel Nauta 8af1f7e6f5 4430: fail to repair database
svn: r16605
2011-02-11 16:10:58 +00:00
Michiel Nauta 41d752a75b 4613: Gramps dies many times (on entering person that satisfies filter with ID parameter)
svn: r16594
2011-02-09 21:27:12 +00:00
Rob G. Healey 783619455f Bug#4287: Beg#4601: Fixed
and cleanup for NarrativeWeb for W3C compliance; IndividualPages
          still have errors in the Pedigree section -- this will require
          more than a simple tweak of code or style sheet elements.

svn: r16591
2011-02-09 06:26:01 +00:00
Erik De Richter 6e50919487 updated nl translation
svn: r16589
2011-02-08 19:24:44 +00:00
Rob G. Healey 7a9fe58b48 Bug#4287; Html.attr was not closing such elements as: <img ... /> . Thanks Gerald Britton for the patch.
svn: r16587
2011-02-07 07:13:22 +00:00
Jérôme Rapinat 69f1ec0508 4612: 'elf' instead of 'self' (fixed by Harald Rosemann)
svn: r16584
2011-02-06 13:07:15 +00:00
Mirko Leonhäuser a8aea11b07 updated german translation
svn: r16583
2011-02-06 09:02:25 +00:00
Gary Burton 09f20eaf9f Redraw selectors on toggling sort order. Bug #4518
svn: r16580
2011-02-05 16:56:39 +00:00
Mirko Leonhäuser a4ca60e98f updated german translation
svn: r16577
2011-02-05 15:29:59 +00:00
Jérôme Rapinat 12e19ef445 update template
svn: r16576
2011-02-05 09:41:33 +00:00
Jérôme Rapinat a12f166b09 4326: typos (by PaulFranklin); backport
svn: r16575
2011-02-05 09:00:43 +00:00
Jérôme Rapinat 170d7e4cdb 4089: Month names for Lithuanian (contribution by embar)
svn: r16573
2011-02-05 08:26:22 +00:00
Peter Landgren 328a9d329d Better abbreviations, thanks to Paul Franklin.
svn: r16567
2011-02-04 15:41:34 +00:00
Benny Malengier 277e91a1ca 3975: Accessing an incompatible database corrupts the database
Undoing unset of DB_RECOVERY flag, we need it to have ACI(D) database


svn: r16561
2011-02-03 22:23:05 +00:00
Rob G. Healey 6ca6765458 Fixed navigation menus in Nebraska style sheet.
svn: r16557
2011-02-03 18:42:13 +00:00
Nick Hall bced98bd71 4591: Do not allow less than a single column in the Gramplet view
svn: r16546
2011-02-02 22:09:14 +00:00
Jérôme Rapinat b5cd86498b 4587: cleanup Russian translation (by vassilii); merge with new template
svn: r16541
2011-02-02 13:31:45 +00:00
Jérôme Rapinat 7045418dec wording, spacing, separator
svn: r16539
2011-02-02 10:57:41 +00:00
Mirko Leonhäuser a5b5842ec3 updated german translation
svn: r16536
2011-02-01 22:04:34 +00:00
Jérôme Rapinat 20b39325b6 typos
svn: r16533
2011-02-01 16:27:54 +00:00
Erik De Richter cbade510a9 updated nl translation
svn: r16532
2011-02-01 15:30:42 +00:00
Jérôme Rapinat 82d7d7db9a 3782: Cannot set max generation > 15; use the same value as DAR and pedigree gramplet
svn: r16530
2011-02-01 14:58:54 +00:00
Peter Landgren f3d110f7ec Update with abbreviations.
svn: r16526
2011-02-01 12:10:27 +00:00
Jérôme Rapinat 6968dcdf97 4425: event type abbreviations; new template; update french translation
svn: r16524
2011-02-01 11:08:20 +00:00
Peter Landgren 243d02a6f5 Issue 4425: Abbreviation algorithm does not work for all languages.
svn: r16520
2011-01-31 20:08:09 +00:00
Jérôme Rapinat 1aa71cceaa 4582: cleanup by vassilii; merge with last template
svn: r16510
2011-01-31 08:04:42 +00:00
Zdeněk Hataš d8b100757f czech translation completed.
svn: r16509
2011-01-30 20:58:33 +00:00
Jérôme Rapinat 80a6b71e13 4578: cleanup by vassilii
svn: r16494
2011-01-28 12:38:03 +00:00
Jérôme Rapinat dfa36127f8 4089: Month names (by embar)
svn: r16492
2011-01-28 09:51:37 +00:00
Mirko Leonhäuser f17a5125f3 updated german translation
svn: r16474
2011-01-25 22:00:35 +00:00
Benny Malengier c58ca7575b 4473: Prefix lost when using Add new child to family
svn: r16473
2011-01-25 20:02:28 +00:00
Peter Landgren 4f1943b180 Swedish translation update.
svn: r16469
2011-01-25 14:00:13 +00:00
Benny Malengier b147cb2ca3 4383: Error while attempt to edit family
2521: Problem with erroneous birth date in using the family editor.
We show validation error on date > next year, and don't crash on large year anymore


svn: r16467
2011-01-25 12:43:09 +00:00
Benny Malengier 3a4a01ba9e set async write to disk to improve speed, eg import * 40
svn: r16461
2011-01-24 20:08:21 +00:00
Jérôme Rapinat f84de89864 #4569 #4560 patches for Russian translation on Records.py and Name formats (by vassilii)
svn: r16452
2011-01-24 13:43:43 +00:00
Jérôme Rapinat adc4608ba5 typo
svn: r16431
2011-01-22 10:12:55 +00:00
Zdeněk Hataš fd363c528b bug #3482 fix backported from trunk
svn: r16408
2011-01-18 10:35:08 +00:00
Jérôme Rapinat e60da9001a 4537: spelling mistake (contribution by vassilii)
svn: r16399
2011-01-17 18:26:35 +00:00
Rob G. Healey b2ea7dea08 Bug#3795; fixed DownloadPage alignment.
svn: r16383
2011-01-15 07:17:38 +00:00
Zdeněk Hataš eea46c8875 czech translation update
svn: r16382
2011-01-14 20:55:28 +00:00
Jérôme Rapinat 4f44f6f98f 4530: Gedcom import looses custom family event description
svn: r16373
2011-01-13 10:45:37 +00:00
Jérôme Rapinat 62358e931b update french translation
svn: r16372
2011-01-13 10:41:02 +00:00
Mirko Leonhäuser a7319dac47 updated german translation
svn: r16346
2011-01-07 11:15:32 +00:00
Peter Landgren dc0cd05ef8 Issue 4515, Check and Repair replaces illegal cntrl char with space.
svn: r16343
2011-01-06 12:12:53 +00:00
Peter Landgren 76e66f6104 Issue 4515, allow only 09, 0A, 0D in GEDCOM input.
svn: r16341
2011-01-05 18:12:15 +00:00
Joan Creus b94008e412 A few corrections to translation
svn: r16338
2011-01-05 17:49:35 +00:00
Peter Landgren 2acc96fa62 Issue 4515, skip all control char in XML output except 09, 0A, 0D.
svn: r16337
2011-01-05 10:46:27 +00:00
Joan Creus dcca22245c Translation update
svn: r16335
2011-01-04 10:32:17 +00:00
Rob G. Healey 27ff0c989e Worked on bugs #4305 and #4486. Not all problems are complete yet, but see #4305 for explaination.
svn: r16331
2011-01-03 02:39:27 +00:00
Jérôme Rapinat 0df382465c 4502: typo (contribution verthezp)
svn: r16328
2011-01-01 15:13:59 +00:00
Zdeněk Hataš 28f2bc8bac Backported Czech translations from trunk.
svn: r16302
2010-12-19 17:08:20 +00:00
Peter Landgren 58e7af6ddf Issue 4460. Fixed by changing =+ to +=.
svn: r16299
2010-12-19 12:03:51 +00:00
Jérôme Rapinat e0adfcbb7b update Chinese translation (by honeyword)
svn: r16297
2010-12-18 09:06:44 +00:00
Mirko Leonhäuser bc0ce2aada updated german translation
svn: r16294
2010-12-17 00:06:18 +00:00
Jérôme Rapinat 9e7e513b13 3930: Verify data tool ignores role on burial event (see previous rev)
svn: r16290
2010-12-16 09:29:32 +00:00
Jérôme Rapinat e43da1a226 3930: Verify data tool ignores role on burial event
svn: r16289
2010-12-16 09:27:17 +00:00
Jérôme Rapinat cd036d3ec7 update Chinese translation (by honeyword)
svn: r16285
2010-12-15 16:20:20 +00:00
Doug Blank a162c6796e Changed CREATE_FOLDER to SELECT_FOLDER to prevent infinite loop; still allows one to create folder, with no lack of functionality
svn: r16284
2010-12-15 15:46:50 +00:00
Peter Landgren 2e8b234b94 Fix of preposition, thanks to user report.
svn: r16282
2010-12-14 19:51:10 +00:00
Doug Blank 5f51aeeb63 4429: gramps can't export my database
svn: r16280
2010-12-13 22:39:34 +00:00
Doug Blank 4742d33e26 4457: Setup addons
svn: r16278
2010-12-13 21:09:34 +00:00
Zdeněk Hataš f0ece22743 Backported Czech translations from trunk.
svn: r16276
2010-12-12 22:40:47 +00:00
Zdeněk Hataš 62b29c6e61 Backported translation from trunk
svn: r16262
2010-12-11 19:42:12 +00:00
Jérôme Rapinat c6688c8927 update Brazilian-Portuguese translation (by Robert Jerome)
svn: r16256
2010-12-07 13:26:01 +00:00
Doug Blank 38a6412aa5 4427: GEDCOM export: non-standard end of line characters not output properly
svn: r16240
2010-11-30 14:31:16 +00:00
Doug Blank 7244448c51 3975: Accessing an incompatible database corrupts the database
svn: r16234
2010-11-24 03:27:37 +00:00
Doug Blank 5705dfe107 4415: Editing ID format in preferences can throw exception
svn: r16228
2010-11-23 04:06:56 +00:00
Erik De Richter cd53f3a842 updated nl translation
svn: r16220
2010-11-20 10:20:50 +00:00
Peter Landgren d5ccbb092d Issue 4393, str/unicode problem. Now same code as in trunk.
svn: r16218
2010-11-19 18:37:12 +00:00
Doug Blank 3affb0a3fd 4395: Crash on selecting Gramplets
svn: r16217
2010-11-19 14:37:10 +00:00
Benny Malengier 028e5caf03 4370: Reports in ODT format are corrupted
svn: r16209
2010-11-18 20:18:06 +00:00
Benny Malengier 8dd881dc2f 4352: more memory leak problems
svn: r16207
2010-11-18 19:16:55 +00:00
Stéphane Charette c0bf571c62 bump version number after the 3.2.5 release
svn: r16204
2010-11-18 07:42:26 +00:00
134 changed files with 28825 additions and 25413 deletions
+11
View File
@@ -1,3 +1,14 @@
Version 3.2.6 -- the "So far, so good." bug fix release.
* fix memory leaks
* fix corrupted reports
* fix crash in cramplets
* fix gedcom import and export
* import speed improvements
* NarrativeWeb fixes
* prevent corrupting databases
* many translation updates
* other changes; see the changelog and the 3.2.6 roadmap: http://www.gramps-project.org/bugs/roadmap_page.php?version_id=23
Version 3.2.5 -- the "I intend to live forever" bug fix release.
* fix Gramps so it again runs with Python 2.5
* write all notes and sources to gedcom files
+1 -1
View File
@@ -5,7 +5,7 @@ dnl May need to run automake && aclocal first
AC_PREREQ(2.57)
dnl NOTE: arg to macro below becomes the "VERSION"
AC_INIT(gramps, 3.2.5, [gramps-bugs@lists.sourceforge.net])
AC_INIT(gramps, 3.2.7, [gramps-bugs@lists.sourceforge.net])
AC_CONFIG_SRCDIR(configure.in)
AM_INIT_AUTOMAKE([1.6.3 foreign])
+1804 -1383
View File
File diff suppressed because it is too large Load Diff
+2377 -4544
View File
File diff suppressed because it is too large Load Diff
+4620 -6042
View File
File diff suppressed because it is too large Load Diff
+763 -544
View File
File diff suppressed because it is too large Load Diff
+632 -432
View File
File diff suppressed because it is too large Load Diff
+716 -529
View File
File diff suppressed because it is too large Load Diff
+1491 -1160
View File
File diff suppressed because it is too large Load Diff
+5224 -2891
View File
File diff suppressed because it is too large Load Diff
+6 -6
View File
@@ -7591,7 +7591,7 @@ msgstr "Registros de Família"
#: ../src/plugins/textreport/NumberOfAncestorsReport.py:199
#: ../src/plugins/textreport/Summary.py:283
msgid "The basic style used for the text display."
msgstr "O estilo básico usado para a exibição de texto."
msgstr "O estilo de base utilizado na apresentação de texto."
#: ../src/plugins/Records.py:509
msgid "The style used for headings."
@@ -9431,7 +9431,7 @@ msgstr "Filtro"
#: ../src/plugins/gramplet/PedigreeGramplet.py:222
#, fuzzy, python-format
msgid "(b. %(birthdate)s, d. %(deathdate)s)"
msgstr "Nasceu: %(birth_date)s, Faleceu: %(death_date)s."
msgstr "Nasceu: %(birthdate)s, Faleceu: %(deathdate)s."
#: ../src/plugins/gramplet/PedigreeGramplet.py:227
#, fuzzy, python-format
@@ -16201,7 +16201,7 @@ msgstr "O estilo usado para o nome do cônjuge."
#: ../src/plugins/textreport/KinshipReport.py:102
msgid "Kinship Report for %s"
msgstr "Relatório de parentesco para %s"
msgstr "Relatório de Parentesco de %s"
#: ../src/plugins/textreport/KinshipReport.py:330
msgid "The maximum number of descendant generations"
@@ -16213,7 +16213,7 @@ msgstr "Número maximum de gerações ascendentes"
#: ../src/plugins/textreport/KinshipReport.py:338
msgid "Whether to include spouses"
msgstr "Se deseja incluir os cônjuges"
msgstr "Se deve incluir os cônjuges"
#: ../src/plugins/textreport/KinshipReport.py:341
msgid "Include cousins"
@@ -16229,12 +16229,12 @@ msgstr "Inclui tios/tias/sobrinhos/sobrinhas"
#: ../src/plugins/textreport/KinshipReport.py:346
msgid "Whether to include aunts/uncles/nephews/nieces"
msgstr "Se deseja incluir tios/tias/sobrinhos/sobrinhas"
msgstr "Se deve incluir tios/tias/sobrinhos/sobrinhas"
#: ../src/plugins/textreport/KinshipReport.py:371
#: ../src/plugins/textreport/Summary.py:273
msgid "The basic style used for sub-headings."
msgstr "O estilo básico utilizado para sub-títulos."
msgstr "O estilo de base utilizado nos sub-cabeçalhos."
#: ../src/plugins/textreport/MarkerReport.py:82
#, fuzzy, python-format
+3456 -3153
View File
File diff suppressed because it is too large Load Diff
+780 -576
View File
File diff suppressed because it is too large Load Diff
+5555 -3162
View File
File diff suppressed because it is too large Load Diff
+4 -1
View File
@@ -62,7 +62,7 @@ import gtk
#
#-------------------------------------------------------------------------
from gen.ggettext import sgettext as _
from gen.lib import Date
from gen.lib.date import Date, NextYear
import DateHandler
import const
import GrampsDisplay
@@ -150,6 +150,9 @@ class DateEdit(object):
# if text could not be parsed it is assumed invalid
if self.date_obj.get_modifier() == Date.MOD_TEXTONLY:
return ValidationError(_('Bad Date'))
elif (self.date_obj.to_calendar(calendar_name=Date.CAL_GREGORIAN) >>
NextYear()):
return ValidationError(_('Date more than one year in the future'))
def invoke_date_editor(self, obj):
"""
+3 -5
View File
@@ -3,9 +3,7 @@
# but that is not necessarily portable.
# If not using GNU make, then list all .py files individually
pkgdatadir = $(datadir)/@PACKAGE@/DateHandler
pkgdata_PYTHON = \
pkgpython_PYTHON = \
_Date_bg.py\
_Date_ca.py\
_Date_cs.py\
@@ -32,7 +30,7 @@ pkgdata_PYTHON = \
__init__.py
pkgpyexecdir = @pkgpyexecdir@/DateHandler
pkgpythondir = @pkgpythondir@/DateHandler
pkgpythondir = $(datadir)/@PACKAGE@/DateHandler
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
@@ -50,4 +48,4 @@ docs:
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
+14 -12
View File
@@ -96,18 +96,20 @@ def julian_valid(date_tuple):
def swedish_valid(date_tuple):
""" Checks if date_tuple is a valid date in Swedish Calendar """
valid = gregorian_valid(date_tuple)
# not sure how <= and >= works with tuples???
valid_J = julian_valid(date_tuple)
date_tuple = (date_tuple[2], date_tuple[1], date_tuple[0])
if date_tuple <= (1700, 2, 28):
valid = False
if date_tuple == (1700, 2, 29): # leapday 1700 was skipped
valid = False
if date_tuple == (1712, 2, 30): # extra day was inserted 1712
valid = True
if date_tuple >= (1712, 3, 1): # back to julian
valid = False
return valid
# Swedish calendar starts as Julian 1700-03-01 and ends 1712-03-01 as Julian
if date_tuple >= (1700, 2, 29) and date_tuple < (1712, 3, 1):
if date_tuple == (1712, 2, 30): # extra day was inserted 1712, not valid Julian
return True
if valid_J:
if date_tuple == (1700, 2, 29): # leapday 1700 was skipped
return False
return True
else:
return False
else:
return False
def french_valid(date_tuple):
""" Checks if date_tuple is a valid date in French Calendar """
@@ -216,7 +218,7 @@ class DateParser(object):
"januari" : 1, "februari" : 2,
"mars" : 3, "april" : 4,
"maj" : 5, "juni" : 6,
"juli" : 7, "augisti" : 8,
"juli" : 7, "augusti" : 8,
"september" : 9, "oktober" : 10,
"november" : 11, "december" : 12,
}
+126 -10
View File
@@ -48,6 +48,59 @@ from _DateHandler import register_datehandler
#
#-------------------------------------------------------------------------
class DateParserLT(DateParser):
"""
Convert a text string into a Date object. If the date cannot be
converted, the text string is assigned.
"""
month_to_int = DateParser.month_to_int
# Custom months not the same as long months
month_to_int[u"sausis"] = 1
month_to_int[u"vasaris"] = 2
month_to_int[u"kovas"] = 3
month_to_int[u"balandis"] = 4
month_to_int[u"gegužė"] = 5
month_to_int[u"gegužis"] = 5
month_to_int[u"birželis"] = 6
month_to_int[u"liepa"] = 7
month_to_int[u"rugpjūtis"] = 8
month_to_int[u"rugsėjis"] = 9
month_to_int[u"spalis"] = 10
month_to_int[u"lapkritis"] = 11
month_to_int[u"gruodis"] = 12
# For not full months
month_to_int[u"saus"] = 1
month_to_int[u"vasa"] = 2
month_to_int[u"vasar"] = 2
month_to_int[u"bala"] = 4
month_to_int[u"balan"] = 4
month_to_int[u"baland"] = 4
month_to_int[u"gegu"] = 5
month_to_int[u"geguž"] = 5
month_to_int[u"birž"] = 6
month_to_int[u"birže"] = 6
month_to_int[u"biržel"] = 6
month_to_int[u"liep"] = 7
month_to_int[u"rugp"] = 8
month_to_int[u"rugpj"] = 8
month_to_int[u"rugpjū"] = 8
month_to_int[u"rugpjūt"] = 8
month_to_int[u"rugs"] = 9
month_to_int[u"rugsė"] = 9
month_to_int[u"rugsėj"] = 9
month_to_int[u"rugsėjis"] = 9
month_to_int[u"spal"] = 10
month_to_int[u"lapk"] = 11
month_to_int[u"lapkr"] = 11
month_to_int[u"lapkri"] = 11
month_to_int[u"lapkrit"] = 11
month_to_int[u"gru"] = 12
month_to_int[u"gruo"] = 12
month_to_int[u"gruod"] = 12
modifier_to_int = {
u'prieš' : Date.MOD_BEFORE,
@@ -64,11 +117,11 @@ class DateParserLT(DateParser):
u'h' : Date.CAL_HEBREW,
u'islamo' : Date.CAL_ISLAMIC,
u'i' : Date.CAL_ISLAMIC,
u'prancuzų respublikos': Date.CAL_FRENCH,
u'prancūzų respublikos': Date.CAL_FRENCH,
u'r' : Date.CAL_FRENCH,
u'persų' : Date.CAL_PERSIAN,
u'p' : Date.CAL_PERSIAN,
u'swedish' : Date.CAL_SWEDISH,
u'švedų' : Date.CAL_SWEDISH,
u's' : Date.CAL_SWEDISH,
}
@@ -92,6 +145,27 @@ class DateParserLT(DateParser):
('|'.join(_range_1), '|'.join(_range_2)),
re.IGNORECASE)
#------------------------------------------------------------------------
#
# FIXME: oficial long date format (ex, 2011 m. vasario 4 d.)
# is not recognized correctly:
# with self._text2 - day is recognized as year, year - as day
# with self._iso - month not recognized, day recognized,
# year increased by 1, date treated as double
# TODO: in _DateParser.py in _parse_calendar modify groups
#
#------------------------------------------------------------------------
#
# # gregorian and julian
#
# self._text2 = re.compile('(\d+)?\s*?m\.?\s*?%s\.?\s*((\d+)(/\d+)?)?\s*?d?\.?' %
# self._mon_str, re.IGNORECASE)
#
# self._iso = re.compile('(\d+)(/\d+)?\s*?m?\.?\s+?%s\.?\s*((\d+))?\s*?d?\.?' %
# self._mon_str, re.IGNORECASE)
#
#-------------------------------------------------------------------------
#-------------------------------------------------------------------------
#
# Lithuanian displayer
@@ -102,9 +176,13 @@ class DateDisplayLT(DateDisplay):
Lithuanian language date display class.
"""
long_months = ( u"", u"Sausis", u"Vasaris", u"Kovas", u"Balandis", u"Gegužė",
u"Birželis", u"Liepa", u"Rugpjūtis", u"Rugsejis", u"Spalis",
u"Lapkritis", u"Gruodis" )
long_months = ( u"", u"sausio", u"vasario", u"kovo", u"balandžio", u"gegužės",
u"birželio", u"liepos", u"rugpjūčio", u"rugsėjo", u"spalio",
u"lapkričio", u"gruodžio" )
long_months_vardininkas = ( u"", u"sausis", u"vasaris", u"kovas", u"balandis", u"gegužė",
u"birželis", u"liepa", u"rugpjūtis", u"rugsėjis", u"spalis",
u"lapkritis", u"gruodis" )
short_months = ( u"", u"Sau", u"Vas", u"Kov", u"Bal", u"Geg", u"Bir",
u"Lie", u"Rgp", u"Rgs", u"Spa", u"Lap", u"Grd" )
@@ -112,10 +190,10 @@ class DateDisplayLT(DateDisplay):
calendar = (
u"", u"julijaus",
u"hebrajų",
u"prancuzų respublikos",
u"prancūzų respublikos",
u"persų",
u"islamo",
u"swedish"
u"švedų"
)
_mod_str = (u"",
@@ -127,9 +205,47 @@ class DateDisplayLT(DateDisplay):
_qual_str = (u"", u"apytikriai ", u"apskaičiuota ")
formats = (
"YYYY-MM-DD (ISO)", "Skaitmeninis", "Mėnuo Diena, Metai",
"Mėn DD, YYYY", "Diena Mėnuo Metai", "DD Mėn YYYY"
)
"mmmm-MM-DD (ISO)", "mmmm m. mėnesio diena d.", "Mėn diena, metai")
def _display_gregorian(self, date_val):
"""
display gregorian calendar date in different format
"""
year = self._slash_year(date_val[2], date_val[3])
value = self.display_iso(date_val)
if self.format == 0:
return self.display_iso(date_val)
elif self.format == 1:
# mmmm m. mėnesio diena d. (YYYY m. month DD d.)
if date_val[0] == 0:
if date_val[1] == 0:
value = year
else:
value = "%s m. %s" % (year, self.long_months_vardininkas[date_val[1]])
else:
value = "%s m. %s %d d." % (year, self.long_months[date_val[1]],
date_val[0])
elif self.format == 2:
# MON Day, Year
if date_val[0] == 0:
if date_val[1] == 0:
value = year
else:
value = "%s %s" % (self.short_months[date_val[1]], year)
else:
value = "%s %d, %s" % (self.short_months[date_val[1]],
date_val[0], year)
if date_val[2] < 0:
return self._bce_str % value
else:
return value
def display(self, date):
"""
+3 -4
View File
@@ -2,9 +2,9 @@
SUBDIRS = Rules SideBar
pkgdatadir = $(datadir)/@PACKAGE@/Filters
pkgpythondir = $(datadir)/@PACKAGE@/Filters
pkgdata_PYTHON = \
pkgpython_PYTHON = \
_FilterComboBox.py \
_FilterList.py \
_FilterMenu.py \
@@ -17,7 +17,6 @@ pkgdata_PYTHON = \
_SearchFilter.py
pkgpyexecdir = @pkgpyexecdir@/Filters
pkgpythondir = @pkgpythondir@/Filters
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
@@ -26,4 +25,4 @@ GRAMPS_PY_MODPATH = "../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
+4 -4
View File
@@ -1,8 +1,8 @@
# This is the src/Filters/Rules/Event level Makefile for Gramps
pkgdatadir = $(datadir)/@PACKAGE@/Filters/Rules/Event
pkgpythondir = $(datadir)/@PACKAGE@/Filters/Rules/Event
pkgdata_PYTHON = \
pkgpython_PYTHON = \
_ChangedSince.py\
_MatchesFilter.py\
_EventPrivate.py\
@@ -24,7 +24,7 @@ pkgdata_PYTHON = \
__init__.py
pkgpyexecdir = @pkgpyexecdir@/Filters/Rules/Event
pkgpythondir = @pkgpythondir@/Filters/Rules/Event
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
@@ -33,4 +33,4 @@ GRAMPS_PY_MODPATH = "../../../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
+3 -4
View File
@@ -1,8 +1,8 @@
# This is the src/Filters/Rules/Family level Makefile for Gramps
pkgdatadir = $(datadir)/@PACKAGE@/Filters/Rules/Family
pkgpythondir = $(datadir)/@PACKAGE@/Filters/Rules/Family
pkgdata_PYTHON = \
pkgpython_PYTHON = \
_AllFamilies.py\
_ChangedSince.py\
_FamilyPrivate.py\
@@ -38,7 +38,6 @@ pkgdata_PYTHON = \
pkgpyexecdir = @pkgpyexecdir@/Filters/Rules/Family
pkgpythondir = @pkgpythondir@/Filters/Rules/Family
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
@@ -47,4 +46,4 @@ GRAMPS_PY_MODPATH = "../../../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
+3 -4
View File
@@ -2,9 +2,9 @@
SUBDIRS = Person Family Event Place Source MediaObject Repository Note
pkgdatadir = $(datadir)/@PACKAGE@/Filters/Rules
pkgpythondir = $(datadir)/@PACKAGE@/Filters/Rules
pkgdata_PYTHON = \
pkgpython_PYTHON = \
_ChangedSinceBase.py\
_Everything.py\
_HasEventBase.py\
@@ -29,7 +29,6 @@ pkgdata_PYTHON = \
_HasMarkerBase.py
pkgpyexecdir = @pkgpyexecdir@/Filters/Rules
pkgpythondir = @pkgpythondir@/Filters/Rules
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
@@ -38,4 +37,4 @@ GRAMPS_PY_MODPATH = "../../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
+4 -4
View File
@@ -1,8 +1,8 @@
# This is the src/Filters/Rules/MediaObject level Makefile for Gramps
pkgdatadir = $(datadir)/@PACKAGE@/Filters/Rules/MediaObject
pkgpythondir = $(datadir)/@PACKAGE@/Filters/Rules/MediaObject
pkgdata_PYTHON = \
pkgpython_PYTHON = \
_AllMedia.py\
_ChangedSince.py\
_HasIdOf.py\
@@ -17,7 +17,7 @@ pkgdata_PYTHON = \
__init__.py
pkgpyexecdir = @pkgpyexecdir@/Filters/Rules/MediaObject
pkgpythondir = @pkgpythondir@/Filters/Rules/MediaObject
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
@@ -26,4 +26,4 @@ GRAMPS_PY_MODPATH = "../../../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
+3 -4
View File
@@ -1,8 +1,8 @@
# This is the src/Filters/Rules/Note level Makefile for Gramps
pkgdatadir = $(datadir)/@PACKAGE@/Filters/Rules/Note
pkgpythondir = $(datadir)/@PACKAGE@/Filters/Rules/Note
pkgdata_PYTHON = \
pkgpython_PYTHON = \
_AllNotes.py\
_ChangedSince.py\
_HasIdOf.py\
@@ -17,7 +17,6 @@ pkgdata_PYTHON = \
__init__.py
pkgpyexecdir = @pkgpyexecdir@/Filters/Rules/Note
pkgpythondir = @pkgpythondir@/Filters/Rules/Note
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
@@ -26,4 +25,4 @@ GRAMPS_PY_MODPATH = "../../../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
+3 -4
View File
@@ -1,8 +1,8 @@
# This is the src/Filters/Rules/Person level Makefile for Gramps
pkgdatadir = $(datadir)/@PACKAGE@/Filters/Rules/Person
pkgpythondir = $(datadir)/@PACKAGE@/Filters/Rules/Person
pkgdata_PYTHON = \
pkgpython_PYTHON = \
_ChangedSince.py\
_Disconnected.py \
_DeepRelationshipPathBetween.py \
@@ -74,7 +74,6 @@ pkgdata_PYTHON = \
__init__.py
pkgpyexecdir = @pkgpyexecdir@/Filters/Rules/Person
pkgpythondir = @pkgpythondir@/Filters/Rules/Person
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
@@ -83,4 +82,4 @@ GRAMPS_PY_MODPATH = "../../../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
@@ -63,20 +63,28 @@ class HasCommonAncestorWith(Rule):
def add_ancs(self, db, person):
if person.handle not in self.ancestor_cache:
self.ancestor_cache[person.handle] = set()
# We are going to compare ancestors of one person with that of
# another person; if that other person is an ancestor and itself
# has no ancestors is must be included, this is achieved by the
# little trick of making a person his own ancestor.
self.ancestor_cache[person.handle].add(person.handle)
else:
return
for fam_handle in person.get_parent_family_handle_list():
parentless_fam = True
fam = db.get_family_from_handle(fam_handle)
if fam:
for par_handle in (fam.get_father_handle(), fam.get_mother_handle()):
if par_handle:
parentless_fam = False
par = db.get_person_from_handle(par_handle)
if par and par.handle not in self.ancestor_cache:
self.add_ancs(db, par)
if par:
self.ancestor_cache[person.handle].add(par)
self.ancestor_cache[person.handle] |= self.ancestor_cache[par.handle]
if parentless_fam:
self.ancestor_cache[person.handle].add(fam_handle)
def reset(self):
self.ancestor_cache = {}
+3 -4
View File
@@ -1,8 +1,8 @@
# This is the src/Filters/Rules/Place level Makefile for Gramps
pkgdatadir = $(datadir)/@PACKAGE@/Filters/Rules/Place
pkgpythondir = $(datadir)/@PACKAGE@/Filters/Rules/Place
pkgdata_PYTHON = \
pkgpython_PYTHON = \
_AllPlaces.py\
_ChangedSince.py\
_HasIdOf.py\
@@ -21,7 +21,6 @@ pkgdata_PYTHON = \
__init__.py
pkgpyexecdir = @pkgpyexecdir@/Filters/Rules/Place
pkgpythondir = @pkgpythondir@/Filters/Rules/Place
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
@@ -30,4 +29,4 @@ GRAMPS_PY_MODPATH = "../../../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
+3 -4
View File
@@ -1,8 +1,8 @@
# This is the src/Filters/Rules/Media level Makefile for Gramps
pkgdatadir = $(datadir)/@PACKAGE@/Filters/Rules/Repository
pkgpythondir = $(datadir)/@PACKAGE@/Filters/Rules/Repository
pkgdata_PYTHON = \
pkgpython_PYTHON = \
_AllRepos.py\
_ChangedSince.py\
_HasIdOf.py\
@@ -16,7 +16,6 @@ pkgdata_PYTHON = \
__init__.py
pkgpyexecdir = @pkgpyexecdir@/Filters/Rules/Repository
pkgpythondir = @pkgpythondir@/Filters/Rules/Repository
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
@@ -25,4 +24,4 @@ GRAMPS_PY_MODPATH = "../../../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
+3 -4
View File
@@ -1,8 +1,8 @@
# This is the src/Filters/Rules/Source level Makefile for Gramps
pkgdatadir = $(datadir)/@PACKAGE@/Filters/Rules/Source
pkgpythondir = $(datadir)/@PACKAGE@/Filters/Rules/Source
pkgdata_PYTHON = \
pkgpython_PYTHON = \
_ChangedSince.py\
_MatchesFilter.py\
_SourcePrivate.py\
@@ -19,7 +19,6 @@ pkgdata_PYTHON = \
__init__.py
pkgpyexecdir = @pkgpyexecdir@/Filters/Rules/Source
pkgpythondir = @pkgpythondir@/Filters/Rules/Source
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
@@ -28,4 +27,4 @@ GRAMPS_PY_MODPATH = "../../../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
+3 -4
View File
@@ -1,8 +1,8 @@
# This is the src/Filters/SideBar level Makefile for Gramps
pkgdatadir = $(datadir)/@PACKAGE@/Filters/SideBar
pkgpythondir = $(datadir)/@PACKAGE@/Filters/SideBar
pkgdata_PYTHON = \
pkgpython_PYTHON = \
_EventSidebarFilter.py \
_FamilySidebarFilter.py \
__init__.py \
@@ -15,7 +15,6 @@ pkgdata_PYTHON = \
_NoteSidebarFilter.py
pkgpyexecdir = @pkgpyexecdir@/Filters/SideBar
pkgpythondir = @pkgpythondir@/Filters/SideBar
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
@@ -24,4 +23,4 @@ GRAMPS_PY_MODPATH = "../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
+3 -5
View File
@@ -3,16 +3,14 @@
# but that is not necessarily portable.
# If not using GNU make, then list all .py files individually
pkgdatadir = $(datadir)/@PACKAGE@/GrampsLocale
pkgpythondir = $(datadir)/@PACKAGE@/GrampsLocale
pkgdata_PYTHON = \
pkgpython_PYTHON = \
_GrampsLocale.py\
__init__.py
pkgpyexecdir = @pkgpyexecdir@/GrampsLocale
pkgpythondir = @pkgpythondir@/GrampsLocale
dist_pkgdata_DATA =
@@ -23,4 +21,4 @@ GRAMPS_PY_MODPATH = "../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
+3 -5
View File
@@ -3,9 +3,7 @@
# but that is not necessarily portable.
# If not using GNU make, then list all .py files individually
pkgdatadir = $(datadir)/@PACKAGE@/GrampsLogger
pkgdata_PYTHON = \
pkgpython_PYTHON = \
_ErrorReportAssistant.py\
_ErrorView.py\
_GtkHandler.py\
@@ -13,7 +11,7 @@ pkgdata_PYTHON = \
_RotateHandler.py
pkgpyexecdir = @pkgpyexecdir@/GrampsLogger
pkgpythondir = @pkgpythondir@/GrampsLogger
pkgpythondir = $(datadir)/@PACKAGE@/GrampsLogger
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
@@ -22,4 +20,4 @@ GRAMPS_PY_MODPATH = "../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
+3 -4
View File
@@ -3,16 +3,15 @@
# but that is not necessarily portable.
# If not using GNU make, then list all .py files individually
pkgdatadir = $(datadir)/@PACKAGE@/Merge
pkgpythondir = $(datadir)/@PACKAGE@/Merge
pkgdata_PYTHON = \
pkgpython_PYTHON = \
__init__.py \
_MergePerson.py \
_MergePlace.py \
_MergeSource.py
pkgpyexecdir = @pkgpyexecdir@/Merge
pkgpythondir = @pkgpythondir@/Merge
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
@@ -21,4 +20,4 @@ GRAMPS_PY_MODPATH = "../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
+3 -3
View File
@@ -3,9 +3,9 @@
# but that is not necessarily portable.
# If not using GNU make, then list all .py files individually
pkgdatadir = $(datadir)/@PACKAGE@/PluginUtils
pkgpythondir = $(datadir)/@PACKAGE@/PluginUtils
pkgdata_PYTHON = \
pkgpython_PYTHON = \
__init__.py\
_GuiOptions.py\
_Options.py\
@@ -23,4 +23,4 @@ GRAMPS_PY_MODPATH = "../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
+5 -1
View File
@@ -537,7 +537,11 @@ class PluginStatus(ManagedWindow.ManagedWindow):
except:
callback(_("Unable to open '%s'") % path)
return
buffer = cStringIO.StringIO(fp.read())
try:
buffer = cStringIO.StringIO(fp.read())
except:
callback(_("Error in reading '%s'") % path)
return
fp.close()
# file_obj is either Zipfile or TarFile
if path.endswith(".zip") or path.endswith(".ZIP"):
+1 -1
View File
@@ -259,7 +259,7 @@ def cli_tool(dbstate, name,category,tool_class, options_class, options_str_dict)
# run tool
try:
tool_class(dbstate,None, options_class, name,None)
tool_class(dbstate, None, clt.option_class, name, None)
except:
log.error("Failed to start tool.", exc_info=True)
+3 -3
View File
@@ -1,8 +1,8 @@
# This is the src/Report level Makefile for Gramps
pkgdatadir = $(datadir)/@PACKAGE@/ReportBase
pkgpythondir = $(datadir)/@PACKAGE@/ReportBase
pkgdata_PYTHON = \
pkgpython_PYTHON = \
__init__.py\
_Bibliography.py\
_CommandLineReport.py\
@@ -32,4 +32,4 @@ GRAMPS_PY_MODPATH = "../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
+1 -1
View File
@@ -223,7 +223,7 @@ class Bibliography(object):
if ( self.mode & self.MODE_DATE ) == self.MODE_DATE:
date1 = source_ref1.get_date_object()
date2 = source_ref2.get_date_object()
if date1.is_equal(date2):
if not date1.is_equal(date2):
return False
if ( self.mode & self.MODE_CONF ) == self.MODE_CONF:
conf1 = source_ref1.get_confidence_level()
+11 -1
View File
@@ -129,7 +129,17 @@ def write_endnotes(bibliography, database, doc, printnotes=False):
first = True
reflines = ""
for key, ref in ref_list:
txt = "%s: %s" % (key, ref.get_page())
datepresent = False
date = ref.get_date_object()
if date is not None and not date.is_empty():
datepresent = True
if datepresent:
if ref.get_page():
txt = "%s: %s - %s" % (key, ref.get_page(), str(date))
else:
txt = "%s: %s" % (key, str(date))
else:
txt = "%s: %s" % (key, ref.get_page())
if first:
reflines += txt
first = False
+3 -4
View File
@@ -1,15 +1,14 @@
# This is the src/Report level Makefile for Gramps
pkgdatadir = $(datadir)/@PACKAGE@/Simple
pkgpythondir = $(datadir)/@PACKAGE@/Simple
pkgdata_PYTHON = \
pkgpython_PYTHON = \
_SimpleDoc.py\
_SimpleAccess.py\
_SimpleTable.py\
__init__.py
pkgpyexecdir = @pkgpyexecdir@/Simple
pkgpythondir = @pkgpythondir@/Simple
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
@@ -18,4 +17,4 @@ GRAMPS_PY_MODPATH = "../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
+1 -2
View File
@@ -252,8 +252,7 @@ def run_thumbnailer(mime_type, src_file, dest_file, size=const.THUMBSCALE):
'%o' : dest_file,
}
cmdlist = [ sublist.get(x, x) for x in cmd.split() ]
os.spawnvpe(os.P_WAIT, cmdlist[0], cmdlist, os.environ)
return True
return os.spawnvpe(os.P_WAIT, cmdlist[0], cmdlist, os.environ) == 0
return False
#-------------------------------------------------------------------------
+4 -4
View File
@@ -665,7 +665,7 @@ class ProbablyAlive(object):
val = d.get_year() - years
d.set_year(val)
return (d, d.copy_offset_ymd(self.MAX_AGE_PROB_ALIVE),
_("descendent birth date"),
_("descendant birth date"),
child)
child_death_ref = child.get_death_ref()
if child_death_ref:
@@ -674,7 +674,7 @@ class ProbablyAlive(object):
if dobj.get_start_date() != gen.lib.Date.EMPTY:
return (dobj.copy_offset_ymd(- self.AVG_GENERATION_GAP),
dobj.copy_offset_ymd(- self.AVG_GENERATION_GAP + self.MAX_AGE_PROB_ALIVE),
_("descendent death date"),
_("descendant death date"),
child)
date1, date2, explain, other = descendants_too_old (child, years + self.AVG_GENERATION_GAP)
if date1 and date2:
@@ -690,7 +690,7 @@ class ProbablyAlive(object):
val = d.get_year() - years
d.set_year(val)
return (d, d.copy_offset_ymd(self.MAX_AGE_PROB_ALIVE),
_("descendent birth-related date"),
_("descendant birth-related date"),
child)
elif ev and ev.type.is_death_fallback():
@@ -698,7 +698,7 @@ class ProbablyAlive(object):
if dobj.get_start_date() != gen.lib.Date.EMPTY:
return (dobj.copy_offset_ymd(- self.AVG_GENERATION_GAP),
dobj.copy_offset_ymd(- self.AVG_GENERATION_GAP + self.MAX_AGE_PROB_ALIVE),
_("descendent death-related date"),
_("descendant death-related date"),
child)
return (None, None, "", None)
+5 -5
View File
@@ -3,9 +3,9 @@
# but that is not necessarily portable.
# If not using GNU make, then list all .py files individually
pkgdatadir = $(datadir)/@PACKAGE@/cli
pkgpythondir = $(datadir)/@PACKAGE@/cli
pkgdata_PYTHON = \
pkgpython_PYTHON = \
__init__.py \
arghandler.py \
argparser.py \
@@ -13,7 +13,7 @@ pkgdata_PYTHON = \
grampscli.py
pkgpyexecdir = @pkgpyexecdir@/cli
pkgpythondir = @pkgpythondir@/cli
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
@@ -22,7 +22,7 @@ GRAMPS_PY_MODPATH = "../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
pylint:
PYTHONPATH=$(GRAMPS_PY_MODPATH) pylint $(pkgdata_PYTHON) > pylint.out
PYTHONPATH=$(GRAMPS_PY_MODPATH) pylint $(pkgpython_PYTHON) > pylint.out
+2 -2
View File
@@ -42,10 +42,10 @@ from gettext import gettext as _
#-------------------------------------------------------------------------
PROGRAM_NAME = "Gramps"
if "@VERSIONSTRING@" == "@" + "VERSIONSTRING" + "@":
VERSION = "3.2.5"
VERSION = "3.2.7"
else:
VERSION = "@VERSIONSTRING@"
VERSION_TUPLE = (3, 2, 5)
VERSION_TUPLE = (3, 2, 7)
#-------------------------------------------------------------------------
#
+38 -37
View File
@@ -83,6 +83,7 @@ img {
margin:0 auto;
padding: 1cm 0px .5em 0px;
background:url(../images/Web_Mainz_Mid.png) #FFF2C6 repeat;
overflow: hidden;
}
.content div.snapshot {
margin:0;
@@ -132,7 +133,7 @@ h4 {
font-size:1.4em;
font-weight:normal;
font-style:italic;
color:#767D25;
color:#000;
text-align:center;
margin:0;
padding:.5em 0 .2em 0;
@@ -608,10 +609,12 @@ table.individuallist tbody tr td.ColumnName a {
#streetaddress {
display:block;
}
#locality, .locality {
display: block;
}
#city:after {
content:",";
}
#country { }
#email {
display:block;
}
@@ -625,15 +628,12 @@ table.individuallist tbody tr td.ColumnName a {
/* Download
----------------------------------------------------- */
#Download {
padding:1cm;
height:396px;
width: 965px;
float: center;
}
table.download {
border:solid 2px #000;
width:100%;
}
table.download img {
float:center;
width:97%;
}
table.download thead tr th {
text-align:center;
@@ -912,51 +912,52 @@ div#sourcerefs ol li ol {
/* Footer
----------------------------------------------------- */
#footer {
clear:both;
width:965px;
font-size:12px;
line-height:130%;
font-family:sans-serif;
margin:0 auto;
padding:15px 0 0 0;
background:url(../images/Web_Mainz_MidLight.png) #FFF2C6;
border-top:dashed 1px #7D5925;
overflow: hidden;
clear: both;
width: 965px;
font-size: 12px;
line-height: 130%;
font-family: sans-serif;
margin: 0 auto;
padding: 15px 0 0 0;
background: url(../images/Web_Mainz_MidLight.png) #FFF2C6;
border-top: dashed 1px #7D5925;
}
#footer a, #footer a:visited {
text-decoration:none;
text-decoration: none;
}
#footer a:hover {
text-decoration:underline;
text-decoration: underline;
}
#footer img {
border:0;
margin:0 auto;
vertical-align:middle;
border: 0;
margin: 0 auto;
vertical-align: middle;
}
#footer p#createdate {
float:left;
width:40%;
text-align:left;
margin-left:10px;
float: left;
width: 45%;
text-align: left;
margin-left: 10px;
}
#footer p#copyright {
float:right;
width:40%;
text-align:right;
margin-right:10px;
float: right;
width: 40%;
text-align: right;
margin-right: 10px;
}
#footer p#copyright img {
margin-right:10px;
margin-right: 10px;
}
#user_footer {
width:70%;
float:left;
margin:1em;
width: 70%;
float: left;
margin: 1em;
}
#user_footer p {
font:normal 1em/1.2em serif;
margin:0;
padding:0;
font: normal 1em/1.2em serif;
margin: 0;
padding: 0;
}
/* Calendar Styles
+33 -66
View File
@@ -204,90 +204,57 @@ p#user_header {
background-color:#542;
}
/* Navigation
/* Alphabet and Navigation Menus
----------------------------------------------------- */
div#navigation, div#subnavigation {
width: 100%;
margin: 0;
padding: 0;
}
div#navigation ul, div#subnavigation ul {
list-style:none;
min-width: 900px;
height: 40px;
margin:0;
padding: 0px 0px 0px 16px;
border-bottom: solid 2px #5D835F;
}
div#navigation ul li, div#subnavigation ul li {
float:left;
}
div#navigation ul li a, div#subnavigation ul li a {
display: block;
padding: 12px 16px 14px 1px;
float:left;
font: .8em bold italic small-caps verdana, serif;
color: #000;
text-decoration:none;
margin:0;
}
div#navigation ul li a:hover, div#subnavigation ul li a:hover {
background-color: #C1B398;
}
#navigation ul li.CurrentSection a, #subnavigation ul li.CurrentSection a {
font-size:19px;
margin-top:-6px;
padding-top:11px;
padding-bottom:8px;
border-right:solid 1px #542;
border-left:solid 1px #542;
border-bottom:solid 1px #FFF;
background-color:#FFF;
}
#navigation ul li.CurrentSection a:hover {
background-color:#FFF;
}
#subnavigation ul li.CurrentSection a {
border-width:0 0 1px 0;
}
/* Alphabet Navigation
----------------------------------------------------- */
div#alphabet {
div#alphabet, div#navigation, div#subnavigation {
width: 100%;
margin: 0;
background-color: #A97;
}
div#alphabet ul {
list-style:none;
min-width:770px;
height:24px;
margin:0;
div#alphabet ul, div#navigation ul, div#subnavigation ul {
list-style: none;
min-width: 770px;
height: 24px;
margin: 0;
padding: 0px 0px 0px 16px;
border-width: 2px 0px 4px 0px;
border-style: solid;
border-color: #000;
}
div#alphabet ul li:after {
content:" |";
div#alphabet ul li:after, div#navigation ul li:after, div#subnavigation ul li:after {
content: " |";
}
div#alphabet ul li {
margin:0;
float:left;
div#alphabet ul li, div#navigation ul li, div#subnavigation ul li {
margin: 0;
float: left;
}
div#alphabet ul li a {
display:block;
div#alphabet ul li a, div#navigation ul li a, div#subnavigation ul li a {
display: block;
padding: 4px 8px 4px 8px;
float:left;
font:bold 16px/100% sans;
margin:0;
text-decoration:none;
float: left;
font: bold 16px/100% sans;
margin: 0;
text-decoration: none;
color: #000;
}
div#alphabet ul li a:hover {
div#alphabet ul li a:hover, div#navigation ul li a:hover, div#subnavigation ul li a:hover {
background-color: #000;
color: #FFF;
}
div#navigation ul li.CurrentSection a, div#subnavigation ul li.CurrentSection a {
padding: 4px 2px 3px 2px;
border-right: solid 1px #542;
border-left: solid 1px #542;
border-bottom: solid 2px #5D835F;
background-color: #F2F6EE;
}
div#navigation ul li.CurrentSection a:hover {
background-color: #5D835F;
color: #FFF;
}
div#subnavigation ul li.CurrentSection a {
border-width: 0 0 1px 0;
}
/* Main Table
----------------------------------------------------- */
+3 -4
View File
@@ -12,15 +12,14 @@ SUBDIRS = \
proxy \
utils
pkgdatadir = $(datadir)/@PACKAGE@/gen
pkgpythondir = $(datadir)/@PACKAGE@/gen
pkgdata_PYTHON = \
pkgpython_PYTHON = \
__init__.py \
ggettext.py \
updatecallback.py
pkgpyexecdir = @pkgpyexecdir@/gen
pkgpythondir = @pkgpythondir@/gen
# Clean up all the byte-compiled files
@@ -30,4 +29,4 @@ GRAMPS_PY_MODPATH = "../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
+3 -4
View File
@@ -3,9 +3,9 @@
# but that is not necessarily portable.
# If not using GNU make, then list all .py files individually
pkgdatadir = $(datadir)/@PACKAGE@/gen/db
pkgpythondir = $(datadir)/@PACKAGE@/gen/db
pkgdata_PYTHON = \
pkgpython_PYTHON = \
__init__.py \
backup.py \
base.py \
@@ -20,7 +20,6 @@ pkgdata_PYTHON = \
write.py
pkgpyexecdir = @pkgpyexecdir@/gen/db
pkgpythondir = @pkgpythondir@/gen/db
# Clean up all the byte-compiled files
@@ -30,4 +29,4 @@ GRAMPS_PY_MODPATH = "../../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
+2 -2
View File
@@ -59,8 +59,8 @@ DBMODE_W = "w" # Full Reaw/Write access
DBPAGE = 16384 # Size of the pages used to hold items in the database
DBMODE = 0666 # Unix mode for database creation
DBCACHE = 0x4000000 # Size of the shared memory buffer pool
DBLOCKS = 25000 # Maximum number of locks supported
DBOBJECTS = 25000 # Maximum number of simultaneously locked objects
DBLOCKS = 100000 # Maximum number of locks supported
DBOBJECTS = 100000 # Maximum number of simultaneously locked objects
DBUNDO = 1000 # Maximum size of undo buffer
from bsddb.db import DB_CREATE, DB_AUTO_COMMIT, DB_DUP, DB_DUPSORT, DB_RDONLY
+23
View File
@@ -67,6 +67,29 @@ class DbVersionError(Exception):
"Gramps.\nPlease upgrade to the corresponding version or use "
"XML for porting data between different database versions.")
class DbEnvironmentError(Exception):
"""
Error used to report that the database 'environment' could not be opened.
Most likely, the database was created by a different version of the underlying database engine.
"""
def __init__(self, msg):
Exception.__init__(self)
self.msg = msg
def __str__(self):
return (_("Gramps has detected an problem in opening the 'environment' "
"of the underlying Berkeley database. The most likely cause "
"is that the database was created with an old version "
"of the Berkeley database, and you are now using a new version. "
"It is quite likely that your database has not been "
"changed by Gramps.\nIf possible, you could revert to your "
"old version of Gramps and its support software; export "
"your database to XML; close the database; then upgrade again "
"to this version "
"and import the XML file. Alternatively, it may be possible "
"to upgrade your database.")
+ '\n\n' + str(self.msg))
class DbUpgradeRequiredError(Exception):
"""
Error used to report that a database needs to be upgraded before it can be
+9 -6
View File
@@ -419,13 +419,12 @@ class DbBsddbRead(DbReadBase, Callback):
self.emit('repository-rebuild')
self.emit('note-rebuild')
@staticmethod
def __find_next_gramps_id(prefix, map_index, trans):
def __find_next_gramps_id(self, prefix, map_index, trans):
"""
Helper function for find_next_<object>_gramps_id methods
"""
index = prefix % map_index
while trans.has_key(str(index)):
while trans.get(str(index), txn=self.txn) is not None:
map_index += 1
index = prefix % map_index
map_index += 1
@@ -606,8 +605,8 @@ class DbBsddbRead(DbReadBase, Callback):
def __get_obj_from_gramps_id(self, val, tbl, class_, prim_tbl):
try:
if tbl.has_key(str(val)):
data = tbl.get(str(val), txn=self.txn)
data = tbl.get(str(val), txn=self.txn)
if data is not None:
obj = class_()
### FIXME: this is a dirty hack that works without no
### sensible explanation. For some reason, for a readonly
@@ -713,6 +712,8 @@ class DbBsddbRead(DbReadBase, Callback):
"""
Return if a key exists in the name_group table.
"""
# The use of has_key seems allright because there is no write lock
# on the name_group table when this is called.
return self.name_group.has_key(str(name))
def get_number_of_records(self, table):
@@ -962,7 +963,7 @@ class DbBsddbRead(DbReadBase, Callback):
table = key2table[obj_key]
#return str(gramps_id) in table
return table.has_key(str(gramps_id))
return table.get(str(gramps_id), txn=self.txn) is not None
def find_initial_person(self):
person = self.get_default_person()
@@ -979,6 +980,8 @@ class DbBsddbRead(DbReadBase, Callback):
str_ = val % 1
except TypeError: # missing conversion specifier
prefix_var = val + "%d"
except ValueError: # incomplete format
prefix_var = default+"%04d"
else:
prefix_var = val # OK as given
else:
+1 -1
View File
@@ -248,7 +248,7 @@ class DbUndo(object):
if db.undo_callback:
if self.undo_available():
db.undo_callback(_("_Undo %s")
% transaction.get_description())
% self.translist[self.undoindex].get_description())
else:
db.undo_callback(None)
+30 -10
View File
@@ -51,8 +51,8 @@ from sys import maxint
from gen.lib import (GenderStats, Person, Family, Event, Place, Source,
MediaObject, Repository, Note)
from gen.db import (DbBsddbRead, DbWriteBase, BSDDBTxn,
DbTxn, GrampsCursor,DbVersionError,
DbUpgradeRequiredError,
DbTxn, GrampsCursor, DbVersionError,
DbUpgradeRequiredError, DbEnvironmentError,
DbUndoBSDDB as DbUndo)
from gen.db.dbconst import *
from gen.utils.callback import Callback
@@ -393,18 +393,32 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
self.set_auto_remove()
# Set not to flush to disk synchronous, this greatly speeds up
# database changes, but comes at the cause of loss of durability, so
# power loss might cause a need to run db recovery, see BSDDB manual
## NOTE: due to pre 4.8 bsddb bug it is needed to set this flag before
## open of env, #16492 - http://download.oracle.com/docs/cd/E17076_02/html/installation/changelog_4_8.html
self.env.set_flags(db.DB_TXN_WRITE_NOSYNC, 1)
# The DB_PRIVATE flag must go if we ever move to multi-user setup
env_flags = db.DB_CREATE | db.DB_PRIVATE |\
db.DB_INIT_MPOOL | db.DB_INIT_LOCK |\
db.DB_INIT_LOG | db.DB_INIT_TXN | db.DB_THREAD
# As opposed to before, we always try recovery on databases
env_flags |= db.DB_RECOVER
# Environment name is now based on the filename
env_name = name
self.env.open(env_name, env_flags)
try:
self.env.open(env_name, env_flags)
except Exception, msg:
try:
self.__close_early()
except:
pass
raise DbEnvironmentError(msg)
self.env.txn_checkpoint()
if callback:
@@ -1002,6 +1016,11 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
return
self.env.txn_checkpoint()
lockstats = self.env.lock_stat()
_LOG.debug("lock occupancy: %d%%, locked object occupancy: %d%%" % (
round(lockstats['maxnlocks']*100/lockstats['maxlocks']),
round(lockstats['maxnobjects']*100/lockstats['maxobjects'])))
self.__close_metadata()
self.name_group.close()
self.surnames.close()
@@ -1340,7 +1359,8 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
except:
pass
finally:
cursor.close()
if 'cursor' in locals():
cursor.close()
def commit_base(self, obj, data_map, key, transaction, change_time):
"""
@@ -1581,8 +1601,8 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
self.undodb.clear()
self.env.txn_checkpoint()
if db.version() < (4, 7):
self.env.set_flags(db.DB_TXN_NOSYNC, 1) # async txn
#if db.version() < (4, 7):
# self.env.set_flags(db.DB_TXN_NOSYNC, 1) # async txn
if self.secondary_connected and not no_magic:
# Disconnect unneeded secondary indices
@@ -1621,8 +1641,8 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
"""
if transaction.batch:
self.env.txn_checkpoint()
if db.version() < (4, 7):
self.env.set_flags(db.DB_TXN_NOSYNC, 0) # sync txn
#if db.version() < (4, 7):
# self.env.set_flags(db.DB_TXN_NOSYNC, 0) # sync txn
if not transaction.no_magic:
# create new secondary indices to replace the ones removed
@@ -1671,7 +1691,7 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
import upgrade
upgrade.gramps_upgrade_14(self)
print "Upgrade time:", int(time.time()-t), "seconds"
_LOG.debug("Upgrade time: %d seconds" % int(time.time()-t))
def set_auto_remove(self):
"""
+3 -5
View File
@@ -3,15 +3,13 @@
# but that is not necessarily portable.
# If not using GNU make, then list all .py files individually
pkgdatadir = $(datadir)/@PACKAGE@/gen/display
pkgpythondir = $(datadir)/@PACKAGE@/gen/display
pkgdata_PYTHON = \
pkgpython_PYTHON = \
name.py\
__init__.py
pkgpyexecdir = @pkgpyexecdir@/gen/display
pkgpythondir = @pkgpythondir@/gen/display
dist_pkgdata_DATA =
@@ -22,4 +20,4 @@ GRAMPS_PY_MODPATH = "../../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
+4 -5
View File
@@ -3,9 +3,9 @@
# but that is not necessarily portable.
# If not using GNU make, then list all .py files individually
pkgdatadir = $(datadir)/@PACKAGE@/gen/lib
pkgpythondir = $(datadir)/@PACKAGE@/gen/lib
pkgdata_PYTHON = \
pkgpython_PYTHON = \
addressbase.py \
address.py \
attrbase.py \
@@ -66,7 +66,6 @@ pkgdata_PYTHON = \
witness.py
pkgpyexecdir = @pkgpyexecdir@/gen/lib
pkgpythondir = @pkgpythondir@/gen/lib
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
@@ -75,7 +74,7 @@ GRAMPS_PY_MODPATH = "../../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
pylint:
pylint --disable-msg=W0403,C0103 $(pkgdata_PYTHON)
pylint --disable-msg=W0403,C0103 $(pkgpython_PYTHON)
+1 -1
View File
@@ -65,7 +65,7 @@ class Attribute(SecondaryObject, PrivacyBase, SourceBase, NoteBase):
NoteBase.__init__(self, source)
if source:
self.type = source.type
self.type = AttributeType(source.type)
self.value = source.value
else:
self.type = AttributeType()
+20 -5
View File
@@ -550,11 +550,26 @@ def islamic_ymd(sdn):
return (year, month, day)
def swedish_sdn(year, month, day):
"""Convert a Swedish (almost Julian) date to an SDN number."""
return julian_sdn(year, month, day)-1
"""Convert a Swedish date to an SDN number."""
datum = (year, month, day)
# Swedish Calendar
if (1700,3,1) <= datum <= (1712,2,30):
return julian_sdn(year, month, day) -1
# Gregorian Calendar (1753-03-01)
elif (1753, 3, 1) <= datum:
return gregorian_sdn(year, month, day)
else:
return julian_sdn(year, month, day)
def swedish_ymd(sdn):
"""Convert an SDN number to a Swedish (almost Julian) calendar date."""
"""Convert an SDN number to a Swedish calendar date."""
if sdn == 2346425:
return (1712,2,30)
return julian_ymd(sdn+1)
return (1712,2,30)
# Swedish Calendar
elif 2342042 <= sdn < 2346425:
return julian_ymd(sdn+1)
# Gregorian Calendar (1753-03-01)
elif 2361390 <= sdn:
return gregorian_ymd(sdn)
else:
return julian_ymd(sdn)
+2 -2
View File
@@ -55,8 +55,8 @@ class ChildRef(SecondaryObject, PrivacyBase, SourceBase, NoteBase, RefBase):
NoteBase.__init__(self, source)
RefBase.__init__(self, source)
if source:
self.frel = source.frel
self.mrel = source.mrel
self.frel = ChildRefType(source.frel)
self.mrel = ChildRefType(source.mrel)
else:
self.frel = ChildRefType()
self.mrel = ChildRefType()
+10
View File
@@ -1702,6 +1702,16 @@ def Today():
current_date.set_yr_mon_day(*time.localtime(time.time())[0:3])
return current_date
def NextYear():
"""
Returns a Date object set to next year
"""
import time
next_year = Date()
thisyear = time.localtime(time.time())
next_year.set_yr_mon_day(thisyear[0]+1, thisyear[1], thisyear[2])
return next_year
#-------------------------------------------------------------------------
#
# Date Functions
+1 -1
View File
@@ -76,7 +76,7 @@ class Event(SourceBase, NoteBase, MediaBase, AttributeBase,
if source:
self.__description = source.__description
self.__type = source.__type
self.__type = EventType(source.__type)
else:
self.__description = ""
self.__type = EventType()
+1 -1
View File
@@ -58,7 +58,7 @@ class EventRef(SecondaryObject, PrivacyBase, NoteBase, AttributeBase, RefBase):
AttributeBase.__init__(self, source)
RefBase.__init__(self, source)
if source:
self.__role = source.__role
self.__role = EventRoleType(source.__role)
else:
self.__role = EventRoleType()
+49 -5
View File
@@ -189,9 +189,52 @@ class EventType(GrampsType):
]
_ABBREVIATIONS = {
BIRTH: _("birth abbreviation|b"),
DEATH: _("death abbreviation|d"),
MARRIAGE: _("marriage abbreviation|m"),
BIRTH: _("birth abbreviation|b."),
DEATH: _("death abbreviation|d."),
MARRIAGE: _("marriage abbreviation|m."),
UNKNOWN: _("Unknown abbreviation|unkn."),
CUSTOM: _("Custom abbreviation|cust."),
ADOPT: _("Adopted abbreviation|adop."),
ADULT_CHRISTEN : _("Adult Christening abbreviation|a.chr."),
BAPTISM: _("Baptism abbreviation|bap."),
BAR_MITZVAH : _("Bar Mitzvah abbreviation|bar."),
BAS_MITZVAH : _("Bas Mitzvah abbreviation|bas."),
BLESS: _("Blessing abbreviation|bles."),
BURIAL: _("Burial abbreviation|bur."),
CAUSE_DEATH : _("Cause Of Death abbreviation|d.cau."),
CENSUS: _("Census abbreviation|cens."),
CHRISTEN: _("Christening abbreviation|chr."),
CONFIRMATION: _("Confirmation abbreviation|conf."),
CREMATION: _("Cremation abbreviation|crem."),
DEGREE: _("Degree abbreviation|deg."),
EDUCATION: _("Education abbreviation|edu."),
ELECTED: _("Elected abbreviation|elec."),
EMIGRATION: _("Emigration abbreviation|em."),
FIRST_COMMUN: _("First Communion abbreviation|f.comm."),
IMMIGRATION: _("Immigration abbreviation|im."),
GRADUATION: _("Graduation abbreviation|grad."),
MED_INFO: _("Medical Information abbreviation|medinf."),
MILITARY_SERV: _("Military Service abbreviation|milser."),
NATURALIZATION: _("Naturalization abbreviation|nat."),
NOB_TITLE: _("Nobility Title abbreviation|nob."),
NUM_MARRIAGES: _("Number of Marriages abbreviation|n.o.mar."),
OCCUPATION: _("Occupation abbreviation|occ."),
ORDINATION: _("Ordination abbreviation|ord."),
PROBATE: _("Probate abbreviation|prob."),
PROPERTY: _("Property abbreviation|prop."),
RELIGION: _("Religion abbreviation|rel."),
RESIDENCE: _("Residence abbreviation|res."),
RETIREMENT: _("Retirement abbreviation|ret."),
WILL: _("Will abbreviation|will."),
MARR_SETTL: _("Marriage Settlement abbreviation|m.set."),
MARR_LIC: _("Marriage License abbreviation|m.lic."),
MARR_CONTR: _("Marriage Contract abbreviation|m.con."),
MARR_BANNS: _("Marriage Banns abbreviation|m.ban."),
MARR_ALT: _("Alternate Marriage abbreviation|alt.mar."),
ENGAGEMENT: _("Engagement abbreviation|engd."),
DIVORCE: _("Divorce abbreviation|div."),
DIV_FILING: _("Divorce Filing abbreviation|div.f."),
ANNULMENT: _("Annulment abbreviation|annul.")
}
def __init__(self, value=None):
@@ -243,10 +286,11 @@ class EventType(GrampsType):
"""
Returns the abbreviation for this event. Uses the explicitly
given abbreviations, or first letter of each word, or the first
three letters. Appends a period after the abbreviation.
three letters. Appends a period after the abbreviation,
but not if string is in _ABBREVIATIONS.
"""
if self.value in self._ABBREVIATIONS:
return self._ABBREVIATIONS[self.value] + "."
return self._ABBREVIATIONS[self.value]
else:
abbrev = str(self)
if " " in abbrev:
+2 -1
View File
@@ -78,7 +78,8 @@ class LocationBase(object):
:returns: Returns the list of all textual attributes of the object.
:rtype: list
"""
return [self.city, self.state, self.country, self.postal, self.phone]
return [self.street, self.city, self.county, self.state, self.country,
self.postal, self.phone]
def set_street(self, val):
"""Set the street portion of the Location."""
+1 -1
View File
@@ -81,7 +81,7 @@ class Name(SecondaryObject, PrivacyBase, SourceBase, NoteBase, DateBase):
self.surname = source.surname
self.suffix = source.suffix
self.title = source.title
self.type = source.type
self.type = NameType(source.type)
self.prefix = source.prefix
self.patronymic = source.patronymic
self.group_as = source.group_as
+2 -2
View File
@@ -133,10 +133,10 @@ class Note(BasicPrimaryObject):
"""Return the text string associated with the note.
:returns: The *clear* text of the note contents.
:rtype: str
:rtype: unicode
"""
return str(self.text)
return unicode(self.text)
def set_styledtext(self, text):
"""Set the text associated with the note to the passed string.
+1 -1
View File
@@ -51,7 +51,7 @@ class RepoRef(SecondaryObject, PrivacyBase, NoteBase, RefBase):
RefBase.__init__(self, source)
if source:
self.call_number = source.call_number
self.media_type = source.media_type
self.media_type = SourceMediaType(source.media_type)
else:
self.call_number = ""
self.media_type = SourceMediaType()
+1 -1
View File
@@ -59,7 +59,7 @@ class Url(SecondaryObject, PrivacyBase):
if source:
self.path = source.path
self.desc = source.desc
self.type = source.type
self.type = UrlType(source.type)
else:
self.path = ""
self.desc = ""
+3 -4
View File
@@ -3,16 +3,15 @@
# but that is not necessarily portable.
# If not using GNU make, then list all .py files individually
pkgdatadir = $(datadir)/@PACKAGE@/gen/mime
pkgpythondir = $(datadir)/@PACKAGE@/gen/mime
pkgdata_PYTHON = \
pkgpython_PYTHON = \
__init__.py\
_gnomemime.py\
_winmime.py\
_pythonmime.py
pkgpyexecdir = @pkgpyexecdir@/gen/mime
pkgpythondir = @pkgpythondir@/gen/mime
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
@@ -21,4 +20,4 @@ GRAMPS_PY_MODPATH = "../../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
+3 -5
View File
@@ -8,9 +8,9 @@ SUBDIRS = \
docgen\
menu
pkgdatadir = $(datadir)/@PACKAGE@/gen/plug
pkgpythondir = $(datadir)/@PACKAGE@/gen/plug
pkgdata_PYTHON = \
pkgpython_PYTHON = \
__init__.py \
_docgenplugin.py \
_export.py \
@@ -22,8 +22,6 @@ pkgdata_PYTHON = \
utils.py
pkgpyexecdir = @pkgpyexecdir@/gen/plug
pkgpythondir = @pkgpythondir@/gen/plug
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
@@ -32,4 +30,4 @@ GRAMPS_PY_MODPATH = "../../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
+3 -5
View File
@@ -3,16 +3,14 @@
# but that is not necessarily portable.
# If not using GNU make, then list all .py files individually
pkgdatadir = $(datadir)/@PACKAGE@/gen/plug/docbackend
pkgpythondir = $(datadir)/@PACKAGE@/gen/plug/docbackend
pkgdata_PYTHON = \
pkgpython_PYTHON = \
__init__.py \
cairobackend.py \
docbackend.py
pkgpyexecdir = @pkgpyexecdir@/gen/plug/docbackend
pkgpythondir = @pkgpythondir@/gen/plug/docbackend
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
@@ -21,4 +19,4 @@ GRAMPS_PY_MODPATH = "../../../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
+26 -6
View File
@@ -341,15 +341,35 @@ class DocBackend(object):
for opentag in opentags:
otext += opentag[0]
start = pos
#add remainder of text, no markup present there
otext += self.ESCAPE_FUNC()(text[start:end])
#opentags should be empty. If not, user gave tags on positions that
# are over the end of the text. Just close the tags still open
#add remainder of text, no markup present there if all is correct
if opentags:
# a problem, we don't have a closing tag left but there are open
# tags. Just keep them up to end of text
pos = len(text)
print 'WARNING: DocBackend : More style tags in text than length '\
'of text allows.\n', opentags
if pos > start:
if split:
#make sure text can split
splitpos = text[start:pos].find(split)
while splitpos != -1:
otext += self.ESCAPE_FUNC()(text[start:start+splitpos])
#close open tags
for opentag in reversed(opentags):
otext += opentag[1]
#add split text
otext += self.ESCAPE_FUNC()(split)
#open the tags again
for opentag in opentags:
otext += opentag[0]
#obtain new values
start = start + splitpos + lensplit
splitpos = text[start:pos].find(split)
otext += self.ESCAPE_FUNC()(text[start:pos])
for opentag in reversed(opentags):
otext += opentag[1]
else:
otext += self.ESCAPE_FUNC()(text[start:end])
return otext
+3 -3
View File
@@ -5,7 +5,7 @@
pkgdatadir = $(datadir)/@PACKAGE@/gen/plug/docgen
pkgdata_PYTHON = \
pkgpython_PYTHON = \
__init__.py \
basedoc.py \
drawdoc.py \
@@ -20,7 +20,7 @@ pkgdata_PYTHON = \
textdoc.py
pkgpyexecdir = @pkgpyexecdir@/gen/plug/docgen
pkgpythondir = @pkgpythondir@/gen/plug/docgen
pkgpythondir = $(datadir)/@PACKAGE@/gen/plug/docgen
# Clean up all the byte-compiled files
@@ -30,4 +30,4 @@ GRAMPS_PY_MODPATH = "../../../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
+3 -5
View File
@@ -3,9 +3,9 @@
# but that is not necessarily portable.
# If not using GNU make, then list all .py files individually
pkgdatadir = $(datadir)/@PACKAGE@/gen/plug/menu
pkgpythondir = $(datadir)/@PACKAGE@/gen/plug/menu
pkgdata_PYTHON = \
pkgpython_PYTHON = \
__init__.py \
_boolean.py \
_booleanlist.py \
@@ -28,8 +28,6 @@ pkgdata_PYTHON = \
_text.py
pkgpyexecdir = @pkgpyexecdir@/gen/plug/menu
pkgpythondir = @pkgpythondir@/gen/plug/menu
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
@@ -38,4 +36,4 @@ GRAMPS_PY_MODPATH = "../../../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
+3 -5
View File
@@ -3,9 +3,9 @@
# but that is not necessarily portable.
# If not using GNU make, then list all .py files individually
pkgdatadir = $(datadir)/@PACKAGE@/gen/proxy
pkgpythondir = $(datadir)/@PACKAGE@/gen/proxy
pkgdata_PYTHON = \
pkgpython_PYTHON = \
__init__.py \
filter.py \
living.py \
@@ -14,8 +14,6 @@ pkgdata_PYTHON = \
proxybase.py
pkgpyexecdir = @pkgpyexecdir@/gen/proxy
pkgpythondir = @pkgpythondir@/gen/proxy
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
@@ -24,4 +22,4 @@ GRAMPS_PY_MODPATH = "../../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
+3 -5
View File
@@ -3,9 +3,9 @@
# but that is not necessarily portable.
# If not using GNU make, then list all .py files individually
pkgdatadir = $(datadir)/@PACKAGE@/gen/utils
pkgpythondir = $(datadir)/@PACKAGE@/gen/utils
pkgdata_PYTHON = \
pkgpython_PYTHON = \
__init__.py \
callback.py \
callman.py \
@@ -13,8 +13,6 @@ pkgdata_PYTHON = \
fallback.py
pkgpyexecdir = @pkgpyexecdir@/gen/utils
pkgpythondir = @pkgpythondir@/gen/utils
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
@@ -23,4 +21,4 @@ GRAMPS_PY_MODPATH = "../../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
+3 -5
View File
@@ -9,9 +9,9 @@ SUBDIRS = \
views \
widgets
pkgdatadir = $(datadir)/@PACKAGE@/gui
pkgpythondir = $(datadir)/@PACKAGE@/gui
pkgdata_PYTHON = \
pkgpython_PYTHON = \
__init__.py \
columnorder.py \
configure.py \
@@ -25,8 +25,6 @@ pkgdata_PYTHON = \
viewmanager.py
pkgpyexecdir = @pkgpyexecdir@/gui
pkgpythondir = @pkgpythondir@/gui
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
@@ -35,4 +33,4 @@ GRAMPS_PY_MODPATH = "../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
+1 -1
View File
@@ -1000,7 +1000,7 @@ class GrampsPreferences(ConfigureDialog):
def select_mediapath(self, *obj):
f = gtk.FileChooserDialog(
_("Select media directory"),
action=gtk.FILE_CHOOSER_ACTION_CREATE_FOLDER,
action=gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER,
buttons=(gtk.STOCK_CANCEL,
gtk.RESPONSE_CANCEL,
gtk.STOCK_APPLY,
+4
View File
@@ -305,6 +305,10 @@ class DbLoader(CLIDbLoader):
except gen.db.exceptions.DbVersionError, msg:
self.dbstate.no_database()
self._errordialog( _("Cannot open database"), str(msg))
except gen.db.exceptions.DbEnvironmentError, msg:
_LOG.error("dbloader: read_file: DbEnvironmentError detected")
self.dbstate.no_database()
self._errordialog( _("Cannot open database"), str(msg))
except OSError, msg:
self.dbstate.no_database()
self._errordialog(
+3 -4
View File
@@ -6,9 +6,9 @@
SUBDIRS = \
displaytabs
pkgdatadir = $(datadir)/@PACKAGE@/gui/editors
pkgpythondir = $(datadir)/@PACKAGE@/gui/editors
pkgdata_PYTHON = \
pkgpython_PYTHON = \
addmedia.py\
__init__.py\
editaddress.py \
@@ -37,7 +37,6 @@ pkgdata_PYTHON = \
objectentries.py
pkgpyexecdir = @pkgpyexecdir@/gui/editors
pkgpythondir = @pkgpythondir@/gui/editors
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
@@ -46,4 +45,4 @@ GRAMPS_PY_MODPATH = "../../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
+3 -4
View File
@@ -1,8 +1,8 @@
# This is the src/gui/editors/displaytabs level Makefile for Gramps
pkgdatadir = $(datadir)/@PACKAGE@/gui/editors/displaytabs
pkgpythondir = $(datadir)/@PACKAGE@/gui/editors/displaytabs
pkgdata_PYTHON = \
pkgpython_PYTHON = \
addrembedlist.py \
addressmodel.py \
attrembedlist.py \
@@ -47,7 +47,6 @@ pkgdata_PYTHON = \
__init__.py
pkgpyexecdir = @pkgpyexecdir@/gui/editors/displaytabs
pkgpythondir = @pkgpythondir@/gui/editors/displaytabs
# clean up all the byte-compiled files
MOSTLYcLEANFILES = *pyc *pyo
@@ -56,4 +55,4 @@ GRAMPS_PY_MODPATH = "../../../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
+17 -5
View File
@@ -51,7 +51,7 @@ class ChildModel(gtk.ListStore):
def __init__(self, family, db):
self.family = family
gtk.ListStore.__init__(self, int, str, str, str, str, str,
str, str, str, str, str, str, int, int)
str, str, str, str, str, str, str, str)
self.db = db
index = 1
for child_ref in self.get_data():
@@ -88,12 +88,18 @@ class ChildModel(gtk.ListStore):
return u""
def column_birth_sort(self, data):
"""
Return a sort key to use for the birth column.
As python int can be larger than C int, we cast int
to a string of 12 long prepended with 0 as needed.
This gives correct string sort for years in the millenia around today
"""
event_ref = data.get_birth_ref()
if event_ref and event_ref.ref:
event = self.db.get_event_from_handle(event_ref.ref)
return event.get_date_object().get_sort_value()
return '%012d' % event.get_date_object().get_sort_value()
else:
return 0
return '%012d' % 0
def column_death_day(self, data):
event_ref = data.get_death_ref()
@@ -104,12 +110,18 @@ class ChildModel(gtk.ListStore):
return u""
def column_death_sort(self, data):
"""
Return a sort key to use for the death column.
As python int can be larger than C int, we cast int
to a string of 12 long prepended with 0 as needed.
This gives correct string sort for years in the millenia around today
"""
event_ref = data.get_death_ref()
if event_ref and event_ref.ref:
event = self.db.get_event_from_handle(event_ref.ref)
return event.get_date_object().get_sort_value()
return '%012d' % event.get_date_object().get_sort_value()
else:
return 0
return '%012d' % 0
def column_birth_place(self, data):
event_ref = data.get_birth_ref()
@@ -249,8 +249,7 @@ class EventEmbedList(DbGUIElement, GroupEmbeddedList):
except Errors.WindowActiveError:
from QuestionDialog import WarningDialog
WarningDialog(_("Cannot share this reference"),
self.__blocked_text() )
pass
self.__blocked_text())
def edit_button_clicked(self, obj):
ref = self.get_selected()
@@ -263,7 +262,7 @@ class EventEmbedList(DbGUIElement, GroupEmbeddedList):
except Errors.WindowActiveError:
from QuestionDialog import WarningDialog
WarningDialog(_("Cannot edit this reference"),
self.__blocked_text() )
self.__blocked_text())
elif ref and ref[0] != self._WORKGROUP:
#bring up family editor
key = self._groups[ref[0]][0]
+16 -2
View File
@@ -282,6 +282,16 @@ class GalleryTab(ButtonTab, DbGUIElement):
self.changed = True
self.rebuild()
def __blocked_text(self):
"""
Return the common text used when mediaref cannot be edited
"""
return _("This media reference cannot be edited at this time. "
"Either the associated media object is already being "
"edited or another media reference that is associated with "
"the same media object is being edited.\n\nTo edit this "
"media reference, you need to close the media object.")
def share_button_clicked(self, obj):
"""
Function called when the Share button is clicked.
@@ -300,7 +310,9 @@ class GalleryTab(ButtonTab, DbGUIElement):
EditMediaRef(self.dbstate, self.uistate, self.track,
src, sref, self.add_callback)
except Errors.WindowActiveError:
pass
from QuestionDialog import WarningDialog
WarningDialog(_("Cannot share this reference"),
self.__blocked_text())
def del_button_clicked(self, obj):
ref = self.get_selected()
@@ -318,7 +330,9 @@ class GalleryTab(ButtonTab, DbGUIElement):
EditMediaRef(self.dbstate, self.uistate, self.track,
obj, ref, None)
except Errors.WindowActiveError:
pass
from QuestionDialog import WarningDialog
WarningDialog(_("Cannot edit this reference"),
self.__blocked_text())
def media_delete(self, del_media_handle_list):
"""
+15 -9
View File
@@ -113,6 +113,16 @@ class SourceEmbedList(EmbeddedList, DbGUIElement):
except Errors.WindowActiveError:
pass
def __blocked_text(self):
"""
Return the common text used when sourceref cannot be edited
"""
return _("This source reference cannot be edited at this time. "
"Either the associated source is already being edited "
"or another source reference that is associated with "
"the same source is being edited.\n\nTo edit this "
"source reference, you need to close the source.")
def share_button_clicked(self, obj):
from gui.editors import EditSourceRef
SelectSource = SelectorFactory('Source')
@@ -130,7 +140,9 @@ class SourceEmbedList(EmbeddedList, DbGUIElement):
self.object_added)
except Errors.WindowActiveError:
pass
from QuestionDialog import WarningDialog
WarningDialog(_("Cannot share this reference"),
self.__blocked_text())
def edit_button_clicked(self, obj):
from gui.editors import EditSourceRef
@@ -143,14 +155,8 @@ class SourceEmbedList(EmbeddedList, DbGUIElement):
src, sref, self.object_edited)
except Errors.WindowActiveError:
from QuestionDialog import WarningDialog
WarningDialog(
_("Cannot edit this reference"),
_("This source reference cannot be edited at this time. "
"Either the associated source is already being edited "
"or another source reference that is associated with "
"the same source is being edited.\n\nTo edit this "
"source reference, you need to close the source.")
)
WarningDialog(_("Cannot edit this reference"),
self.__blocked_text())
def object_added(self, reference, primary):
"""
+21 -9
View File
@@ -95,8 +95,8 @@ class ChildEmbedList(EmbeddedList):
'del' : _('Remove the child from the family'),
'edit' : _('Edit the child reference'),
'share' : _('Add an existing person as a child of the family'),
'up' : _('Move the child up in the childrens list'),
'down' : _('Move the child down in the childrens list'),
'up' : _('Move the child up in the children list'),
'down' : _('Move the child down in the children list'),
}
_column_names = [
@@ -911,15 +911,13 @@ class EditFamily(EditPrimary):
if birth:
#if event changes it view needs to update
self.callman.register_handles({'event': [birth.get_handle()]})
if birth and birth.get_type() == gen.lib.EventType.BAPTISM:
birth_label.set_label(_("Baptism:"))
birth_label.set_label("%s:" % birth.get_type())
death = get_death_or_fallback(db, person)
if death:
#if event changes it view needs to update
self.callman.register_handles({'event': [death.get_handle()]})
if death and death.get_type() == gen.lib.EventType.BURIAL:
death_label.set_label(_("Burial:"))
death_label.set_label("%s:" % death.get_type())
btn_edit.set_tooltip_text(_('Edit %s') % name)
btn_index.hide()
@@ -949,11 +947,23 @@ class EditFamily(EditPrimary):
death_str = ""
death_obj.set_text(death_str)
def fix_parent_handles(self, orig_handle, new_handle, trans):
def fix_parent_handles(self, orig_handle, new_handle, trans, remove_fam=True):
"""
Adjust the reference of the parents to point to the right family.
The remove_fam parameter is needed for the special case that the
original mother is equal to the new father. If that is the case the call
to fix the fathers does not add the new family because that family
is already present in the family_list. The subsequent call to fix the
mothers would remove the family handle with the result that the data
is not in a good state: the family points to the person, but the person
does not point back to the family.
"""
if orig_handle != new_handle:
if orig_handle:
person = self.db.get_person_from_handle(orig_handle)
person.family_list.remove(self.obj.handle)
if remove_fam:
person.family_list.remove(self.obj.handle)
self.db.commit_person(person, trans)
if new_handle:
person = self.db.get_person_from_handle(new_handle)
@@ -1060,10 +1070,12 @@ class EditFamily(EditPrimary):
trans = self.db.transaction_begin()
remove_fam = not (original.get_mother_handle() ==
self.obj.get_father_handle())
self.fix_parent_handles(original.get_father_handle(),
self.obj.get_father_handle(), trans)
self.fix_parent_handles(original.get_mother_handle(),
self.obj.get_mother_handle(), trans)
self.obj.get_mother_handle(), trans, remove_fam)
orig_set = set(original.get_child_ref_list())
new_set = set(self.obj.get_child_ref_list())
+25 -24
View File
@@ -76,6 +76,7 @@ class EditRepoRef(EditReference):
notebook.remove_page(0)
self.primtab = RefTab(self.dbstate, self.uistate, self.track,
_('_General'), tblref)
self.track_ref_for_deletion("primtab")
def _connect_signals(self):
self.define_ok_button(self.top.get_object('ok'),self.ok_clicked)
@@ -107,7 +108,7 @@ class EditRepoRef(EditReference):
self.source,
self.db.readonly)
self.privacy = PrivacyButton(
self.ref_privacy = PrivacyButton(
self.top.get_object("private_ref"),
self.source_ref,
self.db.readonly)
@@ -146,33 +147,33 @@ class EditRepoRef(EditReference):
self._add_tab(notebook_src, self.primtab)
self._add_tab(notebook_ref, self.reftab)
self.note_tab = self._add_tab(
notebook_src,
NoteTab(self.dbstate, self.uistate, self.track,
self.source.get_note_list(),
notetype=NoteType.REPO))
self.note_tab = NoteTab(self.dbstate, self.uistate, self.track,
self.source.get_note_list(),
notetype=NoteType.REPO)
self._add_tab(notebook_src, self.note_tab)
self.track_ref_for_deletion("note_tab")
self.comment_tab = self._add_tab(
notebook_ref,
NoteTab(self.dbstate, self.uistate, self.track,
self.source_ref.get_note_list(),
notetype=NoteType.REPOREF))
self.comment_tab = NoteTab(self.dbstate, self.uistate, self.track,
self.source_ref.get_note_list(),
notetype=NoteType.REPOREF)
self._add_tab(notebook_ref, self.comment_tab)
self.track_ref_for_deletion("comment_tab")
self.address_tab = self._add_tab(
notebook_src,
AddrEmbedList(self.dbstate,self.uistate,self.track,
self.source.get_address_list()))
self.address_tab = AddrEmbedList(self.dbstate, self.uistate, self.track,
self.source.get_address_list())
self._add_tab(notebook_src, self.address_tab)
self.track_ref_for_deletion("address_tab")
self.web_list = self._add_tab(
notebook_src,
WebEmbedList(self.dbstate,self.uistate,self.track,
self.source.get_url_list()))
self.web_list = WebEmbedList(self.dbstate, self.uistate, self.track,
self.source.get_url_list())
self._add_tab(notebook_src, self.web_list)
self.track_ref_for_deletion("web_list")
self.backref_tab = self._add_tab(
notebook_src,
SourceBackRefList(self.dbstate, self.uistate, self.track,
self.db.find_backlink_handles(self.source.handle),
self.enable_warnbox))
self.backref_tab = SourceBackRefList(self.dbstate, self.uistate, self.track,
self.db.find_backlink_handles(self.source.handle),
self.enable_warnbox)
self._add_tab(notebook_src, self.backref_tab)
self.track_ref_for_deletion("backref_tab")
self._setup_notebook_tabs( notebook_src)
self._setup_notebook_tabs( notebook_ref)
+2
View File
@@ -1079,6 +1079,8 @@ class FilterEditor(ManagedWindow.ManagedWindow):
filters = self.filterdb.get_filters(space)
name = gfilter.get_name()
for the_filter in filters:
if the_filter.get_name() == name:
continue
for rule in the_filter.get_rules():
values = rule.values()
if issubclass(rule.__class__, MatchesFilterBase) \
+3 -4
View File
@@ -3,9 +3,9 @@
# but that is not necessarily portable.
# If not using GNU make, then list all .py files individually
pkgdatadir = $(datadir)/@PACKAGE@/gui/selectors
pkgpythondir = $(datadir)/@PACKAGE@/gui/selectors
pkgdata_PYTHON = \
pkgpython_PYTHON = \
__init__.py \
baseselector.py \
selectevent.py \
@@ -20,7 +20,6 @@ pkgdata_PYTHON = \
selectorfactory.py
pkgpyexecdir = @pkgpyexecdir@/gui/selectors
pkgpythondir = @pkgpythondir@/gui/selectors
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
@@ -29,4 +28,4 @@ GRAMPS_PY_MODPATH = "../../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
+2 -2
View File
@@ -2,7 +2,7 @@
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2003-2006 Donald N. Allingham
# 2009 Gary Burton
# 2009-2011 Gary Burton
#
# 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
@@ -286,7 +286,6 @@ class BaseSelector(ManagedWindow.ManagedWindow):
if self.sort_col != data:
self.sortorder = gtk.SORT_ASCENDING
self.sort_col = data
self.build_tree()
else:
if (self.columns[data].get_sort_order() == gtk.SORT_DESCENDING
or not self.columns[data].get_sort_indicator()):
@@ -294,6 +293,7 @@ class BaseSelector(ManagedWindow.ManagedWindow):
else:
self.sortorder = gtk.SORT_DESCENDING
self.model.reverse_order()
self.build_tree()
handle = self.first_selected()
if handle:
+1 -1
View File
@@ -119,7 +119,7 @@ class ProgressMeter(object):
self.__dialog.set_border_width(12)
self.__dialog.vbox.set_spacing(10)
self.__dialog.vbox.set_border_width(24)
self.__dialog.set_size_request(350, 125)
self.__dialog.set_size_request(400, 125)
tlbl = gtk.Label('<span size="larger" weight="bold">%s</span>' % title)
tlbl.set_use_markup(True)
+4 -5
View File
@@ -6,16 +6,15 @@
SUBDIRS = \
treemodels
pkgdatadir = $(datadir)/@PACKAGE@/gui/views
pkgpythondir = $(datadir)/@PACKAGE@/gui/views
pkgdata_PYTHON = \
pkgpython_PYTHON = \
__init__.py \
listview.py \
navigationview.py \
pageview.py
pkgpyexecdir = @pkgpyexecdir@/gui/views
pkgpythondir = @pkgpythondir@/gui/views
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
@@ -24,7 +23,7 @@ GRAMPS_PY_MODPATH = "../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
pylint:
PYTHONPATH=$(GRAMPS_PY_MODPATH) pylint $(pkgdata_PYTHON) > pylint.out
PYTHONPATH=$(GRAMPS_PY_MODPATH) pylint $(pkgpython_PYTHON) > pylint.out
+4 -5
View File
@@ -3,9 +3,9 @@
# but that is not necessarily portable.
# If not using GNU make, then list all .py files individually
pkgdatadir = $(datadir)/@PACKAGE@/gui/views/treemodels
pkgpythondir = $(datadir)/@PACKAGE@/gui/views/treemodels
pkgdata_PYTHON = \
pkgpython_PYTHON = \
__init__.py \
eventmodel.py \
familymodel.py \
@@ -19,7 +19,6 @@ pkgdata_PYTHON = \
treebasemodel.py
pkgpyexecdir = @pkgpyexecdir@/gui/views/treemodels
pkgpythondir = @pkgpythondir@/gui/views/treemodels
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
@@ -28,7 +27,7 @@ GRAMPS_PY_MODPATH = "../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
pylint:
PYTHONPATH=$(GRAMPS_PY_MODPATH) pylint $(pkgdata_PYTHON) > pylint.out
PYTHONPATH=$(GRAMPS_PY_MODPATH) pylint $(pkgpython_PYTHON) > pylint.out
+13 -5
View File
@@ -833,13 +833,21 @@ class TreeBaseModel(gtk.GenericTreeModel):
"""
if not self.tree or not self.tree[None].children:
return None
_LOG.debug('path argument of on_get_iter method %s' % str(path))
node = self.tree[None]
pathlist = list(path)
for index in pathlist:
if self.__reverse:
node = self.nodemap.node(node.children[-index - 1][1])
else:
node = self.nodemap.node(node.children[index][1])
try:
for index in pathlist:
if self.__reverse:
node = self.nodemap.node(node.children[-index - 1][1])
else:
node = self.nodemap.node(node.children[index][1])
except IndexError:
# From the gtk.TreeModel.get_iter documentation:
# This method raises a ValueError exception if path is not a valid
# tree path.
raise ValueError("list index, %s, out of range; max is %d; reverse is %s" % \
(index, len(node.children), self.__reverse))
return node
def on_get_path(self, node):
+3 -4
View File
@@ -3,9 +3,9 @@
# but that is not necessarily portable.
# If not using GNU make, then list all .py files individually
pkgdatadir = $(datadir)/@PACKAGE@/gui/widgets
pkgpythondir = $(datadir)/@PACKAGE@/gui/widgets
pkgdata_PYTHON = \
pkgpython_PYTHON = \
__init__.py \
buttons.py \
expandcollapsearrow.py \
@@ -27,7 +27,6 @@ pkgdata_PYTHON = \
valuetoolitem.py
pkgpyexecdir = @pkgpyexecdir@/gui/widgets
pkgpythondir = @pkgpythondir@/gui/widgets
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
@@ -36,5 +35,5 @@ GRAMPS_PY_MODPATH = "../../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
+4
View File
@@ -755,6 +755,8 @@ class GuiGramplet(object):
'attribute_match',
handle)
return True
else: # overzealous l10n while setting the link?
warn( "Unknown link type " + link_type, RuntimeWarning, 2)
return False # did not handle event
def get_title(self):
@@ -1102,6 +1104,8 @@ class GrampletPane(gtk.ScrolledWindow):
return True
def set_columns(self, num):
if num < 1:
num = 1
# clear the gramplets:
self.clear_gramplets()
# clear the columns:
+3 -3
View File
@@ -21,14 +21,14 @@ SUBDIRS = \
pkgdatadir = $(datadir)/@PACKAGE@/plugins
pkgdata_PYTHON = \
pkgpython_PYTHON = \
bookreport.gpr.py\
BookReport.py\
records.gpr.py\
Records.py
pkgpyexecdir = @pkgpyexecdir@/plugins
pkgpythondir = @pkgpythondir@/plugins
pkgpythondir = $(datadir)/@PACKAGE@/plugins
GLADEFILES = \
bookreport.glade
@@ -46,4 +46,4 @@ GRAMPS_PY_MODPATH = "../:../docgen"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pychecker $(pkgpython_PYTHON));
+1 -1
View File
@@ -449,7 +449,7 @@ class LaTeXDoc(BaseDoc, TextDoc):
self._backend.write(' \\renewcommand\\theenumi{\\arabic{enumi}}')
else:
# roman, set the case correctly
elf._backend.write(' \\renewcommand\\theenumi{\\%soman{enumi}}'
self._backend.write(' \\renewcommand\\theenumi{\\%soman{enumi}}'
% ('r' if leader_1.islower() else 'R'))
self._backend.write(' \\setcounter{enumi}{%d} ' % num)
+39 -39
View File
@@ -1,39 +1,39 @@
# This is the src/plugins/docgen level Makefile for Gramps
# We could use GNU make's ':=' syntax for nice wildcard use,
# but that is not necessarily portable.
# If not using GNU make, then list all .py files individually
pkgdatadir = $(datadir)/@PACKAGE@/plugins/docgen
pkgdata_PYTHON = \
AsciiDoc.py \
docgen.gpr.py\
GtkPrint.py \
HtmlDoc.py \
LaTeXDoc.py \
ODFDoc.py \
PdfDoc.py \
PSDrawDoc.py \
RTFDoc.py \
SvgDrawDoc.py
pkgpyexecdir = @pkgpyexecdir@/plugins/docgen
pkgpythondir = @pkgpythondir@/plugins/docgen
GLADEFILES = \
gtkprint.glade
GRAPHICS =
DATAFILES =
dist_pkgdata_DATA = $(GLADEFILES) $(GRAPHICS) $(DATAFILES)
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
GRAMPS_PY_MODPATH = "../../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
# This is the src/plugins/docgen level Makefile for Gramps
# We could use GNU make's ':=' syntax for nice wildcard use,
# but that is not necessarily portable.
# If not using GNU make, then list all .py files individually
pkgdatadir = $(datadir)/@PACKAGE@/plugins/docgen
pkgpython_PYTHON = \
AsciiDoc.py \
docgen.gpr.py\
GtkPrint.py \
HtmlDoc.py \
LaTeXDoc.py \
ODFDoc.py \
PdfDoc.py \
PSDrawDoc.py \
RTFDoc.py \
SvgDrawDoc.py
pkgpyexecdir = @pkgpyexecdir@/plugins/docgen
pkgpythondir = $(datadir)/@PACKAGE@/plugins/docgen
GLADEFILES = \
gtkprint.glade
GRAPHICS =
DATAFILES =
dist_pkgdata_DATA = $(GLADEFILES) $(GRAPHICS) $(DATAFILES)
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
GRAMPS_PY_MODPATH = "../../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgpython_PYTHON));
-6
View File
@@ -1222,9 +1222,6 @@ class ODFDoc(BaseDoc, TextDoc, DrawDoc):
"""
text = str(styledtext)
s_tags = styledtext.get_tags()
text = text.replace('&', '\1') # must be the first
text = text.replace('<', '\2')
text = text.replace('>', '\3')
markuptext = self._backend.add_markup_from_styled(text, s_tags, '\n')
# we need to know if we have new styles to add.
# if markuptext contains : FontColor, FontFace, FontSize ...
@@ -1243,9 +1240,6 @@ class ODFDoc(BaseDoc, TextDoc, DrawDoc):
start = m.end()
linenb = 1
self.start_paragraph(style_name)
markuptext = markuptext.replace('\1', '&amp;') # must be the first
markuptext = markuptext.replace('\2', '&lt;')
markuptext = markuptext.replace('\3', '&gt;')
for line in markuptext.split('\n'):
[line, sigcount] = process_spaces(line, format)
if sigcount == 0:
+26 -27
View File
@@ -1,27 +1,26 @@
# This is the src/plugins/drawreport level Makefile for Gramps
# We could use GNU make's ':=' syntax for nice wildcard use,
# but that is not necessarily portable.
# If not using GNU make, then list all .py files individually
pkgdatadir = $(datadir)/@PACKAGE@/plugins/drawreport
pkgdata_PYTHON = \
AncestorTree.py \
Calendar.py\
DescendTree.py \
drawplugins.gpr.py\
FanChart.py \
StatisticsChart.py \
TimeLine.py
pkgpyexecdir = @pkgpyexecdir@/plugins/drawreport
pkgpythondir = @pkgpythondir@/plugins/drawreport
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
GRAMPS_PY_MODPATH = "../../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
# This is the src/plugins/drawreport level Makefile for Gramps
# We could use GNU make's ':=' syntax for nice wildcard use,
# but that is not necessarily portable.
# If not using GNU make, then list all .py files individually
pkgpythondir = $(datadir)/@PACKAGE@/plugins/drawreport
pkgpython_PYTHON = \
AncestorTree.py \
Calendar.py\
DescendTree.py \
drawplugins.gpr.py\
FanChart.py \
StatisticsChart.py \
TimeLine.py
pkgpyexecdir = @pkgpyexecdir@/plugins/drawreport
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
GRAMPS_PY_MODPATH = "../../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgpython_PYTHON));

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