Commit Graph

230 Commits

Author SHA1 Message Date
Doug Blank
c551d6beb1 Newyear import/export changes and fix
svn: r15027
2010-04-04 12:10:12 +00:00
Doug Blank
cc843399a6 Typo on newyear fix
svn: r15024
2010-04-04 11:32:10 +00:00
Doug Blank
7047015603 3756: Cannot set new year value different than default (first January)
svn: r15010
2010-04-03 23:33:17 +00:00
Benny Malengier
9ab5decb47 3667: Addings a new person and changing the name grouping results in frozen window
svn: r14662
2010-03-07 15:33:38 +00:00
Doug Blank
993a5c2fcd Unoptimized to work
svn: r14407
2010-02-17 11:53:19 +00:00
Gerald Britton
7975d5c3c4 Revert some map calls to list comps to correct bug introduced in rev. 14104
svn: r14191
2010-02-02 13:56:15 +00:00
Doug Blank
30c5030ebe A method for comparing person == person
svn: r14146
2010-01-27 06:05:24 +00:00
Brian Matherly
ac820cb8df PEP8 Improvements. Remove dependency on DateHandler.
svn: r14145
2010-01-27 03:38:30 +00:00
Gerald Britton
8f0582df8a Use built-in functions to replace for loops:
Old code:

for x in y:
  f(x)

New Code:

map(f, y)

Also use defaultdict instead of simple dict when advantageous and use list comprehensions
instead of for loops where map() could be used but requires lambdas.


svn: r14135
2010-01-25 17:45:21 +00:00
Brian Matherly
c9cb7e60c9 Move GEDCOM date functions into libgedcom.
svn: r14125
2010-01-25 04:54:22 +00:00
Gerald Britton
1f2469b09f Simplify with built-in functions where possible. e.g.
change [x for x in y if x] to filter(None, y)
change [f(x) for x in y] to map(f, x)
change [x for x in y] to list(y)

These changes reduce source code size and complexity and produce some minor performance gains

