Compare commits

..

220 Commits

Author SHA1 Message Date
Serge Noiraud d5b0d2e347 ODFDoc : Issue 2576 : change run-through form background to foreground.
svn: r14920
2010-03-24 06:44:54 +00:00
Raphael Ackermann d6e1ebf801 0002857: Spacebar doesn't activate embedded edit buttons
svn: r14869
2010-03-19 14:59:53 +00:00
Joan Creus 236028d808 Updating translation
svn: r14776
2010-03-12 16:59:21 +00:00
Joan Creus 3c6253d4ff Minor corrections
svn: r14669
2010-03-07 16:50:18 +00:00
Joan Creus ca154e46cd Updating translation
svn: r14656
2010-03-06 23:31:12 +00:00
Erik De Richter d087a88d93 update nl translation
svn: r14419
2010-02-20 17:44:16 +00:00
Rob G. Healey 498284b2ba Fixed a bug in Alphabet Navigation which had the wrong screen width. Thank you, Phillip Olsson, for pointing it out.
svn: r14416
2010-02-20 14:00:49 +00:00
Arturas Sleinius 84eb262c26 Updated Lithuanian translation
svn: r14401
2010-02-16 13:40:41 +00:00
Benny Malengier 497cc66a20 3580: People list (private handlers) and display Name format
in reality: associations are not removed on delete person


svn: r14386
2010-02-15 12:18:03 +00:00
Gary Burton 9d28157f31 Use name displayer. Bug 3530
svn: r14228
2010-02-05 12:39:29 +00:00
Benny Malengier 7683470cf3 new gtk version has also a set_window
svn: r14189
2010-02-02 08:14:13 +00:00
Brian Matherly f48d15de5c Update to polish translation from Łukasz Rymarczyk
svn: r14150
2010-01-28 04:30:08 +00:00
Jérôme Rapinat 5704b4d113 Update Chinese translation (by Honeyword)
svn: r14128
2010-01-25 08:37:00 +00:00
Jérôme Rapinat a35defb35e 1683 typo/crash and get rid of old API
svn: r14047
2010-01-12 16:33:17 +00:00
Serge Noiraud 164db015e9 ODFDoc : issue 3439, 3440, 3461, 3462
svn: r14027
2010-01-11 08:12:08 +00:00
Doug Blank afd0dbf40e 3436: [crash] 'gtk.HBox' object has no attribute 'set_alignment'
svn: r13993
2010-01-08 11:31:52 +00:00
Serge Noiraud fca7917515 ODFDoc : issue 3440; remove only fo:max-height.
svn: r13988
2010-01-07 20:30:47 +00:00
Peter Landgren e4a8cc44ae Fix of issue 3480.
svn: r13966
2010-01-03 13:59:07 +00:00
Peter Landgren 7d93d35994 Fix of issue 3495.
svn: r13964
2010-01-03 11:22:36 +00:00
Jérôme Rapinat 8a41d0afd9 minor improvements
svn: r13926
2009-12-27 11:25:12 +00:00
Mirko Leonhäuser 9a83d2341b minor fixes in German translation (Surname, lastname translation)
svn: r13917
2009-12-25 23:35:42 +00:00
Gary Burton 776c4b639a Fix bug 2926. Two references created when dropping media onto gallery tab
svn: r13857
2009-12-20 17:23:45 +00:00
Gary Burton 545ec06e6d Fix wrong calls to get_type
svn: r13851
2009-12-19 16:07:40 +00:00
Serge Noiraud debe141034 ODFdoc : issue 3439 and 3440 (ODF validator).
svn: r13849
2009-12-18 22:49:17 +00:00
Peter Landgren 135e5639e1 Found one untranslated string
svn: r13803
2009-12-14 14:21:56 +00:00
Jérôme Rapinat 9c7c5453b1 fix an unicode conversion bug on nephew level (related to 3114 - thank you Peter)
svn: r13788
2009-12-13 17:47:51 +00:00
Jérôme Rapinat de34eab12c fix an unicode conversion bug on niece level (related to 3114)
svn: r13787
2009-12-13 16:34:19 +00:00
Jérôme Rapinat 4b2030d48b 1683: Untranslatable text in Relationship calculator (by Andrew I Baznikin)
svn: r13776
2009-12-12 10:59:26 +00:00
Stéphane Charette 52f4f76c82 bump version number
svn: r13727
2009-12-06 10:33:34 +00:00
Stéphane Charette 6a9be24e1c updated NEWS for version 3.1.3
svn: r13722
2009-12-06 08:25:22 +00:00
Jérôme Rapinat 487435d411 Update Croatian translation
svn: r13713
2009-12-05 08:18:56 +00:00
Jérôme Rapinat c6dcfef776 Merge Lithuanian and Croatian translations with last template
svn: r13712
2009-12-05 08:12:30 +00:00
Jérôme Rapinat 5866b28877 Updated Lithuanian translation (was added on tag 3.1.2)
svn: r13711
2009-12-05 07:55:18 +00:00
Jérôme Rapinat e9b643c5d6 Update Croatian translation (by Josip)
svn: r13710
2009-12-05 07:37:08 +00:00
Doug Blank 4cc6d3f904 3410: holidays.xml is reported to not load from user's plugin directory
svn: r13704
2009-12-05 03:16:56 +00:00
Jérôme Rapinat f18c6c9189 assignment after use
svn: r13701
2009-12-04 09:22:33 +00:00
Jérôme Rapinat aae0360818 case and add comments
svn: r13700
2009-12-04 08:07:50 +00:00
Serge Noiraud f649702b1d GeoView : gramps crash : issue 3341 : initialization change.
svn: r13699
2009-12-03 19:59:09 +00:00
Jérôme Rapinat 83c2b7940d typos
svn: r13696
2009-12-01 18:20:36 +00:00
Jérôme Rapinat 3f0475b252 Update Slovak translation (by Lubo Vasko)
svn: r13694
2009-12-01 13:39:51 +00:00
Peter Landgren 9c1af31a35 Fixed a minor bug.
svn: r13688
2009-11-29 19:26:38 +00:00
Luigi Toscano 431effe789 Italian translation updates.
svn: r13685
2009-11-29 00:29:15 +00:00
Jérôme Rapinat 2bc8f50ac2 Update french translation
svn: r13680
2009-11-27 18:57:19 +00:00
Serge Noiraud 5a6e6959de GeoView : workaround to correct issue 3341.
backward and forward button suppression in the toolbar.
          These functionalities are always available with the mouse <right button> in the html page.


svn: r13677
2009-11-26 20:54:59 +00:00
Jérôme Rapinat 5b5bf3344f Update polish translation (by Łukasz Rymarczyk)
svn: r13673
2009-11-26 10:29:16 +00:00
Jérôme Rapinat af15d80cdb two mismatches %() on plural_form
svn: r13672
2009-11-25 15:34:25 +00:00
Peter Landgren 613c11b64f Final Swedish update for 3.1.3
svn: r13669
2009-11-24 14:52:13 +00:00
Jérôme Rapinat dec5bb6390 re-enable entries for 3rd party plugins
svn: r13668
2009-11-24 10:37:49 +00:00
Erik De Richter fb178130c8 updated gramps.pot and translations
svn: r13667
2009-11-24 07:10:34 +00:00
Jérôme Rapinat 93812faa40 3387: Updated finnish translation for gramps31 (Janne Kovesjärvi)
svn: r13666
2009-11-23 22:52:21 +00:00
Jérôme Rapinat 6d990ba147 Updated Danish translation (Morten Bo Johansen)
svn: r13665
2009-11-23 22:45:11 +00:00
Doug Blank f8316f1794 Moved out of gramps31 branch
svn: r13663
2009-11-23 12:16:21 +00:00
Joan Creus e36d39f208 Updating Catalan translation
svn: r13659
2009-11-22 23:29:53 +00:00
Peter Landgren dbc96aad2e Update for 3.1.3
svn: r13656
2009-11-22 22:12:51 +00:00
Serge Noiraud 990a833d21 GeoView : map internationalization.
svn: r13650
2009-11-22 10:00:12 +00:00
Benny Malengier af25513134 3106: Unable to use People with a common ancestor with <filter> match rule
svn: r13648
2009-11-22 08:30:06 +00:00
Benny Malengier 853d2a638d 3269: Export privacy switch toggles inclusion of source page data
svn: r13640
2009-11-19 20:50:17 +00:00
Benny Malengier a4c22a3b46 2799: in GEDCOM export, changed timestamp for every single record is 31 DEC 1969
svn: r13629
2009-11-18 22:45:39 +00:00
Peter Landgren 963f99536e Minor corrections.
svn: r13624
2009-11-18 13:20:49 +00:00
Mirko Leonhäuser 6844392c3d Update german translation
svn: r13609
2009-11-17 17:22:38 +00:00
Benny Malengier a7bc1ad0f8 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=532559
svn: r13605
2009-11-17 08:46:12 +00:00
Rob G. Healey 01f6e569a7 Fixed several problems with stylesheets.
svn: r13602
2009-11-17 05:01:50 +00:00
Erik De Richter 6d533d4c35 update nl translation
svn: r13577
2009-11-14 07:05:09 +00:00
Erik De Richter 55e41fadf4 update nl translation
svn: r13576
2009-11-14 06:59:01 +00:00
Espen Berg ee5ee7db3f Revised Norwegian bokmål and nynorsk to 100%
svn: r13573
2009-11-13 14:22:39 +00:00
Jérôme Rapinat 5fdcc32703 update french translation
svn: r13558
2009-11-11 15:25:42 +00:00
Jérôme Rapinat b4aa00dac7 1563: 'Compressed Strudtured Vector Graphic SVG should be SVGZ (contribution by DuncanNZ)
svn: r13557
2009-11-11 15:00:13 +00:00
Jérôme Rapinat 834662a823 Update Hungarian translation (contribution by Kolesár András)
svn: r13548
2009-11-10 15:04:17 +00:00
Jérôme Rapinat b25211037a Update Hungarian translation (contribution by Kolesár András)
svn: r13533
2009-11-09 16:36:37 +00:00
Luigi Toscano 35a03d7994 Italian translation updates.
svn: r13526
2009-11-07 23:20:11 +00:00
Jérôme Rapinat 1a7fad0ab1 Update Hungarian translation (contribution by Kolesár András)
svn: r13521
2009-11-07 14:26:57 +00:00
Benny Malengier ac84dc2e26 add time to logger
svn: r13517
2009-11-07 13:24:50 +00:00
Mirko Leonhäuser e6ddc51d72 Update german translation
svn: r13510
2009-11-06 18:18:54 +00:00
Espen Berg e6c1c5f689 Fully revised Norwegian nynorsk translation
svn: r13508
2009-11-06 12:08:02 +00:00
Rob G. Healey 5a44ced7b1 Removed spaces and commas from alphabet_navigation().
svn: r13504
2009-11-05 23:15:59 +00:00
Nick Hall ba9e469215 Fixed error when opening two plugin status windows
svn: r13502
2009-11-05 16:52:51 +00:00
Espen Berg 7cc523ac4e Revised Norwegian translation to 100%
svn: r13495
2009-11-04 13:55:02 +00:00
Peter Landgren f8d54b64bc Fix so that a copy is created, if new filename already exists. Works like normal XML export.
svn: r13493
2009-11-03 17:21:46 +00:00
Luigi Toscano ce3c465ef5 More updates.
svn: r13471
2009-10-30 22:26:14 +00:00
Luigi Toscano 275e9eebfd Italian translation updates (+regenerated template)
svn: r13470
2009-10-30 22:02:55 +00:00
Jérôme Rapinat c9cb640f28 cannot translate variable (part2 - thanks Peter)
svn: r13466
2009-10-30 18:00:48 +00:00
Jérôme Rapinat 3eaa8115c2 cannot translate variable (mailing-list)
svn: r13464
2009-10-30 10:16:57 +00:00
Jérôme Rapinat 285e23303c 3278: [Records plugin] Mariage calculation should only work with event_role=Family or primary
svn: r13455
2009-10-29 11:44:09 +00:00
Rob G. Healey bda858cc5f Fixed navigation menu in Web_Basic-Cypress.css. Changed body background in body#WebCal in Web_Visually.css.
svn: r13453
2009-10-28 23:55:39 +00:00
Espen Berg 597e6a150d Some revision on Norwegian translation
svn: r13450
2009-10-28 20:56:41 +00:00
Gerald Britton b9c091a72e Bug 0003098: "Buri" event on GeneWeb file may break import into Gramps
svn: r13449
2009-10-28 19:21:49 +00:00
Benny Malengier 2732634e98 03288: [XML import] Custom family event role type is ignored on Family Events
svn: r13446
2009-10-28 16:14:48 +00:00
Gerald Britton 23f0fae4e3 Bug 3063: Deprecation warnings with gtk 2.18 on Ubuntu 9.10
svn: r13427
2009-10-26 20:42:58 +00:00
Rob G. Healey f459fc1ee4 Fix for #3262. The extensions of .php, .php3, .cgi do not the document starting with the xml declaration.
svn: r13426
2009-10-26 20:27:20 +00:00
Benny Malengier 602097c854 03289: GVFamilyLines, PlaceReport crash without individuals set
svn: r13412
2009-10-25 17:06:50 +00:00
Benny Malengier 75991dd5cd 3282: Gramps should only display marriage event with role = family (or primary)
svn: r13410
2009-10-25 16:51:15 +00:00
Peter Landgren c5951cab7c Fix of issue 3307. Was a typo.
svn: r13392
2009-10-22 09:02:45 +00:00
Jérôme Rapinat 4c4605e744 3305: update Brazilian Portuguese translation (by lcc)
svn: r13388
2009-10-20 18:00:17 +00:00
Peter Landgren fcab11a0ee Fix of issue 3299.
svn: r13383
2009-10-18 09:16:19 +00:00
Doug Blank 28e4707cd1 3296: Data loss during XML-export->import; assumed type was set on name element
svn: r13381
2009-10-17 22:53:30 +00:00
Doug Blank ffe4ea5306 3063: tooltips in new gtk; missed conversion change
svn: r13378
2009-10-17 14:27:06 +00:00
Doug Blank 809a810c37 3291: "Probably alive" misses persons definitely alive
svn: r13376
2009-10-16 03:14:26 +00:00
Doug Blank d1592c55be Missed make_gui_option conversion from tooltip update
svn: r13373
2009-10-15 10:15:29 +00:00
Gerald Britton 14c76f563f Bug 3290: Deprecation warnings with gtk 2.18 on Ubuntu 9.10
svn: r13370
2009-10-14 17:43:54 +00:00
Gerald Britton 7ba22af095 Bug 3290: Deprecation warnings with gtk 2.18 on Ubuntu 9.10
svn: r13368
2009-10-13 19:20:35 +00:00
Mirko Leonhäuser fba0650302 minor fixes in German translation
svn: r13356
2009-10-08 20:54:06 +00:00
Jérôme Rapinat 4b5383170c typo/wording on web reports
svn: r13355
2009-10-08 18:03:08 +00:00
Jérôme Rapinat 9d78dd6613 3199: Localisation in web page report - Problem with word Home, too many meanings
svn: r13351
2009-10-08 12:01:48 +00:00
Mirko Leonhäuser 31e415f442 Update german translation
svn: r13336
2009-10-07 18:41:14 +00:00
Jérôme Rapinat fe54661b54 3199: Localisation in web page report - use context for home (not the same as home on program)
svn: r13330
2009-10-07 10:05:45 +00:00
Rob G. Healey e0570c9d3a Fixed alphabet navigation and content padding in all stylesheets now.
svn: r13323
2009-10-07 00:47:20 +00:00
Rob G. Healey 615abec162 Fixed Alphabet Navigation and content padding.
svn: r13322
2009-10-07 00:12:38 +00:00
Espen Berg d71ccad5b5 Some more revision on nb.po
svn: r13318
2009-10-06 13:38:05 +00:00
Jérôme Rapinat 4b694197cf 3199: Localisation in web page report - Problem with a word Name, too many meanings (by Łukasz Rymarczyk)
svn: r13317
2009-10-06 10:34:38 +00:00
Jérôme Rapinat 38651e2349 #3270: update Polish translation (by Łukasz Rymarczyk)
svn: r13315
2009-10-06 10:06:34 +00:00
Jérôme Rapinat bd9393ddbf to allow to translate birth word
svn: r13313
2009-10-06 09:41:15 +00:00
Espen Berg a6ecbce949 Some more revision on nb.po
svn: r13312
2009-10-06 08:48:27 +00:00
Rob G. Healey 690c95b098 Moved some elements around in the stylesheets. Fixed alphabet navigation in Ash stylesheet. Fixed the div id in def alphabet_navigation() to alphabet.
svn: r13310
2009-10-06 08:14:56 +00:00
Jérôme Rapinat f89f313836 small improvements on spouse/partner relationships
svn: r13301
2009-10-04 08:07:40 +00:00
Jérôme Rapinat 49d21ff189 small improvements on spouse/partner relationships
svn: r13300
2009-10-04 07:59:00 +00:00
Peter Landgren 0687de05f4 Fix of issue 3253 for Family Lines report. Zeros are not shown.
svn: r13294
2009-10-03 13:46:19 +00:00
Doug Blank 562c14ebb4 #3194: Order of children in export and import of GEDCOM was wrong. See bug for more details.
svn: r13291
2009-10-03 05:05:38 +00:00
Doug Blank b135a50fe9 #3254: protect from crashing on copy to same file
svn: r13290
2009-10-03 03:39:32 +00:00
Espen Berg 51db87f2c4 Some updates on Norwegian translation. Quite a lot remaining
svn: r13281
2009-10-01 18:31:16 +00:00
Espen Berg 6335ba09de Some updates on Norwegian translation. Quite a lot remaining
svn: r13277
2009-09-30 19:49:53 +00:00
Jérôme Rapinat 0e6b7ed78b avoid possible conflict with regex on a third party plugin
svn: r13274
2009-09-29 05:47:17 +00:00
Jérôme Rapinat ac8bfe2732 avoid possible conflict with regex a third party plugin
svn: r13273
2009-09-29 05:43:46 +00:00
Doug Blank e8835aa513 #3241: wife should be mother
svn: r13272
2009-09-29 00:23:18 +00:00
Serge Noiraud 91cf708449 GeoView : internationalisation for map control ( google and openstreetmap )
svn: r13266
2009-09-27 11:18:14 +00:00
Mirko Leonhäuser d397a2a64f minor fixes in German translation
svn: r13264
2009-09-27 09:27:34 +00:00
Doug Blank 95e0b720a9 #2930: Crash whilts generating web pages; fix requested by Rob
svn: r13262
2009-09-27 00:13:57 +00:00
Doug Blank 3552b01910 Removed unnecessary update signals
svn: r13261
2009-09-27 00:03:52 +00:00
Doug Blank 2da9d7e1ab Allows users to go back to 3.1 after 3.2 Pedigree Style change
svn: r13260
2009-09-27 00:00:36 +00:00
Peter Landgren 5e7f896e92 Fix of issue 3215.
svn: r13235
2009-09-23 13:03:33 +00:00
Peter Landgren d47c4534c6 Minor translation update.
svn: r13232
2009-09-22 11:40:14 +00:00
Mirko Leonhäuser 20d1cb0110 minor fixes in German translation
svn: r13229
2009-09-20 11:20:13 +00:00
Jérôme Rapinat 8abec7ba25 added optional additional third party plugins references
svn: r13225
2009-09-19 10:07:19 +00:00
Mirko Leonhäuser 465c9d1a0b minor fixes in German translation
svn: r13219
2009-09-17 17:05:06 +00:00
Doug Blank 7947af1fb7 bug #3221: Improvements for WhatsNext Gramplet, by reinhard
svn: r13216
2009-09-17 03:12:33 +00:00
Mirko Leonhäuser e291b76c00 minor fixes in German translation
svn: r13214
2009-09-16 18:27:22 +00:00
Mirko Leonhäuser 2cde7624f5 minor fixes in German translation
svn: r13202
2009-09-14 17:21:07 +00:00
Mirko Leonhäuser 6eb3c3f9b2 Update german translation
svn: r13189
2009-09-10 16:43:12 +00:00
Jérôme Rapinat 0ebbeb30b8 #3182 Add an used singular form, avoid empty string on translation dict
svn: r13187
2009-09-10 13:47:37 +00:00
Peter Landgren 82500dc151 String must be unicode for truncation to work for non ascii characters.
svn: r13179
2009-09-08 13:45:44 +00:00
Peter Landgren 1f576221d7 String must be unicode for truncation to work for non ascii characters.
svn: r13177
2009-09-08 10:15:24 +00:00
Peter Landgren b7b5045497 String must be unicode for truncation to work for non ascii characters.
svn: r13175
2009-09-08 10:01:58 +00:00
Peter Landgren 37db7366c1 String must be unicode for truncation to work for non ascii characters.
svn: r13173
2009-09-08 08:45:08 +00:00
Peter Landgren 30acde6546 String must be unicode for truncation to work for non ascii characters.
svn: r13171
2009-09-08 08:28:29 +00:00
Peter Landgren 26fed05e64 String must be unicode for truncation to work for non ascii characters.
svn: r13169
2009-09-08 07:35:10 +00:00
Peter Landgren 2554a1decd Strings must be unicode for truncation to work for non ascii characters.
svn: r13167
2009-09-08 06:35:01 +00:00
Arturas Sleinius cfa140e165 Updated Lithuanian translation
svn: r13162
2009-09-06 12:04:16 +00:00
Jérôme Rapinat fbc6414670 Update french translation
svn: r13154
2009-09-03 08:35:50 +00:00
Peter Landgren 8cc62188e1 New strings translated.
svn: r13147
2009-09-01 16:29:04 +00:00
Serge Noiraud 40399556c2 NarrativeWeb : issue 2788 and 2914 : mixed / and \\ on windows
svn: r13129
2009-08-28 16:25:30 +00:00
Mirko Leonhäuser 940b2471c4 Update german translation
svn: r13128
2009-08-28 09:56:09 +00:00
Serge Noiraud 718b763b6d GeoView : Full functionalities.
svn: r13126
2009-08-27 19:57:57 +00:00
Peter Landgren 234994bfaf Fix of issue 3188, search for ü did not work.
svn: r13125
2009-08-27 19:51:57 +00:00
Erik De Richter c62229a449 update fr po
svn: r13121
2009-08-27 05:49:43 +00:00
Serge Noiraud f4b5710959 GeoView : Fix of issues 3150, 3152 for 3.1 branch (path problem on windows)
svn: r13114
2009-08-24 20:17:05 +00:00
Mirko Leonhäuser 84d1485cec German holidays depending to easter
svn: r13111
2009-08-23 12:20:55 +00:00
Mirko Leonhäuser 960a62b4c8 Update german translation
svn: r13110
2009-08-23 09:05:34 +00:00
Erik De Richter 94313ae388 update-po and new nl.po
svn: r13108
2009-08-23 08:14:18 +00:00
Jérôme Rapinat d43de411bc Use plural forms (ngettext) in plugins/tool/NotRelated (patch by VPeric)
svn: r13106
2009-08-23 07:35:10 +00:00
Mirko Leonhäuser 6d48930121 minor fixes in German translation
svn: r13100
2009-08-21 15:45:05 +00:00
Peter Landgren 5bd5a98ba9 unicode text must be sliced correctly.
svn: r13091
2009-08-20 13:08:49 +00:00
Benny Malengier 26dd3db5bc 2863: Wrong row when dropping on embedded list
svn: r13088
2009-08-20 12:35:34 +00:00
Espen Berg 057c962fe0 Some revised strings in Norwegian language file
svn: r13028
2009-08-16 09:26:48 +00:00
Peter Landgren bd8f5317ba Better translation i one gramplet.
svn: r12979
2009-08-12 17:34:31 +00:00
Mirko Leonhäuser 6a6ccadf6a minor fixes in German translation
svn: r12960
2009-08-11 20:01:06 +00:00
Jérôme Rapinat 4cd92c86e1 3160: Add Serbian DateHandler (patch provided by VPeric)
svn: r12946
2009-08-10 14:56:18 +00:00
Jérôme Rapinat 2cfdd5f179 3156: Bug in Croatian DateHandler (patch provided by VPeric)
svn: r12944
2009-08-10 14:23:29 +00:00
Serge Noiraud 1c41b04d3d GeoView : Update mapstraction to version 215.
Switch between maps works.


