Merge branch 'gramps50'

This commit is contained in:
Nick Hall 2017-06-22 17:47:33 +01:00
commit f6a2199f68
23 changed files with 319 additions and 241 deletions

View File

@ -43,6 +43,15 @@
2 NOTE @N0018@ 2 NOTE @N0018@
1 OBJE @M7@ 1 OBJE @M7@
1 OBJE @M8@ 1 OBJE @M8@
1 OBJE
2 FORM URL
2 FILE http:\\obje.form.on_person.org
1 BIRT
2 TYPE Birth of the Tester
2 DATE 2 OCT 1864
2 OBJE
3 FORM URL
3 FILE http:\\obje.form.on_event.org
0 @M1@ OBJE 0 @M1@ OBJE
1 FORM jpeg 1 FORM jpeg
1 TITL Multimedia link to linked form v5.5 blob 1 TITL Multimedia link to linked form v5.5 blob

View File

@ -3,17 +3,26 @@
"http://gramps-project.org/xml/1.7.1/grampsxml.dtd"> "http://gramps-project.org/xml/1.7.1/grampsxml.dtd">
<database xmlns="http://gramps-project.org/xml/1.7.1/"> <database xmlns="http://gramps-project.org/xml/1.7.1/">
<header> <header>
<created date="2016-08-29" version="5.0.0-alpha1"/> <created date="2017-05-30" version="5.0.0-alpha1"/>
<researcher> <researcher>
</researcher> </researcher>
</header> </header>
<events>
<event handle="_0000000f0000000f" change="1" id="E0000">
<type>Birth</type>
<dateval val="1864-10-02"/>
<description>Birth of the Tester</description>
<noteref hlink="_0000001000000010"/>
</event>
</events>
<people> <people>
<person handle="_0000000100000001" change="1472500307" id="I0001"> <person handle="_0000000100000001" change="1" id="I0001">
<gender>U</gender> <gender>U</gender>
<name type="Birth Name"> <name type="Birth Name">
<first>The</first> <first>The</first>
<surname>Tester</surname> <surname>Tester</surname>
</name> </name>
<eventref hlink="_0000000f0000000f" role="Primary"/>
<objref hlink="_0000000300000003"/> <objref hlink="_0000000300000003"/>
<objref hlink="_0000000400000004"/> <objref hlink="_0000000400000004"/>
<objref hlink="_0000000500000005"/> <objref hlink="_0000000500000005"/>
@ -25,106 +34,107 @@
<objref hlink="_0000000c0000000c"/> <objref hlink="_0000000c0000000c"/>
<objref hlink="_0000000d0000000d"/> <objref hlink="_0000000d0000000d"/>
<objref hlink="_0000000e0000000e"/> <objref hlink="_0000000e0000000e"/>
<noteref hlink="_0000000f0000000f"/> <url href="http:\\obje.form.on_person.org" type="Web Home"/>
<noteref hlink="_0000001100000011"/>
</person> </person>
</people> </people>
<citations> <citations>
<citation handle="_0000001b0000001b" change="1472500307" id="C0000"> <citation handle="_0000001d0000001d" change="1" id="C0000">
<confidence>0</confidence> <confidence>0</confidence>
<noteref hlink="_0000001a0000001a"/> <noteref hlink="_0000001c0000001c"/>
<sourceref hlink="_0000001900000019"/> <sourceref hlink="_0000001b0000001b"/>
</citation> </citation>
<citation handle="_0000002500000025" change="1472500307" id="C0001"> <citation handle="_0000002700000027" change="1" id="C0001">
<dateval val="2014-06-07"/> <dateval val="2014-06-07"/>
<page>77, 78 discussion of multimedia link with two files</page> <page>77, 78 discussion of multimedia link with two files</page>
<confidence>4</confidence> <confidence>4</confidence>
<noteref hlink="_0000002400000024"/> <noteref hlink="_0000002600000026"/>
<sourceref hlink="_0000002300000023"/> <sourceref hlink="_0000002500000025"/>
</citation> </citation>
</citations> </citations>
<sources> <sources>
<source handle="_0000001900000019" change="1472500307" id="S0002"> <source handle="_0000001b0000001b" change="1" id="S0002">
<stitle>A Great Photographer</stitle> <stitle>A Great Photographer</stitle>
</source> </source>
<source handle="_0000002300000023" change="1472500307" id="S0001"> <source handle="_0000002500000025" change="1" id="S0001">
<stitle>The Testers personal files</stitle> <stitle>The Testers personal files</stitle>
<sauthor>The Tester</sauthor> <sauthor>The Tester</sauthor>
<spubinfo>Name: Tester Publishing Operations, Inc.; Location: OSF world</spubinfo> <spubinfo>Name: Tester Publishing Operations, Inc.; Location: OSF world</spubinfo>
</source> </source>
</sources> </sources>
<objects> <objects>
<object handle="_0000000300000003" change="1472500307" id="O0000"> <object handle="_0000000300000003" change="1" id="O0000">
<file src="test_emb_55.jpg" mime="image/jpeg" description="Multimedia link embedded form v5.5"/> <file src="test_emb_55.jpg" mime="image/jpeg" description="Multimedia link embedded form v5.5"/>
<noteref hlink="_0000000200000002"/> <noteref hlink="_0000000200000002"/>
</object> </object>
<object handle="_0000000400000004" change="548708291" id="M1"> <object handle="_0000000400000004" change="548708291" id="M1">
<file src="" mime="" description="Multimedia link to linked form v5.5 blob"/> <file src="" mime="" description="Multimedia link to linked form v5.5 blob"/>
<attribute type="REFN" value="Ref12345M1"> <attribute type="REFN" value="Ref12345M1">
<noteref hlink="_0000001000000010"/> <noteref hlink="_0000001200000012"/>
</attribute> </attribute>
<attribute type="RIN" value="ID09876M1"/> <attribute type="RIN" value="ID09876M1"/>
<noteref hlink="_0000001100000011"/> <noteref hlink="_0000001300000013"/>
<noteref hlink="_0000001200000012"/> <noteref hlink="_0000001400000014"/>
</object> </object>
<object handle="_0000000500000005" change="548797681" id="M3"> <object handle="_0000000500000005" change="548797681" id="M3">
<file src="test.jpg" mime="image/jpeg" description="Multimedia link to linked form Gramps style v5.5ish file"/> <file src="test.jpg" mime="image/jpeg" description="Multimedia link to linked form Gramps style v5.5ish file"/>
<noteref hlink="_0000001500000015"/> <noteref hlink="_0000001700000017"/>
<noteref hlink="_0000001600000016"/> <noteref hlink="_0000001800000018"/>
</object> </object>
<object handle="_0000000600000006" change="548883481" id="M4"> <object handle="_0000000600000006" change="548883481" id="M4">
<file src="test.jpg" mime="image/jpeg" description="Multimedia link to linked form v5.5.1 file"/> <file src="test.jpg" mime="image/jpeg" description="Multimedia link to linked form v5.5.1 file"/>
<attribute type="Media-Type" value="Photo"/> <attribute type="Media-Type" value="Photo"/>
<attribute type="REFN" value="Ref1234567M4"> <attribute type="REFN" value="Ref1234567M4">
<noteref hlink="_0000001700000017"/> <noteref hlink="_0000001900000019"/>
</attribute> </attribute>
<attribute type="RIN" value="ID098765M4"/> <attribute type="RIN" value="ID098765M4"/>
<noteref hlink="_0000001800000018"/> <noteref hlink="_0000001a0000001a"/>
<noteref hlink="_0000001c0000001c"/> <noteref hlink="_0000001e0000001e"/>
<citationref hlink="_0000001b0000001b"/> <citationref hlink="_0000001d0000001d"/>
</object> </object>
<object handle="_0000000800000008" change="1472500307" id="O0001"> <object handle="_0000000800000008" change="1" id="O0001">
<file src="test_emb_551.jpg" mime="image/jpeg" description="Multimedia link embedded form v5.5.1"/> <file src="test_emb_551.jpg" mime="image/jpeg" description="Multimedia link embedded form v5.5.1"/>
<attribute type="Media-Type" value="Photo"/> <attribute type="Media-Type" value="Photo"/>
<noteref hlink="_0000000700000007"/> <noteref hlink="_0000000700000007"/>
</object> </object>
<object handle="_0000000900000009" change="1472500307" id="M5"> <object handle="_0000000900000009" change="1" id="M5">
<file src="test.jpg" mime="image/jpeg" description="Multimedia link to linked form FTM style file"/> <file src="test.jpg" mime="image/jpeg" description="Multimedia link to linked form FTM style file"/>
<datestr val="6/4/2016 9:33:57 AM"/>
<noteref hlink="_0000001d0000001d"/>
<noteref hlink="_0000001e0000001e"/>
<noteref hlink="_0000001f0000001f"/> <noteref hlink="_0000001f0000001f"/>
<noteref hlink="_0000002000000020"/> <noteref hlink="_0000002000000020"/>
<noteref hlink="_0000002100000021"/>
<noteref hlink="_0000002200000022"/>
<datestr val="6/4/2016 9:33:57 AM"/>
</object> </object>
<object handle="_0000000a0000000a" change="549056401" id="M6"> <object handle="_0000000a0000000a" change="549056401" id="M6">
<file src="test.jpg" mime="image/jpeg" description="Multimedia link to linked form v5.5.1 with two files(1)"/> <file src="test.jpg" mime="image/jpeg" description="Multimedia link to linked form v5.5.1 with two files(1)"/>
<attribute type="Media-Type" value="Photo"/> <attribute type="Media-Type" value="Photo"/>
<attribute type="REFN" value="Ref1234567M6"> <attribute type="REFN" value="Ref1234567M6">
<noteref hlink="_0000002100000021"/> <noteref hlink="_0000002300000023"/>
</attribute> </attribute>
<attribute type="RIN" value="ID098765M6"/> <attribute type="RIN" value="ID098765M6"/>
<noteref hlink="_0000002200000022"/> <noteref hlink="_0000002400000024"/>
<noteref hlink="_0000002600000026"/> <noteref hlink="_0000002800000028"/>
<citationref hlink="_0000002500000025"/> <citationref hlink="_0000002700000027"/>
</object> </object>
<object handle="_0000000c0000000c" change="1472500307" id="O0002"> <object handle="_0000000c0000000c" change="1" id="O0002">
<file src="http://www.geni.com/photo/view?photo_id=6000000001341319061" mime="unknown" description="Multimedia link embedded form v5.5 URL"/> <file src="http://www.geni.com/photo/view?photo_id=6000000001341319061" mime="unknown" description="Multimedia link embedded form v5.5 URL"/>
<noteref hlink="_0000000b0000000b"/> <noteref hlink="_0000000b0000000b"/>
</object> </object>
<object handle="_0000000d0000000d" change="1472500307" id="M7"> <object handle="_0000000d0000000d" change="1" id="M7">
<file src="http://s6.postimg.org/8i2erq27l/Preserve_Record_Numbers_Option.png" mime="image/png" description="Multimedia link to linked form v5.5.1 with URL"/> <file src="http://s6.postimg.org/8i2erq27l/Preserve_Record_Numbers_Option.png" mime="image/png" description="Multimedia link to linked form v5.5.1 with URL"/>
<attribute type="Media-Type" value="Photo"/> <attribute type="Media-Type" value="Photo"/>
</object> </object>
<object handle="_0000000e0000000e" change="1472500307" id="M8"> <object handle="_0000000e0000000e" change="1" id="M8">
<file src="No_path_No_Title_NoForm.jpg" mime="image/jpeg" description="No_path_No_Title_NoForm.jpg"/> <file src="No_path_No_Title_NoForm.jpg" mime="image/jpeg" description="No_path_No_Title_NoForm.jpg"/>
<noteref hlink="_0000002700000027"/> <noteref hlink="_0000002900000029"/>
</object> </object>
<object handle="_0000001300000013" change="1472500307" id="M2"> <object handle="_0000001500000015" change="1" id="M2">
<file src="" mime="" description="2nd blob Multimedia link to linked form v5.5 blob"/> <file src="" mime="" description="2nd blob Multimedia link to linked form v5.5 blob"/>
<noteref hlink="_0000001400000014"/> <noteref hlink="_0000001600000016"/>
</object> </object>
</objects> </objects>
<notes> <notes>
<note handle="_0000000200000002" change="1472500307" id="N0010" type="Media Note"> <note handle="_0000000200000002" change="1" id="N0010" type="Media Note">
<text>Media note test: Multimedia link embedded form v5.5 <text>Media note test: Multimedia link embedded form v5.5
n OBJE {1:1} p.55 n OBJE {1:1} p.55
+1 FORM &lt;MULTIMEDIA_FORMAT&gt; {1:1} p.48 +1 FORM &lt;MULTIMEDIA_FORMAT&gt; {1:1} p.48
@ -132,7 +142,7 @@ n OBJE {1:1} p.55
+1 FILE &lt;MULTIMEDIA_FILE_REFERENCE&gt; {1:1} p.47 +1 FILE &lt;MULTIMEDIA_FILE_REFERENCE&gt; {1:1} p.47
+1 &lt;&lt;NOTE_STRUCTURE&gt;&gt; {0:M} p.33</text> +1 &lt;&lt;NOTE_STRUCTURE&gt;&gt; {0:M} p.33</text>
</note> </note>
<note handle="_0000000700000007" change="1472500307" id="N0014" type="Media Note"> <note handle="_0000000700000007" change="1" id="N0014" type="Media Note">
<text>Media note test: Multimedia link embedded form v5.5.1 <text>Media note test: Multimedia link embedded form v5.5.1
This note is not in the 5.5.1 spec, but is an obvious extrapolation from 5.5. This note is not in the 5.5.1 spec, but is an obvious extrapolation from 5.5.
n OBJE n OBJE
@ -141,23 +151,27 @@ n OBJE
+3 MEDI &lt;SOURCE_MEDIA_TYPE&gt; {0:1} p.62 +3 MEDI &lt;SOURCE_MEDIA_TYPE&gt; {0:1} p.62
+1 TITL &lt;DESCRIPTIVE_TITLE&gt; {0:1} p.48</text> +1 TITL &lt;DESCRIPTIVE_TITLE&gt; {0:1} p.48</text>
</note> </note>
<note handle="_0000000b0000000b" change="1472500307" id="N0018" type="Media Note"> <note handle="_0000000b0000000b" change="1" id="N0018" type="Media Note">
<text>Multimedia embedded 2nd copy v5.5</text> <text>Multimedia embedded 2nd copy v5.5</text>
</note> </note>
<note handle="_0000000f0000000f" change="1472500307" id="N0000" type="GEDCOM import"> <note handle="_0000001000000010" change="1" id="N0000" type="Event Note">
<text>http:\\obje.form.on_event.org</text>
</note>
<note handle="_0000001100000011" change="1" id="N0001" type="GEDCOM import">
<text>Records not imported into INDI (individual) Gramps ID I0001: <text>Records not imported into INDI (individual) Gramps ID I0001:
Could not import test_emb_55.jpg Line 18: 1 OBJE Could not import test_emb_55.jpg Line 18: 1 OBJE
Could not import test_emb_551.jpg Line 26: 1 OBJE Could not import test_emb_551.jpg Line 26: 1 OBJE
Could not import test_emb_55.jpg Line 34: 1 OBJE</text> Could not import test_emb_55.jpg Line 34: 1 OBJE
</text>
<style name="fontface" value="Monospace"> <style name="fontface" value="Monospace">
<range start="0" end="326"/> <range start="0" end="326"/>
</style> </style>
</note> </note>
<note handle="_0000001000000010" change="1472500307" id="N0001" type="REFN-TYPE"> <note handle="_0000001200000012" change="1" id="N0002" type="REFN-TYPE">
<text>SOMETEXT</text> <text>SOMETEXT</text>
</note> </note>
<note handle="_0000001100000011" change="1472500307" id="N0011" type="Media Note"> <note handle="_0000001300000013" change="1" id="N0011" type="Media Note">
<text>Media note test: Multimedia link to linked form v5.5 blob <text>Media note test: Multimedia link to linked form v5.5 blob
n @XREF:OBJE@ OBJE {1:1} n @XREF:OBJE@ OBJE {1:1}
+1 FORM &lt;MULTIMEDIA_FORMAT&gt; {1:1} p.48 +1 FORM &lt;MULTIMEDIA_FORMAT&gt; {1:1} p.48
@ -171,10 +185,10 @@ n @XREF:OBJE@ OBJE {1:1}
+1 RIN &lt;AUTOMATED_RECORD_ID&gt; {0:1} p.38 +1 RIN &lt;AUTOMATED_RECORD_ID&gt; {0:1} p.38
+1 &lt;&lt;CHANGE_DATE&gt;&gt; {0:1} p.29</text> +1 &lt;&lt;CHANGE_DATE&gt;&gt; {0:1} p.29</text>
</note> </note>
<note handle="_0000001200000012" change="1472500307" id="N0002" type="GEDCOM import"> <note handle="_0000001400000014" change="1" id="N0003" type="GEDCOM import">
<text>Records not imported into OBJE (multi-media object) Gramps ID M1: <text>Records not imported into OBJE (multi-media object) Gramps ID M1:
Tag recognized but not supported Line 49: 1 BLOB Tag recognized but not supported Line 58: 1 BLOB
.HM.......k.1..F.jwA.Dzzzzw............A....1.........0U.66..E.8 .HM.......k.1..F.jwA.Dzzzzw............A....1.........0U.66..E.8
.......A..k.a6.A.......A..k.........../6....G.......0../..U..... .......A..k.a6.A.......A..k.........../6....G.......0../..U.....
.w1/m........HC0..../...zzzzzzzz..5zzk..AnA..U..W6U....2rRrRrRrR .w1/m........HC0..../...zzzzzzzz..5zzk..AnA..U..W6U....2rRrRrRrR
@ -182,23 +196,25 @@ Tag recognized but not supported Line 49:
/Dw/.Tvz.E5zzUE9/kHz.Tw2/DzzzEEA.kE2zk5yzk2/zzs21.U2/Dw/.Tw/.Tzy /Dw/.Tvz.E5zzUE9/kHz.Tw2/DzzzEEA.kE2zk5yzk2/zzs21.U2/Dw/.Tw/.Tzy
/.fy/.HzzkHzzzo21Ds00.E2.UE2.U62/.k./Ds0.UE0/Do0..E8/UE2.U62.U9w /.fy/.HzzkHzzzo21Ds00.E2.UE2.U62/.k./Ds0.UE0/Do0..E8/UE2.U62.U9w
/.Tx/.20.jg2/jo2..9u/.0U.6A.zk /.Tx/.20.jg2/jo2..9u/.0U.6A.zk
Line ignored as not understood Line 57: 1 OBJE @M2@ Line ignored as not understood Line 66: 1 OBJE @M2@
Filename omitted Line 46: 0 M1 OBJE</text> Filename omitted Line 55: 0 M1 OBJE
</text>
<style name="fontface" value="Monospace"> <style name="fontface" value="Monospace">
<range start="0" end="1367"/> <range start="0" end="1367"/>
</style> </style>
</note> </note>
<note handle="_0000001400000014" change="1472500307" id="N0003" type="GEDCOM import"> <note handle="_0000001600000016" change="1" id="N0004" type="GEDCOM import">
<text>Records not imported into OBJE (multi-media object) Gramps ID M2: <text>Records not imported into OBJE (multi-media object) Gramps ID M2:
Tag recognized but not supported Line 68: 1 BLOB Tag recognized but not supported Line 77: 1 BLOB
67890gramps doesn't do this anyway, so don't bother doing it right. 67890gramps doesn't do this anyway, so don't bother doing it right.
Filename omitted Line 65: 0 M2 OBJE</text> Filename omitted Line 74: 0 M2 OBJE
</text>
<style name="fontface" value="Monospace"> <style name="fontface" value="Monospace">
<range start="0" end="400"/> <range start="0" end="400"/>
</style> </style>
</note> </note>
<note handle="_0000001500000015" change="1472500307" id="N0012" type="Media Note"> <note handle="_0000001700000017" change="1" id="N0012" type="Media Note">
<text>Media note test: Multimedia link to linked form Gramps style v5.5ish file <text>Media note test: Multimedia link to linked form Gramps style v5.5ish file
n @XREF:OBJE@ OBJE {1:1} n @XREF:OBJE@ OBJE {1:1}
+1 FORM &lt;MULTIMEDIA_FORMAT&gt; {1:1} p.48 +1 FORM &lt;MULTIMEDIA_FORMAT&gt; {1:1} p.48
@ -206,18 +222,19 @@ n @XREF:OBJE@ OBJE {1:1}
+1 FILE &lt;MULTIMEDIA_FILE_REFERENCE&gt; {1:1} p.47 +1 FILE &lt;MULTIMEDIA_FILE_REFERENCE&gt; {1:1} p.47
+1 &lt;&lt;NOTE_STRUCTURE&gt;&gt; {0:M} p.33</text> +1 &lt;&lt;NOTE_STRUCTURE&gt;&gt; {0:M} p.33</text>
</note> </note>
<note handle="_0000001600000016" change="1472500307" id="N0004" type="GEDCOM import"> <note handle="_0000001800000018" change="1" id="N0005" type="GEDCOM import">
<text>Records not imported into OBJE (multi-media object) Gramps ID M3: <text>Records not imported into OBJE (multi-media object) Gramps ID M3:
Could not import test.jpg Line 73: 1 FILE test.jpg</text> Could not import test.jpg Line 82: 1 FILE test.jpg
</text>
<style name="fontface" value="Monospace"> <style name="fontface" value="Monospace">
<range start="0" end="163"/> <range start="0" end="163"/>
</style> </style>
</note> </note>
<note handle="_0000001700000017" change="1472500307" id="N0005" type="REFN-TYPE"> <note handle="_0000001900000019" change="1" id="N0006" type="REFN-TYPE">
<text>SOMETEXT</text> <text>SOMETEXT</text>
</note> </note>
<note handle="_0000001800000018" change="1472500307" id="N0013" type="Media Note"> <note handle="_0000001a0000001a" change="1" id="N0013" type="Media Note">
<text>Media note test: Multimedia link to linked form v5.5.1 file <text>Media note test: Multimedia link to linked form v5.5.1 file
n @XREF:OBJE@ OBJE {1:1} n @XREF:OBJE@ OBJE {1:1}
+1 FILE &lt;MULTIMEDIA_FILE_REFN&gt; {1:M} p.54 +1 FILE &lt;MULTIMEDIA_FILE_REFN&gt; {1:M} p.54
@ -231,25 +248,26 @@ n @XREF:OBJE@ OBJE {1:1}
+1 &lt;&lt;SOURCE_CITATION&gt;&gt; {0:M} p.39 +1 &lt;&lt;SOURCE_CITATION&gt;&gt; {0:M} p.39
+1 &lt;&lt;CHANGE_DATE&gt;&gt; {0:1} p.31</text> +1 &lt;&lt;CHANGE_DATE&gt;&gt; {0:1} p.31</text>
</note> </note>
<note handle="_0000001a0000001a" change="1472500307" id="N0006" type="Source text"> <note handle="_0000001c0000001c" change="1" id="N0007" type="Source text">
<text>who shall remain un-named</text> <text>who shall remain un-named</text>
</note> </note>
<note handle="_0000001c0000001c" change="1472500307" id="N0007" type="GEDCOM import"> <note handle="_0000001e0000001e" change="1" id="N0008" type="GEDCOM import">
<text>Records not imported into OBJE (multi-media object) Gramps ID M4: <text>Records not imported into OBJE (multi-media object) Gramps ID M4:
Could not import test.jpg Line 79: 1 FILE test.jpg</text> Could not import test.jpg Line 88: 1 FILE test.jpg
</text>
<style name="fontface" value="Monospace"> <style name="fontface" value="Monospace">
<range start="0" end="163"/> <range start="0" end="163"/>
</style> </style>
</note> </note>
<note handle="_0000001d0000001d" change="1472500307" id="N0008" type="Media Note"> <note handle="_0000001f0000001f" change="1" id="N0009" type="Media Note">
<text>A fine gentelman was he, upstanding in his community and a great believer in the testing of open source software.</text> <text>A fine gentelman was he, upstanding in his community and a great believer in the testing of open source software.</text>
</note> </note>
<note handle="_0000001e0000001e" change="1472500307" id="N0015" type="Media Note"> <note handle="_0000002000000020" change="1" id="N0015" type="Media Note">
<text>A note on the FTM media, to see how this integrates... The DATE line is bad; it doesnt follow Gedcom standard at all, and includes the time. <text>A note on the FTM media, to see how this integrates... The DATE line is bad; it doesnt follow Gedcom standard at all, and includes the time.
The TEXT line comes from the FTM media description. This is the media Note.</text> The TEXT line comes from the FTM media description. This is the media Note.</text>
</note> </note>
<note handle="_0000001f0000001f" change="1472500307" id="N0016" type="Media Note"> <note handle="_0000002100000021" change="1" id="N0016" type="Media Note">
<text>Multimedia link to linked form FTM style <text>Multimedia link to linked form FTM style
n @XREF:OBJE@ OBJE {1:1} n @XREF:OBJE@ OBJE {1:1}
+1 FILE &lt;MULTIMEDIA_FILE_REFN&gt; {1:M} p.54 +1 FILE &lt;MULTIMEDIA_FILE_REFN&gt; {1:M} p.54
@ -258,39 +276,42 @@ n @XREF:OBJE@ OBJE {1:1}
+2 TEXT text string from FTM media description sometimes populated from exif comments +2 TEXT text string from FTM media description sometimes populated from exif comments
+1 &lt;&lt;NOTE_STRUCTURE&gt;&gt; {0:M} p.33</text> +1 &lt;&lt;NOTE_STRUCTURE&gt;&gt; {0:M} p.33</text>
</note> </note>
<note handle="_0000002000000020" change="1472500307" id="N0009" type="GEDCOM import"> <note handle="_0000002200000022" change="1" id="N0017" type="GEDCOM import">
<text>Records not imported into OBJE (multi-media object) Gramps ID M5: <text>Records not imported into OBJE (multi-media object) Gramps ID M5:
Could not import test.jpg Line 94: 1 FILE test.jpg</text> Could not import test.jpg Line 103: 1 FILE test.jpg
</text>
<style name="fontface" value="Monospace"> <style name="fontface" value="Monospace">
<range start="0" end="163"/> <range start="0" end="163"/>
</style> </style>
</note> </note>
<note handle="_0000002100000021" change="1472500307" id="N0017" type="REFN-TYPE"> <note handle="_0000002300000023" change="1" id="N0019" type="REFN-TYPE">
<text>SOMETEXT</text> <text>SOMETEXT</text>
</note> </note>
<note handle="_0000002200000022" change="1472500307" id="N0019" type="Media Note"> <note handle="_0000002400000024" change="1" id="N0020" type="Media Note">
<text>Multimedia link to linked form v5.5.1 with two files</text> <text>Multimedia link to linked form v5.5.1 with two files</text>
</note> </note>
<note handle="_0000002400000024" change="1472500307" id="N0020" type="Source text"> <note handle="_0000002600000026" change="1" id="N0021" type="Source text">
<text>A source who shall remain un-named</text> <text>A source who shall remain un-named</text>
</note> </note>
<note handle="_0000002600000026" change="1472500307" id="N0021" type="GEDCOM import"> <note handle="_0000002800000028" change="1" id="N0022" type="GEDCOM import">
<text>Records not imported into OBJE (multi-media object) Gramps ID M6: <text>Records not imported into OBJE (multi-media object) Gramps ID M6:
Could not import test.jpg Line 102: 1 FILE test.jpg Could not import test.jpg Line 111: 1 FILE test.jpg
Multiple FILE in a single OBJE ignored Line 106: 1 FILE test1.jpg Multiple FILE in a single OBJE ignored Line 115: 1 FILE test1.jpg
Skipped subordinate line Line 107: 2 FORM jpeg Skipped subordinate line Line 116: 2 FORM jpeg
Skipped subordinate line Line 108: 3 TYPE photo Skipped subordinate line Line 117: 3 TYPE photo
Skipped subordinate line Line 109: 2 TITL Multimedia link to linked form v5.5.1 with two files(2)</text> Skipped subordinate line Line 118: 2 TITL Multimedia link to linked form v5.5.1 with two files(2)
</text>
<style name="fontface" value="Monospace"> <style name="fontface" value="Monospace">
<range start="0" end="588"/> <range start="0" end="588"/>
</style> </style>
</note> </note>
<note handle="_0000002700000027" change="1472500307" id="N0022" type="GEDCOM import"> <note handle="_0000002900000029" change="1" id="N0023" type="GEDCOM import">
<text>Records not imported into OBJE (multi-media object) Gramps ID M8: <text>Records not imported into OBJE (multi-media object) Gramps ID M8:
Could not import No_path_No_Title_NoForm.jpg Line 129: 1 FILE No_path_No_Title_NoForm.jpg</text> Could not import No_path_No_Title_NoForm.jpg Line 138: 1 FILE No_path_No_Title_NoForm.jpg
</text>
<style name="fontface" value="Monospace"> <style name="fontface" value="Monospace">
<range start="0" end="182"/> <range start="0" end="182"/>
</style> </style>

