Compare commits
100 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 905ac154d3 | |||
| ac29b091a7 | |||
| 1a618c3a2e | |||
| c731c68ec5 | |||
| ab80af602c | |||
| 4caa412a06 | |||
| 49ec2e1244 | |||
| 63dc1ddff8 | |||
| b9c3b077e8 | |||
| 8c9333b58d | |||
| fd22effab3 | |||
| 5e5e92ac9a | |||
| 7fac5c6607 | |||
| fa26216839 | |||
| 9032c0a37d | |||
| fb6a2cecf2 | |||
| 90de5dffec | |||
| 8ec10c067f | |||
| 84be6de6ab | |||
| 0b88c61421 | |||
| d943e122a8 | |||
| fc08e7de4e | |||
| a04c8dc497 | |||
| 66c943f69d | |||
| 0ad17ac27f | |||
| 01536e4b50 | |||
| 811261609f | |||
| cba763611d | |||
| 56de5ff4af | |||
| 928a0af713 | |||
| 913fdd071c | |||
| 22a27e9707 | |||
| 2142118832 | |||
| fabd5742fc | |||
| 7a3da35543 | |||
| c0c165d155 | |||
| 030ffd8226 | |||
| 4964461fa4 | |||
| 42c4662329 | |||
| d3eafc00db | |||
| a2030431c0 | |||
| 56f867d783 | |||
| 5a752205b3 | |||
| 6e87ee433c | |||
| 70806f2388 | |||
| b8b186dde2 | |||
| d10c4faffe | |||
| 8bff04729f | |||
| 9cddf3ebdb | |||
| c089eba1c3 | |||
| a94f3100df | |||
| 5d341a684e | |||
| 26723c1b60 | |||
| de7430eeb8 | |||
| 89ffc6b4cc | |||
| a18120f17d | |||
| 2846fc7dc5 | |||
| e6c5232ae8 | |||
| e7ab8b322b | |||
| fde34bb53b | |||
| 60c0843861 | |||
| 2ae2ca5c7d | |||
| 9747d1deea | |||
| e52d0a7a90 | |||
| eefd3e13e4 | |||
| 918317434f | |||
| 8dfc5381cd | |||
| 6511a80b47 | |||
| a5074e9478 | |||
| b90808525c | |||
| fedfabc87e | |||
| 891b9d2e34 | |||
| 3b0579afc3 | |||
| 5e763026a4 | |||
| de706de317 | |||
| b884dc0e4c | |||
| aaba2ec347 | |||
| bdd44b57fd | |||
| 8deb444a6c | |||
| ca3158a6ff | |||
| 53a9cfc83f | |||
| 92fc8f8dcb | |||
| 7a488c2fd4 | |||
| 98ff7693f3 | |||
| 6b7258dfe0 | |||
| aceee07544 | |||
| 9e670d51bd | |||
| 8e97b25f38 | |||
| 6aeeafe74d | |||
| 4189799d45 | |||
| 5bfe514f45 | |||
| aa35dbfb82 | |||
| 784ab0c3c7 | |||
| 5847bb0e17 | |||
| 08ac0b0996 | |||
| c38ccf22ed | |||
| 1866b7ace1 | |||
| 27b7676caa | |||
| c273926941 | |||
| ba8392923a |
+1
-1
@@ -8,7 +8,7 @@ language: c
|
||||
# - 3.4
|
||||
|
||||
install:
|
||||
- git clone --depth=50 --branch=master git://github.com/gramps-project/gramps.git gramps-project/gramps
|
||||
- git clone --depth=50 --branch=maintenance/gramps42 git://github.com/gramps-project/gramps.git gramps-project/gramps
|
||||
- cd gramps-project/gramps
|
||||
- time sudo apt-get update
|
||||
- travis_retry sudo apt-get install gir1.2-pango gir1.2-gtk xdg-utils librsvg2-common libglib2.0-dev intltool
|
||||
|
||||
@@ -91,12 +91,6 @@ alternative location on windows, supply the --root argument to setup.py
|
||||
|
||||
For example:
|
||||
python setup.py install --root ~/test
|
||||
or
|
||||
python setup.py install --root ~/test --enable-packager-mode
|
||||
|
||||
The last option, --enable-packager-mode, is needed if you want to disable
|
||||
execution of post-install mime processing. If you don't have root/admin
|
||||
access, this will be needed
|
||||
|
||||
Packager's issues
|
||||
------------------
|
||||
@@ -104,3 +98,9 @@ There is a MANIFEST.in file to indicate the work needed.
|
||||
To create a source distribution run:
|
||||
|
||||
python setup.py sdist
|
||||
|
||||
If Gramps is built outside of the source tree in a temporary location (e.g. when
|
||||
packaging for a distribution), the --resourcepath option can be used to specify
|
||||
the path to the installed location of the Gramps resources (e.g. /usr/share):
|
||||
|
||||
python setup.py install --resourcepath=/usr/share
|
||||
|
||||
@@ -1,3 +1,226 @@
|
||||
Version 4.2.0,
|
||||
* New date and language fields on place name
|
||||
* Review on GtkBuilder, fix some Gtk3 warnings and move from deprecated methods
|
||||
* Change icons and buttons handling methods
|
||||
* Enhanced Place Editor and new Place Name editor
|
||||
* New widget: use own interactive-search
|
||||
* Ability to import kml data into Geography views
|
||||
* Enhancement for removing multiple selected items from Views (action group)
|
||||
* Add drag support on more Views, Selectors and Editors
|
||||
* Add right-click "Copy all" to ListModel and all QuickTables
|
||||
* Review Alternate Place handling and edition
|
||||
* New 'Place' configuration keys set by user (settings)
|
||||
* New filter rule: is enclosed by
|
||||
* Consistency on Privacy option for reports
|
||||
* Consistency on "Name-format" options for reports
|
||||
* Add DeferredFilter class (a subclass of GenericFilter)
|
||||
* New textual Report: Links on Notes
|
||||
* Fix alphabetic index and toc bug in books
|
||||
* Enhancements on Style Editor
|
||||
* Enhancements on End Notes into textual reports
|
||||
* Changes on Individuals complete textual report
|
||||
* Changes on Ancestors Tree draw report: Include Siblings
|
||||
* Add name-format option, and deferred translation on Records report
|
||||
* Add deferred translation on Timeline draw report
|
||||
* Enable attributes gramplet on Source and Citation Views
|
||||
* New place locations gramplet
|
||||
* Optimizations around index, Flat and TreeView models
|
||||
* Enhanced samples files
|
||||
* All importers return now an ImportInfo object
|
||||
* Experimental gwplus (geneweb) import file format support
|
||||
* Remove experimental HTML renderer view
|
||||
* New test scripts
|
||||
* New Date handler for Japanese
|
||||
* Review on Slovenian and Czech Date Handlers
|
||||
* Implement both "traditional" and "simplfied" Chinese (translations and dates)
|
||||
* Serbian review
|
||||
|
||||
2015-05-01
|
||||
Version 4.1.3, "Thou shalt not count to five", a maintenance release.
|
||||
* Fix db upgrade failure
|
||||
* GtkDialog mapped without a transient parent
|
||||
* [Gedcom} SUBN and SUBM record handling
|
||||
* [Gedcom] Import/export round trip causes lost information
|
||||
* [Gedcom] Entering a witness to an event such as marriage might be ignored
|
||||
* [Gedcom] Gramps can't import estim. date period exported by itself
|
||||
* [Gedcom] 1/4 and 1/2 ANSEL characters not supported on importing ANSEL
|
||||
* [Gedcom] Importing file containing multibyte UTF-8 characters fails
|
||||
* [Gedcom] Import fails for ANSI file under python 3
|
||||
* [Gedcom] Failure importing ANSEL encoded gedcom file.
|
||||
* [Gedcom] Characters ignored on a Gedcom encoded ANSI (cp1252 West Europe, USA)
|
||||
* [Gedcom] NameError in importer
|
||||
* [Gedcom] Event address is lost on import, i.e. disconnected from event
|
||||
* Crash on geneweb export with python3
|
||||
* GuiColorOption missing avail-changed event handler
|
||||
* Bad generation of [timeline report] ODT files since 4.0.0
|
||||
* Fix bad handle in explanation note for unknown event
|
||||
* Fix spurious generation of empty 'Alternative Name' in place.merge()
|
||||
* Support creating directories in various scenarios
|
||||
* Attempting to add a bookmark causes an error
|
||||
* Long series of "unhandled exception" popup boxes while doing a check & repair
|
||||
* Crash when trying to link existing place as an enclosing place using P0001 number
|
||||
* HTML view fails to load
|
||||
* Relationship Graph crashes
|
||||
* Python3 needs new_subpixbuf not subpixbuf
|
||||
* Regression: running gramps from crontab fails
|
||||
* tag_map is not initialized
|
||||
* Some labels now fit better on citations sidebar filter
|
||||
* Event columns in web narrative are too narrow
|
||||
* Problem by start program (launcher)
|
||||
* Translation string missing in Not Related tool for help and close button
|
||||
* Date format month/year is not well reported at editing time [in Italian]
|
||||
* Fix unknown gender relationships handler for the french locale
|
||||
* Fix a handle type bug on sidebar filter
|
||||
* Tidy up About dialog
|
||||
* Cleanup on some man files
|
||||
* Convert some remaining unicode literals
|
||||
* Fix mac menubar setting
|
||||
* Enable python3 to run po/update_po.py
|
||||
* Updated translations: cs, de, fr, is, nl
|
||||
|
||||
2015-02-28
|
||||
Version 4.1.2, "That's no ordinary rabbit", a maintenance release.
|
||||
* Error converting python2 utf-8 strings to python3 str when loading data from database
|
||||
* Removing a parent place from a place leaves a dangling reference
|
||||
* Error during checking the database
|
||||
* Stubborn blank space in database won't be removed, fix removing rows in flat list views
|
||||
* Database upgrade fails if default media path is not set
|
||||
* Error converting database after upgrade to Gramps 4.1.1
|
||||
* Error in a single place within the places section
|
||||
* Entries from the add-or-choose selector of Place/Source/Media/Note cannot be dragged
|
||||
* Enclosing places tab should work like other similar tabs, new place reference editor
|
||||
* Association editor refuses dropped persons
|
||||
* Error on opening twice an object from clipboard
|
||||
* Incorrect spacing in export assistant file chooser
|
||||
* New Event types are saved as a disordered list
|
||||
* Always display main participants
|
||||
* Place titles can now be generated on-the-fly by a place displayer, default is still to use the place title field
|
||||
* GEDCOM import of embedded notes attached to media does not work
|
||||
* Crash on Ancestry.com .ged import; consistent.
|
||||
* Errors handling owner/submitter information in GEDCOM files.
|
||||
Only import researcher from GEDCOM or XML if the family tree was originally empty.
|
||||
* GEDCOM export does not export media attached to citations.
|
||||
* The fanchart view crashes if max generation is set to 1 away.
|
||||
* Sidebar Filters do not match placetypes in new placeview, two new filter rules (HasTitle, HasData)
|
||||
* Fix bug when family has no parents
|
||||
* Fix bad handle in explanation note for unknown event
|
||||
* Some labels now fit better on citations sidebar filter
|
||||
* Views in Geography should not always use the last option set by the user
|
||||
* Request for keyboard-controlled zoom on Geography view
|
||||
* Error geography view - Displaying main menu
|
||||
* Configure screen needs a file selector to select directory for "offline mode" files
|
||||
* Filter panel on geography view displays improperly
|
||||
* Detailed descendant report crashes, bibliography (citations)
|
||||
* Can't disable box shadow in SVG descendant tree
|
||||
* Descendant tree graphical report, syntax error in svg output
|
||||
* Regression: Complete Individual report has partially-untranslated output
|
||||
* Events Page in Narrative Report not working
|
||||
* Gramps freeze after defining a report style with German cm values
|
||||
* Various problems with docgen.TextDoc.add_media_object
|
||||
* Report event attribute name is not translated
|
||||
* Records Gramplet uses wrong text
|
||||
* Closing detached gramplet causes python to crash
|
||||
* Cannot reduce size of gramplets detached from a gramplet bar
|
||||
* Gramplets don't fill window when detached from dashboard
|
||||
* ImageMetadata doesn't show metadata
|
||||
* typo on GLib call, used by an addon only
|
||||
* Fix error setting gramplet tab label
|
||||
* Check for active person in session log gramplet
|
||||
* Spurious spaces in CLI List Family Trees, tab delimited output.
|
||||
Print statements changed to assemble the whole line before output.
|
||||
* Gtk3 warning and custom undoableentry widget, see bugzilla_id 644927
|
||||
* Warnings: deprecated Gtk properties and errors loading theme icon.
|
||||
Fix: database manager dialog is inconsistent for older gtk+3 versions.
|
||||
Warnings: deprecated Gtk properties and errors loading theme icon.
|
||||
Fix: Error loading theme icon 'gtk-apply'
|
||||
* gramps fails to start with gtk+-3.13.3
|
||||
* Places in data.gramps are not in the new Place hierarchy
|
||||
* Upgrade the version of some dependencies for Mac OS and Windows OS.
|
||||
* Keywords entry in gramps.desktop does not work
|
||||
* 'Available Gramps Updates for Addons' window not on top
|
||||
* Some text not translatable in context menu fancharts
|
||||
* Fix for Unit test
|
||||
* date inflections in _datehandler.py, update for Ukrainian, Russian, Croatian
|
||||
* Better support for Serbian and Turkish locales
|
||||
* New translation: Icelandic
|
||||
* Re-enable Turkish support after a major review. Thank you Uğur.
|
||||
* Updated translations: cs, de, eo, fi, fr, hr, hu, it, nb, nn, ru, sk, sr, sv, uk, zh_CN
|
||||
|
||||
2014-10-24
|
||||
Version 4.1.1, "MachineThatGoes...Ping!", a maintenance release.
|
||||
* Fix custom place types in the place editor
|
||||
* Allow place type combobox to receive focus.
|
||||
* Store custom place types in the metadata table
|
||||
* Fix place type for places without a main location
|
||||
* Fix bug adding parent places to a new place
|
||||
* Prevent user creating a cycle in the place hierarchy
|
||||
* Avoid infinite loop when place cycle encountered
|
||||
* Prevent creation of a place cycle when merging
|
||||
* Fix error when no place is selected
|
||||
* Check that a place has been selected when saving.
|
||||
* Use the standard place selection widget to be consistent.
|
||||
* Add a new Top Level place through the Place Reference Editor
|
||||
* Fix backlinks code in place report
|
||||
* Backlinks for places can now also be places as well as events.
|
||||
* Fix check and repair tool for empty placerefs
|
||||
* Update location utilities to work with proxies
|
||||
* Place report does not run
|
||||
* Update place details gramplet
|
||||
* Locations are now displayed in a new separate gramplet.
|
||||
* Add check for empty handle in gramplets
|
||||
* Check DB lock on the recent opened trees list
|
||||
* Sidebarfilter gramplet does not fit well into People, Events or Media views
|
||||
* Fix new event default type considering existing events with *default* role
|
||||
* Rebuild secondary indexes after database upgrade
|
||||
* Importing gedcom files containing multibyte UTF-8 characters fails
|
||||
* Ahnentafel Report did not use Christening Date if no Birth Date
|
||||
* [Narweb:] Missing webpage for media under some circumstances
|
||||
* Fix narrated web report with gendex option enabled
|
||||
* Tweak to "default" CSS choice for the narrated web report
|
||||
* Invalid link for Merge citation Help button
|
||||
* Fix 'todo' gramplet
|
||||
* Fix path when using drag & drop to add media
|
||||
* Limit the number of generations displayed in the ancestor gramplet
|
||||
* Export of a subset of the tree failed
|
||||
* Fix issues in python3, and bytes-string mismatch with ICU
|
||||
* Fix url/uri handling with non-ascii characters under linux and mac
|
||||
* Fix name format on graphical reports
|
||||
* Fix name format on textual reports
|
||||
* Better GUI support for embeded custom attributes list on media object
|
||||
* Better keys for search under linux shells (.desktop file)
|
||||
* 'Unknown' person in detailed ancestor report can not be translated
|
||||
* Translations don't show in many labels
|
||||
* Ensure python text domain gets the right encoding.
|
||||
* Translate some punctuation marks
|
||||
* Various fixes around Geography and osmgpsmap
|
||||
* Allow gramplets to be displayed in the dashboard only
|
||||
* Update FSF address
|
||||
* Add Arabic-script, Islamic-date, Thai script, Married Name and more dates examples
|
||||
* Fix on czech date handler for calculated and estimated dates
|
||||
* Enhance Serbian date handler to handle Cyrillic dates
|
||||
* Simplify Canadian Ash Wednesday holiday
|
||||
* Re-enable Esperanto support (for non-Windows OS only) after a large review
|
||||
* New translation: Serbian
|
||||
* Various fixes in German and Czech
|
||||
* Updated translations: ar, cs, de, fi, fr, it, sv
|
||||
|
||||
2014-06-15
|
||||
Version 4.1.0, the "Name go in book", new major release.
|
||||
* GEP 006: Better Place handling
|
||||
* New Tags support on Event, Place, Repository, Source, and Citation
|
||||
* Source/Citation Data becomes Attributes
|
||||
* Add optional support for checksum on Media object
|
||||
* New place hierarchies model
|
||||
* By default, you can choose navigator modes with a drop down.
|
||||
* New Place editor
|
||||
* Enhanced MediaReference Editor
|
||||
* Some debug tools move to new gramplets
|
||||
* Full Python 3 support
|
||||
* New functions and widgets related to Place and Media selections
|
||||
* Enhancements on to_struct()
|
||||
* New methods on Date handlers
|
||||
* Better support on translation for inflection rules
|
||||
|
||||
2014-05-22
|
||||
Version 4.0.4, "Not the comfy chair", a maintenance release.
|
||||
* Upgrade to db version 17 fails in Python 3 due to use of iteritems
|
||||
|
||||
+6
-29
@@ -1,36 +1,13 @@
|
||||
$Id$
|
||||
Major enhancements in Gramps 4.2.0:
|
||||
|
||||
UNSTABLE Gramps 4.0.0 Beta2 release.
|
||||
* GEP 36: GEPS 036: Extended Alternative Place Name Handling:
|
||||
https://gramps-project.org/wiki/index.php?title=GEPS_036:_Extended_Alternative_Place_Name_Handling
|
||||
|
||||
This is a technology preview to allow distribution packagers (and plugin
|
||||
writers) to update their scripts (and plugins). This release is not
|
||||
production ready, so only use it for testing!
|
||||
* GEP interactive search: own interactive-search box.
|
||||
|
||||
It is recommended that Gramps 4.0.0 be used with python 2.7 since many
|
||||
dependent packages do not yet have python 3 versions. A determined person
|
||||
can probably download their sources and build them, however.
|
||||
|
||||
The dependencies for Gramps 4.0.0 are _completely_ different than 3.4 due
|
||||
to the switch to GObject introspection, and the removal of autotools. So
|
||||
only install 4.0.0 if you are certain you can obtain the dependencies,
|
||||
see README and INSTALL.
|
||||
|
||||
For linux, in Ubuntu 12.10 you can install 4.0.0, but you will need to
|
||||
compile and install osmgpsmap manually to have the maps working (see
|
||||
http://www.gramps-project.org/wiki/index.php?title=GEPS_029:_GTK3-GObject_introspection_Conversion#OsmGpsMap_for_Geography )
|
||||
|
||||
|
||||
Major enhancements in Gramps 4.0.0:
|
||||
|
||||
* GEP 8: code reorganization: http://www.gramps-project.org/wiki/index.php?title=GEPS_008:_File_Organization
|
||||
|
||||
* GEP 26: Replace make: http://www.gramps-project.org/wiki/index.php?title=GEPS_026:_Replace_%27make%27_for_Gramps_build
|
||||
|
||||
* GEP 29: Gtk 3 :http://www.gramps-project.org/wiki/index.php?title=GEPS_029:_GTK3-GObject_introspection_Conversion
|
||||
|
||||
* GEP 31: Python 3 support: http://www.gramps-project.org/wiki/index.php?title=GEPS_031:_Python_3_support
|
||||
* Speedup on Tree and Flat Views
|
||||
|
||||
More info in the manual
|
||||
http://www.gramps-project.org/wiki/index.php?title=Gramps_4.0_Wiki_Manual_-_What%27s_new%3F
|
||||
http://www.gramps-project.org/wiki/index.php?title=Gramps_4.2_Wiki_Manual_-_What%27s_new%3F
|
||||
|
||||
Everybody is invited to update the manual to make it current!
|
||||
|
||||
+19
-10
@@ -25,15 +25,15 @@
|
||||
-->
|
||||
|
||||
<!--
|
||||
This is the Document Type Definition file for v1.6.0
|
||||
This is the Document Type Definition file for v1.7.1
|
||||
of the GRAMPS XML genealogy data format.
|
||||
Please use the following formal public identifier to identify it:
|
||||
|
||||
"-//GRAMPS//DTD GRAMPS XML V1.6.0//EN"
|
||||
"-//GRAMPS//DTD GRAMPS XML V1.7.1//EN"
|
||||
|
||||
For example:
|
||||
<!DOCTYPE database PUBLIC "-//GRAMPS//DTD GRAMPS XML V1.6.0//EN"
|
||||
"http://gramps-project.org/xml/1.6.0/grampsxml.dtd"
|
||||
<!DOCTYPE database PUBLIC "-//GRAMPS//DTD GRAMPS XML V1.7.1//EN"
|
||||
"http://gramps-project.org/xml/1.7.1/grampsxml.dtd"
|
||||
[...]>
|
||||
-->
|
||||
|
||||
@@ -62,7 +62,7 @@ DATABASE
|
||||
<!ELEMENT database (header, name-formats?, tags?, events?, people?, families?,
|
||||
citations?, sources?, places?, objects?, repositories?,
|
||||
notes?, bookmarks?, namemaps?)>
|
||||
<!ATTLIST database xmlns CDATA #FIXED "http://gramps-project.org/xml/1.6.0/">
|
||||
<!ATTLIST database xmlns CDATA #FIXED "http://gramps-project.org/xml/1.7.1/">
|
||||
|
||||
|
||||
<!-- ************************************************************
|
||||
@@ -122,6 +122,7 @@ GENDER has values of M, F, or U.
|
||||
|
||||
<!ELEMENT name (first?, call?, surname*, suffix?, title?, nick?, familynick?, group?,
|
||||
(daterange|datespan|dateval|datestr)?, noteref*, citationref*)>
|
||||
<!-- (Unknown|Also Know As|Birth Name|Married Name|Other Name) -->
|
||||
<!ATTLIST name
|
||||
alt (0|1) #IMPLIED
|
||||
type CDATA #IMPLIED
|
||||
@@ -138,6 +139,8 @@ GENDER has values of M, F, or U.
|
||||
<!ELEMENT familynick (#PCDATA)>
|
||||
<!ELEMENT group (#PCDATA)>
|
||||
<!ELEMENT surname (#PCDATA)>
|
||||
<!-- (Unknown|Inherited|Given|Taken|Patronymic|Matronymic|Feudal|
|
||||
Pseudonym|Patrilineal|Matrilineal|Occupation|Location) -->
|
||||
<!ATTLIST surname
|
||||
prefix CDATA #IMPLIED
|
||||
prim (1|0) #IMPLIED
|
||||
@@ -196,12 +199,13 @@ FAMILY
|
||||
<!ELEMENT mother EMPTY>
|
||||
<!ATTLIST mother hlink IDREF #REQUIRED>
|
||||
|
||||
<!-- (None|Birth|Adopted|Stepchild|Sponsored|Foster|Other|Unknown) -->
|
||||
<!ELEMENT childref (citationref*,noteref*)>
|
||||
<!ATTLIST childref
|
||||
hlink IDREF #REQUIRED
|
||||
priv (0|1) #IMPLIED
|
||||
mrel (None|Birth|Adopted|Stepchild|Sponsored|Foster|Other|Unknown) #IMPLIED
|
||||
frel (None|Birth|Adopted|Stepchild|Sponsored|Foster|Other|Unknown) #IMPLIED
|
||||
mrel CDATA #IMPLIED
|
||||
frel CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT type (#PCDATA)>
|
||||
@@ -248,20 +252,25 @@ PLACES
|
||||
|
||||
<!ELEMENT places (placeobj)*>
|
||||
|
||||
<!ELEMENT placeobj (ptitle?, code?, alt_name*, coord?, placeref*, location*,
|
||||
<!ELEMENT placeobj (ptitle?, pname+, code?, coord?, placeref*, location*,
|
||||
objref*, url*, noteref*, citationref*, tagref*)>
|
||||
<!ATTLIST placeobj
|
||||
id CDATA #IMPLIED
|
||||
handle ID #REQUIRED
|
||||
priv (0|1) #IMPLIED
|
||||
change CDATA #REQUIRED
|
||||
name CDATA #REQUIRED
|
||||
type CDATA #REQUIRED
|
||||
>
|
||||
|
||||
<!ELEMENT pname (daterange|datespan|dateval|datestr)?>
|
||||
|
||||
<!ATTLIST pname
|
||||
lang CDATA #IMPLIED
|
||||
value CDATA #REQUIRED
|
||||
>
|
||||
|
||||
<!ELEMENT ptitle (#PCDATA)>
|
||||
<!ELEMENT code (#PCDATA)>
|
||||
<!ELEMENT alt_name (#PCDATA)>
|
||||
|
||||
<!ELEMENT coord EMPTY>
|
||||
<!ATTLIST coord
|
||||
|
||||
+14
-35
@@ -25,13 +25,13 @@
|
||||
-->
|
||||
|
||||
<!--
|
||||
This is the RELAX NG schema for the Gramps XML genealogy data format.
|
||||
This is the RELAX NG schema for the GRAMPS XML genealogy data format.
|
||||
-->
|
||||
|
||||
|
||||
<grammar
|
||||
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
|
||||
ns="http://gramps-project.org/xml/1.6.0/"
|
||||
ns="http://gramps-project.org/xml/1.7.1/"
|
||||
xmlns="http://relaxng.org/ns/structure/1.0">
|
||||
|
||||
<start><element name="database">
|
||||
@@ -210,16 +210,7 @@
|
||||
</define>
|
||||
|
||||
<define name="child-rel">
|
||||
<choice>
|
||||
<value>Birth</value>
|
||||
<value>Adopted</value>
|
||||
<value>Stepchild</value>
|
||||
<value>Sponsored</value>
|
||||
<value>Foster</value>
|
||||
<value>None</value>
|
||||
<value>Other</value>
|
||||
<value>Unknown</value>
|
||||
</choice>
|
||||
<text/>
|
||||
</define>
|
||||
|
||||
<define name="name-content">
|
||||
@@ -230,13 +221,7 @@
|
||||
<optional><attribute name="priv">
|
||||
<ref name="priv-content"/>
|
||||
</attribute></optional>
|
||||
<optional><attribute name="type"><choice>
|
||||
<value>Unknown</value>
|
||||
<value>Also Known As</value>
|
||||
<value>Birth Name</value>
|
||||
<value>Married Name</value>
|
||||
<value>Other Name</value>
|
||||
</choice></attribute></optional>
|
||||
<optional><attribute name="type"><text/></attribute></optional>
|
||||
<optional><attribute name="sort"><text/></attribute></optional>
|
||||
<optional><attribute name="display"><text/></attribute></optional>
|
||||
<optional><element name="first"><text/></element></optional>
|
||||
@@ -265,20 +250,7 @@
|
||||
<value>1</value>
|
||||
<value>0</value>
|
||||
</choice></attribute></optional>
|
||||
<optional><attribute name="derivation"><choice>
|
||||
<value>Unknown</value>
|
||||
<value>Inherited</value>
|
||||
<value>Given</value>
|
||||
<value>Taken</value>
|
||||
<value>Patronymic</value>
|
||||
<value>Matronymic</value>
|
||||
<value>Feudal</value>
|
||||
<value>Pseudonym</value>
|
||||
<value>Patrilineal</value>
|
||||
<value>Matrilineal</value>
|
||||
<value>Occupation</value>
|
||||
<value>Location</value>
|
||||
</choice></attribute></optional>
|
||||
<optional><attribute name="derivation"><text/></attribute></optional>
|
||||
<optional><attribute name="connector"><text/></attribute></optional>
|
||||
</define>
|
||||
|
||||
@@ -479,11 +451,12 @@
|
||||
|
||||
<define name="place-content">
|
||||
<ref name="primary-object"/>
|
||||
<attribute name="name"><text/></attribute>
|
||||
<attribute name="type"><text/></attribute>
|
||||
<optional><element name="ptitle"><text/></element></optional>
|
||||
<oneOrMore><element name="pname">
|
||||
<ref name="placename-content"/>
|
||||
</element></oneOrMore>
|
||||
<optional><element name="code"><text/></element></optional>
|
||||
<zeroOrMore><element name="alt_name"><text/></element></zeroOrMore>
|
||||
<optional><element name="coord">
|
||||
<attribute name="long"><text/></attribute>
|
||||
<attribute name="lat"><text/></attribute>
|
||||
@@ -772,6 +745,12 @@
|
||||
<text/>
|
||||
</define>
|
||||
|
||||
<define name="placename-content">
|
||||
<attribute name="value"><text/></attribute>
|
||||
<optional><attribute name="lang"><text/></attribute></optional>
|
||||
<optional><ref name="date-content"/></optional>
|
||||
</define>
|
||||
|
||||
<define name="placeref-content">
|
||||
<attribute name="hlink"><data type="IDREF"/></attribute>
|
||||
<optional><ref name="date-content"/></optional>
|
||||
|
||||
Vendored
+9
-6
@@ -7,29 +7,32 @@ Build-Depends-Indep:
|
||||
gettext,
|
||||
intltool,
|
||||
libxml-parser-perl,
|
||||
python-all,
|
||||
python-setuptools
|
||||
python3-all,
|
||||
python3-setuptools
|
||||
Build-Depends:
|
||||
dh-python,
|
||||
debhelper (>= 9.0.0)
|
||||
Standards-Version: 3.9.5
|
||||
Vcs-Git: git://anonscm.debian.org/collab-maint/gramps.git
|
||||
Vcs-browser: http://anonscm.debian.org/gitweb/?p=collab-maint/gramps.git
|
||||
Homepage: http://www.gramps-project.org/
|
||||
X-Python-Version: >= 3.0
|
||||
X-Python-Version: >= 3.2
|
||||
|
||||
Package: python-gramps
|
||||
Package: python3-gramps
|
||||
Architecture: all
|
||||
Depends:
|
||||
gir1.2-gtk-3.0,
|
||||
gir1.2-gtk-3.0 (>= 3.10.0),
|
||||
librsvg2-2,
|
||||
python3-gi,
|
||||
python3-gi-cairo,
|
||||
python3-bsddb3,
|
||||
xdg-utils,
|
||||
${misc:Depends},
|
||||
${python:Depends}
|
||||
${python3:Depends}
|
||||
Recommends:
|
||||
graphviz,
|
||||
libosmgpsmap-1.0-0-dev,
|
||||
gir1.2-osmgpsmap-1.0,
|
||||
python3-pyicu
|
||||
Suggests:
|
||||
fonts-freefont-ttf,
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 3f702ae..9622d75 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -248,7 +248,7 @@ class install(_install):
|
||||
'utils', 'resource-path')
|
||||
with io.open(resource_file, 'w', encoding='utf-8',
|
||||
errors='strict') as fp:
|
||||
- path = os.path.abspath(os.path.join(self.install_data, 'share'))
|
||||
+ path = '/usr/share'
|
||||
if sys.version_info[0] < 3:
|
||||
path = unicode(path)
|
||||
fp.write(path)
|
||||
-22
@@ -1,22 +0,0 @@
|
||||
diff --git a/gramps/plugins/view/htmlrenderer.py b/gramps/plugins/view/htmlrenderer.py
|
||||
index c41942a..8f35b16 100644
|
||||
--- a/gramps/plugins/view/htmlrenderer.py
|
||||
+++ b/gramps/plugins/view/htmlrenderer.py
|
||||
@@ -122,11 +122,12 @@ user_pref("general.useragent.locale, %(lang)s);
|
||||
|
||||
TOOLKIT = NOWEB
|
||||
|
||||
-try:
|
||||
- from gi.repository import WebKit as webkit
|
||||
- TOOLKIT = WEBKIT
|
||||
-except:
|
||||
- pass
|
||||
+#Disable webkit as it is causing a crash in Gramps 4.0.2
|
||||
+#try:
|
||||
+# from gi.repository import WebKit as webkit
|
||||
+# TOOLKIT = WEBKIT
|
||||
+#except:
|
||||
+# pass
|
||||
|
||||
#no interfaces present, raise Error so that options for GeoView do not show
|
||||
if TOOLKIT == NOWEB :
|
||||
Vendored
-2
@@ -1,2 +0,0 @@
|
||||
0001-Correct-resource-path-in-setup.py.patch
|
||||
0002-Disable-HTML-View.patch
|
||||
Vendored
+6
-7
@@ -5,7 +5,7 @@ export DH_VERBOSE=1
|
||||
export DH_OPTIONS=-v
|
||||
|
||||
%:
|
||||
dh $@ --with python3
|
||||
dh $@ --with python3 --buildsystem=pybuild
|
||||
|
||||
# Override auto test because upstream do not use the standard unittest discover
|
||||
override_dh_auto_test:
|
||||
@@ -17,20 +17,19 @@ override_dh_auto_build:
|
||||
# Override of auto_install to remove information from package
|
||||
override_dh_auto_install:
|
||||
#dh_auto_install
|
||||
python3 setup.py install --resourcepath=/usr/share --root=debian/python3-gramps --install-layout=deb
|
||||
# Remove duplicate copyright information
|
||||
#rm $(CURDIR)/debian/python3-gramps/usr/share/doc/gramps/COPYING
|
||||
rm $(CURDIR)/debian/python3-gramps/usr/share/doc/gramps/COPYING
|
||||
# Remove install file as it is not needed by package users
|
||||
#rm $(CURDIR)/debian/python3-gramps/usr/share/doc/gramps/INSTALL
|
||||
rm $(CURDIR)/debian/python3-gramps/usr/share/doc/gramps/INSTALL
|
||||
# Remove duplicate license information
|
||||
#rm $(CURDIR)/debian/python3-gramps/usr/share/doc/gramps/LICENSE
|
||||
python3 setup.py install --root=debian/python3-gramps --install-layout=deb
|
||||
rm $(CURDIR)/debian/python3-gramps/usr/share/doc/gramps/LICENSE
|
||||
ln -s /usr/share/common-licenses/GPL-2 $(CURDIR)/debian/python3-gramps/usr/share/doc/gramps/COPYING
|
||||
|
||||
# Make css style sheets and png icons non-executable
|
||||
override_dh_fixperms:
|
||||
dh_fixperms
|
||||
chmod a-x $(CURDIR)/debian/python3-gramps/usr/share/gramps/css/Web_*.css
|
||||
chmod a-x $(CURDIR)/debian/python3-gramps/usr/share/gramps/images/22x22/gramps*.png
|
||||
chmod a-x $(CURDIR)/debian/python3-gramps/usr/share/gramps/images/16x16/gramps*.png
|
||||
|
||||
# Avoid compressing COPYING file so that it can appear in the "About" dialog
|
||||
override_dh_compress:
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
1.0
|
||||
1.8
|
||||
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
unapply-patches
|
||||
Vendored
-4
@@ -1,4 +0,0 @@
|
||||
version=3
|
||||
|
||||
opts="dversionmangle=s/\+dfsg//g" \
|
||||
http://sf.net/gramps/gramps-(.+)\.tar\.gz
|
||||
Executable → Regular
+92
-49
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE database PUBLIC "-//Gramps//DTD Gramps XML 1.6.0//EN"
|
||||
"http://gramps-project.org/xml/1.6.0/grampsxml.dtd">
|
||||
<database xmlns="http://gramps-project.org/xml/1.6.0/">
|
||||
<!DOCTYPE database PUBLIC "-//Gramps//DTD Gramps XML 1.7.1//EN"
|
||||
"http://gramps-project.org/xml/1.7.1/grampsxml.dtd">
|
||||
<database xmlns="http://gramps-project.org/xml/1.7.1/">
|
||||
<header>
|
||||
<created date="2015-01-24" version="4.1.2"/>
|
||||
<created date="2015-07-04" version="4.2.0"/>
|
||||
<researcher>
|
||||
<resname>Alex Roitman,,,</resname>
|
||||
</researcher>
|
||||
@@ -1523,174 +1523,217 @@
|
||||
</source>
|
||||
</sources>
|
||||
<places>
|
||||
<placeobj handle="_4ZLT6DVCWT9LTZRDCS" change="1422124381" id="P0003" name="Ronne" type="City">
|
||||
<placeobj handle="_4ZLT6DVCWT9LTZRDCS" change="1422124381" id="P0003" type="City">
|
||||
<ptitle>Ronne, Bornholm, Denmark</ptitle>
|
||||
<pname value="Ronne"/>
|
||||
<placeref hlink="_cef2428d9dd233688ea3ed3cc24"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_61NT6D3G1JMOTO6Z7Y" change="1422123855" id="P0012" name="Grostorp" type="Municipality">
|
||||
<placeobj handle="_61NT6D3G1JMOTO6Z7Y" change="1422123855" id="P0012" type="Municipality">
|
||||
<ptitle>Grostorp, Kristianstad Lan, Sweden</ptitle>
|
||||
<pname value="Grostorp"/>
|
||||
<placeref hlink="_cef23a81ba8c837cc364895d88"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_67MT6DB6KWOVMBAXSY" change="1422125128" id="P0002" name="San Francisco" type="City">
|
||||
<placeobj handle="_67MT6DB6KWOVMBAXSY" change="1422125128" id="P0002" type="City">
|
||||
<ptitle>San Francisco, San Francisco Co., CA, USA</ptitle>
|
||||
<pname value="San Francisco"/>
|
||||
<placeref hlink="_cef24668db23c27d421f51c667d"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_7JMT6DN2LOF54KXHTU" change="1422125958" id="P0010" name="Reno" type="City">
|
||||
<placeobj handle="_7JMT6DN2LOF54KXHTU" change="1422125958" id="P0010" type="City">
|
||||
<ptitle>Reno, Washoe Co., NV, USA</ptitle>
|
||||
<pname value="Reno"/>
|
||||
<placeref hlink="_cef2513e057732c3f27780750d"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_A9MT6DHVWGWRP59DEV" change="1422123595" id="P0011" name="Sweden" type="Country">
|
||||
<placeobj handle="_A9MT6DHVWGWRP59DEV" change="1422123595" id="P0011" type="Country">
|
||||
<ptitle>Sweden</ptitle>
|
||||
<pname value="Sweden"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_AANT6D026O5SHNUCDH" change="1422123942" id="P0015" name="Simrishamn" type="Municipality">
|
||||
<placeobj handle="_AANT6D026O5SHNUCDH" change="1422123942" id="P0015" type="Municipality">
|
||||
<ptitle>Simrishamn, Kristianstad Lan, Sweden</ptitle>
|
||||
<pname value="Simrishamn"/>
|
||||
<placeref hlink="_cef23a81ba8c837cc364895d88"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_AKMT6DMEYZDTG9J6DS" change="1422124249" id="P0013" name="Copenhagen" type="City">
|
||||
<placeobj handle="_AKMT6DMEYZDTG9J6DS" change="1422124249" id="P0013" type="City">
|
||||
<ptitle>Copenhagen, Denmark</ptitle>
|
||||
<pname value="Copenhagen"/>
|
||||
<placeref hlink="_cef2418f9333e16e00f6ce2eb14"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_BAOT6D1WY6J4O4ARRN" change="1422125198" id="P0030" name="San Ramon" type="City">
|
||||
<placeobj handle="_BAOT6D1WY6J4O4ARRN" change="1422125198" id="P0030" type="City">
|
||||
<ptitle>San Ramon, Conta Costa Co., CA, USA</ptitle>
|
||||
<pname value="San Ramon"/>
|
||||
<placeref hlink="_cef2478a94b48a58d3be6a10493"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_DYLT6DF4DX2MNZICJ8" change="1422126222" id="P0014" name="Hoya" type="City">
|
||||
<placeobj handle="_DYLT6DF4DX2MNZICJ8" change="1422126222" id="P0014" type="City">
|
||||
<ptitle>Hoya, Sweden</ptitle>
|
||||
<alt_name>Jona</alt_name>
|
||||
<alt_name>Hoia</alt_name>
|
||||
<pname value="Hoya"/>
|
||||
<pname value="Jona"/>
|
||||
<pname value="Hoia"/>
|
||||
<placeref hlink="_A9MT6DHVWGWRP59DEV"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_ELNT6DS8GN8WI7Z4SO" change="1422125073" id="P0008" name="Hayward" type="City">
|
||||
<placeobj handle="_ELNT6DS8GN8WI7Z4SO" change="1422125073" id="P0008" type="City">
|
||||
<ptitle>Hayward, Alameda Co., CA, USA</ptitle>
|
||||
<pname value="Hayward"/>
|
||||
<placeref hlink="_cef245b044820b7405a1180f298"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_FBNT6DL92NDY0Z5SGP" change="1422125294" id="P0021" name="Santa Rosa" type="City">
|
||||
<placeobj handle="_FBNT6DL92NDY0Z5SGP" change="1422125294" id="P0021" type="City">
|
||||
<ptitle>Santa Rosa, Sonoma Co., CA, USA</ptitle>
|
||||
<pname value="Santa Rosa"/>
|
||||
<placeref hlink="_cef24b7a76efa8b9d98d67ea5a"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_GWNT6D12ZV06PK969X" change="1422125101" id="P0020" name="Sacramento" type="City">
|
||||
<placeobj handle="_GWNT6D12ZV06PK969X" change="1422125101" id="P0020" type="City">
|
||||
<ptitle>Sacramento, Sacramento Co., CA, USA</ptitle>
|
||||
<pname value="Sacramento"/>
|
||||
<placeref hlink="_cef246117947f75e54c09680419"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_HFNT6D12ZC0KOWY69T" change="1422125018" id="P0016" name="Fremont" type="City">
|
||||
<placeobj handle="_HFNT6D12ZC0KOWY69T" change="1422125018" id="P0016" type="City">
|
||||
<ptitle>Fremont, Alameda Co., CA, USA</ptitle>
|
||||
<pname value="Fremont"/>
|
||||
<placeref hlink="_cef245b044820b7405a1180f298"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_HINT6DP8JGGL0KKB8J" change="1422123879" id="P0000" name="Loderup" type="Municipality">
|
||||
<placeobj handle="_HINT6DP8JGGL0KKB8J" change="1422123879" id="P0000" type="Municipality">
|
||||
<ptitle>Loderup, Malmous Lan, Sweden</ptitle>
|
||||
<pname value="Loderup"/>
|
||||
<placeref hlink="_cef23c1ee8b7da58c764e88c637"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_IEOT6DOW3RE8AQ94HH" change="1422126043" id="P0025" name="Bí" type="Unknown">
|
||||
<placeobj handle="_IEOT6DOW3RE8AQ94HH" change="1422126043" id="P0025" type="Unknown">
|
||||
<ptitle>Bí</ptitle>
|
||||
<pname value="Bí"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_LTNT6DKZ5CR8PZSVUS" change="1422125169" id="P0022" name="San Jose" type="City">
|
||||
<placeobj handle="_LTNT6DKZ5CR8PZSVUS" change="1422125169" id="P0022" type="City">
|
||||
<ptitle>San Jose, Santa Clara Co., CA, USA</ptitle>
|
||||
<pname value="San Jose"/>
|
||||
<placeref hlink="_cef246c95c132bcf6a0255d4d17"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_PUNT6D1XHS0DJW9QP6" change="1422125605" id="P0024" name="UC Berkeley" type="University">
|
||||
<placeobj handle="_PUNT6D1XHS0DJW9QP6" change="1422125605" id="P0024" type="University">
|
||||
<ptitle>UC Berkeley, CA, USA</ptitle>
|
||||
<pname value="UC Berkeley"/>
|
||||
<placeref hlink="_cef243fb5634559442323368f63"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_PXMT6DBL0WSBL76WD7" change="1422123936" id="P0026" name="Smestorp" type="Municipality">
|
||||
<placeobj handle="_PXMT6DBL0WSBL76WD7" change="1422123936" id="P0026" type="Municipality">
|
||||
<ptitle>Smestorp, Kristianstad Lan, Sweden</ptitle>
|
||||
<pname value="Smestorp"/>
|
||||
<placeref hlink="_cef23a81ba8c837cc364895d88"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_QBOT6DN7UCCTZQ055" change="1422125399" id="P0029" name="Woodland" type="City">
|
||||
<placeobj handle="_QBOT6DN7UCCTZQ055" change="1422125399" id="P0029" type="City">
|
||||
<ptitle>Woodland, Yolo Co., CA, USA</ptitle>
|
||||
<pname value="Woodland"/>
|
||||
<placeref hlink="_cef24c2e3592e759b7797f95465"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_QJMT6DGII29FWCPX2E" change="1422124361" id="P0028" name="Ronne Bornholm" type="City">
|
||||
<placeobj handle="_QJMT6DGII29FWCPX2E" change="1422124361" id="P0028" type="City">
|
||||
<ptitle>Ronne Bornholm, Denmark</ptitle>
|
||||
<pname value="Ronne Bornholm"/>
|
||||
<placeref hlink="_cef2418f9333e16e00f6ce2eb14"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_R8MT6DRIZVNRYDK0VN" change="1422123930" id="P0027" name="Tommarp" type="Municipality">
|
||||
<placeobj handle="_R8MT6DRIZVNRYDK0VN" change="1422123930" id="P0027" type="Municipality">
|
||||
<ptitle>Tommarp, Kristianstad Lan, Sweden</ptitle>
|
||||
<pname value="Tommarp"/>
|
||||
<placeref hlink="_cef23a81ba8c837cc364895d88"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_RPMT6DTQR8J7LK98HJ" change="1422125771" id="P0019" name="Denver" type="City">
|
||||
<placeobj handle="_RPMT6DTQR8J7LK98HJ" change="1422125771" id="P0019" type="City">
|
||||
<ptitle>Denver, Denver Co., CO, USA</ptitle>
|
||||
<pname value="Denver"/>
|
||||
<placeref hlink="_cef24ffc57f28a50ea65f0af645"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_S1NT6DPOBYC1JGMR1P" change="1422125992" id="P0001" name="Sparks" type="City">
|
||||
<placeobj handle="_S1NT6DPOBYC1JGMR1P" change="1422125992" id="P0001" type="City">
|
||||
<ptitle>Sparks, Washoe Co., NV, USA</ptitle>
|
||||
<pname value="Sparks"/>
|
||||
<placeref hlink="_cef2513e057732c3f27780750d"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_XLNT6DUONITFPPEGVH" change="1422125508" id="P0009" name="Community Presbyterian Church" type="Church">
|
||||
<placeobj handle="_XLNT6DUONITFPPEGVH" change="1422125508" id="P0009" type="Church">
|
||||
<ptitle>Community Presbyterian Church, Danville, CA, USA</ptitle>
|
||||
<pname value="Community Presbyterian Church"/>
|
||||
<placeref hlink="_cef24d930653dc59ec3a36510e4"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_XSMT6DNISHYRCR1E78" change="1422123836" id="P0004" name="Gladsax" type="Municipality">
|
||||
<placeobj handle="_XSMT6DNISHYRCR1E78" change="1422123836" id="P0004" type="Municipality">
|
||||
<ptitle>Gladsax, Kristianstad Lan, Sweden</ptitle>
|
||||
<pname value="Gladsax"/>
|
||||
<placeref hlink="_cef23a81ba8c837cc364895d88"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_cef23a81ba8c837cc364895d88" change="1422123677" id="P0005" name="Kristianstad Lan" type="County">
|
||||
<placeobj handle="_cef23a81ba8c837cc364895d88" change="1422123677" id="P0005" type="County">
|
||||
<ptitle>Kristianstad Lan, Sweden</ptitle>
|
||||
<pname value="Kristianstad Lan"/>
|
||||
<placeref hlink="_A9MT6DHVWGWRP59DEV"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_cef23c1ee8b7da58c764e88c637" change="1422123662" id="P0006" name="Malmous Lan" type="County">
|
||||
<placeobj handle="_cef23c1ee8b7da58c764e88c637" change="1422123662" id="P0006" type="County">
|
||||
<ptitle>Malmous Lan, Sweden</ptitle>
|
||||
<pname value="Malmous Lan"/>
|
||||
<placeref hlink="_A9MT6DHVWGWRP59DEV"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_cef2418f9333e16e00f6ce2eb14" change="1422124233" id="P0007" name="Denmark" type="Country">
|
||||
<placeobj handle="_cef2418f9333e16e00f6ce2eb14" change="1422124233" id="P0007" type="Country">
|
||||
<ptitle>Denmark</ptitle>
|
||||
<pname value="Denmark"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_cef2428d9dd233688ea3ed3cc24" change="1422124337" id="P0017" name="Bornholm" type="Region">
|
||||
<placeobj handle="_cef2428d9dd233688ea3ed3cc24" change="1422124337" id="P0017" type="Region">
|
||||
<ptitle>Bornholm, Denmark</ptitle>
|
||||
<pname value="Bornholm"/>
|
||||
<placeref hlink="_cef2418f9333e16e00f6ce2eb14"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_cef2438892244290ca7fb5750" change="1422124440" id="P0018" name="USA" type="Country">
|
||||
<placeobj handle="_cef2438892244290ca7fb5750" change="1422124440" id="P0018" type="Country">
|
||||
<ptitle>USA</ptitle>
|
||||
<pname value="USA"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_cef243fb5634559442323368f63" change="1422124487" id="P0023" name="CA" type="State">
|
||||
<placeobj handle="_cef243fb5634559442323368f63" change="1422124487" id="P0023" type="State">
|
||||
<ptitle>CA, USA</ptitle>
|
||||
<pname value="CA"/>
|
||||
<placeref hlink="_cef2438892244290ca7fb5750"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_cef244224d14af0273799b281e" change="1422124514" id="P0031" name="CO" type="State">
|
||||
<placeobj handle="_cef244224d14af0273799b281e" change="1422124514" id="P0031" type="State">
|
||||
<ptitle>CO, USA</ptitle>
|
||||
<pname value="CO"/>
|
||||
<placeref hlink="_cef2438892244290ca7fb5750"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_cef24468f6e3a984bf57967e95d" change="1422124542" id="P0032" name="NV" type="State">
|
||||
<placeobj handle="_cef24468f6e3a984bf57967e95d" change="1422124542" id="P0032" type="State">
|
||||
<ptitle>NV, USA</ptitle>
|
||||
<pname value="NV"/>
|
||||
<placeref hlink="_cef2438892244290ca7fb5750"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_cef245b044820b7405a1180f298" change="1422124666" id="P0033" name="Alameda Co." type="County">
|
||||
<placeobj handle="_cef245b044820b7405a1180f298" change="1422124666" id="P0033" type="County">
|
||||
<ptitle>Alameda Co., CA, USA</ptitle>
|
||||
<pname value="Alameda Co."/>
|
||||
<placeref hlink="_cef243fb5634559442323368f63"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_cef246117947f75e54c09680419" change="1422124908" id="P0034" name="Sacramento Co." type="County">
|
||||
<placeobj handle="_cef246117947f75e54c09680419" change="1422124908" id="P0034" type="County">
|
||||
<ptitle>Sacramento Co., CA, USA</ptitle>
|
||||
<pname value="Sacramento Co."/>
|
||||
<placeref hlink="_cef243fb5634559442323368f63"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_cef24668db23c27d421f51c667d" change="1422124741" id="P0035" name="San Francisco Co." type="County">
|
||||
<placeobj handle="_cef24668db23c27d421f51c667d" change="1422124741" id="P0035" type="County">
|
||||
<ptitle>San Francisco Co., CA, USA</ptitle>
|
||||
<pname value="San Francisco Co."/>
|
||||
<placeref hlink="_cef243fb5634559442323368f63"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_cef246c95c132bcf6a0255d4d17" change="1422124781" id="P0036" name="Santa Clara Co." type="County">
|
||||
<placeobj handle="_cef246c95c132bcf6a0255d4d17" change="1422124781" id="P0036" type="County">
|
||||
<ptitle>Santa Clara Co., CA, USA</ptitle>
|
||||
<pname value="Santa Clara Co."/>
|
||||
<placeref hlink="_cef243fb5634559442323368f63"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_cef2478a94b48a58d3be6a10493" change="1422124860" id="P0037" name="Conta Costa Co." type="County">
|
||||
<placeobj handle="_cef2478a94b48a58d3be6a10493" change="1422124860" id="P0037" type="County">
|
||||
<ptitle>Conta Costa Co., CA, USA</ptitle>
|
||||
<pname value="Conta Costa Co."/>
|
||||
<placeref hlink="_cef243fb5634559442323368f63"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_cef24b7a76efa8b9d98d67ea5a" change="1422125273" id="P0038" name="Sonoma Co." type="County">
|
||||
<placeobj handle="_cef24b7a76efa8b9d98d67ea5a" change="1422125273" id="P0038" type="County">
|
||||
<ptitle>Sonoma Co., CA, USA</ptitle>
|
||||
<pname value="Sonoma Co."/>
|
||||
<placeref hlink="_cef243fb5634559442323368f63"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_cef24c2e3592e759b7797f95465" change="1422125420" id="P0039" name="Yolo Co." type="County">
|
||||
<placeobj handle="_cef24c2e3592e759b7797f95465" change="1422125420" id="P0039" type="County">
|
||||
<ptitle>Yolo Co., CA, USA</ptitle>
|
||||
<pname value="Yolo Co."/>
|
||||
<placeref hlink="_cef243fb5634559442323368f63"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_cef24d930653dc59ec3a36510e4" change="1422125493" id="P0040" name="Danville" type="City">
|
||||
<placeobj handle="_cef24d930653dc59ec3a36510e4" change="1422125493" id="P0040" type="City">
|
||||
<ptitle>Danville, CA, USA</ptitle>
|
||||
<pname value="Danville"/>
|
||||
<placeref hlink="_cef243fb5634559442323368f63"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_cef24ffc57f28a50ea65f0af645" change="1422125745" id="P0041" name="Denver Co." type="County">
|
||||
<placeobj handle="_cef24ffc57f28a50ea65f0af645" change="1422125745" id="P0041" type="County">
|
||||
<ptitle>Denver Co., CO, USA</ptitle>
|
||||
<pname value="Denver Co."/>
|
||||
<placeref hlink="_cef244224d14af0273799b281e"/>
|
||||
</placeobj>
|
||||
<placeobj handle="_cef2513e057732c3f27780750d" change="1422125877" id="P0042" name="Washoe Co." type="County">
|
||||
<placeobj handle="_cef2513e057732c3f27780750d" change="1422125877" id="P0042" type="County">
|
||||
<ptitle>Washoe Co., NV, USA</ptitle>
|
||||
<pname value="Washoe Co."/>
|
||||
<placeref hlink="_cef24468f6e3a984bf57967e95d"/>
|
||||
</placeobj>
|
||||
</places>
|
||||
|
||||
+2580
-1292
File diff suppressed because it is too large
Load Diff
@@ -164,7 +164,7 @@ class DateParserCZ(DateParser):
|
||||
|
||||
quality_to_int = {
|
||||
'přibližně' : Date.QUAL_ESTIMATED,
|
||||
'odhadované' : Date.QUAL_ESTIMATED,
|
||||
'odhadem' : Date.QUAL_ESTIMATED,
|
||||
'odh.' : Date.QUAL_ESTIMATED,
|
||||
'vypočteno' : Date.QUAL_CALCULATED,
|
||||
'vypočtené' : Date.QUAL_CALCULATED,
|
||||
@@ -173,6 +173,8 @@ class DateParserCZ(DateParser):
|
||||
|
||||
def init_strings(self):
|
||||
DateParser.init_strings(self)
|
||||
self._text2 = re.compile('(\d+)?\.?\s+?%s\.?\s*((\d+)(/\d+)?)?\s*$'
|
||||
% self._mon_str, re.IGNORECASE)
|
||||
self._span = re.compile(
|
||||
"(od)\s+(?P<start>.+)\s+(do)\s+(?P<stop>.+)",
|
||||
re.IGNORECASE)
|
||||
@@ -221,7 +223,9 @@ class DateDisplayCZ(DateDisplay):
|
||||
# this must agree with DateDisplayEn's "formats" definition
|
||||
# (since no locale-specific _display_gregorian exists, here)
|
||||
|
||||
def display(self, date):
|
||||
display = DateDisplay.display_formatted
|
||||
|
||||
def orig_display(self, date):
|
||||
"""
|
||||
Return a text string representing the date.
|
||||
"""
|
||||
|
||||
@@ -57,8 +57,7 @@ class DateParserHR(DateParser):
|
||||
'po. ' : Date.MOD_AFTER,
|
||||
'okolo' : Date.MOD_ABOUT,
|
||||
'ok. ' : Date.MOD_ABOUT,
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
quality_to_int = {
|
||||
'približno' : Date.QUAL_ESTIMATED,
|
||||
@@ -75,20 +74,20 @@ class DateParserHR(DateParser):
|
||||
compiles regular expression strings for matching dates
|
||||
"""
|
||||
DateParser.init_strings(self)
|
||||
#~ DateParser.calendar_to_int.update({
|
||||
#~ 'персидский' : Date.CAL_PERSIAN,
|
||||
#~ 'п' : Date.CAL_PERSIAN,
|
||||
#~ })
|
||||
_span_1 = ['od']
|
||||
_span_2 = ['do']
|
||||
_range_1 = ['između']
|
||||
_range_2 = ['i']
|
||||
self._span = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_range_1), '|'.join(_range_2)),
|
||||
re.IGNORECASE)
|
||||
# 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+)\.?$")
|
||||
#"((\d+)[/\.]\s*)?((\d+)[/\.]\s*)?(\d+)\s*$")
|
||||
self._span = re.compile(
|
||||
"(od)\s+(?P<start>.+)\s+(do)\s+(?P<stop>.+)",
|
||||
re.IGNORECASE)
|
||||
self._jtext2 = re.compile('(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?'\
|
||||
% self._jmon_str, re.IGNORECASE)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@@ -105,6 +104,47 @@ class DateDisplayHR(DateDisplay):
|
||||
|
||||
display = DateDisplay.display_formatted
|
||||
|
||||
def dd_dformat01(self, date_val):
|
||||
"""
|
||||
numerical
|
||||
"""
|
||||
if date_val[3]:
|
||||
return self.display_iso(date_val)
|
||||
else:
|
||||
if date_val[0] == date_val[1] == 0:
|
||||
return 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])))
|
||||
return value
|
||||
|
||||
def dd_dformat04(self, date_val, inflect, long_months):
|
||||
"""
|
||||
day month_name year
|
||||
|
||||
this must agree with DateDisplayEn's "formats" definition
|
||||
(it may be overridden if a locale-specific date displayer exists)
|
||||
"""
|
||||
|
||||
_ = self._locale.translation.sgettext
|
||||
year = self._slash_year(date_val[2], date_val[3])
|
||||
if date_val[0] == 0:
|
||||
if date_val[1] == 0:
|
||||
return year + '.'
|
||||
else:
|
||||
return self.format_long_month_year(date_val[1], year,
|
||||
inflect, long_months)
|
||||
elif date_val[1] == 0: # month is zero but day is not (see 8477)
|
||||
return self.display_iso(date_val)
|
||||
else:
|
||||
# TRANSLATORS: this month is ALREADY inflected: ignore it
|
||||
return _("{day:d} {long_month} {year}").format(
|
||||
day = date_val[0],
|
||||
long_month = self.format_long_month(date_val[1],
|
||||
inflect, long_months).replace('.', ''),
|
||||
year = year)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Register classes
|
||||
|
||||
@@ -186,6 +186,8 @@ except:
|
||||
'10/25/2005' : '%m/%d/%Y',
|
||||
'2005/10/25' : '%Y/%m/%d',
|
||||
'25.10.2005' : '%d.%m.%Y',
|
||||
'25.10.2005.' : '%d.%m.%Y.',
|
||||
'25. 10. 2005.' : '%d. %m. %Y.',
|
||||
'10.25.2005' : '%m.%d.%Y',
|
||||
'2005.10.25' : '%Y.%m.%d',
|
||||
}
|
||||
|
||||
@@ -722,8 +722,11 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
|
||||
|
||||
# Check for pickle upgrade
|
||||
versionpath = os.path.join(self.path, str(PCKVERSFN))
|
||||
if not os.path.isfile(versionpath) and \
|
||||
not self.readonly and not self.update_pickle_version:
|
||||
# Up to gramps 3.4.x PCKVERSFN was not written
|
||||
# Gramps 4.2 incorrectly wrote PCKVERSFN = 'Yes' for Python2, so check
|
||||
# whether python is upgraded
|
||||
if ((not self.readonly and not self.update_pickle_version) and
|
||||
(not os.path.isfile(versionpath) or self.update_python_version)):
|
||||
_LOG.debug("Make backup in case there is a pickle upgrade")
|
||||
self.__make_zip_backup(name)
|
||||
self.update_pickle_version = True
|
||||
|
||||
@@ -96,7 +96,7 @@ class GenericFilter(object):
|
||||
def get_invert(self):
|
||||
return self.invert
|
||||
|
||||
def get_name(self):
|
||||
def get_name(self, ulocale=glocale):
|
||||
return self.name
|
||||
|
||||
def set_name(self, name):
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
@@ -78,22 +78,26 @@ class IsDescendantFamilyOf(Rule):
|
||||
return
|
||||
|
||||
# Add self
|
||||
self.matches.add(person.handle)
|
||||
expand = [person]
|
||||
|
||||
for family_handle in person.get_family_handle_list():
|
||||
family = self.db.get_family_from_handle(family_handle)
|
||||
if family:
|
||||
# Add every child recursively
|
||||
for child_ref in family.get_child_ref_list():
|
||||
if child_ref:
|
||||
self.add_matches(self.db.get_person_from_handle(child_ref.ref))
|
||||
|
||||
# Add spouse
|
||||
if person.handle == family.get_father_handle():
|
||||
spouse_handle = family.get_mother_handle()
|
||||
else:
|
||||
spouse_handle = family.get_father_handle()
|
||||
self.matches.add(spouse_handle)
|
||||
while expand:
|
||||
person = expand.pop(0)
|
||||
if person is None:
|
||||
continue
|
||||
self.matches.add(person.handle)
|
||||
for family_handle in person.get_family_handle_list():
|
||||
family = self.db.get_family_from_handle(family_handle)
|
||||
if family:
|
||||
# Add every child recursively
|
||||
for child_ref in family.get_child_ref_list():
|
||||
if child_ref:
|
||||
expand.append(self.db.get_person_from_handle(child_ref.ref))
|
||||
# Add spouse
|
||||
if person.handle == family.get_father_handle():
|
||||
spouse_handle = family.get_mother_handle()
|
||||
else:
|
||||
spouse_handle = family.get_father_handle()
|
||||
self.matches.add(spouse_handle)
|
||||
|
||||
def exclude(self):
|
||||
# This removes root person and his/her spouses from the matches set
|
||||
|
||||
Executable → Regular
Executable → Regular
@@ -51,9 +51,14 @@ class IsEnclosedBy(Rule):
|
||||
category = _('General filters')
|
||||
|
||||
def prepare(self, db):
|
||||
self.handle = db.get_place_from_gramps_id(self.list[0]).handle
|
||||
self.handle = None
|
||||
place = db.get_place_from_gramps_id(self.list[0])
|
||||
if place:
|
||||
self.handle = place.handle
|
||||
|
||||
def apply(self, db, place):
|
||||
if self.handle is None:
|
||||
return False
|
||||
if located_in(db, place.handle, self.handle):
|
||||
return True
|
||||
return False
|
||||
|
||||
Executable → Regular
Executable → Regular
@@ -87,7 +87,7 @@ class Location(SecondaryObject, LocationBase):
|
||||
"street": self.street,
|
||||
"locality": self.locality,
|
||||
"city": self.city,
|
||||
"country": self.county,
|
||||
"county": self.county,
|
||||
"state": self.state,
|
||||
"country": self.country,
|
||||
"postal": self.postal,
|
||||
|
||||
@@ -84,7 +84,7 @@ class Researcher(LocationBase):
|
||||
"street": self.street,
|
||||
"locality": self.locality,
|
||||
"city": self.city,
|
||||
"country": self.county,
|
||||
"county": self.county,
|
||||
"state": self.state,
|
||||
"country": self.country,
|
||||
"postal": self.postal,
|
||||
|
||||
@@ -309,8 +309,12 @@ class Gramplet(object):
|
||||
self.interrupt()
|
||||
self._generator = self.main()
|
||||
self._pause = False
|
||||
self._idle_id = GLib.idle_add(self._updater,
|
||||
if GObject.pygobject_version < (3,16,0):
|
||||
self._idle_id = GLib.idle_add(self._updater,
|
||||
priority=GObject.PRIORITY_LOW - 10)
|
||||
else:
|
||||
self._idle_id = GLib.idle_add(self._updater,
|
||||
priority=GLib.PRIORITY_LOW - 10)
|
||||
|
||||
def _updater(self):
|
||||
"""
|
||||
@@ -364,8 +368,12 @@ class Gramplet(object):
|
||||
"""
|
||||
from gi.repository import GObject, GLib
|
||||
self._pause = False
|
||||
self._idle_id = GLib.idle_add(self._updater,
|
||||
if GObject.pygobject_version < (3,16,0):
|
||||
self._idle_id = GLib.idle_add(self._updater,
|
||||
priority=GObject.PRIORITY_LOW - 10)
|
||||
else:
|
||||
self._idle_id = GLib.idle_add(self._updater,
|
||||
priority=GLib.PRIORITY_LOW - 10)
|
||||
|
||||
def update_all(self, *args):
|
||||
"""
|
||||
|
||||
@@ -785,7 +785,8 @@ class SimpleAccess(object):
|
||||
"""
|
||||
|
||||
with self.dbase.get_person_cursor() as cursor:
|
||||
slist = sorted((data[3][3], key) for key, data in cursor)
|
||||
# data[3] is primary_name; data[3][5][0][0] is surname
|
||||
slist = sorted((data[3][5][0][0], key) for key, data in cursor)
|
||||
|
||||
for info in slist:
|
||||
obj = self.dbase.get_person_from_handle(info[1])
|
||||
|
||||
+11
-1
@@ -1579,7 +1579,8 @@ class MultiTreeView(Gtk.TreeView):
|
||||
|
||||
def edit_obj(self, objclass, handle):
|
||||
from .editors import (EditPerson, EditEvent, EditFamily, EditSource,
|
||||
EditPlace, EditRepository, EditNote, EditMedia)
|
||||
EditPlace, EditRepository, EditNote, EditMedia,
|
||||
EditCitation)
|
||||
if objclass == 'Person':
|
||||
person = self.dbstate.db.get_person_from_handle(handle)
|
||||
if person:
|
||||
@@ -1644,6 +1645,15 @@ class MultiTreeView(Gtk.TreeView):
|
||||
self.uistate, [], ref)
|
||||
except WindowActiveError:
|
||||
pass
|
||||
elif objclass == 'Citation':
|
||||
ref = self.dbstate.db.get_citation_from_handle(handle)
|
||||
if ref:
|
||||
try:
|
||||
EditCitation(self.dbstate,
|
||||
self.uistate, [], ref)
|
||||
except WindowActiveError:
|
||||
pass
|
||||
|
||||
|
||||
def short(val,size=60):
|
||||
if len(val) > size:
|
||||
|
||||
@@ -1086,7 +1086,7 @@ class GrampsPreferences(ConfigureDialog):
|
||||
|
||||
# Text in sidebar:
|
||||
self.add_checkbox(grid,
|
||||
_("Show text in sidebar buttons (requires restart)"),
|
||||
_("Show text label beside Navigator buttons (requires restart)"),
|
||||
row, 'interface.sidebar-text', stop=3)
|
||||
row += 1
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ class AddMediaObject(ManagedWindow):
|
||||
if self.file_text.get_filename() is None:
|
||||
msgstr = _("Import failed")
|
||||
msgstr2 = _("The filename supplied could not be found.")
|
||||
ErrorDialog(msgstr, msgstr2)
|
||||
ErrorDialog(msgstr, msgstr2, parent=self.window)
|
||||
return
|
||||
|
||||
filename = conv_to_unicode(self.file_text.get_filename())
|
||||
@@ -158,7 +158,7 @@ class AddMediaObject(ManagedWindow):
|
||||
if not os.path.exists(pname):
|
||||
msgstr = _("Cannot import %s")
|
||||
msgstr2 = _("Directory specified in preferences: Base path for relative media paths: %s does not exist. Change preferences or do not use relative path when importing")
|
||||
ErrorDialog(msgstr % filename, msgstr2 % pname)
|
||||
ErrorDialog(msgstr % filename, msgstr2 % pname, parent=self.window)
|
||||
return
|
||||
filename = relative_path(filename, pname)
|
||||
|
||||
|
||||
@@ -137,7 +137,8 @@ class EditAttributeRoot(EditSecondary):
|
||||
from ..dialog import ErrorDialog
|
||||
ErrorDialog(
|
||||
_("Cannot save attribute"),
|
||||
_("The attribute type cannot be empty"))
|
||||
_("The attribute type cannot be empty"),
|
||||
parent=self.window)
|
||||
return
|
||||
if self.callback:
|
||||
self.callback(self.obj)
|
||||
|
||||
@@ -280,7 +280,8 @@ class EditCitation(EditPrimary):
|
||||
"derived. To create a citation, first select the "
|
||||
"required source, and then record the location of "
|
||||
"the information referenced within the source in the "
|
||||
"'Volume/Page' field."))
|
||||
"'Volume/Page' field."),
|
||||
parent=self.window)
|
||||
self.ok_button.set_sensitive(True)
|
||||
return
|
||||
|
||||
@@ -294,7 +295,7 @@ class EditCitation(EditPrimary):
|
||||
"%(prim_object)s'. Please enter a different ID or leave "
|
||||
"blank to get the next available ID value.") % {
|
||||
'id' : gramps_id, 'prim_object' : name }
|
||||
ErrorDialog(msg1, msg2)
|
||||
ErrorDialog(msg1, msg2, parent=self.window)
|
||||
self.ok_button.set_sensitive(True)
|
||||
return
|
||||
|
||||
|
||||
@@ -236,7 +236,8 @@ class EditEvent(EditPrimary):
|
||||
if self.object_is_empty():
|
||||
ErrorDialog(_("Cannot save event"),
|
||||
_("No data exists for this event. Please "
|
||||
"enter data or cancel the edit."))
|
||||
"enter data or cancel the edit."),
|
||||
parent=self.window)
|
||||
self.ok_button.set_sensitive(True)
|
||||
return
|
||||
|
||||
@@ -250,7 +251,7 @@ class EditEvent(EditPrimary):
|
||||
"%(prim_object)s'. Please enter a different ID or leave "
|
||||
"blank to get the next available ID value.") % {
|
||||
'id' : id, 'prim_object' : name }
|
||||
ErrorDialog(msg1, msg2)
|
||||
ErrorDialog(msg1, msg2, parent=self.window)
|
||||
self.ok_button.set_sensitive(True)
|
||||
return
|
||||
|
||||
@@ -258,7 +259,7 @@ class EditEvent(EditPrimary):
|
||||
if t.is_custom() and str(t) == '':
|
||||
ErrorDialog(
|
||||
_("Cannot save event"),
|
||||
_("The event type cannot be empty"))
|
||||
_("The event type cannot be empty"), parent=self.window)
|
||||
self.ok_button.set_sensitive(True)
|
||||
return
|
||||
|
||||
|
||||
@@ -362,7 +362,8 @@ class EditFamily(EditPrimary):
|
||||
"are available when you create a new family. The "
|
||||
"remaining fields will become available after you "
|
||||
"attempt to select a parent."),
|
||||
'preferences.family-warn')
|
||||
'preferences.family-warn',
|
||||
parent=self.window)
|
||||
else:
|
||||
self.add_parent = False
|
||||
|
||||
@@ -1049,8 +1050,9 @@ class EditFamily(EditPrimary):
|
||||
name = "%s [%s]" % (name_displayer.display(father),
|
||||
father.gramps_id)
|
||||
ErrorDialog(_("A father cannot be his own child"),
|
||||
_("%s is listed as both the father and child "
|
||||
"of the family.") % name)
|
||||
_("%s is listed as both the father and child "
|
||||
"of the family.") % name,
|
||||
parent=self.window)
|
||||
self.ok_button.set_sensitive(True)
|
||||
return
|
||||
elif self.obj.get_mother_handle() in child_list:
|
||||
@@ -1059,8 +1061,9 @@ class EditFamily(EditPrimary):
|
||||
name = "%s [%s]" % (name_displayer.display(mother),
|
||||
mother.gramps_id)
|
||||
ErrorDialog(_("A mother cannot be her own child"),
|
||||
_("%s is listed as both the mother and child "
|
||||
"of the family.") % name)
|
||||
_("%s is listed as both the mother and child "
|
||||
"of the family.") % name,
|
||||
parent=self.window)
|
||||
self.ok_button.set_sensitive(True)
|
||||
return
|
||||
|
||||
@@ -1068,7 +1071,8 @@ class EditFamily(EditPrimary):
|
||||
ErrorDialog(
|
||||
_("Cannot save family"),
|
||||
_("No data exists for this family. "
|
||||
"Please enter data or cancel the edit."))
|
||||
"Please enter data or cancel the edit."),
|
||||
parent=self.window)
|
||||
self.ok_button.set_sensitive(True)
|
||||
return
|
||||
|
||||
@@ -1080,7 +1084,7 @@ class EditFamily(EditPrimary):
|
||||
"enter a different ID or leave "
|
||||
"blank to get the next available ID value.") % {
|
||||
'id' : id}
|
||||
ErrorDialog(msg1, msg2)
|
||||
ErrorDialog(msg1, msg2, parent=self.window)
|
||||
self.ok_button.set_sensitive(True)
|
||||
return
|
||||
|
||||
|
||||
@@ -290,7 +290,7 @@ class EditMedia(EditPrimary):
|
||||
"%(prim_object)s'. Please enter a different ID or leave "
|
||||
"blank to get the next available ID value.") % {
|
||||
'id' : id, 'prim_object' : name }
|
||||
ErrorDialog(msg1, msg2)
|
||||
ErrorDialog(msg1, msg2, parent=self.window)
|
||||
self.ok_button.set_sensitive(True)
|
||||
return
|
||||
|
||||
@@ -304,7 +304,7 @@ class EditMedia(EditPrimary):
|
||||
"value '%(path)s'. This path does not exist!"
|
||||
" Please enter a different path") % {
|
||||
'path' : path }
|
||||
ErrorDialog(msg1, msg2)
|
||||
ErrorDialog(msg1, msg2, parent=self.window)
|
||||
self.ok_button.set_sensitive(True)
|
||||
return
|
||||
|
||||
|
||||
@@ -382,7 +382,8 @@ class EditName(EditSecondary):
|
||||
) % { 'surname' : surname,
|
||||
'group_name':group_as},
|
||||
_("Continue"),
|
||||
_("Return to Name Editor"))
|
||||
_("Return to Name Editor"),
|
||||
parent=self.window)
|
||||
val = q.run()
|
||||
if val:
|
||||
#delete the grouping link on database
|
||||
@@ -414,7 +415,8 @@ class EditName(EditSecondary):
|
||||
) % { 'surname' : surname,
|
||||
'group_name':group_as},
|
||||
_("Group all"),
|
||||
_("Group this name only"))
|
||||
_("Group this name only"),
|
||||
parent=self.window)
|
||||
val = q.run()
|
||||
if val:
|
||||
if group_as == surname :
|
||||
|
||||
@@ -301,7 +301,8 @@ class EditNote(EditPrimary):
|
||||
if self.object_is_empty():
|
||||
ErrorDialog(_("Cannot save note"),
|
||||
_("No data exists for this note. Please "
|
||||
"enter data or cancel the edit."))
|
||||
"enter data or cancel the edit."),
|
||||
parent=self.window)
|
||||
self.ok_button.set_sensitive(True)
|
||||
return
|
||||
|
||||
@@ -313,7 +314,7 @@ class EditNote(EditPrimary):
|
||||
"enter a different ID or leave "
|
||||
"blank to get the next available ID value.") % {
|
||||
'id' : id }
|
||||
ErrorDialog(msg1, msg2)
|
||||
ErrorDialog(msg1, msg2, parent=self.window)
|
||||
self.ok_button.set_sensitive(True)
|
||||
return
|
||||
|
||||
|
||||
@@ -811,7 +811,7 @@ class EditPerson(EditPrimary):
|
||||
msg = _("Changing the gender caused problems "
|
||||
"with marriage information.\nPlease check "
|
||||
"the person's marriages.")
|
||||
ErrorDialog(msg2, msg)
|
||||
ErrorDialog(msg2, msg, parent=self.window)
|
||||
|
||||
def save(self, *obj):
|
||||
"""
|
||||
@@ -821,7 +821,8 @@ class EditPerson(EditPrimary):
|
||||
if self.object_is_empty():
|
||||
ErrorDialog(_("Cannot save person"),
|
||||
_("No data exists for this person. Please "
|
||||
"enter data or cancel the edit."))
|
||||
"enter data or cancel the edit."),
|
||||
parent=self.window)
|
||||
self.ok_button.set_sensitive(True)
|
||||
return
|
||||
# fix surname problems
|
||||
@@ -849,7 +850,7 @@ class EditPerson(EditPrimary):
|
||||
"%(prim_object)s'. Please enter a different ID or leave "
|
||||
"blank to get the next available ID value.") % {
|
||||
'id' : id, 'prim_object' : name }
|
||||
ErrorDialog(msg1, msg2)
|
||||
ErrorDialog(msg1, msg2, parent=self.window)
|
||||
self.ok_button.set_sensitive(True)
|
||||
return
|
||||
|
||||
|
||||
@@ -229,4 +229,5 @@ class EditPersonRef(EditSecondary):
|
||||
ErrorDialog(
|
||||
_('No person selected'),
|
||||
_('You must either select a person or Cancel '
|
||||
'the edit'))
|
||||
'the edit'),
|
||||
parent=self.window)
|
||||
|
||||
@@ -272,7 +272,7 @@ class EditPlace(EditPrimary):
|
||||
if self.obj.get_name().get_value().strip() == '':
|
||||
msg1 = _("Cannot save place. Name not entered.")
|
||||
msg2 = _("You must enter a name before saving.")
|
||||
ErrorDialog(msg1, msg2)
|
||||
ErrorDialog(msg1, msg2, parent=self.window)
|
||||
self.ok_button.set_sensitive(True)
|
||||
return
|
||||
|
||||
@@ -286,7 +286,7 @@ class EditPlace(EditPrimary):
|
||||
"%(prim_object)s'. Please enter a different ID or leave "
|
||||
"blank to get the next available ID value.") % {
|
||||
'id' : id, 'prim_object' : name }
|
||||
ErrorDialog(msg1, msg2)
|
||||
ErrorDialog(msg1, msg2, parent=self.window)
|
||||
self.ok_button.set_sensitive(True)
|
||||
return
|
||||
|
||||
|
||||
@@ -35,9 +35,46 @@ from .editsecondary import EditSecondary
|
||||
from ..glade import Glade
|
||||
from ..widgets import MonitoredDate, MonitoredEntry
|
||||
from ..dialog import ErrorDialog
|
||||
from gramps.gen.errors import ValidationError
|
||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.gettext
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Constants
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
ISO_CODES = (
|
||||
'aa', 'ab', 'ae', 'af', 'ak', 'am', 'an', 'ar', 'as', 'av', 'ay', 'az',
|
||||
'ba', 'be', 'bg', 'bh', 'bi', 'bm', 'bn', 'bo', 'br', 'bs',
|
||||
'ca', 'ce', 'ch', 'co', 'cr', 'cs', 'cu', 'cv', 'cy',
|
||||
'da', 'de', 'dv', 'dz',
|
||||
'ee', 'el', 'en', 'eo', 'es', 'et', 'eu',
|
||||
'fa', 'ff', 'fi', 'fj', 'fo', 'fr', 'fy',
|
||||
'ga', 'gd', 'gl', 'gn', 'gu', 'gv',
|
||||
'ha', 'he', 'hi', 'ho', 'hr', 'ht', 'hu', 'hy', 'hz',
|
||||
'ia', 'id', 'ie', 'ig', 'ii', 'ik', 'io', 'is', 'it', 'iu',
|
||||
'ja', 'jv',
|
||||
'ka', 'kg', 'ki', 'kj', 'kk', 'kl', 'km', 'kn', 'ko', 'kr', 'ks', 'ku', 'kv',
|
||||
'kw', 'ky',
|
||||
'la', 'lb', 'lg', 'li', 'ln', 'lo', 'lt', 'lu', 'lv',
|
||||
'mg', 'mh', 'mi', 'mk', 'ml', 'mn', 'mr', 'ms', 'mt', 'my',
|
||||
'na', 'nb', 'nd', 'ne', 'ng', 'nl', 'nn', 'no', 'nr', 'nv', 'ny',
|
||||
'oc', 'oj', 'om', 'or', 'os',
|
||||
'pa', 'pi', 'pl', 'ps', 'pt',
|
||||
'qu',
|
||||
'rm', 'rn', 'ro', 'ru', 'rw',
|
||||
'sa', 'sc', 'sd', 'se', 'sg', 'si', 'sk', 'sl', 'sm', 'sn', 'so', 'sq', 'sr',
|
||||
'ss', 'st', 'su', 'sv', 'sw',
|
||||
'ta', 'te', 'tg', 'th', 'ti', 'tk', 'tl', 'tn', 'to', 'tr', 'ts', 'tt', 'tw',
|
||||
'ty',
|
||||
'ug', 'uk', 'ur', 'uz',
|
||||
've', 'vi', 'vo',
|
||||
'wa', 'wo',
|
||||
'xh',
|
||||
'yi', 'yo',
|
||||
'za', 'zh', 'zu')
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# EditPlaceName class
|
||||
@@ -75,6 +112,13 @@ class EditPlaceName(EditSecondary):
|
||||
self.language = MonitoredEntry(
|
||||
self.top.get_object("language"), self.obj.set_language,
|
||||
self.obj.get_language, self.db.readonly)
|
||||
self.language.connect("validate", self._validate_iso_code)
|
||||
#force validation now with initial entry
|
||||
self.top.get_object("language").validate(force=True)
|
||||
|
||||
def _validate_iso_code(self, widget, text):
|
||||
if text not in ISO_CODES:
|
||||
return ValidationError(_("Invalid ISO code"))
|
||||
|
||||
def _connect_signals(self):
|
||||
self.define_help_button(self.top.get_object('help'))
|
||||
@@ -87,7 +131,8 @@ class EditPlaceName(EditSecondary):
|
||||
def save(self, *obj):
|
||||
if not self.obj.get_value():
|
||||
ErrorDialog(_("Cannot save place name"),
|
||||
_("The place name cannot be empty"))
|
||||
_("The place name cannot be empty"),
|
||||
parent=self.window)
|
||||
return
|
||||
|
||||
if self.callback:
|
||||
|
||||
@@ -274,7 +274,7 @@ class EditPlaceRef(EditReference):
|
||||
if self.source.get_name().get_value().strip() == '':
|
||||
msg1 = _("Cannot save place. Name not entered.")
|
||||
msg2 = _("You must enter a name before saving.")
|
||||
ErrorDialog(msg1, msg2)
|
||||
ErrorDialog(msg1, msg2, parent=self.window)
|
||||
self.ok_button.set_sensitive(True)
|
||||
return
|
||||
|
||||
|
||||
@@ -297,6 +297,6 @@ class EditReference(ManagedWindow, DbGUIElement):
|
||||
"different ID or leave blank to get the next "
|
||||
"available ID value.") % {
|
||||
'id' : new_id}
|
||||
ErrorDialog(msg1, msg2)
|
||||
ErrorDialog(msg1, msg2, parent=self.window)
|
||||
return True
|
||||
return False
|
||||
|
||||
@@ -167,7 +167,8 @@ class EditRepository(EditPrimary):
|
||||
if self.object_is_empty():
|
||||
ErrorDialog(_("Cannot save repository"),
|
||||
_("No data exists for this repository. Please "
|
||||
"enter data or cancel the edit."))
|
||||
"enter data or cancel the edit."),
|
||||
parent=self.window)
|
||||
self.ok_button.set_sensitive(True)
|
||||
return
|
||||
|
||||
@@ -181,7 +182,7 @@ class EditRepository(EditPrimary):
|
||||
"%(prim_object)s'. Please enter a different ID or leave "
|
||||
"blank to get the next available ID value.") % {
|
||||
'id' : id, 'prim_object' : name }
|
||||
ErrorDialog(msg1, msg2)
|
||||
ErrorDialog(msg1, msg2, parent=self.window)
|
||||
self.ok_button.set_sensitive(True)
|
||||
return
|
||||
|
||||
|
||||
@@ -187,7 +187,8 @@ class EditSource(EditPrimary):
|
||||
if self.object_is_empty():
|
||||
ErrorDialog(_("Cannot save source"),
|
||||
_("No data exists for this source. Please "
|
||||
"enter data or cancel the edit."))
|
||||
"enter data or cancel the edit."),
|
||||
parent=self.window)
|
||||
self.ok_button.set_sensitive(True)
|
||||
return
|
||||
|
||||
@@ -201,7 +202,7 @@ class EditSource(EditPrimary):
|
||||
"%(prim_object)s'. Please enter a different ID or leave "
|
||||
"blank to get the next available ID value.") % {
|
||||
'id' : id, 'prim_object' : name }
|
||||
ErrorDialog(msg1, msg2)
|
||||
ErrorDialog(msg1, msg2, parent=self.window)
|
||||
self.ok_button.set_sensitive(True)
|
||||
return
|
||||
|
||||
|
||||
@@ -453,6 +453,7 @@ class EditRule(ManagedWindow):
|
||||
self.valuebox = self.get_widget('valuebox')
|
||||
self.rname = self.get_widget('ruletree')
|
||||
self.rule_name = self.get_widget('rulename')
|
||||
self.description = self.get_widget('description')
|
||||
|
||||
self.notebook = Gtk.Notebook()
|
||||
self.notebook.set_show_tabs(0)
|
||||
@@ -462,7 +463,6 @@ class EditRule(ManagedWindow):
|
||||
self.page_num = 0
|
||||
self.page = []
|
||||
self.class2page = {}
|
||||
the_map = {}
|
||||
|
||||
if self.namespace == 'Person':
|
||||
class_list = rules.person.editor_rule_list
|
||||
@@ -490,10 +490,6 @@ class EditRule(ManagedWindow):
|
||||
pos = 0
|
||||
l2 = Gtk.Label(label=class_obj.name, halign=Gtk.Align.START)
|
||||
l2.show()
|
||||
c = Gtk.TreeView()
|
||||
#c.set_data('d', pos)
|
||||
c.show()
|
||||
the_map[class_obj] = c
|
||||
grid = Gtk.Grid()
|
||||
grid.set_border_width(12)
|
||||
grid.set_column_spacing(6)
|
||||
@@ -639,7 +635,7 @@ class EditRule(ManagedWindow):
|
||||
else:
|
||||
self.sel_class = None
|
||||
|
||||
keys = sorted(the_map, key=lambda x: x.name, reverse=True)
|
||||
keys = sorted(class_list, key=lambda x: x.name, reverse=True)
|
||||
catlist = sorted(set(class_obj.category for class_obj in keys))
|
||||
|
||||
for category in catlist:
|
||||
@@ -728,23 +724,22 @@ class EditRule(ManagedWindow):
|
||||
Update the informational display on the right hand side of the dialog
|
||||
box with the description of the selected report.
|
||||
"""
|
||||
|
||||
store, node = self.selection.get_selected()
|
||||
if node:
|
||||
try:
|
||||
class_obj = store.get_value(node, 1)
|
||||
self.display_values(class_obj)
|
||||
except:
|
||||
self.valuebox.set_sensitive(0)
|
||||
self.rule_name.set_text(_('No rule selected'))
|
||||
self.get_widget('description').set_text('')
|
||||
class_obj = store.get_value(node, 1)
|
||||
self.display_values(class_obj)
|
||||
|
||||
def display_values(self, class_obj):
|
||||
page = self.class2page[class_obj]
|
||||
self.notebook.set_current_page(page)
|
||||
self.valuebox.set_sensitive(1)
|
||||
self.rule_name.set_text(class_obj.name)
|
||||
self.get_widget('description').set_text(class_obj.description)
|
||||
if class_obj in self.class2page:
|
||||
page = self.class2page[class_obj]
|
||||
self.notebook.set_current_page(page)
|
||||
self.valuebox.set_sensitive(1)
|
||||
self.rule_name.set_text(class_obj.name)
|
||||
self.description.set_text(class_obj.description)
|
||||
else:
|
||||
self.valuebox.set_sensitive(0)
|
||||
self.rule_name.set_text(_('No rule selected'))
|
||||
self.description.set_text('')
|
||||
|
||||
def rule_ok(self, obj):
|
||||
if self.rule_name.get_text() == _('No rule selected'):
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# Copyright (C) 2002-2006 Donald N. Allingham
|
||||
# Copyright (C) 2008 Gary Burton
|
||||
# Copyright (C) 2010 Nick Hall
|
||||
# Copyright (C) 2010,2015 Nick Hall
|
||||
#
|
||||
# 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
|
||||
@@ -45,7 +45,7 @@ from gramps.gen.lib import Place, PlaceType
|
||||
from .. import build_filter_model
|
||||
from . import SidebarFilter
|
||||
from gramps.gen.filters import GenericFilterFactory, rules
|
||||
from gramps.gen.filters.rules.place import (RegExpIdOf, HasData, HasTitle,
|
||||
from gramps.gen.filters.rules.place import (RegExpIdOf, HasData, IsEnclosedBy,
|
||||
HasTag, HasNoteRegexp,
|
||||
MatchesFilter)
|
||||
|
||||
@@ -61,7 +61,6 @@ class PlaceSidebarFilter(SidebarFilter):
|
||||
self.clicked_func = clicked
|
||||
|
||||
self.filter_id = widgets.BasicEntry()
|
||||
self.filter_title = widgets.BasicEntry()
|
||||
self.filter_name = widgets.BasicEntry()
|
||||
self.filter_place = Place()
|
||||
self.filter_place.set_type((PlaceType.CUSTOM, ''))
|
||||
@@ -72,6 +71,7 @@ class PlaceSidebarFilter(SidebarFilter):
|
||||
self.filter_place.set_type,
|
||||
self.filter_place.get_type)
|
||||
self.filter_code = widgets.BasicEntry()
|
||||
self.filter_enclosed = widgets.PlaceEntry(dbstate, uistate, [])
|
||||
self.filter_note = widgets.BasicEntry()
|
||||
|
||||
self.filter_regex = Gtk.CheckButton(label=_('Use regular expressions'))
|
||||
@@ -95,10 +95,10 @@ class PlaceSidebarFilter(SidebarFilter):
|
||||
self.tag.add_attribute(cell, 'text', 0)
|
||||
|
||||
self.add_text_entry(_('ID'), self.filter_id)
|
||||
self.add_text_entry(_('Title'), self.filter_title)
|
||||
self.add_text_entry(_('Name'), self.filter_name)
|
||||
self.add_entry(_('Type'), self.ptype)
|
||||
self.add_text_entry(_('Code'), self.filter_code)
|
||||
self.add_text_entry(_('Enclosed By'), self.filter_enclosed)
|
||||
self.add_text_entry(_('Note'), self.filter_note)
|
||||
self.add_entry(_('Tag'), self.tag)
|
||||
self.add_filter_entry(_('Custom filter'), self.generic)
|
||||
@@ -106,9 +106,9 @@ class PlaceSidebarFilter(SidebarFilter):
|
||||
|
||||
def clear(self, obj):
|
||||
self.filter_id.set_text('')
|
||||
self.filter_title.set_text('')
|
||||
self.filter_name.set_text('')
|
||||
self.filter_code.set_text('')
|
||||
self.filter_enclosed.set_text('')
|
||||
self.filter_note.set_text('')
|
||||
self.ptype.get_child().set_text('')
|
||||
self.tag.set_active(0)
|
||||
@@ -116,16 +116,16 @@ class PlaceSidebarFilter(SidebarFilter):
|
||||
|
||||
def get_filter(self):
|
||||
gid = str(self.filter_id.get_text()).strip()
|
||||
title = str(self.filter_title.get_text()).strip()
|
||||
name = str(self.filter_name.get_text()).strip()
|
||||
ptype = self.filter_place.get_type().xml_str()
|
||||
code = str(self.filter_code.get_text()).strip()
|
||||
enclosed = str(self.filter_enclosed.get_text()).strip()
|
||||
note = str(self.filter_note.get_text()).strip()
|
||||
regex = self.filter_regex.get_active()
|
||||
tag = self.tag.get_active() > 0
|
||||
gen = self.generic.get_active() > 0
|
||||
|
||||
empty = not (gid or title or name or ptype or code or note or regex
|
||||
empty = not (gid or name or ptype or code or enclosed or note or regex
|
||||
or tag or gen)
|
||||
if empty:
|
||||
generic_filter = None
|
||||
@@ -135,8 +135,8 @@ class PlaceSidebarFilter(SidebarFilter):
|
||||
rule = RegExpIdOf([gid], use_regex=regex)
|
||||
generic_filter.add_rule(rule)
|
||||
|
||||
if title:
|
||||
rule = HasTitle([title], use_regex=regex)
|
||||
if enclosed:
|
||||
rule = IsEnclosedBy([enclosed])
|
||||
generic_filter.add_rule(rule)
|
||||
|
||||
rule = HasData([name, ptype, code], use_regex=regex)
|
||||
|
||||
@@ -108,26 +108,12 @@
|
||||
<property name="label" translatable="yes">Language:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="justify">center</property>
|
||||
<property name="mnemonic_widget">language</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="UndoableEntry" id="language">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Language in which the name is written.</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="invisible_char">●</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="date_stat">
|
||||
<property name="visible">True</property>
|
||||
@@ -180,7 +166,7 @@
|
||||
<object class="UndoableEntry" id="value">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes" context="place">The name of the place.</property>
|
||||
<property name="tooltip_text" translatable="yes">The name of the place.</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="invisible_char">●</property>
|
||||
</object>
|
||||
@@ -197,13 +183,25 @@
|
||||
<property name="label" translatable="yes">Name:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="justify">center</property>
|
||||
<property name="mnemonic_widget">language</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="ValidatableMaskedEntry" id="language">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Language in which the name is written. Valid values are two character ISO codes. For example: en, fr, de, nl ...</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="invisible_char">●</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
|
||||
@@ -423,7 +423,7 @@ primary data for the merged place.</property>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="name_btn1">
|
||||
<property name="label" translatable="yes" context="place">Name:</property>
|
||||
<property name="label" translatable="yes">Name:</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
@@ -440,7 +440,7 @@ primary data for the merged place.</property>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="name_btn2">
|
||||
<property name="label" translatable="yes" context="place">Name:</property>
|
||||
<property name="label" translatable="yes">Name:</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
|
||||
@@ -879,10 +879,13 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="margin_left">12</property>
|
||||
<property name="margin_right">12</property>
|
||||
<property name="label" translatable="yes">No rule selected</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="width_chars">40</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -917,6 +920,8 @@
|
||||
<property name="margin_right">12</property>
|
||||
<property name="label" translatable="yes">No description</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="width_chars">40</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
||||
@@ -160,7 +160,7 @@ class Gramps(object):
|
||||
from .dialog import WarningDialog
|
||||
import gettext
|
||||
|
||||
_display_welcome_message()
|
||||
#_display_welcome_message()
|
||||
|
||||
# Append image directory to the theme search path
|
||||
theme = Gtk.IconTheme.get_default()
|
||||
|
||||
@@ -117,6 +117,8 @@ def _initialize_options(options, dbstate, uistate):
|
||||
if not dbase.get_family_from_gramps_id(value):
|
||||
person_handle = uistate.get_active('Person')
|
||||
person = dbase.get_person_from_handle(person_handle)
|
||||
if person is None:
|
||||
continue
|
||||
family_list = person.get_family_handle_list()
|
||||
if family_list:
|
||||
family_handle = family_list[0]
|
||||
@@ -959,7 +961,7 @@ class BookDialog(DocReportDialog):
|
||||
|
||||
def make_document(self):
|
||||
"""Create a document of the type requested by the user."""
|
||||
user = User()
|
||||
user = User(uistate=self.uistate)
|
||||
self.rptlist = []
|
||||
selected_style = StyleSheet()
|
||||
|
||||
|
||||
@@ -279,10 +279,17 @@ class PaperFrame(Gtk.Box):
|
||||
return paper_margins
|
||||
|
||||
def get_custom_paper_size(self):
|
||||
width = float(self.pwidth.get_text().replace(",", ".")) * \
|
||||
"""Get and validate custom paper size values from dialog entries.
|
||||
Float values returned.
|
||||
"""
|
||||
try:
|
||||
width = float(self.pwidth.get_text().replace(",", ".")) * \
|
||||
self.paper_unit_multiplier
|
||||
height = float(self.pheight.get_text().replace(",", ".")) * \
|
||||
height = float(self.pheight.get_text().replace(",", ".")) * \
|
||||
self.paper_unit_multiplier
|
||||
except ValueError:
|
||||
width = float(21.0)
|
||||
height = float(29.7)
|
||||
|
||||
paper_size = [max(width, 1.0), max(height, 1.0)]
|
||||
|
||||
|
||||
@@ -692,7 +692,7 @@ def report(dbstate, uistate, person, report_class, options_class,
|
||||
if response == Gtk.ResponseType.OK:
|
||||
dialog.close()
|
||||
try:
|
||||
user = User()
|
||||
user = User(uistate=uistate)
|
||||
MyReport = report_class(dialog.db, dialog.options, user)
|
||||
MyReport.doc.init()
|
||||
MyReport.begin_report()
|
||||
|
||||
@@ -136,7 +136,8 @@ class StyleListDisplay(object):
|
||||
self.sheetlist.save()
|
||||
except IOError as msg:
|
||||
from ...dialog import ErrorDialog
|
||||
ErrorDialog(_("Error saving stylesheet"), str(msg))
|
||||
ErrorDialog(_("Error saving stylesheet"),
|
||||
str(msg), parent=self.window)
|
||||
except:
|
||||
log.error("Failed to save stylesheet", exc_info=True)
|
||||
|
||||
|
||||
+4
-1
@@ -67,7 +67,10 @@ class User(user.User):
|
||||
:type steps: int
|
||||
:returns: none
|
||||
"""
|
||||
self._progress = ProgressMeter(title)
|
||||
if self.uistate:
|
||||
self._progress = ProgressMeter(title, parent=self.uistate.window)
|
||||
else:
|
||||
self._progress = ProgressMeter(title)
|
||||
if steps > 0:
|
||||
self._progress.set_pass(message, steps, ProgressMeter.MODE_FRACTION)
|
||||
else:
|
||||
|
||||
@@ -358,7 +358,8 @@ class ViewManager(CLIManager):
|
||||
|
||||
self.window = Gtk.Window()
|
||||
self.window.set_icon_from_file(ICON)
|
||||
self.window.set_has_resize_grip(True)
|
||||
if Gtk.get_minor_version() < 14:
|
||||
self.window.set_has_resize_grip(True)
|
||||
self.window.set_default_size(width, height)
|
||||
|
||||
vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
|
||||
@@ -663,7 +664,7 @@ class ViewManager(CLIManager):
|
||||
"""
|
||||
Initialize the interface.
|
||||
"""
|
||||
self.views = get_available_views()
|
||||
self.views = get_available_views(self.uistate)
|
||||
defaults = views_to_show(self.views,
|
||||
config.get('preferences.use-last-view'))
|
||||
self.current_views = defaults[2]
|
||||
@@ -764,7 +765,7 @@ class ViewManager(CLIManager):
|
||||
try:
|
||||
backup(self.dbstate.db)
|
||||
except DbException as msg:
|
||||
ErrorDialog(_("Error saving backup data"), msg)
|
||||
ErrorDialog(_("Error saving backup data"), msg, parent=self.uistate.window)
|
||||
self.uistate.set_busy_cursor(False)
|
||||
self.uistate.progress.hide()
|
||||
|
||||
@@ -779,7 +780,8 @@ class ViewManager(CLIManager):
|
||||
_("Aborting changes will return the database to the state "
|
||||
"it was before you started this editing session."),
|
||||
_("Abort changes"),
|
||||
_("Cancel"))
|
||||
_("Cancel"),
|
||||
parent=self.uistate.window)
|
||||
|
||||
if dialog.run():
|
||||
self.dbstate.db.disable_signals()
|
||||
@@ -791,7 +793,8 @@ class ViewManager(CLIManager):
|
||||
_("Cannot abandon session's changes"),
|
||||
_('Changes cannot be completely abandoned because the '
|
||||
'number of changes made in the session exceeded the '
|
||||
'limit.'))
|
||||
'limit.'),
|
||||
parent=self.uistate.window)
|
||||
|
||||
def __init_action_group(self, name, actions, sensitive=True, toggles=None):
|
||||
"""
|
||||
@@ -1608,7 +1611,8 @@ def run_plugin(pdata, dbstate, uistate):
|
||||
'gramps_bugtracker_url' : URL_BUGHOME,
|
||||
'firstauthoremail': pdata.authors_email[0] if
|
||||
pdata.authors_email else '...',
|
||||
'error_msg': pmgr.get_fail_list()[-1][1][1]})
|
||||
'error_msg': pmgr.get_fail_list()[-1][1][1]},
|
||||
parent=uistate.window)
|
||||
return
|
||||
|
||||
if pdata.ptype == REPORT:
|
||||
@@ -1633,7 +1637,7 @@ def make_plugin_callback(pdata, dbstate, uistate):
|
||||
"""
|
||||
return lambda x: run_plugin(pdata, dbstate, uistate)
|
||||
|
||||
def get_available_views():
|
||||
def get_available_views(uistate):
|
||||
"""
|
||||
Query the views and determine what views to show and in which order
|
||||
|
||||
@@ -1664,7 +1668,8 @@ def get_available_views():
|
||||
'gramps_bugtracker_url' : URL_BUGHOME,
|
||||
'firstauthoremail': pdata.authors_email[0] if
|
||||
pdata.authors_email else '...',
|
||||
'error_msg': lasterror})
|
||||
'error_msg': lasterror},
|
||||
parent=uistate.window)
|
||||
continue
|
||||
viewclass = getattr(mod, pdata.viewclass)
|
||||
|
||||
|
||||
@@ -409,7 +409,8 @@ class CitationBookmarks(ListBookmarks) :
|
||||
"You are probably trying to bookmark a Source in the "
|
||||
"Citation Tree View. In this view, only Citations "
|
||||
"can be bookmarked. To bookmark a Source, switch to "
|
||||
"the Source View")
|
||||
"the Source View",
|
||||
parent=self.uistate.window)
|
||||
|
||||
def connect_signals(self):
|
||||
self.dbstate.db.connect('citation-delete', self.remove_handles)
|
||||
|
||||
@@ -447,7 +447,8 @@ class ListView(NavigationView):
|
||||
WarningDialog(
|
||||
_("Could Not Set a Bookmark"),
|
||||
_("A bookmark could not be set because "
|
||||
"nothing was selected."))
|
||||
"nothing was selected."),
|
||||
parent=self.uistate.window)
|
||||
|
||||
####################################################################
|
||||
#
|
||||
@@ -541,7 +542,8 @@ class ListView(NavigationView):
|
||||
_("More than one item has been selected for deletion. "
|
||||
"Select the option indicating how to delete the items:"),
|
||||
_("Delete All"),
|
||||
_("Confirm Each Delete"))
|
||||
_("Confirm Each Delete"),
|
||||
parent=self.uistate.window)
|
||||
prompt = not q.run()
|
||||
|
||||
if not prompt:
|
||||
@@ -563,7 +565,8 @@ class ListView(NavigationView):
|
||||
descr = object.get_gramps_id()
|
||||
self.uistate.set_busy_cursor(True)
|
||||
QuestionDialog(_('Delete %s?') % descr, msg,
|
||||
_('_Delete Item'), query.query_response)
|
||||
_('_Delete Item'), query.query_response,
|
||||
parent=self.uistate.window)
|
||||
self.uistate.set_busy_cursor(False)
|
||||
else:
|
||||
query.query_response()
|
||||
|
||||
@@ -254,7 +254,8 @@ class NavigationView(PageView):
|
||||
WarningDialog(
|
||||
_("Could Not Set a Bookmark"),
|
||||
_("A bookmark could not be set because "
|
||||
"no one was selected."))
|
||||
"no one was selected."),
|
||||
parent=self.uistate.window)
|
||||
|
||||
def edit_bookmarks(self, obj):
|
||||
"""
|
||||
@@ -343,7 +344,7 @@ class NavigationView(PageView):
|
||||
"""
|
||||
A dialog to move to a Gramps ID entered by the user.
|
||||
"""
|
||||
dialog = Gtk.Dialog(_('Jump to by Gramps ID'))
|
||||
dialog = Gtk.Dialog(_('Jump to by Gramps ID'), parent=self.uistate.window)
|
||||
dialog.set_border_width(12)
|
||||
label = Gtk.Label(label='<span weight="bold" size="larger">%s</span>' %
|
||||
_('Jump to by Gramps ID'))
|
||||
|
||||
@@ -81,9 +81,9 @@ TAG_3 = '''
|
||||
</popup>
|
||||
</ui>'''
|
||||
|
||||
WIKI_HELP_PAGE = '%s_-_Entering_and_Editing_Data:_Detailed_-_part_3' % \
|
||||
URL_MANUAL_PAGE
|
||||
WIKI_HELP_SEC = _('manual|Tags')
|
||||
WIKI_HELP_PAGE = '%s_-_Filters' % \
|
||||
URL_MANUAL_PAGE
|
||||
WIKI_HELP_SEC = _('manual|Tagging')
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@@ -485,7 +485,9 @@ class OrganizeTagsDialog(object):
|
||||
_("The tag definition will be removed. "
|
||||
"The tag will be also removed from all objects in the database."),
|
||||
_("Yes"),
|
||||
_("No"))
|
||||
_("No"),
|
||||
parent=top)
|
||||
|
||||
prompt = yes_no.run()
|
||||
if prompt:
|
||||
|
||||
@@ -571,7 +573,8 @@ class EditTag(object):
|
||||
if not self.tag.get_name():
|
||||
ErrorDialog(
|
||||
_("Cannot save tag"),
|
||||
_("The tag name cannot be empty"))
|
||||
_("The tag name cannot be empty"),
|
||||
parent=self.top)
|
||||
return
|
||||
|
||||
if not self.tag.get_handle():
|
||||
|
||||
@@ -28,6 +28,7 @@ from .expandcollapsearrow import *
|
||||
from .labels import *
|
||||
from .linkbox import *
|
||||
from .photo import *
|
||||
from .placeentry import *
|
||||
from .monitoredwidgets import *
|
||||
from .selectionwidget import SelectionWidget, Region
|
||||
from .shortlistcomboentry import *
|
||||
|
||||
@@ -47,7 +47,11 @@ from gramps.gen.constfunc import has_display
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
if has_display():
|
||||
HAND_CURSOR = Gdk.Cursor.new(Gdk.CursorType.HAND2)
|
||||
if Gtk.get_minor_version() < 16:
|
||||
HAND_CURSOR = Gdk.Cursor.new(Gdk.CursorType.HAND2)
|
||||
else:
|
||||
HAND_CURSOR = Gdk.Cursor.new_for_display(Gdk.Display.get_default(),
|
||||
Gdk.CursorType.HAND2)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
@@ -197,14 +197,32 @@ GRABBERS_SWITCH = [
|
||||
|
||||
# cursors
|
||||
try:
|
||||
CURSOR_UPPER = Gdk.Cursor.new(Gdk.CursorType.TOP_SIDE)
|
||||
CURSOR_LOWER = Gdk.Cursor.new(Gdk.CursorType.BOTTOM_SIDE)
|
||||
CURSOR_LEFT = Gdk.Cursor.new(Gdk.CursorType.LEFT_SIDE)
|
||||
CURSOR_RIGHT = Gdk.Cursor.new(Gdk.CursorType.RIGHT_SIDE)
|
||||
CURSOR_UPPER_LEFT = Gdk.Cursor.new(Gdk.CursorType.TOP_LEFT_CORNER)
|
||||
CURSOR_UPPER_RIGHT = Gdk.Cursor.new(Gdk.CursorType.TOP_RIGHT_CORNER)
|
||||
CURSOR_LOWER_LEFT = Gdk.Cursor.new(Gdk.CursorType.BOTTOM_LEFT_CORNER)
|
||||
CURSOR_LOWER_RIGHT = Gdk.Cursor.new(Gdk.CursorType.BOTTOM_RIGHT_CORNER)
|
||||
if Gtk.get_minor_version() < 16:
|
||||
CURSOR_UPPER = Gdk.Cursor.new(Gdk.CursorType.TOP_SIDE)
|
||||
CURSOR_LOWER = Gdk.Cursor.new(Gdk.CursorType.BOTTOM_SIDE)
|
||||
CURSOR_LEFT = Gdk.Cursor.new(Gdk.CursorType.LEFT_SIDE)
|
||||
CURSOR_RIGHT = Gdk.Cursor.new(Gdk.CursorType.RIGHT_SIDE)
|
||||
CURSOR_UPPER_LEFT = Gdk.Cursor.new(Gdk.CursorType.TOP_LEFT_CORNER)
|
||||
CURSOR_UPPER_RIGHT = Gdk.Cursor.new(Gdk.CursorType.TOP_RIGHT_CORNER)
|
||||
CURSOR_LOWER_LEFT = Gdk.Cursor.new(Gdk.CursorType.BOTTOM_LEFT_CORNER)
|
||||
CURSOR_LOWER_RIGHT = Gdk.Cursor.new(Gdk.CursorType.BOTTOM_RIGHT_CORNER)
|
||||
else:
|
||||
CURSOR_UPPER = Gdk.Cursor.new_for_display(Gdk.Display.get_default(),
|
||||
Gdk.CursorType.TOP_SIDE)
|
||||
CURSOR_LOWER = Gdk.Cursor.new_for_display(Gdk.Display.get_default(),
|
||||
Gdk.CursorType.BOTTOM_SIDE)
|
||||
CURSOR_LEFT = Gdk.Cursor.new_for_display(Gdk.Display.get_default(),
|
||||
Gdk.CursorType.LEFT_SIDE)
|
||||
CURSOR_RIGHT = Gdk.Cursor.new_for_display(Gdk.Display.get_default(),
|
||||
Gdk.CursorType.RIGHT_SIDE)
|
||||
CURSOR_UPPER_LEFT = Gdk.Cursor.new_for_display(Gdk.Display.get_default(),
|
||||
Gdk.CursorType.TOP_LEFT_CORNER)
|
||||
CURSOR_UPPER_RIGHT = Gdk.Cursor.new_for_display(Gdk.Display.get_default(),
|
||||
Gdk.CursorType.TOP_RIGHT_CORNER)
|
||||
CURSOR_LOWER_LEFT = Gdk.Cursor.new_for_display(Gdk.Display.get_default(),
|
||||
Gdk.CursorType.BOTTOM_LEFT_CORNER)
|
||||
CURSOR_LOWER_RIGHT = Gdk.Cursor.new_for_display(Gdk.Display.get_default(),
|
||||
Gdk.CursorType.BOTTOM_RIGHT_CORNER)
|
||||
except:
|
||||
CURSOR_UPPER = None
|
||||
CURSOR_LOWER = None
|
||||
|
||||
@@ -57,7 +57,11 @@ from ..utils import rgb_to_hex
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
if has_display():
|
||||
HAND_CURSOR = Gdk.Cursor.new(Gdk.CursorType.HAND2)
|
||||
if Gtk.get_minor_version() < 16:
|
||||
HAND_CURSOR = Gdk.Cursor.new(Gdk.CursorType.HAND2)
|
||||
else:
|
||||
HAND_CURSOR = Gdk.Cursor.new_for_display(Gdk.Display.get_default(),
|
||||
Gdk.CursorType.HAND2)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2015 Nick Hall
|
||||
#
|
||||
# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
|
||||
__all__ = ["PlaceEntry"]
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Standard python modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import logging
|
||||
_LOG = logging.getLogger(".widgets.placeentry")
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# GTK/Gnome modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gi.repository import Gtk
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Gramps modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from ..selectors import SelectorFactory
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# PlaceEntry class
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class PlaceEntry(Gtk.Box):
|
||||
|
||||
def __init__(self, dbstate, uistate, track):
|
||||
Gtk.Box.__init__(self)
|
||||
self.dbstate = dbstate
|
||||
self.uistate = uistate
|
||||
self.track = track
|
||||
self.entry = Gtk.Entry()
|
||||
self.entry.set_width_chars(5)
|
||||
self.pack_start(self.entry, True, True, 0)
|
||||
image = Gtk.Image()
|
||||
image.set_from_icon_name('gtk-index', Gtk.IconSize.BUTTON)
|
||||
button = Gtk.Button()
|
||||
button.set_image(image)
|
||||
button.set_relief(Gtk.ReliefStyle.NORMAL)
|
||||
self.pack_start(button, False, True, 0)
|
||||
button.connect('clicked', self.on_clicked)
|
||||
self.show_all()
|
||||
|
||||
def on_clicked(self, button):
|
||||
SelectPlace = SelectorFactory('Place')
|
||||
sel = SelectPlace(self.dbstate, self.uistate, self.track)
|
||||
place = sel.run()
|
||||
if place:
|
||||
self.set_text(place.gramps_id)
|
||||
|
||||
def get_text(self):
|
||||
return self.entry.get_text()
|
||||
|
||||
def set_text(self, text):
|
||||
self.entry.set_text(text)
|
||||
@@ -171,14 +171,14 @@ class SelectionWidget(Gtk.ScrolledWindow):
|
||||
"""
|
||||
|
||||
__gsignals__ = {
|
||||
"region-modified": (GObject.SIGNAL_RUN_FIRST, None, ()),
|
||||
"region-created": (GObject.SIGNAL_RUN_FIRST, None, ()),
|
||||
"region-selected": (GObject.SIGNAL_RUN_FIRST, None, ()),
|
||||
"selection-cleared": (GObject.SIGNAL_RUN_FIRST, None, ()),
|
||||
"right-button-clicked": (GObject.SIGNAL_RUN_FIRST, None, ()),
|
||||
"zoomed-in": (GObject.SIGNAL_RUN_FIRST, None, ()),
|
||||
"zoomed-out": (GObject.SIGNAL_RUN_FIRST, None, ())
|
||||
}
|
||||
"region-modified": (GObject.SignalFlags.RUN_FIRST, None, ()),
|
||||
"region-created": (GObject.SignalFlags.RUN_FIRST, None, ()),
|
||||
"region-selected": (GObject.SignalFlags.RUN_FIRST, None, ()),
|
||||
"selection-cleared": (GObject.SignalFlags.RUN_FIRST, None, ()),
|
||||
"right-button-clicked": (GObject.SignalFlags.RUN_FIRST, None, ()),
|
||||
"zoomed-in": (GObject.SignalFlags.RUN_FIRST, None, ()),
|
||||
"zoomed-out": (GObject.SignalFlags.RUN_FIRST, None, ())
|
||||
}
|
||||
|
||||
def __init__(self):
|
||||
"""
|
||||
|
||||
@@ -1116,16 +1116,21 @@ class ValidatableMaskedEntry(MaskedEntry):
|
||||
'changed': 'override',
|
||||
}
|
||||
|
||||
if GLib.MINOR_VERSION < 42:
|
||||
__gparam = GObject.PARAM_READWRITE
|
||||
else:
|
||||
__gparam = GObject.ParamFlags.READWRITE
|
||||
|
||||
__gproperties__ = {
|
||||
'data-type': (GObject.TYPE_PYOBJECT,
|
||||
'Data Type of the widget',
|
||||
'Type object',
|
||||
GObject.PARAM_READWRITE),
|
||||
__gparam),
|
||||
'mandatory': (GObject.TYPE_BOOLEAN,
|
||||
'Mandatory',
|
||||
'Mandatory',
|
||||
False,
|
||||
GObject.PARAM_READWRITE),
|
||||
__gparam),
|
||||
}
|
||||
|
||||
# FIXME put the data type support back
|
||||
|
||||
@@ -83,7 +83,7 @@ class SvgDrawDoc(BaseDoc, DrawDoc):
|
||||
name = "%s.svg" % self.root
|
||||
|
||||
try:
|
||||
self.f = open(name,"w")
|
||||
self.f = open(name,"w", encoding="utf-8")
|
||||
except IOError as msg:
|
||||
raise ReportError(_("Could not create %s") % name, msg)
|
||||
except:
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||
# Copyright (C) 2007-2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
# Copyright (C) 2010-2015 Craig J. Anderson
|
||||
# Copyright (C) 2014 Paul Franklin
|
||||
# Copyright (C) 2010-2015 Craig J. Anderson
|
||||
#
|
||||
# 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
|
||||
@@ -943,11 +943,12 @@ class AncestorTreeOptions(MenuReportOptions):
|
||||
|
||||
self.__check_blank()
|
||||
|
||||
self.__include_images = BooleanOption(
|
||||
_('Include thumbnail images of people'), False)
|
||||
self.__include_images.set_help(
|
||||
_("Whether to include thumbnails of people."))
|
||||
menu.add_option(category_name, "includeImages", self.__include_images)
|
||||
# TODO this code is never used and so I conclude it is for future use
|
||||
# self.__include_images = BooleanOption(
|
||||
# _('Include thumbnail images of people'), False)
|
||||
# self.__include_images.set_help(
|
||||
# _("Whether to include thumbnails of people."))
|
||||
# menu.add_option(category_name, "includeImages", self.__include_images)
|
||||
|
||||
#category_name = _("Notes")
|
||||
|
||||
@@ -1046,13 +1047,12 @@ class AncestorTreeOptions(MenuReportOptions):
|
||||
graph_style.set_fill_color((255, 255, 255))
|
||||
default_style.add_draw_style("AC2-note-box", graph_style)
|
||||
|
||||
# TODO - Why is this here twice?
|
||||
#graph_style = GraphicsStyle()
|
||||
#graph_style.set_paragraph_style("AC2-Title")
|
||||
#graph_style.set_color((0, 0, 0))
|
||||
#graph_style.set_fill_color((255, 255, 255))
|
||||
#graph_style.set_line_width(0)
|
||||
#default_style.add_draw_style("AC2-Title", graph_style)
|
||||
graph_style = GraphicsStyle()
|
||||
graph_style.set_paragraph_style("AC2-Title")
|
||||
graph_style.set_color((0, 0, 0))
|
||||
graph_style.set_fill_color((255, 255, 255))
|
||||
graph_style.set_line_width(0)
|
||||
default_style.add_draw_style("AC2-Title", graph_style)
|
||||
|
||||
graph_style = GraphicsStyle()
|
||||
default_style.add_draw_style("AC2-line", graph_style)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
# Copyright (C) 2007-2008 Brian G. Matherly
|
||||
# Copyright (C) 2008 Peter Landgren
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
# Copyright (C) 2012-2014 Paul Franklin
|
||||
# Copyright (C) 2012-2015 Paul Franklin
|
||||
#
|
||||
# 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
|
||||
@@ -763,12 +763,12 @@ class StatisticsChart(Report):
|
||||
% mapping )
|
||||
else:
|
||||
span_string = self._("Persons born "
|
||||
"%(year_from)04d-%(year_to)04d"
|
||||
% mapping )
|
||||
"%(year_from)04d-%(year_to)04d") % mapping
|
||||
|
||||
# extract requested items from the database and count them
|
||||
self._user.begin_progress(_('Statistics Charts'),
|
||||
_('Collecting data...'), 0)
|
||||
_('Collecting data...'),
|
||||
database.get_number_of_people())
|
||||
tables = _Extract.collect_data(self.database, self.filter, menu,
|
||||
gender, year_from, year_to,
|
||||
get_value('no_years'),
|
||||
@@ -785,16 +785,12 @@ class StatisticsChart(Report):
|
||||
# generate sorted item lookup index index
|
||||
lookup = self.index_items(table[1], sortby, reverse)
|
||||
# document heading
|
||||
heading = "%(str1)s -- %(str2)s\n%(str3)s" % {
|
||||
heading = "%(str1)s -- %(str2)s" % {
|
||||
'str1' : self._(table[0]),
|
||||
'str2' : span_string,
|
||||
'str3' : filter_name }
|
||||
self.data.append((heading, table[0], table[1], lookup))
|
||||
'str2' : span_string }
|
||||
self.data.append((heading, filter_name, table[0], table[1], lookup))
|
||||
self._user.step_progress()
|
||||
self._user.end_progress()
|
||||
#DEBUG
|
||||
#print heading
|
||||
#print table[1]
|
||||
|
||||
def index_items(self, data, sort, reverse):
|
||||
"""creates & stores a sorted index for the items"""
|
||||
@@ -818,21 +814,21 @@ class StatisticsChart(Report):
|
||||
mark = IndexMark(self._('Statistics Charts'), INDEX_TYPE_TOC, 1)
|
||||
self._user.begin_progress(_('Statistics Charts'),
|
||||
_('Saving charts...'), len(self.data))
|
||||
for data in self.data:
|
||||
for data in sorted(self.data):
|
||||
self.doc.start_page()
|
||||
if mark:
|
||||
self.doc.draw_text('SC-title', '', 0, 0, mark) # put it in TOC
|
||||
mark = None # crock, but we only want one of them
|
||||
if len(data[2]) < self.bar_items:
|
||||
self.output_piechart(*data[:4])
|
||||
if len(data[3]) < self.bar_items:
|
||||
self.output_piechart(*data[:5])
|
||||
else:
|
||||
self.output_barchart(*data[:4])
|
||||
self.output_barchart(*data[:5])
|
||||
self.doc.end_page()
|
||||
self._user.step_progress()
|
||||
self._user.end_progress()
|
||||
|
||||
|
||||
def output_piechart(self, title, typename, data, lookup):
|
||||
def output_piechart(self, title1, title2, typename, data, lookup):
|
||||
|
||||
# set layout variables
|
||||
middle_w = self.doc.get_usable_width() / 2
|
||||
@@ -840,11 +836,12 @@ class StatisticsChart(Report):
|
||||
middle = min(middle_w,middle_h)
|
||||
|
||||
# start output
|
||||
mark = IndexMark(title, INDEX_TYPE_TOC, 2)
|
||||
self.doc.center_text('SC-title', title, middle_w, 0, mark)
|
||||
style_sheet = self.doc.get_style_sheet()
|
||||
pstyle = style_sheet.get_paragraph_style('SC-Title')
|
||||
mark = IndexMark(title1, INDEX_TYPE_TOC, 2)
|
||||
self.doc.center_text('SC-title', title1, middle_w, 0, mark)
|
||||
yoffset = ReportUtils.pt2cm(pstyle.get_font().get_size())
|
||||
self.doc.center_text('SC-title', title2, middle_w, yoffset)
|
||||
|
||||
# collect data for output
|
||||
color = 0
|
||||
@@ -872,7 +869,7 @@ class StatisticsChart(Report):
|
||||
draw_legend(self.doc, legendx, yoffset, chart_data, text,'SC-legend')
|
||||
|
||||
|
||||
def output_barchart(self, title, typename, data, lookup):
|
||||
def output_barchart(self, title1, title2, typename, data, lookup):
|
||||
|
||||
pt2cm = ReportUtils.pt2cm
|
||||
style_sheet = self.doc.get_style_sheet()
|
||||
@@ -895,11 +892,12 @@ class StatisticsChart(Report):
|
||||
maxsize = stopx - margin
|
||||
|
||||
# start output
|
||||
mark = IndexMark(title, INDEX_TYPE_TOC, 2)
|
||||
self.doc.center_text('SC-title', title, middle, 0, mark)
|
||||
pstyle = style_sheet.get_paragraph_style('SC-Title')
|
||||
mark = IndexMark(title1, INDEX_TYPE_TOC, 2)
|
||||
self.doc.center_text('SC-title', title1, middle, 0, mark)
|
||||
yoffset = pt2cm(pstyle.get_font().get_size())
|
||||
self.doc.center_text('SC-title', title2, middle, yoffset)
|
||||
yoffset = 2 * pt2cm(pstyle.get_font().get_size())
|
||||
#print title
|
||||
|
||||
# header
|
||||
yoffset += (row_h + pad)
|
||||
@@ -921,7 +919,6 @@ class StatisticsChart(Report):
|
||||
# text after bar
|
||||
text = "%s (%d)" % (self._(key), data[key])
|
||||
self.doc.draw_text('SC-text', text, textx, yoffset)
|
||||
#print key + ":",
|
||||
|
||||
return
|
||||
|
||||
|
||||
@@ -736,7 +736,7 @@ class GrampsXmlWriter(UpdateCallback):
|
||||
value = place_name.get_value()
|
||||
date = place_name.get_date_object()
|
||||
lang = place_name.get_language()
|
||||
self.g.write('%s<name value="%s"' % (sp, self.fix(value)))
|
||||
self.g.write('%s<pname value="%s"' % (sp, self.fix(value)))
|
||||
if lang:
|
||||
self.g.write(' lang="%s"' % self.fix(lang))
|
||||
if date.is_empty():
|
||||
@@ -744,7 +744,7 @@ class GrampsXmlWriter(UpdateCallback):
|
||||
else:
|
||||
self.g.write('>\n')
|
||||
self.write_date(date, index+1)
|
||||
self.g.write('%s</name>\n' % sp)
|
||||
self.g.write('%s</pname>\n' % sp)
|
||||
|
||||
def write_event(self,event,index=1):
|
||||
if not event:
|
||||
|
||||
@@ -254,6 +254,8 @@ class RelGraphReport(Report):
|
||||
if self.includeimg:
|
||||
self.bUseHtmlOutput = True
|
||||
person = self.database.get_person_from_handle(person_handle)
|
||||
if person is None:
|
||||
continue
|
||||
p_id = person.get_gramps_id()
|
||||
# Output the person's node
|
||||
label = self.get_person_label(person)
|
||||
@@ -272,6 +274,8 @@ class RelGraphReport(Report):
|
||||
family_list = person.get_family_handle_list()
|
||||
for fam_handle in family_list:
|
||||
family = self.database.get_family_from_handle(fam_handle)
|
||||
if family is None:
|
||||
continue
|
||||
if fam_handle not in families_done:
|
||||
families_done[fam_handle] = 1
|
||||
self.__add_family(fam_handle)
|
||||
|
||||
@@ -690,7 +690,8 @@ class GrampsParser(UpdateCallback):
|
||||
"places": (None, self.stop_places),
|
||||
"placeobj": (self.start_placeobj, self.stop_placeobj),
|
||||
"placeref": (self.start_placeref, self.stop_placeref),
|
||||
"ptitle": (None, self.stop_ptitle),
|
||||
"ptitle": (None, self.stop_ptitle),
|
||||
"pname": (self.start_place_name, self.stop_place_name),
|
||||
"location": (self.start_location, None),
|
||||
"lds_ord": (self.start_lds_ord, self.stop_lds_ord),
|
||||
"temple": (self.start_temple, None),
|
||||
@@ -1701,7 +1702,7 @@ class GrampsParser(UpdateCallback):
|
||||
def start_name(self, attrs):
|
||||
if self.person:
|
||||
self.start_person_name(attrs)
|
||||
else:
|
||||
if self.placeobj: # XML 1.7.0
|
||||
self.start_place_name(attrs)
|
||||
|
||||
def start_place_name(self, attrs):
|
||||
@@ -2691,7 +2692,7 @@ class GrampsParser(UpdateCallback):
|
||||
def stop_name(self, attrs):
|
||||
if self.person:
|
||||
self.stop_person_name(attrs)
|
||||
else:
|
||||
if self.placeobj: # XML 1.7.0
|
||||
self.stop_place_name(attrs)
|
||||
|
||||
def stop_place_name(self, tag):
|
||||
|
||||
+115
-113
@@ -1917,6 +1917,7 @@ class GedcomParser(UpdateCallback):
|
||||
self.default_tag = None
|
||||
self.dir_path = os.path.dirname(filename)
|
||||
self.is_ftw = False
|
||||
self.addr_is_detail = False
|
||||
self.groups = None
|
||||
self.want_parse_warnings = True
|
||||
|
||||
@@ -2909,7 +2910,7 @@ class GedcomParser(UpdateCallback):
|
||||
return True
|
||||
return False
|
||||
|
||||
def __find_place(self, title, location):
|
||||
def __find_place(self, title, location, placeref_list):
|
||||
"""
|
||||
Finds an existing place based on the title and primary location.
|
||||
|
||||
@@ -2923,31 +2924,43 @@ class GedcomParser(UpdateCallback):
|
||||
place = self.dbase.get_place_from_handle(place_handle)
|
||||
if place.get_title() == title:
|
||||
if self.__loc_is_empty(location) and \
|
||||
self.__loc_is_empty(self.__get_first_loc(place)):
|
||||
self.__loc_is_empty(self.__get_first_loc(place)) and \
|
||||
place.get_placeref_list() == placeref_list:
|
||||
return place
|
||||
elif (not self.__loc_is_empty(location) and \
|
||||
not self.__loc_is_empty(self.__get_first_loc(place)) and
|
||||
self.__get_first_loc(place).is_equivalent(location) == IDENTICAL):
|
||||
self.__get_first_loc(place).is_equivalent(location) == IDENTICAL) and \
|
||||
place.get_placeref_list() == placeref_list:
|
||||
return place
|
||||
return None
|
||||
|
||||
def __create_place(self, title, location):
|
||||
def __add_place(self, event, sub_state):
|
||||
"""
|
||||
Create a new place based on the title and primary location.
|
||||
Add a new place to an event if not already present, or update a
|
||||
place.
|
||||
|
||||
@param title: The place title
|
||||
@type title: string
|
||||
@param location: The current location
|
||||
@type location: gen.lib.Location
|
||||
@return gen.lib.Place
|
||||
@param event: The event
|
||||
@type event: gen.lib.Event
|
||||
@param substate: The sub-state for PLAC or ADDR elements (i.e. parsed by
|
||||
event_parse_tbl)
|
||||
@type sub_state: CurrentState
|
||||
"""
|
||||
place = Place()
|
||||
place.set_title(title)
|
||||
if location:
|
||||
place.add_alternate_locations(location)
|
||||
self.dbase.add_place(place, self.trans)
|
||||
self.place_names[title].append(place.get_handle())
|
||||
return place
|
||||
if sub_state.place:
|
||||
# see whether this place already exists
|
||||
place = self.__find_place(sub_state.place.get_title(),
|
||||
self.__get_first_loc(sub_state.place),
|
||||
sub_state.place.get_placeref_list())
|
||||
if place is None:
|
||||
place = sub_state.place
|
||||
self.dbase.add_place(place, self.trans)
|
||||
self.place_names[place.get_title()].append(place.get_handle())
|
||||
event.set_place_handle(place.get_handle())
|
||||
else:
|
||||
place.merge(sub_state.place)
|
||||
self.dbase.commit_place(place, self.trans)
|
||||
event.set_place_handle(place.get_handle())
|
||||
place_title = place_displayer.display(self.dbase, place)
|
||||
sub_state.pf.load_place(self.place_import, place, place_title)
|
||||
|
||||
def __find_file(self, fullname, altpath):
|
||||
tries = []
|
||||
@@ -3862,10 +3875,13 @@ class GedcomParser(UpdateCallback):
|
||||
sub_state.level = state.level+1
|
||||
sub_state.event = event
|
||||
sub_state.event_ref = event_ref
|
||||
sub_state.pf = self.place_parser
|
||||
|
||||
self.__parse_level(sub_state, self.event_parse_tbl, self.__undefined)
|
||||
state.msg += sub_state.msg
|
||||
|
||||
self.__add_place(event, sub_state)
|
||||
|
||||
self.dbase.commit_event(event, self.trans)
|
||||
event_ref.ref = event.handle
|
||||
state.person.add_event_ref(event_ref)
|
||||
@@ -4067,10 +4083,13 @@ class GedcomParser(UpdateCallback):
|
||||
sub_state.level = state.level+1
|
||||
sub_state.event = event
|
||||
sub_state.event_ref = event_ref
|
||||
sub_state.pf = self.place_parser
|
||||
|
||||
self.__parse_level(sub_state, self.event_parse_tbl, self.__undefined)
|
||||
state.msg += sub_state.msg
|
||||
|
||||
self.__add_place(event, sub_state)
|
||||
|
||||
self.dbase.add_event(event, self.trans)
|
||||
event_ref.ref = event.handle
|
||||
state.person.add_event_ref(event_ref)
|
||||
@@ -4518,12 +4537,15 @@ class GedcomParser(UpdateCallback):
|
||||
"""
|
||||
try:
|
||||
title = line.data
|
||||
place = self.__find_place(title, None)
|
||||
if place:
|
||||
state.place = place
|
||||
place = self.__find_place(title, None, None)
|
||||
if place is None:
|
||||
place = Place()
|
||||
place.set_title(title)
|
||||
self.dbase.add_place(place, self.trans)
|
||||
self.place_names[place.get_title()].append(place.get_handle())
|
||||
else:
|
||||
state.place = self.__create_place(title, None)
|
||||
state.lds_ord.set_place_handle(state.place.handle)
|
||||
pass
|
||||
state.lds_ord.set_place_handle(place.handle)
|
||||
except NameError:
|
||||
return
|
||||
|
||||
@@ -4887,10 +4909,13 @@ class GedcomParser(UpdateCallback):
|
||||
sub_state.level = state.level+1
|
||||
sub_state.event = event
|
||||
sub_state.event_ref = event_ref
|
||||
sub_state.pf = self.place_parser
|
||||
|
||||
self.__parse_level(sub_state, self.event_parse_tbl, self.__undefined)
|
||||
state.msg += sub_state.msg
|
||||
|
||||
self.__add_place(event, sub_state)
|
||||
|
||||
if event.type == EventType.MARRIAGE:
|
||||
descr = event.get_description()
|
||||
if descr == "Civil Union":
|
||||
@@ -4930,9 +4955,12 @@ class GedcomParser(UpdateCallback):
|
||||
sub_state.level = state.level+1
|
||||
sub_state.event = event
|
||||
sub_state.event_ref = event_ref
|
||||
sub_state.pf = self.place_parser
|
||||
|
||||
self.__parse_level(sub_state, self.event_parse_tbl, self.__undefined)
|
||||
state.msg += sub_state.msg
|
||||
|
||||
self.__add_place(event, sub_state)
|
||||
|
||||
self.dbase.commit_event(event, self.trans)
|
||||
event_ref.ref = event.handle
|
||||
@@ -5361,65 +5389,30 @@ class GedcomParser(UpdateCallback):
|
||||
state.event.set_description(line.data)
|
||||
else:
|
||||
title = line.data
|
||||
place_handle = state.event.get_place_handle()
|
||||
if place_handle:
|
||||
place = state.place
|
||||
if place:
|
||||
# We encounter a PLAC, having previously encountered an ADDR
|
||||
old_place = self.dbase.get_place_from_handle(place_handle)
|
||||
old_title = old_place.get_title()
|
||||
location = self.__get_first_loc(old_place)
|
||||
if old_title != "":
|
||||
if place.get_title() and place.get_title() != "":
|
||||
# We have previously found a PLAC
|
||||
self.__add_msg(_("A second PLAC ignored"), line, state)
|
||||
# ignore this second PLAC, and use the old one
|
||||
title = old_title
|
||||
place = old_place
|
||||
else:
|
||||
# This is the first PLAC
|
||||
refs = list(self.dbase.find_backlink_handles(place_handle))
|
||||
# We haven't commited the event yet, so the place will not
|
||||
# be linked to it. If there are any refs they will be from
|
||||
# other events (etc)
|
||||
if len(refs) == 0:
|
||||
place = self.__find_place(title, location)
|
||||
if place is None:
|
||||
place = old_place
|
||||
place.set_title(title)
|
||||
self.place_names[old_title].remove(place_handle)
|
||||
self.place_names[title].append(place_handle)
|
||||
else:
|
||||
place.merge(old_place)
|
||||
self.place_import.remove_location(old_place.handle)
|
||||
self.dbase.remove_place(place_handle, self.trans)
|
||||
self.place_names[old_title].remove(place_handle)
|
||||
else:
|
||||
place = self.__find_place(title, location)
|
||||
if place is None:
|
||||
place = self.__create_place(title, location)
|
||||
else:
|
||||
pass
|
||||
place.set_title(line.data)
|
||||
else:
|
||||
# The first thing we encounter is PLAC
|
||||
location = None
|
||||
place = self.__find_place(title, location)
|
||||
if place is None:
|
||||
place = self.__create_place(title, location)
|
||||
|
||||
state.event.set_place_handle(place.handle)
|
||||
|
||||
state.place = Place()
|
||||
place = state.place
|
||||
place.set_title(line.data)
|
||||
|
||||
sub_state = CurrentState()
|
||||
sub_state.place = place
|
||||
sub_state.level = state.level+1
|
||||
sub_state.pf = self.place_parser
|
||||
|
||||
self.__parse_level(sub_state, self.event_place_map,
|
||||
self.__undefined)
|
||||
state.msg += sub_state.msg
|
||||
|
||||
place_title = place_displayer.display(self.dbase, place)
|
||||
sub_state.pf.load_place(self.place_import, place, place_title)
|
||||
|
||||
self.dbase.commit_place(place, self.trans)
|
||||
|
||||
def __event_place_note(self, line, state):
|
||||
"""
|
||||
@param line: The current line in GedLine format
|
||||
@@ -5528,55 +5521,54 @@ class GedcomParser(UpdateCallback):
|
||||
self.__merge_address(free_form, sub_state.location, line, state)
|
||||
|
||||
location = sub_state.location
|
||||
place_handle = state.event.get_place_handle()
|
||||
if place_handle:
|
||||
# We encounter an ADDR having previously encountered a PLAC
|
||||
old_place = self.dbase.get_place_from_handle(place_handle)
|
||||
title = old_place.get_title()
|
||||
if len(old_place.get_alternate_locations()) != 0 and \
|
||||
not self.__get_first_loc(old_place).is_empty():
|
||||
# We have perviously found an ADDR, or have populated location
|
||||
# from PLAC title
|
||||
self.__add_msg(_("Location already populated; ADDR ignored"),
|
||||
line, state)
|
||||
# ignore this second ADDR, and use the old one
|
||||
location = self.__get_first_loc(old_place)
|
||||
place = old_place
|
||||
else:
|
||||
# This is the first ADDR
|
||||
refs = list(self.dbase.find_backlink_handles(place_handle))
|
||||
# We haven't commited the event yet, so the place will not be
|
||||
# linked to it. If there are any refs they will be from other
|
||||
# events (etc)
|
||||
if len(refs) == 0:
|
||||
place = self.__find_place(title, location)
|
||||
if place is None:
|
||||
place = old_place
|
||||
self.__add_location(place, location)
|
||||
else:
|
||||
place.merge(old_place)
|
||||
self.place_import.remove_location(old_place.handle)
|
||||
self.dbase.remove_place(place_handle, self.trans)
|
||||
self.place_names[title].remove(place_handle)
|
||||
else:
|
||||
place = self.__find_place(title, location)
|
||||
if place is None:
|
||||
place = self.__create_place(title, location)
|
||||
else:
|
||||
pass
|
||||
else:
|
||||
# The first thing we encounter is ADDR
|
||||
title = ""
|
||||
place = self.__find_place(title, location)
|
||||
|
||||
if self.addr_is_detail and state.place:
|
||||
# Commit the enclosing place
|
||||
place = self.__find_place(state.place.get_title(), None,
|
||||
state.place.get_placeref_list())
|
||||
if place is None:
|
||||
place = self.__create_place(title, location)
|
||||
place = state.place
|
||||
self.dbase.add_place(place, self.trans)
|
||||
self.place_names[place.get_title()].append(place.get_handle())
|
||||
else:
|
||||
place.merge(state.place)
|
||||
self.dbase.commit_place(place, self.trans)
|
||||
place_title = place_displayer.display(self.dbase, place)
|
||||
state.pf.load_place(self.place_import, place, place_title)
|
||||
|
||||
# Create the Place Details (it is committed with the event)
|
||||
place_detail = Place()
|
||||
place_detail.set_name(location.get_street())
|
||||
place_detail.set_title(location.get_street())
|
||||
# For RootsMagic etc. Place Details e.g. address, hospital, cemetary
|
||||
place_detail.set_type((PlaceType.CUSTOM, _("Detail")))
|
||||
placeref = PlaceRef()
|
||||
placeref.ref = place.get_handle()
|
||||
place_detail.set_placeref_list([placeref])
|
||||
state.place = place_detail
|
||||
else:
|
||||
place = state.place
|
||||
if place:
|
||||
# We encounter an ADDR having previously encountered a PLAC
|
||||
if len(place.get_alternate_locations()) != 0 and \
|
||||
not self.__get_first_loc(place).is_empty():
|
||||
# We have perviously found an ADDR, or have populated location
|
||||
# from PLAC title
|
||||
self.__add_msg(_("Location already populated; ADDR ignored"),
|
||||
line, state)
|
||||
# ignore this second ADDR, and use the old one
|
||||
else:
|
||||
# This is the first ADDR
|
||||
place.add_alternate_locations(location)
|
||||
else:
|
||||
# The first thing we encounter is ADDR
|
||||
state.place = Place()
|
||||
place = state.place
|
||||
place.add_alternate_locations(location)
|
||||
|
||||
# merge notes etc into place
|
||||
place.merge(sub_state.place)
|
||||
|
||||
state.event.set_place_handle(place.get_handle())
|
||||
self.dbase.commit_place(place, self.trans)
|
||||
|
||||
def __add_location(self, place, location):
|
||||
"""
|
||||
@param place: A place object we have found or created
|
||||
@@ -5608,12 +5600,10 @@ class GedcomParser(UpdateCallback):
|
||||
@param state: The current state
|
||||
@type state: CurrentState
|
||||
"""
|
||||
place_handle = state.event.get_place_handle()
|
||||
if place_handle:
|
||||
place = self.dbase.get_place_from_handle(place_handle)
|
||||
place = state.place
|
||||
if place:
|
||||
codes = [place.get_code(), line.data]
|
||||
place.set_code(' '.join(code for code in codes if code))
|
||||
self.dbase.commit_place(place, self.trans)
|
||||
|
||||
def __event_privacy(self, line, state):
|
||||
"""
|
||||
@@ -6925,6 +6915,11 @@ class GedcomParser(UpdateCallback):
|
||||
self.gedsource = self.gedmap.get_from_source_tag(line.data)
|
||||
if line.data.strip() in ["FTW", "FTM"]:
|
||||
self.is_ftw = True
|
||||
# Some software (e.g. RootsMagic (http://files.rootsmagic.com/PAF-
|
||||
# Book/RootsMagic-for-PAF-Users-Printable.pdf) use the Addr fields for
|
||||
# 'Place Details (address, hospital, cemetary)'
|
||||
if line.data.strip().lower() in ['rootsmagic']:
|
||||
self.addr_is_detail = True
|
||||
# We will use the approved system ID as the name of the generating
|
||||
# software, in case we do not get the name in the proper place
|
||||
self.genby = line.data
|
||||
@@ -7576,9 +7571,13 @@ class GedcomParser(UpdateCallback):
|
||||
sub_state.event_ref = event_ref
|
||||
sub_state.event = event
|
||||
sub_state.person = state.person
|
||||
sub_state.pf = self.place_parser
|
||||
|
||||
self.__parse_level(sub_state, event_map, self.__undefined)
|
||||
state.msg += sub_state.msg
|
||||
|
||||
self.__add_place(event, sub_state)
|
||||
|
||||
self.dbase.commit_event(event, self.trans)
|
||||
|
||||
event_ref.set_reference_handle(event.handle)
|
||||
@@ -7600,10 +7599,13 @@ class GedcomParser(UpdateCallback):
|
||||
sub_state.level = state.level+1
|
||||
sub_state.event = event
|
||||
sub_state.event_ref = event_ref
|
||||
sub_state.pf = self.place_parser
|
||||
|
||||
self.__parse_level(sub_state, event_map, self.__undefined)
|
||||
state.msg += sub_state.msg
|
||||
|
||||
self.__add_place(event, sub_state)
|
||||
|
||||
self.dbase.commit_event(event, self.trans)
|
||||
event_ref.set_reference_handle(event.handle)
|
||||
return event_ref
|
||||
|
||||
@@ -33,5 +33,5 @@
|
||||
# Public Constants
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
GRAMPS_XML_VERSION_TUPLE = (1, 7, 0) # version for Gramps 4.2
|
||||
GRAMPS_XML_VERSION_TUPLE = (1, 7, 1) # version for Gramps 4.2
|
||||
GRAMPS_XML_VERSION = '.'.join(str(i) for i in GRAMPS_XML_VERSION_TUPLE)
|
||||
|
||||
@@ -296,7 +296,8 @@ class BasePersonView(ListView):
|
||||
QuestionDialog(msg1,
|
||||
msg2,
|
||||
_('_Delete Person'),
|
||||
self.delete_person_response)
|
||||
self.delete_person_response,
|
||||
parent=self.uistate.window)
|
||||
else:
|
||||
# Ask to delete; option to cancel, delete rest
|
||||
# This gets person to delete from parameter
|
||||
@@ -304,7 +305,8 @@ class BasePersonView(ListView):
|
||||
self._message2_format,
|
||||
handles,
|
||||
self._lookup_person,
|
||||
yes_func=self.delete_person_response) # Yes
|
||||
yes_func=self.delete_person_response,
|
||||
parent=self.uistate.window) # Yes
|
||||
|
||||
def _message1_format(self, person):
|
||||
return _('Delete %s?') % (name_displayer.display(person) +
|
||||
@@ -417,7 +419,8 @@ class BasePersonView(ListView):
|
||||
_("Cannot merge people"),
|
||||
_("Exactly two people must be selected to perform a merge. "
|
||||
"A second person can be selected by holding down the "
|
||||
"control key while clicking on the desired person."))
|
||||
"control key while clicking on the desired person."),
|
||||
parent=self.uistate.window)
|
||||
else:
|
||||
MergePerson(self.dbstate, self.uistate, mlist[0], mlist[1])
|
||||
|
||||
|
||||
@@ -258,7 +258,7 @@ class PlaceBaseView(ListView):
|
||||
if not len(self.mapservicedata):
|
||||
msg = _("No map service is available.")
|
||||
msg2 = _("Check your installation.")
|
||||
ErrorDialog(msg, msg2)
|
||||
ErrorDialog(msg, msg2, parent=self.uistate.window)
|
||||
return
|
||||
|
||||
place_handles = self.selected_handles()
|
||||
@@ -269,7 +269,7 @@ class PlaceBaseView(ListView):
|
||||
msg2 = _("You need to select a place to be able to view it"
|
||||
" on a map. Some Map Services might support multiple"
|
||||
" selections.")
|
||||
ErrorDialog(msg, msg2)
|
||||
ErrorDialog(msg, msg2, parent=self.uistate.window)
|
||||
return
|
||||
|
||||
#TODO: support for descriptions in some cases. For now, pass None
|
||||
@@ -363,7 +363,7 @@ class PlaceBaseView(ListView):
|
||||
msg = _("Cannot delete place.")
|
||||
msg2 = _("This place is currently referenced by another place. "
|
||||
"First remove the places it contains.")
|
||||
ErrorDialog(msg, msg2)
|
||||
ErrorDialog(msg, msg2, parent=self.uistate.window)
|
||||
return
|
||||
self.remove_selected_objects()
|
||||
|
||||
@@ -406,14 +406,14 @@ class PlaceBaseView(ListView):
|
||||
msg2 = _("Exactly two places must be selected to perform a merge. "
|
||||
"A second place can be selected by holding down the "
|
||||
"control key while clicking on the desired place.")
|
||||
ErrorDialog(msg, msg2)
|
||||
ErrorDialog(msg, msg2, parent=self.uistate.window)
|
||||
else:
|
||||
if (located_in(self.dbstate.db, mlist[0], mlist[1]) or
|
||||
located_in(self.dbstate.db, mlist[1], mlist[0])):
|
||||
msg = _("Cannot merge places.")
|
||||
msg2 = _("Merging these places would create a cycle in the "
|
||||
"place hierarchy.")
|
||||
ErrorDialog(msg, msg2)
|
||||
ErrorDialog(msg, msg2, parent=self.uistate.window)
|
||||
else:
|
||||
MergePlace(self.dbstate, self.uistate, mlist[0], mlist[1],
|
||||
self.merged)
|
||||
|
||||
@@ -734,7 +734,7 @@ class VarString(object):
|
||||
|
||||
#return what we have
|
||||
return (self.state, curr_string)
|
||||
print("===" + str(self.state) + " '" + str(curr_string) + "'")
|
||||
#print("===" + str(self.state) + " '" + str(curr_string) + "'")
|
||||
|
||||
def extend(self, acquisition):
|
||||
"""
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user