Commit Graph

224 Commits

Author SHA1 Message Date
Michiel Nauta
0eb166615b Replace bare except by specific exception.
svn: r16606
2011-02-11 18:29:15 +00:00
Michiel Nauta
1231b1cac8 4590: Error on access of LDS editor when sealed to family has been removed.
svn: r16592
2011-02-09 16:03:52 +00:00
Benny Malengier
60e8c0c013 3975: Accessing an incompatible database corrupts the database
Undoing unset of DB_RECOVERY flag, we need it to have ACI(D) database


svn: r16562
2011-02-03 22:23:36 +00:00
Benny Malengier
6d596ad987 4198: Person view does not remove a row correctly when two people are merged.
This is a major patch by Michael Nauta. It means all writes happen immediately to bsddb, and the bsddb 
rollback is used on a crash. Transaction is no longer used to store changes and do them on commit.
Undo database is set on end. 
At the same time with statement is used throughout for transactions
At the same time, the original bug in merge code should be fixed
Still some issues, that will be ironed out


svn: r16523
2011-01-31 21:54:58 +00:00
Benny Malengier
9a2fd50642 Changes to allow a QML interface:
* a const to launch it
 * fix an error in obtaining dbname
 * refractor pieces to allow reuse


svn: r16504
2011-01-30 16:28:54 +00:00
Benny Malengier
4313de6f72 Fix bug in bsddb 4.7 by moving the NOSYNC setting before env open
svn: r16460
2011-01-24 19:34:59 +00:00
Benny Malengier
4e261e9bf8 Still write to log synchronously, don't flush
svn: r16449
2011-01-23 21:54:56 +00:00
Benny Malengier
b3beba53d8 Some bsddb changes
* allow to use bsddb3 as database via a config setting
  * set async write to disk to improve speed, eg import * 40


svn: r16446
2011-01-23 21:25:51 +00:00
Benny Malengier
198e222e91 correct typo in error message
svn: r16371
2011-01-13 09:48:00 +00:00
Benny Malengier
d127992b0d string change update
svn: r16368
2011-01-12 08:57:44 +00:00
Gerald Britton
5e33e5e81d remove obsolete code
svn: r16292
2010-12-16 21:08:41 +00:00
Gerald Britton
cd81324e9a remove obsolete code
svn: r16291
2010-12-16 21:03:39 +00:00
Doug Blank
d9b544c17a 4415: Editing ID format in preferences can throw exception
svn: r16227
2010-11-23 04:01:02 +00:00
Doug Blank
b439b377eb 3975: Accessing an incompatible database corrupts the database
svn: r16212
2010-11-19 01:08:07 +00:00
Benny Malengier
e59b7276b4 4333: memory leak in 3.2
svn: r16091
2010-10-31 08:36:03 +00:00
Benny Malengier
1fee4971f4 4333: memory leak in 3.2
svn: r16089
2010-10-31 07:33:17 +00:00
Nick Hall
d5ce999d30 Only convert main location to new format if it exists
svn: r16087
2010-10-30 21:55:39 +00:00
Benny Malengier
5084294a1e Various fixes for GEP21 and locality
* narweb and webcal works again
* proxy filters work
* locality upgrade in repository
* fix progress on upgrade



svn: r16074
2010-10-28 19:56:46 +00:00
Nick Hall
298827d843 GEPS 006: Add Locality field to Location
svn: r16063
2010-10-27 18:13:53 +00:00
Benny Malengier
209b34f359 various fixes and additions for GEP 021'
svn: r16043
2010-10-24 21:38:56 +00:00
Benny Malengier
e109e3d743 Merged geps21 branch, changes r15866-16034, into trunk
svn: r16035
2010-10-24 14:43:47 +00:00
Nick Hall
c3e527b4fb GEPS 011: Tagging - Extended to Family, Note and Media objects
svn: r16025
2010-10-22 23:22:33 +00:00
Benny Malengier
5013162ded A new person editor
svn: r15951
2010-10-03 11:39:47 +00:00
Benny Malengier
371205ec70 Fix surname index for autocompletion
Fix check tool and start with importgrdb upgrade