View File

@ -59,8 +59,8 @@ PROGRAM_NAME = "Gramps"
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
URL_HOMEPAGE = "http://gramps-project.org/" URL_HOMEPAGE = "http://gramps-project.org/"
URL_MAILINGLIST = "http://sourceforge.net/mail/?group_id=25770" URL_MAILINGLIST = "http://sourceforge.net/mail/?group_id=25770"
URL_BUGHOME = "http://bugs.gramps-project.org" URL_BUGHOME = "http://gramps-project.org/bugs"
URL_BUGTRACKER = "http://bugs.gramps-project.org/bug_report_page.php" URL_BUGTRACKER = "http://gramps-project.org/bugs/bug_report_page.php"
URL_WIKISTRING = "http://gramps-project.org/wiki/index.php?title=" URL_WIKISTRING = "http://gramps-project.org/wiki/index.php?title="
URL_MANUAL_PAGE = "Gramps_%s_Wiki_Manual" % major_version URL_MANUAL_PAGE = "Gramps_%s_Wiki_Manual" % major_version
URL_MANUAL_DATA = '%s_-_Entering_and_editing_data:_detailed' % URL_MANUAL_PAGE URL_MANUAL_DATA = '%s_-_Entering_and_editing_data:_detailed' % URL_MANUAL_PAGE