svn: r12928
2009-08-08 21:31:21 +00:00
Richard Taylor 57456a3fdf SVN reorganisation: Move current maintenance branches
svn: r12910
2009-08-07 08:13:20 +00:00
Richard Taylor 28babdfd20 Fix for OS X Scratchpad issue 3089: clipboard broken in Mac port. Merged from trunk r12882.
svn: r12894
2009-08-07 07:49:42 +00:00
Benny Malengier 83177dbe7b remember scrolled position
svn: r12873
2009-08-04 17:18:18 +00:00
Jérôme Rapinat 5ccc779779 3114: Kinship report in french crash under Windows with rtf or pdf output format (contribution by danielg)
svn: r12867
2009-08-03 05:43:46 +00:00
Jérôme Rapinat 6cd32e4b74 Bug [0003123]: [Gedcom] An empty type on event may break import (gbritton)
svn: r12853
2009-07-29 20:17:41 +00:00
Jérôme Rapinat f0f32f6122 #2776: Thumbnail images in report output do not take referenced area into account (patch provided by lomo)
svn: r12852
2009-07-29 17:48:18 +00:00
Brian Matherly c81b322009 0003032: Book reports loses center person
svn: r12842
2009-07-28 04:28:12 +00:00
Brian Matherly d7fcfc6fb1 0002957: Crash when displaying the configuration of a book created with Gramps 3.0.x
svn: r12840
2009-07-28 03:52:09 +00:00
Jérôme Rapinat 466bffef30 update gedcom sample
svn: r12833
2009-07-23 10:30:11 +00:00
Peter Landgren 7272f94206 Fix of issue 3111, string.lowercase in Windows.
svn: r12830
2009-07-21 15:42:11 +00:00
Doug Blank 450991f5c3 fix to match changed url of blog comment rss
svn: r12824
2009-07-20 12:46:05 +00:00
Doug Blank 76c8eb47cf Bug #3097: Dates parsed after a .gw import should not use Julian calendar; Changed None to 0
svn: r12823
2009-07-20 06:50:19 +00:00
Peter Landgren 07218ca4c4 Fix of issue 3109, max number of generations are now set to 50, equal in ancestor tree and descendent tree.
svn: r12815
2009-07-19 06:53:15 +00:00
Jérôme Rapinat 1d1281ae10 try to provide a better support for place labels : Belgique and Canada
svn: r12814
2009-07-17 13:01:47 +00:00
Benny Malengier c207cf819b 2352: 'NoneType' object has no attribute 'get_family_handle_list'
svn: r12805
2009-07-16 12:40:52 +00:00
Erik De Richter b294f3608b new nl. po translation
svn: r12779
2009-07-09 07:17:42 +00:00
Mirko Leonhäuser 7423eec380 Update german translation
svn: r12777
2009-07-08 16:40:31 +00:00
Jérôme Rapinat 59c14c507c typo
svn: r12772
2009-07-07 09:43:26 +00:00
Peter Landgren 9d055bb444 Fix of issue 3087.
svn: r12768
2009-07-06 18:17:07 +00:00
Benny Malengier 494311f234 3089: clipboard drop broken in Mac port
svn: r12767
2009-07-06 17:36:36 +00:00
Jérôme Rapinat 56762c8444 to allow to translate n years old
svn: r12754
2009-07-02 15:45:17 +00:00
Jérôme Rapinat 6eb21926ed Retour a la version n de bonjour
svn: r12752
2009-07-02 07:00:24 +00:00
Jérôme Rapinat 1de0ef724f bug 2963 - typo (Lcc)
svn: r12751
2009-07-02 06:42:40 +00:00
Benny Malengier 6e5f90e580 3073: Add/edit personfilter is VERY slow in one database
svn: r12748
2009-07-01 10:58:54 +00:00
Benny Malengier cdaddc3479 3064: Remove check for libglade in configure
svn: r12743
2009-06-30 20:32:13 +00:00
Jérôme Rapinat 641adf57de Update polish translation (Łukasz Rymarczyk)
svn: r12741
2009-06-30 17:55:28 +00:00
Jérôme Rapinat 1e34c037f3 minor improvement on place code definition
svn: r12740
2009-06-30 14:39:59 +00:00
Mirko Leonhäuser 501be49025 Fixed BUG 0003072 Germantranslation error on Web Pages
svn: r12735
2009-06-29 21:10:50 +00:00
Benny Malengier 94f8838dd6 3052: Only PeopleView rebuilds entries on SearchBar after a change on columns Editor
svn: r12731
2009-06-29 19:56:36 +00:00
Mirko Leonhäuser a5f68318db Update german translation
svn: r12729
2009-06-29 16:04:20 +00:00
Jérôme Rapinat 02cd032f72 3046: Update polish translation (Łukasz Rymarczyk)
svn: r12727
2009-06-29 15:40:07 +00:00
Gary Burton ee565d5d6b Remove some junk leftover from testing.
svn: r12720
2009-06-26 10:37:53 +00:00
Gary Burton b09fa93eea Parse address from GEDCOM submitter tag. Bug #3056
svn: r12717
2009-06-26 10:25:22 +00:00
Benny Malengier 48abb86bb8 [Emrys] 2896: Macports 3.0.4 cannot view images
svn: r12715
2009-06-26 09:45:34 +00:00
Benny Malengier eb337a8d29 [Emrys] 2896: Macports 3.0.4 cannot view images
svn: r12713
2009-06-26 09:43:55 +00:00
Jérôme Rapinat 52e908a5a1 typo - contribution by Jérôme Chailloux
svn: r12708
2009-06-25 18:11:37 +00:00
Espen Berg 9e8420aaac Modified a string in Norwegian translation
svn: r12701
2009-06-24 07:36:18 +00:00
Erik De Richter 72767dce85 new nl. po translation
svn: r12697
2009-06-22 16:36:33 +00:00
Peter Landgren 385c3c3d9b Added errormsg in conn. with issue 3066.
svn: r12695
2009-06-22 09:51:18 +00:00
Benny Malengier b9e1ba0195 3066: [PlaceView] Loading... should disappear when map service plugins are present.
svn: r12693
2009-06-22 09:18:00 +00:00
Espen Berg f1ded0d689 Fixed one typo in Norwegian translation
svn: r12691
2009-06-22 05:03:59 +00:00
Gary Burton f45b4316b5 Ensure source reference dates are always exported. Bug #3062
svn: r12687
2009-06-20 20:23:21 +00:00
Gary Burton 49599fa9c3 GEDCOM parser fixes for gallery objects. Bug #3056
svn: r12685
2009-06-20 19:33:45 +00:00
Jérôme Rapinat 170336d573 update Chinese translation (contribution by honeyword)
svn: r12684
2009-06-20 07:21:17 +00:00
Jérôme Rapinat 78216846f2 update Chinese translation (contribution by honeyword)
svn: r12678
2009-06-19 09:11:23 +00:00
Zdeněk Hataš b236953ebe Fixed typo in localized date handler.
svn: r12675
2009-06-19 06:42:44 +00:00
Espen Berg c4a2e2791d Revised Norwegian Nynorsk translation thanks to Sigmund Lorentsen
svn: r12658
2009-06-12 12:33:18 +00:00
Benny Malengier 705fbf4007 2712: middle click copy paste not working in notes
svn: r12653
2009-06-11 12:51:27 +00:00
Jérôme Rapinat 72838423a0 update Bulgarian translation (Boril Gourinov, Svetoslav Stefanov-LFU)
svn: r12651
2009-06-11 07:48:08 +00:00
Erik De Richter a5970e71bc new nl. po translation
svn: r12645
2009-06-09 18:42:17 +00:00
Espen Berg 430124cdc4 Updated Norwegian Nynorsk translation
svn: r12643
2009-06-07 20:26:29 +00:00
Jérôme Rapinat 4e7b70b2b4 #3040: typo translation (contribution by Zegzda Yevgeny)
svn: r12639
2009-06-07 19:02:25 +00:00
Stéphane Charette 5125046ac1 version bump
svn: r12637
2009-06-07 07:37:03 +00:00
133 changed files with 151766 additions and 118820 deletions
+9
View File
@@ -1,3 +1,12 @@
Version 3.1.3 -- the "What name?" release.
* contains translation updates, crash fixes, bug fixes, and minor updates.
* fixes and updates to:
* -> notes, date handler, GEDCOM parser, GEDCOM export, PlaceView,
* -> thumbnails, unicode/text truncation, Gramplets, gtk 2.18/Ubuntu 9.10,
* -> xml export/import data loss, GeneWeb GEDCOM import, css updates
* several MacPorts-specific fixes
* several Windows-specific fixes
Version 3.1.2 -- the "Skip the impersonations" release.
* Contains translation updates and small bug fixes. No new features.
* ca, cs, de, fr, he, it, nb, nl, pl, pt_br, ru, sk, sv,
+2 -2
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.1.2 [gramps-bugs@lists.sourceforge.net])
AC_INIT(gramps, 3.1.4, [gramps-bugs@lists.sourceforge.net])
AC_CONFIG_SRCDIR(configure.in)
AM_INIT_AUTOMAKE([1.6.3 foreign])
@@ -92,7 +92,7 @@ try:
# Do not import gtk.glade, this can raise a RuntimeError if the
# display cannot be opened. Just search it.
import imp
imp.find_module('gtk/glade')
imp.find_module('glade',[[imp.find_module('gtk')[1]]])
out("gtk.glade")
except ImportError:
out("NO")
+834 -825
View File
File diff suppressed because it is too large Load Diff
+13219 -11071
View File
File diff suppressed because it is too large Load Diff
+1760 -2184
View File
File diff suppressed because it is too large Load Diff
+4813 -3116
View File
File diff suppressed because it is too large Load Diff
+3496 -3564
View File
File diff suppressed because it is too large Load Diff
+1931 -1655
View File
File diff suppressed because it is too large Load Diff
+10024 -7710
View File
File diff suppressed because it is too large Load Diff
+6995 -3614
View File
File diff suppressed because it is too large Load Diff
+6065 -4339
View File
File diff suppressed because it is too large Load Diff
+2166 -1428
View File
File diff suppressed because it is too large Load Diff
+1235 -1172
View File
File diff suppressed because it is too large Load Diff
+2488 -2597
View File
File diff suppressed because it is too large Load Diff
+4871 -3486
View File
File diff suppressed because it is too large Load Diff
+10371 -8394
View File
File diff suppressed because it is too large Load Diff
+2444 -2781
View File
File diff suppressed because it is too large Load Diff
+3200 -3649
View File
File diff suppressed because it is too large Load Diff
+5374 -3346
View File
File diff suppressed because it is too large Load Diff
+4552 -2299
View File
File diff suppressed because it is too large Load Diff
+1441 -1402
View File
File diff suppressed because it is too large Load Diff
+5538 -3164
View File
File diff suppressed because it is too large Load Diff
+3459 -1965
View File
File diff suppressed because it is too large Load Diff
+2579 -2545
View File
File diff suppressed because it is too large Load Diff
+10123 -7851
View File
File diff suppressed because it is too large Load Diff
+4136 -2181
View File
File diff suppressed because it is too large Load Diff
+1646 -1695
View File
File diff suppressed because it is too large Load Diff
+9958 -7373
View File
File diff suppressed because it is too large Load Diff
+5613 -3397
View File
File diff suppressed because it is too large Load Diff
+2135 -1524
View File
File diff suppressed because it is too large Load Diff
+2240 -2143
View File
File diff suppressed because it is too large Load Diff
+14093 -13388
View File
File diff suppressed because it is too large Load Diff
+2
View File
@@ -1677,6 +1677,8 @@ class TextDoc(object):
is <b>text</b><i><b> here</b> not</i>
overwrite this method if this complexity is not needed.
"""
#unicode text most be sliced correctly
text=unicode(text)
FIRST = 0
LAST = 1
tagspos = {}
+2
View File
@@ -428,6 +428,8 @@ class NoteBookmarks(ListBookmarks) :
def make_label(self, handle):
obj = self.dbstate.db.get_note_from_handle(handle)
name = obj.get().replace('\n', ' ')
#String must be unicode for truncation to work for non ascii characters
name = unicode(name)
if len(name) > 40:
name = name[:40]+"..."
return ("%s [%s]" % (name, obj.gramps_id), obj)
+13 -7
View File
@@ -199,13 +199,19 @@ class FamilyListView(PageView.ListView):
pass
def remove(self, obj):
self.uistate.set_busy_cursor(1)
import gen.utils
for handle in self.selected_handles():
gen.utils.remove_family_relationships(self.dbstate.db, handle)
self.build_tree()
self.uistate.set_busy_cursor(0)
from QuestionDialog import QuestionDialog2
from Utils import data_recover_msg
msg = _('Deleting item will remove it from the database.')
msg = msg + '\n' + data_recover_msg
q = QuestionDialog2(_('Delete %s?') % _('family'), msg,
_('_Delete Item'), _('Cancel'))
if q.run():
self.uistate.set_busy_cursor(1)
import gen.utils
for handle in self.selected_handles():
gen.utils.remove_family_relationships(self.dbstate.db, handle)
self.build_tree()
self.uistate.set_busy_cursor(0)
def edit(self, obj):
for handle in self.selected_handles():
+518 -399
View File
File diff suppressed because it is too large Load Diff
+7 -13
View File
@@ -174,8 +174,7 @@ def make_requested_gramplet(viewpage, name, opts, dbstate, uistate):
if msg is None:
msg = _("Drag Properties Button to move and click it for setup")
if msg:
gui.tooltips = gtk.Tooltips()
gui.tooltips.set_tip(gui.scrolledwindow, msg)
gui.scrolledwindow.set_tooltip_text(msg)
gui.tooltips_text = msg
gui.make_gui_options()
gui.gvoptions.hide()
@@ -585,8 +584,7 @@ class Gramplet(object):
"""
from PluginUtils import make_gui_option
#tooltips, dbstate, uistate, track
widget, label = make_gui_option(option, None, self.dbstate,
self.uistate,None)
widget, label = make_gui_option(option, self.dbstate, self.uistate,None)
self.option_dict.update({option.get_label(): (widget, option)})
self.option_order.append(option.get_label())
@@ -949,13 +947,10 @@ class GuiGramplet(object):
else:
tag.set_property('underline', pango.UNDERLINE_NONE)
view.get_window(gtk.TEXT_WINDOW_TEXT).set_cursor(cursor)
if self.tooltips:
if ttip:
self.tooltips.set_tip(self.scrolledwindow,
ttip)
else:
self.tooltips.set_tip(self.scrolledwindow,
self.tooltips_text)
if ttip:
self.scrolledwindow.set_tooltip_text(ttip)
elif self.tooltips_text:
self.scrolledwindow.set_tooltip_text(self.tooltips_text)
return False # handle event further, if necessary
def on_button_press(self, view, event):
@@ -1101,8 +1096,7 @@ class GrampletView(PageView.PersonNavView):
# build the GUI:
frame = MyScrolledWindow()
msg = _("Right click to add gramplets")
self.tooltips = gtk.Tooltips()
self.tooltips.set_tip(frame, msg)
frame.set_tooltip_text(msg)
frame.viewpage = self
frame.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
self.hbox = gtk.HBox(homogeneous=True)
+2 -6
View File
@@ -275,13 +275,11 @@ class MediaView(PageView.ListView):
ebox = gtk.EventBox()
ebox.add(self.image)
ebox.connect('button-press-event', self.button_press_event)
ebox.set_tooltip_text(
_('Double click image to view in an external viewer'))
vbox.pack_start(ebox, False)
vbox.pack_start(base, True)
self.ttips = gtk.Tooltips()
self.ttips.set_tip(
ebox, _('Double click image to view in an external viewer'))
self.selection.connect('changed', self.row_change)
self._set_dnd()
return vbox
@@ -314,13 +312,11 @@ class MediaView(PageView.ListView):
handle = self.first_selected()
if not handle:
self.image.clear()
self.ttips.disable()
else:
obj = self.dbstate.db.get_object_from_handle(handle)
pix = ThumbNails.get_thumbnail_image(
Utils.media_path_full(self.dbstate.db, obj.get_path()))
self.image.set_from_pixbuf(pix)
self.ttips.enable()
def ui_definition(self):
"""
+10 -9
View File
@@ -367,7 +367,9 @@ class FormattingHelper(object):
text = ""
for event_ref in family.get_event_ref_list():
event = self.dbstate.db.get_event_from_handle(event_ref.ref)
if event and event.get_type() == gen.lib.EventType.MARRIAGE:
if event and event.get_type() == gen.lib.EventType.MARRIAGE and \
(event_ref.get_role() == gen.lib.EventRoleType.FAMILY or
event_ref.get_role() == gen.lib.EventRoleType.PRIMARY ):
if line_count < 3:
return DateHandler.get_date(event)
name = str(event.get_type())
@@ -527,8 +529,6 @@ class PedigreeView(PageView.PersonNavView):
contains the interface. This containter will be inserted into
a gtk.Notebook page.
"""
self.tooltips = gtk.Tooltips()
self.tooltips.enable()
self.notebook = gtk.Notebook()
self.notebook.connect("button-press-event", self.bg_button_press_cb)
@@ -747,7 +747,8 @@ class PedigreeView(PageView.PersonNavView):
((8,26,3,1),None,None),
((8,28,3,1),None,None),
((8,30,3,1),None,None),)
elif self.tree_style == 0:
else:
#elif self.tree_style == 0:
pos_2 =(((0,0,1,3),(1,0,3),(2,1,1,1)),
((2,0,1,1),None,None),
((2,2,1,1),None,None))
@@ -876,7 +877,7 @@ class PedigreeView(PageView.PersonNavView):
else:
pw = PersonBoxWidget( self, self.format_helper, lst[i][0], lst[i][3], positions[i][0][3], image);
if positions[i][0][3] < 7:
self.tooltips.set_tip(pw, self.format_helper.format_person(lst[i][0], 11))
pw.set_tooltip_text(self.format_helper.format_person(lst[i][0], 11))
pw.connect("button-press-event", self.person_button_press_cb,lst[i][0].get_handle())
if positions[i][0][2] > 1:
@@ -944,7 +945,7 @@ class PedigreeView(PageView.PersonNavView):
if lst[i] and lst[i][2]:
line.add_events(gtk.gdk.ENTER_NOTIFY_MASK) # Required for tooltip and mouse-over
line.add_events(gtk.gdk.LEAVE_NOTIFY_MASK) # Required for tooltip and mouse-over
self.tooltips.set_tip(line, self.format_helper.format_relation(lst[i][2], 11))
line.set_tooltip_text(self.format_helper.format_relation(lst[i][2], 11))
if lst[i*2+1]:
line.set_data("frela", lst[i*2+1][1])
if lst[i*2+2]:
@@ -978,7 +979,7 @@ class PedigreeView(PageView.PersonNavView):
childlist = find_children(self.dbstate.db,lst[0][0])
if childlist:
l.connect("clicked",self.on_show_child_menu)
self.tooltips.set_tip(l, _("Jump to child..."))
l.set_tooltip_text(_("Jump to child..."))
else:
l.set_sensitive(False)
ymid = int(math.floor(ymax/2))
@@ -987,7 +988,7 @@ class PedigreeView(PageView.PersonNavView):
l.add(gtk.Arrow(gtk.ARROW_RIGHT, gtk.SHADOW_IN))
if lst[1]:
l.connect("clicked",self.on_childmenu_changed,lst[1][0].handle)
self.tooltips.set_tip(l, _("Jump to father"))
l.set_tooltip_text(("Jump to father"))
else:
l.set_sensitive(False)
ymid = int(math.floor(ymax/4))
@@ -996,7 +997,7 @@ class PedigreeView(PageView.PersonNavView):
l.add(gtk.Arrow(gtk.ARROW_RIGHT, gtk.SHADOW_IN))
if lst[2]:
l.connect("clicked",self.on_childmenu_changed,lst[2][0].handle)
self.tooltips.set_tip(l, _("Jump to mother"))
l.set_tooltip_text(("Jump to mother"))
else:
l.set_sensitive(False)
ymid = int(math.floor(ymax/4*3))
+24
View File
@@ -31,6 +31,7 @@ PersonView interface.
#------------------------------------------------------------------------
import cPickle as pickle
import time
#-------------------------------------------------------------------------
#
@@ -41,6 +42,14 @@ import gtk
import pango
from gtk.gdk import ACTION_COPY, BUTTON1_MASK
#-------------------------------------------------------------------------
#
# set up logging
#
#-------------------------------------------------------------------------
import logging
_LOG = logging.getLogger(".gui.personview")
#-------------------------------------------------------------------------
#
# GRAMPS modules
@@ -518,6 +527,7 @@ class PersonView(PageView.PersonNavView):
since it can change when rows are unselected when the model is set.
"""
if self.active:
cput = time.clock()
if Config.get(Config.FILTER):
filter_info = (PeopleModel.GENERIC, self.generic_filter)
else:
@@ -525,7 +535,9 @@ class PersonView(PageView.PersonNavView):
self.model = PeopleModel(self.dbstate.db, filter_info, skip)
active = self.dbstate.active
cput1 = time.clock()
self.tree.set_model(self.model)
cput2 = time.clock()
if const.USE_TIPS and self.model.tooltip_column is not None:
self.tooltips = TreeTips.TreeTips(self.tree,
@@ -539,6 +551,9 @@ class PersonView(PageView.PersonNavView):
self.uistate.show_filter_results(self.dbstate,
self.model.displayed,
self.model.total)
_LOG.debug(self.__class__.__name__ + ' build_tree ' +
str(time.clock() - cput) + ' sec')
_LOG.debug(' setting model ' + str(cput2 - cput1) + ' sec')
else:
self.dirty = True
@@ -710,6 +725,7 @@ class PersonView(PageView.PersonNavView):
if not self.model:
return
if self.active:
cput = time.clock()
self.dirty = False
for node in set(handle_list):
person = self.dbstate.db.get_person_from_handle(node)
@@ -729,6 +745,8 @@ class PersonView(PageView.PersonNavView):
path = self.model.on_get_path(node)
pnode = self.model.get_iter(path)
self.model.row_inserted(path, pnode)
_LOG.debug(self.__class__.__name__ + ' person_added ' +
str(time.clock() - cput) + ' sec')
else:
self.dirty = True
@@ -745,6 +763,7 @@ class PersonView(PageView.PersonNavView):
if not self.model:
return
cput = time.clock()
expand = []
self.tree.map_expanded_rows(self.func, expand)
@@ -753,11 +772,14 @@ class PersonView(PageView.PersonNavView):
path = self.model.mapper.top_iter2path.get(i)
if path:
self.tree.expand_row(path, False)
_LOG.debug(self.__class__.__name__ + ' person_removed ' +
str(time.clock() - cput) + ' sec')
def person_updated(self, handle_list):
if not self.model:
return
cput = time.clock()
self.model.clear_cache()
for node in handle_list:
person = self.dbstate.db.get_person_from_handle(node)
@@ -796,6 +818,8 @@ class PersonView(PageView.PersonNavView):
break
self.goto_active_person()
_LOG.debug(self.__class__.__name__ + ' person_updated ' +
str(time.clock() - cput) + ' sec')
def get_selected_objects(self):
(mode, paths) = self.selection.get_selected_rows()
+12 -9
View File
@@ -173,15 +173,11 @@ class PlaceView(PageView.ListView):
widget.set_menu(mmenu)
if gtk.pygtk_version >= (2, 12, 0):
widget.set_arrow_tooltip_text(actionservices.arrowtooltip)
hbox=gtk.HBox()
img = gtk.Image()
img.set_from_stock(gtk.STOCK_JUMP_TO,
gtk.ICON_SIZE_LARGE_TOOLBAR)
hbox.pack_start(img)
self.mapslistlabel.append(gtk.Label(self.mapservice_label()))
hbox.pack_start(self.mapslistlabel[-1])
hbox.show_all()
widget.set_icon_widget(hbox)
lbl = gtk.Label(self.mapservice_label())
lbl.show()
self.mapslistlabel.append(lbl)
widget.set_label_widget(self.mapslistlabel[-1])
widget.set_stock_id(gtk.STOCK_JUMP_TO)
def __create_maps_menu_actions(self):
"""
@@ -223,6 +219,13 @@ class PlaceView(PageView.ListView):
"""
Run the map service
"""
#First test if any map service is available
if not len(self.mapservicedata):
msg = _("No map service is available.")
msg2 = _("Check your installation.")
ErrorDialog(msg, msg2)
return
place_handles = self.selected_handles()
try:
place_handle = self.selected_handles()[0]
+33 -23
View File
@@ -1,6 +1,7 @@
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2001-2007 Donald N. Allingham
# Copyright (C) 2009 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
@@ -91,6 +92,7 @@ _SDATA_START = 2
_SDATA_STOP = 4
_RETURN = gtk.gdk.keyval_from_name("Return")
_KP_ENTER = gtk.gdk.keyval_from_name("KP_Enter")
_SPACE = gtk.gdk.keyval_from_name("space")
_LEFT_BUTTON = 1
_RIGHT_BUTTON = 3
@@ -130,6 +132,7 @@ class RelationshipView(PageView.PersonNavView):
self.color = gtk.TextView().style.white
self.child = None
self.old_handle = None
Config.client.notify_add("/apps/gramps/preferences/relation-shade",
self.shade_update)
@@ -417,12 +420,19 @@ class RelationshipView(PageView.PersonNavView):
return True
def _change_person(self, obj):
if obj == self.old_handle:
#same object, keep present scroll position
old_vadjust = self.scroll.get_vadjustment().value
self.old_handle = obj
else:
#different object, scroll to top
old_vadjust = self.scroll.get_vadjustment().lower
self.old_handle = obj
self.scroll.get_vadjustment().value = \
self.scroll.get_vadjustment().lower
if self.redrawing:
return False
self.redrawing = True
self.tooltips = gtk.Tooltips()
for old_child in self.vbox.get_children():
self.vbox.remove(old_child)
@@ -503,6 +513,8 @@ class RelationshipView(PageView.PersonNavView):
self.child.show_all()
self.vbox.pack_start(self.child, False)
#reset scroll position as it was before
self.scroll.get_vadjustment().value = old_vadjust
self.redrawing = False
self.uistate.modify_statusbar(self.dbstate)
@@ -528,7 +540,7 @@ class RelationshipView(PageView.PersonNavView):
if Config.get(Config.RELEDITBTN):
button = widgets.IconButton(self.edit_button_press,
person.handle)
self.tooltips.set_tip(button, _('Edit %s') % name)
button.set_tooltip_text(_('Edit %s') % name)
else:
button = None
hbox = widgets.LinkBox(label, button)
@@ -747,28 +759,28 @@ class RelationshipView(PageView.PersonNavView):
if self.reorder_sensitive:
add = widgets.IconButton(self.reorder_button_press, None,
gtk.STOCK_SORT_ASCENDING)
self.tooltips.set_tip(add, ord_msg)
add.set_tooltip_text(ord_msg)
hbox.pack_start(add, False)
add = widgets.IconButton(call_fcn, None, gtk.STOCK_ADD)
self.tooltips.set_tip(add, add_msg)
add.set_tooltip_text(add_msg)
hbox.pack_start(add, False)
if is_parent:
add = widgets.IconButton(self.select_family, None,
gtk.STOCK_INDEX)
self.tooltips.set_tip(add, sel_msg)
add.set_tooltip_text(sel_msg)
hbox.pack_start(add, False)
if family:
edit = widgets.IconButton(self.edit_family, family.handle,
gtk.STOCK_EDIT)
self.tooltips.set_tip(edit, edit_msg)
edit.set_tooltip_text(edit_msg)
hbox.pack_start(edit, False)
if not self.dbstate.db.readonly:
delete = widgets.IconButton(del_fcn, family.handle,
gtk.STOCK_REMOVE)
self.tooltips.set_tip(delete, del_msg)
delete.set_tooltip_text(del_msg)
hbox.pack_start(delete, False)
self.attach.attach(hbox, _BTN_START, _BTN_STOP, self.row, self.row+1)
self.row += 1
@@ -873,13 +885,11 @@ class RelationshipView(PageView.PersonNavView):
addchild = widgets.IconButton(self.add_child_to_fam,
family.handle,
gtk.STOCK_ADD)
self.tooltips.set_tip(addchild,
_('Add new child to family'))
addchild.set_tooltip_text(_('Add new child to family'))
selchild = widgets.IconButton(self.sel_child_to_fam,
family.handle,
gtk.STOCK_INDEX)
self.tooltips.set_tip(selchild,
_('Add existing child to family'))
selchild.set_tooltip_text(_('Add existing child to family'))
hbox.pack_start(addchild, False)
hbox.pack_start(selchild, False)
@@ -923,7 +933,7 @@ class RelationshipView(PageView.PersonNavView):
if Config.get(Config.RELEDITBTN):
button = widgets.IconButton(self.edit_button_press,
handle)
self.tooltips.set_tip(button, _('Edit %s') % name[0])
button.set_tooltip_text(('Edit %s') % name[0])
else:
button = None
vbox.pack_start(widgets.LinkBox(link_label, button),
@@ -976,7 +986,7 @@ class RelationshipView(PageView.PersonNavView):
link_label.modify_bg(gtk.STATE_NORMAL, self.color)
if Config.get(Config.RELEDITBTN):
button = widgets.IconButton(self.edit_button_press, handle)
self.tooltips.set_tip(button, _('Edit %s') % name[0])
button.set_tooltip_text(_('Edit %s') % name[0])
else:
button = None
vbox.pack_start(widgets.LinkBox(link_label, button))
@@ -1063,7 +1073,7 @@ class RelationshipView(PageView.PersonNavView):
link_label.set_padding(3, 0)
if child_should_be_linked and Config.get(Config.RELEDITBTN):
button = widgets.IconButton(self.edit_button_press, handle)
self.tooltips.set_tip(button, _('Edit %s') % name[0])
button.set_tooltip_text(_('Edit %s') % name[0])
else:
button = None
@@ -1094,7 +1104,7 @@ class RelationshipView(PageView.PersonNavView):
return None
birth = ReportUtils.get_birth_or_fallback(self.dbstate.db, person)
if birth and birth.get_type != gen.lib.EventType.BIRTH:
if birth and birth.get_type() != gen.lib.EventType.BIRTH:
sdate = DateHandler.get_date(birth)
if sdate:
bdate = "<i>%s</i>" % cgi.escape(sdate)
@@ -1106,7 +1116,7 @@ class RelationshipView(PageView.PersonNavView):
bdate = ""
death = ReportUtils.get_death_or_fallback(self.dbstate.db, person)
if death and death.get_type != gen.lib.EventType.DEATH:
if death and death.get_type() != gen.lib.EventType.DEATH:
sdate = DateHandler.get_date(death)
if sdate:
ddate = "<i>%s</i>" % cgi.escape(sdate)
@@ -1199,7 +1209,9 @@ class RelationshipView(PageView.PersonNavView):
for event_ref in family.get_event_ref_list():
handle = event_ref.ref
event = self.dbstate.db.get_event_from_handle(handle)
if event.get_type() == gen.lib.EventType.MARRIAGE:
if event and event.get_type() == gen.lib.EventType.MARRIAGE and \
(event_ref.get_role() == gen.lib.EventRoleType.FAMILY or
event_ref.get_role() == gen.lib.EventRoleType.PRIMARY ):
self.write_event_ref(vbox, _('Marriage'), event)
value = True
return value
@@ -1331,13 +1343,11 @@ class RelationshipView(PageView.PersonNavView):
addchild = widgets.IconButton(self.add_child_to_fam,
family.handle,
gtk.STOCK_ADD)
self.tooltips.set_tip(addchild,
_('Add new child to family'))
addchild.set_tooltip_text(_('Add new child to family'))
selchild = widgets.IconButton(self.sel_child_to_fam,
family.handle,
gtk.STOCK_INDEX)
self.tooltips.set_tip(selchild,
_('Add existing child to family'))
selchild.set_tooltip_text(_('Add existing child to family'))
hbox.pack_start(addchild, False)
hbox.pack_start(selchild, False)
self.attach.attach(
@@ -1594,7 +1604,7 @@ def button_activated(event, mouse_button):
if (event.type == gtk.gdk.BUTTON_PRESS and \
event.button == mouse_button) or \
(event.type == gtk.gdk.KEY_PRESS and \
event.keyval in (_RETURN, _KP_ENTER)):
event.keyval in (_RETURN, _KP_ENTER, _SPACE)):
return True
else:
return False
+10 -9
View File
@@ -9,19 +9,20 @@ pkgdata_PYTHON = \
_Date_ca.py\
_Date_cs.py\
_Date_de.py\
_Date_ru.py\
_Date_lt.py\
_Date_fr.py\
_Date_es.py\
_Date_fi.py\
_Date_sv.py\
_Date_nb.py\
_Date_nl.py\
_Date_sk.py\
_Date_pl.py\
_Date_pt.py\
_Date_fr.py\
_Date_hr.py\
_Date_it.py\
_Date_lt.py\
_Date_nb.py\
_Date_nl.py\
_Date_pl.py\
_Date_pt.py\
_Date_ru.py\
_Date_sk.py\
_Date_sr.py\
_Date_sv.py\
_DateDisplay.py\
_DateParser.py\
_DateHandler.py\
+2 -2
View File
@@ -69,7 +69,7 @@ class DateParserCZ(DateParser):
u'r' : Date.CAL_FRENCH,
u'perský' : Date.CAL_PERSIAN,
u'p' : Date.CAL_PERSIAN,
u'swedish' : Date.CAL_SWEDISH,
u'švédský' : Date.CAL_SWEDISH,
u's' : Date.CAL_SWEDISH,
}
@@ -138,7 +138,7 @@ class DateDisplayCZ(DateDisplay):
elif mod == Date.MOD_RANGE:
d1 = self.display_cal[cal](start)
d2 = self.display_cal[cal](date.get_stop_date())
return "%s%s %s %s %s%s" % (qual_str, u'medzi',
return "%s%s %s %s %s%s" % (qual_str, u'mezi',
d1, u'a', d2, self.calendar[cal])
else:
text = self.display_cal[date.get_calendar()](start)
+2 -2
View File
@@ -58,8 +58,8 @@ class DateParserFR(DateParser):
# Add common value
month_to_int[u"bluviose"] = 1
month_to_int[u"vendose"] = 2
month_to_int[u"bluviose"] = 5
month_to_int[u"vendose"] = 6
month_to_int[u"7bre"] = 9
month_to_int[u"8bre"] = 10
month_to_int[u"9bre"] = 11
+1 -1
View File
@@ -180,7 +180,7 @@ class DateParserHR(DateParser):
"""
DateParser.init_strings(self)
# match 'Day. MONTH year.' format with or without dots
self._text2 = re.compile('(\d+)?\.?\s+?%s\.?\s*((\d+)(/\d+)?)?\s*\.?$'
self._text2 = re.compile('(\d+)?\.?\s*?%s\.?\s*((\d+)(/\d+)?)?\s*\.?$'
% self._mon_str, re.IGNORECASE)
# match Day.Month.Year.
self._numeric = re.compile(
+393
View File
@@ -0,0 +1,393 @@
# -*- coding: utf-8 -*-
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2004-2007 Donald N. Allingham
#
# 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
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Serbian version by Vlada Perić <vlada.peric@gmail.com>, 2009.
# Based on the Croatian DateHandler by Josip
"""
Serbian-specific classes for parsing and displaying dates.
"""
#-------------------------------------------------------------------------
#
# Python modules
#
#-------------------------------------------------------------------------
import re
#-------------------------------------------------------------------------
#
# GRAMPS modules
#
#-------------------------------------------------------------------------
from gen.lib import Date
from _DateParser import DateParser
from _DateDisplay import DateDisplay
from _DateHandler import register_datehandler
#-------------------------------------------------------------------------
#
# Serbian parser
#
#-------------------------------------------------------------------------
class DateParserSR(DateParser):
"""
Converts a text string into a Date object
"""
month_to_int = DateParser.month_to_int
month_to_int[u"januar"] = 1
month_to_int[u"januara"] = 1
month_to_int[u"jan"] = 1
month_to_int[u"јан"] = 1
month_to_int[u"јануара"] = 1
month_to_int[u"јануар"] = 1
month_to_int[u"i"] = 1
month_to_int[u"februar"] = 2
month_to_int[u"februara"] = 2
month_to_int[u"feb"] = 2
month_to_int[u"феб"] = 2
month_to_int[u"фебруар"] = 2
month_to_int[u"фебруара"] = 2
month_to_int[u"ii"] = 2
month_to_int[u"mart"] = 3
month_to_int[u"marta"] = 3
month_to_int[u"mar"] = 3
month_to_int[u"мар"] = 3
month_to_int[u"март"] = 3
month_to_int[u"марта"] = 3
month_to_int[u"iii"] = 3
month_to_int[u"april"] = 4
month_to_int[u"aprila"] = 4
month_to_int[u"apr"] = 4
month_to_int[u"апр"] = 4
month_to_int[u"април"] = 4
month_to_int[u"априла"] = 4
month_to_int[u"iv"] = 4
month_to_int[u"maj"] = 5
month_to_int[u"maja"] = 5
month_to_int[u"мај"] = 5
month_to_int[u"маја"] = 5
month_to_int[u"v"] = 5
month_to_int[u"jun"] = 6
month_to_int[u"juna"] = 6
month_to_int[u"јун"] = 6
month_to_int[u"јуна"] = 6
month_to_int[u"vi"] = 6
month_to_int[u"jul"] = 7
month_to_int[u"jula"] = 7
month_to_int[u"јул"] = 7
month_to_int[u"јула"] = 7
month_to_int[u"vii"] = 7
month_to_int[u"avgust"] = 8
month_to_int[u"avgusta"] = 8
month_to_int[u"avg"] = 8
month_to_int[u"авг"] = 8
month_to_int[u"август"] = 8
month_to_int[u"августа"] = 8
month_to_int[u"viii"] = 8
month_to_int[u"septembar"] = 9
month_to_int[u"septembra"] = 9
month_to_int[u"sep"] = 9
month_to_int[u"сеп"] = 9
month_to_int[u"септембар"] = 9
month_to_int[u"септембра"] = 9
month_to_int[u"ix"] = 9
month_to_int[u"oktobar"] = 10
month_to_int[u"oktobra"] = 10
month_to_int[u"okt"] = 10
month_to_int[u"окт"] = 10
month_to_int[u"октобар"] = 10
month_to_int[u"октобра"] = 10
month_to_int[u"x"] = 10
month_to_int[u"novembar"] = 11
month_to_int[u"novembra"] = 11
month_to_int[u"nov"] = 11
month_to_int[u"нов"] = 11
month_to_int[u"новембар"] = 11
month_to_int[u"новембра"] = 11
month_to_int[u"xi"] = 11
month_to_int[u"decembar"] = 12
month_to_int[u"decembra"] = 12
month_to_int[u"dec"] = 12
month_to_int[u"дец"] = 12
month_to_int[u"децембар"] = 12
month_to_int[u"децембра"] = 12
month_to_int[u"xii"] = 12
modifier_to_int = {
u'pre' : Date.MOD_BEFORE,
u'posle' : Date.MOD_AFTER,
u'oko' : Date.MOD_ABOUT,
u'cca' : Date.MOD_ABOUT,
u'пре' : Date.MOD_BEFORE,
u'после' : Date.MOD_AFTER,
u'око' : Date.MOD_ABOUT,
}
calendar_to_int = {
u'gregorijanski' : Date.CAL_GREGORIAN,
u'greg.' : Date.CAL_GREGORIAN,
u'julijanski' : Date.CAL_JULIAN,
u'jul.' : Date.CAL_JULIAN,
u'hebrejski' : Date.CAL_HEBREW,
u'hebr.' : Date.CAL_HEBREW,
u'islamski' : Date.CAL_ISLAMIC,
u'isl.' : Date.CAL_ISLAMIC,
u'francuski republikanski': Date.CAL_FRENCH,
u'franc.' : Date.CAL_FRENCH,
u'persijski' : Date.CAL_PERSIAN,
u'pers. ' : Date.CAL_PERSIAN,
u'švedski' : Date.CAL_SWEDISH,
u'šv.' : Date.CAL_SWEDISH,
u'грегоријански' : Date.CAL_GREGORIAN,
u'грег.' : Date.CAL_GREGORIAN,
u'јулијански' : Date.CAL_JULIAN,
u'јул.' : Date.CAL_JULIAN,
u'хебрејски' : Date.CAL_HEBREW,
u'хебр.' : Date.CAL_HEBREW,
u'исламски' : Date.CAL_ISLAMIC,
u'исл.' : Date.CAL_ISLAMIC,
u'француски републикански': Date.CAL_FRENCH,
u'франц.' : Date.CAL_FRENCH,
u'персијски' : Date.CAL_PERSIAN,
u'перс. ' : Date.CAL_PERSIAN,
u'шведски' : Date.CAL_SWEDISH,
u'шв' : Date.CAL_SWEDISH,
}
quality_to_int = {
u'procenjeno' : Date.QUAL_ESTIMATED,
u'pro.' : Date.QUAL_ESTIMATED,
u'izračunato' : Date.QUAL_CALCULATED,
u'izr.' : Date.QUAL_CALCULATED,
u'процењено' : Date.QUAL_ESTIMATED,
u'про.' : Date.QUAL_ESTIMATED,
u'израчунато' : Date.QUAL_CALCULATED,
u'изр.' : Date.QUAL_CALCULATED,
}
bce = [u"пре нове ере", u"пре Христа", u"п.н.е."
u"pre nove ere", u"pre Hrista", u"p.n.e."] + DateParser.bce
def init_strings(self):
"""
compiles regular expression strings for matching dates
"""
DateParser.init_strings(self)
# match 'Day. MONTH year.' format with or without dots
self._text2 = re.compile('(\d+)?\.?\s*?%s\s*((\d+)(/\d+)?)?\.?\s*$'
% self._mon_str, re.IGNORECASE)
# match Day.Month.Year.
self._numeric = re.compile("((\d+)[/\. ])?\s*((\d+)[/\.])?\s*(\d+)\.?$")
_span1 = [u'od', u'од']
_span2 = [u'do', u'до']
_range1 = [u'između', u'између']
_range2 = [u'i', u'и']
self._span = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
('|'.join(_span1),'|'.join(_span2)),
re.IGNORECASE)
self._range = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
('|'.join(_range1),'|'.join(_range2)),
re.IGNORECASE)
#-------------------------------------------------------------------------
#
# Serbian display
#
#-------------------------------------------------------------------------
class DateDisplaySR_latin(DateDisplay):
"""
Serbian (latin) date display class
"""
calendar = (
"", u" (julijanski)", u" (hebrejski)",
u" (francuski republikanski)", u" (persijski)", u" (islamski)",
u" (švedski)"
)
_mod_str = ("", "pre ", "posle ", "oko ", "", "", "")
_qual_str = ("", "procenjeno ", "izračunato ")
_bce_str = "%s p.n.e."
formats = (
"GGGG-MM-DD (ISO-8601)",
"Numerički (D.M.GGGG.)",
"D. MMM GGGG.",
"D. Mesec GGGG.",
"D. Rb GGGG."
)
roman_months = (
"",
"I",
"II",
"III",
"IV",
"V",
"VI",
"VII",
"VIII",
"IX",
"X",
"XI",
"XII"
)
sr_months = ("",
u"januara",
u"februara",
u"marta",
u"aprila",
u"maja",
u"juna",
u"jula",
u"avgusta",
u"septembra",
u"oktobra",
u"novembra",
u"decembra"
)
sr_months3 = ("",
u"jan",
u"feb",
u"mar",
u"apr",
u"maj",
u"jun",
u"jul",
u"avg",
u"sep",
u"okt",
u"nov",
u"dec"
)
def _display_gregorian(self, date_val):
"""
display gregorian calendar date in different format
"""
year = self._slash_year(date_val[2], date_val[3])
if self.format == 0:
return self.display_iso(date_val)
elif self.format == 1:
if date_val[3]:
return self.display_iso(date_val)
else:
if date_val[0] == 0 and date_val[1] == 0:
value = str(date_val[2])
else:
value = self._tformat.replace('%m', str(date_val[1]))
value = value.replace('%d', str(date_val[0]))
value = value.replace('%Y', str(abs(date_val[2])))
value = value.replace('-', '/')
elif self.format == 2:
# Day. MON Year.
if date_val[0] == 0:
if date_val[1] == 0:
value = u"%s." % year
else:
value = u"%s %s." % (self.sr_months3[date_val[1]], year)
else:
value = u"%d. %s %s." % (date_val[0],
self.sr_months3[date_val[1]], year)
elif self.format == 3:
# Day. MONTH Year.
if date_val[0] == 0:
if date_val[1] == 0:
value = u"%s." % year
else:
value = u"%s %s." % (self.sr_months[date_val[1]], year)
else:
value = u"%d. %s %s." % (date_val[0],
self.sr_months[date_val[1]], year)
else:
# Day RomanMon Year
if date_val[0] == 0:
if date_val[1] == 0:
value = u"%s." % year
else:
value = "%s %s." % (self.roman_months[date_val[1]], year)
else:
value = "%d. %s %s." % (date_val[0],
self.roman_months[date_val[1]], year)
if date_val[2] < 0:
return self._bce_str % value
else:
return value
def display(self, date):
"""
Return a text string representing the date.
"""
mod = date.get_modifier()
cal = date.get_calendar()
qual = date.get_quality()
start = date.get_start_date()
qual_str = self._qual_str[qual]
if mod == Date.MOD_TEXTONLY:
return date.get_text()
elif start == Date.EMPTY:
return ""
elif mod == Date.MOD_SPAN:
d_1 = self.display_cal[cal](start)
d_2 = self.display_cal[cal](date.get_stop_date())
return "%s%s %s %s %s%s" % (qual_str, u'od', d_1, u'do', d_2,
self.calendar[cal])
elif mod == Date.MOD_RANGE:
d_1 = self.display_cal[cal](start)
d_2 = self.display_cal[cal](date.get_stop_date())
return "%s%s %s %s %s%s" % (qual_str, u'između', d_1, u'i', d_2,
self.calendar[cal])
else:
text = self.display_cal[date.get_calendar()](start)
return "%s%s%s%s" % (qual_str, self._mod_str[mod], text,
self.calendar[cal])
#-------------------------------------------------------------------------
#
# Register classes
#
#-------------------------------------------------------------------------
register_datehandler(('sr', 'serbian', 'srpski', 'sr_RS'),
DateParserSR, DateDisplaySR_latin)
+4 -3
View File
@@ -29,11 +29,14 @@ from _DateHandler import (LANG, LANG_SHORT, LANG_TO_PARSER, LANG_TO_DISPLAY,
register_datehandler)
# Import all the localized handlers
import _Date_ca
import _Date_cs
import _Date_de
import _Date_es
import _Date_fi
import _Date_fr
import _Date_hr
import _Date_it
import _Date_lt
import _Date_nb
import _Date_nl
@@ -41,10 +44,8 @@ import _Date_pl
import _Date_pt
import _Date_ru
import _Date_sk
import _Date_sr
import _Date_sv
import _Date_hr
import _Date_ca
import _Date_it
# Initialize global parser
try:
+1 -1
View File
@@ -107,7 +107,7 @@ class EventModel(BaseModel):
return u''
def column_type(self,data):
return str(gen.lib.EventType(data[COLUMN_TYPE]))
return unicode(gen.lib.EventType(data[COLUMN_TYPE]))
def column_id(self,data):
return unicode(data[COLUMN_ID])
+4 -1
View File
@@ -46,6 +46,7 @@ import GrampsLocale
import DateHandler
from BasicUtils import name_displayer
import gen.lib
from gen.lib import EventRoleType
import gen.utils
from _BaseModel import BaseModel
@@ -126,10 +127,12 @@ class FamilyModel(BaseModel):
return u""
def column_type(self, data):
return str(gen.lib.FamilyRelType(data[5]))
return unicode(gen.lib.FamilyRelType(data[5]))
def column_marriage(self, data):
erlist = [ gen.lib.EventRef().unserialize(d) for d in data[6] ]
erlist = [x for x in erlist if x.get_role()==EventRoleType.FAMILY or
x.get_role()==EventRoleType.PRIMARY]
event = gen.utils.marriage_from_eventref_list(self.db, erlist)
if event:
return DateHandler.displayer.display(event.date)
+8 -2
View File
@@ -40,7 +40,7 @@ import locale
#
#-------------------------------------------------------------------------
import logging
log = logging.getLogger(".")
_LOG = logging.getLogger(".gui.peoplemodel")
#-------------------------------------------------------------------------
#
@@ -243,6 +243,7 @@ class PeopleModel(gtk.GenericTreeModel):
"""
Initialize the model building the initial data
"""
cput = time.clock()
gtk.GenericTreeModel.__init__(self)
self.db = db
@@ -291,6 +292,8 @@ class PeopleModel(gtk.GenericTreeModel):
data_filter = None
self.current_filter = data_filter
self.rebuild_data(data_filter, skip)
_LOG.debug(self.__class__.__name__ + ' __init__ ' +
str(time.clock() - cput) + ' sec')
def update_todo(self,client,cnxn_id,entry,data):
self.todo_color = Config.get(Config.TODO_COLOR)
@@ -305,9 +308,12 @@ class PeopleModel(gtk.GenericTreeModel):
"""
Convience function that calculates the new data and assigns it.
"""
cput = time.clock()
self.calculate_data(data_filter, skip)
self.assign_data()
self.current_filter = data_filter
_LOG.debug(self.__class__.__name__ + ' rebuild_data ' +
str(time.clock() - cput) + ' sec')
def _build_search_sub(self,dfilter, skip):
@@ -521,7 +527,7 @@ class PeopleModel(gtk.GenericTreeModel):
GrampsLocale.codeset)
def column_gender(self, data, node):
return PeopleModel._GENDER[data[PeopleModel._GENDER_COL]]
return unicode(PeopleModel._GENDER[data[PeopleModel._GENDER_COL]])
def column_birth_day(self, data, node):
try:
+1 -1
View File
@@ -104,7 +104,7 @@ class RepositoryModel(BaseModel):
return unicode(data[1])
def column_type(self,data):
return str(gen.lib.RepositoryType(data[2]))
return unicode(gen.lib.RepositoryType(data[2]))
def column_name(self,data):
return unicode(data[3])
+1 -2
View File
@@ -87,8 +87,7 @@ class BackRefList(EmbeddedList):
Method has signature of, and overrides create_buttons from _ButtonTab.py
"""
self.edit_btn = SimpleButton(gtk.STOCK_EDIT, self.edit_button_clicked)
self.tooltips = gtk.Tooltips()
self.tooltips.set_tip(self.edit_btn, _('Edit reference'))
self.edit_btn.set_tooltip_text(_('Edit reference'))
hbox = gtk.HBox()
hbox.set_spacing(6)
+7 -8
View File
@@ -98,7 +98,6 @@ class ButtonTab(GrampsTab):
"""
self.dirty_selection = False
GrampsTab.__init__(self,dbstate, uistate, track, name)
self.tooltips = gtk.Tooltips()
self.create_buttons(share_button, move_buttons, jump_button)
def create_buttons(self, share_button, move_buttons, jump_button):
@@ -113,22 +112,22 @@ class ButtonTab(GrampsTab):
self.edit_btn = SimpleButton(gtk.STOCK_EDIT, self.edit_button_clicked)
self.del_btn = SimpleButton(gtk.STOCK_REMOVE, self.del_button_clicked)
self.tooltips.set_tip(self.add_btn, self._MSG['add'])
self.tooltips.set_tip(self.edit_btn, self._MSG['edit'])
self.tooltips.set_tip(self.del_btn, self._MSG['del'])
self.add_btn.set_tooltip_text(self._MSG['add'])
self.edit_btn.set_tooltip_text(self._MSG['edit'])
self.del_btn.set_tooltip_text(self._MSG['del'])
if share_button:
self.share_btn = SimpleButton(gtk.STOCK_INDEX, self.share_button_clicked)
self.tooltips.set_tip(self.share_btn, self._MSG['share'])
self.share_btn.set_tooltip_text(self._MSG['share'])
else:
self.share_btn = None
if move_buttons:
self.up_btn = SimpleButton(gtk.STOCK_GO_UP, self.up_button_clicked)
self.tooltips.set_tip(self.up_btn, self._MSG['up'])
self.up_btn.set_tooltip_text(self._MSG['up'])
self.down_btn = SimpleButton(gtk.STOCK_GO_DOWN,
self.down_button_clicked)
self.tooltips.set_tip(self.down_btn, self._MSG['down'])
self.down_btn.set_tooltip_text(self._MSG['down'])
else:
self.up_btn = None
self.down_btn = None
@@ -146,7 +145,7 @@ class ButtonTab(GrampsTab):
if jump_button:
self.jump_btn = SimpleButton(gtk.STOCK_JUMP_TO, self.jump_button_clicked)
self.tooltips.set_tip(self.jump_btn, self._MSG['jump'])
self.jump_btn.set_tooltip_text(self._MSG['jump'])
else:
self.jump_btn = None
+6 -2
View File
@@ -240,11 +240,15 @@ class EmbeddedList(ButtonTab):
pass
def _find_row(self, x, y):
row = self.tree.get_path_at_pos(x, y)
row = self.tree.get_dest_row_at_pos(x, y)
if row is None:
return len(self.get_data())
else:
return row[0][0]
if row[1] in (gtk.TREE_VIEW_DROP_BEFORE,
gtk.TREE_VIEW_DROP_INTO_OR_BEFORE):
return row[0][0]
else:
return row[0][0]+1
def _handle_drag(self, row, obj):
self.get_data().insert(row, obj)
+6 -5
View File
@@ -2,6 +2,7 @@
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2006 Donald N. Allingham
# Copyright (C) 2009 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
@@ -344,11 +345,11 @@ class GalleryTab(ButtonTab):
dnd_types = [ self._DND_TYPE.target(), self._DND_EXTRA.target(),
DdTargets.MEDIAOBJ.target()]
self.iconlist.drag_dest_set(gtk.DEST_DEFAULT_ALL, dnd_types,
gtk.gdk.ACTION_COPY)
self.iconlist.drag_source_set(gtk.gdk.BUTTON1_MASK,
[self._DND_TYPE.target()],
gtk.gdk.ACTION_COPY)
self.iconlist.enable_model_drag_dest(dnd_types,
gtk.gdk.ACTION_COPY)
self.iconlist.enable_model_drag_source(gtk.gdk.BUTTON1_MASK,
[self._DND_TYPE.target()],
gtk.gdk.ACTION_COPY)
self.iconlist.connect('drag_data_get', self.drag_data_get)
if not self.dbstate.db.readonly:
self.iconlist.connect('drag_data_received', self.drag_data_received)
+1 -1
View File
@@ -39,7 +39,7 @@ class NoteModel(gtk.ListStore):
self.db = db
for handle in note_list:
note = self.db.get_note_from_handle(handle)
text = note.get().replace('\n', ' ')
text = unicode(note.get().replace('\n', ' '))
if len(text) > 80:
text = text[:80]+"..."
self.append(row=[
+7 -8
View File
@@ -87,7 +87,6 @@ class ObjEntry(object):
self.set_val = set_val
self.uistate = uistate
self.track = track
self.tooltips = gtk.Tooltips()
#connect drag and drop
self._init_dnd()
@@ -219,25 +218,25 @@ class ObjEntry(object):
image.set_from_stock(gtk.STOCK_REMOVE, gtk.ICON_SIZE_BUTTON)
image.show()
self.share.add(image)
self.tooltips.set_tip(self.share, self.DEL_STR)
self.share.set_tooltip_text(self.DEL_STR)
if self.add_edt is not None:
image = gtk.Image()
image.set_from_stock(gtk.STOCK_EDIT, gtk.ICON_SIZE_BUTTON)
image.show()
self.add_edt.add(image)
self.tooltips.set_tip(self.add_edt, self.EDIT_STR)
self.add_edt.set_tooltip_text(self.EDIT_STR)
else:
image = gtk.Image()
image.set_from_stock(gtk.STOCK_INDEX, gtk.ICON_SIZE_BUTTON)
image.show()
self.share.add(image)
self.tooltips.set_tip(self.share, self.SHARE_STR)
self.share.set_tooltip_text(self.SHARE_STR)
if self.add_edt is not None:
image = gtk.Image()
image.set_from_stock(gtk.STOCK_ADD, gtk.ICON_SIZE_BUTTON)
image.show()
self.add_edt.add(image)
self.tooltips.set_tip(self.add_edt, self.ADD_STR)
self.add_edt.set_tooltip_text(self.ADD_STR)
class PlaceEntry(ObjEntry):
"""
@@ -384,10 +383,10 @@ class NoteEntry(ObjEntry):
def get_label(self, note):
txt = " ".join(note.get().split())
#String must be unicode for truncation to work for non ascii characters
txt = unicode(txt)
if len(txt) > 35:
txt = txt[:35]+"..."
else:
txt = txt
txt = txt[:35] + "..."
return "%s [%s]" % (txt, note.gramps_id)
def call_editor(self, obj=None):
+8 -14
View File
@@ -409,7 +409,6 @@ class EditFamily(EditPrimary):
def __init__(self, dbstate, uistate, track, family):
self.tooltips = gtk.Tooltips()
EditPrimary.__init__(self, dbstate, uistate, track,
family, dbstate.db.get_family_from_handle,
dbstate.db.get_family_from_gramps_id)
@@ -543,12 +542,10 @@ class EditFamily(EditPrimary):
self.mbutton_del = self.top.get_widget('mbutton_del')
self.mbutton_edit = self.top.get_widget('mbutton_edit')
self.tooltips.set_tip(self.mbutton_index,
_("Select a person as the mother"))
self.tooltips.set_tip(self.mbutton_add,
_("Add a new person as the mother"))
self.tooltips.set_tip(self.mbutton_del,
_("Remove the person as the mother"))
self.mbutton_index.set_tooltip_text(_("Select a person as the mother"))
self.mbutton_add.set_tooltip_text(_("Add a new person as the mother"))
self.mbutton_del.set_tooltip_text(_("Remove the person as the mother"))
self.mbutton_edit.connect('button-press-event', self.edit_mother)
self.mbutton_edit.connect('key-press-event', self.edit_mother)
@@ -561,12 +558,9 @@ class EditFamily(EditPrimary):
self.fbutton_del = self.top.get_widget('fbutton_del')
self.fbutton_edit = self.top.get_widget('fbutton_edit')
self.tooltips.set_tip(self.fbutton_index,
_("Select a person as the father"))
self.tooltips.set_tip(self.fbutton_add,
_("Add a new person as the father"))
self.tooltips.set_tip(self.fbutton_del,
_("Remove the person as the father"))
self.fbutton_index.set_tooltip_text(_("Select a person as the father"))
self.fbutton_add.set_tooltip_text(_("Add a new person as the father"))
self.fbutton_del.set_tooltip_text(_("Remove the person as the father"))
self.fbutton_edit.connect('button-press-event', self.edit_father)
self.fbutton_edit.connect('key-press-event', self.edit_father)
@@ -856,7 +850,7 @@ class EditFamily(EditPrimary):
if death and death.get_type() == gen.lib.EventType.BURIAL:
death_label.set_label(_("Burial:"))
self.tooltips.set_tip(btn_edit, _('Edit %s') % name)
btn_edit.set_tooltip_text(_('Edit %s') % name)
btn_index.hide()
btn_add.hide()
btn_del.show()
+4 -4
View File
@@ -119,7 +119,9 @@ class ExportAssistant(gtk.Assistant, ManagedWindow.ManagedWindow) :
self.top_title = _("Export Assistant")
ManagedWindow.ManagedWindow.__init__(self,uistate,[],
self.__class__)
self.set_window(self, None, self.top_title, isWindow=True)
#set_window is present in both parent classes
ManagedWindow.ManagedWindow.set_window(self, self, None,
self.top_title, isWindow=True)
#set up callback method for the export plugins
self.callback = self.pulse_progressbar
@@ -197,8 +199,6 @@ class ExportAssistant(gtk.Assistant, ManagedWindow.ManagedWindow) :
table.set_row_spacings(6)
table.set_col_spacings(6)
tip = gtk.Tooltips()
group = None
recent_type = Config.get(Config.RECENT_EXPORT_TYPE)
@@ -207,11 +207,11 @@ class ExportAssistant(gtk.Assistant, ManagedWindow.ManagedWindow) :
description= self.__exporters[ix].get_description()
button = gtk.RadioButton(group,title)
button.set_tooltip_text(description)
if not group:
group = button
self.format_buttons.append(button)
table.attach(button,0,2,2*ix,2*ix+1)
tip.set_tip(button,description)
if ix == recent_type :
button.set_active(True)
+27 -48
View File
@@ -214,44 +214,6 @@ class MyLesserEqualGreater(gtk.ComboBox):
else:
self.set_active(self.clist.index('equal to'))
#-------------------------------------------------------------------------
#
# MySource - Combo box with list of sources with a standard interface
#
#-------------------------------------------------------------------------
class MySource(gtk.ComboBox):
def __init__(self, db):
gtk.ComboBox.__init__(self)
self.db = db
store = gtk.ListStore(gobject.TYPE_STRING)
self.set_model(store)
cell = gtk.CellRendererText()
self.pack_start(cell, True)
self.add_attribute(cell, 'text', 0)
self.slist = []
for src_handle in self.db.get_source_handles(sort_handles=True):
src = self.db.get_source_from_handle(src_handle)
self.slist.append(src.get_gramps_id())
title = src.get_title()
if len(title) > 44:
title = title[:40] + "..."
store.append(row=["%s [%s]" % (title, src.get_gramps_id())])
self.set_active(0)
self.show()
def get_text(self):
active = self.get_active()
if active < 0:
return ""
return self.slist[active]
def set_text(self, val):
if val in self.slist:
self.set_active(self.slist.index(val))
#-------------------------------------------------------------------------
#
# MyPlaces - AutoCombo text entry with list of places attached. Provides
@@ -272,6 +234,8 @@ class MyPlaces(gtk.Entry):
#
#-------------------------------------------------------------------------
class MyID(gtk.HBox):
_invalid_id_txt = _('Not a valid ID')
_empty_id_txt = _invalid_id_txt
obj_name = {
'Person' : _('Person'),
@@ -300,10 +264,8 @@ class MyID(gtk.HBox):
self.button.show()
self.pack_start(self.entry)
self.add(self.button)
self.tooltips = gtk.Tooltips()
self.tooltips.set_tip(self.button, _('Select %s from a list')
% self.obj_name[namespace])
self.tooltips.enable()
self.button.set_tooltip_text(_('Select %s from a list')
% self.obj_name[namespace])
self.show()
self.set_text('')
@@ -348,13 +310,30 @@ class MyID(gtk.HBox):
return name
def set_text(self, val):
try:
name = self.name_from_gramps_id(val)
self.tooltips.set_tip(self.entry, name)
except AttributeError:
self.tooltips.set_tip(self.entry, _('Not a valid ID'))
if not val:
self.entry.set_tooltip_text(self._empty_id_txt)
else:
try:
name = self.name_from_gramps_id(val)
self.entry.set_tooltip_text(name)
except AttributeError:
self.entry.set_tooltip_text(self._invalid_id_txt)
self.entry.set_text(val)
#-------------------------------------------------------------------------
#
# MySource - select ID of sources with a standard interface
#
#-------------------------------------------------------------------------
class MySource(MyID):
_empty_id_txt = _('Give or select a source ID, leave empty to find objects'
' with no source.')
def __init__(self, dbstate, uistate, track):
MyID.__init__(self, dbstate, uistate, track, namespace='Source')
self.entry.set_tooltip_text(self._empty_id_txt)
#-------------------------------------------------------------------------
#
#
@@ -486,7 +465,7 @@ class EditRule(ManagedWindow.ManagedWindow):
t = MyID(self.dbstate, self.uistate, self.track,
self.namespace)
elif v == _('Source ID:'):
t = MySource(self.db)
t = MySource(self.dbstate, self.uistate, self.track)
elif v == _('Filter name:'):
t = MyFilters(self.filterdb.get_filters(self.namespace),
self.filter_name)
+2
View File
@@ -133,6 +133,8 @@ class ShowResults(ManagedWindow.ManagedWindow):
elif self.namespace == 'Note':
note = self.db.get_note_from_handle(handle)
name = note.get().replace('\n', ' ')
#String must be unicode for truncation to work for non ascii characters
name = unicode(name)
if len(name) > 80:
name = name[:80]+"..."
gid = note.get_gramps_id()
@@ -56,12 +56,15 @@ class HasCommonAncestorWith(Rule):
# ancestor list once.
# Start with filling the cache for root person (gramps_id in self.list[0])
self.ancestor_cache = {}
self.root_person = db.get_person_from_gramps_id(self.list[0])
self.add_ancs(db, self.root_person)
root_person = db.get_person_from_gramps_id(self.list[0])
self.add_ancs(db, root_person)
self.with_people = [root_person.handle]
def add_ancs(self, db, person):
if person.handle not in self.ancestor_cache:
self.ancestor_cache[person.handle] = set()
else:
return
for fam_handle in person.get_parent_family_handle_list():
fam = db.get_family_from_handle(fam_handle)
@@ -78,8 +81,10 @@ class HasCommonAncestorWith(Rule):
self.ancestor_cache = {}
def has_common_ancestor(self, other):
if self.ancestor_cache[self.root_person.handle] & self.ancestor_cache[other.handle]:
return True
for handle in self.with_people:
if self.ancestor_cache[handle] & \
self.ancestor_cache[other.handle]:
return True
return False
def apply(self, db, person):
@@ -55,12 +55,22 @@ class HasCommonAncestorWithFilterMatch(HasCommonAncestorWith,MatchesFilter):
HasCommonAncestorWith.__init__(self,list)
self.ancestor_cache = {}
def init_ancestor_cache(self,db):
def prepare(self, db):
self.db = db
# For each(!) person we keep track of who their ancestors
# are, in a set(). So we only have to compute a person's
# ancestor list once.
# Start with filling the cache for root person (gramps_id in self.list[0])
self.ancestor_cache = {}
self.with_people = []
filt = MatchesFilter(self.list)
filt.prepare(db)
def init(self, h): self.ancestor_cache[h] = 1
for handle in db.get_person_handles(sort_handles=False):
if (handle not in self.ancestor_cache
and filt.apply (db, db.get_person_from_handle(handle))):
for_each_ancestor(db,[handle],init,self)
person = db.get_person_from_handle(handle)
if filt.apply (db, person):
#store all people in the filter so as to compare later
self.with_people.append(person.handle)
#fill list of ancestor of person if not present yet
if handle not in self.ancestor_cache:
self.add_ancs(db, person)
filt.reset()
+12 -3
View File
@@ -48,12 +48,21 @@ class HasSourceOf(Rule):
description = _('Matches people who have a particular source')
def prepare(self,db):
if self.list[0] == '':
self.source_handle = None
self.nosource = True
return
self.nosource = False
try:
self.source_handle = db.get_source_from_gramps_id(self.list[0]).get_handle()
except:
self.source_handle = None
def apply(self,db,person):
def apply(self, db, person):
if not self.source_handle:
return False
return person.has_source_reference( self.source_handle)
if self.nosource:
return len(person.get_source_references()) == 0
else:
return False
return person.has_source_reference(self.source_handle)
+1 -1
View File
@@ -20,7 +20,7 @@ from Filters.Rules._ChangedSinceBase import ChangedSinceBase
class ChangedSince(ChangedSinceBase):
"""Rules that checks for places changed since a specific time."""
name = ('Places changed after <date time>')
name = _('Places changed after <date time>')
description = _("Matches place records changed after a specified "
"date-time (yyyy-mm-dd hh:mm:ss) or in the range, if a second "
"date-time is given")
+4
View File
@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
#
# Gramps - a GTK+/GNOME based genealogy program
#
@@ -76,6 +77,9 @@ class Rule(object):
return ';'.join(v)
def match_substring(self, param_index, str_var):
# make str_var unicode so that search for ü works
# see issue 3188
str_var = unicode(str_var)
if self.list[param_index] and \
(str_var.upper().find(self.list[param_index].upper()) == -1):
return False
+1 -2
View File
@@ -41,7 +41,6 @@ class SidebarFilter(object):
self.table.set_row_spacings(6)
self.table.set_col_spacing(0, 6)
self.table.set_col_spacing(1, 6)
self.tooltips = gtk.Tooltips()
self.apply_btn = gtk.Button(stock=gtk.STOCK_FIND)
self.clear_btn = gtk.Button()
@@ -119,7 +118,7 @@ class SidebarFilter(object):
self.add_entry(name, widget)
widget.connect('key-press-event', self.key_press)
if tooltip:
self.tooltips.set_tip(widget, tooltip)
widget.set_tooltip_text(tooltip)
def key_press(self, obj, event):
if not event.state or event.state in (gtk.gdk.MOD2_MASK,):
+110 -29
View File
@@ -2,6 +2,7 @@
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2009 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
@@ -312,6 +313,22 @@ class GedcomParser(UpdateCallback):
self.rid2id = {}
self.nid2id = {}
#
# Parse table for SUBM tag
#
self.subm_parse_tbl = {
# +1 NAME <SUBMITTER_NAME>
TOKEN_NAME : self.__subm_name,
# +1 <<ADDRESS_STRUCTURE>>
TOKEN_ADDR : self.__subm_addr,
TOKEN_PHON : self.__subm_phon,
# +1 <<MULTIMEDIA_LINK>>
# +1 LANG <LANGUAGE_PREFERENCE>
# +1 RFN <SUBMITTER_REGISTERED_RFN>
# +1 RIN <AUTOMATED_RECORD_ID>
# +1 <<CHANGE_DATE>>
}
#
# Parse table for INDI tag
#
@@ -802,7 +819,6 @@ class GedcomParser(UpdateCallback):
self.want_parse_warnings = False
self.__parse_header_source()
self.want_parse_warnings = True
self.__parse_submitter()
if self.use_def_src:
self.dbase.add_source(self.def_src, self.trans)
self.__parse_record()
@@ -866,6 +882,8 @@ class GedcomParser(UpdateCallback):
we create a new family, assign the handle and GRAMPS ID.
"""
family = gen.lib.Family()
# Add a counter for reordering the children later:
family.child_ref_count = 0
intid = self.fid2id.get(gramps_id)
if self.dbase.has_family_handle(intid):
family.unserialize(self.dbase.get_raw_family_data(intid))
@@ -1098,24 +1116,25 @@ class GedcomParser(UpdateCallback):
except TypeError:
return
def __parse_submitter(self):
def __parse_submitter(self, line):
"""
Parses the submitter data
n @<XREF:SUBM>@ SUBM
+1 NAME <SUBMITTER_NAME>
+1 <<ADDRESS_STRUCTURE>>
+1 <<MULTIMEDIA_LINK>>
+1 LANG <LANGUAGE_PREFERENCE>
+1 RFN <SUBMITTER_REGISTERED_RFN>
+1 RIN <AUTOMATED_RECORD_ID>
+1 <<CHANGE_DATE>>
"""
line = self.__get_next_line()
if line.data != "SUBM":
self._backup()
return
else:
while True:
line = self.__get_next_line()
if self.__level_is_finished(line, 1):
break
elif line.token == TOKEN_NAME:
if self.use_def_src:
self.def_src.set_author(line.data)
elif line.token == TOKEN_ADDR:
self.__skip_subordinate_levels(2)
researcher = gen.lib.Researcher()
state = GedcomUtils.CurrentState()
state.res = researcher
state.level = 1
self.__parse_level(state, self.subm_parse_tbl, self.__undefined)
self.dbase.set_researcher(state.res)
def __parse_record(self):
"""
@@ -1137,7 +1156,9 @@ class GedcomParser(UpdateCallback):
self.__parse_obje(line)
elif key in ("REPO", "REPOSITORY"):
self.__parse_repo(line)
elif key in ("SUBM", "SUBN", "SUBMITTER"):
elif key in ("SUBM", "SUBMITTER"):
self.__parse_submitter(line)
elif key in ("SUBN"):
self.__skip_subordinate_levels(1)
elif line.token in (TOKEN_SUBM, TOKEN_SUBN, TOKEN_IGNORE):
self.__skip_subordinate_levels(1)
@@ -1147,7 +1168,7 @@ class GedcomParser(UpdateCallback):
line.data.startswith("SOURCE "):
# A source formatted in a single line, for example:
# 0 @S62@ SOUR This is the title of the source
source = self.__find_or_create_source(self.sid_map[line[3]])
source = self.__find_or_create_source(self.sid_map[line.data])
source.set_title(line.data[5:])
self.dbase.commit_source(source, self.trans)
elif key[0:4] == "NOTE":
@@ -2409,12 +2430,14 @@ class GedcomParser(UpdateCallback):
reflist = [ ref for ref in state.family.get_child_ref_list() \
if ref.ref == child.handle ]
if reflist:
if reflist: # The child has been referenced already
ref = reflist[0]
if sub_state.frel:
ref.set_father_relation(sub_state.frel)
if sub_state.mrel:
ref.set_mother_relation(sub_state.mrel)
# then we will set the order now:
self.set_child_ref_order(state.family, ref)
else:
ref = gen.lib.ChildRef()
ref.ref = child.handle
@@ -2424,6 +2447,16 @@ class GedcomParser(UpdateCallback):
ref.set_mother_relation(sub_state.mrel)
state.family.add_child_ref(ref)
def set_child_ref_order(self, family, child_ref):
"""
Sets the child_ref in family.child_ref_list to be in the position
family.child_ref_count. This reorders the children to be in the
order given in the FAM section.
"""
family.child_ref_list.remove(child_ref)
family.child_ref_list.insert(family.child_ref_count, child_ref)
family.child_ref_count += 1
def __family_slgs(self, line, state):
"""
n SLGS {1:1}
@@ -2490,7 +2523,7 @@ class GedcomParser(UpdateCallback):
if line.data and line.data[0] == '@':
self.__not_recognized(line, state.level)
else:
(form, filename, title, note) = self.__obje(state.level)
(form, filename, title, note) = self.__obje(state.level + 1)
self.build_media_object(state.family, form, filename, title, note)
def __family_comm(self, line, state):
@@ -2688,7 +2721,7 @@ class GedcomParser(UpdateCallback):
if line.data and line.data[0] == '@':
self.__not_recognized(line, state.level)
else:
(form, filename, title, note) = self.__obje(state.level)
(form, filename, title, note) = self.__obje(state.level + 1)
self.build_media_object(state.event, form, filename, title, note)
def __event_type(self, line, state):
@@ -2710,7 +2743,7 @@ class GedcomParser(UpdateCallback):
else:
try:
name = gen.lib.EventType((gen.lib.EventType.CUSTOM,
line[3]))
line.data))
except AttributeError:
name = gen.lib.EventType(gen.lib.EventType.UNKNOWN)
state.event.set_type(name)
@@ -3459,7 +3492,7 @@ class GedcomParser(UpdateCallback):
@type state: CurrentState
"""
state.repo_ref.set_call_number(line.data)
self.__skip_subordinate_levels(state.level+1)
#self.__skip_subordinate_levels(state.level+1)
def __repo_ref_medi(self, line, state):
name = line.data
@@ -4136,20 +4169,28 @@ class GedcomParser(UpdateCallback):
elif line.token == TOKEN_TIME:
tstr = line.data
elif line.token == TOKEN_DATE:
dstr = line.data
#GedcomLex converted already to Date object
dobj = line.data
elif line.token == TOKEN_NOTE:
self.__skip_subordinate_levels(level+1)
else:
self.__not_recognized(line, level+1)
# Attempt to convert the values to a valid change time
if tstr:
if dobj:
dstr = "%s %s %s" % (dobj.get_day(), dobj.get_month(),
dobj.get_year())
try:
if dstr:
tstruct = time.strptime("%s %s" % (dstr, tstr),
"%d %b %Y %H:%M:%S")
if tstr:
try:
tstruct = time.strptime("%s %s" % (dstr, tstr),
"%d %m %Y %H:%M:%S")
except ValueError:
#seconds is optional in GEDCOM
tstruct = time.strptime("%s %s" % (dstr, tstr),
"%d %m %Y %H:%M")
else:
tstruct = time.strptime(tstr, "%d %b %Y")
tstruct = time.strptime(dstr, "%d %m %Y")
val = time.mktime(tstruct)
obj.change = val
except ValueError:
@@ -4275,4 +4316,44 @@ class GedcomParser(UpdateCallback):
sref.set_reference_handle(self.def_src.handle)
obj.add_source_reference(sref)
def __subm_name(self, line, state):
"""
@param line: The current line in GedLine format
@type line: GedLine
@param state: The current state
@type state: CurrentState
"""
state.res.set_name(line.data)
def __subm_addr(self, line, state):
"""
@param line: The current line in GedLine format
@type line: GedLine
@param state: The current state
@type state: CurrentState
"""
sub_state = GedcomUtils.CurrentState(level=state.level + 1)
sub_state.location = gen.lib.Location()
sub_state.location.set_street(line.data)
self.__parse_level(sub_state, self.parse_loc_tbl, self.__undefined)
location = sub_state.location
state.res.set_address(location.get_street())
state.res.set_city(location.get_city())
state.res.set_state(location.get_state())
state.res.set_country(location.get_country())
state.res.set_postal_code(location.get_postal_code())
def __subm_phon(self, line, state):
"""
n PHON <PHONE_NUMBER> {0:3}
@param line: The current line in GedLine format
@type line: GedLine
@param state: The current state
@type state: CurrentState
"""
state.res.set_phone(line.data)
#===eof===
+1
View File
@@ -895,6 +895,7 @@ class ListView(BookMarkView):
self.columns.append(column)
self.list.append_column(column)
index += 1
self.setup_filter()
def build_tree(self):
if self.active:
+56 -66
View File
@@ -158,7 +158,7 @@ class GuiStringOption(gtk.Entry):
"""
This class displays an option that is a simple one-line string.
"""
def __init__(self, option, dbstate, uistate, track, tooltip):
def __init__(self, option, dbstate, uistate, track):
"""
@param option: The option to display.
@type option: gen.plug.menu.StringOption
@@ -168,7 +168,7 @@ class GuiStringOption(gtk.Entry):
self.__option = option
self.set_text( self.__option.get_value() )
self.connect('changed', self.__text_changed)
tooltip.set_tip(self, self.__option.get_help())
self.set_tooltip_text(self.__option.get_help())
self.__option.connect('avail-changed', self.__update_avail)
self.__update_avail()
@@ -195,12 +195,12 @@ class GuiColorOption(gtk.ColorButton):
"""
This class displays an option that allows the selection of a colour.
"""
def __init__(self, option, dbstate, uistate, track, tooltip):
def __init__(self, option, dbstate, uistate, track):
self.__option = option
value = self.__option.get_value()
gtk.ColorButton.__init__( self, gtk.gdk.color_parse(value) )
self.connect('color-set', self.__value_changed)
tooltip.set_tip(self, self.__option.get_help())
self.set_tooltip_text(self.__option.get_help())
def __value_changed(self, obj): # IGNORE:W0613 - obj is unused
"""
@@ -223,7 +223,7 @@ class GuiNumberOption(gtk.SpinButton):
This class displays an option that is a simple number with defined maximum
and minimum values.
"""
def __init__(self, option, dbstate, uistate, track, tooltip):
def __init__(self, option, dbstate, uistate, track):
self.__option = option
decimals = 0
@@ -243,7 +243,7 @@ class GuiNumberOption(gtk.SpinButton):
self.set_value(self.__option.get_value())
self.connect('value_changed', self.__value_changed)
tooltip.set_tip(self, self.__option.get_help())
self.set_tooltip_text(self.__option.get_help())
self.__option.connect('avail-changed', self.__update_avail)
self.__update_avail()
@@ -271,7 +271,7 @@ class GuiTextOption(gtk.ScrolledWindow):
"""
This class displays an option that is a multi-line string.
"""
def __init__(self, option, dbstate, uistate, track, tooltip):
def __init__(self, option, dbstate, uistate, track):
self.__option = option
gtk.ScrolledWindow.__init__(self)
self.set_shadow_type(gtk.SHADOW_IN)
@@ -287,7 +287,7 @@ class GuiTextOption(gtk.ScrolledWindow):
# Required for tooltip
gtext.add_events(gtk.gdk.ENTER_NOTIFY_MASK)
gtext.add_events(gtk.gdk.LEAVE_NOTIFY_MASK)
tooltip.set_tip(gtext, self.__option.get_help())
gtext.set_tooltip_text(self.__option.get_help())
self.__buff = gtext.get_buffer()
self.__buff.connect('changed', self.__value_changed)
@@ -310,12 +310,12 @@ class GuiBooleanOption(gtk.CheckButton):
"""
This class displays an option that is a boolean (True or False).
"""
def __init__(self, option, dbstate, uistate, track, tooltip):
def __init__(self, option, dbstate, uistate, track):
self.__option = option
gtk.CheckButton.__init__(self, self.__option.get_label())
self.set_active(self.__option.get_value())
self.connect('toggled', self.__value_changed)
tooltip.set_tip(self, self.__option.get_help())
self.set_tooltip_text(self.__option.get_help())
self.__option.connect('avail-changed', self.__update_avail)
self.__update_avail()
@@ -343,7 +343,7 @@ class GuiEnumeratedListOption(gtk.HBox):
This class displays an option that provides a finite number of values.
Each possible value is assigned a value and a description.
"""
def __init__(self, option, dbstate, uistate, track, tooltip):
def __init__(self, option, dbstate, uistate, track):
gtk.HBox.__init__(self)
evtBox = gtk.EventBox()
self.__option = option
@@ -353,7 +353,7 @@ class GuiEnumeratedListOption(gtk.HBox):
self.__update_options()
tooltip.set_tip(self, self.__option.get_help())
self.set_tooltip_text(self.__option.get_help())
self.__combo.connect('changed', self.__value_changed)
self.__option.connect('options-changed', self.__update_options)
@@ -407,7 +407,7 @@ class GuiPersonOption(gtk.HBox):
This class displays an option that allows a person from the
database to be selected.
"""
def __init__(self, option, dbstate, uistate, track, tooltip):
def __init__(self, option, dbstate, uistate, track):
"""
@param option: The option to display.
@type option: gen.plug.menu.PersonOption
@@ -436,8 +436,8 @@ class GuiPersonOption(gtk.HBox):
person = self.__db.get_default_person()
self.__update_person(person)
tooltip.set_tip(pevt, self.__option.get_help())
tooltip.set_tip(person_button, _('Select a different person'))
pevt.set_tooltip_text(self.__option.get_help())
person_button.set_tooltip_text(_('Select a different person'))
self.__option.connect('avail-changed', self.__update_avail)
self.__update_avail()
@@ -498,7 +498,7 @@ class GuiFamilyOption(gtk.HBox):
This class displays an option that allows a family from the
database to be selected.
"""
def __init__(self, option, dbstate, uistate, track, tooltip):
def __init__(self, option, dbstate, uistate, track):
"""
@param option: The option to display.
@type option: gen.plug.menu.FamilyOption
@@ -524,8 +524,8 @@ class GuiFamilyOption(gtk.HBox):
self.__initialize_family()
tooltip.set_tip(pevt, self.__option.get_help())
tooltip.set_tip(family_button, _('Select a different family'))
pevt.set_tooltip_text(self.__option.get_help())
family_button.set_tooltip_text(_('Select a different family'))
self.__option.connect('avail-changed', self.__update_avail)
self.__update_avail()
@@ -637,7 +637,7 @@ class GuiNoteOption(gtk.HBox):
This class displays an option that allows a note from the
database to be selected.
"""
def __init__(self, option, dbstate, uistate, track, tooltip):
def __init__(self, option, dbstate, uistate, track):
"""
@param option: The option to display.
@type option: gen.plug.menu.NoteOption
@@ -666,8 +666,8 @@ class GuiNoteOption(gtk.HBox):
note = self.__db.get_note_from_gramps_id(nid)
self.__update_note(note)
tooltip.set_tip(pevt, self.__option.get_help())
tooltip.set_tip(note_button, _('Select an existing note'))
pevt.set_tooltip_text(self.__option.get_help())
note_button.set_tooltip_text(_('Select an existing note'))
self.__option.connect('avail-changed', self.__update_avail)
self.__update_avail()
@@ -688,10 +688,10 @@ class GuiNoteOption(gtk.HBox):
if note:
note_id = note.get_gramps_id()
txt = " ".join(note.get().split())
#String must be unicode for truncation to work for non ascii characters
txt = unicode(txt)
if len(txt) > 35:
txt = txt[:35]+"..."
else:
txt = txt
txt = txt[:35] + "..."
txt = "%s [%s]" % (txt, note_id)
self.__note_label.set_text( txt )
@@ -719,7 +719,7 @@ class GuiMediaOption(gtk.HBox):
This class displays an option that allows a media object from the
database to be selected.
"""
def __init__(self, option, dbstate, uistate, track, tooltip):
def __init__(self, option, dbstate, uistate, track):
"""
@param option: The option to display.
@type option: gen.plug.menu.MediaOption
@@ -748,8 +748,8 @@ class GuiMediaOption(gtk.HBox):
media = self.__db.get_object_from_gramps_id(mid)
self.__update_media(media)
tooltip.set_tip(pevt, self.__option.get_help())
tooltip.set_tip(media_button, _('Select an existing media object'))
pevt.set_tooltip_text(self.__option.get_help())
media_button.set_tooltip_text(_('Select an existing media object'))
self.__option.connect('avail-changed', self.__update_avail)
self.__update_avail()
@@ -796,7 +796,7 @@ class GuiPersonListOption(gtk.HBox):
This class displays a widget that allows multiple people from the
database to be selected.
"""
def __init__(self, option, dbstate, uistate, track, tooltip):
def __init__(self, option, dbstate, uistate, track):
"""
@param option: The option to display.
@type option: gen.plug.menu.PersonListOption
@@ -849,7 +849,7 @@ class GuiPersonListOption(gtk.HBox):
self.__vbbox.set_layout(gtk.BUTTONBOX_SPREAD)
self.pack_end(self.__vbbox, expand=False)
tooltip.set_tip(self.__tree_view, self.__option.get_help())
self.__tree_view.set_tooltip_text(self.__option.get_help())
def __update_value(self):
"""
@@ -936,7 +936,7 @@ class GuiPlaceListOption(gtk.HBox):
This class displays a widget that allows multiple places from the
database to be selected.
"""
def __init__(self, option, dbstate, uistate, track, tooltip):
def __init__(self, option, dbstate, uistate, track):
"""
@param option: The option to display.
@type option: gen.plug.menu.PlaceListOption
@@ -989,7 +989,7 @@ class GuiPlaceListOption(gtk.HBox):
self.__vbbox.set_layout(gtk.BUTTONBOX_SPREAD)
self.pack_end(self.__vbbox, expand=False)
tooltip.set_tip(self.__tree_view, self.__option.get_help())
self.__tree_view.set_tooltip_text(self.__option.get_help())
def __update_value(self):
"""
@@ -1048,7 +1048,7 @@ class GuiSurnameColorOption(gtk.HBox):
selected from the database, and to assign a colour (not necessarily
unique) to each one.
"""
def __init__(self, option, dbstate, uistate, track, tooltip):
def __init__(self, option, dbstate, uistate, track):
"""
@param option: The option to display.
@type option: gen.plug.menu.SurnameColorOption
@@ -1112,7 +1112,7 @@ class GuiSurnameColorOption(gtk.HBox):
colour = tmp.pop(0)
self.__model.append([surname, colour])
tooltip.set_tip(self.__tree_view, self.__option.get_help())
self.__tree_view.set_tooltip_text(self.__option.get_help())
def __value_changed(self):
"""
@@ -1201,7 +1201,7 @@ class GuiDestinationOption(gtk.HBox):
This class displays an option that allows the user to select a
DestinationOption.
"""
def __init__(self, option, dbstate, uistate, track, tooltip):
def __init__(self, option, dbstate, uistate, track):
"""
@param option: The option to display.
@type option: gen.plug.menu.DestinationOption
@@ -1222,7 +1222,7 @@ class GuiDestinationOption(gtk.HBox):
self.pack_start(self.__entry, True, True)
self.pack_end(self.__button, False, False)
tooltip.set_tip(self, self.__option.get_help())
self.set_tooltip_text(self.__option.get_help())
self.__option.connect('options-changed', self.__option_changed)
@@ -1296,14 +1296,14 @@ class GuiStyleOption(GuiEnumeratedListOption):
"""
This class displays a StyleOption.
"""
def __init__(self, option, dbstate, uistate, track, tooltip):
def __init__(self, option, dbstate, uistate, track):
"""
@param option: The option to display.
@type option: gen.plug.menu.StyleOption
@return: nothing
"""
GuiEnumeratedListOption.__init__(self, option, dbstate,
uistate, track, tooltip)
uistate, track)
self.__option = option
self.__button = gtk.Button("%s..." % _("Style Editor"))
@@ -1344,7 +1344,6 @@ class GuiMenuOptions(object):
# Fill options_dict with report/tool defaults:
self.options_dict = {}
self.options_help = {}
self.__tooltips = gtk.Tooltips()
self.add_menu_options(self.menu)
for name in self.menu.get_all_option_names():
option = self.menu.get_option_by_name(name)
@@ -1387,8 +1386,8 @@ class GuiMenuOptions(object):
if name in self.options_dict:
option.set_value(self.options_dict[name])
widget, label = make_gui_option(option, self.__tooltips,
dialog.dbstate, dialog.uistate, dialog.track)
widget, label = make_gui_option(option, dialog.dbstate,
dialog.uistate, dialog.track)
if widget is None:
print "UNKNOWN OPTION: ", option
@@ -1408,7 +1407,7 @@ class GuiMenuOptions(object):
option = self.menu.get_option_by_name(name)
self.options_dict[name] = option.get_value()
def make_gui_option(option, tooltips, dbstate, uistate, track):
def make_gui_option(option, dbstate, uistate, track):
"""
Stand-alone function so that Options can be used in other
ways, too. Takes an Option and returns a GuiOption.
@@ -1417,49 +1416,40 @@ def make_gui_option(option, tooltips, dbstate, uistate, track):
label = True
pmgr = gen.plug.PluginManager.get_instance()
external_options = pmgr.get_external_opt_dict()
if tooltips == None:
tooltips = gtk.Tooltips()
elif type(tooltips) == type(""):
msg = tooltips
tooltips = gtk.Tooltips()
# FIXME: what widget?
#tooltips.set_tip(gui.scrolledwindow, msg)
if isinstance(option, gen.plug.menu.PersonOption):
widget = GuiPersonOption(option, dbstate, uistate, track, tooltips)
widget = GuiPersonOption(option, dbstate, uistate, track)
elif isinstance(option, gen.plug.menu.FamilyOption):
widget = GuiFamilyOption(option, dbstate, uistate, track, tooltips)
widget = GuiFamilyOption(option, dbstate, uistate, track)
elif isinstance(option, gen.plug.menu.NoteOption):
widget = GuiNoteOption(option, dbstate, uistate, track, tooltips)
widget = GuiNoteOption(option, dbstate, uistate, track)
elif isinstance(option, gen.plug.menu.MediaOption):
widget = GuiMediaOption(option, dbstate, uistate, track, tooltips)
widget = GuiMediaOption(option, dbstate, uistate, track)
elif isinstance(option, gen.plug.menu.PersonListOption):
widget = GuiPersonListOption(option, dbstate, uistate, track, tooltips)
widget = GuiPersonListOption(option, dbstate, uistate, track)
elif isinstance(option, gen.plug.menu.NumberOption):
widget = GuiNumberOption(option, dbstate, uistate, track, tooltips)
widget = GuiNumberOption(option, dbstate, uistate, track)
elif isinstance(option, gen.plug.menu.BooleanOption):
widget = GuiBooleanOption(option, dbstate, uistate, track, tooltips)
widget = GuiBooleanOption(option, dbstate, uistate, track)
label = False
elif isinstance(option, gen.plug.menu.DestinationOption):
widget = GuiDestinationOption(option, dbstate, uistate, track, tooltips)
widget = GuiDestinationOption(option, dbstate, uistate, track)
elif isinstance(option, gen.plug.menu.StringOption):
widget = GuiStringOption(option, dbstate, uistate, track, tooltips)
widget = GuiStringOption(option, dbstate, uistate, track)
elif isinstance(option, gen.plug.menu.StyleOption):
widget = GuiStyleOption(option, dbstate, uistate, track, tooltips)
widget = GuiStyleOption(option, dbstate, uistate, track)
elif isinstance(option, gen.plug.menu.EnumeratedListOption):
widget = GuiEnumeratedListOption(option, dbstate, uistate, track,
tooltips)
widget = GuiEnumeratedListOption(option, dbstate, uistate, track)
elif isinstance(option, gen.plug.menu.TextOption):
widget = GuiTextOption(option, dbstate, uistate, track, tooltips)
widget = GuiTextOption(option, dbstate, uistate, track)
elif isinstance(option, gen.plug.menu.ColorOption):
widget = GuiColorOption(option, dbstate, uistate, track, tooltips)
widget = GuiColorOption(option, dbstate, uistate, track)
elif isinstance(option, gen.plug.menu.SurnameColorOption):
widget = GuiSurnameColorOption(option, dbstate, uistate, track,
tooltips)
widget = GuiSurnameColorOption(option, dbstate, uistate, track)
elif isinstance(option, gen.plug.menu.PlaceListOption):
widget = GuiPlaceListOption(option, dbstate, uistate, track, tooltips)
widget = GuiPlaceListOption(option, dbstate, uistate, track)
elif option.__class__ in external_options:
widget = external_options[option.__class__](option, dbstate, uistate,
track, tooltips)
track)
else:
raise AttributeError(
"can't make GuiOption: unknown option type: '%s'" % option)
+1 -6
View File
@@ -119,12 +119,7 @@ class PluginDialog(ManagedWindow.ManagedWindow):
self.apply_button.set_label(_("_Apply"))
self.apply_button.set_use_underline(True)
if tool_tip:
try:
tttips = gtk.tooltips_data_get(self.apply_button)
if tttips:
tttips[0].set_tip(self.apply_button, tool_tip)
except AttributeError:
pass
self.apply_button.set_tooltip_text(tool_tip)
self.item = None
self.build_plugin_tree(item_list, categories)
+3 -3
View File
@@ -74,14 +74,14 @@ class Citation(object):
@return: The key of the added reference among all the references.
@rtype: char
"""
letter_count = len(string.lowercase)
letter_count = len(string.ascii_lowercase)
ref_count = len(self.__ref_list)
x_ref_count = ref_count
# Return "a" for ref_count = 0, otherwise log(0) does not work
if ref_count == 0:
self.__ref_list.append(("a", source_ref))
return "a"
last_letter = string.lowercase[ ref_count % letter_count ]
last_letter = string.ascii_lowercase[ ref_count % letter_count ]
key = ""
# Calculate prek number of digits.
number_of_letters = int(math.log(float(ref_count),float(letter_count)))+1
@@ -94,7 +94,7 @@ class Citation(object):
x_ref_count = x_ref_count - pow(letter_count, n)
for letter in range(1, number_of_letters):
index = x_ref_count / pow(letter_count, letter) % letter_count
key += string.lowercase[ index ]
key += string.ascii_lowercase[ index ]
key = key + last_letter
self.__ref_list.append((key, source_ref))
return key
+14 -5
View File
@@ -79,7 +79,7 @@ def _validate_options(options, dbase):
phandle = dbase.get_person_handles()[0]
person = dbase.get_person_from_handle(phandle)
if not person:
print "Please specify a person"
print "ERROR: Please specify a person"
if person:
option.set_value(person.get_gramps_id())
@@ -88,13 +88,22 @@ def _validate_options(options, dbase):
family = dbase.get_family_from_gramps_id(fid)
if not family:
person = dbase.get_default_person()
family_list = person.get_family_handle_list()
family_list = []
family_handle = None
if person:
family_list = person.get_family_handle_list()
if family_list:
family_handle = family_list[0]
else:
family_handle = dbase.get_family_handles()[0]
family = dbase.get_family_from_handle(family_handle)
option.set_value(family.get_gramps_id())
flist = dbase.get_family_handles()
if flist:
family_handle = flist[0]
if family_handle:
family = dbase.get_family_from_handle(family_handle)
option.set_value(family.get_gramps_id())
else:
print "ERROR: Please specify a family"
#------------------------------------------------------------------------
#
+1 -1
View File
@@ -821,7 +821,7 @@ if _DOT_FOUND:
_FORMATS += [{ 'type' : "svgz",
'ext' : "svgz",
'descr': _("Compressed Structured Vector Graphs (SVG)"),
'descr': _("Compressed Structured Vector Graphs (SVGZ)"),
'mime' : "image/svgz",
'class': GVSvgzDoc }]
+2 -1
View File
@@ -813,5 +813,6 @@ class MenuReportOptions(GuiMenuOptions,ReportOptions):
# properly.
for optname in self.options_dict:
menu_option = self.menu.get_option_by_name(optname)
menu_option.set_value(self.options_dict[optname])
if menu_option:
menu_option.set_value(self.options_dict[optname])
+28 -4
View File
@@ -58,7 +58,7 @@ import DateHandler
import GrampsDisplay
import ManagedWindow
from TransUtils import sgettext as _
from Utils import mac
from DdTargets import DdTargets
#-------------------------------------------------------------------------
@@ -323,7 +323,9 @@ class ScratchPadNote(ScratchPadWrapper):
value = self._db.get_note_from_handle(handle)
self._title = value.get_gramps_id()
#String must be unicode for truncation to work for non ascii characters
note = value.get().replace('\n', ' ')
note = unicode(note)
if len(note) > 80:
self._value = note[:80]+"..."
else:
@@ -494,6 +496,8 @@ class ScratchPadSourceRef(ScratchPadGrampsTypeWrapper):
text = ""
if len(srctxtlist) > 0:
text = " ".join(srctxtlist[0].get().split())
#String must be unicode for truncation to work for non ascii characters
text = unicode(text)
if len(text) > 60:
text = text[:60]+"..."
self._value = _("Volume/Page: %(pag)s -- %(sourcetext)s") % {
@@ -1100,15 +1104,35 @@ class ScratchPadListView(object):
return
# Find a wrapper class
possible_wrappers = [target for target in context.targets \
if target in self._target_type_to_wrapper_class_map.keys()]
possible_wrappers = []
if mac():
# context is empty on mac due to a bug, work around this
# Note that this workaround code works fine in linux too as
# we know very well inside of GRAMPS what sel_data can be, so
# we can anticipate on it, instead of letting the wrapper handle
# it. This is less clean however !
# See http://www.gramps-project.org/bugs/view.php?id=3089 for
# an explaination of why this is required.
dragtype = None
try:
dragtype = pickle.loads(sel_data)[0]
except pickle.UnpicklingError, msg :
# not a pickled object, probably text
if isinstance(sel_data, basestring):
dragtype = DdTargets.TEXT.drag_type
if dragtype in self._target_type_to_wrapper_class_map:
possible_wrappers = [dragtype]
else:
possible_wrappers = [target for target in context.targets \
if target in self._target_type_to_wrapper_class_map]
if len(possible_wrappers) == 0:
# No wrapper for this class
return
# Just select the first match.
wrapper_class = self._target_type_to_wrapper_class_map[str(possible_wrappers[0])]
wrapper_class = self._target_type_to_wrapper_class_map[
str(possible_wrappers[0])]
o = wrapper_class(self.dbstate,sel_data)
# try:
+43 -9
View File
@@ -30,6 +30,7 @@ import sys
import locale
import random
import time
import platform
from TransUtils import sgettext as _
@@ -50,7 +51,7 @@ import gen.lib
import Errors
from QuestionDialog import WarningDialog, ErrorDialog
from const import TEMP_DIR, USER_HOME
from const import TEMP_DIR, USER_HOME, WINDOWS, MACOS, LINUX
import shutil
#-------------------------------------------------------------------------
@@ -256,6 +257,37 @@ def add_menuitem(menu, msg, obj, func):
item.show()
menu.append(item)
#-------------------------------------------------------------------------
#
# Platform determination functions
#
#-------------------------------------------------------------------------
def lin():
"""
Return True if a linux system
Note: Normally do as linux in else statement of a check !
"""
if platform.system() in LINUX:
return True
return False
def mac():
"""
Return True if a Macintosh system
"""
if platform.system() in MACOS:
return True
return False
def win():
"""
Return True if a windows system
"""
if platform.system() in WINDOWS:
return True
return False
#-------------------------------------------------------------------------
#
#
@@ -611,7 +643,9 @@ def probably_alive(person, db, current_date=None, limit=0):
# code above did not look at birth, only at other events
birth_obj = birth.get_date_object()
if birth_obj.get_valid():
# only if this is a valid birth:
# only if this is a valid birth date:
if birth_obj.match(current_date,">>"):
return False
if too_old(birth_obj, current_date.get_year()):
return False
if not_too_old(birth_obj, current_date.get_year()):
@@ -771,9 +805,7 @@ def not_too_old(date, current_year=None):
time_struct = time.localtime(time.time())
current_year = time_struct[0]
year = date.get_year()
if year > current_year:
return False
return (year != 0 and current_year - year < _MAX_AGE_PROB_ALIVE)
return (year != 0 and abs(current_year - year) < _MAX_AGE_PROB_ALIVE)
def too_old(date, current_year=None):
if current_year:
@@ -782,9 +814,7 @@ def too_old(date, current_year=None):
time_struct = time.localtime(time.time())
the_current_year = time_struct[0]
year = date.get_year()
if year > the_current_year:
return True
return (year != 0 and the_current_year - year > _MAX_AGE_PROB_ALIVE)
return (year != 0 and abs(the_current_year - year) > _MAX_AGE_PROB_ALIVE)
#-------------------------------------------------------------------------
#
@@ -1134,8 +1164,12 @@ def open_file_with_default_application( file_path ):
ErrorDialog(_("Error Opening File"), str(msg))
else:
search = os.environ['PATH'].split(':')
if os.sys.platform == 'darwin':
utility = 'open'
else:
utility = 'xdg-open'
for lpath in search:
prog = os.path.join(lpath, 'xdg-open')
prog = os.path.join(lpath, utility)
if os.path.isfile(prog):
os.spawnvpe(os.P_NOWAIT, prog, [prog, norm_path], os.environ)
return
+4 -27
View File
@@ -218,7 +218,6 @@ class ViewManager(object):
self.button_handlers = []
self.buttons = []
self.merge_ids = []
self.tips = gtk.Tooltips()
self._key = None
self.file_loaded = False
@@ -356,17 +355,8 @@ class ViewManager(object):
openbtn = gtk.MenuToolButton('gramps-db')
openbtn.connect('clicked', self.__open_activate)
openbtn.set_sensitive(False)
open_tips = gtk.Tooltips()
openbtn.set_arrow_tooltip(
open_tips,
_("Connect to a recent database"),
_("Connect to a recent database"))
openbtn.set_tooltip(
open_tips,
_("Manage databases"),
_("Manage databases")
)
openbtn.set_arrow_tooltip_text(_("Connect to a recent database"))
openbtn.set_tooltip_text(_("Manage databases"))
openbtn.show()
return openbtn
@@ -733,10 +723,7 @@ class ViewManager(object):
try:
PluginWindows.PluginStatus(self.uistate, [])
except Errors.WindowActiveError:
old_win = self.uistate.gwm.get_item_from_id(
PluginWindows.PluginStatus)
old_win.close()
PluginWindows.PluginStatus(self.uistate, [])
pass
def sidebar_toggle(self, obj):
"""
@@ -796,15 +783,6 @@ class ViewManager(object):
self.notebook.set_current_page(page_no)
self.__vb_handlers_unblock()
def __setup_text_tips(self, use_text):
"""
Enable/disable the text tips in the sidebar
"""
if use_text:
self.tips.disable()
else:
self.tips.enable()
def __delete_pages(self):
"""
Calls on_delete() for each view
@@ -820,7 +798,6 @@ class ViewManager(object):
self.prev_nav = PageView.NAVIGATION_NONE
use_text = Config.get(Config.SIDEBAR_TEXT)
self.__setup_text_tips(use_text)
index = 0
for page_def in self.views:
@@ -885,7 +862,7 @@ class ViewManager(object):
button.set_alignment(0, 0.5)
# add the tooltip
self.tips.set_tip(button, page_title)
button.set_tooltip_text(page_title)
# connect the signal, along with the index as user data
handler_id = button.connect('clicked', self.__vb_clicked, index)
+10
View File
@@ -193,6 +193,16 @@ XMLFILE = "data.gramps"
NO_SURNAME = "(%s)" % _("none")
NO_GIVEN = "(%s)" % _("none")
#-------------------------------------------------------------------------
#
# Platforms
# Never test on LINUX, handle Linux in the else statement as default
#
#-------------------------------------------------------------------------
LINUX = ["Linux", "linux"]
MACOS = ["Darwin", "darwin"]
WINDOWS = ["Windows", "win32"]
#-------------------------------------------------------------------------
#
# Options Constants
+39 -37
View File
@@ -72,6 +72,7 @@ img {
background:none;
}
.content {
padding-top: 1cm;
background-color:#FFF;
}
.content div.snapshot {
@@ -178,43 +179,6 @@ a:visited {
margin:0;
}
/* Alphabet Navigation
----------------------------------------------------- */
#alphabet {
padding:0;
margin:0;
}
#alphabet ul {
list-style:none;
min-width:770px;
height:24px;
margin:0;
padding:0 0 0 9px;
border-top:solid 2px #000;
border-bottom:solid 4px #000;
background-color:#EEE;
}
#alphabet ul li.letters {
margin:0;
float:left;
}
.letters:after {
content:" |";
}
#alphabet ul li.letters a {
display:block;
float:left;
font:bold 16px/100% sans;
color:#000;
margin:0;
padding:5px 5px;
text-decoration:none;
}
#alphabet ul li.letters a:hover {
background-color:#000;
color:#FFF;
}
/* Navigation
----------------------------------------------------- */
#navigation, #subnavigation {
@@ -264,6 +228,44 @@ background-color:#EEE;
border-width:0 0 1px 0;
}
/* Alphabet Navigation
----------------------------------------------------- */
div#alphabet {
width: 100%;
margin: 0;
background-color: #EEE;
}
div#alphabet 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 {
margin:0;
float:left;
}
div#alphabet ul li a {
display: block;
padding: 4px 8px 4px 8px;
float:left;
font:bold 16px/100% sans;
margin:0;
text-decoration:none;
color: #000;
}
div#alphabet ul li a:hover {
background-color: #000;
color: #FFF;
}
/* Main Table
----------------------------------------------------- */
table {
+49 -46
View File
@@ -67,6 +67,7 @@ img {
background:none;
}
.content {
padding-top: 1cm;
background-color:#FFF;
}
.content div.snapshot {
@@ -156,9 +157,10 @@ a:visited {
/* Header
----------------------------------------------------- */
#header {
padding:15px 15px 2px 15px;
padding:15px 15px 15px 15px;
margin:0;
background-color:#454;
height: 1cm;
}
#SiteTitle {
color:#E0E6E0;
@@ -171,51 +173,14 @@ a:visited {
margin:0;
}
/* Alphabet Navigation
----------------------------------------------------- */
#alphabet {
padding:0;
margin:0;
}
#alphabet ul {
list-style:none;
min-width:770px;
height:24px;
margin:0;
padding:0 0 0 9px;
border-top:solid 2px #000;
border-bottom:solid 4px #000;
background-color:#454;
}
#alphabet ul li.letters {
margin:0;
float:left;
}
.letters:after {
content:" |";
}
#alphabet ul li.letters a {
display:block;
float:left;
font:bold 16px/100% sans;
color:#000;
margin:0;
padding:5px 5px;
text-decoration:none;
}
#alphabet ul li.letters a:hover {
background-color:#000;
color:#FFF;
}
/* Navigation
----------------------------------------------------- */
#navigation {
#navigation, #subnavigation {
margin:0;
padding:4px 0 0 0;
background-color:#454;
}
#navigation ul {
#navigation ul, #subnavigation ul {
list-style:none;
min-width:770px;
height:22px;
@@ -223,12 +188,12 @@ a:visited {
padding:0 0 0 12px;
border-bottom:1px solid #7C8F7C;
}
#navigation ul li {
#navigation ul li, #subnavigation ul li {
margin:0;
padding:0;
float:left;
}
#navigation ul li a {
#navigation ul li a, #subnavigation ul li a {
display:block;
font-size:12px;
line-height:100%;
@@ -239,14 +204,14 @@ a:visited {
padding:5px 5px;
background-color:#454;
}
#navigation ul li a:hover {
#navigation ul li a:hover, #subnavigation ul li a:hover {
color:#FFF;
padding-top:4px;
background-color:#9DBF9D;
border-top:solid 1px #454;
border-bottom:solid 1px #000;
}
#navigation ul li.CurrentSection a {
#navigation ul li.CurrentSection a, #subnavigation ul li.CurrentSection a {
color:#454;
padding-bottom:4px;
border-top:solid 1px #7C8F7C;
@@ -255,11 +220,49 @@ a:visited {
border-bottom:solid 1px #FFF;
background-color:#FFF;
}
#navigation ul li.CurrentSection a:hover {
#navigation ul li.CurrentSection a:hover, #subnavigation ul li.CurrentSection a:hover {
padding-top:5px;
background-color:#FFF;
}
/* Alphabet Navigation
----------------------------------------------------- */
div#alphabet {
width: 100%;
margin: 0;
background-color: #454;
}
div#alphabet 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: #FFF;
}
div#alphabet ul li:after {
content:" |";
}
div#alphabet ul li {
margin:0;
float:left;
}
div#alphabet ul li a {
display:block;
padding: 4px 8px 4px 8px;
float:left;
font:bold 16px/100% sans;
margin:0;
text-decoration:none;
color: #FFF;
}
div#alphabet ul li a:hover {
background-color: #000;
color: #FFF;
}
/* Main Table
----------------------------------------------------- */
table {
@@ -902,7 +905,7 @@ div#sourcerefs ol li ol {
page-break-before:always;
margin:0;
padding:0;
background:none;
background-color: #FFF;
}
#treeContainer {
position:relative;
+39 -37
View File
@@ -70,6 +70,7 @@ img {
background:none;
}
.content {
padding-top: 1cm;
background-color:#FAFAFF;
}
.content div.snapshot {
@@ -176,43 +177,6 @@ a:visited {
margin:0;
}
/* Alphabet Navigation
----------------------------------------------------- */
#alphabet {
padding:0;
margin:0;
}
#alphabet ul {
list-style:none;
min-width:770px;
height:24px;
margin:0;
padding:0 0 0 9px;
border-top:solid 2px #000;
border-bottom:solid 4px #000;
background-color:#E0E0E9;
}
#alphabet ul li.letters {
margin:0;
float:left;
}
.letters:after {
content:" |";
}
#alphabet ul li.letters a {
display:block;
float:left;
font:bold 16px/100% sans;
color:#000;
margin:0;
padding:5px 5px;
text-decoration:none;
}
#alphabet ul li.letters a:hover {
background-color:#000;
color:#FFF;
}
/* Navigation
----------------------------------------------------- */
#navigation, #subnavigation {
@@ -262,6 +226,44 @@ a:visited {
border-width:0 0 1px 0;
}
/* Alphabet Navigation
----------------------------------------------------- */
div#alphabet {
width: 100%;
margin: 0;
background-color: #E0E0E9;
}
div#alphabet 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 {
margin:0;
float:left;
}
div#alphabet ul li a {
display:block;
padding: 4px 8px 4px 8px;
float:left;
font:bold 16px/100% sans;
margin:0;
text-decoration:none;
color: #000;
}
div#alphabet ul li a:hover {
background-color: #000;
color: #FFF;
}
/* Main Table
----------------------------------------------------- */
table {
+39 -37
View File
@@ -71,6 +71,7 @@ img {
background:none;
}
.content {
padding-top: 1cm;
background-color:#FFFBE7;
}
.content div.snapshot {
@@ -177,43 +178,6 @@ a:visited {
margin:0;
}
/* Alphabet Navigation
----------------------------------------------------- */
#alphabet {
padding:0;
margin:0;
}
#alphabet ul {
list-style:none;
min-width:770px;
height:24px;
margin:0;
padding:0 0 0 9px;
border-top:solid 2px #000;
border-bottom:solid 4px #000;
background-color:#FFE09F;
}
#alphabet ul li.letters {
margin:0;
float:left;
}
.letters:after {
content:" |";
}
#alphabet ul li.letters a {
display:block;
float:left;
font:bold 16px/100% sans;
color:#000;
margin:0;
padding:5px 5px;
text-decoration:none;
}
#alphabet ul li.letters a:hover {
background-color:#000;
color:#FFF;
}
/* Navigation
----------------------------------------------------- */
#navigation, #subnavigation {
@@ -263,6 +227,44 @@ a:visited {
border-width:0 0 1px 0;
}
/* Alphabet Navigation
----------------------------------------------------- */
div#alphabet {
width: 100%;
margin: 0;
background-color: #FFE09F;
}
div#alphabet 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 {
margin:0;
float:left;
}
div#alphabet ul li a {
display:block;
padding: 4px 8px 4px 8px;
float:left;
font:bold 16px/100% sans;
margin:0;
text-decoration:none;
color: #000;
}
div#alphabet ul li a:hover {
background-color: #000;
color: #FFF;
}
/* Main Table
----------------------------------------------------- */
table {
+39 -37
View File
@@ -71,6 +71,7 @@ img {
background:none;
}
.content {
padding-top: 1cm;
background-color:#FFF;
}
.content div.snapshot {
@@ -177,43 +178,6 @@ a:visited {
margin:0;
}
/* Alphabet Navigation
----------------------------------------------------- */
#alphabet {
padding:0;
margin:0;
}
#alphabet ul {
list-style:none;
min-width:770px;
height:24px;
margin:0;
padding:0 0 0 9px;
border-top:solid 2px #000;
border-bottom:solid 4px #000;
background-color:#EAEEF4;
}
#alphabet ul li.letters {
margin:0;
float:left;
}
.letters:after {
content:" |";
}
#alphabet ul li.letters a {
display:block;
float:left;
font:bold 16px/100% sans;
color:#000;
margin:0;
padding:5px 5px;
text-decoration:none;
}
#alphabet ul li.letters a:hover {
background-color:#000;
color:#FFF;
}
/* Navigation
----------------------------------------------------- */
#navigation, #subnavigation {
@@ -263,6 +227,44 @@ a:visited {
border-width:0 0 1px 0;
}
/* Alphabet Navigation
----------------------------------------------------- */
div#alphabet {
width: 100%;
margin: 0;
background-color: #EAFFF4;
}
div#alphabet 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 {
margin:0;
float:left;
}
div#alphabet ul li a {
display:block;
padding: 4px 8px 4px 8px;
float:left;
font:bold 16px/100% sans;
margin:0;
text-decoration:none;
color: #000;
}
div#alphabet ul li a:hover {
background-color: #000;
color: #FFF;
}
/* Main Table
----------------------------------------------------- */
table {
+40 -38
View File
@@ -81,7 +81,7 @@ img {
.content {
width:965px;
margin:0 auto;
padding-bottom:.5em;
padding: 1cm 0px .5em 0px;
background:url(../images/Web_Mainz_Mid.png) #FFF2C6 repeat;
}
.content div.snapshot {
@@ -198,43 +198,6 @@ a:visited {
margin:0 0 5px 50px;
}
/* Alphabet Navigation
----------------------------------------------------- */
#alphabet {
padding:0;
margin:0;
}
#alphabet ul {
list-style:none;
min-width:770px;
height:24px;
margin:0;
padding:0 0 0 9px;
border-top:solid 2px #000;
border-bottom:solid 4px #000;
background:url(../images/Web_Mainz_MidLight.png) #FFF2C6;
}
#alphabet ul li.letters {
margin:0;
float:left;
}
.letters:after {
content:" |";
}
#alphabet ul li.letters a {
display:block;
float:left;
font:bold 16px/100% sans;
color:#000;
margin:0;
padding:5px 5px;
text-decoration:none;
}
#alphabet ul li.letters a:hover {
background-color:#000;
color:#FFF;
}
/* Navigation
----------------------------------------------------- */
#navigation, #subnavigation {
@@ -288,6 +251,45 @@ a:visited {
border-width:0 0 1px 0;
}
/* Alphabet Navigation
----------------------------------------------------- */
div#alphabet {
width: 965px;
margin: 0;
background-color: #FFF2C6;
}
div#alphabet ul {
padding: 0px 25px 0px 25px;
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 {
margin:0;
float:left;
}
div#alphabet ul li a {
display:block;
padding: 4px 8px 4px 8px;
float:left;
font:bold 16px/100% sans;
margin:0;
text-decoration:none;
color: #000;
}
div#alphabet ul li a:hover {
background-color: #000;
color: #FFF;
}
/* Main Table
----------------------------------------------------- */
table {
+56 -57
View File
@@ -83,6 +83,7 @@ img {
background:none;
}
.content {
padding-top: 1cm;
background-color:#FFF;
}
.content div.snapshot {
@@ -203,75 +204,35 @@ p#user_header {
background-color:#542;
}
/* Alphabet Navigation
----------------------------------------------------- */
#alphabet {
padding:0;
margin:0;
}
#alphabet ul {
list-style:none;
min-width:770px;
height:24px;
margin:0;
padding:0 0 0 9px;
border-top:solid 2px #000;
border-bottom:solid 4px #000;
background-color:#A97;
}
#alphabet ul li.letters {
margin:0;
float:left;
}
.letters:after {
content:" |";
}
#alphabet ul li.letters a {
display:block;
float:left;
font:bold 16px/100% sans;
color:#000;
margin:0;
padding:5px 5px;
text-decoration:none;
}
#alphabet ul li.letters a:hover {
background-color:#000;
color:#FFF;
}
/* Navigation
----------------------------------------------------- */
#navigation, #subnavigation {
margin:0;
padding:0;
div#navigation, div#subnavigation {
width: 100%;
margin: 0;
padding: 0;
}
#navigation ul, #subnavigation ul {
div#navigation ul, div#subnavigation ul {
list-style:none;
min-width:770px;
height:32px;
min-width: 900px;
height: 40px;
margin:0;
padding:0 0 0 9px;
background-color:#A97;
border-bottom:solid 1px #542;
padding: 0px 0px 0px 16px;
border-bottom: solid 2px #5D835F;
}
#navigation ul li, #subnavigation ul li {
margin:0;
div#navigation ul li, div#subnavigation ul li {
float:left;
}
#navigation ul li a, #subnavigation ul li a {
display:block;
div#navigation ul li a, div#subnavigation ul li a {
display: block;
padding: 12px 16px 14px 1px;
float:left;
font:normal 16px/100% serif;
color:#542;
font: .8em bold italic small-caps verdana, serif;
color: #000;
text-decoration:none;
margin:0;
padding:8px 13px;
}
#navigation ul li a:hover, #subnavigation ul li a:hover {
background-color:#C1B398;
border-bottom:solid 1px #542;
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;
@@ -290,6 +251,44 @@ p#user_header {
border-width:0 0 1px 0;
}
/* Alphabet Navigation
----------------------------------------------------- */
div#alphabet {
width: 100%;
margin: 0;
background-color: #A97;
}
div#alphabet 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 {
margin:0;
float:left;
}
div#alphabet ul li a {
display:block;
padding: 4px 8px 4px 8px;
float:left;
font:bold 16px/100% sans;
margin:0;
text-decoration:none;
color: #000;
}
div#alphabet ul li a:hover {
background-color: #000;
color: #FFF;
}
/* Main Table
----------------------------------------------------- */
table.infolist {
+1 -1
View File
@@ -67,7 +67,7 @@ img {
.content div.snapshot {
float:right;
margin:1.6em;
padding:0;
padding-top: .5cm;
background:none;
}
.content div.snapshot div.thumbnail {
+68 -77
View File
@@ -204,7 +204,7 @@ span.preposition {
----------------------------------------------------- */
#header {
margin:0;
height:1.5cm;
height: 60px;
padding:0 0 .9em 0;
background-color:#542;
border-bottom:solid 2px #6AF364;
@@ -284,99 +284,89 @@ p#user_header {
padding:0;
}
/* Navigation
----------------------------------------------------- */
div#navigation, div#subnavigation {
width: 100%;
}
div#navigation ul, div#subnavigation ul {
list-style:none;
min-width:770px;
height: 42px;
margin:0;
padding: 0px 0px 0px 20px;
border-bottom: solid 2px #5D835F;
}
div#navigation ul li, div#subnavigation ul li {
float:left;
}
body#WebCal divdiv#navigation ul li a {
color: #FFF;
}
div#navigation ul li a, div#subnavigation ul li a {
display: block;
padding: 12px 10px 14px 1px;
float:left;
font:normal 16px/100% serif;
color: #000;
text-decoration:none;
margin:0;
}
div#navigation ul li a:hover, div#subnavigation ul li a:hover {
background-color: #C1B398;
color: #000;
}
div#navigation ul li.CurrentSection a, div#subnavigation ul li.CurrentSection a {
font-weight:bold;
font-style: italic;
background-color: #CCC;
color: #000;
}
div#navigation ul li.CurrentSection a:hover {
background-color: #000;
color: #FFF;
}
div#subnavigation ul li.CurrentSection a {
border-width: 0px 0px 2px 0px;
border-color: #FFF;
}
/* Alphabet Navigation
----------------------------------------------------- */
div#alphabet {
padding:0;
margin:0;
width: 100%;
margin: 0;
background-color: #6AF364;
}
div#alphabet ul {
list-style:none;
min-width:770px;
height:24px;
margin:0;
padding:0 0 0 9px;
border-top:solid 2px #000;
border-bottom:solid 4px #000;
background-color:#6AF364;
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:before {
content:" ";
}
div#alphabet ul li.letters {
div#alphabet ul li {
margin:0;
float:left;
}
div#alphabet ul li.letters a {
div#alphabet ul li a {
display:block;
padding: 4px 8px 4px 8px;
float:left;
font:bold 16px/100% sans;
color:#000;
margin:0;
padding:5px 5px;
text-decoration:none;
color: #000;
}
div#alphabet ul li.letters a:hover {
background-color:#000;
color:#FFF;
}
/* Navigation
----------------------------------------------------- */
#navigation, #subnavigation {
margin:0;
padding:0;
}
#navigation ul, #subnavigation ul {
list-style:none;
min-width:770px;
height:32px;
margin:0;
padding:0 0 0 9px;
background-color:#FFF;
border-bottom:solid 2px #000;
}
#navigation ul li, #subnavigation ul li {
margin:0;
float:left;
}
#navigation ul li a, #subnavigation ul li a {
display:block;
float:left;
font:normal 16px/100% serif;
color:#000;
text-decoration:none;
margin:0;
padding:5px 5px;
}
#navigation ul li a:hover, #subnavigation ul li a:hover {
background-color:#C1B398;
color:#000;
border-top:solid 3px #C1B398;
border-bottom:solid 8px #C1B398;
}
#navigation ul li.CurrentSection a, #subnavigation ul li.CurrentSection a {
font-weight:bold;
font-size:16px;
margin-top:-6px;
padding-top:11px;
padding-bottom:8px;
border-right:solid 1px #6AF364;
border-left:solid 1px #6AF364;
border-bottom:solid 4px #000;
background-color:#000;
color:#FFF;
}
#navigation ul li.CurrentSection a:hover {
background-color:#228A22;
border-bottom:solid 4px #228A22;
}
#subnavigation ul li.CurrentSection a {
border-width:0 0 1px 0;
div#alphabet ul li a:hover {
background-color: #000;
color: #FFF;
}
/* Main Table
@@ -1196,7 +1186,6 @@ div#pedigree {
/* Calendar : General */
body#WebCal {
padding:0 14px;
background-color:#542;
}
.calendar {
empty-cells:show;
@@ -1235,7 +1224,8 @@ body#WebCal {
color:#FFF;
}
#CreatorInfo a:hover {
color:#FFF;
background-color: #C1B398;
color: #000;
}
.calendar thead tr th.weekend,
.calendar thead tr th.weekday {
@@ -1246,13 +1236,14 @@ body#WebCal {
}
.calendar tfoot tr td {
padding:.7em 5% 1em 5%;
border-top:solid 2px #000;
border-top: solid 1px #5D835F;
vertical-align:middle;
color:#453619;
color: #000;
background-color:#D8F3D6;
}
/* Calendar : Date Numeral */
/* Calendar : Date Numeral
------------------------------------------- */
.calendar tbody tr td div.date {
float:right;
display:block;
+4
View File
@@ -161,6 +161,10 @@ class GrampsType(object):
if value in self._E2IMAP:
self.__value = self._E2IMAP[value]
self.__string = u''
if self.__value == self._CUSTOM:
#if the custom event is actually 'Custom' then we should save it
# with that string value. That is, 'Custom' is in _E2IMAP
self.__string = value
else:
self.__value = self._CUSTOM
self.__string = value
+11
View File
@@ -106,6 +106,17 @@ class BasicPrimaryObject(BaseObject, PrivacyBase):
"""
return self.change
def set_change_time(self, change):
"""
Modify the time that the data was last changed.
The value must be in the format returned by the time.time() command.
@param change: new time
@type change: int in format as time.time() command
"""
self.change = change
def get_change_display(self):
"""
Return the string representation of the last change time.
+1 -2
View File
@@ -454,10 +454,9 @@ class LivingProxyDb(ProxyDbBase):
new_person.set_gender(person.get_gender())
new_person.set_gramps_id(person.get_gramps_id())
new_person.set_handle(person.get_handle())
new_person.set_change_time(person.get_change_time())
new_person.set_family_handle_list(person.get_family_handle_list())
new_person.set_parent_family_handle_list(
person.get_parent_family_handle_list() )
return new_person
+9
View File
@@ -726,6 +726,8 @@ def sanitize_source_ref(db, source_ref):
"""
new_ref = SourceRef()
new_ref.set_date_object(source_ref.get_date_object())
new_ref.set_page(source_ref.get_page())
new_ref.set_confidence_level(source_ref.get_confidence_level())
new_ref.set_reference_handle(source_ref.get_reference_handle())
copy_notes(db, source_ref, new_ref)
@@ -774,6 +776,7 @@ def sanitize_person(db,person):
new_person.set_gender(person.get_gender())
new_person.set_gramps_id(person.get_gramps_id())
new_person.set_handle(person.get_handle())
new_person.set_change_time(person.get_change_time())
# copy names if not private
name = person.get_primary_name()
@@ -864,6 +867,7 @@ def sanitize_source(db,source):
new_source.set_abbreviation(source.get_abbreviation())
new_source.set_gramps_id(source.get_gramps_id())
new_source.set_handle(source.get_handle())
new_source.set_change_time(source.get_change_time())
new_source.set_marker(source.get_marker())
new_source.set_data_map(source.get_data_map())
@@ -900,6 +904,7 @@ def sanitize_media(db,media):
new_media.set_description(media.get_description())
new_media.set_gramps_id(media.get_gramps_id())
new_media.set_handle(media.get_handle())
new_media.set_change_time(media.get_change_time())
new_media.set_date_object(media.get_date_object())
new_media.set_marker(media.get_marker())
@@ -928,6 +933,7 @@ def sanitize_place(db,place):
new_place.set_title(place.get_title())
new_place.set_gramps_id(place.get_gramps_id())
new_place.set_handle(place.get_handle())
new_place.set_change_time(place.get_change_time())
new_place.set_longitude(place.get_longitude())
new_place.set_latitude(place.get_latitude())
new_place.set_main_location(place.get_main_location())
@@ -963,6 +969,7 @@ def sanitize_event(db,event):
new_event.set_handle(event.get_handle())
new_event.set_date_object(event.get_date_object())
new_event.set_marker(event.get_marker())
new_event.set_change_time(event.get_change_time())
copy_source_ref_list(db,event, new_event)
copy_notes(db,event, new_event)
@@ -996,6 +1003,7 @@ def sanitize_family(db,family):
new_family.set_handle(family.get_handle())
new_family.set_marker(family.get_marker())
new_family.set_relationship(family.get_relationship())
new_family.set_change_time(family.get_change_time())
# Copy the father handle.
father_handle = family.get_father_handle()
@@ -1063,6 +1071,7 @@ def sanitize_repository(db,repository):
new_repository.set_name(repository.get_name())
new_repository.set_gramps_id(repository.get_gramps_id())
new_repository.set_handle(repository.get_handle())
new_repository.set_change_time(repository.get_change_time())
new_repository.set_marker(repository.get_marker())
copy_notes(db,repository, new_repository)
+2 -2
View File
@@ -66,8 +66,8 @@ def delete_person_from_database(db, person, trans):
for phandle in person_list:
p = db.get_person_from_handle(phandle)
p.remove_handle_references('Person', handle)
db.commit_person(person, trans)
p.remove_handle_references('Person', [handle])
db.commit_person(p, trans)
db.remove_person(handle, trans)
def remove_family_relationships(db, family_handle, trans=None):
+89 -42
View File
@@ -2194,12 +2194,13 @@ Mapstraction.prototype.getCenter = function() {
/**
* setCenter sets the central point of the map
* @param {LatLonPoint} point The point at which to center the map
* @options {hash} optional parameters, such as {pan:true}
*/
Mapstraction.prototype.setCenter = function(point) {
Mapstraction.prototype.setCenter = function(point, options) {
if(this.loaded[this.api] === false) {
var me = this;
this.onload[this.api].push( function() {
me.setCenter(point);
me.setCenter(point, options);
} );
return;
}
@@ -2215,14 +2216,16 @@ Mapstraction.prototype.setCenter = function(point) {
break;
case 'google':
case 'openstreetmap':
map.setCenter(point.toGoogle());
break;
if(options != null && options['pan']) { map.panTo(point.toGoogle()); }
else { map.setCenter(point.toGoogle()); }
break;
case 'openlayers':
map.setCenter(point.toOpenLayers());
break;
case 'microsoft':
map.SetCenter(point.toMicrosoft());
break;
if(options != null && options['pan']) { map.PanToLatLong(point.toMicrosoft()); }
else { map.SetCenter(point.toMicrosoft()); }
break;
case 'multimap':
map.goToPosition(point.toMultiMap());
break;
@@ -2463,7 +2466,7 @@ Mapstraction.prototype.visibleCenterAndZoom = function()
/**
* Automatically sets center and zoom level to show all polylines
* Takes into account radious of polyline
* Takes into account radius of polyline
* @param {Int} radius
*/
Mapstraction.prototype.polylineCenterAndZoom = function(radius)
@@ -2478,6 +2481,8 @@ Mapstraction.prototype.polylineCenterAndZoom = function(radius)
return;
}
radius = (radius == null) ? 0 : radius;
var lat_max = -90;
var lat_min = 90;
var lon_max = -180;
@@ -4546,6 +4551,48 @@ Marker.prototype.openBubble = function() {
}
};
/**
* closeBubble closes the infoBubble
*/
Marker.prototype.closeBubble = function() {
if(this.mapstraction.loaded[this.api] === false) {
var my_marker = this;
this.mapstraction.onload[this.api].push( function() {
my_marker.closeBubble();
} );
return;
}
if( this.api) {
switch (this.api) {
case 'yahoo':
var ypin = this.proprietary_marker;
ypin.closeSmartWindow();
break;
case 'google':
case 'openstreetmap':
var gpin = this.proprietary_marker;
gpin.closeInfoWindow();
break;
case 'microsoft':
// The following works with v6.2, but need to first update way Mapstraction adds MS markers
var pin = this.proprietary_marker;
this.map.HideInfoBox();
break;
case 'multimap':
//closeInfoBox?
break;
case 'mapquest':
// ???
break;
}
} else {
if(this.debug) {
}
}
};
/**
* hide the marker
*/
@@ -4866,7 +4913,7 @@ Polyline.prototype.toMap24 = function() {
var m24poly;
var m24longs = "";
var m24lats = "";
for (var i=0; i<this.points.length; i++) {
for (var i=0, length = this.points.length; i<length; i++) {
if(i) {
m24longs += "|";
m24lats += "|";
@@ -4874,7 +4921,7 @@ Polyline.prototype.toMap24 = function() {
m24longs += (this.points[i].lon*60);
m24lats += (this.points[i].lat*60);
}
if (this.closed || this.gpoints[0].equals(this.gpoints[length-1])) {
if (this.closed || this.points[0].equals(this.points[length-1])) {
m24poly = new Map24.Polygon({
Longitudes: m24longs,
Latitudes: m24lats,
@@ -4934,7 +4981,7 @@ Polyline.prototype.toMultiMap = function() {
* @returns a LineOverlay/PolygonOverlay
*/
Polyline.prototype.toMapQuest = function() {
if (this.closed || this.points[0].equals(this.points[length-1])) {
if (this.closed || this.points[0].equals(this.points[this.points.length-1])) {
var mqpoly = new MQA.PolygonOverlay();
mqpoly.setFillColor(this.color || "#E90000");
mqpoly.setFillColorAlpha(this.opacity || 0.3);
@@ -5091,8 +5138,8 @@ Polyline.prototype.simplify = function(tolerance) {
reduced[0] = this.points[0];
var markerPoint = 0;
for (var i = 1; i < this.points.length-1; i++)
var length = this.points.length;
for (var i = 1; i < length-1; i++)
if (this.points[i].distance(this.points[markerPoint]) >= tolerance)
{
reduced[reduced.length] = this.points[i];
@@ -5211,40 +5258,40 @@ Mapstraction.prototype.enableScrollWheelZoom = function() {
* Currently only implemented in Google
* @param {object} polygon
*/
Mapstraction.prototype.addPolygon = function(polygon) {
if(this.loaded[this.api] == false)
{
myself = this;
this.onload[this.api].push(function()
{
myself.addPolygon(polygon);
});
return;
}
Mapstraction.prototype.addPolygon = function(polygon) {
if(this.loaded[this.api] == false)
{
myself = this;
this.onload[this.api].push(function()
{
myself.addPolygon(polygon);
});
return;
}
var map = this.maps[this.api];
var map = this.maps[this.api];
switch (this.api)
{
case 'google':
case 'openstreetmap':
var gpoints = [];
switch (this.api)
{
case 'google':
case 'openstreetmap':
var gpoints = [];
for (var i = 0; i < polygon.points.length; i++)
gpoints.push(polygon.points[i].toGoogle());
for (var i = 0; i < polygon.points.length; i++)
gpoints.push(polygon.points[i].toGoogle());
gpolygon = new GPolygon(gpoints, polygon.color, 0, polygon.opacity, polygon.color, polygon.opacity);
polygon.setChild(gpolygon);
map.addOverlay(gpolygon);
this.polylines.push(polygon);
break;
default:
if(this.debug) {
alert(api + ' not supported by Mapstration.addPolygon');
}
break;
}
};
gpolygon = new GPolygon(gpoints, polygon.color, 0, polygon.opacity, polygon.color, polygon.opacity);
polygon.setChild(gpolygon);
map.addOverlay(gpolygon);
this.polylines.push(polygon);
break;
default:
if(this.debug) {
alert(api + ' not supported by Mapstration.addPolygon');
}
break;
}
};
///////////////
// Radius //
+24 -11
View File
@@ -106,27 +106,30 @@ def _initialize_options(options, dbstate):
menu: The Menu class
dbase: the database the options will be applied to
"""
dbase = dbstate.get_database()
if not hasattr(options, "menu"):
return
dbase = dbstate.get_database()
menu = options.menu
for name in menu.get_all_option_names():
option = menu.get_option_by_name(name)
value = option.get_value()
if isinstance(option, PersonOption):
person = dbstate.get_active_person()
option.set_value(person.get_gramps_id())
if not dbase.get_person_from_gramps_id(value):
person = dbstate.get_active_person()
option.set_value(person.get_gramps_id())
elif isinstance(option, FamilyOption):
person = dbstate.get_active_person()
family_list = person.get_family_handle_list()
if family_list:
family_handle = family_list[0]
else:
family_handle = dbase.get_family_handles()[0]
family = dbase.get_family_from_handle(family_handle)
option.set_value(family.get_gramps_id())
if not dbase.get_family_from_gramps_id(value):
person = dbstate.get_active_person()
family_list = person.get_family_handle_list()
if family_list:
family_handle = family_list[0]
else:
family_handle = dbase.get_family_handles()[0]
family = dbase.get_family_from_handle(family_handle)
option.set_value(family.get_gramps_id())
def _get_subject(options, dbase):
"""
@@ -794,6 +797,16 @@ class BookReportSelector(ManagedWindow.ManagedWindow):
name = saved_item.get_name()
item = BookItem(self.db, name)
item.option_class = saved_item.option_class
# The option values were loaded magically by the book parser.
# But they still need to be applied to the menu options.
opt_dict = item.option_class.handler.options_dict
menu = item.option_class.menu
for optname in opt_dict:
menu_option = menu.get_option_by_name(optname)
if menu_option:
menu_option.set_value(opt_dict[optname])
_initialize_options(item.option_class, self.dbstate)
item.set_style_name(saved_item.get_style_name())
self.book.append_item(item)
+16 -15
View File
@@ -34,7 +34,8 @@ from TransUtils import sgettext as _
# GRAMPS modules
#
#------------------------------------------------------------------------
from gen.lib import ChildRefType, Date, EventType, Name
import gen.lib
from gen.lib import ChildRefType, Date, EventType, Name, EventRoleType
import BaseDoc
from BasicUtils import name_displayer
from DataViews import register, Gramplet
@@ -142,9 +143,13 @@ def _find_records(db, filter, callname):
divorce_date = None
for event_ref in family.get_event_ref_list():
event = db.get_event_from_handle(event_ref.ref)
if event.get_type() == EventType.MARRIAGE:
if event.get_type() == gen.lib.EventType.MARRIAGE and \
(event_ref.get_role() == gen.lib.EventRoleType.FAMILY or
event_ref.get_role() == gen.lib.EventRoleType.PRIMARY ):
marriage_date = event.get_date_object()
elif event.get_type() == EventType.DIVORCE:
elif event.get_type() == gen.lib.EventType.DIVORCE and \
(event_ref.get_role() == gen.lib.EventRoleType.FAMILY or
event_ref.get_role() == gen.lib.EventRoleType.PRIMARY ):
divorce_date = event.get_date_object()
if _good_date(marriage_date):
@@ -226,9 +231,13 @@ def _find_records(db, filter, callname):
divorce_date = None
for event_ref in family.get_event_ref_list():
event = db.get_event_from_handle(event_ref.ref)
if event.get_type() == EventType.MARRIAGE:
if event.get_type() == gen.lib.EventType.MARRIAGE and \
(event_ref.get_role() == gen.lib.EventRoleType.FAMILY or
event_ref.get_role() == gen.lib.EventRoleType.PRIMARY ):
marriage_date = event.get_date_object()
elif event.get_type() == EventType.DIVORCE:
if event and event.get_type() == gen.lib.EventType.DIVORCE and \
(event_ref.get_role() == gen.lib.EventRoleType.FAMILY or
event_ref.get_role() == gen.lib.EventRoleType.PRIMARY ):
divorce_date = event.get_date_object()
father_death_date = _find_death_date(db, father)
@@ -326,19 +335,11 @@ class RecordsGramplet(Gramplet):
self.set_tooltip(_("Double-click name for details"))
self.set_text(_("No Family Tree loaded."))
def db_changed(self):
self.update()
#self.dbstate.db.connect('person-add', self.update)
#self.dbstate.db.connect('person-delete', self.update)
#self.dbstate.db.connect('person-update', self.update)
#self.dbstate.db.connect('family-add', self.update)
#self.dbstate.db.connect('family-delete', self.update)
#self.dbstate.db.connect('family-update', self.update)
self.dbstate.db.connect('person-rebuild', self.update)
self.dbstate.db.connect('family-rebuild', self.update)
def main(self):
self.set_text(_("Processing...") + "\n")
yield True
records = _find_records(self.dbstate.db, None,
+10 -12
View File
@@ -134,7 +134,7 @@ class ODFDoc(BaseDoc.BaseDoc, BaseDoc.TextDoc, BaseDoc.DrawDoc):
self.cntnt.write('xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" ')
self.cntnt.write('xmlns:dom="http://www.w3.org/2001/xml-events" ')
self.cntnt.write('xmlns:xforms="http://www.w3.org/2002/xforms" ')
self.cntnt.write('office:class="text" office:version="1.0">\n')
self.cntnt.write('office:version="1.0">\n')
self.cntnt.write('<office:scripts/>\n')
self.cntnt.write('<office:font-face-decls>\n')
self.cntnt.write('<style:font-face style:name="Courier" svg:font-family="Courier" ')
@@ -187,7 +187,7 @@ class ODFDoc(BaseDoc.BaseDoc, BaseDoc.TextDoc, BaseDoc.DrawDoc):
self.cntnt.write('svg:fill-color="#%02x%02x%02x" ' % style.get_color())
self.cntnt.write('draw:fill-color="#%02x%02x%02x" ' % style.get_fill_color())
self.cntnt.write('draw:shadow="hidden" ')
self.cntnt.write('style:run-through="background" ')
self.cntnt.write('style:run-through="foreground" ')
self.cntnt.write('style:vertical-pos="from-top" ')
self.cntnt.write('style:vertical-rel="paragraph" ')
self.cntnt.write('style:horizontal-pos="from-left" ')
@@ -206,7 +206,7 @@ class ODFDoc(BaseDoc.BaseDoc, BaseDoc.TextDoc, BaseDoc.DrawDoc):
self.cntnt.write('draw:textarea-horizontal-align="center" ')
self.cntnt.write('draw:textarea-vertical-align="middle" ')
self.cntnt.write('draw:shadow="hidden" ')
self.cntnt.write('style:run-through="background" ')
self.cntnt.write('style:run-through="foreground" ')
self.cntnt.write('style:vertical-pos="from-top" ')
self.cntnt.write('style:vertical-rel="paragraph" ')
self.cntnt.write('style:horizontal-pos="from-left" ')
@@ -221,7 +221,7 @@ class ODFDoc(BaseDoc.BaseDoc, BaseDoc.TextDoc, BaseDoc.DrawDoc):
self.cntnt.write('style:family="graphic">\n')
self.cntnt.write('\t<style:graphic-properties draw:stroke="none" ')
self.cntnt.write('draw:fill="none" draw:shadow="hidden" ')
self.cntnt.write('style:run-through="background" ')
self.cntnt.write('style:run-through="foreground" ')
self.cntnt.write('style:vertical-pos="from-top" ')
self.cntnt.write('style:vertical-rel="paragraph" ')
self.cntnt.write('style:horizontal-pos="from-left" ')
@@ -961,8 +961,6 @@ class ODFDoc(BaseDoc.BaseDoc, BaseDoc.TextDoc, BaseDoc.DrawDoc):
self.meta.write('<dc:date>')
self.meta.write(self.time)
self.meta.write('</dc:date>\n')
self.meta.write('<dc:keyword>')
self.meta.write('</dc:keyword>\n')
self.meta.write('<meta:print-date>0-00-00T00:00:00</meta:print-date>\n')
self.meta.write('<dc:language>%s</dc:language>\n' % self.lang)
self.meta.write('<meta:editing-cycles>1</meta:editing-cycles>\n')
@@ -1023,10 +1021,10 @@ class ODFDoc(BaseDoc.BaseDoc, BaseDoc.TextDoc, BaseDoc.DrawDoc):
self.cntnt.write('<draw:polygon draw:style-name="%s" draw:layer="layout" ' % style)
self.cntnt.write('draw:z-index="1" ')
x = int((minx)*1000)
y = int((miny)*1000)
x = float(minx)
y = float(miny)
self.cntnt.write('svg:x="%d" svg:y="%d" ' % (x, y))
self.cntnt.write('svg:x="%2fcm" svg:y="%2fcm" ' % (x, y))
self.cntnt.write('svg:viewBox="0 0 %d %d" ' % (int((maxx-minx)*1000), int((maxy-miny)*1000)))
self.cntnt.write('svg:width="%.4fcm" ' % (maxx-minx))
self.cntnt.write('svg:height="%.4fcm" ' % (maxy-miny))
@@ -1072,10 +1070,10 @@ class ODFDoc(BaseDoc.BaseDoc, BaseDoc.TextDoc, BaseDoc.DrawDoc):
self.cntnt.write('svg:y="%.2fcm">' % float(y))
self.cntnt.write('<draw:text-box> ' )
self.cntnt.write('<text:p text:style-name="F%s">' % para_name)
self.cntnt.write('<text:span text:style-name="F%s"' % para_name)
self.cntnt.write(' fo:max-height="%.2f">' % font.get_size() )
self.cntnt.write('<text:span text:style-name="F%s">' % para_name)
self.cntnt.write(escape(text, _esc_map))
self.cntnt.write('</text:span></text:p>')
self.cntnt.write('</text:span>')
self.cntnt.write('</text:p>')
self.cntnt.write('</draw:text-box>\n')
self.cntnt.write('</draw:frame>\n')
+1 -1
View File
@@ -466,7 +466,7 @@ class AncestorTreeOptions(MenuReportOptions):
pid.set_help(_("The center person for the tree"))
menu.add_option(category_name, "pid", pid)
max_gen = NumberOption(_("Generations"), 10, 1, 15)
max_gen = NumberOption(_("Generations"), 10, 1, 50)
max_gen.set_help(_("The number of generations to include in the tree"))
menu.add_option(category_name, "maxgen", max_gen)
+13 -4
View File
@@ -319,11 +319,15 @@ class Calendar(Report):
for event_ref in fam.get_event_ref_list():
event = self.database.get_event_from_handle(event_ref.ref)
if event.type in [gen.lib.EventType.MARRIAGE,
gen.lib.EventType.MARR_ALT]:
gen.lib.EventType.MARR_ALT] and \
(event_ref.get_role() == gen.lib.EventRoleType.FAMILY or
event_ref.get_role() == gen.lib.EventRoleType.PRIMARY ):
are_married = event
elif event.type in [gen.lib.EventType.DIVORCE,
gen.lib.EventType.ANNULMENT,
gen.lib.EventType.DIV_FILING]:
gen.lib.EventType.ANNULMENT,
gen.lib.EventType.DIV_FILING] and \
(event_ref.get_role() == gen.lib.EventRoleType.FAMILY or
event_ref.get_role() == gen.lib.EventRoleType.PRIMARY ):
are_married = None
if are_married is not None:
for event_ref in fam.get_event_ref_list():
@@ -402,8 +406,13 @@ class CalendarOptions(MenuReportOptions):
country = EnumeratedListOption(_("Country for holidays"), 0)
holiday_table = libholiday.HolidayTable()
countries = holiday_table.get_countries()
countries.sort()
if (len(countries) == 0 or
(len(countries) > 0 and countries[0] != '')):
countries.insert(0, '')
count = 0
for c in holiday_table.get_countries():
for c in countries:
country.add_item(count, c)
count += 1
country.set_help(_("Select the country to see associated holidays"))

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