Compare commits

...

123 Commits

Author SHA1 Message Date
Benny Malengier 8b4b8da242 remove pedigreeviewext completely
svn: r14621
2010-03-05 07:59:22 +00:00
Espen Berg 046d0fc897 Some more revision on Norwegian translation
svn: r14620
2010-03-04 22:05:55 +00:00
Jérôme Rapinat 1c58f0f0ba minors improvements
svn: r14618
2010-03-04 14:32:08 +00:00
Peter Landgren 7b40ee1aea Fixed another three errors in string formatting using {}.
svn: r14617
2010-03-04 14:11:59 +00:00
Peter Landgren b1c33334d2 Fixed another two errors in string formatting using {}.
svn: r14615
2010-03-04 13:58:08 +00:00
Peter Landgren b84716e1e9 Fixed another error in string formatting using {}.
svn: r14613
2010-03-04 13:49:57 +00:00
Peter Landgren c134937e9d Fixed another error in string formatting using {}.
svn: r14610
2010-03-04 13:38:30 +00:00
Jérôme Rapinat 5647b44801 3659: unable to load MediaManager
svn: r14608
2010-03-04 13:25:30 +00:00
Jérôme Rapinat 7e01ef0f6b 3659: unable to load MediaManager
svn: r14606
2010-03-04 11:26:28 +00:00
Jérôme Rapinat 11437b7c27 3661: Typo on all_events.py quickview
svn: r14604
2010-03-04 11:15:28 +00:00
Espen Berg 23bad21b29 Some more revision on Norwegian translation
svn: r14603
2010-03-04 08:20:08 +00:00
Doug Blank 8546dc91e5 Added some protection on loading bad views
svn: r14602
2010-03-04 01:11:48 +00:00
Josip Pisoj cd0d479ec1 hr translations update
svn: r14600
2010-03-04 00:45:30 +00:00
Nick Hall 6fe4cff9e2 Remove extended pedigree view
svn: r14599
2010-03-03 23:21:12 +00:00
Jérôme Rapinat 5a76e262c6 typo
svn: r14595
2010-03-03 08:51:55 +00:00
Jérôme Rapinat acb3371b72 3654: Cannot print title on all_relations quick view
svn: r14593
2010-03-03 08:43:17 +00:00
Boril Gourinov adfc952c02 Update of Bulgarian translation, fixed some bugs
svn: r14590
2010-03-02 23:10:38 +00:00
Gary Burton 82b1c17360 Do not explicitly set an item width as it causes excessive whitespace around thumbnails when the image description becomes longer.
svn: r14588
2010-03-02 21:56:35 +00:00
Espen Berg 16d631bbb3 Some more revision on Norwegian translation
svn: r14587
2010-03-02 21:31:29 +00:00
Mirko Leonhäuser 3e4b3f69a9 Updated _Date_de.py
svn: r14584
2010-03-02 20:26:46 +00:00
Mirko Leonhäuser f9415e8fd1 updated german translation
svn: r14583
2010-03-02 20:26:10 +00:00
Erik De Richter f6d9997204 update nl translation
svn: r14582
2010-03-02 17:11:30 +00:00
Nick Hall f21fb8d6d8 Update history and MRU lists when objects are deleted
svn: r14580
2010-03-02 15:48:05 +00:00
Peter Landgren 9efe53787d Swedish update
svn: r14579
2010-03-02 12:40:54 +00:00
Serge Noiraud 5c11bc6f09 GeoView : bug 3517 : filter in menu
svn: r14578
2010-03-02 11:56:38 +00:00
Benny Malengier 027b333860 03650: Cannot execute changes proposed by Calculate Estimated Date
svn: r14576
2010-03-02 11:19:59 +00:00
Benny Malengier 0a2d52a5a0 03651: Deleting more than one person causes crash
Actually these are fixes trying to fix this bug