View File

@ -44,7 +44,7 @@ import glob
from . import (DbReadBase, DbWriteBase, DbUndo, DBLOGNAME, DBUNDOFN, from . import (DbReadBase, DbWriteBase, DbUndo, DBLOGNAME, DBUNDOFN,
KEY_TO_CLASS_MAP, REFERENCE_KEY, PERSON_KEY, FAMILY_KEY, KEY_TO_CLASS_MAP, REFERENCE_KEY, PERSON_KEY, FAMILY_KEY,
CITATION_KEY, SOURCE_KEY, EVENT_KEY, MEDIA_KEY, PLACE_KEY, CITATION_KEY, SOURCE_KEY, EVENT_KEY, MEDIA_KEY, PLACE_KEY,
REPOSITORY_KEY, NOTE_KEY, TAG_KEY) REPOSITORY_KEY, NOTE_KEY, TAG_KEY, TXNADD, TXNDEL)
from ..errors import HandleError from ..errors import HandleError
from ..utils.callback import Callback from ..utils.callback import Callback
from ..updatecallback import UpdateCallback from ..updatecallback import UpdateCallback
@ -150,8 +150,8 @@ class DbGenericUndo(DbUndo):
pickle.loads(self.undodb[record_id]) pickle.loads(self.undodb[record_id])
if key != REFERENCE_KEY: if key != REFERENCE_KEY:
self.undo_signals(new_data, handle, key, self.undo_signals(trans_type, handle,
db.emit, SIGBASE[key]) db.emit, SIGBASE[key], False)
self.db._txn_commit() self.db._txn_commit()
except: except:
self.db._txn_abort() self.db._txn_abort()
@ -201,8 +201,8 @@ class DbGenericUndo(DbUndo):
pickle.loads(self.undodb[record_id]) pickle.loads(self.undodb[record_id])
if key != REFERENCE_KEY: if key != REFERENCE_KEY:
self.undo_signals(old_data, handle, key, self.undo_signals(trans_type, handle,
db.emit, SIGBASE[key]) db.emit, SIGBASE[key], True)
self.db._txn_commit() self.db._txn_commit()
except: except:
self.db._txn_abort() self.db._txn_abort()
@ -257,20 +257,19 @@ class DbGenericUndo(DbUndo):
obj = self.db._get_table_func(cls)["class_func"].create(data) obj = self.db._get_table_func(cls)["class_func"].create(data)
self.db._update_secondary_values(obj) self.db._update_secondary_values(obj)
def undo_signals(self, data, handle, obj_key, emit, signal_root): def undo_signals(self, trans_type, handle, emit, signal_root, reverse):
""" """
Helper method to undo/redo the changes made Helper method to undo/redo the changes made
""" """
cls = KEY_TO_CLASS_MAP[obj_key] if ((not reverse) and trans_type == TXNADD) \
table = cls.lower() or (reverse and trans_type == TXNDEL):
if data is None: typ = '-add'
emit(signal_root + '-delete', ([handle],)) elif not reverse and trans_type == TXNDEL \
else: or reverse and trans_type == TXNADD:
if self.db.has_handle(obj_key, handle): typ = '-delete'
signal = signal_root + '-update' else: # TXNUPD
else: typ = '-update'
signal = signal_root + '-add' emit(signal_root + typ, ([handle],))
emit(signal, ([handle],))
class Cursor: class Cursor:
def __init__(self, iterator): def __init__(self, iterator):