svn: r14104
2010-01-21 18:42:53 +00:00
Doug Blank
c689013025 Added two additional cases for date matches: <=, >=
svn: r14101
2010-01-20 13:37:24 +00:00
Brian Matherly
f04880ec09 Move gettext, ngettext and sgettext calls into the new ggettext module. All of them return unicode all of the time.
svn: r14091
2010-01-18 04:42:17 +00:00
Peter Landgren
e4dfdb9190 Fix of issue 3480.
svn: r13996
2010-01-08 15:57:54 +00:00
Doug Blank
68e9b27265 Added method to make dates non-specific
svn: r13990
2010-01-07 21:41:07 +00:00
Doug Blank
4f3d8f3675 Added missing 'return self' at end of unserialize to match the rest of the classes in lib.gen
svn: r13935
2009-12-29 03:24:38 +00:00
Doug Blank
302781a6b3 Event types know how to abbreviate themselves
svn: r13898
2009-12-23 19:35:18 +00:00
Doug Blank
872e971fd3 gen.lib and gen.utils are independent; removed gen.utils.dbutils --- moved db methods to gen.db.base
svn: r13872
2009-12-21 04:18:31 +00:00
Doug Blank
dcb926bf87 Cleaning up Utils and refactoring common functionality
svn: r13860
2009-12-20 22:12:29 +00:00
Doug Blank
7f55894f26 Added is_primary method to EventRoleType
svn: r13859
2009-12-20 19:59:21 +00:00
Rob G. Healey
224c8c1ffc Fixed error causing crash as per Nick Hall. Corrected tags on libhtmlconst and WebCal.
svn: r13805
2009-12-15 02:50:46 +00:00
Rob G. Healey
426691a2ac Not ready yet and I am out of time for now.
svn: r13801
2009-12-14 12:31:34 +00:00
Rob G. Healey
057e8504c0 Finished exiftype.py Will add it to POTFILES.IN in the afternoon.
svn: r13799
2009-12-14 12:22:17 +00:00
Rob G. Healey
8c5c6a428e Continuation of exiftype. Variables have been completed.
svn: r13798
2009-12-14 10:52:57 +00:00
Rob G. Healey
42d45dfa5c Beginning of extending the media exif tags section.
svn: r13797
2009-12-14 10:01:57 +00:00
Doug Blank
cc768b3d36 Proper default value for lookup_calendar
svn: r13769
2009-12-11 23:09:02 +00:00
Doug Blank
966ecbf20c Convieniences: get_year_calendar(int) or get_year_calendar(name); date.to_calendar(int) or to_calendar(name)
svn: r13764
2009-12-11 15:17:39 +00:00
Doug Blank
b1e51013e6 Updated date_test to test swedish dates more
svn: r13763
2009-12-11 15:06:21 +00:00
Doug Blank
96737bf442 Refined calendar lookup
svn: r13762
2009-12-11 15:05:29 +00:00
Doug Blank
6d245db5fc Fixed error in get_year_calendar
svn: r13761
2009-12-11 14:27:50 +00:00
Rob G. Healey
c544e79b22 Fixed event types not being translated in IndividualPages, Events section. Made some spacial alignment in eventtypes.py for better visual aid.
svn: r13748
2009-12-10 00:01:20 +00:00
Doug Blank
f271154b59 Fixes for get_year_calendar
svn: r13743
2009-12-08 12:32:10 +00:00
Doug Blank
4434fd6542 Added convienience method for getting year in the calendar of a date
svn: r13731
2009-12-06 17:34:27 +00:00
Doug Blank
0c10d47a90 Added a == to match to check more exact matches
svn: r13717
2009-12-05 20:07:53 +00:00
Doug Blank
d004430882 Fixed error in computing days of a date diff span
svn: r13661
2009-11-23 01:54:44 +00:00
Benny Malengier
1846c513cf 2799: in GEDCOM export, changed timestamp for every single record is 31 DEC 1969
svn: r13630
2009-11-18 22:45:54 +00:00
Benny Malengier
61130b11ef 03288: [XML import] Custom family event role type is ignored on Family Events
svn: r13447
2009-10-28 16:15:48 +00:00
Doug Blank
c8fc4d20dd Added = and == to match for similar and exact text_only date matches
svn: r13417
2009-10-25 21:05:45 +00:00
Doug Blank
40b9c7a7ca Fixed three errors in date conversions: set_slash didn't work; set_slash2 was missing; and convert_to calendar needed to clear NEWYEAR and SLASHES
svn: r13395
2009-10-23 00:06:14 +00:00
Doug Blank
c202f43e9b Fixed two errors: simple str(date) now shows alternate newyear day; match with alt newyear day now works correctly
svn: r13390
2009-10-22 04:15:18 +00:00
Doug Blank
99282aa715 3272: Proposal for updating config settings
svn: r13346
2009-10-08 01:12:51 +00:00
Doug Blank
435aca1e95 Report format type of error
svn: r13307
2009-10-05 12:53:46 +00:00
Doug Blank
86e744cc19 One set of Swedish tests is ok
svn: r13305
2009-10-05 11:21:22 +00:00
Doug Blank
09497d5576 Fixed error in sorting date spans, and refined span comparisons
svn: r13303
2009-10-04 15:13:07 +00:00
Doug Blank
ae4c341777 Fixed error in assert, which revealed some errors in testing Swedish dates
svn: r13302
2009-10-04 15:11:30 +00:00
Doug Blank
0c856f59f5 Added get_gedcom_name formatter to Name to allow sharing
svn: r13251
2009-09-26 01:05:08 +00:00
Doug Blank
8883fe0f97 Moved gedcom date constants and functions to gen.lib.date so they can be shared
svn: r13249
2009-09-25 20:45:05 +00:00
Gerald Britton
941fff23ae Tweaks to use inplace arithmetic
svn: r13191
2009-09-10 18:49:48 +00:00
Raphael Ackermann
cf5ee9d657 pep8 & typos
svn: r13001
2009-08-14 07:07:10 +00:00
Raphael Ackermann
c1be765f7a fixed typos
svn: r12984
2009-08-13 08:52:05 +00:00
Raphael Ackermann
5ac76d658b 0002832: Somes modules still use Relib reference on docstring
patch by romjerome