svn: r15949
2010-10-02 16:01:34 +00:00
Benny Malengier
0ca48dd811 Working xml export
svn: r15948
2010-10-02 13:38:36 +00:00
Peter Landgren
7abb29d568 Consistent use of OS detection and host added to Win users.
svn: r15932
2010-09-27 17:54:22 +00:00
Benny Malengier
f111dcbad9 add nick and famnick
svn: r15930
2010-09-25 15:11:54 +00:00
Nick Hall
f748668c89 GEPS 011: Tagging - Converted to use new database table object
svn: r15921
2010-09-21 17:52:37 +00:00
Benny Malengier
bb248fadce Good progress: * name displayer updated to new structure
* person view coded updated
               * small change in dbloader so errors can be seen


svn: r15914
2010-09-17 22:13:31 +00:00
Nick Hall
a151bafaff Fix database upgrade
svn: r15832
2010-08-30 10:36:58 +00:00
Nick Hall
bf8146b9d1 GEPS 011: Tagging
svn: r15830
2010-08-29 18:36:42 +00:00
Doug Blank
7151e07d3a Rewrote autoremove flag workaround
svn: r15795
2010-08-22 06:33:06 +00:00
Doug Blank
fcef732f93 Added dbid and dbname to databases; id is the unique dir name, and name is the assigned name stored in text file
svn: r15786
2010-08-21 20:20:34 +00:00
Doug Blank
791ab064f8 Renamed GrampsCursor to BsddbBaseCursor
svn: r15689
2010-08-08 22:06:54 +00:00
Doug Blank
3e28ee67ec 2059: need a way to compare and merge all objects, by MD Nauta
svn: r15645
2010-07-22 02:16:32 +00:00
Doug Blank
8a25a77c9f Removed .get_base_db() method as there was already basedb for the same purpose
svn: r15484
2010-05-25 23:29:37 +00:00
Doug Blank
a69337b6c6 method for getting base database, if a proxy
svn: r15465
2010-05-23 15:44:51 +00:00
Gerald Britton
6369bb0286 Minor edit
svn: r15428
2010-05-20 18:32:36 +00:00
Gerald Britton
cd8ded4b37 Updates to undo/redo logic:
1. Replace single transaction list with separate undo/redo deques
2. Update UndoHistory GUI to work with new queue setup
3. Add test to txn.py for empty transaction list


svn: r15427
2010-05-20 18:32:08 +00:00
Doug Blank
2df0322aef 3958: Extremely slow gedcom import
svn: r15400
2010-05-13 11:08:20 +00:00
Gerald Britton
72e19bb7a9 Updates to undo/redo logic -- part 1
svn: r15277
2010-04-23 19:02:24 +00:00
Raphael Ackermann
08728c6bd4 doc typos
svn: r15022
2010-04-04 11:03:43 +00:00
Doug Blank
77feae36e2 3609: Can't open a gramps 3.1 database from trunk on Windows 7 64 bit from Gramps 3.2
svn: r14983
2010-04-01 01:19:04 +00:00
Benny Malengier
6b1c15db54 3783: NewPerson Dialogue: "available surname list" shows each occurrence of a family name instead of one per family name
svn: r14975
2010-03-30 13:41:23 +00:00
Doug Blank
bbf2bfe654 Commented out set_pagesize to be compatible with previous versions of gramps (gramps31).
svn: r14880
2010-03-20 13:06:54 +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
Gerald Britton
cd90261ff0 Bug 003611: delete/undo/delete sequence causes crash
svn: r14389
2010-02-15 14:14:35 +00:00
Benny Malengier
c76159ab9d 3580: People list (private handlers) and display Name format
in reality: associations are not removed on delete person


svn: r14384
2010-02-15 12:13:43 +00:00
Gerald Britton
4268634b1f Remove method that is now unused as a result of changes in rev. 14179
svn: r14183
2010-02-01 18:30:16 +00:00
Benny Malengier
a89e8d1d18 Remove column config from db, move to the plugins
Start with reuse of preferences for all configuration
Allow all view plugins to set configuration dialog
TODO: activate the column reorder in config of listviews