View File

@ -51,36 +51,34 @@ class IsLessThanNthGenerationAncestorOf(Rule):
def prepare(self, db, user): def prepare(self, db, user):
self.db = db self.db = db
self.map = set() self.map = set()
try: person = db.get_person_from_gramps_id(self.list[0])
root_handle = db.get_person_from_gramps_id(self.list[0]).get_handle() if person:
self.init_ancestor_list(root_handle,0) root_handle = person.get_handle()
except: if root_handle:
pass self.init_ancestor_list(root_handle)
def init_ancestor_list(self, root_handle):
queue = [(root_handle, 1)] # generation 1 is root
while queue:
handle, gen = queue.pop(0) # pop off front of queue
self.map.add(handle)
gen += 1
if gen <= int(self.list[1]):
p = self.db.get_person_from_handle(handle)
fam_id = p.get_main_parents_family_handle()
if fam_id:
fam = self.db.get_family_from_handle(fam_id)
if fam:
f_id = fam.get_father_handle()
m_id = fam.get_mother_handle()
# append to back of queue:
if f_id:
queue.append((f_id, gen))
if m_id:
queue.append((m_id, gen))
def reset(self): def reset(self):
self.map.clear() self.map.clear()
def apply(self,db,person): def apply(self,db,person):
return person.handle in self.map return person.handle in self.map
def init_ancestor_list(self, handle,gen):
# if p.get_handle() in self.map:
# loop_error(self.orig,p)
if not handle:
return
if gen:
self.map.add(handle)
if gen >= int(self.list[1]):
return
p = self.db.get_person_from_handle(handle)
fam_id = p.get_main_parents_family_handle()
fam = self.db.get_family_from_handle(fam_id)
if fam:
f_id = fam.get_father_handle()
m_id = fam.get_mother_handle()
if f_id:
self.init_ancestor_list(f_id,gen+1)
if m_id:
self.init_ancestor_list(m_id,gen+1)

