Commit Graph

21659 Commits

Author SHA1 Message Date
Vassilii Khachaturov
b4404ad392 use logging.warning in old cases in this file, too 2013-11-27 17:57:50 +02:00
Vassilii Khachaturov
8299866f3c 7212: convert invalid date to text on .gw import
Implement the feature.
2013-11-27 17:56:09 +02:00
Vassilii Khachaturov
1ac0e2a0bc 7212: convert invalid date to text on .gw import
Add a failing test demonstrating the feature to be implemented...
2013-11-27 17:54:44 +02:00
Vassilii Khachaturov
3af50b0bea 7212: convert invalid date to text on import
Consolidate the new logic with the older code -- now malformatted
dates, as well as well-formatted invalid ones, will also be
converted to text.
2013-11-25 12:39:46 +02:00
Vassilii Khachaturov
b3259d0a00 7212: convert invalid date to text on import
Switch vcard birthday import code to use the validating Date.set
and catch the exception, convert to text mode if caught.
2013-11-25 12:39:46 +02:00
Vassilii Khachaturov
4d9381589a 7212: convert invalid dates to text on import
Make log message from [dfc3cc] use named arguments for l10n.
Thanks to Paul Franklin for finding this during code review.
2013-11-25 10:55:07 +02:00
Vassilii Khachaturov
3fdaa4ff52 7198, 7212: document DateError.date
See also [8e1659]
    7198, 7212: attach invalid date to DateError
2013-11-23 21:43:42 +02:00
Vassilii Khachaturov
175213b902 remove DateError from date.py
The exact copy existing in errors.py should suffice.
2013-11-23 21:38:34 +02:00
Doug Blank
28095ac397 Changes to serve static admin files for Django 1.5.4 2013-11-23 08:16:52 -05:00
Vassilii Khachaturov
dfc3ccea45 7212: convert invalid dates to text on import
If the date is invalid, it will be converted to text mode,
and the text field will be set to the problematic XML.
A warning will be printed on the console as well.
The log message will use the invalid date attached as
DateError.date, see [8e1659].
2013-11-17 20:22:14 +02:00
Vassilii Khachaturov
86dc84470e 7212: convert invalid dates to text on import
unit tests
2013-11-17 20:14:17 +02:00
Vassilii Khachaturov
b770de1a10 7198: Date editor crashes on invalid date
Revalidate the date upon every change, and disable
OKing the dialog when it is not valid, for usability review.

If it is not good, we can always revert this commit.
2013-11-16 23:47:50 +02:00
Vassilii Khachaturov
b1d040deb1 7198: Date editor crashes on invalid date
give a name to the OK button instead of an autogenerated id
2013-11-16 23:16:14 +02:00
Doug Blank
e0de21041c Don't add notes etc on import into temp dictionary used for diff and sync 2013-11-16 14:13:12 -05:00
Vassilii Khachaturov
3999cd2e70 7198: Date editor crashes on invalid date
Trying out the approach preferred by Nick, see 7198:32708
2013-11-16 17:53:01 +02:00
Vassilii Khachaturov
8e16599940 7198, 7212: attach invalid date to DateError
when Date.set throws during the date fields sanity
check validation, it now attaches an (undocumented) .date field
to the exception -- proof of concept for 7198 and potentially
for 7212 as well
2013-11-16 17:51:18 +02:00
Doug Blank
a3749090aa Protect 3-min refresh if buffer is empty 2013-11-16 09:29:45 -05:00
Vassilii Khachaturov
d8acf8e875 7198: Date editor crashes on invalid date
Improve user experience as promised in [98d8e6].
Now, if one clicks OK in the date editor and the date is invalid,
it's switched into text mode and the dialog remains open,
so the user can either correct the date or type it as text,
no more loss of entered data happens.
2013-11-16 10:21:12 +02:00
Vassilii Khachaturov
98d8e64e04 7198: Date editor crashes on invalid date
Now it just autoconverts into MOD_TEXT and returns whatever
text was there. This fixes the crash on the master branch,
but is not the final user experience yet.
2013-11-15 22:26:41 +02:00
Vassilii Khachaturov
89a822507a 7198,7212: fix Date.set(value=None) 2013-11-15 22:23:54 +02:00
Nick Hall
13438a74d6 Add gui.widgets section to the documentation 2013-11-15 19:13:29 +00:00
Vassilii Khachaturov
a90139cb9a 7197, 7100: missing recalc_sort_value in ny code
Fix bug #7197
2013-11-15 15:04:03 +02:00
Vassilii Khachaturov
baae6ac615 7197: readjust sanity date wrt newyear/slash
Attempt to fix the failing
 DateHandlerTest.test_invalid_month_with_ny