svn: r14176
2010-02-01 07:01:45 +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
Doug Blank
e5d14f59c1 Fixed DbDjango's
svn: r14112
2010-01-24 13:55:39 +00:00
Doug Blank
2d36aea65a Added doc notes on new database hierarchy
svn: r14111
2010-01-24 13:47:48 +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
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
Gerald Britton
a4b22193c2 Use defaultdict instead of dict to simplify code and improve performance
svn: r14060
2010-01-13 15:46:12 +00:00
Doug Blank
f415159d6f Revised iterable table interface; removed DbEngine and DbTable
svn: r14048
2010-01-12 18:38:39 +00:00
Doug Blank
95bb81a54c Missing underscore
svn: r14036
2010-01-11 20:34:47 +00:00
Doug Blank
bdefba55ca Towards an DbEngine, for a variety of reasons
svn: r14035
2010-01-11 19:45:17 +00:00
Brian Matherly
252ef6daee Continued work on GEP008: Move BasicUtils/UpdateCallback.py to gen/updatecallback.py.
svn: r14025
2010-01-10 20:21:10 +00:00
Brian Matherly
7aec8904ea Remove gen.db.iterator.py - it is not used.
svn: r13979
2010-01-06 04:44:09 +00:00
Doug Blank
a61a472668 Missing gettext
svn: r13927
2009-12-27 13:49:15 +00:00
Doug Blank
06d0291ff4 Refinements on database hierarchy
svn: r13907
2009-12-24 14:38:39 +00:00
Doug Blank
ab3dfe1415 3465: Create a new hierarchy of base classes for gramps cor databases (read, write) and add methods
svn: r13894
2009-12-23 15:55:58 +00:00
Doug Blank
172988ff36 Apparently gen.proxy.dbbase and gen.db.dbdir are not needed anymore; edited support files too
svn: r13888
2009-12-22 22:53:25 +00:00
Doug Blank
699dcb13fe Fixed svn Id property
svn: r13881
2009-12-21 13:43:50 +00:00
Doug Blank
3a8b4d7e40 Moved fallback functions from Db to gen.utils
svn: r13876
2009-12-21 05:58:55 +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
Brian Matherly
814d721f68 Remove QuestionDialog dependency from gen. The database now raises exceptions and the GUI generates the question dialog.
svn: r13865
2009-12-20 22:44:32 +00:00
Doug Blank
c47b494b39 Cleaning up Utils and refactoring common functionality
svn: r13862
2009-12-20 22:21:59 +00:00
Brian Matherly
806bd63ca2 Continued work on GEP008: Move GrampsDbUtils/_Backup.py to gen/db/backup.py.
svn: r13856
2009-12-20 04:30:28 +00:00
Doug Blank
785184e74f 3339: [Patch] Views get their column display data from db (meta); should get from config ini
svn: r13709
2009-12-05 06:52:53 +00:00
Peter Landgren
900d1c57f4 Second update for consistent use of Gramps. See issue 3355.
svn: r13611
2009-11-17 20:45:58 +00:00
Peter Landgren
33686fcf18 First update for consistent use of Gramps. See issue 3355.
svn: r13610
2009-11-17 20:14:53 +00:00
Doug Blank
f272ce3dd1 Move gtk-based items out of scope of import for cli
svn: r13599
2009-11-16 22:39:54 +00:00
Benny Malengier
1b556586a4 3275: PageView reworking main work by Nick Hall
Moving personview to the new pageview classes, and using a generic 
treebasemodel


svn: r13515
2009-11-07 13:04:45 +00:00
Gerald Britton
f186d8bce8 fix bug on database errors; remove bsddb transaction for batch operations
svn: r13283
2009-10-01 20:38:23 +00:00
Gerald Britton
9b586eaf4f 1. Enhance cursor.py to support updating records after reading them
2. Implement enhancement in write.py, get_cursor method
3. Exploit new capability in ChangeNames.py