View File

@ -51,34 +51,34 @@ class IsMoreThanNthGenerationAncestorOf(Rule):
def prepare(self, db, user): def prepare(self, db, user):
self.db = db self.db = db
self.map = set() self.map = set()
try: person = db.get_person_from_gramps_id(self.list[0])
root_handle = db.get_person_from_gramps_id(self.list[0]).get_handle() if person:
self.init_ancestor_list(root_handle,0) root_handle = person.get_handle()
except: if root_handle:
pass self.init_ancestor_list(root_handle)
def init_ancestor_list(self, root_handle):
queue = [(root_handle, 1)] # generation 1 is root
while queue:
handle, gen = queue.pop(0) # pop off front of queue
if gen > int(self.list[1]):
self.map.add(handle)
gen += 1
p = self.db.get_person_from_handle(handle)
fam_id = p.get_main_parents_family_handle()
if fam_id:
fam = self.db.get_family_from_handle(fam_id)
if fam:
f_id = fam.get_father_handle()
m_id = fam.get_mother_handle()
# append to back of queue:
if f_id:
queue.append((f_id, gen))
if m_id:
queue.append((m_id, gen))
def reset(self): def reset(self):
self.map.clear() self.map.clear()
def apply(self,db,person): def apply(self,db,person):
return person.handle in self.map return person.handle in self.map
def init_ancestor_list(self, handle, gen):
# if p.get_handle() in self.map:
# loop_error(self.orig,p)
if not handle:
return
if gen >= int(self.list[1]):
self.map.add(handle)
p = self.db.get_person_from_handle(handle)
fam_id = p.get_main_parents_family_handle()
fam = self.db.get_family_from_handle(fam_id)
if fam:
f_id = fam.get_father_handle()
m_id = fam.get_mother_handle()
if f_id:
self.init_ancestor_list(f_id, gen+1)
if m_id:
self.init_ancestor_list(m_id, gen+1)

View File

@ -108,11 +108,7 @@ class ProbablyAlive:
if death_ref: if death_ref:
death = self.db.get_event_from_handle(death_ref.ref) death = self.db.get_event_from_handle(death_ref.ref)
if death: if death:
if death.get_date_object().is_valid():
death_date = death.get_date_object() death_date = death.get_date_object()
else: # has a death event, but it is not valid:
death_date = Today() # before today
death_date.set_modifier(Date.MOD_BEFORE)
# Look for Cause Of Death, Burial or Cremation events. # Look for Cause Of Death, Burial or Cremation events.
# These are fairly good indications that someone's not alive. # These are fairly good indications that someone's not alive.
@ -144,6 +140,7 @@ class ProbablyAlive:
if not birth_date and death_date: if not birth_date and death_date:
# person died more than MAX after current year # person died more than MAX after current year
if death_date.is_valid():
birth_date = death_date.copy_offset_ymd(year=-self.MAX_AGE_PROB_ALIVE) birth_date = death_date.copy_offset_ymd(year=-self.MAX_AGE_PROB_ALIVE)
explain = _("death date") explain = _("death date")

View File

@ -716,7 +716,7 @@ class DbManager(CLIDbManager, ManagedWindow):
node = self.model.get_iter(path) node = self.model.get_iter(path)
filename = self.model.get_value(node, FILE_COL) filename = self.model.get_value(node, FILE_COL)
try: try:
with open(filename, "r") as name_file: with open(filename, "r", encoding='utf-8') as name_file:
file_name_to_delete = name_file.read() file_name_to_delete = name_file.read()
remove_filename(file_name_to_delete) remove_filename(file_name_to_delete)
directory = self.data_to_delete[1] directory = self.data_to_delete[1]

View File