svn: r14574
2010-03-02 11:13:19 +00:00
Jérôme Rapinat 3dcc74a173 merge and check some translations
svn: r14573
2010-03-02 11:07:18 +00:00
Jérôme Rapinat fe337c21cd check some translations
svn: r14572
2010-03-02 10:53:19 +00:00
Erik De Richter b2d58a27e4 update nl translation
svn: r14571
2010-03-02 10:33:01 +00:00
Jérôme Rapinat c9cef9e4da check some translations, wrong permission
svn: r14570
2010-03-02 10:31:20 +00:00
Jérôme Rapinat 7fdf47ac3c new template, merge and check some translations
svn: r14569
2010-03-02 10:13:21 +00:00
Espen Berg 1e70d474f6 Some more Norwegian translation
svn: r14568
2010-03-02 09:48:49 +00:00
Peter Landgren 2169c8ab4f Fix of issue 3653 (Windows only issue).
svn: r14566
2010-03-02 09:13:34 +00:00
Benny Malengier 17f7e5f6fd include fanchart in distribution
svn: r14564
2010-03-02 08:12:31 +00:00
Espen Berg afd9b2f40f Some revision on Norwegian translation. Got rid of all nasty mismatches. Now only normal fuzzys and untranslated strings remaining
svn: r14563
2010-03-02 07:48:50 +00:00
Rob G. Healey 33b209eed7 Fixed two typos in stylesheet.
svn: r14560
2010-03-02 01:33:53 +00:00
Serge Noiraud 90dc718dd0 GeoView : bad word not translatable.
svn: r14558
2010-03-01 22:02:26 +00:00
Mirko Leonhäuser c79c29ec9a Updated _Date_de.py translated months
svn: r14556
2010-03-01 21:37:49 +00:00
Mirko Leonhäuser 605f9d0f24 updated german translation
svn: r14555
2010-03-01 21:34:33 +00:00
Nick Hall 01c80b19db 3603: Make family option in reports default to the active family
svn: r14553
2010-03-01 19:17:59 +00:00
Peter Landgren 049698426e Fix of isue 3645.
svn: r14552
2010-03-01 18:13:48 +00:00
Nick Hall cba3502131 3646: Remove redundant code
svn: r14549
2010-03-01 17:45:07 +00:00
Jérôme Rapinat dfa9118384 3596: Web reports dialogs use too large length value (Download section)
svn: r14548
2010-03-01 17:20:49 +00:00
Jérôme Rapinat 2e84a2457b 3596: Web reports dialogs use too large length value
svn: r14547
2010-03-01 15:55:30 +00:00
Benny Malengier ee8559dd69 3542: Scratchpad does not remove objects when changing database
svn: r14545
2010-03-01 12:52:33 +00:00
Peter Landgren e984e15c9d Minor update of Swedish translation.
svn: r14544
2010-03-01 10:48:28 +00:00
Erik De Richter 393a2d9748 update nl translation
svn: r14543
2010-03-01 10:29:00 +00:00
Benny Malengier 96fbb98733 Fix bug: allow drop from Nautilius/Dolphin
svn: r14541
2010-03-01 08:57:37 +00:00
Benny Malengier 9b30450f33 Fix bug: allow drop from Nautilius/Dolphin
svn: r14539
2010-03-01 08:51:17 +00:00
Boril Gourinov 92b0b99e25 Update of Bulgarian translation
svn: r14537
2010-02-28 21:59:37 +00:00
Josip Pisoj 755807436a Updated Croatian translations
svn: r14536
2010-02-28 21:39:45 +00:00
Peter Landgren 155aea5d72 Further improvments to drag and drop mult files in Windows.
svn: r14534
2010-02-28 21:24:34 +00:00
Gary Burton 3c80aaa2b0 Fix for 0003629: Cannot set entry on marker field into NotRelated tool
svn: r14532
2010-02-28 21:12:47 +00:00
Mirko Leonhäuser e91cdcbd8b updated german translation
svn: r14531
2010-02-28 21:12:23 +00:00
Arturas Sleinius 38a90e201f Updated Lithuanian translation
svn: r14530
2010-02-28 20:12:32 +00:00
Gary Burton 61bff1a65c Align vertical position of person label and edit button
svn: r14528
2010-02-28 19:58:43 +00:00
Nick Hall 91281166c1 Only update display counts for nodes with handles
svn: r14526
2010-02-28 17:24:10 +00:00
Nick Hall 17e9750bb5 3448: Prevent removal of hidden root node
svn: r14524
2010-02-28 17:01:11 +00:00
Gary Burton 33414b0c78 Improve GEDCOM round trip by parsing SOUR and NOTE tokens for FACT attributes. Gramps was previously exporting this data but ignoring it on import.
svn: r14522
2010-02-28 16:17:54 +00:00
Jérôme Rapinat ec43a7122c generate template with last POTFILES.in
svn: r14521
2010-02-28 15:38:55 +00:00
Jérôme Rapinat 76c1044a64 new messages, typo and update translation template
svn: r14519
2010-02-28 15:24:50 +00:00
Benny Malengier d91cbd91bf 3631: Cannot start Gramps without any view loaded (OK, it is stupid...)
svn: r14517
2010-02-28 14:27:17 +00:00
Benny Malengier 644d0ac540 Fix drag/drop bug: allow multiple drop on gallery
svn: r14516
2010-02-28 14:03:52 +00:00
Gary Burton 99c8ae9181 Fix GEDCOM import of CHAN for SOUR, REPO, OBJE. Bug 3373.
svn: r14514
2010-02-28 13:11:52 +00:00
Arturas Sleinius 57f66d842f Updated Lithuanian translation
svn: r14512
2010-02-27 23:07:38 +00:00
Arturas Sleinius 83c19420b4 Updated Lithuanian translation
svn: r14511
2010-02-27 18:21:39 +00:00
Peter Landgren d1c4c853bb Fixed a typo 'juct' -> 'just'.
svn: r14510
2010-02-27 14:24:12 +00:00
Peter Landgren 6f90f1cb46 Some finetuning of translation.
svn: r14507
2010-02-27 13:44:16 +00:00
Peter Landgren b69ee2b401 Fix of issue 3642.
svn: r14505
2010-02-27 13:27:33 +00:00
Doug Blank ab0021c02b 3639: Check and Repair tool fails with unsupported operand
svn: r14504
2010-02-27 12:14:25 +00:00
Jérôme Rapinat f4fb59aefe typo
svn: r14501
2010-02-27 09:29:03 +00:00
Josip Pisoj f660795ce1 Updated Croatian translations
svn: r14500
2010-02-26 23:04:02 +00:00
Peter Landgren fe1d2530b1 Had missed to add constfunct.py.
svn: r14499
2010-02-26 10:33:25 +00:00
Peter Landgren 81ad0c8602 Swedish update.
svn: r14498
2010-02-26 10:27:11 +00:00
Erik De Richter fbc6543ea7 update nl translation
svn: r14497
2010-02-26 10:23:45 +00:00
Peter Landgren c639654f9b Fixed a typo.
svn: r14496
2010-02-26 07:14:36 +00:00
Doug Blank ac8bc209e1 3639: Check and Repair tool fails with unsupported operand
svn: r14494
2010-02-26 01:56:09 +00:00
Mirko Leonhäuser 2e9066a6cf Update german translation
svn: r14489
2010-02-25 21:47:56 +00:00
Jérôme Rapinat d99f6eac3f typo
svn: r14487
2010-02-25 17:17:22 +00:00
Rob G. Healey 9dbf20d795 Fixed error on line 691. Thanks Peter.
svn: r14485
2010-02-25 16:51:55 +00:00
Peter Landgren c0cc2ff7ba Swedish update.
svn: r14481
2010-02-25 15:15:09 +00:00
Benny Malengier 66639dd2cb translate category in menu and title
svn: r14480
2010-02-25 13:01:48 +00:00
Doug Blank 38290f7c57 Fixed gettext formulation error
svn: r14478
2010-02-25 11:29:26 +00:00
Jérôme Rapinat 43dc1d299b update french translation
svn: r14477
2010-02-25 09:02:02 +00:00
Rob G. Healey 9710e7adcf Fixed the problem with ngettext on line 1462.
svn: r14476
2010-02-25 04:47:52 +00:00
Rob G. Healey d719751914 Fixed a ngettext issue on line 1462 from earlier today.
svn: r14475
2010-02-25 04:34:14 +00:00
Rob G. Healey 96c80a44e2 Fixed error blocking start of software.
svn: r14474
2010-02-25 04:16:10 +00:00
Doug Blank 9dfa170293 3628: Frames not set on CalcToolManagedWindow class
svn: r14473
2010-02-25 01:21:37 +00:00
Mirko Leonhäuser f3b7e35c69 Update german translation
svn: r14471
2010-02-24 23:59:48 +00:00
Rob G. Healey 4c9197b403 Adding named variables to format strings for errors in 'make distcheck' to work.
svn: r14470
2010-02-24 23:11:28 +00:00
Rob G. Healey 3ed392bab0 Adding named variables to format strings for errors in 'make distcheck' to work.
svn: r14469
2010-02-24 23:09:32 +00:00
Rob G. Healey edd6fc6ee7 Adding named variables to format strings for errors in 'make distcheck' to work.
svn: r14468
2010-02-24 23:08:16 +00:00
Rob G. Healey ae81cbc6ee Adding named variables to format strings for errors in 'make distcheck' to work.
svn: r14467
2010-02-24 23:07:23 +00:00
Rob G. Healey c9d41950eb Adding named variables to format strings for errors in 'make distcheck' to work.
svn: r14466
2010-02-24 23:06:21 +00:00
Rob G. Healey 8b0b4a3785 Adding named variables to format strings for errors in 'make distcheck' to work.
svn: r14465
2010-02-24 23:05:16 +00:00
Rob G. Healey 4989c9e5d4 Adding named variables to format strings for errors in 'make distcheck' to work.
svn: r14464
2010-02-24 23:04:32 +00:00
Rob G. Healey 78c286fce2 Adding named variables to format strings for errors in 'make distcheck' to work.
svn: r14463
2010-02-24 23:03:43 +00:00
Rob G. Healey ec7001837a Adding named variables to format strings for errors in 'make distcheck' to work.
svn: r14462
2010-02-24 23:02:48 +00:00
Rob G. Healey 4bf6ab292d Adding named variables to format strings for errors in 'make distcheck' to work.
svn: r14461
2010-02-24 23:01:38 +00:00
Rob G. Healey 6f6c74ae8b Adding named variables to format strings for errors in 'make distcheck' to work.
svn: r14460
2010-02-24 23:00:12 +00:00
Rob G. Healey 8440ccbf87 Adding named variables to format strings for errors in 'make distcheck' to work.
svn: r14459
2010-02-24 22:59:07 +00:00
Rob G. Healey 6cbe9e3c0d Adding named variables to format strings for errors in 'make distcheck' to work.
svn: r14458
2010-02-24 22:58:17 +00:00
Rob G. Healey f99b1ac371 Adding named variables to format strings for errors in 'make distcheck' to work.
svn: r14457
2010-02-24 22:57:18 +00:00
Rob G. Healey 848eb99bb7 Adding named variables to format strings for errors in 'make distcheck' to work.
svn: r14456
2010-02-24 22:56:31 +00:00
Rob G. Healey d1f26d9f7a Adding named variables to format strings for errors in 'make distcheck' to work.
svn: r14455
2010-02-24 22:55:25 +00:00
Rob G. Healey 51ff6e4569 Adding named variables to format strings for errors in 'make distcheck' to work.
svn: r14454
2010-02-24 22:54:03 +00:00
Erik De Richter 69e08ceafb update nl translation
svn: r14453
2010-02-24 17:14:30 +00:00
Peter Landgren fc080a686b Swedish update.
svn: r14452
2010-02-24 13:59:32 +00:00
Jérôme Rapinat bb5428d725 Update Croatian translation (by Josip)
svn: r14450
2010-02-24 10:30:37 +00:00
Peter Landgren 5604a27bf4 Fix of issue 3534.
svn: r14445
2010-02-23 13:44:42 +00:00
Peter Landgren 63430a1ce3 Fix of issue 3534.
svn: r14444
2010-02-23 13:43:21 +00:00
Serge Noiraud 7496974691 GeoView : Don't use a dot at the end of messages in the configuration window.
svn: r14442
2010-02-22 18:08:12 +00:00
Jérôme Rapinat 3a2af65bc0 merge Norwegian Nynorsk (3.1.3 -> 3.2)
svn: r14441
2010-02-22 16:30:06 +00:00
Jérôme Rapinat 26c80611b2 disable translations without active translators and too many untranslated strings
svn: r14440
2010-02-22 15:41:22 +00:00
Erik De Richter 641b7e5e07 update nl translation
svn: r14438
2010-02-22 14:26:28 +00:00
Doug Blank f6af0cb380 Changes to allow distcheck to pass
svn: r14437
2010-02-22 12:41:06 +00:00
Peter Landgren a5e4bf8637 Missed () in some contsfunc.win().
svn: r14435
2010-02-22 08:44:07 +00:00
Stéphane Charette 077d0ded1f preliminary 3.2 release notes, based on Benny's document
svn: r14433
2010-02-22 03:46:31 +00:00
Stéphane Charette 7b1eae9a5b set 3.2.0 version to 'beta1'
svn: r14432
2010-02-22 03:01:00 +00:00
Serge Noiraud 5a46c30439 GeoView : Allow message translation.
svn: r14429
2010-02-21 20:56:36 +00:00
Mirko Leonhäuser 9e742feac4 Update german translation not komplete jet
svn: r14427
2010-02-21 16:06:28 +00:00
Brian Matherly eb4e5ddc1f Create a maintenance branch for the 3.2.x series of releases.
svn: r14425
2010-02-21 14:14:21 +00:00
80 changed files with 348408 additions and 320937 deletions
+25
View File
@@ -1,3 +1,28 @@
Version 3.2.0 (beta1) -- the "I am your father" release.
* New Plugin System:
-> In the Help Menu -> Menu Status, all available plugins are visible. All
plugins can be hidden, saving resources and hiding options you do not need.
* Faster:
-> Many under the hood improvements have occurred that should improve
performance enormously. New features are implemented as plugins that can
be hidden.
-> Performance improvement example: Insertion of a new person in a family
tree with 30000 people previously took 4 seconds on a 1.4GHz PC running
Gramps 3.1, but now takes milliseconds.
* New Views:
-> There are new views, and some existing views have been greatly improved
-> People view can now be sorted on the columns
-> A Place treeview is present, nicely grouping your places under country
groups
-> GeoView has left it's beta status behind and shows your data on an online
map (OpenStreetMap or Google Maps, a fast internet connection is required)
-> Help Menu -> Extra Reports/Tools open a webpage with downloadable views
* Other Improvements:
-> Styled Notes now in most output formats that support styles
-> New languages
-> Select language in which report should be created (not yet available in
all reports)
Version 3.1.3 -- the "What name?" release.
* contains translation updates, crash fixes, bug fixes, and minor updates.
* fixes and updates to:
+3 -3
View File
@@ -11,8 +11,8 @@ AM_INIT_AUTOMAKE([1.6.3 foreign])
AC_CONFIG_MACRO_DIR([m4])
RELEASE=0.SVN$(svnversion -n .)
dnl RELEASE=0beta
dnl RELEASE=0.SVN$(svnversion -n .)
RELEASE=0beta1
dnl RELEASE=0rc1
dnl RELEASE=1
@@ -33,7 +33,7 @@ AC_SUBST(RELEASE)
AC_SUBST(VERSIONSTRING)
dnl Add the languages which your application supports here.
ALL_LINGUAS="hu zh_CN cs da de es fr it nb nl nn pl pt_BR ro ru sv eo fi lt sk tr bg hr sl ca mk sq he"
ALL_LINGUAS="hu zh_CN cs da de es fr it nb nl nn pl pt_BR ru sv eo fi lt sk bg hr sl ca sq"
GETTEXT_PACKAGE=gramps
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define to the Gettext package name.])
+5 -7
View File
@@ -381,7 +381,7 @@ src/plugins/drawreport/TimeLine.py
# plugins/export directory
src/plugins/export/export.gpr.py
src/plugins/export/ExportCsv.py
src/plugins/export/ExportDjango.gpr.py
src/plugins/export/ExportDjango.py
src/plugins/export/ExportFtree.py
src/plugins/export/ExportGedcom.py
src/plugins/export/ExportGeneWeb.py
@@ -420,7 +420,7 @@ src/plugins/graph/GVRelGraph.py
# plugins/import directory
src/plugins/import/import.gpr.py
src/plugins/import/ImportCsv.py
src/plugins/import/ImportDjango.gpr.py
src/plugins/import/ImportDjango.py
src/plugins/import/ImportDjango.py
src/plugins/import/ImportGedcom.py
src/plugins/import/ImportGeneWeb.py
@@ -534,8 +534,8 @@ src/plugins/tool/Verify.py
#plugins/view directory
src/plugins/view/eventview.py
src/plugins/view/familyview.py
src/plugins/view/fanchartview.gpr.py
src/plugins/view/fanchartview.py
src/plugins/view/fanchartview.gpr.py
src/plugins/view/geoview.py
src/plugins/view/geoview.gpr.py
src/plugins/view/grampletview.py
@@ -543,8 +543,6 @@ src/plugins/view/htmlrenderer.py
src/plugins/view/mediaview.py
src/plugins/view/noteview.py
src/plugins/view/pedigreeview.py
src/plugins/view/pedigreeviewext.py
src/plugins/view/pedigreeviewext.gpr.py
src/plugins/view/personlistview.py
src/plugins/view/persontreeview.py
src/plugins/view/placelistview.py
@@ -895,8 +893,8 @@ src/plugins/tool/verify.glade
#
# web
#
src/web/grampsdb/views.py
src/web/utils.py
#src/web/grampsdb/views.py
#src/web/utils.py
#
# Files to extract from and then merge into
#
+4489 -4071
View File
File diff suppressed because it is too large Load Diff
+9024 -6647
View File
File diff suppressed because it is too large Load Diff
+20613 -20491
View File
File diff suppressed because it is too large Load Diff
+19623 -19408
View File
File diff suppressed because it is too large Load Diff
+13890 -14263
View File
File diff suppressed because it is too large Load Diff
+977 -867
View File
File diff suppressed because it is too large Load Diff
+22309 -19974
View File
File diff suppressed because it is too large Load Diff
+4625 -4142
View File
File diff suppressed because it is too large Load Diff
+4636 -4129
View File
File diff suppressed because it is too large Load Diff
+539 -862
View File
File diff suppressed because it is too large Load Diff
+417 -499
View File
File diff suppressed because it is too large Load Diff
+19385 -18871
View File
File diff suppressed because it is too large Load Diff
+19880 -18337
View File
File diff suppressed because it is too large Load Diff
+4582 -4130
View File
File diff suppressed because it is too large Load Diff
+6127 -7750
View File
File diff suppressed because it is too large Load Diff
+2024 -2201
View File
File diff suppressed because it is too large Load Diff
+21088 -18826
View File
File diff suppressed because it is too large Load Diff
+10666 -7824
View File
File diff suppressed because it is too large Load Diff
+5920 -3909
View File
File diff suppressed because it is too large Load Diff
+20022 -17326
View File
File diff suppressed because it is too large Load Diff
+13942 -12557
View File
File diff suppressed because it is too large Load Diff
+20901 -20843
View File
File diff suppressed because it is too large Load Diff
+21958 -19062
View File
File diff suppressed because it is too large Load Diff
+1759 -1698
View File
File diff suppressed because it is too large Load Diff
+4635 -4130
View File
File diff suppressed because it is too large Load Diff
+21425 -18932
View File
File diff suppressed because it is too large Load Diff
+20658 -18242
View File
File diff suppressed because it is too large Load Diff
+4194 -3973
View File
File diff suppressed because it is too large Load Diff
+1980 -1888
View File
File diff suppressed because it is too large Load Diff
+20971 -18212
View File
File diff suppressed because it is too large Load Diff
+4615 -4142
View File
File diff suppressed because it is too large Load Diff
+77 -17
View File
@@ -56,27 +56,87 @@ class DateParserDE(DateParser):
month_to_int[u"jan"] = 1
month_to_int[u"jänner"] = 1
month_to_int[u"jän"] = 1
# Add other common latin, local and historical variants
# Add other common latin,
month_to_int[u"januaris"] = 1
month_to_int[u"januarii"] = 1
month_to_int[u"januarius"] = 1
month_to_int[u"februaris"] = 2
month_to_int[u"februarii"] = 2
month_to_int[u"februarius"] = 2
month_to_int[u"martii"] = 3
month_to_int[u"martius"] = 3
month_to_int[u"aprilis"] = 4
month_to_int[u"maius"] = 5
month_to_int[u"maii"] = 5
month_to_int[u"junius"] = 6
month_to_int[u"junii"] = 6
month_to_int[u"julius"] = 7
month_to_int[u"julii"] = 7
month_to_int[u"augustus"] = 8
month_to_int[u"augusti"] = 8
month_to_int[u"septembris"] = 9
month_to_int[u"7bris"] = 9
month_to_int[u"september"] = 9
month_to_int[u"october"] = 10
month_to_int[u"octobris"] = 10
month_to_int[u"8bris"] = 10
month_to_int[u"novembris"] = 11
month_to_int[u"9bris"] = 11
month_to_int[u"november"] = 11
month_to_int[u"decembris"] = 12
month_to_int[u"10bris"] = 12
month_to_int[u"xbris"] = 12
month_to_int[u"december"] = 12
# local and historical variants
month_to_int[u"jenner"] = 1
month_to_int[u"feber"] = 2
month_to_int[u"februaris"] = 2
month_to_int[u"merz"] = 3
month_to_int[u"aprilis"] = 4
month_to_int[u"maius"] = 5
month_to_int[u"junius"] = 6
month_to_int[u"julius"] = 7
month_to_int[u"augst"] = 8
month_to_int[u"7ber"] = 9
month_to_int[u"7bris"] = 9
month_to_int[u"8ber"] = 10
month_to_int[u"8bris"] = 10
month_to_int[u"9ber"] = 11
month_to_int[u"9bris"] = 11
month_to_int[u"10ber"] = 12
month_to_int[u"10bris"] = 12
month_to_int[u"xber"] = 12
month_to_int[u"xbris"] = 12
# old german names
month_to_int[u"hartung"] = 1
month_to_int[u"eismond"] = 1
month_to_int[u"hornung"] = 2
month_to_int[u"schmelzmond"] = 2
month_to_int[u"taumond"] = 2
month_to_int[u"narrenmond"] = 2
month_to_int[u"rebmond"] = 2
month_to_int[u"hintester"] = 2
month_to_int[u"lenzing"] = 3
month_to_int[u"lenzmond"] = 3
month_to_int[u"launing"] = 4
month_to_int[u"ostermond"] = 4
month_to_int[u"winnemond"] = 5
month_to_int[u"weidenmonat"] = 5
month_to_int[u"blumenmond"] = 5
month_to_int[u"brachet"] = 6
month_to_int[u"brachmond"] = 6
month_to_int[u"heuert"] = 7
month_to_int[u"heumond"] = 7
month_to_int[u"ernting"] = 8
month_to_int[u"erntemond"] = 8
month_to_int[u"bisemond"] = 8
month_to_int[u"scheiding"] = 9
month_to_int[u"herbstmond"] = 9
month_to_int[u"gilbhard"] = 10
month_to_int[u"gilbhart"] = 10
month_to_int[u"windmond"] = 11
month_to_int[u"nebelung"] = 11
month_to_int[u"wintermond"] = 11
month_to_int[u"julmond"] = 12
month_to_int[u"heilmond"] = 12
month_to_int[u"christmond"] = 12
month_to_int[u"dustermond"] = 12
modifier_to_int = {
u'vor' : Date.MOD_BEFORE,
@@ -137,13 +197,13 @@ class DateDisplayDE(DateDisplay):
"""
German language date display class.
"""
# TODO: Translate these month strings:
long_months = ( u"", u"January", u"February", u"March", u"April", u"May",
u"June", u"July", u"August", u"September", u"October",
u"November", u"December" )
short_months = ( u"", u"Jan", u"Feb", u"Mar", u"Apr", u"May", u"Jun",
u"Jul", u"Aug", u"Sep", u"Oct", u"Nov", u"Dec" )
long_months = ( u"", u"Januar", u"Februar", u"März", u"April", u"Mai",
u"Juni", u"Juli", u"August", u"September", u"Oktober",
u"November", u"Dezember" )
short_months = ( u"", u"Jan", u"Feb", u"Mär", u"Apr", u"Mai", u"Jun",
u"Jul", u"Aug", u"Sep", u"Okt", u"Nov", u"Dez" )
calendar = (
"", u" (julianisch)", u" (hebräisch)",
+31 -3
View File
@@ -80,10 +80,22 @@ class History(gen.utils.Callback):
'mru-changed' : (list, )
}
def __init__(self):
def __init__(self, dbstate, nav_type):
gen.utils.Callback.__init__(self)
self.clear()
dbstate.connect('database-changed', self.connect_signals)
self.signal_map = {}
self.signal_map[nav_type.lower() + '-delete'] = self.handles_removed
self.signal_map[nav_type.lower() + '-rebuild'] = self.history_changed
def connect_signals(self, dbstate):
"""
Connects database signals when the database has changed.
"""
for sig in self.signal_map:
dbstate.connect(sig, self.signal_map[sig])
def clear(self):
"""
Clears the history, resetting the values back to their defaults
@@ -191,6 +203,22 @@ class History(gen.utils.Callback):
if not self.at_end():
self.history = self.history[0:self.index+1]
def handles_removed(self, handle_list):
"""
Called in response to an object-delete signal.
Removes a list of handles from the history.
"""
for handle in handle_list:
self.remove(handle)
def history_changed(self):
"""
Called in response to an object-rebuild signal.
Objects in the history list may have been deleted.
"""
self.clear()
self.emit('mru-changed', (self.mru, ))
#-------------------------------------------------------------------------
#
# Recent Docs Menu
@@ -370,13 +398,13 @@ class DisplayState(gen.utils.Callback):
"""
return self.history_lookup.get((nav_type, nav_group))
def register(self, nav_type, nav_group):
def register(self, dbstate, nav_type, nav_group):
"""
Create a history and navigation object for the specified
navigation type and group, if they don't exist.
"""
if (nav_type, nav_group) not in self.history_lookup:
history = History()
history = History(dbstate, nav_type)
self.history_lookup[(nav_type, nav_group)] = history
def get_active(self, nav_type, nav_group=0):
+1
View File
@@ -28,6 +28,7 @@ gdir_PYTHON = \
Bookmarks.py\
config.py\
const.py\
constfunc.py\
DateEdit.py\
Date.py\
DbState.py\
+15 -7
View File
@@ -536,16 +536,22 @@ class GuiFamilyOption(gtk.HBox):
def __initialize_family(self):
"""
Find a family to initialize the option with. Any family will do, but
try to find a family that the user is likely interested in.
Find a family to initialize the option with. If there is no active
family, try to find a family that the user is likely interested in.
"""
family_list = []
# First try the family of the active person
person_handle = self.__uistate.get_active('Person')
person = self.__dbstate.db.get_person_from_handle(person_handle)
if person:
family_list = person.get_family_handle_list()
# Use the active family if one is selected
family = self.__uistate.get_active('Family')
if family:
family_list = [family]
if not family_list:
# Next try the family of the active person
person_handle = self.__uistate.get_active('Person')
person = self.__dbstate.db.get_person_from_handle(person_handle)
if person:
family_list = person.get_family_handle_list()
if not family_list:
# Next try the family of the default person in the database.
@@ -558,6 +564,8 @@ class GuiFamilyOption(gtk.HBox):
for family in self.__db.iter_family_handles():
self.__update_family(family)
break
else:
self.__update_family(family_list[0])
def __get_family_clicked(self, obj): # IGNORE:W0613 - obj is unused
"""
+4 -4
View File
@@ -923,10 +923,10 @@ class RelationshipCalculator(object):
rel1 == rel2[:len(rel1)]:
#loop, keep one message in storage!
self.__loopDetected = True
self.__msg += [_("Relationship loop detected:") + \
_("Person %s connects to himself via %s") % \
(person.get_primary_name().get_name(),
rel2[len(rel1):])]
self.__msg += [_("Relationship loop detected:") + " " +
_("Person %(person)s connects to himself via %(relation)s") %
{'person' : person.get_primary_name().get_name(),
'relation' : rel2[len(rel1):] }]
return
elif store:
pmap[person.handle] = [[rel_str], [rel_fam]]
+41 -9
View File
@@ -948,33 +948,52 @@ class ScratchPadListView(object):
def database_changed(self,db):
self._db = db
# Note: delete event is emitted before the delete, so checking
# if valid on this is useless !
db_signals = (
'person-update',
'person-rebuild',
'family-update',
'family-delete',
'family-rebuild',
'source-update',
'source-rebuild',
'place-update',
'place-delete',
'place-rebuild',
'media-update',
'media-delete',
'media-rebuild',
'event-update',
'event-rebuild',
'repository-update',
'repository-rebuild'
'repository-rebuild',
'note-rebuild'
)
for signal in db_signals:
self._db.connect(signal,self.remove_invalid_objects)
self._db.connect('person-delete', gen_del_obj(self.delete_object, 'person-link'))
self._db.connect('source-delete', gen_del_obj(self.delete_object, 'source-link'))
self._db.connect('repository-delete', gen_del_obj(self.delete_object, 'repo-link'))
self._db.connect('event-delete', gen_del_obj(self.delete_object, 'pevent'))
self._db.connect('person-delete',
gen_del_obj(self.delete_object, 'person-link'))
self._db.connect('person-delete',
gen_del_obj(self.delete_object_ref, 'personref'))
self._db.connect('source-delete',
gen_del_obj(self.delete_object, 'source-link'))
self._db.connect('source-delete',
gen_del_obj(self.delete_object_ref, 'srcref'))
self._db.connect('repository-delete',
gen_del_obj(self.delete_object, 'repo-link'))
self._db.connect('event-delete',
gen_del_obj(self.delete_object, 'pevent'))
self._db.connect('event-delete',
gen_del_obj(self.delete_object_ref, 'eventref'))
self._db.connect('media-delete',
gen_del_obj(self.delete_object, 'mediaobj'))
self._db.connect('media-delete',
gen_del_obj(self.delete_object_ref, 'mediaref'))
self._db.connect('place-delete',
gen_del_obj(self.delete_object, 'place-link'))
self._db.connect('note-delete',
gen_del_obj(self.delete_object, 'note-link'))
# family-delete not needed, cannot be dragged!
self.remove_invalid_objects()
@@ -996,6 +1015,16 @@ class ScratchPadListView(object):
if data[2] in handle_list:
model.remove(o.iter)
def delete_object_ref(self, handle_list, link_type):
model = self._widget.get_model()
if model:
for o in model:
if o[0] == link_type:
data = o[1]._obj.get_reference_handle()
if data in handle_list:
model.remove(o.iter)
# Method to manage the wrapper classes.
def register_wrapper_classes(self):
@@ -1153,7 +1182,6 @@ class ScratchPadListView(object):
# remember time for double drop workaround.
self._previous_drop_time = realTime
# proxy methods to provide access to the real widget functions.
def set_model(self,model=None):
@@ -1237,6 +1265,10 @@ class ScratchPadWindow(ManagedWindow.ManagedWindow):
self.object_list.set_model(ScratchPadWindow.otree)
#Database might have changed, objects might have been removed,
#we need to reevaluate if all data is valid
self.object_list.remove_invalid_objects()
self.top.connect_signals({
"on_close_scratchpad" : self.close,
"on_clear_clicked": self.on_clear_clicked,
+8
View File
@@ -52,6 +52,7 @@ LOG = logging.getLogger(".clidbman")
import gen.db
from gen.plug import BasePluginManager
import config
import constfunc
#-------------------------------------------------------------------------
#
@@ -367,6 +368,13 @@ def time_val(dirpath):
meta = os.path.join(dirpath, META_NAME)
if os.path.isfile(meta):
tval = os.stat(meta)[9]
# This gives creation date in Windows, but correct date in Linux
if constfunc.win():
# Try to use last modified date instead in Windows
# and check that it is later than the creation date.
tval_mod = os.stat(meta)[8]
if tval_mod > tval:
tval = tval_mod
last = time.strftime('%x %X', time.localtime(tval))
else:
tval = 0
-7
View File
@@ -205,13 +205,6 @@ register('interface.pedview-layout', 0)
register('interface.pedview-show-images', True)
register('interface.pedview-show-marriage', False)
register('interface.pedview-tree-size', 0)
register('interface.pedviewext-layout', 0)
register('interface.pedviewext-show-images', True)
register('interface.pedviewext-show-marriage', False)
register('interface.pedviewext-tree-size', 5)
register('interface.pedviewext-tree-direction', 2)
register('interface.pedviewext-scroll-direction', False)
register('interface.pedviewext-show-unknown-peoples', False)
register('interface.person-height', 550)
register('interface.person-ref-height', 350)
register('interface.person-ref-width', 600)
+2 -2
View File
@@ -1178,7 +1178,7 @@ div#Addresses {
}
div#Addresses table.infolist {
font-size: 12px;
background- color: #D8F3D6;
background-color: #D8F3D6;
}
div#Addresses table.infolist tbody tr td {
border-bottom: solid 1px #5D835F;
@@ -1193,7 +1193,7 @@ div#Addresses table.infolist tbody tr td.ColumnCity {
width: 8%;
}
div#Addresses table.infolist tbody tr td.ColumnCounty {
with: 8%;
width: 8%;
}
div#Addresses table.infolist tbody tr td.ColumnState {
width: 12%;
+1 -1
View File
@@ -20,7 +20,7 @@
<_tip number="10"><b>The Family View</b><br/>The Family View is used to display a typical family unit as two parents and their children.</_tip>
<_tip number="11"><b>Changing the Active Person</b><br/>Changing the Active Person in views is easy. In the Relationship view juct click on anyone. In the Ancestry View doubleclick on the person or right click to select any of their spouses, siblings, children or parents.</_tip>
<_tip number="11"><b>Changing the Active Person</b><br/>Changing the Active Person in views is easy. In the Relationship view just click on anyone. In the Ancestry View doubleclick on the person or right click to select any of their spouses, siblings, children or parents.</_tip>
<_tip number="12"><b>Who Was Born When?</b><br/>Under &quot;Tools &gt; Analysis and exploration &gt; Compare Individual Events...&quot; you can compare the data of individuals in your database. This is useful, say, if you wish to list the birth dates of everyone in your database. You can use a custom filter to narrow the results.</_tip>
+1 -1
View File
@@ -68,7 +68,7 @@ class Gramplet(object):
Connect the given method to the active-changed signal for the
navigation type requested.
"""
self.uistate.register(nav_type, self.nav_group)
self.uistate.register(self.dbstate, nav_type, self.nav_group)
history = self.uistate.get_history(nav_type, self.nav_group)
self.connect(history, "active-changed", method)
+1 -2
View File
@@ -8,10 +8,10 @@
<property name="default_width">500</property>
<property name="default_height">300</property>
<property name="type_hint">dialog</property>
<signal name="delete_event" handler="on_scratch_pad_delete_event"/>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox1">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow86">
<property name="visible">True</property>
@@ -58,7 +58,6 @@
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="on_clear_all_clicked"/>
</object>
<packing>
<property name="expand">False</property>
+34 -26
View File
@@ -2,7 +2,7 @@
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2006 Donald N. Allingham
# Copyright (C) 2009 Gary Burton
# Copyright (C) 2009-2010 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
@@ -38,6 +38,8 @@ import urlparse
import gtk
import pango
import os
import sys
import urllib
import gobject
#-------------------------------------------------------------------------
@@ -55,7 +57,7 @@ import Errors
import gen.mime
from DdTargets import DdTargets
from buttontab import ButtonTab
import constfunc
#-------------------------------------------------------------------------
#
#
@@ -200,7 +202,6 @@ class GalleryTab(ButtonTab, DbGUIElement):
self.iconlist.set_margin(12)
self.iconlist.set_spacing(24)
self.iconlist.set_reorderable(True)
self.iconlist.set_item_width(item_width)
self.iconlist.set_selection_mode(gtk.SELECTION_SINGLE)
# connect the signals
@@ -366,7 +367,7 @@ class GalleryTab(ButtonTab, DbGUIElement):
DdTargets.MEDIAOBJ.target()]
self.iconlist.enable_model_drag_dest(dnd_types,
gtk.gdk.ACTION_COPY)
gtk.gdk.ACTION_MOVE|gtk.gdk.ACTION_COPY)
self.iconlist.enable_model_drag_source(gtk.gdk.BUTTON1_MASK,
[self._DND_TYPE.target()],
gtk.gdk.ACTION_COPY)
@@ -454,28 +455,35 @@ class GalleryTab(ButtonTab, DbGUIElement):
elif self._DND_EXTRA and mytype == self._DND_EXTRA.drag_type:
self.handle_extra_type(mytype, obj)
except pickle.UnpicklingError:
d = Utils.fix_encoding(sel_data.data.replace('\0',' ').strip())
protocol, site, mfile, j, k, l = urlparse.urlparse(d)
if protocol == "file":
name = Utils.fix_encoding(mfile)
mime = gen.mime.get_type(name)
if not gen.mime.is_valid_type(mime):
return
photo = gen.lib.MediaObject()
photo.set_path(name)
photo.set_mime_type(mime)
basename = os.path.basename(name)
(root, ext) = os.path.splitext(basename)
photo.set_description(root)
trans = self.dbstate.db.transaction_begin()
self.dbstate.db.add_object(photo, trans)
oref = gen.lib.MediaRef()
oref.set_reference_handle(photo.get_handle())
self.get_data().append(oref)
self.changed = True
# self.dataobj.add_media_reference(oref)
self.dbstate.db.transaction_commit(trans,
_("Drag Media Object"))
#modern file managers provide URI_LIST. For Windows split sel_data.data
if constfunc.win():
files = sel_data.data.split('\n')
else:
files = sel_data.get_uris()
for file in files:
d = Utils.fix_encoding(file.replace('\0',' ').strip())
protocol, site, mfile, j, k, l = urlparse.urlparse(d)
if protocol == "file":
name = Utils.fix_encoding(mfile)
name = unicode(urllib.url2pathname(
name.encode(sys.getfilesystemencoding())))
mime = gen.mime.get_type(name)
if not gen.mime.is_valid_type(mime):
return
photo = gen.lib.MediaObject()
photo.set_path(name)
photo.set_mime_type(mime)
basename = os.path.basename(name)
(root, ext) = os.path.splitext(basename)
photo.set_description(root)
trans = self.dbstate.db.transaction_begin()
self.dbstate.db.add_object(photo, trans)
oref = gen.lib.MediaRef()
oref.set_reference_handle(photo.get_handle())
self.get_data().append(oref)
self.changed = True
self.dbstate.db.transaction_commit(trans,
_("Drag Media Object"))
self.rebuild()
def handle_extra_type(self, objtype, obj):
+1 -1
View File
@@ -166,7 +166,7 @@ class EditChildRef(EditSecondary):
def edit_child(self, obj,event):
if button_activated(event, _LEFT_BUTTON):
from _EditPerson import EditPerson
from editperson import EditPerson
handle = self.obj.ref
try:
person = self.db.get_person_from_handle(handle)
+51 -33
View File
@@ -32,7 +32,6 @@ Manages the main window and the pluggable views
#
#-------------------------------------------------------------------------
import os
from gen.ggettext import gettext as _
from cStringIO import StringIO
from collections import defaultdict
@@ -884,7 +883,13 @@ class ViewManager(CLIManager):
self.pages.append([])
nrpage = 0
for pdata, page_def in cat_views:
page = page_def(self.dbstate, self.uistate)
try:
page = page_def(self.dbstate, self.uistate)
except:
import traceback
LOG.warn("View '%s' failed to load." % pdata.id)
traceback.print_exc()
continue
# Category is (string, trans):
page.set_category(pdata.category)
page.set_ident(page.get_category() + '_' + pdata.id)
@@ -960,12 +965,21 @@ class ViewManager(CLIManager):
uitoolitems)
#set view cat to last used in this category
self.notebook_cat[-1].set_current_page(default_cat_views[indexcat])
if self.views:
self.active_page = self.pages[current_cat][current_cat_view]
self.buttons[current_cat].set_active(True)
self.active_page.set_active()
self.notebook.set_current_page(current_cat)
self.notebook_cat[current_cat].set_current_page(current_cat_view)
else:
#not one single view loaded
WarningDialog(
_("No views loaded"),
_("No view plugins are loaded. Go to Help->Plugin "
"Manager, and make sure some plugins of type 'View' are "
"enabled. Then restart Gramps"))
self.active_page = self.pages[current_cat][current_cat_view]
self.buttons[current_cat].set_active(True)
self.active_page.set_active()
self.notebook.set_current_page(current_cat)
self.notebook_cat[current_cat].set_current_page(current_cat_view)
def __views_to_show(self, use_last = True):
"""
@@ -1159,36 +1173,40 @@ class ViewManager(CLIManager):
:Type view_page: integer >=0 to switch to a specific page, or -1 to
switch to the active view in the category
"""
if view_page == -1:
#just show active one
view_page = self.notebook_cat[category_page].get_current_page()
if self.dbstate.open:
self.__disconnect_previous_page()
if len(self.pages) > 0:
self.active_page = self.pages[category_page][view_page]
self.active_page.set_active()
newcurpageid = self.views[category_page][view_page][0].id
config.set('preferences.last-view', newcurpageid)
olddefaults = config.get('preferences.last-views')
if len(olddefaults) != len(self.pages):
#number views changed, we cannot trust the old
olddefaults = [''] * len(self.pages)
olddefaults[category_page] = newcurpageid
config.set('preferences.last-views', olddefaults)
config.save()
if self.notebook_cat:
if view_page == -1:
#just show active one
view_page = self.notebook_cat[category_page].get_current_page()
if self.dbstate.open:
self.__disconnect_previous_page()
if len(self.pages) > 0:
self.active_page = self.pages[category_page][view_page]
self.active_page.set_active()
newcurpageid = self.views[category_page][view_page][0].id
config.set('preferences.last-view', newcurpageid)
olddefaults = config.get('preferences.last-views')
if len(olddefaults) != len(self.pages):
#number views changed, we cannot trust the old
olddefaults = [''] * len(self.pages)
olddefaults[category_page] = newcurpageid
config.set('preferences.last-views', olddefaults)
config.save()
self.__connect_active_page(category_page, view_page)
self.__connect_active_page(category_page, view_page)
self.uimanager.ensure_update()
self.uimanager.ensure_update()
while gtk.events_pending():
gtk.main_iteration()
while gtk.events_pending():
gtk.main_iteration()
self.active_page.change_page()
if self._key:
self.uistate.disconnect(self._key)
self._key = self.uistate.connect(
'nameformat-changed', self.active_page.build_tree)
self.active_page.change_page()
if self._key:
self.uistate.disconnect(self._key)
self._key = self.uistate.connect(
'nameformat-changed', self.active_page.build_tree)
else:
#no views loaded
pass
def import_data(self, obj):
"""
+1 -1
View File
@@ -92,7 +92,7 @@ class NavigationView(PageView):
self.nav_group = nav_group
self.mru_active = DISABLED
self.uistate.register(self.navigation_type(), self.nav_group)
self.uistate.register(state, self.navigation_type(), self.nav_group)
def navigation_type(self):
+3 -2
View File
@@ -435,13 +435,14 @@ class PageView(DbGUIElement):
if not self.__configure_content:
self.__configure_content = self._get_configure_page_funcs()
title = _("Configure %(cat)s - %(view)s") % \
{'cat': self.get_category(), 'view': self.get_title()}
{'cat': self.get_translated_category(),
'view': self.get_title()}
try:
ViewConfigureDialog(self.uistate, self.dbstate,
self.__configure_content,
self, self._config, dialogtitle=title,
ident=_("%(cat)s - %(view)s") %
{'cat': self.get_category(),
{'cat': self.get_translated_category(),
'view': self.get_title()})
except Errors.WindowActiveError:
return
@@ -627,6 +627,13 @@ class FlatBaseModel(gtk.GenericTreeModel):
node = self.get_iter(path)
self.row_changed(path, node)
def handle2path(self, handle):
"""
Obtain from a handle, a path.
Part of common api with flat/treebasemodel
"""
return self.on_get_path(handle)
def on_get_flags(self):
"""
Returns the GtkTreeModelFlags for this particular type of model
+14 -6
View File
@@ -228,7 +228,7 @@ class TreeBaseModel(gtk.GenericTreeModel):
the hierarchy. Each entry is a node object.
handle2node A dictionary of gramps handles. Each entry is a node object.
nodemap A NodeMap, mapping id's of the nodes to the node objects. Node
refer to other notes via id's in a linked list form.
refer to other nodes via id's in a linked list form.
The model obtains data from database as needed and holds a cache of most
recently used data.
@@ -577,8 +577,9 @@ class TreeBaseModel(gtk.GenericTreeModel):
path = self.on_get_path(child_node)
node = self.get_iter(path)
self.row_inserted(path, node)
self.__total += 1
self.__displayed += 1
if handle:
self.__total += 1
self.__displayed += 1
if handle:
self.handle2node[handle] = child_node
@@ -607,16 +608,16 @@ class TreeBaseModel(gtk.GenericTreeModel):
node.set_handle(None)
self.__displayed -= 1
self.__total -= 1
else:
elif node.parent: # don't remove the hidden root node
path = self.on_get_path(node)
self.nodemap.node(node.parent).remove_child(node, self.nodemap)
del self.tree[node.ref]
if node.handle is not None:
del self.handle2node[node.handle]
self.__displayed -= 1
self.__total -= 1
self.nodemap.del_node(node)
del node
self.__displayed -= 1
self.__total -= 1
# emit row_deleted signal
self.row_deleted(path)
@@ -724,6 +725,13 @@ class TreeBaseModel(gtk.GenericTreeModel):
"""
return self.handle2node.get(handle)
def handle2path(self, handle):
"""
Obtain from a handle, a path.
Part of common api with flat/treebasemodel
"""
return self.on_get_path(self.get_node(handle))
# The following implement the public interface of gtk.GenericTreeModel
def on_get_flags(self):
+2 -1
View File
@@ -176,7 +176,8 @@ def _get_subject(options, dbase):
else:
mother_name = _("unknown mother")
name = _("%s and %s (%s)") % (father_name, mother_name, family_id)
name = _("%(father)s and %(mother)s (%(id)s)") % {
'father' : father_name, 'mother' : mother_name, 'id' : family_id }
return name
return _("Not Applicable")
+3 -3
View File
@@ -210,9 +210,9 @@ def _find_records(db, filter, callname):
father = db.get_person_from_handle(father_handle)
mother = db.get_person_from_handle(mother_handle)
name = _("%s and %s") % (
_person_get_display_name(father, callname),
_person_get_display_name(mother, callname))
name = _("%(father)s and %(mother)s") % {
'father' : _person_get_display_name(father, callname),
'mother' : _person_get_display_name(mother, callname) }
_record(None, family_mostchildren,
len(family.get_child_ref_list()),
+1
View File
@@ -8,6 +8,7 @@ pkgdatadir = $(datadir)/@PACKAGE@/plugins/export
pkgdata_PYTHON = \
export.gpr.py \
ExportCsv.py \
ExportDjango.py \
ExportFtree.py \
ExportGedcom.py \
ExportGeneWeb.py \
+1 -1
View File
@@ -81,6 +81,6 @@ class LogGramplet(Gramplet):
if mother_handle:
mother = self.dbstate.db.get_person_from_handle(mother_handle)
mother_name = name_displayer.display(mother)
name = _("%s and %s") % (mother_name, father_name)
name = _("%(mother)s and %(father)s") % { 'mother' : mother_name, 'father' : father_name }
self.link(name, ltype, handle)
self.append_text("\n")
+2 -2
View File
@@ -330,8 +330,8 @@ class CSVParser(object):
try:
data = [[r.strip() for r in row] for row in reader]
except csv.Error, e:
ErrorDialog(_('format error: file %s, line %d: %s') %
(self.filename, reader.line_num, e))
ErrorDialog(_('format error: file %(fname)s, line %(line)d: %(zero)s') % {
'fname' : self.filename, 'line' : reader.line_num, 'zero' : e })
try:
fp.close()
except:
+3 -3
View File
@@ -2825,9 +2825,9 @@ def importData(database, filename, callback=None, cl=0):
if database.has_name_group_key(key) :
present = database.get_name_group_mapping(key)
if not value == present:
msg = _("Your family tree groups name %s together"
" with %s, did not change this grouping to %s") % (
key, present, value)
msg = _("Your family tree groups name %(key)s together"
" with %(present)s, did not change this grouping to %(value)s") % {
'key' : key, 'present' : present, 'value' : value }
LOG.warn(msg)
else:
database.set_name_group_mapping(key, value)
+6 -3
View File
@@ -688,7 +688,8 @@ class ProgenParser(object):
date.set(gen.lib.Date.QUAL_NONE, gen.lib.Date.MOD_ABOUT, gen.lib.Date.CAL_GREGORIAN, (0, month, year, None))
return date
log.warning(_("date did not match: '%s' (%s)") % (txt.encode('utf-8'), diag_msg or ''))
log.warning(_("date did not match: '%(text)s' (%(msg)s)") % {
'text' : txt.encode('utf-8'), 'msg' : diag_msg or '' } )
# Hmmm. Just use the plain text.
date.set_as_text(txt)
return date
@@ -1238,9 +1239,11 @@ class ProgenParser(object):
father_handle = father > 0 and self.__find_person_handle("I%d" % father) or None
mother_handle = mother > 0 and self.__find_person_handle("I%d" % mother) or None
if father > 0 and not father_handle:
log.warning(_("cannot find father for I%s (father=%d)") % (pers_id, father))
log.warning(_("cannot find father for I%(person)s (father=%(id)d)") % {
'person' : pers_id, 'id' : father } )
elif mother > 0 and not mother_handle:
log.warning(_("cannot find mother for I%s (mother=%d)") % (pers_id, mother))
log.warning(_("cannot find mother for I%(person)s (mother=%(mother)d)") % {
'person' : pers_id, 'mother' : mother } )
else:
fam = self.fm2fam.get((father_handle, mother_handle), None)
if not fam:
+7 -7
View File
@@ -1310,9 +1310,9 @@ class GrampsParser(UpdateCallback):
if self.db.has_name_group_key(key) :
present = self.db.get_name_group_mapping(key)
if not value == present:
msg = _("Your family tree groups name %s together"
" with %s, did not change this grouping to %s") % (
key, present, value)
msg = _("Your family tree groups name %(key)s together"
" with %(parent)s, did not change this grouping to %(value)s") % {
'key' : key, 'parent' : present, 'value' : value }
self.errmsg(msg)
else:
self.db.set_name_group_mapping(key, value)
@@ -2479,11 +2479,11 @@ def version_is_valid(filename, cli):
parser = VersionParser(filename)
if parser.get_xmlns_version() > libgrampsxml.GRAMPS_XML_VERSION:
msg = _("The .gramps file you are importing was made by version %s of "
"Gramps, while you are running an older version %s. "
msg = _("The .gramps file you are importing was made by version %(newer)s of "
"Gramps, while you are running an older version %(older)s. "
"The file will not be imported. Please upgrade to the latest "
"version of Gramps and try again."
) % (parser.get_gramps_version(), const.VERSION)
"version of Gramps and try again." ) % {
'newer' : parser.get_gramps_version(), 'older' : const.VERSION }
if cli:
LOG.warn(msg)
return False
+1
View File
@@ -8,6 +8,7 @@ pkgdatadir = $(datadir)/@PACKAGE@/plugins/import
pkgdata_PYTHON = \
import.gpr.py \
ImportCsv.py \
ImportDjango.py \
ImportGedcom.py \
ImportGeneWeb.py \
ImportGpkg.py \
+23 -23
View File
@@ -2,7 +2,7 @@
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2009 Gary Burton
# Copyright (C) 2009-2010 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
@@ -1814,6 +1814,7 @@ class GedcomParser(UpdateCallback):
TOKEN_RIN : self.__ignore,
TOKEN_NOTE : self.__repo_note,
TOKEN_RNOTE : self.__repo_note,
TOKEN_CHAN : self.__repo_chan,
}
self.event_parse_tbl = {
@@ -1904,6 +1905,9 @@ class GedcomParser(UpdateCallback):
self.person_fact_parse_tbl = {
TOKEN_TYPE : self.__person_fact_type,
TOKEN_SOUR : self.__person_attr_source,
TOKEN_NOTE : self.__person_attr_note,
TOKEN_RNOTE : self.__person_attr_note,
}
self.person_attr_parse_tbl = {
@@ -2640,11 +2644,7 @@ class GedcomParser(UpdateCallback):
self.__add_default_source(person)
# commit the person to the database
if person.change:
self.dbase.commit_person(person, self.trans,
change_time=state.person.change)
else:
self.dbase.commit_person(person, self.trans)
self.dbase.commit_person(person, self.trans, state.person.change)
def __person_sour(self, line, state):
"""
@@ -3250,7 +3250,6 @@ class GedcomParser(UpdateCallback):
def __person_fact_type(self, line, state):
state.attr.set_type(line.data)
self.__skip_subordinate_levels(state.level)
def __person_bapl(self, line, state):
"""
@@ -3682,11 +3681,7 @@ class GedcomParser(UpdateCallback):
self.__add_default_source(family)
# commit family to database
if family.change:
self.dbase.commit_family(family, self.trans,
change_time=family.change)
else:
self.dbase.commit_family(family, self.trans)
self.dbase.commit_family(family, self.trans, family.change)
def __family_husb(self, line, state):
"""
@@ -4795,7 +4790,7 @@ class GedcomParser(UpdateCallback):
state.level = level
self.__parse_level(state, self.source_func, self.__undefined)
self.dbase.commit_source(state.source, self.trans)
self.dbase.commit_source(state.source, self.trans, state.source.change)
def __source_attr(self, line, state):
"""
@@ -4889,6 +4884,15 @@ class GedcomParser(UpdateCallback):
"""
self.__parse_note(line, state.repo_ref, state.level+1)
def __repo_chan(self, line, state):
"""
@param line: The current line in GedLine format
@type line: GedLine
@param state: The current state
@type state: CurrentState
"""
self.__parse_change(line, state.repo, state.level+1)
def __source_abbr(self, line, state):
"""
@param line: The current line in GedLine format
@@ -4984,11 +4988,7 @@ class GedcomParser(UpdateCallback):
self.__add_default_source(media)
# commit the person to the database
if media.change:
self.dbase.commit_media_object(media, self.trans,
change_time=media.change)
else:
self.dbase.commit_media_object(media, self.trans)
self.dbase.commit_media_object(media, self.trans, media.change)
def __obje_form(self, line, state):
"""
@@ -5079,7 +5079,7 @@ class GedcomParser(UpdateCallback):
@param state: The current state
@type state: CurrentState
"""
self.__skip_subordinate_levels(state.level+1)
self.__parse_change(line, state.media, state.level+1)
def __person_attr_type(self, line, state):
"""
@@ -5152,7 +5152,7 @@ class GedcomParser(UpdateCallback):
state.level = 1
self.__parse_level(state, self.repo_parse_tbl, self.__ignore)
self.dbase.commit_repository(repo, self.trans)
self.dbase.commit_repository(repo, self.trans, repo.change)
def __repo_name(self, line, state):
"""
@@ -5494,8 +5494,8 @@ class GedcomParser(UpdateCallback):
line = self.__get_next_line()
if self.__level_is_finished(line, level):
if skips and self.want_parse_warnings:
msg = _("skipped %d subordinate(s) at line %d")\
% (skips, line.line - skips)
msg = _("skipped %(skip)d subordinate(s) at line %(line)d") % {
'skip' : skips, 'line' : line.line - skips }
self.__warn(msg)
return
skips += 1
@@ -5929,4 +5929,4 @@ def __build_date_string(day, mon, year, bce, mmap):
retval = "(%d %s)" % (day, mmap[mon])
else:
retval = "%d %s %d%s" % (day, mmap[mon], year, bce)
return retval
return retval
+2 -18
View File
@@ -290,31 +290,15 @@ class BasePersonView(ListView):
active_name = _("Delete Person (%s)") % name_displayer.display(person)
# delete the person from the database
# Above will emit person-delete, which removes the person via
# callback to the model, so row delete is signaled
self.dbstate.db.delete_person_from_database(person, trans)
# remove the person from the list
self.remove_from_person_list(person)
# commit the transaction
self.dbstate.db.transaction_commit(trans, active_name)
# select the previously active person, turn off the busy cursor
history = self.uistate.get_history(self.navigation_type(),
self.navigation_group())
history.back()
self.uistate.set_busy_cursor(False)
def remove_from_person_list(self, person):
"""Remove the selected person from the list. A person object is
expected, not an ID"""
node = self.model.get_node(person.get_handle())
path = self.model.on_get_path(node)
(col, row) = path
if row > 0:
self.selection.select_path((col, row))
elif row == 0 and self.model.on_get_iter(path):
self.selection.select_path(path)
def dummy_report(self, obj):
""" For the xml UI definition of popup to work, the submenu
Quick Report must have an entry in the xml
+3 -3
View File
@@ -133,9 +133,9 @@ class EniroSVMapService(MapService):
if (54.55 < latitude < 69.05) and (8.05 < longitude < 24.15):
coord_ok = True
else:
msg2 = _("Latitude not within %s to %s\n") + \
_("Longitude not within %s to %s")
msg2 = msg2 % (54.55, 69.05, 8.05, 24.15)
msg2 = _("Latitude not within %(lat1)s to %(lat2)s\n") + \
_("Longitude not within %(long1)s to %(long2)s")
msg2 = msg2 % {'lat1' : 54.55, 'lat2' : 69.05, 'long1' : 8.05, 'long2' : 24.15 }
WarningDialog(_("Eniro map not available"), msg2 )
return
+2 -3
View File
@@ -95,9 +95,8 @@ def run_fam(database, document, family):
# display the results
sdoc.title(_("Sorted events of family\n %s - %s") %
(sdb.name(sdb.father(family)),
sdb.name(sdb.mother(family))))
sdoc.title(_("Sorted events of family\n %(father)s - %(mother)s") % {
'father' : sdb.name(sdb.father(family)), 'mother' : sdb.name(sdb.mother(family)) })
sdoc.paragraph("")
stab.columns(_("Family Member"), _("Event Type"),
+4 -3
View File
@@ -77,8 +77,8 @@ class AllRelReport():
p1 = self.sdb.name(self.person)
if self.person.handle == self.home_person.handle :
self.sdoc.paragraph(_FMT_VOID % (
_("%s and %s are the same person.") % ( p1, p2))
)
_("%(person)s and %(active_person)s are the same person.")) % {
'person' : p1, 'active_person' : p2 })
return
#check if not a family too:
@@ -203,7 +203,8 @@ class AllRelReport():
"""
p2 = self.sdb.name(self.home_person)
p1 = self.sdb.name(self.person)
self.sdoc.title(_("Relationships of %s to %s") % (p1 ,p2))
self.sdoc.title(_("Relationships of %(person)s to %(active_person)s") % {
'person' : p1 ,'active_person' : p2 })
self.sdoc.paragraph("")
def print_details_header(self, relations, pers1, pers2,
+2 -1
View File
@@ -127,7 +127,8 @@ class SimpleBookTitleOptions(MenuReportOptions):
dateinfo = time.localtime(time.time())
rname = self.__db.get_researcher().get_name()
footer_string = _('Copyright %d %s') % (dateinfo[0], rname)
footer_string = _('Copyright %(year)d %(name)s') % {
'year' : dateinfo[0], 'name' : rname }
footer = StringOption(_('Footer'), footer_string )
footer.set_help(_("Footer string for the page."))
menu.add_option(category_name, "footer", footer)
+5 -2
View File
@@ -158,6 +158,7 @@ class CalcToolManagedWindow(PluginWindows.ToolManagedWindowBatch):
def __init__(self, *args, **kwargs):
PluginWindows.ToolManagedWindowBatch.__init__(self, *args, **kwargs)
if self.fail: return
self.help_page = self.add_page(_("Help"))
self.write_to_page(self.help_page,
_("The Calculate Estimated Dates Tool is used to add and remove "
@@ -443,7 +444,8 @@ class CalcToolManagedWindow(PluginWindows.ToolManagedWindowBatch):
if not birth_ref and add_birth_event:
other_name = self.sdb.name(other)
if other_name:
explanation = _("Added birth event based on %s, from %s") % (evidence, other_name)
explanation = _("Added birth event based on %(evidence)s, from %(name)s") % {
'evidence' : evidence, 'name' : other_name }
else:
explanation = _("Added birth event based on %s") % evidence
modifier = self.get_modifier("birth")
@@ -458,7 +460,8 @@ class CalcToolManagedWindow(PluginWindows.ToolManagedWindowBatch):
if not death_ref and add_death_event:
other_name = self.sdb.name(other)
if other_name:
explanation = _("Added death event based on %s, from %s") % (evidence, other_name)
explanation = _("Added death event based on %(evidence)s, from %(person)s") % {
'evidence' : evidence, 'person' : other_name }
else:
explanation = _("Added death event based on %s") % evidence
modifier = self.get_modifier("death")
+77 -60
View File
@@ -1453,13 +1453,13 @@ class CheckIntegrity(object):
_('The database has passed internal checks'),
parent=uistate.window)
else:
print "No errors were found: the database has passed internal checks."
print("No errors were found: the database has passed internal checks.")
return 0
self.text = cStringIO.StringIO()
if blink > 0:
self.text.write(ngettext("%d broken child/family link was fixed\n", \
"%d broken child-family links were found\n", blink) % blink)
self.text.write(ngettext("%(quantity)d broken child/family link was fixed\n", \
"%(quantity)d broken child-family links were found\n", blink) % { 'quantity' : blink } )
for (person_handle, family_handle) in self.broken_links:
person = self.db.get_person_from_handle(person_handle)
if person:
@@ -1472,11 +1472,13 @@ class CheckIntegrity(object):
except:
pn = _("Unknown")
self.text.write('\t')
self.text.write(_("%s was removed from the family of %s\n") % (cn, pn))
self.text.write(_("%(person)s was removed from the family of %(family)s\n") % {
'person' : cn, 'family' : pn } )
if plink > 0:
self.text.write(ngettext("%d broken spouse/family link was fixed\n", \
"%d broken spouse/family links were found\n", plink) % plink)
self.text.write(ngettext("%(quantity)d broken spouse/family link was fixed\n",
"%(quantity)d broken spouse/family links were found\n", plink) % {
'quantity' : plink })
for (person_handle, family_handle) in self.broken_parent_links:
person = self.db.get_person_from_handle(person_handle)
if person:
@@ -1489,11 +1491,12 @@ class CheckIntegrity(object):
else:
pn = family_handle
self.text.write('\t')
self.text.write(_("%s was restored to the family of %s\n") % (cn, pn))
self.text.write(_("%(person)s was restored to the family of %(family)s\n") % {
'person' : cn, 'family' : pn } )
if slink > 0:
self.text.write(ngettext("%d duplicate spouse/family link was found\n", \
"%d duplicate spouse/family links were found\n", slink) % slink)
self.text.write(ngettext("%(quantity)d duplicate spouse/family link was found\n", \
"%(quantity)d duplicate spouse/family links were found\n", slink) % { 'quantity' : slink })
for (person_handle, family_handle) in self.broken_parent_links:
person = self.db.get_person_from_handle(person_handle)
if person:
@@ -1506,98 +1509,112 @@ class CheckIntegrity(object):
else:
pn = _("None")
self.text.write('\t')
self.text.write(_("%s was restored to the family of %s\n") % (cn, pn))
self.text.write(_("%(person)s was restored to the family of %(family)s\n") % {
'person' : cn, 'family' : pn } )
if efam == 1:
self.text.write(_("%d family with no parents or children found, removed.\n"))
self.text.write("\t%s\n" % self.empty_family[0])
elif efam > 1:
self.text.write(_("%d families with no parents or children, removed.\n") % efam)
self.text.write(_("%(quantity)d families with no parents or children, removed.\n") % {
'quantity' : efam })
if rel:
self.text.write(ngettext("%d corrupted family relationship fixed\n", \
"%d corrupted family relationship fixed\n", rel) % rel )
self.text.write(ngettext("%d corrupted family relationship fixed\n",
"%d corrupted family relationship fixed\n", rel) % rel )
if person_references:
self.text.write(ngettext("%d person was referenced but not found\n", \
"%d persons were referenced, but not found\n", person_references) % person_references)
self.text.write(ngettext("%d person was referenced but not found\n",
"%d persons were referenced, but not found\n",
person_references) % person_references)
if invalid_dates:
self.text.write(ngettext("%d date was corrected\n", \
"%d dates were corrected\n", invalid_dates) % invalid_dates)
self.text.write(ngettext("%d date was corrected\n",
"%d dates were corrected\n",
invalid_dates) % invalid_dates)
if repo_references:
self.text.write(ngettext("%d repository was referenced but not found\n", \
"%d repositories were referenced, but not found\n", repo_references) % repo_references)
self.text.write(ngettext("%(quantity)d repository was referenced but not found\n", \
"%(quantity)d repositories were referenced, but not found\n", repo_references) % {
'quantity' : repo_references })
if photos:
self.text.write(ngettext("%d media object was referenced, but not found\n", \
"%d media objects were referenced, but not found\n", photos) % photos)
self.text.write(ngettext("%(quantity)d media object was referenced, but not found\n", \
"%(quantity)d media objects were referenced, but not found\n", photos) % { 'quantity' : photos })
if bad_photos:
self.text.write(ngettext("Reference to %d missing media object was kept\n", \
"References to %d media objects were kept\n", bad_photos) % bad_photos)
self.text.write(ngettext("Reference to %(quantity)d missing media object was kept\n", \
"References to %(quantity)d media objects were kept\n", bad_photos) % {
'quantity' : bad_photos })
if replaced_photos:
self.text.write(ngettext("%d missing media object was replaced\n", \
"%d missing media objects were replaced\n", replaced_photos) % replaced_photos)
self.text.write(ngettext("%(quantity)d missing media object was replaced\n", \
"%(quantity)d missing media objects were replaced\n", replaced_photos) % {
'quantity' : replaced_photos })
if removed_photos:
self.text.write(ngettext("%d missing media object was removed\n", \
"%d missing media objects were removed\n", removed_photos) % removed_photos)
self.text.write(ngettext("%(quantity)d missing media object was removed\n", \
"%(quantity)d missing media objects were removed\n", removed_photos) % {
'quantity' : removed_photos })
if event_invalid:
self.text.write(ngettext("%d invalid event reference was removed\n", \
"%d invalid event references were removed\n", event_invalid) % event_invalid)
self.text.write(ngettext("%(quantity)d invalid event reference was removed\n", \
"%(quantity)d invalid event references were removed\n", event_invalid) % {
'quantity' : event_invalid })
if birth_invalid:
self.text.write(ngettext("%d invalid birth event name was fixed\n", \
"%d invalid birth event names were fixed\n", birth_invalid) % birth_invalid)
self.text.write(ngettext("%(quantity)d invalid birth event name was fixed\n", \
"%(quantity)d invalid birth event names were fixed\n", birth_invalid) % {
'quantity' : birth_invalid })
if death_invalid:
self.text.write(ngettext("%d invalid death event name was fixed\n", \
"%d invalid death event names were fixed\n", death_invalid) % death_invalid)
self.text.write(ngettext("%(quantity)d invalid death event name was fixed\n", \
"%(quantity)d invalid death event names were fixed\n", death_invalid) % {
'quantity' : death_invalid })
if place_references:
self.text.write(ngettext("%d place was referenced but not found\n", \
"%d places were referenced, but not found\n", place_references) % place_references)
self.text.write(ngettext("%(quantity)d place was referenced but not found\n", \
"%(quantity)d places were referenced, but not found\n", place_references) % {
'quantity' : place_references })
if source_references:
self.text.write(ngettext("%d source was referenced but not found\n", \
"%d sources were referenced, but not found\n", source_references) % source_references)
self.text.write(ngettext("%(quantity)d source was referenced but not found\n", \
"%(quantity)d sources were referenced, but not found\n", source_references) % {
'quantity' : source_references })
if media_references:
self.text.write(ngettext("%d media object was referenced but not found\n", \
"%d media objects were referenced but not found\n", media_references) % media_references)
if note_references:
self.text.write(ngettext("%d note object was referenced but not found\n", \
"%d note objects were referenced but not found\n", note_references) % note_references)
self.text.write(ngettext("%(quantity)d note object was referenced but not found\n", \
"%(quantity)d note objects were referenced but not found\n", note_references) % {
'quantity' : note_references })
if name_format:
self.text.write(ngettext("%d invalid name format reference was removed\n", \
"%d invalid name format references were removed\n", name_format) % name_format)
self.text.write(ngettext("%(quantity)d invalid name format reference was removed\n", \
"%(quantity)d invalid name format references were removed\n", name_format) % {
'quantity' : name_format })
if empty_objs > 0 :
self.text.write(_("%d empty objects removed:\n"
" %d person objects\n"
" %d family objects\n"
" %d event objects\n"
" %d source objects\n"
" %d media objects\n"
" %d place objects\n"
" %d repository objects\n"
" %d note objects\n"
) % (empty_objs,
len(self.empty_objects['persons']),
len(self.empty_objects['families']),
len(self.empty_objects['events']),
len(self.empty_objects['sources']),
len(self.empty_objects['media']),
len(self.empty_objects['places']),
len(self.empty_objects['repos']),
len(self.empty_objects['notes'])
) )
self.text.write(_("%(empty_obj)d empty objects removed:\n"
" %(person)d person objects\n"
" %(family)d family objects\n"
" %(event)d event objects\n"
" %(source)d source objects\n"
" %(media)d media objects\n"
" %(place)d place objects\n"
" %(repo)d repository objects\n"
" %(note)d note objects\n" ) % {
'empty_obj' : empty_objs,
'person' : len(self.empty_objects['persons']),
'family' : len(self.empty_objects['families']),
'event' : len(self.empty_objects['events']),
'source' : len(self.empty_objects['sources']),
'media' : len(self.empty_objects['media']),
'place' : len(self.empty_objects['places']),
'repo' : len(self.empty_objects['repos']),
'note' : len(self.empty_objects['notes']) } )
return errors
+2 -2
View File
@@ -452,8 +452,8 @@ class PathChange(BatchOp):
to_text = unicode(self.to_entry.get_text())
text = _(
'The following action is to be performed:\n\n'
'Operation:\t%s\nReplace:\t\t%s\nWith:\t\t%s'
) % (self.title.replace('_',''), from_text, to_text)
'Operation:\t%(title)s\nReplace:\t\t%(src_fname)s\nWith:\t\t%(dest_fname)s') % {
'title' : self.title.replace('_',''), 'src_fname' : from_text, 'dest_fname' : to_text }
return text
def _prepare(self):
+4 -3
View File
@@ -185,7 +185,8 @@ class RelCalc(Tool.Tool, ManagedWindow.ManagedWindow):
if other_person is None:
pass
elif self.person.handle == other_person.handle:
rstr = _("%s and %s are the same person.") % (p1, p2)
rstr = _("%(person)s and %(active_person)s are the same person.") % {
'person' : p1, 'active_person' : p2 }
text.append((rstr, ""))
elif len(rel_strings) == 0:
rstr = _("%(person)s and %(active_person)s are not related.") % {
@@ -209,8 +210,8 @@ class RelCalc(Tool.Tool, ManagedWindow.ManagedWindow):
p2c = self.db.get_person_from_handle(common[1])
p1str = name_displayer.display(p1c)
p2str = name_displayer.display(p2c)
commontext = " " + _("Their common ancestors are %s and %s."
) % (p1str,p2str)
commontext = " " + _("Their common ancestors are %(ancestor1)s and %(ancestor2)s.") % {
'ancestor1' : p1str, 'ancestor2' : p2str }
elif length > 2:
index = 0
commontext = " " + _("Their common ancestors are: ")
+1
View File
@@ -87,6 +87,7 @@
<object class="GtkComboBoxEntry" id="markercombo">
<property name="visible">True</property>
<property name="model">model1</property>
<property name="text_column">0</property>
<accelerator key="M" signal="grab_focus" modifiers="GDK_MOD1_MASK"/>
<child>
<object class="GtkCellRendererText" id="renderer1"/>
+2 -2
View File
@@ -8,6 +8,8 @@ pkgdatadir = $(datadir)/@PACKAGE@/plugins/view
pkgdata_PYTHON = \
eventview.py \
familyview.py \
fanchartview.gpr.py \
fanchartview.py \
geoview.py \
geoview.gpr.py \
grampletview.py \
@@ -15,8 +17,6 @@ pkgdata_PYTHON = \
mediaview.py \
noteview.py \
pedigreeview.py \
pedigreeviewext.py \
pedigreeviewext.gpr.py \
personlistview.py \
persontreeview.py \
placelistview.py \
+13 -11
View File
@@ -498,11 +498,11 @@ class GeoView(HtmlView):
configdialog.add_text(table,
_("You can adjust the time period with the two following values."), 1)
configdialog.add_pos_int_entry(table,
_('The number of years before the first event date.'),
_('The number of years before the first event date'),
2, 'preferences.timeperiod-before-range',
self.config_update_int)
configdialog.add_pos_int_entry(table,
_('The number of years after the last event date.'),
_('The number of years after the last event date'),
3, 'preferences.timeperiod-after-range',
self.config_update_int)
@@ -547,7 +547,7 @@ class GeoView(HtmlView):
_('Test the network '),
1, 'preferences.network-test')
configdialog.add_pos_int_entry(table,
_('Time out for the network connection test '),
_('Time out for the network connection test'),
2, 'preferences.network-timeout',
self.config_update_int)
configdialog.add_pos_int_entry(table,
@@ -640,7 +640,7 @@ class GeoView(HtmlView):
"""
prefix = widget.get_text().lower()
count = 0
found = "inconnu"
found = _("Unknown")
if event.keyval == KEY_TAB:
for place in self.plist:
if prefix in place[0].lower():
@@ -918,9 +918,12 @@ class GeoView(HtmlView):
latitude, longitude = conv_lat_lon(self.reallatitude,
self.reallongitude,
"D.D8")
mess = "lon= %s \tlat= %s\tzoom= %s" % ( latitude,
longitude,
self.realzoom)
mess = "%s= %s\t%s= %s\t%s= %s" % ( _("Latitude"),
latitude,
_("Longitude"),
longitude,
_("Zoom"),
self.realzoom)
self.context_id = self.uistate.status.push(1, mess)
gobject.timeout_add(timeloop,
self._savezoomandposition, timeloop)
@@ -1022,6 +1025,7 @@ class GeoView(HtmlView):
<separator/>
<menuitem action="AddPlaceMenu"/>
<menuitem action="LinkPlaceMenu"/>
<menuitem action="FilterEdit"/>
</menu>
</menubar>
<toolbar name="ToolBar">
@@ -1089,9 +1093,8 @@ class GeoView(HtmlView):
self._add_action('EventMapsMenu', 'geo-show-event', _('_Event'),
callback=self._event_places,
tip=_("Attempt to view places connected to all events."))
self._add_toggle_action('Filter', None, _('_Filter Sidebar'),
callback=self.filter_toggle_action,
value=config.get('interface.filter'))
self._add_toggle_action('FilterEdit', None, _('_Filter Sidebar'),
callback=self.filter_toggle_action)
config.connect('interface.filter', self.filter_toggle)
def go_back(self, button): # pylint: disable-msg=W0613
@@ -2249,7 +2252,6 @@ class GeoView(HtmlView):
self.filter.hide()
active = False
config.set('interface.filter', active)
self.build_tree()
def filter_clicked(self):
"""
+36 -32
View File
@@ -32,8 +32,9 @@ Media View.
from gen.ggettext import gettext as _
import urlparse
import os
import sys
import cPickle as pickle
import urllib
#-------------------------------------------------------------------------
#
# GTK/Gnome modules
@@ -146,12 +147,14 @@ class MediaView(ListView):
dnd_types = [ self._DND_TYPE.target() ]
self.list.drag_dest_set(gtk.DEST_DEFAULT_ALL, dnd_types,
gtk.gdk.ACTION_COPY)
self.list.drag_dest_set(gtk.DEST_DEFAULT_MOTION|gtk.DEST_DEFAULT_DROP,
dnd_types,
gtk.gdk.ACTION_MOVE|gtk.gdk.ACTION_COPY)
self.list.drag_source_set(gtk.gdk.BUTTON1_MASK,
[self._DND_TYPE.target()],
gtk.gdk.ACTION_COPY)
self.list.connect('drag_data_get', self.drag_data_get)
#connected in listview already
#self.list.connect('drag_data_get', self.drag_data_get)
self.list.connect('drag_data_received', self.drag_data_received)
def drag_data_get(self, widget, context, sel_data, info, time):
@@ -193,35 +196,36 @@ class MediaView(ListView):
If the selection data is define, extract the value from sel_data.data,
and decide if this is a move or a reorder.
The only data we accept on mediaview is dropping a file, so URI_LIST.
We assume this is what we obtain
"""
if sel_data and sel_data.data:
cleaned_string = sel_data.data.replace('\0', ' ')
cleaned_string = cleaned_string.replace("\r", " ").strip()
data_list = Utils.fix_encoding(cleaned_string).split('\n')
for d in [item.strip() for item in data_list]:
protocol, site, mfile, j, k, l = urlparse.urlparse(d)
if protocol == "file":
name = Utils.fix_encoding(mfile)
mime = gen.mime.get_type(name)
if not gen.mime.is_valid_type(mime):
return
photo = gen.lib.MediaObject()
#If in Windows, the url from urlparse.urlparse(d) above is incorrect
# It leaves a "/" first in the url and this is not a valid Windows path/file name.
if constfunc.win():
if name[0] == "/":
name = name[1:]
# Then replace all %20 with a space
name = name.replace('%20',' ')
photo.set_path(name)
photo.set_mime_type(mime)
basename = os.path.basename(name)
(root, ext) = os.path.splitext(basename)
photo.set_description(root)
trans = self.dbstate.db.transaction_begin()
self.dbstate.db.add_object(photo, trans)
self.dbstate.db.transaction_commit(trans,
_("Drag Media Object"))
if not sel_data:
return
#modern file managers provide URI_LIST. For Windows split sel_data.data
if constfunc.win():
files = sel_data.data.split('\n')
else:
files = sel_data.get_uris()
for file in files:
clean_string = Utils.fix_encoding(
file.replace('\0',' ').replace("\r", " ").strip())
protocol, site, mfile, j, k, l = urlparse.urlparse(clean_string)
if protocol == "file":
name = unicode(urllib.url2pathname(
mfile.encode(sys.getfilesystemencoding())))
mime = gen.mime.get_type(name)
if not gen.mime.is_valid_type(mime):
return
photo = gen.lib.MediaObject()
photo.set_path(name)
photo.set_mime_type(mime)
basename = os.path.basename(name)
(root, ext) = os.path.splitext(basename)
photo.set_description(root)
trans = self.dbstate.db.transaction_begin()
self.dbstate.db.add_object(photo, trans)
self.dbstate.db.transaction_commit(trans,
_("Drag Media Object"))
widget.emit_stop_by_name('drag_data_received')
def get_bookmarks(self):
-43
View File
@@ -1,43 +0,0 @@
# encoding:utf-8
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2009 Benny Malengier
#
# 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
#
# $Id$
#------------------------------------------------------------------------
#
# default views of Gramps
#
#------------------------------------------------------------------------
register(VIEW,
id = 'pedigreeviewext',
name = _("Pedigree View"),
description = _("The view showing an ancestor pedigree of the selected person"),
version = '1.0',
gramps_target_version = '3.2',
status = STABLE,
fname = 'pedigreeviewext.py',
authors = [u"The Gramps project"],
authors_email = ["http://gramps-project.org"],
category = ("Ancestry", _("Ancestry")),
viewclass = 'PedigreeViewExt',
order = START,
)
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -1,7 +1,7 @@
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2001-2007 Donald N. Allingham
# Copyright (C) 2009 Gary Burton
# Copyright (C) 2009-2010 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
@@ -568,7 +568,7 @@ class RelationshipView(NavigationView):
fmt = '<span size="larger" weight="bold">%s</span>'
text = fmt % cgi.escape(name)
label = widgets.DualMarkupLabel(text, _GenderCode[person.gender],
x_align=1, y_align=0)
x_align=1)
if self._config.get('preferences.releditbtn'):
button = widgets.IconButton(self.edit_button_press,
person.handle)
+4 -4
View File
@@ -1268,7 +1268,7 @@ class BasePage(object):
# TODO. Check if build_url_fname can be used.
newpath = "/".join(['..']*3 + [newpath])
if ( constfunc.win ):
if constfunc.win():
newpath = newpath.replace('\\',"/")
# begin hyperlink
@@ -1346,7 +1346,7 @@ class BasePage(object):
real_path, newpath = self.report.prepare_copy_media(photo)
# TODO. Check if build_url_fname can be used.
newpath = "/".join(['..']*3 + [newpath])
if ( constfunc.win ):
if constfunc.win():
newpath = newpath.replace('\\',"/")
# begin hyperlink
@@ -3628,7 +3628,7 @@ class IndividualPage(BasePage):
if mime_type:
(photoUrl, thumbnailUrl) = self.report.prepare_copy_media(photo)
thumbnailUrl = "/".join(['..']*3 + [thumbnailUrl])
if ( constfunc.win ):
if constfunc.win():
thumbnailUrl = thumbnailUrl.replace('\\',"/")
url = self.report.build_url_fname_html(person.handle, "ppl", True)
boxbg += self.person_link(url, person, name_style = True,
@@ -5441,7 +5441,7 @@ class NavWebReport(Report):
if up:
subdirs = ['..']*3 + subdirs
nname = "/".join(subdirs + [fname])
if ( constfunc.win ):
if constfunc.win():
nname = nname.replace('\\',"/")
return nname