svn: r13237
2009-09-23 20:07:58 +00:00
Gerald Britton
311d9b16b9 Silently accept "not found" errors when deleting database files
svn: r13215
2009-09-16 20:31:28 +00:00
Gerald Britton
966d2bcd42 Use new iter_objects methods
svn: r13203
2009-09-14 20:50:25 +00:00
Gerald Britton
03dc41bff9 Documentation updates
svn: r13183
2009-09-09 14:43:55 +00:00
Gerald Britton
768ea89a0f Remove deprecated method
svn: r13164
2009-09-07 16:22:12 +00:00
Gerald Britton
54d4bf6134 Add function decorator to catch dabatase errors
svn: r13163
2009-09-07 16:19:59 +00:00
Gerald Britton
be1aaf9f7b restore set_name_group_mapping method
svn: r13161
2009-09-05 23:03:31 +00:00
Gerald Britton
06458ae1d7 Remove unused methods
svn: r13159
2009-09-04 17:57:00 +00:00
Gerald Britton
20bfbc8719 add from __future__ import with_statement
svn: r13158
2009-09-04 17:20:37 +00:00
Gerald Britton
ee9f1e82e0 Tweaks to database objects plus initial documentation in rst format
svn: r13157
2009-09-03 19:44:01 +00:00
Gerald Britton
3564b04584 1. Implement iter_<object> methods in proxybase.
2. Change include_object to include_media_object to avoid confusion
3. Make _validated_id_prefix method in read.py a staticmethod
4. Use new iter_<objects> methods in Records.py, StatsgGramplet.py, GivenNameGramplet.py, ExtractCity.py and _IsSiblingOfFilterMatch.py as examples

svn: r13151
2009-09-02 20:10:45 +00:00
Gerald Britton
5fc1618a85 1. Use closures to define iterator methods
2. Change sorts on people and places to work like other sorts

svn: r13149
2009-09-01 17:46:08 +00:00
Gerald Britton
00d6b8cd50 Fix write.py to do imports from gen.db
svn: r13148
2009-09-01 17:43:54 +00:00
Gerald Britton
4e8f59c4bd grampsdbtxn.py module renamed to txn.py
svn: r13141
2009-08-31 19:07:41 +00:00
Gerald Britton
1587cb8ad1 Implement restructured database objects
svn: r13139
2009-08-31 18:42:29 +00:00
Gerald Britton
ae404f496f Latest updates to new modules
svn: r13101
2009-08-21 20:06:11 +00:00
Benny Malengier
5700f6ab66 2863: Wrong row when dropping on embedded list
This patch makes sure open of old database shows correct columns, and 
adds ... if several main participants


svn: r13085
2009-08-20 09:31:10 +00:00
Benny Malengier
5f0c935256 2773: Primary participant(s) in Events View
svn: r13083
2009-08-19 22:27:06 +00:00
Gerald Britton
5b8bc47bce Update makefile to add new modules
svn: r13080
2009-08-19 20:30:40 +00:00
Gerald Britton
b4b9675feb cursor.py -- add additional methods mirroring those in DBCursor and a getattr method to pass through non-overridden method calls to DBCursor
svn: r13079
2009-08-19 17:14:32 +00:00
Gerald Britton
c8f7bf0c69 Add new modules to support restructured database objects
bsddbtxn.py -- Wrapper for BSDDB DBTxn to support context manager protocol
    txn.py      -- GrampsDbTxn class to manage atomic transactions
    write.py    -- GrampsDbWrite class for read/write databases
    read.py     -- GrampsDbRead class for read-only databases
    undoredo.py -- GrampsDbUndo class to manage the undo database
    upgrade.py  -- Helper module for upgrading a database at open time


svn: r13078
2009-08-19 17:05:39 +00:00
Raphael Ackermann
b33a53e487 fixed typos
svn: r12937
2009-08-09 22:43:43 +00:00
Raphael Ackermann
65f72560d1 pep8 fixes
fixing typos


svn: r12934
2009-08-09 17:09:32 +00:00