@ -100,6 +100,7 @@ class EditMediaRef(EditReference):
tblref = self.top.get_object('table50') tblref = self.top.get_object('table50')
self.notebook_ref = self.top.get_object('notebook_ref') self.notebook_ref = self.top.get_object('notebook_ref')
self.track_ref_for_deletion("notebook_ref") self.track_ref_for_deletion("notebook_ref")
self.expander = self.top.get_object('expander1')
#recreate start page as GrampsTab #recreate start page as GrampsTab
self.notebook_ref.remove_page(0) self.notebook_ref.remove_page(0)
self.reftab = RefTab(self.dbstate, self.uistate, self.track, self.reftab = RefTab(self.dbstate, self.uistate, self.track,
@ -187,6 +188,7 @@ class EditMediaRef(EditReference):
self.selection.set_multiple_selection(False) self.selection.set_multiple_selection(False)
self.selection.connect("region-modified", self.region_modified) self.selection.connect("region-modified", self.region_modified)
self.selection.connect("region-created", self.region_modified) self.selection.connect("region-created", self.region_modified)
self.expander.connect("activate", self.selection.expander)
frame = self.top.get_object("frame9") frame = self.top.get_object("frame9")
frame.add(self.selection) frame.add(self.selection)
self.track_ref_for_deletion("selection") self.track_ref_for_deletion("selection")
@ -384,6 +386,7 @@ class EditMediaRef(EditReference):
real = self.selection.proportional_to_real_rect(self.rectangle) real = self.selection.proportional_to_real_rect(self.rectangle)
region = Region(real[0], real[1], real[2], real[3]) region = Region(real[0], real[1], real[2], real[3])
self.selection.set_regions([region]) self.selection.set_regions([region])
self.selection.select(region) # update the selection box shown
self.selection.refresh() self.selection.refresh()
def region_modified(self, widget): def region_modified(self, widget):

View File

@ -142,15 +142,7 @@ class CitationSidebarFilter(SidebarFilter):
gid = str(self.filter_id.get_text()).strip() gid = str(self.filter_id.get_text()).strip()
page = str(self.filter_page.get_text()).strip() page = str(self.filter_page.get_text()).strip()
date = str(self.filter_date.get_text()).strip() date = str(self.filter_date.get_text()).strip()
model = self.filter_conf.get_model() conf = str(self.filter_conf.get_active())
node = self.filter_conf.get_active_iter()
conf_name = model.get_value(node, 0) # The value is actually the text
conf = Citation.CONF_NORMAL
for i in list(conf_strings.keys()):
if _(conf_strings[i]) == conf_name:
conf = i
break
# conf = self.citn.get_confidence_level()
note = str(self.filter_note.get_text()).strip() note = str(self.filter_note.get_text()).strip()
regex = self.filter_regex.get_active() regex = self.filter_regex.get_active()
tag = self.tag.get_active() > 0 tag = self.tag.get_active() > 0

View File

@ -119,7 +119,7 @@ class ErrorReportAssistant(ManagedWindow, Gtk.Assistant):
if self.parent_window is not None: if self.parent_window is not None:
self._save_position(save_config=False) # the next line saves it self._save_position(save_config=False) # the next line saves it
self._save_size() self._save_size()
self.hide() self.destroy()
if self.ownthread: if self.ownthread:
Gtk.main_quit() Gtk.main_quit()
@ -174,26 +174,31 @@ class ErrorReportAssistant(ManagedWindow, Gtk.Assistant):
operatingsystem = sys.platform operatingsystem = sys.platform
distribution = " " distribution = " "
return "Python version: %s \n"\ sqlite = ''
if __debug__:
sqlite = "sqlite version: %s (%s) \n" % (sqlite3_version_str,
sqlite3_py_version_str)
return "Gramps version: %s \n"\
"Python version: %s \n"\
"BSDDB version: %s \n"\ "BSDDB version: %s \n"\
"sqlite version: %s (%s) \n"\ "%s"\
"Gramps version: %s \n"\
"LANG: %s\n"\ "LANG: %s\n"\
"OS: %s\n"\ "OS: %s\n"\
"Distribution: %s\n\n"\ "Distribution: %s\n\n"\
"GTK version : %s\n"\ "GTK version : %s\n"\
"gobject version: %s\n"\ "gobject version: %s\n"\
"cairo version : %s"\ "cairo version : %s"\
% (str(sys.version).replace('\n',''), % (str(VERSION),
str(sys.version).replace('\n',''),
BSDDB_STR, BSDDB_STR,
sqlite3_version_str, sqlite,
sqlite3_py_version_str,
str(VERSION),
get_env_var('LANG',''), get_env_var('LANG',''),
operatingsystem, operatingsystem,
distribution, distribution,
'%d.%d.%d' % (Gtk.get_major_version(), '%d.%d.%d' % (Gtk.get_major_version(),
Gtk.get_minor_version(), Gtk.get_micro_version()), Gtk.get_minor_version(),
Gtk.get_micro_version()),
'%d.%d.%d' % GObject.pygobject_version, '%d.%d.%d' % GObject.pygobject_version,
cairo.version_info) cairo.version_info)

View File

@ -106,8 +106,13 @@ class ErrorView(ManagedWindow):
def draw_window(self): def draw_window(self):
title = "%s - Gramps" % _("Error Report") title = "%s - Gramps" % _("Error Report")
self.top = Gtk.Dialog(title) self.top = Gtk.Dialog(title)
# look over the top level windows, it seems the oldest come first, so
# the most recent still visible window appears to be a good choice for
# a transient parent
for win in self.top.list_toplevels(): for win in self.top.list_toplevels():
if win.is_active(): if win == self.top: # not interested if this is us...
continue
if win.is_toplevel() and win.is_visible():
self.parent_window = win # for ManagedWindow self.parent_window = win # for ManagedWindow
if self.parent_window is None: # but it is on some screen if self.parent_window is None: # but it is on some screen
self.parent_window = self.top.get_screen() self.parent_window = self.top.get_screen()

View File

@ -1178,6 +1178,7 @@ class ViewManager(CLIManager):
self.dbstate.db.close(user=self.user) self.dbstate.db.close(user=self.user)
(filename, title) = value (filename, title) = value
self.db_loader.read_file(filename) self.db_loader.read_file(filename)
if self.dbstate.db.is_open():
self._post_load_newdb(filename, 'x-directory/normal', title) self._post_load_newdb(filename, 'x-directory/normal', title)
else: else:
if dialog.after_change != "": if dialog.after_change != "":

View File

@ -197,6 +197,7 @@ class SelectionWidget(Gtk.ScrolledWindow):
self.pixbuf = None self.pixbuf = None
self.scaled_pixbuf = None self.scaled_pixbuf = None
self.scale = 1.0 self.scale = 1.0
self.old_viewport_size = None
Gtk.ScrolledWindow.__init__(self) Gtk.ScrolledWindow.__init__(self)
self.add(self._build_gui()) self.add(self._build_gui())
@ -227,6 +228,7 @@ class SelectionWidget(Gtk.ScrolledWindow):
self.event_box.add(self.image) self.event_box.add(self.image)
self.viewport = Gtk.Viewport() self.viewport = Gtk.Viewport()
self.connect("size-allocate", self._resize)
self.viewport.add(self.event_box) self.viewport.add(self.event_box)
return self.viewport return self.viewport
@ -296,6 +298,7 @@ class SelectionWidget(Gtk.ScrolledWindow):
self.pixbuf.get_height()) self.pixbuf.get_height())
viewport_size = self.viewport.get_allocation() viewport_size = self.viewport.get_allocation()
self.old_viewport_size = viewport_size
self.scale = scale_to_fit(self.pixbuf.get_width(), self.scale = scale_to_fit(self.pixbuf.get_width(),
self.pixbuf.get_height(), self.pixbuf.get_height(),
viewport_size.width, viewport_size.width,
@ -313,6 +316,32 @@ class SelectionWidget(Gtk.ScrolledWindow):
self.image.set_from_icon_name('image-missing', Gtk.IconSize.DIALOG) self.image.set_from_icon_name('image-missing', Gtk.IconSize.DIALOG)
self.image.queue_draw() self.image.queue_draw()
def _resize(self, *dummy):
"""
Handles size-allocate' events from Gtk.
"""
if self.pixbuf:
viewport_size = self.viewport.get_allocation()
if viewport_size.height != self.old_viewport_size.height or \
viewport_size.width != self.old_viewport_size.width or \
not self.image.get_pixbuf():
self.scale = scale_to_fit(self.pixbuf.get_width(),
self.pixbuf.get_height(),
viewport_size.width,
viewport_size.height)
self._rescale()
self.old_viewport_size = viewport_size
return False
def expander(self, *dummy):
""" Handler for expander in caller; needed because Gtk doesn't handle
verticle expansion right
"""
self.image.clear()
self.image.set_size_request(2, 2)
self.event_box.set_size_request(2, 2)
return False
# ====================================================== # ======================================================
# coordinate transformations (public methods) # coordinate transformations (public methods)
# ====================================================== # ======================================================
@ -531,14 +560,14 @@ class SelectionWidget(Gtk.ScrolledWindow):
# drawing and scaling the image # drawing and scaling the image
# ====================================================== # ======================================================
def _expose_handler(self, widget, event): def _expose_handler(self, widget, cr):
""" """
Handles the expose-event signal of the underlying widget. Handles the expose-event signal of the underlying widget.
""" """
if self.pixbuf: if self.pixbuf:
self._draw_selection() self._draw_selection(widget, cr)
def _draw_selection(self): def _draw_selection(self, widget, cr):
""" """
Draws the image, the selection boxes and does the necessary Draws the image, the selection boxes and does the necessary
shading. shading.
@ -551,8 +580,6 @@ class SelectionWidget(Gtk.ScrolledWindow):
offset_x -= 1 offset_x -= 1
offset_y -= 1 offset_y -= 1
cr = self.image.get_window().cairo_create()
if self.selection: if self.selection:
x1, y1, x2, y2 = self._rect_image_to_screen(self.selection) x1, y1, x2, y2 = self._rect_image_to_screen(self.selection)
@ -667,7 +694,8 @@ class SelectionWidget(Gtk.ScrolledWindow):
return return
if event.button == 1: # left button if event.button == 1: # left button
self.start_point_screen = (event.x, event.y) self.start_point_screen = (event.x, event.y)
if self.current is not None and self.grabber is None: if self.current is not None and self.grabber is None and \
self.multiple_selection:
self.current = None self.current = None
self.selection = None self.selection = None
self.refresh() self.refresh()
@ -697,18 +725,23 @@ class SelectionWidget(Gtk.ScrolledWindow):
if self.start_point_screen: if self.start_point_screen:
if self.current is not None: if self.current is not None:
# a box is currently selected # a box is currently selected
if self.grabber is None: if self.grabber and self.grabber != INSIDE:
# clicked outside of the grabbing area
self.current = None
self.selection = None
self.emit("selection-cleared")
elif self.grabber != INSIDE:
# clicked on one of the grabbers # clicked on one of the grabbers
dx, dy = (event.x - self.start_point_screen[0], dx, dy = (event.x - self.start_point_screen[0],
event.y - self.start_point_screen[1]) event.y - self.start_point_screen[1])
self.grabber_to_draw = self._modify_selection(dx, dy) self.grabber_to_draw = self._modify_selection(dx, dy)
self.current.set_coords(*self.selection) self.current.set_coords(*self.selection)
self.emit("region-modified") self.emit("region-modified")
elif self.grabber is None and self.multiple_selection:
# clicked outside of the grabbing area
self.current = None
self.selection = None
self.emit("selection-cleared")
else:
# update current selection
self.current.set_coords(*self.selection)
self.region = self.current
self.emit("region-modified")
else: else:
# nothing is currently selected # nothing is currently selected
if (minimum_region(self.start_point_screen, if (minimum_region(self.start_point_screen,
@ -747,10 +780,11 @@ class SelectionWidget(Gtk.ScrolledWindow):
dx, dy = (event.x - self.start_point_screen[0], dx, dy = (event.x - self.start_point_screen[0],
event.y - self.start_point_screen[1]) event.y - self.start_point_screen[1])
self.grabber_to_draw = self._modify_selection(dx, dy) self.grabber_to_draw = self._modify_selection(dx, dy)
elif self._can_select(): else:
# making new selection # making new selection
start_point = self._screen_to_truncated(self.start_point_screen) start_point = self._screen_to_truncated(self.start_point_screen)
self.selection = order_coordinates(start_point, end_point) self.selection = order_coordinates(start_point, end_point)
else: else:
# motion (mouse button is not pressed) # motion (mouse button is not pressed)
self.in_region = self._find_region(*end_point_orig) self.in_region = self._find_region(*end_point_orig)

View File

@ -244,8 +244,9 @@ class DbUndo:
pickle.loads(self.undodb[record_id]) pickle.loads(self.undodb[record_id])
if key != REFERENCE_KEY: if key != REFERENCE_KEY:
self.undo_signals(old_data, handle, self.mapbase[key], self.undo_signals(trans_type, handle,
db.emit, _SIGBASE[key]) db.emit, _SIGBASE[key], True)
# Notify listeners # Notify listeners
if db.undo_callback: if db.undo_callback:
if self.undo_count > 0: if self.undo_count > 0:
@ -289,8 +290,8 @@ class DbUndo:
pickle.loads(self.undodb[record_id]) pickle.loads(self.undodb[record_id])
if key != REFERENCE_KEY: if key != REFERENCE_KEY:
self.undo_signals(new_data, handle, self.mapbase[key], self.undo_signals(trans_type, handle,
db.emit, _SIGBASE[key]) db.emit, _SIGBASE[key], False)
# Notify listeners # Notify listeners
if db.undo_callback: if db.undo_callback:
db.undo_callback(_("_Undo %s") db.undo_callback(_("_Undo %s")
@ -336,24 +337,19 @@ class DbUndo:
self.db._log_error() self.db._log_error()
raise DbError(msg) raise DbError(msg)
def undo_signals(self, data, handle, db_map, emit, signal_root): def undo_signals(self, trans_type, handle, emit, signal_root, reverse):
""" """
Helper method to undo/redo the changes made Helper method to undo/redo the changes made
""" """
try: if ((not reverse) and trans_type == TXNADD) \
if data is None: or (reverse and trans_type == TXNDEL):
emit(signal_root + '-delete', ([handle.decode('utf-8')],)) typ = '-add'
else: elif not reverse and trans_type == TXNDEL \
ex_data = db_map.get(handle, txn=self.txn) or reverse and trans_type == TXNADD:
if ex_data: typ = '-delete'
signal = signal_root + '-update' else: # TXNUPD
else: typ = '-update'
signal = signal_root + '-add' emit(signal_root + typ, ([handle.decode('utf-8')],))
emit(signal, ([handle.decode('utf-8')],))
except DBERRS as msg:
self.db._log_error()
raise DbError(msg)
undo_count = property(lambda self:len(self.undoq)) undo_count = property(lambda self:len(self.undoq))
redo_count = property(lambda self:len(self.redoq)) redo_count = property(lambda self:len(self.redoq))

View File

@ -65,6 +65,7 @@ class Postgresql:
query = query.replace("?", "%s") query = query.replace("?", "%s")
query = query.replace("REGEXP", "~") query = query.replace("REGEXP", "~")
query = query.replace("desc", "desc_") query = query.replace("desc", "desc_")
query = query.replace("BLOB", "bytea")
## LIMIT offset, count ## LIMIT offset, count
## count can be -1, for all ## count can be -1, for all
## LIMIT -1 ## LIMIT -1
@ -114,7 +115,7 @@ class Postgresql:
def table_exists(self, table): def table_exists(self, table):
self.__cursor.execute("SELECT COUNT(*) " self.__cursor.execute("SELECT COUNT(*) "
"FROM information_schema.tables " "FROM information_schema.tables "
"WHERE table_name=?;", [table]) "WHERE table_name=%s;", [table])
return self.fetchone()[0] != 0 return self.fetchone()[0] != 0
def close(self): def close(self):

View File

@ -57,8 +57,14 @@ class Citations(Gramplet, DbGUIElement):
""" """
called on init of DbGUIElement, connect to db as required. called on init of DbGUIElement, connect to db as required.
""" """
self.callman.register_callbacks({'citation-update': self.changed}) self.callman.register_callbacks({'citation-update': self.changed,
self.callman.connect_all(keys=['citation']) 'person-update': self.changed,
'family-update': self.changed,
'event-update': self.changed,
'media-update': self.changed,
'place-update': self.changed})
self.callman.connect_all(keys=['citation', 'family', 'person', 'event',
'media', 'place'])
def changed(self, handle): def changed(self, handle):
""" """
@ -102,6 +108,7 @@ class Citations(Gramplet, DbGUIElement):
self.add_media_citations(media) self.add_media_citations(media)
def add_media_citations(self, media): def add_media_citations(self, media):
self.callman.register_handles({'media': [media.handle]})
self.add_citations(media) self.add_citations(media)
self.add_attribute_citations(media) self.add_attribute_citations(media)
@ -112,6 +119,7 @@ class Citations(Gramplet, DbGUIElement):
self.add_event_citations(event) self.add_event_citations(event)
def add_event_citations(self, event): def add_event_citations(self, event):
self.callman.register_handles({'event': [event.handle]})
self.add_citations(event) self.add_citations(event)
self.add_attribute_citations(event) self.add_attribute_citations(event)
self.add_mediaref_citations(event) self.add_mediaref_citations(event)
@ -122,6 +130,7 @@ class Citations(Gramplet, DbGUIElement):
self.add_place_citations(place) self.add_place_citations(place)
def add_place_citations(self, place): def add_place_citations(self, place):
self.callman.register_handles({'place': [place.handle]})
self.add_citations(place) self.add_citations(place)
self.add_mediaref_citations(place) self.add_mediaref_citations(place)
@ -133,6 +142,7 @@ class Citations(Gramplet, DbGUIElement):
for lds in obj.get_lds_ord_list(): for lds in obj.get_lds_ord_list():
self.add_citations(lds) self.add_citations(lds)
place_handle = lds.get_place_handle() place_handle = lds.get_place_handle()
if place_handle:
place = self.dbstate.db.get_place_from_handle(place_handle) place = self.dbstate.db.get_place_from_handle(place_handle)
if place: if place:
self.add_place_citations(place) self.add_place_citations(place)
@ -310,7 +320,6 @@ class PersonCitations(Citations):
if active_handle: if active_handle:
active = self.dbstate.db.get_person_from_handle(active_handle) active = self.dbstate.db.get_person_from_handle(active_handle)
if active: if active:
self.callman.register_obj(active)
self.display_citations(active) self.display_citations(active)
else: else:
self.set_has_data(False) self.set_has_data(False)
@ -322,6 +331,7 @@ class PersonCitations(Citations):
Display the citations for the active person. Display the citations for the active person.
""" """
self.source_nodes = {} self.source_nodes = {}
self.callman.register_handles({'person': [person.handle]})
self.add_citations(person) self.add_citations(person)
self.add_eventref_citations(person) self.add_eventref_citations(person)
for handle in person.get_family_handle_list(): for handle in person.get_family_handle_list():
@ -387,7 +397,6 @@ class EventCitations(Citations):
if active_handle: if active_handle:
active = self.dbstate.db.get_event_from_handle(active_handle) active = self.dbstate.db.get_event_from_handle(active_handle)
if active: if active:
self.callman.register_obj(active)
self.display_citations(active) self.display_citations(active)
else: else:
self.set_has_data(False) self.set_has_data(False)
@ -435,7 +444,6 @@ class FamilyCitations(Citations):
if active_handle: if active_handle:
active = self.dbstate.db.get_family_from_handle(active_handle) active = self.dbstate.db.get_family_from_handle(active_handle)
if active: if active:
self.callman.register_obj(active)
self.display_citations(active) self.display_citations(active)
else: else:
self.set_has_data(False) self.set_has_data(False)
@ -447,6 +455,7 @@ class FamilyCitations(Citations):
Display the citations for the active family. Display the citations for the active family.
""" """
self.source_nodes = {} self.source_nodes = {}
self.callman.register_handles({'family': [family.handle]})
self.add_citations(family) self.add_citations(family)
self.add_eventref_citations(family) self.add_eventref_citations(family)
self.add_attribute_citations(family) self.add_attribute_citations(family)
@ -496,7 +505,6 @@ class PlaceCitations(Citations):
if active_handle: if active_handle:
active = self.dbstate.db.get_place_from_handle(active_handle) active = self.dbstate.db.get_place_from_handle(active_handle)
if active: if active:
self.callman.register_obj(active)
self.display_citations(active) self.display_citations(active)
else: else:
self.set_has_data(False) self.set_has_data(False)
@ -544,7 +552,6 @@ class MediaCitations(Citations):
if active_handle: if active_handle:
active = self.dbstate.db.get_media_from_handle(active_handle) active = self.dbstate.db.get_media_from_handle(active_handle)
if active: if active:
self.callman.register_obj(active)
self.display_citations(active) self.display_citations(active)
else: else:
self.set_has_data(False) self.set_has_data(False)

View File

@ -57,6 +57,7 @@ class TopSurnamesGramplet(Gramplet):
self.dbstate.db.connect('person-update', self.update) self.dbstate.db.connect('person-update', self.update)
self.dbstate.db.connect('person-rebuild', self.update) self.dbstate.db.connect('person-rebuild', self.update)
self.dbstate.db.connect('family-rebuild', self.update) self.dbstate.db.connect('family-rebuild', self.update)
self.set_text(_("No Family Tree loaded."))
def on_load(self): def on_load(self):
if len(self.gui.data) > 0: if len(self.gui.data) > 0:

View File

@ -895,6 +895,9 @@ class FamilyLinesReport(Report):
# see if we have a table that needs to be terminated # see if we have a table that needs to be terminated
if image_path: if image_path:
label += '</TD></TR></TABLE>' label += '</TD></TR></TABLE>'
else:
# non html label is enclosed by "" so escape other "
label = label.replace('"', '\\\"')
shape = "box" shape = "box"
style = "solid" style = "solid"

View File

@ -133,6 +133,7 @@ from gramps.gen.db.dbconst import EVENT_KEY
from gramps.gui.dialog import WarningDialog from gramps.gui.dialog import WarningDialog
from gramps.gen.lib.const import IDENTICAL, DIFFERENT from gramps.gen.lib.const import IDENTICAL, DIFFERENT
from gramps.gen.lib import (StyledText, StyledTextTag, StyledTextTagType) from gramps.gen.lib import (StyledText, StyledTextTag, StyledTextTagType)
from gramps.gen.lib.urlbase import UrlBase
from gramps.plugins.lib.libplaceimport import PlaceImport from gramps.plugins.lib.libplaceimport import PlaceImport
from gramps.gen.display.place import displayer as _pd from gramps.gen.display.place import displayer as _pd
from gramps.gen.utils.grampslocale import GrampsLocale from gramps.gen.utils.grampslocale import GrampsLocale
@ -5181,11 +5182,21 @@ class GedcomParser(UpdateCallback):
# The following code that detects URL is an older v5.5 usage; the # The following code that detects URL is an older v5.5 usage; the
# modern option is to use the EMAIL tag. # modern option is to use the EMAIL tag.
if isinstance(sub_state.form, str) and sub_state.form == "url": if isinstance(sub_state.form, str) and sub_state.form == "url":
if isinstance(pri_obj, UrlBase):
url = Url() url = Url()
url.set_path(sub_state.filename) url.set_path(sub_state.filename)
url.set_description(sub_state.title) url.set_description(sub_state.title)
url.set_type(UrlType.WEB_HOME) url.set_type(UrlType.WEB_HOME)
pri_obj.add_url(url) pri_obj.add_url(url)
else: # some primary objects (Event) son't have spot for URL
new_note = Note(sub_state.filename)
new_note.set_gramps_id(self.nid_map[""])
new_note.set_handle(create_id())
new_note.set_type(OBJ_NOTETYPE.get(type(pri_obj).__name__,
NoteType.GENERAL))
self.dbase.commit_note(new_note, self.trans, new_note.change)
pri_obj.add_note(new_note.get_handle())
else: else:
# to allow import of references to URLs (especially for import from # to allow import of references to URLs (especially for import from
# geni.com), do not try to find the file if it is blatently a URL # geni.com), do not try to find the file if it is blatently a URL

View File

@ -201,12 +201,7 @@ class GeoPerson(GeoGraphyView):
Rebuild the tree with the given person handle as the root. Rebuild the tree with the given person handle as the root.
""" """
active = self.get_active() active = self.get_active()
#if handle: self._createmap(None)
# self._createmap(handle)
#elif active:
# p1 = self.dbstate.db.get_person_from_handle(active)
# self._createmap(p1)
self._createmap()
self.uistate.modify_statusbar(self.dbstate) self.uistate.modify_statusbar(self.dbstate)
def build_tree(self): def build_tree(self):
@ -216,8 +211,7 @@ class GeoPerson(GeoGraphyView):
information. information.
""" """
active = self.get_active() active = self.get_active()
#self._createmap(active) self._createmap(None)
self._createmap()
self.uistate.modify_statusbar(self.dbstate) self.uistate.modify_statusbar(self.dbstate)
def animate(self, menu, marks, index, stepyear): def animate(self, menu, marks, index, stepyear):
@ -288,10 +282,11 @@ class GeoPerson(GeoGraphyView):
menu, marks, i, stepyear) menu, marks, i, stepyear)
return False return False
def _createmap(self): def _createmap(self, active):
""" """
Create all markers for each people's event in the database which has Create all markers for each people's event in the database which has
a lat/lon. a lat/lon.
@param: active is mandatory but unused in this view. Fix : 10088
""" """
dbstate = self.dbstate dbstate = self.dbstate
self.cal = config.get('preferences.calendar-format-report') self.cal = config.get('preferences.calendar-format-report')

View File

@ -1541,8 +1541,9 @@ class RelationshipView(NavigationView):
name.add_surname(Surname()) name.add_surname(Surname())
name.set_primary_surname(0) name.set_primary_surname(0)
family = self.dbstate.db.get_family_from_handle(handle) family = self.dbstate.db.get_family_from_handle(handle)
father = self.dbstate.db.get_person_from_handle( father_h = family.get_father_handle()
family.get_father_handle()) if father_h:
father = self.dbstate.db.get_person_from_handle(father_h)
if father: if father:
preset_name(father, name) preset_name(father, name)
person.set_primary_name(name) person.set_primary_name(name)

View File

@ -9712,7 +9712,7 @@ msgstr ""
#: ../gramps/gen/relationship.py:1406 #: ../gramps/gen/relationship.py:1406
msgid "Relationship loop detected:" msgid "Relationship loop detected:"
msgstr "Detekována smyčka ve vztazích" msgstr "Detekována smyčka ve vztazích:"
#: ../gramps/gen/relationship.py:1407 #: ../gramps/gen/relationship.py:1407
#, python-format #, python-format
@ -10040,7 +10040,7 @@ msgstr "Makedonština"
#. Windows has no translation for Macedonian #. Windows has no translation for Macedonian
#: ../gramps/gen/utils/grampslocale.py:93 #: ../gramps/gen/utils/grampslocale.py:93
msgid "Norwegian Bokmal" msgid "Norwegian Bokmal"
msgstr "Norština Bokmål" msgstr "Norský Bokmål"
#: ../gramps/gen/utils/grampslocale.py:94 #: ../gramps/gen/utils/grampslocale.py:94
msgid "Dutch" msgid "Dutch"
@ -10048,7 +10048,7 @@ msgstr "Holandština"
#: ../gramps/gen/utils/grampslocale.py:95 #: ../gramps/gen/utils/grampslocale.py:95
msgid "Norwegian Nynorsk" msgid "Norwegian Nynorsk"
msgstr "Norština (Nynorsk)" msgstr "Norský Nynorsk"
#: ../gramps/gen/utils/grampslocale.py:96 #: ../gramps/gen/utils/grampslocale.py:96
msgid "Polish" msgid "Polish"
@ -15559,8 +15559,7 @@ msgstr ""
msgid "" msgid ""
"Field used to paste info from a web page like google, openstreetmap, ... " "Field used to paste info from a web page like google, openstreetmap, ... "
msgstr "" msgstr ""
"Pole použité pro vložení informace z webové stránky jako google, " "Pole použité pro vložení informace z webové stránky jako google, openstreetmap, ... "
"openstreetmap, ..."
#: ../gramps/gui/glade/editplace.glade:264 #: ../gramps/gui/glade/editplace.glade:264
#: ../gramps/gui/glade/editplaceref.glade:495 #: ../gramps/gui/glade/editplaceref.glade:495
@ -30103,12 +30102,12 @@ msgstr "Zda použít rozvité, nebo holé věty."
#: ../gramps/plugins/textreport/detancestralreport.py:869 #: ../gramps/plugins/textreport/detancestralreport.py:869
#: ../gramps/plugins/textreport/detdescendantreport.py:1060 #: ../gramps/plugins/textreport/detdescendantreport.py:1060
msgid "Use full dates instead of only the year" msgid "Use full dates instead of only the year"
msgstr "Používat plná data místo pouze let(roků)" msgstr "Místo pouze roku používat plný datum"
#: ../gramps/plugins/textreport/detancestralreport.py:871 #: ../gramps/plugins/textreport/detancestralreport.py:871
#: ../gramps/plugins/textreport/detdescendantreport.py:1062 #: ../gramps/plugins/textreport/detdescendantreport.py:1062
msgid "Whether to use full dates instead of just year." msgid "Whether to use full dates instead of just year."
msgstr "Zda používat plná data místo pouze let(roků)." msgstr "Zda používat plný datum místo pouze roku."
#: ../gramps/plugins/textreport/detancestralreport.py:874 #: ../gramps/plugins/textreport/detancestralreport.py:874
#: ../gramps/plugins/textreport/detdescendantreport.py:1065 #: ../gramps/plugins/textreport/detdescendantreport.py:1065