fixed wrong doc string in srcref.py

svn: r12949
2009-08-10 19:46:24 +00:00
Raphael Ackermann
65f72560d1 pep8 fixes
fixing typos


svn: r12934
2009-08-09 17:09:32 +00:00
Doug Blank
d5a9ffe96a Made StyledTextTag a new-style class by extending object; allows to work with older python's too
svn: r12859
2009-08-02 05:25:37 +00:00
Benny Malengier
2a365f4d99 improve docstrings
svn: r12797
2009-07-15 09:16:39 +00:00
Benny Malengier
dddcb10dd3 docstring update
svn: r12758
2009-07-03 09:23:07 +00:00
Benny Malengier
2b2f132d8c add ldsordbase to api doc
svn: r12753
2009-07-02 08:28:29 +00:00
Gerald Britton
0351c2e6ca GrampsType: Avoid retranslating literal strings; rearrange metaclass code
svn: r12742
2009-06-30 18:29:45 +00:00
Gerald Britton
fdfacd972c Minor tweaks to use slices instead of lists of items
svn: r12705
2009-06-25 13:41:16 +00:00
Benny Malengier
a52bc62be9 2691: Create api documentation with sphinx
svn: r12704
2009-06-24 21:56:07 +00:00
Gerald Britton
8584798916 person.py: minor performance improvements
svn: r12625
2009-06-04 19:00:51 +00:00
Gerald Britton
5eb7e18dc6 Bug 3018: ImportGrdb: remove calls to keys() dictionary method where possible
svn: r12572
2009-05-26 20:48:09 +00:00
Gerald Britton
021b754939 Bug 3011: change old-style classes to new-style classes
svn: r12559
2009-05-21 17:19:50 +00:00
Gerald Britton
e3bd5d1e69 Fix ownereditor popup menu handling
svn: r12550
2009-05-19 20:07:00 +00:00
Benny Malengier
53716bdca0 2942: Note in Family eventref not referenced, also source of attribute of family eventref
svn: r12535
2009-05-18 14:02:13 +00:00
Doug Blank
29d55c10d0 added http:// if missing scheme
svn: r12510
2009-05-06 22:06:12 +00:00
Doug Blank
6ebd0b0a77 Added two methods: parse_path and get_full_path, but the Url class will need to be enhanced and refined to be more useful for web development
svn: r12506
2009-05-06 13:11:31 +00:00
Doug Blank
0e6d1d8496 2792: Dates in sourcereferences in person_ref_list not upgraded; hack to be removed in future
svn: r12271
2009-03-09 14:10:51 +00:00
Jérôme Rapinat
160b4e3c6f #2746: Translation problem in calendar names (by Janne Kovesjärvi)
svn: r12126
2009-02-26 09:13:50 +00:00
Jérôme Rapinat
82787f0413 2702: Date Conversions to and from French Republican was broken
svn: r11995
2009-02-15 15:10:15 +00:00
Peter Landgren
a34cf168f3 Working now with all keywords in English.
svn: r11963
2009-02-11 13:14:56 +00:00
Peter Landgren
e3ae9deb76 Added tests for Swedish calendar
svn: r11962
2009-02-11 08:32:54 +00:00
Raphael Ackermann
baef4d76a4 fixed indentation issues and mix of tabs and spaces.
svn: r11943
2009-02-09 23:37:40 +00:00
Doug Blank
9eac556fca Removed problem method set(): Bug #2669: Note editor does not retain marker
svn: r11844
2009-02-04 12:51:34 +00:00
Jérôme Rapinat
40d99c2b4e revert changes, using ngettext
svn: r11761
2009-01-30 10:36:23 +00:00
Jérôme Rapinat
d1918cc259 mistakes on context
svn: r11715
2009-01-25 13:11:27 +00:00
Jérôme Rapinat
0034c7c02c translation support and use TransUtils for context
svn: r11703
2009-01-24 09:40:55 +00:00
Jérôme Rapinat
28ee7ee1a8 #445: B.C.E and dates conversion on french_calendar
svn: r11681
2009-01-22 10:15:01 +00:00
Peter Landgren
3fc705f784 Typo fixed.
svn: r11674
2009-01-20 13:03:28 +00:00
Peter Landgren
f6320f0432 Removed debug stuff.
svn: r11672
2009-01-20 10:02:19 +00:00
Peter Landgren
a73b2da699 Swedish calendar added.
svn: r11665
2009-01-19 20:09:19 +00:00
Doug Blank
0887ab1ac9 Handle date differences when one is a newyear other than Jan1
svn: r11646
2009-01-17 17:11:34 +00:00
Doug Blank
ed35e1de38 Bug fix #1834, 1842: new-year boundaries in history, and editing slash dates: These changes allow the date editor dialog to change slashdates, and to change the first day of the year from Jan1. This is important for some date calculations and orderings. In order to do this, a new date format variation has been added. You can put Mar1, Mar25, or Sept1 in the parens with or without a Calendar type. For example: 'Jan 1, 1735 (Julian,Mar25)'. See further docs in wiki.
svn: r11644
2009-01-17 14:33:10 +00:00
Doug Blank
2170b850ee Bring date_test up to date with new Span format; passes 100%
svn: r11643
2009-01-17 14:24:57 +00:00
Doug Blank
2ed7f7becb Translation clauses: about, less than, greater than, etc.
svn: r11567
2009-01-04 18:17:33 +00:00
Doug Blank
8658f5a074 Added a __getitem__ method to date Spans which should eventually be removed. I belive that only the Det*Reports.py use them.
svn: r11566
2009-01-04 18:05:26 +00:00
Doug Blank
61ca9201b5 Changes in the manner that date differences are represented and compared
svn: r11565
2009-01-04 17:44:33 +00:00
Doug Blank
dc2c438231 Refinements to give more feedback on probably alive; use CAUSE_DEATH as additional evidence for death; date span shows (unknown) for invalid differences.
svn: r11556
2009-01-01 00:58:18 +00:00
Doug Blank
6d2cc418e4 Fix for #2303: plugins/Det*Report.py use an outdated method of computing ages. This fix brings it up to date, but needs some additional work once date spans can fully repr themselves.
svn: r11549
2008-12-31 14:49:24 +00:00
Doug Blank
a156156394 Fixed a bug in negative date differences; enhanced Span repr (shows days, if short enough)
svn: r11532
2008-12-28 05:44:01 +00:00
Doug Blank
323ac9257f Added len to Span class, and added an is_valid method to date. is_valid similar to is_regular, but allows partial dates
svn: r11528
2008-12-27 21:31:16 +00:00
Doug Blank
fadeb3744e Added lt and gt for date span comparisons
svn: r11523
2008-12-27 16:40:25 +00:00
Doug Blank
42b00f04f4 Added a test for negative date differences
svn: r11522
2008-12-27 16:29:46 +00:00
Doug Blank
a11d819296 Date spans that are negative show with negative year, month, and day
svn: r11521
2008-12-27 16:07:36 +00:00
Doug Blank
246f76621a Added to display age at death if dead, or current age if alive
svn: r11471
2008-12-14 14:52:54 +00:00
Peter Landgren
475da86de2 Fix of issue 2505. Also fix of string and unicode problems in matching
svn: r11336
2008-11-22 15:35:14 +00:00
Gary Burton
d682a1dcde Fix for bug when deleting birth and death events. Bug #2456
svn: r11191
2008-10-25 11:36:56 +00:00
Gerald Britton
8cb51d4392 fix typo in property call
svn: r11068
2008-09-16 14:07:29 +00:00
Gerald Britton
5e290c4329 Remove __slots__, __getstate__ and __setstate__
svn: r11049
2008-09-09 19:54:27 +00:00
Gary Burton
b6ed9d389d Stop media editor prompting to save changes on cancellation when none made. Bug #2364
svn: r11029
2008-09-06 09:18:57 +00:00
Gerald Britton
882199f1c2 Replace dict.has_key(x) with x in dict for performance gain
svn: r10874
2008-07-17 18:10:32 +00:00