Commit Graph

249 Commits

Author SHA1 Message Date
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
Peter Landgren
9b1109a99a Added missed file.
svn: r14130
2010-01-25 08:44:59 +00:00
Peter Landgren
1631ae7de1 Added missed files.
svn: r14129
2010-01-25 08:41:28 +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
Jérôme Rapinat
d9ad7798bc 3105: general base objects
svn: r14093
2010-01-18 14:57:54 +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
16808b6c0e Add missing import
svn: r14000
2010-01-08 21:46:36 +00:00
Gary Burton
f58e700e86 New source filter which counts repository references
svn: r13958
2010-01-02 12:33:18 +00:00
Doug Blank
699dcb13fe Fixed svn Id property
svn: r13881
2009-12-21 13:43:50 +00:00
Doug Blank
e02df43a66 Fixed incorrect fix (thanks Gerald)
svn: r13827
2009-12-16 18:55:45 +00:00
Doug Blank
cdce67a646 Removed some of the too-many progress updates
svn: r13818
2009-12-16 01:50:17 +00:00
Doug Blank
69315dc4ba Fixes for some existing filters, and new 3240: New filter to find connections between people by spidering over the database
svn: r13816
2009-12-15 22:12:42 +00:00
Brian Matherly
0001133eb8 move src/widgets/* to src/gui/widgets as part of GEP008
svn: r13791
2009-12-14 03:20:19 +00:00
Gerald Britton
a82b115192 Tweaks
svn: r13752
2009-12-10 21:06:00 +00:00
Jérôme Rapinat
15f9344340 3391: Some sentences missed the final dot
svn: r13674
2009-11-26 11:13:44 +00:00
Benny Malengier
a477d5bc7d 3106: Unable to use People with a common ancestor with <filter> match rule
svn: r13649
2009-11-22 08:44:04 +00:00
Peter Landgren
8cfd607ed5 Update for consistent use of ZIP/Postal code. See issue 3355.
svn: r13612
2009-11-17 20:53:19 +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
99282aa715 3272: Proposal for updating config settings
svn: r13346
2009-10-08 01:12:51 +00:00
Gerald Britton
fa0805dc60 Bug 0003063: gtk.Tooltips is deprecated -- first batch of updates
svn: r13335
2009-10-07 18:15:18 +00:00
Gerald Britton
9a21141c42 Bug 0003230: Error while deleting family selected by any filter.
svn: r13320
2009-10-06 20:19:56 +00:00
Gerald Britton
44ccad19c4 Replace dictionaries with sets and set logic where possible
svn: r13308
2009-10-05 18:04:33 +00:00
Gerald Britton
6246ba97aa Change dictionaries to sets and use set logic where possible
svn: r13288
2009-10-02 20:03:39 +00:00
Gerald Britton
1e5b2c02ed Replace dictionaries with sets and use set logic where appropriate
svn: r13278
2009-09-30 20:15:12 +00:00
Gerald Britton
4b77831f0f Exploit new iter_<objects> methods
svn: r13209
2009-09-15 19:37:23 +00:00
Gerald Britton
966d2bcd42 Use new iter_objects methods
svn: r13203
2009-09-14 20:50:25 +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
Peter Landgren
370efe7566 Issue 3188 search for ü did not work.
svn: r13124
2009-08-27 19:45:04 +00:00
Jérôme Rapinat
567721323d 2548: deprecated system_filter.xml
svn: r13087
2009-08-20 12:27:29 +00:00
Benny Malengier
a111d627eb 03172: Error editing event filter
svn: r13066
2009-08-18 20:18:10 +00:00
Raphael Ackermann
9aeeb8432c 0002723: '<name>' has different meanings in different contexts
svn: r13019
2009-08-15 09:44:49 +00:00
Raphael Ackermann
874d43f2aa 0002070: Event Comparison Tool filter list doesn't update with new filter
remove old unused libglade menu in _FilterMenu

svn: r12855
2009-08-01 16:09:17 +00:00
Gerald Britton
7be4c7a2bf Add ability to use Rule in a boolean operation: "if Rule()" will be equivalent to "if Rule.apply()"
svn: r12845
2009-07-28 18:18:56 +00:00
Gerald Britton
0ae751e916 remove sort_handles=False parameters from iter_person_handles calls
svn: r12800
2009-07-15 14:48:11 +00:00
Gerald Britton
f680992d04 Tweaks
svn: r12775
2009-07-08 16:10:13 +00:00
Gerald Britton
2769b58a44 Implement iter_people_handles methods and begin to use them - second batch of updates
svn: r12774
2009-07-07 18:58:47 +00:00
Jérôme Rapinat
7a235029d8 typo
svn: r12773
2009-07-07 09:44:19 +00:00
Benny Malengier
2b49568b1f 3073: Add/edit personfilter is VERY slow in one database
svn: r12749
2009-07-01 10:59:24 +00:00
Benny Malengier
f07a12766a Further optimization in the flatbasemodel:
* keep list of all possible keys in memory so database is no longer touched 
     for the searches. ==> a search is faster
   * bug fixes to previous patch set: show total and displayed number correctly


svn: r12726
2009-06-29 13:37:15 +00:00
Jérôme Rapinat
83dfb87696 2831: missing filter rule on Event object matching source reference
svn: r12706
2009-06-25 17:20:29 +00:00
Benny Malengier
9d417e2cd6 Split Utils in a non GUI and GUI part
move GrampsCfg utils to Utils
improve import strategy


svn: r12680
2009-06-19 15:23:58 +00:00
Gerald Britton
70a0c50fca Use GrampsCursor as a context manager using "with" statement
svn: r12672
2009-06-16 15:49:17 +00:00
Benny Malengier
f4e0a45fad code optimization of eventbase filters
svn: r12668
2009-06-15 19:06:25 +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
fc90d5fce2 Bug 3018: remove calls to keys() dictionary method where possible
svn: r12562
2009-05-22 18:43:40 +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
29ff457d25 Bug 2888: Export plugins - convert from libglade to gtkbuilder
svn: r12456
2009-04-16 19:29:40 +00:00
Joan Creus
8d7518c994 Improving help messages
svn: r12277
2009-03-09 18:35:16 +00:00
Joan Creus
7eb2b83812 Fixing typos
svn: r12275
2009-03-09 18:28:34 +00:00
Jérôme Rapinat
36fcdac888 mistake on names and descriptions (after date)
svn: r12095
2009-02-23 18:21:56 +00:00