(see 7197:32625). Tests still fail, investigation shows
there's a problem in Date.set setting Julian+Mar25 date even if the
date validation check is disabled by inserting a return before
the validation block, i.e., before this line
        if modifier != Date.MOD_TEXTONLY:
which seems to be the root cause of the remaining failing tests.

To investigate, add the return and try
LC_ALL=en_GB.utf8 LANG=en_GB.utf8 GRAMPS_RESOURCES=$PWD \
 python -m unittest -v \
 gramps.gen.lib.test.date_test.MatchDateTest.test_match
2013-11-14 22:51:01 +02:00
Vassilii Khachaturov
93ca90f3b8 7197: more failing tests 2013-11-14 22:51:01 +02:00
Vassilii Khachaturov
4147721112 7197: refactor code
extract Date._adjust_newyear out of Date.set
2013-11-14 22:51:00 +02:00
Vassilii Khachaturov
b3ab87bc5a 7197: refactor code
replace all copies of logging with a single point at the exception
rethrow point
2013-11-14 22:51:00 +02:00
John Ralls
c5f0c7a6f0 Bug 7191: Cursor keys just beep on PPC with Gramps 3.4.6
It's actually on both PPC and Intel, and it's from forgetting to update
gramps.accel after upgrading Gtk past 2.24.10, which changed the mapping
of alt/option from Mod5 to Mod1.

For gramps40 and master, the problem was masked by the bundler putting
the file in the wrong directory.
2013-11-14 10:19:35 -08:00
Nick Hall
5e1cd88bcb Improve gui documentation 2013-11-14 18:11:06 +00:00
Doug Blank
2e746a21da Working on get_schema(type) to provide a self-documenting infrastructure 2013-11-14 09:23:52 -05:00
Doug Blank
97f3a1d9ae Updated Django backend to new Place changes; import/export working--need verification 2013-11-14 00:26:06 -05:00
Nick Hall
19b39b5dc0 Improve date handler documentation 2013-11-13 18:41:52 +00:00
Nick Hall
55a3c9813f Improve cli documentation 2013-11-13 17:40:16 +00:00
Vassilii Khachaturov
c4daa151a5 7197: date sanity check breaks on Julian+Mar25
Date.convert_calendar resets the new year setting to 0,
so the sanity check fails. Commit the initial fix that
unblocks the failing test.
2013-11-13 17:39:47 +02:00
Vassilii Khachaturov
78cae43a32 7197: better diagnostics from test for debugging
Use unittest -v/--verbose flag to trigger it.
2013-11-13 16:59:26 +02:00
Vassilii Khachaturov
bbd6cc87d5 ignore swap files 2013-11-13 16:37:52 +02:00
Vassilii Khachaturov
626353a0b3 7197: failing test demonstrating the bug 2013-11-13 13:52:47 +02:00
Vassilii Khachaturov
dc278569c1 RU: minor libnarrate translation fix 2013-11-13 10:15:41 +02:00
Doug Blank
41f8df9a94 Don't show stack variables; redo this and dump to a file 2013-11-12 21:50:10 -05:00
Doug Blank
732743cec5 Missing methods on dictDB; added tests for setting struct 2013-11-12 20:09:04 -05:00
Nick Hall
3ef1c02155 Improve simple access documentation 2013-11-12 22:38:27 +00:00
Doug Blank
88f3cfa3f7 Working on setting structs 2013-11-12 17:18:06 -05:00
Nick Hall
8fd71fd9f0 Improve documentation for relationship calculator 2013-11-12 22:15:37 +00:00
Nick Hall
ceb3f44205 Improve gen.utils documentation 2013-11-12 21:44:01 +00:00
Doug Blank
2c1ba1496b Working on select/update from Struct 2013-11-12 15:24:15 -05:00
Nick Hall
f80e6422a3 Improve gen.proxy documentation 2013-11-12 18:03:20 +00:00
Nick Hall
1bd893f9f0 Improve gen.plug documentation 2013-11-12 16:28:24 +00:00
Nick Hall
37f0d9c9df Improve gen.display documentation 2013-11-12 00:12:32 +00:00
Nick Hall
6eab64c901 Improve gen documentation 2013-11-11 23:38:26 +00:00
Nick Hall
1ef6a987da Improve gen.lib documentation 2013-11-11 23:10:35 +00:00
Nick Hall
200e476530 Add PlaceType and PlaceRef to documentation 2013-11-11 15:55:04 +00:00