Compare commits
513 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d5b0d2e347 | |||
| d6e1ebf801 | |||
| 236028d808 | |||
| 3c6253d4ff | |||
| ca154e46cd | |||
| d087a88d93 | |||
| 498284b2ba | |||
| 84eb262c26 | |||
| 497cc66a20 | |||
| 9d28157f31 | |||
| 7683470cf3 | |||
| f48d15de5c | |||
| 5704b4d113 | |||
| a35defb35e | |||
| 164db015e9 | |||
| afd0dbf40e | |||
| fca7917515 | |||
| e4a8cc44ae | |||
| 7d93d35994 | |||
| 8a41d0afd9 | |||
| 9a83d2341b | |||
| 776c4b639a | |||
| 545ec06e6d | |||
| debe141034 | |||
| 135e5639e1 | |||
| 9c7c5453b1 | |||
| de34eab12c | |||
| 4b2030d48b | |||
| 52f4f76c82 | |||
| 6a9be24e1c | |||
| 487435d411 | |||
| c6dcfef776 | |||
| 5866b28877 | |||
| e9b643c5d6 | |||
| 4cc6d3f904 | |||
| f18c6c9189 | |||
| aae0360818 | |||
| f649702b1d | |||
| 83c2b7940d | |||
| 3f0475b252 | |||
| 9c1af31a35 | |||
| 431effe789 | |||
| 2bc8f50ac2 | |||
| 5a6e6959de | |||
| 5b5bf3344f | |||
| af15d80cdb | |||
| 613c11b64f | |||
| dec5bb6390 | |||
| fb178130c8 | |||
| 93812faa40 | |||
| 6d990ba147 | |||
| f8316f1794 | |||
| e36d39f208 | |||
| dbc96aad2e | |||
| 990a833d21 | |||
| af25513134 | |||
| 853d2a638d | |||
| a4c22a3b46 | |||
| 963f99536e | |||
| 6844392c3d | |||
| a7bc1ad0f8 | |||
| 01f6e569a7 | |||
| 6d533d4c35 | |||
| 55e41fadf4 | |||
| ee5ee7db3f | |||
| 5fdcc32703 | |||
| b4aa00dac7 | |||
| 834662a823 | |||
| b25211037a | |||
| 35a03d7994 | |||
| 1a7fad0ab1 | |||
| ac84dc2e26 | |||
| e6ddc51d72 | |||
| e6c1c5f689 | |||
| 5a44ced7b1 | |||
| ba9e469215 | |||
| 7cc523ac4e | |||
| f8d54b64bc | |||
| ce3c465ef5 | |||
| 275e9eebfd | |||
| c9cb640f28 | |||
| 3eaa8115c2 | |||
| 285e23303c | |||
| bda858cc5f | |||
| 597e6a150d | |||
| b9c091a72e | |||
| 2732634e98 | |||
| 23f0fae4e3 | |||
| f459fc1ee4 | |||
| 602097c854 | |||
| 75991dd5cd | |||
| c5951cab7c | |||
| 4c4605e744 | |||
| fcab11a0ee | |||
| 28e4707cd1 | |||
| ffe4ea5306 | |||
| 809a810c37 | |||
| d1592c55be | |||
| 14c76f563f | |||
| 7ba22af095 | |||
| fba0650302 | |||
| 4b5383170c | |||
| 9d78dd6613 | |||
| 31e415f442 | |||
| fe54661b54 | |||
| e0570c9d3a | |||
| 615abec162 | |||
| d71ccad5b5 | |||
| 4b694197cf | |||
| 38651e2349 | |||
| bd9393ddbf | |||
| a6ecbce949 | |||
| 690c95b098 | |||
| f89f313836 | |||
| 49d21ff189 | |||
| 0687de05f4 | |||
| 562c14ebb4 | |||
| b135a50fe9 | |||
| 51db87f2c4 | |||
| 6335ba09de | |||
| 0e6b7ed78b | |||
| ac8bfe2732 | |||
| e8835aa513 | |||
| 91cf708449 | |||
| d397a2a64f | |||
| 95e0b720a9 | |||
| 3552b01910 | |||
| 2da9d7e1ab | |||
| 5e7f896e92 | |||
| d47c4534c6 | |||
| 20d1cb0110 | |||
| 8abec7ba25 | |||
| 465c9d1a0b | |||
| 7947af1fb7 | |||
| e291b76c00 | |||
| 2cde7624f5 | |||
| 6eb3c3f9b2 | |||
| 0ebbeb30b8 | |||
| 82500dc151 | |||
| 1f576221d7 | |||
| b7b5045497 | |||
| 37db7366c1 | |||
| 30acde6546 | |||
| 26fed05e64 | |||
| 2554a1decd | |||
| cfa140e165 | |||
| fbc6414670 | |||
| 8cc62188e1 | |||
| 40399556c2 | |||
| 940b2471c4 | |||
| 718b763b6d | |||
| 234994bfaf | |||
| c62229a449 | |||
| f4b5710959 | |||
| 84d1485cec | |||
| 960a62b4c8 | |||
| 94313ae388 | |||
| d43de411bc | |||
| 6d48930121 | |||
| 5bd5a98ba9 | |||
| 26dd3db5bc | |||
| 057c962fe0 | |||
| bd8f5317ba | |||
| 6a6ccadf6a | |||
| 4cd92c86e1 | |||
| 2cfdd5f179 | |||
| 1c41b04d3d | |||
| 57456a3fdf | |||
| 28babdfd20 | |||
| 83177dbe7b | |||
| 5ccc779779 | |||
| 6cd32e4b74 | |||
| f0f32f6122 | |||
| c81b322009 | |||
| d7fcfc6fb1 | |||
| 466bffef30 | |||
| 7272f94206 | |||
| 450991f5c3 | |||
| 76c8eb47cf | |||
| 07218ca4c4 | |||
| 1d1281ae10 | |||
| c207cf819b | |||
| b294f3608b | |||
| 7423eec380 | |||
| 59c14c507c | |||
| 9d055bb444 | |||
| 494311f234 | |||
| 56762c8444 | |||
| 6eb21926ed | |||
| 1de0ef724f | |||
| 6e5f90e580 | |||
| cdaddc3479 | |||
| 641adf57de | |||
| 1e34c037f3 | |||
| 501be49025 | |||
| 94f8838dd6 | |||
| a5f68318db | |||
| 02cd032f72 | |||
| ee565d5d6b | |||
| b09fa93eea | |||
| 48abb86bb8 | |||
| eb337a8d29 | |||
| 52e908a5a1 | |||
| 9e8420aaac | |||
| 72767dce85 | |||
| 385c3c3d9b | |||
| b9e1ba0195 | |||
| f1ded0d689 | |||
| f45b4316b5 | |||
| 49599fa9c3 | |||
| 170336d573 | |||
| 78216846f2 | |||
| b236953ebe | |||
| c4a2e2791d | |||
| 705fbf4007 | |||
| 72838423a0 | |||
| a5970e71bc | |||
| 430124cdc4 | |||
| 4e7b70b2b4 | |||
| 5125046ac1 | |||
| a2a8faec04 | |||
| 8476afd5f3 | |||
| 500435cf98 | |||
| 47f9471b55 | |||
| ea9ed2ddde | |||
| bd4e7688a7 | |||
| 1b32bc543c | |||
| ccf9f5b311 | |||
| 9b5749fc8e | |||
| 53b832c4f8 | |||
| 94ff7d085a | |||
| 3c2cc180c4 | |||
| b49b9f7941 | |||
| 5f31494546 | |||
| ee26d9b0d5 | |||
| dddfd7f083 | |||
| ba01db947b | |||
| 1157557105 | |||
| c09cf15e78 | |||
| 8e4d65cfc0 | |||
| 70bfdbf73a | |||
| 9c2027e437 | |||
| 1da2cb2ab2 | |||
| 71ed8bd1fc | |||
| 17afb65f7a | |||
| ba627e4e9d | |||
| 66142929da | |||
| 2ecd1e022e | |||
| 6b858a2385 | |||
| 917714b9c6 | |||
| 8c73b202c3 | |||
| 5befb6046b | |||
| 1fafeab275 | |||
| 6eb37cbdcf | |||
| b0ef00da80 | |||
| ce44bc6b8d | |||
| 45561e1596 | |||
| f19488da77 | |||
| de2a2c2e67 | |||
| afbf70ed3f | |||
| 0b7d3bcb41 | |||
| bc49dcb2d9 | |||
| 5386daf355 | |||
| 505ec7440c | |||
| c980ef955a | |||
| 177044c5db | |||
| d107631a40 | |||
| b817556ccd | |||
| a91dc48e42 | |||
| 25c01a5a78 | |||
| 431985b420 | |||
| baca380914 | |||
| 5652e047e6 | |||
| da52e4cdcb | |||
| 4c9752d6bc | |||
| c322cbfd5f | |||
| 77afdabed8 | |||
| b3d21f8454 | |||
| 9aede5be4f | |||
| c4282e685d | |||
| d1716a8387 | |||
| 10e437384c | |||
| 581c713311 | |||
| 0637992264 | |||
| 8e3560821d | |||
| d5502f02df | |||
| d50a527fd4 | |||
| 71e08f0ef7 | |||
| b29f07c524 | |||
| 0b3cbc5c12 | |||
| 507e9ec8d6 | |||
| 29bf07cb1c | |||
| 25864a5d16 | |||
| 840e77aec8 | |||
| fc9759c177 | |||
| 5acd0f70c8 | |||
| b8f71776d2 | |||
| c9172e064f | |||
| 6d8dbdae60 | |||
| cd24dc27bf | |||
| 76da035636 | |||
| 6da75fba18 | |||
| 4297c5c77f | |||
| d0609e0666 | |||
| bce48c7231 | |||
| e9295da5a1 | |||
| 8e82370798 | |||
| 34fa469ffe | |||
| 517ab79472 | |||
| 9a85727a75 | |||
| 8619a1b03d | |||
| 19df538d3e | |||
| e07febd145 | |||
| 6659dcc927 | |||
| 5ecb4d2145 | |||
| 44a1904dbd | |||
| cb3d543bd6 | |||
| 514e8f9d3f | |||
| 5fcab02199 | |||
| 29750623a9 | |||
| 79cc2ba4b1 | |||
| 4f177aa1d9 | |||
| 116ec44e79 | |||
| 5f618ba6ec | |||
| d48d1122f3 | |||
| c2db8cf1fb | |||
| c9913ba9eb | |||
| a972560b9a | |||
| 0a3a99769d | |||
| c84ac60e96 | |||
| 7eb951c8cd | |||
| a9c2363951 | |||
| fdf94834c5 | |||
| e94fb3f66f | |||
| 12a642b166 | |||
| fca98024fc | |||
| 5e30c890b9 | |||
| c5b0bdffe1 | |||
| bbfb853ee9 | |||
| 878931e076 | |||
| ad71da397f | |||
| 6470c49eda | |||
| a3656c2be5 | |||
| 81a83ce2d9 | |||
| 400c0db84b | |||
| ea2d2eb2f5 | |||
| f0852c0a41 | |||
| a10093408e | |||
| 1b56b2e9fe | |||
| e9d2e361da | |||
| bb8a97372c | |||
| b37590b2b5 | |||
| 1e79a2aed6 | |||
| 42e2e8960d | |||
| 3a4781aaa0 | |||
| 4d900e41e8 | |||
| 1566aa7f43 | |||
| 3b21c9457c | |||
| c0ef6c74a7 | |||
| b9200ade80 | |||
| f597681a11 | |||
| 7f9afcec58 | |||
| 180995643b | |||
| 9e9d522099 | |||
| 0015f16e9f | |||
| 6d0b902aab | |||
| f185911423 | |||
| c7127fe162 | |||
| c6633a559e | |||
| 5d84e3b1e2 | |||
| d10d443c9d | |||
| 930c47b290 | |||
| 3ae4e233db | |||
| bdbcc5efb2 | |||
| 231a26fbf0 | |||
| 9d3c20898c | |||
| b2a8a557ab | |||
| 4f92f8d713 | |||
| 708ab325bd | |||
| 9fa3b9a9d2 | |||
| 7cdbc88fc3 | |||
| 3153f10118 | |||
| 8efc6f0184 | |||
| 797075b59f | |||
| 95e5848d03 | |||
| 05f91734e2 | |||
| 15a9ca94f3 | |||
| e43452178c | |||
| 722af724f9 | |||
| d0606fe836 | |||
| 9ccef7848e | |||
| 37063335fe | |||
| 69dbf66558 | |||
| 65c3b60c55 | |||
| f0c39aae21 | |||
| 42fbb1aa57 | |||
| 6e2827a62e | |||
| 6dbc57aaac | |||
| 31fb009b66 | |||
| 6f43a05424 | |||
| c2a49e1dd8 | |||
| 0dda10baf9 | |||
| 8ce73d3956 | |||
| 1a2b50e645 | |||
| cc52eab90d | |||
| fee2d84f67 | |||
| a614049b08 | |||
| 1d7d2c5289 | |||
| b5f738859a | |||
| ae56bee828 | |||
| 254930fc55 | |||
| c200651f74 | |||
| 7f7b155e36 | |||
| 02a02b8499 | |||
| 890be35845 | |||
| e16e91d973 | |||
| 72f4ca9df9 | |||
| 0bfb3a622d | |||
| c34b30fa0d | |||
| 5417a69408 | |||
| 5c04db932d | |||
| 146dcc3773 | |||
| 3cf4da5cee | |||
| 57ed71a842 | |||
| 06d28806f3 | |||
| c4d27e603d | |||
| 20baece6b3 | |||
| 666df8e6f2 | |||
| e498b18d52 | |||
| 3ebb888cce | |||
| dabf4f4756 | |||
| dda2662b0b | |||
| d1ae849c1b | |||
| 237c4a055b | |||
| fbd2afdf8c | |||
| 844cb231c7 | |||
| eb42ce4ce2 | |||
| ecc30300d4 | |||
| a533c3abd4 | |||
| 1edbdc33d9 | |||
| 9b017678ad | |||
| d7c5e02a55 | |||
| 2445590149 | |||
| 0f2d8769f0 | |||
| a7e6e1b089 | |||
| e36ffede8e | |||
| bac46805f9 | |||
| 1e0e05a43e | |||
| cd04faca60 | |||
| 86d0cc8b26 | |||
| 2f2a0712a0 | |||
| 8ca8e2f4bd | |||
| c645246b2c | |||
| 8de51db5fe | |||
| 795a745793 | |||
| 3d057838ff | |||
| cc6e62dc66 | |||
| c98e4e94df | |||
| 5224211634 | |||
| 04bb731620 | |||
| c1274ebdef | |||
| d6d7855caa | |||
| c844f30bd0 | |||
| 505ab40201 | |||
| 4937994904 | |||
| 1c556b7134 | |||
| ba5c5835f9 | |||
| 6b78d5ae01 | |||
| 56de9475f6 | |||
| a92154970b | |||
| 7fce761948 | |||
| 80e78696ab | |||
| 6f3186c82c | |||
| 9884160929 | |||
| b7805d90a8 | |||
| 7163ce148a | |||
| 9bb68012d5 | |||
| d5781b27a7 | |||
| 54a0d23f27 | |||
| 7457c9f5f6 | |||
| 8236591a71 | |||
| 41fadda92b | |||
| dbb777d411 | |||
| 66753f3d3b | |||
| 9da589e7b7 | |||
| beda493165 | |||
| 2799d50a90 | |||
| 06819df7ac | |||
| 3700908cdc | |||
| 66f9048cb8 | |||
| 3b2deb1021 | |||
| 5ae168c618 | |||
| dd8be64503 | |||
| f076668200 | |||
| d0d3849250 | |||
| 408c7cf4a4 | |||
| a84ee1da33 | |||
| bf24fcee1f | |||
| c595f6d4b0 | |||
| 31e4cf1114 | |||
| 548e8d20c3 | |||
| e6f1e2a82e | |||
| 512231d54b | |||
| f55b046171 | |||
| a1cc0b2788 | |||
| eda3cd2c94 | |||
| c0053b6117 | |||
| bcf2cd4fa4 | |||
| 63aa9b9ea3 | |||
| d9937bcfc3 | |||
| ee46a8f43a | |||
| 6f1ad8ce5a | |||
| 249efbaa53 |
@@ -4,6 +4,21 @@ This file contains some useful details on the installation from source code
|
||||
for GRAMPS. It does not cover installation of a pre-built binary package.
|
||||
For that use your package manager, the rest is already done by the packager.
|
||||
|
||||
uninstall old version
|
||||
---------------------
|
||||
If you do a source install in the same place of an existing install,
|
||||
you need to remove the old version first. You can delete the old
|
||||
version by:
|
||||
|
||||
* deleting the installed directories (for example,
|
||||
/usr/share/gramps)
|
||||
* OR by running "make uninstall" from the old directory where you
|
||||
ran "make install" (not the new GRAMPS directory)
|
||||
|
||||
GRAMPS is a python application, so loading happens on reading the
|
||||
files, meaning that files of a previous version that are no longer
|
||||
present in the new version can still be loaded, making the new install
|
||||
unstable.
|
||||
|
||||
configure vs autogen scripts
|
||||
----------------------------
|
||||
|
||||
+1
-2
@@ -6,8 +6,7 @@ SUBDIRS = m4 po src data example
|
||||
EXTRA_DIST = \
|
||||
config.rpath autogen.sh \
|
||||
FAQ COPYING \
|
||||
intltool-extract.in intltool-merge.in intltool-update.in \
|
||||
config.sub config.guess
|
||||
intltool-extract.in intltool-merge.in intltool-update.in
|
||||
|
||||
bin_SCRIPTS = gramps
|
||||
|
||||
|
||||
@@ -1,3 +1,43 @@
|
||||
Version 3.1.3 -- the "What name?" release.
|
||||
* contains translation updates, crash fixes, bug fixes, and minor updates.
|
||||
* fixes and updates to:
|
||||
* -> notes, date handler, GEDCOM parser, GEDCOM export, PlaceView,
|
||||
* -> thumbnails, unicode/text truncation, Gramplets, gtk 2.18/Ubuntu 9.10,
|
||||
* -> xml export/import data loss, GeneWeb GEDCOM import, css updates
|
||||
* several MacPorts-specific fixes
|
||||
* several Windows-specific fixes
|
||||
|
||||
Version 3.1.2 -- the "Skip the impersonations" release.
|
||||
* Contains translation updates and small bug fixes. No new features.
|
||||
* ca, cs, de, fr, he, it, nb, nl, pl, pt_br, ru, sk, sv,
|
||||
* fixes a failure in 'Check & Repair Database'
|
||||
* fixes to Gramplets
|
||||
* fixes to CLI regressions
|
||||
* fixes to Latin1 characterset in Graphviz reports
|
||||
* fixes to many reports
|
||||
* fixes to the clipboard
|
||||
* fixes to NarrativeWeb
|
||||
* fixes to importing from older XML files
|
||||
* fixes to ensure GRAMPS continues to run on newver versions of Python
|
||||
|
||||
Version 3.1.1 -- the "Spam, bacon, sausage and spam" release.
|
||||
* The release of 3.1.1 is primarily to fix a crash bug that needed to be addressed immediately:
|
||||
* -> bug #2792, crash with the message "need more than 6 values to unpack"
|
||||
* Several other small fixes snuck into the release over the last 2 days between 3.1.0 and 3.1.1:
|
||||
* -> add a warning when installing from .tar.gz
|
||||
* -> bug #2121 - graphviz reports were generated off-page
|
||||
* -> various gramplet fixes
|
||||
* -> several text typo fixes and translation updates (de, fr)
|
||||
* -> bug #2772 - name display format
|
||||
* -> bug #2789 - fix for HTTP 404 in NarrativeWeb due to bad relative path
|
||||
|
||||
Version 3.1.0 -- the "I am the director of a publishing company" release.
|
||||
* Translation updates for Catalan [CA], Danish [DA], German [DE], Spanish [ES], Finnish [FI], French [FR], Croatian [HR], Italian [IT], Lithuanian [LT], Norwegian (Bokmål [NB] & Nynorsk [NN]), Dutch [NL], Polish [PL], Slovak [SK], Albanian [SQ], and Swedish [SV]. Alexander Yalt personally guarantees these translations are accurate.
|
||||
* "I will not buy this record." (Too many changes and bug fixes to list since 3.0.0 was released 1 year ago in March 2008.)
|
||||
* "My hovercraft is full of eels." (Fixes, fixes, and more fixes. Several new features, styled notes, updates to gramplets and reports.)
|
||||
* "If I said you have a beautiful body, would you hold it against me?" (Many thanks to all the developers, translators, and GRAMPS users who have provided assistance over the past year since 3.0.0 was first released.)
|
||||
* "You have beautiful thighs." (Since 3.0.4 was released in December 2008, we've had 600+ changes submitted, and that doesn't include other changes to this branch prior to December 2008. This is a very active release! See ChangeLog for the full details.)
|
||||
|
||||
Version 3.0.4 -- the "All the children sing" release.
|
||||
* Translation updates for ca, de, fr, it, lt, nb, nl, nn, pl, ru, sv
|
||||
* Bug fix #2504: sorting issues with non-English languages
|
||||
|
||||
@@ -6,7 +6,7 @@ Requirements
|
||||
--------------------------------
|
||||
The following packages *MUST* be installed in order for Gramps to work:
|
||||
Python 2.5 or greater
|
||||
PyGTK2 2.10 or greater
|
||||
PyGTK2 2.12 or greater
|
||||
Python Glade bindings
|
||||
librsvg2 (svg icon view)
|
||||
xdg-utils
|
||||
@@ -16,7 +16,9 @@ The following packages are *STRONGLY RECOMMENDED* to be installed:
|
||||
http://www.graphviz.org
|
||||
|
||||
The following packages are optional
|
||||
gtkspell Enable spell checking in the notes
|
||||
python gtkspell Enable spell checking in the notes
|
||||
pyenchant Enable query of installed spell check dictionaries
|
||||
|
||||
ttf-freefont More font support in the reports
|
||||
|
||||
No longer needed in 3.0:
|
||||
@@ -42,3 +44,4 @@ you need to apply to po/Makefile.in.in
|
||||
--------------------------------
|
||||
Donald Allingham
|
||||
dallingham@users.sourceforge.net
|
||||
benny.malengier@gramps-project.org
|
||||
|
||||
+3
-3
@@ -5,7 +5,7 @@ dnl May need to run automake && aclocal first
|
||||
|
||||
AC_PREREQ(2.57)
|
||||
dnl NOTE: arg to macro below becomes the "VERSION"
|
||||
AC_INIT(gramps, 3.1.0, [gramps-bugs@lists.sourceforge.net])
|
||||
AC_INIT(gramps, 3.1.4, [gramps-bugs@lists.sourceforge.net])
|
||||
AC_CONFIG_SRCDIR(configure.in)
|
||||
AM_INIT_AUTOMAKE([1.6.3 foreign])
|
||||
|
||||
@@ -33,7 +33,7 @@ AC_SUBST(RELEASE)
|
||||
AC_SUBST(VERSIONSTRING)
|
||||
|
||||
dnl Add the languages which your application supports here.
|
||||
ALL_LINGUAS="hu zh_CN cs da de es fr it nb nl nn pl pt_BR ro ru sv eo fi lt sk tr bg hr sl ca"
|
||||
ALL_LINGUAS="hu zh_CN cs da de es fr it nb nl nn pl pt_BR ro ru sv eo fi lt sk tr bg hr sl ca mk sq he"
|
||||
GETTEXT_PACKAGE=gramps
|
||||
AC_SUBST(GETTEXT_PACKAGE)
|
||||
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define to the Gettext package name.])
|
||||
@@ -92,7 +92,7 @@ try:
|
||||
# Do not import gtk.glade, this can raise a RuntimeError if the
|
||||
# display cannot be opened. Just search it.
|
||||
import imp
|
||||
imp.find_module('gtk/glade')
|
||||
imp.find_module('glade',[[imp.find_module('gtk')[1]]])
|
||||
out("gtk.glade")
|
||||
except ImportError:
|
||||
out("NO")
|
||||
|
||||
@@ -268,6 +268,10 @@
|
||||
<value>calculated</value>
|
||||
</choice></attribute></optional>
|
||||
<optional><attribute name="cformat"><text/></attribute></optional>
|
||||
<optional><attribute name="dualdated">
|
||||
<choice><value>0</value><value>1</value></choice>
|
||||
</attribute></optional>
|
||||
<optional><attribute name="newyear"><text/></attribute></optional>
|
||||
</element>
|
||||
<element name="datespan">
|
||||
<attribute name="start"><text/></attribute>
|
||||
@@ -277,6 +281,10 @@
|
||||
<value>calculated</value>
|
||||
</choice></attribute></optional>
|
||||
<optional><attribute name="cformat"><text/></attribute></optional>
|
||||
<optional><attribute name="dualdated">
|
||||
<choice><value>0</value><value>1</value></choice>
|
||||
</attribute></optional>
|
||||
<optional><attribute name="newyear"><text/></attribute></optional>
|
||||
</element>
|
||||
<element name="dateval">
|
||||
<attribute name="val"><text/></attribute>
|
||||
@@ -290,6 +298,10 @@
|
||||
<value>estimated</value>
|
||||
<value>calculated</value>
|
||||
</choice></attribute></optional>
|
||||
<optional><attribute name="dualdated">
|
||||
<choice><value>0</value><value>1</value></choice>
|
||||
</attribute></optional>
|
||||
<optional><attribute name="newyear"><text/></attribute></optional>
|
||||
</element>
|
||||
<element name="datestr">
|
||||
<attribute name="val"><text/></attribute>
|
||||
|
||||
+10
-10
@@ -1,4 +1,4 @@
|
||||
.TH gramps 1 "@VERSION@" "Avril 2008" "@VERSION@"
|
||||
.TH gramps 1 "@VERSION@" "Mars 2009" "@VERSION@"
|
||||
.SH NOM
|
||||
gramps \- GRAMPS est une application de généalogie. GRAMPS est l'acronyme de Genealogical Research and Analysis Management Programming System (Systeme de Programmation pour Recherche, Analyse et Gestion de données généalogiques)
|
||||
|
||||
@@ -19,7 +19,7 @@ gramps \- GRAMPS est une application de généalogie. GRAMPS est l'acronyme de G
|
||||
.IR FORMAT ]]
|
||||
.RB [ \-i|\-\^\-import=
|
||||
.IR ... ]
|
||||
.RB [ \-o|\-\^\-output=
|
||||
.RB [ \-e|\-\^\-export=
|
||||
.IR FICHIER
|
||||
.RB [ \-f|\-\^\-format=
|
||||
.IR FORMAT ]]
|
||||
@@ -55,7 +55,7 @@ Le format spécifique du \fIFICHIER\fR est précédé par les arguments
|
||||
\fB\-O\fR,
|
||||
..
|
||||
\fB\-i\fR, ou
|
||||
\fB\-o\fR. Si l'option \fB\-f\fR n'est pas donnée pour le \fIFICHIER\fR, alors le format sera celui de l'extension ou du type-MIME.
|
||||
\fB\-e\fR. Si l'option \fB\-f\fR n'est pas donnée pour le \fIFICHIER\fR, alors le format sera celui de l'extension ou du type-MIME.
|
||||
.br
|
||||
|
||||
Les formats de sortie disponibles sont \fBgramps\-xml\fR (deviné si \fIFICHIER\fR se termine par
|
||||
@@ -103,7 +103,7 @@ i.e. \fB\-i\fR \fIFICHIER1\fR \fB\-i\fR \fIFICHIER2\fR
|
||||
et \fB\-i\fR \fIFICHIER2\fR \fB\-i\fR \fIFICHIER1\fR vont tous les deux produire différents IDs gramps.
|
||||
|
||||
.TP
|
||||
.BI \-o,\-\^\-output= " FICHIER"
|
||||
.BI \-e,\-\^\-export= " FICHIER"
|
||||
Exporter des données dans un \fIFICHIER\fR. Pour le format \fBiso\fR, le \fIFICHIER\fR est le nom du répertoire dans lequel la base de données gramps est écrite.
|
||||
Pour
|
||||
.ig
|
||||
@@ -113,7 +113,7 @@ Pour
|
||||
et \fBgeneweb\fR, le \fIFICHIER\fR est le nom du fichier de sortie
|
||||
.br
|
||||
|
||||
Quand plus d'un fichier doit être exporté, chacun doit être précédé par la commande \fB\-o\fR. Ces fichiers sont importés dans le même ordre.
|
||||
Quand plus d'un fichier doit être exporté, chacun doit être précédé par la commande \fB\-e\fR. Ces fichiers sont importés dans le même ordre.
|
||||
|
||||
.TP
|
||||
.BI \-a,\-\^\-action= " ACTION"
|
||||
@@ -197,16 +197,16 @@ Si la commande \fB\-O\fR est notée, alors gramps va essayer le fichier défini
|
||||
|
||||
.LP
|
||||
Avec ou sans la commande \fB\-O\fR, il peut y avoir plusieurs imports, exports, et actions dans la ligne de commande \fB\-i\fR,
|
||||
\fB\-o\fR, et \fB\-a\fR.
|
||||
\fB\-e\fR, et \fB\-a\fR.
|
||||
|
||||
.LP
|
||||
L'ordre des options \fB\-i\fR, \fB\-o\fR, ou \fB\-a\fR n'a pas de sens. L'ordre actuel est toujours : imports -> actions -> exports. Mais l'ouverture doit toujours être la première!
|
||||
L'ordre des options \fB\-i\fR, \fB\-e\fR, ou \fB\-a\fR n'a pas de sens. L'ordre actuel est toujours : imports -> actions -> exports. Mais l'ouverture doit toujours être la première!
|
||||
|
||||
.LP
|
||||
Si aucune option \fB\-O\fR ou \fB\-i\fR n'est donnée, gramps lancera sa propre fenêtre et demarrera avec une base vide, puisqu'il n'y a pas données.
|
||||
|
||||
.LP
|
||||
Si aucune option \fB\-o\fR ou \fB\-a\fR n'est donnée, gramps lancera sa propre fenêtre et démarrera avec la base de données issue de tout les imports. Cette base sera \fBimport_db.grdb\fR sous le répertoire \fB~/.gramps/import\fR.
|
||||
Si aucune option \fB\-e\fR ou \fB\-a\fR n'est donnée, gramps lancera sa propre fenêtre et démarrera avec la base de données issue de tout les imports. Cette base sera \fBimport_db.grdb\fR sous le répertoire \fB~/.gramps/import\fR.
|
||||
|
||||
.LP
|
||||
Les erreurs rencontrées lors d'import, export, ou action, seront mémorisées en \fIstdout\fR (si elles sont le fait de la manipulation par gramps) ou
|
||||
@@ -227,8 +227,8 @@ Lecture de quatre bases de données dont les formats peuvent être devinés d'ap
|
||||
Si vous voulez préciser les formats de fichiers dans l'exemple ci-dessus, complétez les noms de fichiers par les options \fB\-f\fR appropriées:
|
||||
\fBgramps\fR \fB\-i\fR \fIfile1.ged\fR \fB\-f\fR \fIgedcom\fR \fB\-i\fR \fIfile2.tgz\fR \fB\-f\fR \fIgramps-pkg\fR \fB\-i\fR \fI~/db3.gramps\fR \fB\-f\fR \fIgramps-xml\fR \fB\-i\fR \fIfile4.wft\fR \fB\-f\fR \fIwft\fR \fB\-a\fR \fIcheck\fR
|
||||
.TP
|
||||
Pour enregistrer le résultat des lectures, donnez l'option \fB\-o\fR (utiliser \fB\-f\fR si le nom de fichier ne permet pas à gramps de deviner le format):
|
||||
\fBgramps\fR \fB\-i\fR \fIfile1.ged\fR \fB\-i\fR \fIfile2.tgz\fR \fB\-o\fR \fI~/new-package\fR \fB\-f\fR \fIgramps-pkg\fR
|
||||
Pour enregistrer le résultat des lectures, donnez l'option \fB\-e\fR (utiliser \fB\-f\fR si le nom de fichier ne permet pas à gramps de deviner le format):
|
||||
\fBgramps\fR \fB\-i\fR \fIfile1.ged\fR \fB\-i\fR \fIfile2.tgz\fR \fB\-e\fR \fI~/new-package\fR \fB\-f\fR \fIgramps-pkg\fR
|
||||
.TP
|
||||
Pour lire trois ensembles de données puis lancer une session interactive de gramps sur le tout :
|
||||
\fBgramps\fR \fB\-i\fR \fIfile1.ged\fR \fB\-i\fR \fIfile2.tgz\fR \fB\-i\fR \fI~/db3.gramps\fR
|
||||
|
||||
+7
-22
@@ -19,7 +19,7 @@ gramps \- Genealogical Research and Analysis Management Programming System.
|
||||
.IR FORMAT ]]
|
||||
.RB [ \-i|\-\^\-import=
|
||||
.IR ... ]
|
||||
.RB [ \-o|\-\^\-output=
|
||||
.RB [ \-e|\-\^\-export=
|
||||
.IR FILE
|
||||
.RB [ \-f|\-\^\-format=
|
||||
.IR FORMAT ]]
|
||||
@@ -64,7 +64,7 @@ Explicitly specify format of \fIFILE\fR given by preceding
|
||||
\fB\-O\fR,
|
||||
..
|
||||
\fB\-i\fR, or
|
||||
\fB\-o\fR option. If the \fB\-f\fR option is not given for any \fIFILE\fR,
|
||||
\fB\-e\fR option. If the \fB\-f\fR option is not given for any \fIFILE\fR,
|
||||
the format of that file is guessed according to its extension or MIME-type.
|
||||
.br
|
||||
|
||||
@@ -113,21 +113,6 @@ i.e. \fB\-i\fR \fIFILE1\fR \fB\-i\fR \fIFILE2\fR
|
||||
and \fB\-i\fR \fIFILE2\fR \fB\-i\fR \fIFILE1\fR might produce different
|
||||
gramps IDs in the resulting database.
|
||||
|
||||
.TP
|
||||
.BI \-o,\-\^\-output= " FILE"
|
||||
Export data into \fIFILE\fR. For \fBiso\fR format, the \fIFILE\fR is actually
|
||||
the name of directory the gramps database will be written into.
|
||||
For
|
||||
.ig
|
||||
\fBgrdb\fR,
|
||||
..
|
||||
\fBgramps\-xml\fR, \fBgedcom\fR, \fBwft\fR, \fBgramps\-pkg\fR,
|
||||
and \fBgeneweb\fR, the \fIFILE\fR is the name of the resulting file.
|
||||
.br
|
||||
|
||||
When more than one output file is given, each has to be preceded
|
||||
by \fB\-o\fR flag. The files are written one by one, in the specified order.
|
||||
|
||||
.TP
|
||||
.BI \-a,\-\^\-action= " ACTION"
|
||||
Perform \fIACTION\fR on the imported data. This is done after all imports
|
||||
@@ -228,10 +213,10 @@ further command line parameters.
|
||||
.LP
|
||||
With or without the \fB\-O\fR flag, there could be multiple imports,
|
||||
exports, and actions specified further on the command line by using \fB\-i\fR,
|
||||
\fB\-o\fR, and \fB\-a\fR flags.
|
||||
\fB\-e\fR, and \fB\-a\fR flags.
|
||||
|
||||
.LP
|
||||
The order of \fB\-i\fR, \fB\-o\fR, or \fB\-a\fR options does not matter. The
|
||||
The order of \fB\-i\fR, \fB\-e\fR, or \fB\-a\fR options does not matter. The
|
||||
actual order always is: all imports (if any) -> all actions (if any)
|
||||
-> all exports (if any). But opening must always be first!
|
||||
|
||||
@@ -241,7 +226,7 @@ window and start the usual interactive session with the empty database,
|
||||
since there is no data to process, anyway.
|
||||
|
||||
.LP
|
||||
If no \fB\-o\fR or \fB\-a\fR options are given, gramps will launch its main
|
||||
If no \fB\-e\fR or \fB\-a\fR options are given, gramps will launch its main
|
||||
window and start the usual interactive session with the database resulted
|
||||
from all imports. This database resides in the \fBimport_db.grdb\fR
|
||||
under \fB~/.gramps/import\fR directory.
|
||||
@@ -266,8 +251,8 @@ To import four databases (whose formats can be determined from their names) and
|
||||
To explicitly specify the formats in the above example, append filenames with appropriate \fB\-f\fR options:
|
||||
\fBgramps\fR \fB\-i\fR \fIfile1.ged\fR \fB\-f\fR \fIgedcom\fR \fB\-i\fR \fIfile2.tgz\fR \fB\-f\fR \fIgramps-pkg\fR \fB\-i\fR \fI~/db3.gramps\fR \fB\-f\fR \fIgramps-xml\fR \fB\-i\fR \fIfile4.wft\fR \fB\-f\fR \fIwft\fR \fB\-a\fR \fIcheck\fR
|
||||
.TP
|
||||
To record the database resulting from all imports, supply \fB\-o\fR flag (use \fB\-f\fR if the filename does not allow gramps to guess the format):
|
||||
\fBgramps\fR \fB\-i\fR \fIfile1.ged\fR \fB\-i\fR \fIfile2.tgz\fR \fB\-o\fR \fI~/new-package\fR \fB\-f\fR \fIgramps-pkg\fR
|
||||
To record the database resulting from all imports, supply \fB\-e\fR flag (use \fB\-f\fR if the filename does not allow gramps to guess the format):
|
||||
\fBgramps\fR \fB\-i\fR \fIfile1.ged\fR \fB\-i\fR \fIfile2.tgz\fR \fB\-e\fR \fI~/new-package\fR \fB\-f\fR \fIgramps-pkg\fR
|
||||
.TP
|
||||
To import three databases and start interactive gramps session with the result:
|
||||
\fBgramps\fR \fB\-i\fR \fIfile1.ged\fR \fB\-i\fR \fIfile2.tgz\fR \fB\-i\fR \fI~/db3.gramps\fR
|
||||
|
||||
@@ -17,7 +17,7 @@ gramps \- Genealogisch Onderzoek en Analyse Beheersysteem.
|
||||
.IR FORMAAT ]]
|
||||
.RB [ \-i|\-\^\-import=
|
||||
.IR ... ]
|
||||
.RB [ \-o|\-\^\-output=
|
||||
.RB [ \-e|\-\^\-export=
|
||||
.IR BESTAND
|
||||
.RB [ \-f|\-\^\-format=
|
||||
.IR FORMAAT ]]
|
||||
@@ -63,7 +63,7 @@ Expliciet een formaat opgeven voor \fIBESTAND\fR door de optie
|
||||
\fB\-O\fR,
|
||||
..
|
||||
\fB\-i\fR, of
|
||||
\fB\-o\fR mee te geven. Indien de \fB\-f\fR optie niet opgegeven wordt voor
|
||||
\fB\-e\fR mee te geven. Indien de \fB\-f\fR optie niet opgegeven wordt voor
|
||||
\fIBESTAND\fR, wordt het formaat gebaseerd op de bestandsextensie of het
|
||||
MIME-type.
|
||||
.br
|
||||
@@ -106,7 +106,7 @@ and \fB\-i\fR \fIFILE2\fR \fB\-i\fR \fIFILE1\fR might produce different
|
||||
gramps IDs in the resulting database.
|
||||
|
||||
.TP
|
||||
.BI \-o,\-\^\-output= " FILE"
|
||||
.BI \-e,\-\^\-export= " FILE"
|
||||
Export data into \fIFILE\fR. For \fBiso\fR format, the \fIFILE\fR is actually
|
||||
the name of directory the gramps database will be written into.
|
||||
For
|
||||
@@ -118,7 +118,7 @@ and \fBgeneweb\fR, the \fIFILE\fR is the name of the resulting file.
|
||||
.br
|
||||
|
||||
When more than one output file is given, each has to be preceded
|
||||
by \fB\-o\fR flag. The files are written one by one, in the specified order.
|
||||
by \fB\-e\fR flag. The files are written one by one, in the specified order.
|
||||
|
||||
.TP
|
||||
.BI \-a,\-\^\-action= " ACTION"
|
||||
@@ -218,10 +218,10 @@ further command line parameters.
|
||||
.LP
|
||||
With or without the \fB\-O\fR flag, there could be multiple imports,
|
||||
exports, and actions specified further on the command line by using \fB\-i\fR,
|
||||
\fB\-o\fR, and \fB\-a\fR flags.
|
||||
\fB\-e\fR, and \fB\-a\fR flags.
|
||||
|
||||
.LP
|
||||
The order of \fB\-i\fR, \fB\-o\fR, or \fB\-a\fR options does not matter. The
|
||||
The order of \fB\-i\fR, \fB\-e\fR, or \fB\-a\fR options does not matter. The
|
||||
actual order always is: all imports (if any) -> all actions (if any)
|
||||
-> all exports (if any). But opening must always be first!
|
||||
|
||||
@@ -256,8 +256,8 @@ To import four databases (whose formats can be determined from their names) and
|
||||
To explicitly specify the formats in the above example, append filenames with appropriate \fB\-f\fR options:
|
||||
\fBgramps\fR \fB\-i\fR \fIfile1.ged\fR \fB\-f\fR \fIgedcom\fR \fB\-i\fR \fIfile2.tgz\fR \fB\-f\fR \fIgramps-pkg\fR \fB\-i\fR \fI~/db3.gramps\fR \fB\-f\fR \fIgramps-xml\fR \fB\-i\fR \fIfile4.wft\fR \fB\-f\fR \fIwft\fR \fB\-a\fR \fIcheck\fR
|
||||
.TP
|
||||
To record the database resulting from all imports, supply \fB\-o\fR flag (use \fB\-f\fR if the filename does not allow gramps to guess the format):
|
||||
\fBgramps\fR \fB\-i\fR \fIfile1.ged\fR \fB\-i\fR \fIfile2.tgz\fR \fB\-o\fR \fI~/new-package\fR \fB\-f\fR \fIgramps-pkg\fR
|
||||
To record the database resulting from all imports, supply \fB\-e\fR flag (use \fB\-f\fR if the filename does not allow gramps to guess the format):
|
||||
\fBgramps\fR \fB\-i\fR \fIfile1.ged\fR \fB\-i\fR \fIfile2.tgz\fR \fB\-e\fR \fI~/new-package\fR \fB\-f\fR \fIgramps-pkg\fR
|
||||
.TP
|
||||
To import three databases and start interactive gramps session with the result:
|
||||
\fBgramps\fR \fB\-i\fR \fIfile1.ged\fR \fB\-i\fR \fIfile2.tgz\fR \fB\-i\fR \fI~/db3.gramps\fR
|
||||
|
||||
@@ -22,7 +22,7 @@ i Programowego Zarządzania Tą Informacją)
|
||||
.IR FORMAT ]]
|
||||
.RB [ \-i|\-\^\-import=
|
||||
.IR ... ]
|
||||
.RB [ \-o|\-\^\-output=
|
||||
.RB [ \-e|\-\^\-export=
|
||||
.IR PLIK
|
||||
.RB [ \-f|\-\^\-format=
|
||||
.IR FORMAT ]]
|
||||
@@ -66,7 +66,7 @@ Jawne określenie formatu \fIPLIKU\fR przez poprzedzenie opcji
|
||||
.ig
|
||||
\fB\-O\fR,
|
||||
..
|
||||
\fB\-i\fR, lub \fB\-o\fR.
|
||||
\fB\-i\fR, lub \fB\-e\fR.
|
||||
Jeśli opcja \fB\-f\fR nie jest podana dla żadnego \fIPLIKU\fR,
|
||||
to format pliku jest określany na podstawie rozszerzenia albo typu MIME.
|
||||
.br
|
||||
@@ -126,7 +126,7 @@ poleceń, np.: \fB\-i\fR \fIPLIK1\fR \fB\-i\fR \fIPLIK2\fR oraz
|
||||
(gramps ID) w bazie wynikowej.
|
||||
|
||||
.TP
|
||||
.BI \-o,\-\^\-output= " PLIK"
|
||||
.BI \-e,\-\^\-export= " PLIK"
|
||||
Eksportuje dane do \fIPLIKU\fR. Dla formatu \fBiso\fR, \fIPLIK\fR natomiast
|
||||
nazwą katalogu, do którego baza danych gramps zostanie zapisana.
|
||||
Dla
|
||||
@@ -138,7 +138,7 @@ oraz \fBgeneweb\fR, \fIPLIK\fR jest nazwą pliku wynikowego.
|
||||
.br
|
||||
|
||||
Kiedy więcej niż jeden plik wyjściowy jest podany, każdy musi być poprzedzony
|
||||
flagą \fB\-o\fR. Pliki będą zapisywane kolejno, w podanej przez parametry
|
||||
flagą \fB\-e\fR. Pliki będą zapisywane kolejno, w podanej przez parametry
|
||||
kolejności.
|
||||
|
||||
.TP
|
||||
@@ -248,10 +248,10 @@ z linii komend.
|
||||
|
||||
.LP
|
||||
Z flagą \fB\-O\fR czy bez, może występować wiele importów, eksportów oraz
|
||||
akcji określonych za pomocą flag \fB\-i\fR, \fB\-o\fR, oraz \fB\-a\fR .
|
||||
akcji określonych za pomocą flag \fB\-i\fR, \fB\-e\fR, oraz \fB\-a\fR .
|
||||
|
||||
.LP
|
||||
Kolejność podawania opcji \fB\-i\fR, \fB\-o\fR, czy \fB\-a\fR nie ma znaczenia.
|
||||
Kolejność podawania opcji \fB\-i\fR, \fB\-e\fR, czy \fB\-a\fR nie ma znaczenia.
|
||||
Wykonywane są one zawsze w kolejności: wszystkie importy (jeśli podane) ->
|
||||
wszystkie akcje (jeśli podane) -> wszystkie eksporty (jeśli podane)
|
||||
Ale otwarcie bazy zawsze musi być na pierwszym parametrem !
|
||||
@@ -262,7 +262,7 @@ okno i rozpocznie normalną sesję interaktywną z pustą bazą danych (poniewa
|
||||
nie zdołał przetworzyć do niej żadnych danych).
|
||||
|
||||
.LP
|
||||
Jeśli nie podano opcji\fB\-o\fR albo \fB\-a\fR gramps uruchomi swoje głowne
|
||||
Jeśli nie podano opcji\fB\-e\fR albo \fB\-a\fR gramps uruchomi swoje głowne
|
||||
okno i rozpocznie normalną sesję interaktywną z bazą będącą wynikiem wszystkich importów. Ta baza będzie znajdować się w pliku \fBimport_db.grdb\fR
|
||||
w katalogu \fB~/.gramps/import\fR.
|
||||
|
||||
@@ -290,8 +290,8 @@ Aby jawnie określić formaty w powyższym przykładzie, należy dodać nazwy pl
|
||||
z odpowiednimi opcjami \fB\-f\fR options:
|
||||
\fBgramps\fR \fB\-i\fR \fIplik1.ged\fR \fB\-f\fR \fIgedcom\fR \fB\-i\fR \fIplik2.tgz\fR \fB\-f\fR \fIgramps-pkg\fR \fB\-i\fR \fI~/db3.gramps\fR \fB\-f\fR \fIgramps-xml\fR \fB\-i\fR \fIplik4.wft\fR \fB\-f\fR \fIwft\fR \fB\-a\fR \fIcheck\fR
|
||||
.TP
|
||||
Aby zachować bazę z wynikami wszystkich importów, należy dodać flagę \fB\-o\fR (należy użyć \fB\-f\fR jeśli nazwa pliku nie pozwala gramps'owi na odgadnięcie formatu wyjściowego):
|
||||
\fBgramps\fR \fB\-i\fR \fIplik1.ged\fR \fB\-i\fR \fIplik2.tgz\fR \fB\-o\fR \fI~/nowy-pakiet\fR \fB\-f\fR \fIgramps-pkg\fR
|
||||
Aby zachować bazę z wynikami wszystkich importów, należy dodać flagę \fB\-e\fR (należy użyć \fB\-f\fR jeśli nazwa pliku nie pozwala gramps'owi na odgadnięcie formatu wyjściowego):
|
||||
\fBgramps\fR \fB\-i\fR \fIplik1.ged\fR \fB\-i\fR \fIplik2.tgz\fR \fB\-e\fR \fI~/nowy-pakiet\fR \fB\-f\fR \fIgramps-pkg\fR
|
||||
.TP
|
||||
W celu zaimportwania trzech baz i rozpoczęcia sesji interaktywnej z wynikiem
|
||||
importu należy użyć polecenia podobnego do poniższego:
|
||||
|
||||
+11
-11
@@ -19,7 +19,7 @@ gramps \- Genealogical Research and Analysis Management Programming System.
|
||||
.IR FORMAT ]]
|
||||
.RB [ \-i|\-\^\-import=
|
||||
.IR ... ]
|
||||
.RB [ \-o|\-\^\-output=
|
||||
.RB [ \-e|\-\^\-export=
|
||||
.IR FIL
|
||||
.RB [ \-f|\-\^\-format=
|
||||
.IR FORMAT ]]
|
||||
@@ -63,7 +63,7 @@ Uttryckligen specificera format på \fIFIL\fR givet av föregående
|
||||
\fB\-O\fR,
|
||||
..
|
||||
\fB\-i\fR eller
|
||||
\fB\-o\fR-alternativ. Om \fB\-f\fR-alternativet inte ges för någon \fIFIL\fR,
|
||||
\fB\-e\fR-alternativ. Om \fB\-f\fR-alternativet inte ges för någon \fIFIL\fR,
|
||||
gissas filformat för den filen utgående från dess filändelse eller dess MIME-typ.
|
||||
.br
|
||||
|
||||
@@ -113,7 +113,7 @@ och \fB\-i\fR \fIFIL2\fR \fB\-i\fR \fIFIL1\fR kan skapa skilda
|
||||
gramps IDs i den resulterande databasen.
|
||||
|
||||
.TP
|
||||
.BI \-o,\-\^\-output= " FIL"
|
||||
.BI \-e,\-\^\-export= " FIL"
|
||||
Exporterar data till \fIFIL\fR. För \fBiso\fR-format, är \fIFIL\fR i själva verket namnet på den mapp,
|
||||
som gramps databas kommer att skrivas till.
|
||||
För
|
||||
@@ -124,7 +124,7 @@ För
|
||||
och \fBgeneweb\fR, är \fIFIL\fR namnet på resultatfilen.
|
||||
.br
|
||||
|
||||
Om mer är en utdatafil anges, måste varje föregås av en \fB\-o\fR-flagga.
|
||||
Om mer är en utdatafil anges, måste varje föregås av en \fB\-e\fR-flagga.
|
||||
Filerna skrivs en efter en i den givna ordningen.
|
||||
|
||||
.TP
|
||||
@@ -220,21 +220,21 @@ och sedan arbeta med dess data, enligt ytterligare instruktioner på kommandorad
|
||||
Med eller utan \fB\-O\fRflagga, kan det ske många importeringar,
|
||||
exporteringar och åtgärder beskrivna ytterligare på kommanodraden
|
||||
genom att använda \fB\-i\fR-,
|
||||
\fB\-o\fR- samt \fB\-a\fR-flaggor.
|
||||
\fB\-e\fR- samt \fB\-a\fR-flaggor.
|
||||
|
||||
.LP
|
||||
Ordningen på \fB\-i\fR-, \fB\-o\fR- eller \fB\-a\fR-alternativen spelar ingen roll.
|
||||
Ordningen på \fB\-i\fR-, \fB\-e\fR- eller \fB\-a\fR-alternativen spelar ingen roll.
|
||||
Den gällande ordningen är alltid: all import (om någon) -> alla åtgärder (om några)
|
||||
-> all export (om någon). Men öppning måste alltid ske först!
|
||||
|
||||
.LP
|
||||
Om inget \fB\-O\fR- eller \fB\-i\fR-alternativ givits, kommer gramps att starta sitt
|
||||
huvudfönster samt påbörja den valiga interaktiva sessionen med en tom databas,
|
||||
huvudfönster samt påbörja den vanliga interaktiva sessionen med en tom databas,
|
||||
då hur som helst inget data finns att bearbeta.
|
||||
|
||||
.LP
|
||||
Om inget \fB\-o\fR- eller \fB\-a\fR-alternativ givits, kommer gramps att starta sitt
|
||||
huvudfönster samt påbörja den valiga interaktiva sessionen med den databas, som blev
|
||||
Om inget \fB\-e\fR- eller \fB\-a\fR-alternativ givits, kommer gramps att starta sitt
|
||||
huvudfönster samt påbörja den vanliga interaktiva sessionen med den databas, som blev
|
||||
resultet från all import. Denna databas återfinns i \fBimport_db.grdb\fR
|
||||
under \fB~/.gramps/import\fR-mappen.
|
||||
|
||||
@@ -258,8 +258,8 @@ För att importera fyra databaser (vars format kan avgöras av deras namn) och s
|
||||
För att uttryckligen specificera formaten i examplet ovan, lägg till filnamn med passande \fB\-f\fR-alternativ:
|
||||
\fBgramps\fR \fB\-i\fR \fIFIL1.ged\fR \fB\-f\fR \fIgedcom\fR \fB\-i\fR \fIFIL2.tgz\fR \fB\-f\fR \fIgramps-pkg\fR \fB\-i\fR \fI~/db3.gramps\fR \fB\-f\fR \fIgramps-xml\fR \fB\-i\fR \fIFIL4.wft\fR \fB\-f\fR \fIwft\fR \fB\-a\fR \fIcheck\fR
|
||||
.TP
|
||||
För att spara den databas, som är resultat av all import, ange \fB\-o\fR-flagga (använd \fB\-f\fR om filnamnet inte tillåter gramps att gissa dess format):
|
||||
\fBgramps\fR \fB\-i\fR \fIFIL1.ged\fR \fB\-i\fR \fIFIL2.tgz\fR \fB\-o\fR \fI~/new-package\fR \fB\-f\fR \fIgramps-pkg\fR
|
||||
För att spara den databas, som är resultat av all import, ange \fB\-e\fR-flagga (använd \fB\-f\fR om filnamnet inte tillåter gramps att gissa dess format):
|
||||
\fBgramps\fR \fB\-i\fR \fIFIL1.ged\fR \fB\-i\fR \fIFIL2.tgz\fR \fB\-e\fR \fI~/new-package\fR \fB\-f\fR \fIgramps-pkg\fR
|
||||
.TP
|
||||
För att importera tre databaser och påbörja en interaklive gramps-session med importresultatet:
|
||||
\fBgramps\fR \fB\-i\fR \fIFIL1.ged\fR \fB\-i\fR \fIFIL2.tgz\fR \fB\-i\fR \fI~/db3.gramps\fR
|
||||
|
||||
+834
-825
File diff suppressed because it is too large
Load Diff
+5
-10
@@ -269,15 +269,10 @@ src/plugins/gramplet/AgeOnDateGramplet.py
|
||||
src/plugins/gramplet/AgeStats.py
|
||||
src/plugins/gramplet/AttributesGramplet.py
|
||||
src/plugins/gramplet/CalendarGramplet.py
|
||||
src/plugins/gramplet/DataEntryGramplet.py
|
||||
src/plugins/gramplet/DescendGramplet.py
|
||||
src/plugins/gramplet/FanChartGramplet.py
|
||||
src/plugins/gramplet/FaqGramplet.py
|
||||
src/plugins/gramplet/GivenNameGramplet.py
|
||||
src/plugins/gramplet/HeadlineNewsGramplet.py
|
||||
src/plugins/gramplet/NoteGramplet.py
|
||||
src/plugins/gramplet/PedigreeGramplet.py
|
||||
src/plugins/gramplet/PythonGramplet.py
|
||||
src/plugins/gramplet/QuickViewGramplet.py
|
||||
src/plugins/gramplet/RelativeGramplet.py
|
||||
src/plugins/gramplet/SessionLogGramplet.py
|
||||
@@ -304,6 +299,7 @@ src/plugins/import/ImportVCard.py
|
||||
# plugins/lib directory
|
||||
src/plugins/lib/libholiday.py
|
||||
src/plugins/lib/libmapservice.py
|
||||
src/plugins/lib/libgrampsxml.py
|
||||
|
||||
# plugins/mapservices directory
|
||||
src/plugins/mapservices/eniroswedenmap.py
|
||||
@@ -363,14 +359,13 @@ src/plugins/tool/CalculateEstimatedDates.py
|
||||
src/plugins/tool/ChangeNames.py
|
||||
src/plugins/tool/ChangeTypes.py
|
||||
src/plugins/tool/Check.py
|
||||
src/plugins/tool/CmdRef.py
|
||||
src/plugins/tool/Desbrowser.py
|
||||
src/plugins/tool/Eval.py
|
||||
#src/plugins/tool/Eval.py -- commented out due to bug #2763
|
||||
src/plugins/tool/EventCmp.py
|
||||
src/plugins/tool/EventNames.py
|
||||
src/plugins/tool/ExtractCity.py
|
||||
src/plugins/tool/FindDupes.py
|
||||
src/plugins/tool/Leak.py
|
||||
#src/plugins/tool/Leak.py -- commented out due to bug #2763
|
||||
src/plugins/tool/MediaManager.py
|
||||
src/plugins/tool/NotRelated.py
|
||||
src/plugins/tool/OwnerEditor.py
|
||||
@@ -791,10 +786,10 @@ src/plugins/book.glade
|
||||
src/plugins/tool/changenames.glade
|
||||
src/plugins/tool/changetype.glade
|
||||
src/plugins/tool/desbrowse.glade
|
||||
src/plugins/tool/eval.glade
|
||||
#src/plugins/tool/eval.glade -- commented out due to bug #2763
|
||||
src/plugins/tool/eventcmp.glade
|
||||
src/plugins/import/ImportGedcom.glade
|
||||
src/plugins/tool/leak.glade
|
||||
#src/plugins/tool/leak.glade -- commented out due to bug #2763
|
||||
src/plugins/tool/merge.glade
|
||||
src/plugins/tool/ownereditor.glade
|
||||
src/plugins/tool/patchnames.glade
|
||||
|
||||
+5
-1
@@ -15,5 +15,9 @@ src/plugins/tool/PHPGedViewConnector.py
|
||||
src/plugins/tool/TestcaseGenerator.py
|
||||
src/plugins/tool/phpgedview.glade
|
||||
src/ReportBase/_DocReportDialog.py
|
||||
|
||||
src/plugins/gramplet/FaqGramplet.py
|
||||
src/plugins/gramplet/HeadlineNewsGramplet.py
|
||||
src/plugins/quickview/Query.py
|
||||
src/plugins/tool/eval.glade
|
||||
src/plugins/tool/leak.glade
|
||||
|
||||
|
||||
@@ -556,6 +556,15 @@ def analyze_msgs( options, fname, msgs, nr_templates = None, nth = 0 ):
|
||||
template_coverage = po_coverage * float(nr_msgs) / float(nr_templates)
|
||||
print "%-20s%5.2f%%" % ( "Template Coverage:", template_coverage )
|
||||
|
||||
not_displayed = nr_untranslated + nr_fuzzy
|
||||
translation = (1.0 - (float(not_displayed) / float(nr_templates))) * 100
|
||||
text = "%-20s%5.2f%%" % ( "Localized at:", translation)
|
||||
|
||||
if template_coverage == po_coverage:
|
||||
print text
|
||||
else:
|
||||
print text + ' (previous gramps.pot)'
|
||||
|
||||
if not options.only_summary:
|
||||
for c in checks:
|
||||
c.diag()
|
||||
|
||||
+2450
-2591
File diff suppressed because it is too large
Load Diff
+3574
-5233
File diff suppressed because it is too large
Load Diff
+14093
-13388
File diff suppressed because it is too large
Load Diff
+3
-4
@@ -68,7 +68,6 @@ Application options
|
||||
-O, --open=FAMILY_TREE Open family tree
|
||||
-i, --import=FILENAME Import file
|
||||
-e, --export=FILENAME Export file
|
||||
-o, --output=FILENAME Write file
|
||||
-f, --format=FORMAT Specify format
|
||||
-a, --action=ACTION Specify action
|
||||
-p, --options=OPTIONS_STRING Specify options
|
||||
@@ -81,7 +80,7 @@ Application options
|
||||
#-------------------------------------------------------------------------
|
||||
# ArgHandler
|
||||
#-------------------------------------------------------------------------
|
||||
class ArgHandler:
|
||||
class ArgHandler(object):
|
||||
"""
|
||||
This class is responsible for handling command line arguments (if any)
|
||||
given to gramps. The valid arguments are:
|
||||
@@ -102,10 +101,10 @@ class ArgHandler:
|
||||
If no filename or -i option is given, a new interactive session (empty
|
||||
database) is launched, since no data is given anyway.
|
||||
|
||||
If -O or -i option is given, but no -o or -a options are given, an
|
||||
If -O or -i option is given, but no -e or -a options are given, an
|
||||
interactive session is launched with the FILE (specified with -i).
|
||||
|
||||
If both input (-O or -i) and processing (-o or -a) options are given,
|
||||
If both input (-O or -i) and processing (-e or -a) options are given,
|
||||
interactive session will not be launched.
|
||||
"""
|
||||
|
||||
|
||||
+1
-1
@@ -76,7 +76,7 @@ def fill_entry(entry, data_list):
|
||||
# StandardCustomSelector class
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class StandardCustomSelector:
|
||||
class StandardCustomSelector(object):
|
||||
"""
|
||||
This class provides an interface to selecting from the predefined
|
||||
options or entering custom string.
|
||||
|
||||
+19
-16
@@ -5,6 +5,7 @@
|
||||
# Copyright (C) 2002 Gary Shao
|
||||
# Copyright (C) 2007 Brian G. Matherly
|
||||
# Copyright (C) 2009 Benny Malengier
|
||||
# Copyright (C) 2009 Gary Burton
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -137,7 +138,7 @@ def cnv2color(text):
|
||||
# PaperSize
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class PaperSize:
|
||||
class PaperSize(object):
|
||||
"""
|
||||
Defines the dimensions of a sheet of paper. All dimensions are in
|
||||
centimeters.
|
||||
@@ -187,7 +188,7 @@ class PaperSize:
|
||||
# PaperStyle
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class PaperStyle:
|
||||
class PaperStyle(object):
|
||||
"""
|
||||
Define the various options for a sheet of paper.
|
||||
"""
|
||||
@@ -300,7 +301,7 @@ class PaperStyle:
|
||||
# FontStyle
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class FontStyle:
|
||||
class FontStyle(object):
|
||||
"""
|
||||
Defines a font style. Controls the font face, size, color, and
|
||||
attributes. In order to remain generic, the only font faces available
|
||||
@@ -414,7 +415,7 @@ class FontStyle:
|
||||
# TableStyle
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class TableStyle:
|
||||
class TableStyle(object):
|
||||
"""
|
||||
Specifies the style or format of a table. The TableStyle contains the
|
||||
characteristics of table width (in percentage of the full width), the
|
||||
@@ -497,7 +498,7 @@ class TableStyle:
|
||||
# TableCellStyle
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class TableCellStyle:
|
||||
class TableCellStyle(object):
|
||||
"""
|
||||
Defines the style of a particular table cell. Characteristics are:
|
||||
right border, left border, top border, bottom border, and padding.
|
||||
@@ -591,7 +592,7 @@ class TableCellStyle:
|
||||
# ParagraphStyle
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class ParagraphStyle:
|
||||
class ParagraphStyle(object):
|
||||
"""
|
||||
Defines the characteristics of a paragraph. The characteristics are:
|
||||
font (a FontStyle instance), right margin, left margin, first indent,
|
||||
@@ -884,7 +885,7 @@ class ParagraphStyle:
|
||||
# StyleSheetList
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class StyleSheetList:
|
||||
class StyleSheetList(object):
|
||||
"""
|
||||
Interface into the user's defined style sheets. Each StyleSheetList
|
||||
has a predefined default style specified by the report. Additional
|
||||
@@ -1012,7 +1013,7 @@ class StyleSheetList:
|
||||
# StyleSheet
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class StyleSheet:
|
||||
class StyleSheet(object):
|
||||
"""
|
||||
A collection of named paragraph styles.
|
||||
"""
|
||||
@@ -1200,7 +1201,7 @@ class SheetParser(handler.ContentHandler):
|
||||
self.f.set_underline(int(attrs['underline']))
|
||||
self.f.set_color(cnv2color(attrs['color']))
|
||||
elif tag == "para":
|
||||
if 'description' in attrs:
|
||||
if attrs.has_key('description'):
|
||||
self.p.set_description(attrs['description'])
|
||||
self.p.set_right_margin(Utils.gfloat(attrs['rmargin']))
|
||||
self.p.set_right_margin(Utils.gfloat(attrs['rmargin']))
|
||||
@@ -1238,7 +1239,7 @@ class SheetParser(handler.ContentHandler):
|
||||
# GraphicsStyle
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class GraphicsStyle:
|
||||
class GraphicsStyle(object):
|
||||
"""
|
||||
Defines the properties of graphics objects, such as line width,
|
||||
color, fill, ect.
|
||||
@@ -1317,7 +1318,7 @@ class GraphicsStyle:
|
||||
# IndexMark
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class IndexMark:
|
||||
class IndexMark(object):
|
||||
"""
|
||||
Defines a mark to be associated with text for indexing.
|
||||
"""
|
||||
@@ -1334,7 +1335,7 @@ class IndexMark:
|
||||
# BaseDoc
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class BaseDoc:
|
||||
class BaseDoc(object):
|
||||
"""
|
||||
Base class for document generators. Different output formats,
|
||||
such as OpenOffice, AbiWord, and LaTeX are derived from this base
|
||||
@@ -1411,7 +1412,7 @@ class BaseDoc:
|
||||
def noescape(text):
|
||||
return text
|
||||
|
||||
class TextDoc:
|
||||
class TextDoc(object):
|
||||
"""
|
||||
Abstract Interface for text document generators. Output formats for
|
||||
text reports must implment this interface to be used by the report
|
||||
@@ -1676,6 +1677,8 @@ class TextDoc:
|
||||
is <b>text</b><i><b> here</b> not</i>
|
||||
overwrite this method if this complexity is not needed.
|
||||
"""
|
||||
#unicode text most be sliced correctly
|
||||
text=unicode(text)
|
||||
FIRST = 0
|
||||
LAST = 1
|
||||
tagspos = {}
|
||||
@@ -1706,7 +1709,7 @@ class TextDoc:
|
||||
#make sure text can split
|
||||
splitpos = text[start:pos].find(split)
|
||||
while splitpos <> -1:
|
||||
otext += self.ESCAPE_FUNC()(text[start:splitpos])
|
||||
otext += self.ESCAPE_FUNC()(text[start:start+splitpos])
|
||||
#close open tags
|
||||
opentags.reverse()
|
||||
for opentag in opentags:
|
||||
@@ -1759,7 +1762,7 @@ class TextDoc:
|
||||
# DrawDoc
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class DrawDoc:
|
||||
class DrawDoc(object):
|
||||
"""
|
||||
Abstract Interface for graphical document generators. Output formats
|
||||
for graphical reports must implment this interface to be used by the
|
||||
@@ -1819,7 +1822,7 @@ class DrawDoc:
|
||||
# GVDoc
|
||||
#
|
||||
#-------------------------------------------------------------------------------
|
||||
class GVDoc:
|
||||
class GVDoc(object):
|
||||
"""
|
||||
Abstract Interface for Graphviz document generators. Output formats
|
||||
for Graphviz reports must implment this interface to be used by the
|
||||
|
||||
@@ -86,7 +86,7 @@ def _make_cmp(a,b): return -cmp(a[1], b[1])
|
||||
# NameDisplay class
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class NameDisplay:
|
||||
class NameDisplay(object):
|
||||
"""
|
||||
Base class for displaying of Name instances.
|
||||
"""
|
||||
|
||||
@@ -40,7 +40,7 @@ import time
|
||||
# Callback updater
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class UpdateCallback:
|
||||
class UpdateCallback(object):
|
||||
"""
|
||||
Basic class providing way of calling the callback to update
|
||||
things during lenghty operations.
|
||||
|
||||
+4
-1
@@ -54,6 +54,7 @@ import GrampsDisplay
|
||||
from BasicUtils import name_displayer
|
||||
import ListModel
|
||||
import Utils
|
||||
import const
|
||||
from TransUtils import sgettext as _
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@@ -61,7 +62,7 @@ from TransUtils import sgettext as _
|
||||
# Constants
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
WIKI_HELP_PAGE = 'Gramps_3.0_Wiki_Manual_-_Navigation'
|
||||
WIKI_HELP_PAGE = '%s_-_Navigation' % const.URL_MANUAL_PAGE
|
||||
WIKI_HELP_SEC = _('manual|Bookmarks')
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@@ -427,6 +428,8 @@ class NoteBookmarks(ListBookmarks) :
|
||||
def make_label(self, handle):
|
||||
obj = self.dbstate.db.get_note_from_handle(handle)
|
||||
name = obj.get().replace('\n', ' ')
|
||||
#String must be unicode for truncation to work for non ascii characters
|
||||
name = unicode(name)
|
||||
if len(name) > 40:
|
||||
name = name[:40]+"..."
|
||||
return ("%s [%s]" % (name, obj.gramps_id), obj)
|
||||
|
||||
@@ -127,6 +127,8 @@ PEDVIEW_TREESIZE = ('interface', 'pedview-tree-size', 1)
|
||||
PEDVIEW_LAYOUT = ('interface', 'pedview-layout', 1)
|
||||
PEDVIEW_SHOW_MARRIAGE= ('interface', 'pedview-show-marriage', 0)
|
||||
PEDVIEW_SHOW_IMAGES = ('interface', 'pedview-show-images', 0)
|
||||
CLIPBOARD_WIDTH = ('interface', 'clipboard-width', 1)
|
||||
CLIPBOARD_HEIGHT = ('interface', 'clipboard-height', 1)
|
||||
DATABASE_PATH = ('behavior', 'database-path', 2)
|
||||
FPREFIX = ('preferences', 'fprefix', 2)
|
||||
EPREFIX = ('preferences', 'eprefix', 2)
|
||||
@@ -272,6 +274,8 @@ default_value = {
|
||||
PERSON_SEL_HEIGHT : 450,
|
||||
MEDIA_SEL_WIDTH : 600,
|
||||
MEDIA_SEL_HEIGHT : 450,
|
||||
CLIPBOARD_WIDTH : 300,
|
||||
CLIPBOARD_HEIGHT : 300,
|
||||
FILTER : False,
|
||||
PEDVIEW_TREESIZE : 0,
|
||||
PEDVIEW_LAYOUT : 0,
|
||||
|
||||
@@ -42,7 +42,7 @@ def make_bool(val):
|
||||
else:
|
||||
return True
|
||||
|
||||
class IniKeyClient:
|
||||
class IniKeyClient(object):
|
||||
""" Class to emulate gconf's client """
|
||||
def __init__(self, filename = None):
|
||||
""" Constructor takes an optional filename """
|
||||
|
||||
@@ -199,13 +199,19 @@ class FamilyListView(PageView.ListView):
|
||||
pass
|
||||
|
||||
def remove(self, obj):
|
||||
self.uistate.set_busy_cursor(1)
|
||||
import gen.utils
|
||||
|
||||
for handle in self.selected_handles():
|
||||
gen.utils.remove_family_relationships(self.dbstate.db, handle)
|
||||
self.build_tree()
|
||||
self.uistate.set_busy_cursor(0)
|
||||
from QuestionDialog import QuestionDialog2
|
||||
from Utils import data_recover_msg
|
||||
msg = _('Deleting item will remove it from the database.')
|
||||
msg = msg + '\n' + data_recover_msg
|
||||
q = QuestionDialog2(_('Delete %s?') % _('family'), msg,
|
||||
_('_Delete Item'), _('Cancel'))
|
||||
if q.run():
|
||||
self.uistate.set_busy_cursor(1)
|
||||
import gen.utils
|
||||
for handle in self.selected_handles():
|
||||
gen.utils.remove_family_relationships(self.dbstate.db, handle)
|
||||
self.build_tree()
|
||||
self.uistate.set_busy_cursor(0)
|
||||
|
||||
def edit(self, obj):
|
||||
for handle in self.selected_handles():
|
||||
|
||||
+527
-402
File diff suppressed because it is too large
Load Diff
@@ -80,10 +80,19 @@ def register_gramplet(data_dict):
|
||||
base_opts = {"name":"Unnamed Gramplet",
|
||||
"tname": _("Unnamed Gramplet"),
|
||||
"state":"maximized",
|
||||
"version":"0.0.0",
|
||||
"gramps":"0.0.0",
|
||||
"column": -1, "row": -1,
|
||||
"data": []}
|
||||
base_opts.update(data_dict)
|
||||
AVAILABLE_GRAMPLETS[base_opts["name"]] = base_opts
|
||||
if base_opts["name"] not in AVAILABLE_GRAMPLETS:
|
||||
AVAILABLE_GRAMPLETS[base_opts["name"]] = base_opts
|
||||
else: # go with highest version (or current one in case of tie)
|
||||
# GRAMPS loads system plugins first
|
||||
loaded_version = [int(i) for i in AVAILABLE_GRAMPLETS[base_opts["name"]]["version"].split(".")]
|
||||
current_version = [int(i) for i in base_opts["version"].split(".")]
|
||||
if current_version >= loaded_version:
|
||||
AVAILABLE_GRAMPLETS[base_opts["name"]] = base_opts
|
||||
|
||||
def register(**data):
|
||||
"""
|
||||
@@ -165,8 +174,7 @@ def make_requested_gramplet(viewpage, name, opts, dbstate, uistate):
|
||||
if msg is None:
|
||||
msg = _("Drag Properties Button to move and click it for setup")
|
||||
if msg:
|
||||
gui.tooltips = gtk.Tooltips()
|
||||
gui.tooltips.set_tip(gui.scrolledwindow, msg)
|
||||
gui.scrolledwindow.set_tooltip_text(msg)
|
||||
gui.tooltips_text = msg
|
||||
gui.make_gui_options()
|
||||
gui.gvoptions.hide()
|
||||
@@ -202,7 +210,7 @@ class GrampletWindow(ManagedWindow.ManagedWindow):
|
||||
"""
|
||||
self.title = gramplet.title + " " + _("Gramplet")
|
||||
self.gramplet = gramplet
|
||||
ManagedWindow.ManagedWindow.__init__(self, gramplet.uistate, [], self.__class__)
|
||||
ManagedWindow.ManagedWindow.__init__(self, gramplet.uistate, [], self.title)
|
||||
self.set_window(gtk.Dialog("",gramplet.uistate.window,
|
||||
gtk.DIALOG_DESTROY_WITH_PARENT,
|
||||
(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE)),
|
||||
@@ -249,19 +257,22 @@ class GrampletWindow(ManagedWindow.ManagedWindow):
|
||||
|
||||
def close(self, *args):
|
||||
"""
|
||||
Closes the detached GrampletWindow.
|
||||
Dock the detached GrampletWindow back in the column from where it came.
|
||||
"""
|
||||
self.gramplet.gvoptions.hide()
|
||||
self.gramplet.viewpage.detached_gramplets.remove(self.gramplet)
|
||||
self.gramplet.state = "maximized"
|
||||
parent = self.gramplet.viewpage.get_column_frame(self.gramplet.column)
|
||||
self.gramplet.mainframe.reparent(parent)
|
||||
# FIXME: Put the gramplet in the same column/row where it came from, if you can.
|
||||
# This will put it at the bottom of column:
|
||||
expand,fill,padding,pack = parent.query_child_packing(self.gramplet.mainframe)
|
||||
parent.set_child_packing(self.gramplet.mainframe,
|
||||
self.gramplet.expand,
|
||||
fill,
|
||||
padding,
|
||||
pack)
|
||||
# end FIXME
|
||||
self.gramplet.gvclose.show()
|
||||
self.gramplet.gvstate.show()
|
||||
self.gramplet.gvproperties.show()
|
||||
@@ -573,8 +584,7 @@ class Gramplet(object):
|
||||
"""
|
||||
from PluginUtils import make_gui_option
|
||||
#tooltips, dbstate, uistate, track
|
||||
widget, label = make_gui_option(option, None, self.dbstate,
|
||||
self.uistate,None)
|
||||
widget, label = make_gui_option(option, self.dbstate, self.uistate,None)
|
||||
self.option_dict.update({option.get_label(): (widget, option)})
|
||||
self.option_order.append(option.get_label())
|
||||
|
||||
@@ -588,7 +598,7 @@ class Gramplet(object):
|
||||
def save_options(self):
|
||||
pass
|
||||
|
||||
class GuiGramplet:
|
||||
class GuiGramplet(object):
|
||||
"""
|
||||
Class that handles the plugin interfaces for the GrampletView.
|
||||
"""
|
||||
@@ -659,7 +669,7 @@ class GuiGramplet:
|
||||
"""
|
||||
Remove (delete) the gramplet from view.
|
||||
"""
|
||||
if self.state == "windowed":
|
||||
if self.state == "detached":
|
||||
return
|
||||
self.state = "closed"
|
||||
self.viewpage.closed_gramplets.append(self)
|
||||
@@ -670,7 +680,7 @@ class GuiGramplet:
|
||||
Detach the gramplet from the GrampletView, and open in own window.
|
||||
"""
|
||||
# hide buttons:
|
||||
self.set_state("windowed")
|
||||
self.set_state("detached")
|
||||
self.viewpage.detached_gramplets.append(self)
|
||||
# make a window, and attach it there
|
||||
self.detached_window = GrampletWindow(self)
|
||||
@@ -679,6 +689,7 @@ class GuiGramplet:
|
||||
"""
|
||||
Set the state of a gramplet.
|
||||
"""
|
||||
oldstate = self.state
|
||||
self.state = state
|
||||
if state == "minimized":
|
||||
self.scrolledwindow.hide()
|
||||
@@ -699,15 +710,15 @@ class GuiGramplet:
|
||||
fill,
|
||||
padding,
|
||||
pack)
|
||||
if state == "maximized" and self.pui:
|
||||
if oldstate is "minimized" and self.pui:
|
||||
self.pui.update()
|
||||
|
||||
def change_state(self, obj):
|
||||
"""
|
||||
Change the state of a gramplet.
|
||||
"""
|
||||
if self.state == "windowed":
|
||||
pass # don't change if windowed
|
||||
if self.state == "detached":
|
||||
pass # don't change if detached
|
||||
else:
|
||||
if self.state == "maximized":
|
||||
self.set_state("minimized")
|
||||
@@ -718,12 +729,11 @@ class GuiGramplet:
|
||||
"""
|
||||
Set the properties of a gramplet.
|
||||
"""
|
||||
if self.state == "windowed":
|
||||
if self.state == "detached":
|
||||
pass
|
||||
else:
|
||||
self.detach()
|
||||
return
|
||||
# FIXME: add control for expand AND detach
|
||||
self.expand = not self.expand
|
||||
if self.state == "maximized":
|
||||
column = self.mainframe.get_parent() # column
|
||||
@@ -937,13 +947,10 @@ class GuiGramplet:
|
||||
else:
|
||||
tag.set_property('underline', pango.UNDERLINE_NONE)
|
||||
view.get_window(gtk.TEXT_WINDOW_TEXT).set_cursor(cursor)
|
||||
if self.tooltips:
|
||||
if ttip:
|
||||
self.tooltips.set_tip(self.scrolledwindow,
|
||||
ttip)
|
||||
else:
|
||||
self.tooltips.set_tip(self.scrolledwindow,
|
||||
self.tooltips_text)
|
||||
if ttip:
|
||||
self.scrolledwindow.set_tooltip_text(ttip)
|
||||
elif self.tooltips_text:
|
||||
self.scrolledwindow.set_tooltip_text(self.tooltips_text)
|
||||
return False # handle event further, if necessary
|
||||
|
||||
def on_button_press(self, view, event):
|
||||
@@ -1089,8 +1096,7 @@ class GrampletView(PageView.PersonNavView):
|
||||
# build the GUI:
|
||||
frame = MyScrolledWindow()
|
||||
msg = _("Right click to add gramplets")
|
||||
self.tooltips = gtk.Tooltips()
|
||||
self.tooltips.set_tip(frame, msg)
|
||||
frame.set_tooltip_text(msg)
|
||||
frame.viewpage = self
|
||||
frame.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
|
||||
self.hbox = gtk.HBox(homogeneous=True)
|
||||
@@ -1156,7 +1162,7 @@ class GrampletView(PageView.PersonNavView):
|
||||
"""
|
||||
gramplets = [g for g in self.gramplet_map.values() if g is not None]
|
||||
for gramplet in gramplets:
|
||||
if (gramplet.state == "windowed" or gramplet.state == "closed"):
|
||||
if (gramplet.state == "detached" or gramplet.state == "closed"):
|
||||
continue
|
||||
column = gramplet.mainframe.get_parent()
|
||||
if column:
|
||||
@@ -1180,16 +1186,19 @@ class GrampletView(PageView.PersonNavView):
|
||||
# else, spread them out:
|
||||
pos = cnt % self.column_count
|
||||
gramplet.column = pos
|
||||
if recolumn and (gramplet.state == "windowed" or gramplet.state == "closed"):
|
||||
if recolumn and (gramplet.state == "detached" or gramplet.state == "closed"):
|
||||
continue
|
||||
self.columns[pos].pack_start(gramplet.mainframe, expand=gramplet.expand)
|
||||
if gramplet.state == "minimized":
|
||||
self.columns[pos].pack_start(gramplet.mainframe, expand=False)
|
||||
else:
|
||||
self.columns[pos].pack_start(gramplet.mainframe, expand=gramplet.expand)
|
||||
# set height on gramplet.scrolledwindow here:
|
||||
gramplet.scrolledwindow.set_size_request(-1, gramplet.height)
|
||||
# Can't minimize here, because GRAMPS calls show_all later:
|
||||
#if gramplet.state == "minimized": # starts max, change to min it
|
||||
# gramplet.set_state("minimized") # minimize it
|
||||
# set minimized is called in page subclass hack (above)
|
||||
if gramplet.state == "windowed":
|
||||
if gramplet.state == "detached":
|
||||
gramplet.detach()
|
||||
elif gramplet.state == "closed":
|
||||
gramplet.close()
|
||||
@@ -1500,8 +1509,6 @@ class GrampletView(PageView.PersonNavView):
|
||||
self._popup_xy[0], self._popup_xy[1], 0)
|
||||
else:
|
||||
self.drop_widget(self.widget, gramplet, 0, 0, 0)
|
||||
if g.pui:
|
||||
g.pui.update()
|
||||
else:
|
||||
print "Can't make gramplet of type '%s'." % name
|
||||
|
||||
@@ -1559,15 +1566,14 @@ class GrampletView(PageView.PersonNavView):
|
||||
ag_menu = self.uistate.uimanager.get_widget('/Popup/AddGramplet')
|
||||
if ag_menu:
|
||||
qr_menu = ag_menu.get_submenu()
|
||||
if qr_menu is None:
|
||||
qr_menu = gtk.Menu()
|
||||
names = [AVAILABLE_GRAMPLETS[key]["tname"] for key
|
||||
in AVAILABLE_GRAMPLETS.keys()]
|
||||
names.sort()
|
||||
for name in names:
|
||||
Utils.add_menuitem(qr_menu, name,
|
||||
None, self.add_gramplet)
|
||||
self.uistate.uimanager.get_widget('/Popup/AddGramplet').set_submenu(qr_menu)
|
||||
qr_menu = gtk.Menu()
|
||||
names = [AVAILABLE_GRAMPLETS[key]["tname"] for key
|
||||
in AVAILABLE_GRAMPLETS.keys()]
|
||||
names.sort()
|
||||
for name in names:
|
||||
Utils.add_menuitem(qr_menu, name,
|
||||
None, self.add_gramplet)
|
||||
self.uistate.uimanager.get_widget('/Popup/AddGramplet').set_submenu(qr_menu)
|
||||
rg_menu = self.uistate.uimanager.get_widget('/Popup/RestoreGramplet')
|
||||
if rg_menu:
|
||||
qr_menu = rg_menu.get_submenu()
|
||||
|
||||
@@ -7,6 +7,7 @@ pkgdatadir = $(datadir)/@PACKAGE@/DataViews
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
__init__.py\
|
||||
GeoView.py\
|
||||
GrampletView.py\
|
||||
PersonView.py\
|
||||
RelationView.py\
|
||||
|
||||
@@ -152,7 +152,7 @@ class GuideMap(gtk.DrawingArea):
|
||||
return (px,py)
|
||||
|
||||
# Map tile files used by the ZoomMap
|
||||
class MapTile:
|
||||
class MapTile(object):
|
||||
def __init__( self, filename, x, y, w, h, pw, ph):
|
||||
self.filename = filename
|
||||
self.full_path = os.path.join(const.IMAGE_DIR,filename)
|
||||
@@ -226,7 +226,7 @@ class MapTile:
|
||||
self.scale = None
|
||||
self.scaled_pixbuf = None
|
||||
|
||||
class WMSMapTile:
|
||||
class WMSMapTile(object):
|
||||
def __init__(self,capabilities,change_cb=None):
|
||||
self.change_cb = change_cb
|
||||
self.scaled_pixbuf = None
|
||||
|
||||
@@ -275,13 +275,11 @@ class MediaView(PageView.ListView):
|
||||
ebox = gtk.EventBox()
|
||||
ebox.add(self.image)
|
||||
ebox.connect('button-press-event', self.button_press_event)
|
||||
ebox.set_tooltip_text(
|
||||
_('Double click image to view in an external viewer'))
|
||||
vbox.pack_start(ebox, False)
|
||||
vbox.pack_start(base, True)
|
||||
|
||||
self.ttips = gtk.Tooltips()
|
||||
self.ttips.set_tip(
|
||||
ebox, _('Double click image to view in an external viewer'))
|
||||
|
||||
self.selection.connect('changed', self.row_change)
|
||||
self._set_dnd()
|
||||
return vbox
|
||||
@@ -314,13 +312,11 @@ class MediaView(PageView.ListView):
|
||||
handle = self.first_selected()
|
||||
if not handle:
|
||||
self.image.clear()
|
||||
self.ttips.disable()
|
||||
else:
|
||||
obj = self.dbstate.db.get_object_from_handle(handle)
|
||||
pix = ThumbNails.get_thumbnail_image(
|
||||
Utils.media_path_full(self.dbstate.db, obj.get_path()))
|
||||
self.image.set_from_pixbuf(pix)
|
||||
self.ttips.enable()
|
||||
|
||||
def ui_definition(self):
|
||||
"""
|
||||
|
||||
@@ -357,7 +357,7 @@ class PersonBoxWidget( gtk.DrawingArea, _PersonWidget_base):
|
||||
else:
|
||||
self.window.draw_rectangle(self.border_gc, False, 0, 0, alloc.width-4, alloc.height-4)
|
||||
|
||||
class FormattingHelper:
|
||||
class FormattingHelper(object):
|
||||
def __init__(self,dbstate):
|
||||
self.dbstate = dbstate
|
||||
self._text_cache = {}
|
||||
@@ -367,7 +367,9 @@ class FormattingHelper:
|
||||
text = ""
|
||||
for event_ref in family.get_event_ref_list():
|
||||
event = self.dbstate.db.get_event_from_handle(event_ref.ref)
|
||||
if event and event.get_type() == gen.lib.EventType.MARRIAGE:
|
||||
if event and event.get_type() == gen.lib.EventType.MARRIAGE and \
|
||||
(event_ref.get_role() == gen.lib.EventRoleType.FAMILY or
|
||||
event_ref.get_role() == gen.lib.EventRoleType.PRIMARY ):
|
||||
if line_count < 3:
|
||||
return DateHandler.get_date(event)
|
||||
name = str(event.get_type())
|
||||
@@ -527,8 +529,6 @@ class PedigreeView(PageView.PersonNavView):
|
||||
contains the interface. This containter will be inserted into
|
||||
a gtk.Notebook page.
|
||||
"""
|
||||
self.tooltips = gtk.Tooltips()
|
||||
self.tooltips.enable()
|
||||
|
||||
self.notebook = gtk.Notebook()
|
||||
self.notebook.connect("button-press-event", self.bg_button_press_cb)
|
||||
@@ -747,7 +747,8 @@ class PedigreeView(PageView.PersonNavView):
|
||||
((8,26,3,1),None,None),
|
||||
((8,28,3,1),None,None),
|
||||
((8,30,3,1),None,None),)
|
||||
elif self.tree_style == 0:
|
||||
else:
|
||||
#elif self.tree_style == 0:
|
||||
pos_2 =(((0,0,1,3),(1,0,3),(2,1,1,1)),
|
||||
((2,0,1,1),None,None),
|
||||
((2,2,1,1),None,None))
|
||||
@@ -876,7 +877,7 @@ class PedigreeView(PageView.PersonNavView):
|
||||
else:
|
||||
pw = PersonBoxWidget( self, self.format_helper, lst[i][0], lst[i][3], positions[i][0][3], image);
|
||||
if positions[i][0][3] < 7:
|
||||
self.tooltips.set_tip(pw, self.format_helper.format_person(lst[i][0], 11))
|
||||
pw.set_tooltip_text(self.format_helper.format_person(lst[i][0], 11))
|
||||
|
||||
pw.connect("button-press-event", self.person_button_press_cb,lst[i][0].get_handle())
|
||||
if positions[i][0][2] > 1:
|
||||
@@ -944,7 +945,7 @@ class PedigreeView(PageView.PersonNavView):
|
||||
if lst[i] and lst[i][2]:
|
||||
line.add_events(gtk.gdk.ENTER_NOTIFY_MASK) # Required for tooltip and mouse-over
|
||||
line.add_events(gtk.gdk.LEAVE_NOTIFY_MASK) # Required for tooltip and mouse-over
|
||||
self.tooltips.set_tip(line, self.format_helper.format_relation(lst[i][2], 11))
|
||||
line.set_tooltip_text(self.format_helper.format_relation(lst[i][2], 11))
|
||||
if lst[i*2+1]:
|
||||
line.set_data("frela", lst[i*2+1][1])
|
||||
if lst[i*2+2]:
|
||||
@@ -978,7 +979,7 @@ class PedigreeView(PageView.PersonNavView):
|
||||
childlist = find_children(self.dbstate.db,lst[0][0])
|
||||
if childlist:
|
||||
l.connect("clicked",self.on_show_child_menu)
|
||||
self.tooltips.set_tip(l, _("Jump to child..."))
|
||||
l.set_tooltip_text(_("Jump to child..."))
|
||||
else:
|
||||
l.set_sensitive(False)
|
||||
ymid = int(math.floor(ymax/2))
|
||||
@@ -987,7 +988,7 @@ class PedigreeView(PageView.PersonNavView):
|
||||
l.add(gtk.Arrow(gtk.ARROW_RIGHT, gtk.SHADOW_IN))
|
||||
if lst[1]:
|
||||
l.connect("clicked",self.on_childmenu_changed,lst[1][0].handle)
|
||||
self.tooltips.set_tip(l, _("Jump to father"))
|
||||
l.set_tooltip_text(("Jump to father"))
|
||||
else:
|
||||
l.set_sensitive(False)
|
||||
ymid = int(math.floor(ymax/4))
|
||||
@@ -996,7 +997,7 @@ class PedigreeView(PageView.PersonNavView):
|
||||
l.add(gtk.Arrow(gtk.ARROW_RIGHT, gtk.SHADOW_IN))
|
||||
if lst[2]:
|
||||
l.connect("clicked",self.on_childmenu_changed,lst[2][0].handle)
|
||||
self.tooltips.set_tip(l, _("Jump to mother"))
|
||||
l.set_tooltip_text(("Jump to mother"))
|
||||
else:
|
||||
l.set_sensitive(False)
|
||||
ymid = int(math.floor(ymax/4*3))
|
||||
|
||||
@@ -31,6 +31,7 @@ PersonView interface.
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
import cPickle as pickle
|
||||
import time
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@@ -41,6 +42,14 @@ import gtk
|
||||
import pango
|
||||
from gtk.gdk import ACTION_COPY, BUTTON1_MASK
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# set up logging
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import logging
|
||||
_LOG = logging.getLogger(".gui.personview")
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# GRAMPS modules
|
||||
@@ -518,6 +527,7 @@ class PersonView(PageView.PersonNavView):
|
||||
since it can change when rows are unselected when the model is set.
|
||||
"""
|
||||
if self.active:
|
||||
cput = time.clock()
|
||||
if Config.get(Config.FILTER):
|
||||
filter_info = (PeopleModel.GENERIC, self.generic_filter)
|
||||
else:
|
||||
@@ -525,7 +535,9 @@ class PersonView(PageView.PersonNavView):
|
||||
|
||||
self.model = PeopleModel(self.dbstate.db, filter_info, skip)
|
||||
active = self.dbstate.active
|
||||
cput1 = time.clock()
|
||||
self.tree.set_model(self.model)
|
||||
cput2 = time.clock()
|
||||
|
||||
if const.USE_TIPS and self.model.tooltip_column is not None:
|
||||
self.tooltips = TreeTips.TreeTips(self.tree,
|
||||
@@ -539,6 +551,9 @@ class PersonView(PageView.PersonNavView):
|
||||
self.uistate.show_filter_results(self.dbstate,
|
||||
self.model.displayed,
|
||||
self.model.total)
|
||||
_LOG.debug(self.__class__.__name__ + ' build_tree ' +
|
||||
str(time.clock() - cput) + ' sec')
|
||||
_LOG.debug(' setting model ' + str(cput2 - cput1) + ' sec')
|
||||
else:
|
||||
self.dirty = True
|
||||
|
||||
@@ -710,6 +725,7 @@ class PersonView(PageView.PersonNavView):
|
||||
if not self.model:
|
||||
return
|
||||
if self.active:
|
||||
cput = time.clock()
|
||||
self.dirty = False
|
||||
for node in set(handle_list):
|
||||
person = self.dbstate.db.get_person_from_handle(node)
|
||||
@@ -729,6 +745,8 @@ class PersonView(PageView.PersonNavView):
|
||||
path = self.model.on_get_path(node)
|
||||
pnode = self.model.get_iter(path)
|
||||
self.model.row_inserted(path, pnode)
|
||||
_LOG.debug(self.__class__.__name__ + ' person_added ' +
|
||||
str(time.clock() - cput) + ' sec')
|
||||
else:
|
||||
self.dirty = True
|
||||
|
||||
@@ -745,6 +763,7 @@ class PersonView(PageView.PersonNavView):
|
||||
if not self.model:
|
||||
return
|
||||
|
||||
cput = time.clock()
|
||||
expand = []
|
||||
self.tree.map_expanded_rows(self.func, expand)
|
||||
|
||||
@@ -753,11 +772,14 @@ class PersonView(PageView.PersonNavView):
|
||||
path = self.model.mapper.top_iter2path.get(i)
|
||||
if path:
|
||||
self.tree.expand_row(path, False)
|
||||
_LOG.debug(self.__class__.__name__ + ' person_removed ' +
|
||||
str(time.clock() - cput) + ' sec')
|
||||
|
||||
def person_updated(self, handle_list):
|
||||
if not self.model:
|
||||
return
|
||||
|
||||
cput = time.clock()
|
||||
self.model.clear_cache()
|
||||
for node in handle_list:
|
||||
person = self.dbstate.db.get_person_from_handle(node)
|
||||
@@ -796,6 +818,8 @@ class PersonView(PageView.PersonNavView):
|
||||
break
|
||||
|
||||
self.goto_active_person()
|
||||
_LOG.debug(self.__class__.__name__ + ' person_updated ' +
|
||||
str(time.clock() - cput) + ' sec')
|
||||
|
||||
def get_selected_objects(self):
|
||||
(mode, paths) = self.selection.get_selected_rows()
|
||||
|
||||
+16
-12
@@ -131,14 +131,14 @@ class PlaceView(PageView.ListView):
|
||||
callback=self.fast_merge)
|
||||
self._add_toolmenu_action('MapsList', _('Loading...'),
|
||||
_("Attempt to see selected locations with a Map "
|
||||
"Service (OpenstreetMap, Google Maps, ..."),
|
||||
"Service (OpenstreetMap, Google Maps, ...)"),
|
||||
self.gotomap,
|
||||
_('Select a Map Service'))
|
||||
self._add_action('GotoMap', gtk.STOCK_JUMP_TO,
|
||||
_('_Look up with Map Service'),
|
||||
callback=self.gotomap,
|
||||
tip=_("Attempt to see this location with a Map "
|
||||
"Service (OpenstreetMap, Google Maps, ..."))
|
||||
"Service (OpenstreetMap, Google Maps, ...)"))
|
||||
self._add_action('FilterEdit', None, _('Place Filter Editor'),
|
||||
callback=self.filter_editor)
|
||||
|
||||
@@ -171,16 +171,13 @@ class PlaceView(PageView.ListView):
|
||||
for widget in widgets :
|
||||
if isinstance(widget, gtk.MenuToolButton):
|
||||
widget.set_menu(mmenu)
|
||||
widget.set_arrow_tooltip_text(actionservices.arrowtooltip)
|
||||
hbox=gtk.HBox()
|
||||
img = gtk.Image()
|
||||
img.set_from_stock(gtk.STOCK_JUMP_TO,
|
||||
gtk.ICON_SIZE_LARGE_TOOLBAR)
|
||||
hbox.pack_start(img)
|
||||
self.mapslistlabel.append(gtk.Label(self.mapservice_label()))
|
||||
hbox.pack_start(self.mapslistlabel[-1])
|
||||
hbox.show_all()
|
||||
widget.set_icon_widget(hbox)
|
||||
if gtk.pygtk_version >= (2, 12, 0):
|
||||
widget.set_arrow_tooltip_text(actionservices.arrowtooltip)
|
||||
lbl = gtk.Label(self.mapservice_label())
|
||||
lbl.show()
|
||||
self.mapslistlabel.append(lbl)
|
||||
widget.set_label_widget(self.mapslistlabel[-1])
|
||||
widget.set_stock_id(gtk.STOCK_JUMP_TO)
|
||||
|
||||
def __create_maps_menu_actions(self):
|
||||
"""
|
||||
@@ -222,6 +219,13 @@ class PlaceView(PageView.ListView):
|
||||
"""
|
||||
Run the map service
|
||||
"""
|
||||
#First test if any map service is available
|
||||
if not len(self.mapservicedata):
|
||||
msg = _("No map service is available.")
|
||||
msg2 = _("Check your installation.")
|
||||
ErrorDialog(msg, msg2)
|
||||
return
|
||||
|
||||
place_handles = self.selected_handles()
|
||||
try:
|
||||
place_handle = self.selected_handles()[0]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2001-2007 Donald N. Allingham
|
||||
# Copyright (C) 2009 Gary Burton
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -91,10 +92,11 @@ _SDATA_START = 2
|
||||
_SDATA_STOP = 4
|
||||
_RETURN = gtk.gdk.keyval_from_name("Return")
|
||||
_KP_ENTER = gtk.gdk.keyval_from_name("KP_Enter")
|
||||
_SPACE = gtk.gdk.keyval_from_name("space")
|
||||
_LEFT_BUTTON = 1
|
||||
_RIGHT_BUTTON = 3
|
||||
|
||||
class AttachList:
|
||||
class AttachList(object):
|
||||
|
||||
def __init__(self):
|
||||
self.list = []
|
||||
@@ -130,6 +132,7 @@ class RelationshipView(PageView.PersonNavView):
|
||||
|
||||
self.color = gtk.TextView().style.white
|
||||
self.child = None
|
||||
self.old_handle = None
|
||||
|
||||
Config.client.notify_add("/apps/gramps/preferences/relation-shade",
|
||||
self.shade_update)
|
||||
@@ -417,12 +420,19 @@ class RelationshipView(PageView.PersonNavView):
|
||||
return True
|
||||
|
||||
def _change_person(self, obj):
|
||||
if obj == self.old_handle:
|
||||
#same object, keep present scroll position
|
||||
old_vadjust = self.scroll.get_vadjustment().value
|
||||
self.old_handle = obj
|
||||
else:
|
||||
#different object, scroll to top
|
||||
old_vadjust = self.scroll.get_vadjustment().lower
|
||||
self.old_handle = obj
|
||||
self.scroll.get_vadjustment().value = \
|
||||
self.scroll.get_vadjustment().lower
|
||||
if self.redrawing:
|
||||
return False
|
||||
self.redrawing = True
|
||||
self.tooltips = gtk.Tooltips()
|
||||
|
||||
for old_child in self.vbox.get_children():
|
||||
self.vbox.remove(old_child)
|
||||
@@ -503,6 +513,8 @@ class RelationshipView(PageView.PersonNavView):
|
||||
self.child.show_all()
|
||||
|
||||
self.vbox.pack_start(self.child, False)
|
||||
#reset scroll position as it was before
|
||||
self.scroll.get_vadjustment().value = old_vadjust
|
||||
self.redrawing = False
|
||||
self.uistate.modify_statusbar(self.dbstate)
|
||||
|
||||
@@ -528,7 +540,7 @@ class RelationshipView(PageView.PersonNavView):
|
||||
if Config.get(Config.RELEDITBTN):
|
||||
button = widgets.IconButton(self.edit_button_press,
|
||||
person.handle)
|
||||
self.tooltips.set_tip(button, _('Edit %s') % name)
|
||||
button.set_tooltip_text(_('Edit %s') % name)
|
||||
else:
|
||||
button = None
|
||||
hbox = widgets.LinkBox(label, button)
|
||||
@@ -745,30 +757,30 @@ class RelationshipView(PageView.PersonNavView):
|
||||
if not self.toolbar_visible and not self.dbstate.db.readonly:
|
||||
# Show edit-Buttons if toolbar is not visible
|
||||
if self.reorder_sensitive:
|
||||
add = widgets.IconButton(self.reorder, None,
|
||||
add = widgets.IconButton(self.reorder_button_press, None,
|
||||
gtk.STOCK_SORT_ASCENDING)
|
||||
self.tooltips.set_tip(add, ord_msg)
|
||||
add.set_tooltip_text(ord_msg)
|
||||
hbox.pack_start(add, False)
|
||||
|
||||
add = widgets.IconButton(call_fcn, None, gtk.STOCK_ADD)
|
||||
self.tooltips.set_tip(add, add_msg)
|
||||
add.set_tooltip_text(add_msg)
|
||||
hbox.pack_start(add, False)
|
||||
|
||||
if is_parent:
|
||||
add = widgets.IconButton(self.select_family, None,
|
||||
gtk.STOCK_INDEX)
|
||||
self.tooltips.set_tip(add, sel_msg)
|
||||
add.set_tooltip_text(sel_msg)
|
||||
hbox.pack_start(add, False)
|
||||
|
||||
if family:
|
||||
edit = widgets.IconButton(self.edit_family, family.handle,
|
||||
gtk.STOCK_EDIT)
|
||||
self.tooltips.set_tip(edit, edit_msg)
|
||||
edit.set_tooltip_text(edit_msg)
|
||||
hbox.pack_start(edit, False)
|
||||
if not self.dbstate.db.readonly:
|
||||
delete = widgets.IconButton(del_fcn, family.handle,
|
||||
gtk.STOCK_REMOVE)
|
||||
self.tooltips.set_tip(delete, del_msg)
|
||||
delete.set_tooltip_text(del_msg)
|
||||
hbox.pack_start(delete, False)
|
||||
self.attach.attach(hbox, _BTN_START, _BTN_STOP, self.row, self.row+1)
|
||||
self.row += 1
|
||||
@@ -873,13 +885,11 @@ class RelationshipView(PageView.PersonNavView):
|
||||
addchild = widgets.IconButton(self.add_child_to_fam,
|
||||
family.handle,
|
||||
gtk.STOCK_ADD)
|
||||
self.tooltips.set_tip(addchild,
|
||||
_('Add new child to family'))
|
||||
addchild.set_tooltip_text(_('Add new child to family'))
|
||||
selchild = widgets.IconButton(self.sel_child_to_fam,
|
||||
family.handle,
|
||||
gtk.STOCK_INDEX)
|
||||
self.tooltips.set_tip(selchild,
|
||||
_('Add existing child to family'))
|
||||
selchild.set_tooltip_text(_('Add existing child to family'))
|
||||
hbox.pack_start(addchild, False)
|
||||
hbox.pack_start(selchild, False)
|
||||
|
||||
@@ -901,7 +911,7 @@ class RelationshipView(PageView.PersonNavView):
|
||||
eventbox.modify_bg(gtk.STATE_NORMAL, self.color)
|
||||
eventbox.add(vbox)
|
||||
self.attach.attach(
|
||||
eventbox, _CDATA_START-1, _CDATA_STOP-1, self.row,
|
||||
eventbox, _CDATA_START-1, _CDATA_STOP, self.row,
|
||||
self.row+1)
|
||||
|
||||
self.row += 1
|
||||
@@ -923,7 +933,7 @@ class RelationshipView(PageView.PersonNavView):
|
||||
if Config.get(Config.RELEDITBTN):
|
||||
button = widgets.IconButton(self.edit_button_press,
|
||||
handle)
|
||||
self.tooltips.set_tip(button, _('Edit %s') % name[0])
|
||||
button.set_tooltip_text(('Edit %s') % name[0])
|
||||
else:
|
||||
button = None
|
||||
vbox.pack_start(widgets.LinkBox(link_label, button),
|
||||
@@ -976,7 +986,7 @@ class RelationshipView(PageView.PersonNavView):
|
||||
link_label.modify_bg(gtk.STATE_NORMAL, self.color)
|
||||
if Config.get(Config.RELEDITBTN):
|
||||
button = widgets.IconButton(self.edit_button_press, handle)
|
||||
self.tooltips.set_tip(button, _('Edit %s') % name[0])
|
||||
button.set_tooltip_text(_('Edit %s') % name[0])
|
||||
else:
|
||||
button = None
|
||||
vbox.pack_start(widgets.LinkBox(link_label, button))
|
||||
@@ -1063,7 +1073,7 @@ class RelationshipView(PageView.PersonNavView):
|
||||
link_label.set_padding(3, 0)
|
||||
if child_should_be_linked and Config.get(Config.RELEDITBTN):
|
||||
button = widgets.IconButton(self.edit_button_press, handle)
|
||||
self.tooltips.set_tip(button, _('Edit %s') % name[0])
|
||||
button.set_tooltip_text(_('Edit %s') % name[0])
|
||||
else:
|
||||
button = None
|
||||
|
||||
@@ -1094,7 +1104,7 @@ class RelationshipView(PageView.PersonNavView):
|
||||
return None
|
||||
|
||||
birth = ReportUtils.get_birth_or_fallback(self.dbstate.db, person)
|
||||
if birth and birth.get_type != gen.lib.EventType.BIRTH:
|
||||
if birth and birth.get_type() != gen.lib.EventType.BIRTH:
|
||||
sdate = DateHandler.get_date(birth)
|
||||
if sdate:
|
||||
bdate = "<i>%s</i>" % cgi.escape(sdate)
|
||||
@@ -1106,7 +1116,7 @@ class RelationshipView(PageView.PersonNavView):
|
||||
bdate = ""
|
||||
|
||||
death = ReportUtils.get_death_or_fallback(self.dbstate.db, person)
|
||||
if death and death.get_type != gen.lib.EventType.DEATH:
|
||||
if death and death.get_type() != gen.lib.EventType.DEATH:
|
||||
sdate = DateHandler.get_date(death)
|
||||
if sdate:
|
||||
ddate = "<i>%s</i>" % cgi.escape(sdate)
|
||||
@@ -1199,7 +1209,9 @@ class RelationshipView(PageView.PersonNavView):
|
||||
for event_ref in family.get_event_ref_list():
|
||||
handle = event_ref.ref
|
||||
event = self.dbstate.db.get_event_from_handle(handle)
|
||||
if event.get_type() == gen.lib.EventType.MARRIAGE:
|
||||
if event and event.get_type() == gen.lib.EventType.MARRIAGE and \
|
||||
(event_ref.get_role() == gen.lib.EventRoleType.FAMILY or
|
||||
event_ref.get_role() == gen.lib.EventRoleType.PRIMARY ):
|
||||
self.write_event_ref(vbox, _('Marriage'), event)
|
||||
value = True
|
||||
return value
|
||||
@@ -1331,13 +1343,11 @@ class RelationshipView(PageView.PersonNavView):
|
||||
addchild = widgets.IconButton(self.add_child_to_fam,
|
||||
family.handle,
|
||||
gtk.STOCK_ADD)
|
||||
self.tooltips.set_tip(addchild,
|
||||
_('Add new child to family'))
|
||||
addchild.set_tooltip_text(_('Add new child to family'))
|
||||
selchild = widgets.IconButton(self.sel_child_to_fam,
|
||||
family.handle,
|
||||
gtk.STOCK_INDEX)
|
||||
self.tooltips.set_tip(selchild,
|
||||
_('Add existing child to family'))
|
||||
selchild.set_tooltip_text(_('Add existing child to family'))
|
||||
hbox.pack_start(addchild, False)
|
||||
hbox.pack_start(selchild, False)
|
||||
self.attach.attach(
|
||||
@@ -1358,7 +1368,7 @@ class RelationshipView(PageView.PersonNavView):
|
||||
eventbox.modify_bg(gtk.STATE_NORMAL, self.color)
|
||||
eventbox.add(vbox)
|
||||
self.attach.attach(
|
||||
eventbox, _CDATA_START-1, _CDATA_STOP-1, self.row,
|
||||
eventbox, _CDATA_START-1, _CDATA_STOP, self.row,
|
||||
self.row+1)
|
||||
self.row += 1
|
||||
|
||||
@@ -1561,6 +1571,10 @@ class RelationshipView(PageView.PersonNavView):
|
||||
def change_to(self, obj, handle):
|
||||
self.dbstate.change_active_handle(handle)
|
||||
|
||||
def reorder_button_press(self, obj, event, handle):
|
||||
if button_activated(event, _LEFT_BUTTON):
|
||||
self.reorder(obj)
|
||||
|
||||
def reorder(self, obj, dumm1=None, dummy2=None):
|
||||
if self.dbstate.active:
|
||||
try:
|
||||
@@ -1590,7 +1604,7 @@ def button_activated(event, mouse_button):
|
||||
if (event.type == gtk.gdk.BUTTON_PRESS and \
|
||||
event.button == mouse_button) or \
|
||||
(event.type == gtk.gdk.KEY_PRESS and \
|
||||
event.keyval in (_RETURN, _KP_ENTER)):
|
||||
event.keyval in (_RETURN, _KP_ENTER, _SPACE)):
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
+2
-2
@@ -98,14 +98,14 @@ CAL_TO_MONTHS_NAMES = {
|
||||
Date.CAL_ISLAMIC : DateHandler.displayer.islamic,
|
||||
Date.CAL_SWEDISH : DateHandler.displayer.swedish }
|
||||
|
||||
WIKI_HELP_PAGE = 'Gramps_3.0_Wiki_Manual_-_Entering_and_Editing_Data:_Detailed'
|
||||
WIKI_HELP_PAGE = '%s_-_Entering_and_Editing_Data:_Detailed_-_part_1' % const.URL_MANUAL_PAGE
|
||||
WIKI_HELP_SEC = _('manual|Editing_Dates')
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# DateEdit
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class DateEdit:
|
||||
class DateEdit(object):
|
||||
"""Class that associates a pixmap with a text widget, providing visual
|
||||
feedback that indicates if the text widget contains a valid date"""
|
||||
|
||||
|
||||
@@ -9,19 +9,20 @@ pkgdata_PYTHON = \
|
||||
_Date_ca.py\
|
||||
_Date_cs.py\
|
||||
_Date_de.py\
|
||||
_Date_ru.py\
|
||||
_Date_lt.py\
|
||||
_Date_fr.py\
|
||||
_Date_es.py\
|
||||
_Date_fi.py\
|
||||
_Date_sv.py\
|
||||
_Date_nb.py\
|
||||
_Date_nl.py\
|
||||
_Date_sk.py\
|
||||
_Date_pl.py\
|
||||
_Date_pt.py\
|
||||
_Date_fr.py\
|
||||
_Date_hr.py\
|
||||
_Date_it.py\
|
||||
_Date_lt.py\
|
||||
_Date_nb.py\
|
||||
_Date_nl.py\
|
||||
_Date_pl.py\
|
||||
_Date_pt.py\
|
||||
_Date_ru.py\
|
||||
_Date_sk.py\
|
||||
_Date_sr.py\
|
||||
_Date_sv.py\
|
||||
_DateDisplay.py\
|
||||
_DateParser.py\
|
||||
_DateHandler.py\
|
||||
|
||||
@@ -46,7 +46,7 @@ import GrampsLocale
|
||||
# DateDisplay
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class DateDisplay:
|
||||
class DateDisplay(object):
|
||||
|
||||
_months = GrampsLocale.long_months
|
||||
MONS = GrampsLocale.short_months
|
||||
|
||||
@@ -122,7 +122,7 @@ def french_valid(date_tuple):
|
||||
# Parser class
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class DateParser:
|
||||
class DateParser(object):
|
||||
"""
|
||||
Convert a text string into a Date object. If the date cannot be
|
||||
converted, the text string is assigned.
|
||||
@@ -474,12 +474,6 @@ class DateParser:
|
||||
value = subparser(text)
|
||||
if value != Date.EMPTY:
|
||||
return value
|
||||
# if 8 digits are entered and month and day in range
|
||||
# assume yyyymmdd and convert to yyyy-mm-dd
|
||||
if len(text) == 8 and text.isdigit() \
|
||||
and (int(text[4:6]) in range(1,13)) \
|
||||
and (int(text[6:8]) in range(1,32)):
|
||||
text = text[0:4] + "-" + text[4:6] + "-" + text[6:8]
|
||||
match = self._iso.match(text)
|
||||
if match:
|
||||
groups = match.groups()
|
||||
|
||||
@@ -69,7 +69,7 @@ class DateParserCZ(DateParser):
|
||||
u'r' : Date.CAL_FRENCH,
|
||||
u'perský' : Date.CAL_PERSIAN,
|
||||
u'p' : Date.CAL_PERSIAN,
|
||||
u'swedish' : Date.CAL_SWEDISH,
|
||||
u'švédský' : Date.CAL_SWEDISH,
|
||||
u's' : Date.CAL_SWEDISH,
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ class DateDisplayCZ(DateDisplay):
|
||||
calendar = (
|
||||
"", u" (juliánský)", u" (hebrejský)",
|
||||
u" (republikánský)", u" (perský)", u" (islámský)",
|
||||
u" (swedish)"
|
||||
u" (švédský)"
|
||||
)
|
||||
|
||||
_mod_str = ("", u"před ", u"po ", u"kolem ", "", "", "")
|
||||
@@ -138,7 +138,7 @@ class DateDisplayCZ(DateDisplay):
|
||||
elif mod == Date.MOD_RANGE:
|
||||
d1 = self.display_cal[cal](start)
|
||||
d2 = self.display_cal[cal](date.get_stop_date())
|
||||
return "%s%s %s %s %s%s" % (qual_str, u'medzi',
|
||||
return "%s%s %s %s %s%s" % (qual_str, u'mezi',
|
||||
d1, u'a', d2, self.calendar[cal])
|
||||
else:
|
||||
text = self.display_cal[date.get_calendar()](start)
|
||||
|
||||
@@ -58,8 +58,8 @@ class DateParserFR(DateParser):
|
||||
|
||||
# Add common value
|
||||
|
||||
month_to_int[u"bluviose"] = 1
|
||||
month_to_int[u"vendose"] = 2
|
||||
month_to_int[u"bluviose"] = 5
|
||||
month_to_int[u"vendose"] = 6
|
||||
month_to_int[u"7bre"] = 9
|
||||
month_to_int[u"8bre"] = 10
|
||||
month_to_int[u"9bre"] = 11
|
||||
|
||||
@@ -180,7 +180,7 @@ class DateParserHR(DateParser):
|
||||
"""
|
||||
DateParser.init_strings(self)
|
||||
# match 'Day. MONTH year.' format with or without dots
|
||||
self._text2 = re.compile('(\d+)?\.?\s+?%s\.?\s*((\d+)(/\d+)?)?\s*\.?$'
|
||||
self._text2 = re.compile('(\d+)?\.?\s*?%s\.?\s*((\d+)(/\d+)?)?\s*\.?$'
|
||||
% self._mon_str, re.IGNORECASE)
|
||||
# match Day.Month.Year.
|
||||
self._numeric = re.compile(
|
||||
|
||||
@@ -0,0 +1,393 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2004-2007 Donald N. Allingham
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# Serbian version by Vlada Perić <vlada.peric@gmail.com>, 2009.
|
||||
# Based on the Croatian DateHandler by Josip
|
||||
|
||||
"""
|
||||
Serbian-specific classes for parsing and displaying dates.
|
||||
"""
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Python modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import re
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# GRAMPS modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gen.lib import Date
|
||||
from _DateParser import DateParser
|
||||
from _DateDisplay import DateDisplay
|
||||
from _DateHandler import register_datehandler
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Serbian parser
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class DateParserSR(DateParser):
|
||||
"""
|
||||
Converts a text string into a Date object
|
||||
"""
|
||||
month_to_int = DateParser.month_to_int
|
||||
|
||||
month_to_int[u"januar"] = 1
|
||||
month_to_int[u"januara"] = 1
|
||||
month_to_int[u"jan"] = 1
|
||||
month_to_int[u"јан"] = 1
|
||||
month_to_int[u"јануара"] = 1
|
||||
month_to_int[u"јануар"] = 1
|
||||
month_to_int[u"i"] = 1
|
||||
|
||||
month_to_int[u"februar"] = 2
|
||||
month_to_int[u"februara"] = 2
|
||||
month_to_int[u"feb"] = 2
|
||||
month_to_int[u"феб"] = 2
|
||||
month_to_int[u"фебруар"] = 2
|
||||
month_to_int[u"фебруара"] = 2
|
||||
month_to_int[u"ii"] = 2
|
||||
|
||||
month_to_int[u"mart"] = 3
|
||||
month_to_int[u"marta"] = 3
|
||||
month_to_int[u"mar"] = 3
|
||||
month_to_int[u"мар"] = 3
|
||||
month_to_int[u"март"] = 3
|
||||
month_to_int[u"марта"] = 3
|
||||
month_to_int[u"iii"] = 3
|
||||
|
||||
month_to_int[u"april"] = 4
|
||||
month_to_int[u"aprila"] = 4
|
||||
month_to_int[u"apr"] = 4
|
||||
month_to_int[u"апр"] = 4
|
||||
month_to_int[u"април"] = 4
|
||||
month_to_int[u"априла"] = 4
|
||||
month_to_int[u"iv"] = 4
|
||||
|
||||
month_to_int[u"maj"] = 5
|
||||
month_to_int[u"maja"] = 5
|
||||
month_to_int[u"мај"] = 5
|
||||
month_to_int[u"маја"] = 5
|
||||
month_to_int[u"v"] = 5
|
||||
|
||||
month_to_int[u"jun"] = 6
|
||||
month_to_int[u"juna"] = 6
|
||||
month_to_int[u"јун"] = 6
|
||||
month_to_int[u"јуна"] = 6
|
||||
month_to_int[u"vi"] = 6
|
||||
|
||||
month_to_int[u"jul"] = 7
|
||||
month_to_int[u"jula"] = 7
|
||||
month_to_int[u"јул"] = 7
|
||||
month_to_int[u"јула"] = 7
|
||||
month_to_int[u"vii"] = 7
|
||||
|
||||
month_to_int[u"avgust"] = 8
|
||||
month_to_int[u"avgusta"] = 8
|
||||
month_to_int[u"avg"] = 8
|
||||
month_to_int[u"авг"] = 8
|
||||
month_to_int[u"август"] = 8
|
||||
month_to_int[u"августа"] = 8
|
||||
month_to_int[u"viii"] = 8
|
||||
|
||||
month_to_int[u"septembar"] = 9
|
||||
month_to_int[u"septembra"] = 9
|
||||
month_to_int[u"sep"] = 9
|
||||
month_to_int[u"сеп"] = 9
|
||||
month_to_int[u"септембар"] = 9
|
||||
month_to_int[u"септембра"] = 9
|
||||
month_to_int[u"ix"] = 9
|
||||
|
||||
month_to_int[u"oktobar"] = 10
|
||||
month_to_int[u"oktobra"] = 10
|
||||
month_to_int[u"okt"] = 10
|
||||
month_to_int[u"окт"] = 10
|
||||
month_to_int[u"октобар"] = 10
|
||||
month_to_int[u"октобра"] = 10
|
||||
month_to_int[u"x"] = 10
|
||||
|
||||
month_to_int[u"novembar"] = 11
|
||||
month_to_int[u"novembra"] = 11
|
||||
month_to_int[u"nov"] = 11
|
||||
month_to_int[u"нов"] = 11
|
||||
month_to_int[u"новембар"] = 11
|
||||
month_to_int[u"новембра"] = 11
|
||||
month_to_int[u"xi"] = 11
|
||||
|
||||
month_to_int[u"decembar"] = 12
|
||||
month_to_int[u"decembra"] = 12
|
||||
month_to_int[u"dec"] = 12
|
||||
month_to_int[u"дец"] = 12
|
||||
month_to_int[u"децембар"] = 12
|
||||
month_to_int[u"децембра"] = 12
|
||||
month_to_int[u"xii"] = 12
|
||||
|
||||
modifier_to_int = {
|
||||
u'pre' : Date.MOD_BEFORE,
|
||||
u'posle' : Date.MOD_AFTER,
|
||||
u'oko' : Date.MOD_ABOUT,
|
||||
u'cca' : Date.MOD_ABOUT,
|
||||
|
||||
u'пре' : Date.MOD_BEFORE,
|
||||
u'после' : Date.MOD_AFTER,
|
||||
u'око' : Date.MOD_ABOUT,
|
||||
}
|
||||
|
||||
calendar_to_int = {
|
||||
u'gregorijanski' : Date.CAL_GREGORIAN,
|
||||
u'greg.' : Date.CAL_GREGORIAN,
|
||||
u'julijanski' : Date.CAL_JULIAN,
|
||||
u'jul.' : Date.CAL_JULIAN,
|
||||
u'hebrejski' : Date.CAL_HEBREW,
|
||||
u'hebr.' : Date.CAL_HEBREW,
|
||||
u'islamski' : Date.CAL_ISLAMIC,
|
||||
u'isl.' : Date.CAL_ISLAMIC,
|
||||
u'francuski republikanski': Date.CAL_FRENCH,
|
||||
u'franc.' : Date.CAL_FRENCH,
|
||||
u'persijski' : Date.CAL_PERSIAN,
|
||||
u'pers. ' : Date.CAL_PERSIAN,
|
||||
u'švedski' : Date.CAL_SWEDISH,
|
||||
u'šv.' : Date.CAL_SWEDISH,
|
||||
|
||||
u'грегоријански' : Date.CAL_GREGORIAN,
|
||||
u'грег.' : Date.CAL_GREGORIAN,
|
||||
u'јулијански' : Date.CAL_JULIAN,
|
||||
u'јул.' : Date.CAL_JULIAN,
|
||||
u'хебрејски' : Date.CAL_HEBREW,
|
||||
u'хебр.' : Date.CAL_HEBREW,
|
||||
u'исламски' : Date.CAL_ISLAMIC,
|
||||
u'исл.' : Date.CAL_ISLAMIC,
|
||||
u'француски републикански': Date.CAL_FRENCH,
|
||||
u'франц.' : Date.CAL_FRENCH,
|
||||
u'персијски' : Date.CAL_PERSIAN,
|
||||
u'перс. ' : Date.CAL_PERSIAN,
|
||||
u'шведски' : Date.CAL_SWEDISH,
|
||||
u'шв' : Date.CAL_SWEDISH,
|
||||
}
|
||||
|
||||
quality_to_int = {
|
||||
u'procenjeno' : Date.QUAL_ESTIMATED,
|
||||
u'pro.' : Date.QUAL_ESTIMATED,
|
||||
u'izračunato' : Date.QUAL_CALCULATED,
|
||||
u'izr.' : Date.QUAL_CALCULATED,
|
||||
|
||||
u'процењено' : Date.QUAL_ESTIMATED,
|
||||
u'про.' : Date.QUAL_ESTIMATED,
|
||||
u'израчунато' : Date.QUAL_CALCULATED,
|
||||
u'изр.' : Date.QUAL_CALCULATED,
|
||||
}
|
||||
|
||||
bce = [u"пре нове ере", u"пре Христа", u"п.н.е."
|
||||
u"pre nove ere", u"pre Hrista", u"p.n.e."] + DateParser.bce
|
||||
|
||||
def init_strings(self):
|
||||
"""
|
||||
compiles regular expression strings for matching dates
|
||||
"""
|
||||
DateParser.init_strings(self)
|
||||
# match 'Day. MONTH year.' format with or without dots
|
||||
self._text2 = re.compile('(\d+)?\.?\s*?%s\s*((\d+)(/\d+)?)?\.?\s*$'
|
||||
% self._mon_str, re.IGNORECASE)
|
||||
|
||||
# match Day.Month.Year.
|
||||
self._numeric = re.compile("((\d+)[/\. ])?\s*((\d+)[/\.])?\s*(\d+)\.?$")
|
||||
|
||||
_span1 = [u'od', u'од']
|
||||
_span2 = [u'do', u'до']
|
||||
_range1 = [u'između', u'између']
|
||||
_range2 = [u'i', u'и']
|
||||
self._span = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_span1),'|'.join(_span2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_range1),'|'.join(_range2)),
|
||||
re.IGNORECASE)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Serbian display
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class DateDisplaySR_latin(DateDisplay):
|
||||
"""
|
||||
Serbian (latin) date display class
|
||||
"""
|
||||
calendar = (
|
||||
"", u" (julijanski)", u" (hebrejski)",
|
||||
u" (francuski republikanski)", u" (persijski)", u" (islamski)",
|
||||
u" (švedski)"
|
||||
)
|
||||
|
||||
_mod_str = ("", "pre ", "posle ", "oko ", "", "", "")
|
||||
|
||||
_qual_str = ("", "procenjeno ", "izračunato ")
|
||||
|
||||
_bce_str = "%s p.n.e."
|
||||
|
||||
formats = (
|
||||
"GGGG-MM-DD (ISO-8601)",
|
||||
"Numerički (D.M.GGGG.)",
|
||||
"D. MMM GGGG.",
|
||||
"D. Mesec GGGG.",
|
||||
"D. Rb GGGG."
|
||||
)
|
||||
|
||||
roman_months = (
|
||||
"",
|
||||
"I",
|
||||
"II",
|
||||
"III",
|
||||
"IV",
|
||||
"V",
|
||||
"VI",
|
||||
"VII",
|
||||
"VIII",
|
||||
"IX",
|
||||
"X",
|
||||
"XI",
|
||||
"XII"
|
||||
)
|
||||
|
||||
sr_months = ("",
|
||||
u"januara",
|
||||
u"februara",
|
||||
u"marta",
|
||||
u"aprila",
|
||||
u"maja",
|
||||
u"juna",
|
||||
u"jula",
|
||||
u"avgusta",
|
||||
u"septembra",
|
||||
u"oktobra",
|
||||
u"novembra",
|
||||
u"decembra"
|
||||
)
|
||||
|
||||
sr_months3 = ("",
|
||||
u"jan",
|
||||
u"feb",
|
||||
u"mar",
|
||||
u"apr",
|
||||
u"maj",
|
||||
u"jun",
|
||||
u"jul",
|
||||
u"avg",
|
||||
u"sep",
|
||||
u"okt",
|
||||
u"nov",
|
||||
u"dec"
|
||||
)
|
||||
|
||||
def _display_gregorian(self, date_val):
|
||||
"""
|
||||
display gregorian calendar date in different format
|
||||
"""
|
||||
year = self._slash_year(date_val[2], date_val[3])
|
||||
if self.format == 0:
|
||||
return self.display_iso(date_val)
|
||||
elif self.format == 1:
|
||||
if date_val[3]:
|
||||
return self.display_iso(date_val)
|
||||
else:
|
||||
if date_val[0] == 0 and date_val[1] == 0:
|
||||
value = str(date_val[2])
|
||||
else:
|
||||
value = self._tformat.replace('%m', str(date_val[1]))
|
||||
value = value.replace('%d', str(date_val[0]))
|
||||
value = value.replace('%Y', str(abs(date_val[2])))
|
||||
value = value.replace('-', '/')
|
||||
elif self.format == 2:
|
||||
# Day. MON Year.
|
||||
if date_val[0] == 0:
|
||||
if date_val[1] == 0:
|
||||
value = u"%s." % year
|
||||
else:
|
||||
value = u"%s %s." % (self.sr_months3[date_val[1]], year)
|
||||
else:
|
||||
value = u"%d. %s %s." % (date_val[0],
|
||||
self.sr_months3[date_val[1]], year)
|
||||
elif self.format == 3:
|
||||
# Day. MONTH Year.
|
||||
if date_val[0] == 0:
|
||||
if date_val[1] == 0:
|
||||
value = u"%s." % year
|
||||
else:
|
||||
value = u"%s %s." % (self.sr_months[date_val[1]], year)
|
||||
else:
|
||||
value = u"%d. %s %s." % (date_val[0],
|
||||
self.sr_months[date_val[1]], year)
|
||||
else:
|
||||
# Day RomanMon Year
|
||||
if date_val[0] == 0:
|
||||
if date_val[1] == 0:
|
||||
value = u"%s." % year
|
||||
else:
|
||||
value = "%s %s." % (self.roman_months[date_val[1]], year)
|
||||
else:
|
||||
value = "%d. %s %s." % (date_val[0],
|
||||
self.roman_months[date_val[1]], year)
|
||||
if date_val[2] < 0:
|
||||
return self._bce_str % value
|
||||
else:
|
||||
return value
|
||||
|
||||
def display(self, date):
|
||||
"""
|
||||
Return a text string representing the date.
|
||||
"""
|
||||
mod = date.get_modifier()
|
||||
cal = date.get_calendar()
|
||||
qual = date.get_quality()
|
||||
start = date.get_start_date()
|
||||
|
||||
qual_str = self._qual_str[qual]
|
||||
|
||||
if mod == Date.MOD_TEXTONLY:
|
||||
return date.get_text()
|
||||
elif start == Date.EMPTY:
|
||||
return ""
|
||||
elif mod == Date.MOD_SPAN:
|
||||
d_1 = self.display_cal[cal](start)
|
||||
d_2 = self.display_cal[cal](date.get_stop_date())
|
||||
return "%s%s %s %s %s%s" % (qual_str, u'od', d_1, u'do', d_2,
|
||||
self.calendar[cal])
|
||||
elif mod == Date.MOD_RANGE:
|
||||
d_1 = self.display_cal[cal](start)
|
||||
d_2 = self.display_cal[cal](date.get_stop_date())
|
||||
return "%s%s %s %s %s%s" % (qual_str, u'između', d_1, u'i', d_2,
|
||||
self.calendar[cal])
|
||||
else:
|
||||
text = self.display_cal[date.get_calendar()](start)
|
||||
return "%s%s%s%s" % (qual_str, self._mod_str[mod], text,
|
||||
self.calendar[cal])
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Register classes
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
register_datehandler(('sr', 'serbian', 'srpski', 'sr_RS'),
|
||||
DateParserSR, DateDisplaySR_latin)
|
||||
@@ -29,11 +29,14 @@ from _DateHandler import (LANG, LANG_SHORT, LANG_TO_PARSER, LANG_TO_DISPLAY,
|
||||
register_datehandler)
|
||||
|
||||
# Import all the localized handlers
|
||||
import _Date_ca
|
||||
import _Date_cs
|
||||
import _Date_de
|
||||
import _Date_es
|
||||
import _Date_fi
|
||||
import _Date_fr
|
||||
import _Date_hr
|
||||
import _Date_it
|
||||
import _Date_lt
|
||||
import _Date_nb
|
||||
import _Date_nl
|
||||
@@ -41,10 +44,8 @@ import _Date_pl
|
||||
import _Date_pt
|
||||
import _Date_ru
|
||||
import _Date_sk
|
||||
import _Date_sr
|
||||
import _Date_sv
|
||||
import _Date_hr
|
||||
import _Date_ca
|
||||
import _Date_it
|
||||
|
||||
# Initialize global parser
|
||||
try:
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ import Errors
|
||||
# DbLoader class
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class DbLoader:
|
||||
class DbLoader(object):
|
||||
def __init__(self, dbstate, uistate):
|
||||
self.dbstate = dbstate
|
||||
self.uistate = uistate
|
||||
|
||||
+11
-4
@@ -3,6 +3,7 @@
|
||||
#
|
||||
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||
# Copyright (C) 2009 Brian G. Matherly
|
||||
# Copyright (C) 2009 Gary Burton
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -101,7 +102,7 @@ STOCK_COL = 6
|
||||
|
||||
RCS_BUTTON = { True : _('_Extract'), False : _('_Archive') }
|
||||
|
||||
class CLIDbManager:
|
||||
class CLIDbManager(object):
|
||||
"""
|
||||
Database manager without GTK functionality, allows users to create and
|
||||
open databases
|
||||
@@ -568,10 +569,14 @@ class DbManager(CLIDbManager):
|
||||
continue
|
||||
if node:
|
||||
self.top.destroy()
|
||||
del self.selection
|
||||
del self.name_renderer
|
||||
return (store.get_value(node, PATH_COL),
|
||||
store.get_value(node, NAME_COL))
|
||||
else:
|
||||
self.top.destroy()
|
||||
del self.selection
|
||||
del self.name_renderer
|
||||
return None
|
||||
|
||||
def __ask_to_break_lock(self, store, node):
|
||||
@@ -1063,15 +1068,17 @@ def find_revisions(name):
|
||||
|
||||
def find_locker_name(dirpath):
|
||||
"""
|
||||
Opens the lock file if it exists, reads the contexts and returns
|
||||
the contents, which should be like "Locked by USERNAME".
|
||||
Opens the lock file if it exists, reads the contexts which is "USERNAME"
|
||||
and returns the contents, with correct string before "USERNAME",
|
||||
so the message can be printed with correct locale.
|
||||
If a file is encountered with errors, we return 'Unknown'
|
||||
This data is displayed in the time column of the manager
|
||||
"""
|
||||
try:
|
||||
fname = os.path.join(dirpath, "lock")
|
||||
ifile = open(fname)
|
||||
last = ifile.read().strip()
|
||||
username = ifile.read().strip()
|
||||
last = _("Locked by %s") % username
|
||||
ifile.close()
|
||||
except (OSError, IOError):
|
||||
last = _("Unknown")
|
||||
|
||||
@@ -46,7 +46,7 @@ import Config
|
||||
# NodeMap
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class NodeMap:
|
||||
class NodeMap(object):
|
||||
"""
|
||||
Provide the Path to Iter mappings for a TreeView model. The implementation
|
||||
provides a list of nodes and a dictionary of handles. The datalist provides
|
||||
|
||||
@@ -107,7 +107,7 @@ class EventModel(BaseModel):
|
||||
return u''
|
||||
|
||||
def column_type(self,data):
|
||||
return str(gen.lib.EventType(data[COLUMN_TYPE]))
|
||||
return unicode(gen.lib.EventType(data[COLUMN_TYPE]))
|
||||
|
||||
def column_id(self,data):
|
||||
return unicode(data[COLUMN_ID])
|
||||
|
||||
@@ -46,6 +46,7 @@ import GrampsLocale
|
||||
import DateHandler
|
||||
from BasicUtils import name_displayer
|
||||
import gen.lib
|
||||
from gen.lib import EventRoleType
|
||||
import gen.utils
|
||||
|
||||
from _BaseModel import BaseModel
|
||||
@@ -126,10 +127,12 @@ class FamilyModel(BaseModel):
|
||||
return u""
|
||||
|
||||
def column_type(self, data):
|
||||
return str(gen.lib.FamilyRelType(data[5]))
|
||||
return unicode(gen.lib.FamilyRelType(data[5]))
|
||||
|
||||
def column_marriage(self, data):
|
||||
erlist = [ gen.lib.EventRef().unserialize(d) for d in data[6] ]
|
||||
erlist = [x for x in erlist if x.get_role()==EventRoleType.FAMILY or
|
||||
x.get_role()==EventRoleType.PRIMARY]
|
||||
event = gen.utils.marriage_from_eventref_list(self.db, erlist)
|
||||
if event:
|
||||
return DateHandler.displayer.display(event.date)
|
||||
|
||||
@@ -40,7 +40,7 @@ import locale
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import logging
|
||||
log = logging.getLogger(".")
|
||||
_LOG = logging.getLogger(".gui.peoplemodel")
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@@ -68,7 +68,7 @@ from Lru import LRU
|
||||
_CACHE_SIZE = 250
|
||||
invalid_date_format = Config.get(Config.INVALID_DATE_FORMAT)
|
||||
|
||||
class NodeTreeMap:
|
||||
class NodeTreeMap(object):
|
||||
|
||||
def __init__(self):
|
||||
|
||||
@@ -243,6 +243,7 @@ class PeopleModel(gtk.GenericTreeModel):
|
||||
"""
|
||||
Initialize the model building the initial data
|
||||
"""
|
||||
cput = time.clock()
|
||||
gtk.GenericTreeModel.__init__(self)
|
||||
|
||||
self.db = db
|
||||
@@ -291,6 +292,8 @@ class PeopleModel(gtk.GenericTreeModel):
|
||||
data_filter = None
|
||||
self.current_filter = data_filter
|
||||
self.rebuild_data(data_filter, skip)
|
||||
_LOG.debug(self.__class__.__name__ + ' __init__ ' +
|
||||
str(time.clock() - cput) + ' sec')
|
||||
|
||||
def update_todo(self,client,cnxn_id,entry,data):
|
||||
self.todo_color = Config.get(Config.TODO_COLOR)
|
||||
@@ -305,9 +308,12 @@ class PeopleModel(gtk.GenericTreeModel):
|
||||
"""
|
||||
Convience function that calculates the new data and assigns it.
|
||||
"""
|
||||
cput = time.clock()
|
||||
self.calculate_data(data_filter, skip)
|
||||
self.assign_data()
|
||||
self.current_filter = data_filter
|
||||
_LOG.debug(self.__class__.__name__ + ' rebuild_data ' +
|
||||
str(time.clock() - cput) + ' sec')
|
||||
|
||||
def _build_search_sub(self,dfilter, skip):
|
||||
|
||||
@@ -521,7 +527,7 @@ class PeopleModel(gtk.GenericTreeModel):
|
||||
GrampsLocale.codeset)
|
||||
|
||||
def column_gender(self, data, node):
|
||||
return PeopleModel._GENDER[data[PeopleModel._GENDER_COL]]
|
||||
return unicode(PeopleModel._GENDER[data[PeopleModel._GENDER_COL]])
|
||||
|
||||
def column_birth_day(self, data, node):
|
||||
try:
|
||||
|
||||
@@ -104,7 +104,7 @@ class RepositoryModel(BaseModel):
|
||||
return unicode(data[1])
|
||||
|
||||
def column_type(self,data):
|
||||
return str(gen.lib.RepositoryType(data[2]))
|
||||
return unicode(gen.lib.RepositoryType(data[2]))
|
||||
|
||||
def column_name(self,data):
|
||||
return unicode(data[3])
|
||||
|
||||
+1
-1
@@ -192,7 +192,7 @@ _RCT_BTM = '</menu></menu></menubar></ui>'
|
||||
import RecentFiles
|
||||
import os
|
||||
|
||||
class RecentDocsMenu:
|
||||
class RecentDocsMenu(object):
|
||||
def __init__(self, uistate, state, fileopen):
|
||||
self.action_group = gtk.ActionGroup('RecentFiles')
|
||||
self.active = DISABLED
|
||||
|
||||
@@ -87,8 +87,7 @@ class BackRefList(EmbeddedList):
|
||||
Method has signature of, and overrides create_buttons from _ButtonTab.py
|
||||
"""
|
||||
self.edit_btn = SimpleButton(gtk.STOCK_EDIT, self.edit_button_clicked)
|
||||
self.tooltips = gtk.Tooltips()
|
||||
self.tooltips.set_tip(self.edit_btn, _('Edit reference'))
|
||||
self.edit_btn.set_tooltip_text(_('Edit reference'))
|
||||
|
||||
hbox = gtk.HBox()
|
||||
hbox.set_spacing(6)
|
||||
|
||||
@@ -98,7 +98,6 @@ class ButtonTab(GrampsTab):
|
||||
"""
|
||||
self.dirty_selection = False
|
||||
GrampsTab.__init__(self,dbstate, uistate, track, name)
|
||||
self.tooltips = gtk.Tooltips()
|
||||
self.create_buttons(share_button, move_buttons, jump_button)
|
||||
|
||||
def create_buttons(self, share_button, move_buttons, jump_button):
|
||||
@@ -113,22 +112,22 @@ class ButtonTab(GrampsTab):
|
||||
self.edit_btn = SimpleButton(gtk.STOCK_EDIT, self.edit_button_clicked)
|
||||
self.del_btn = SimpleButton(gtk.STOCK_REMOVE, self.del_button_clicked)
|
||||
|
||||
self.tooltips.set_tip(self.add_btn, self._MSG['add'])
|
||||
self.tooltips.set_tip(self.edit_btn, self._MSG['edit'])
|
||||
self.tooltips.set_tip(self.del_btn, self._MSG['del'])
|
||||
self.add_btn.set_tooltip_text(self._MSG['add'])
|
||||
self.edit_btn.set_tooltip_text(self._MSG['edit'])
|
||||
self.del_btn.set_tooltip_text(self._MSG['del'])
|
||||
|
||||
if share_button:
|
||||
self.share_btn = SimpleButton(gtk.STOCK_INDEX, self.share_button_clicked)
|
||||
self.tooltips.set_tip(self.share_btn, self._MSG['share'])
|
||||
self.share_btn.set_tooltip_text(self._MSG['share'])
|
||||
else:
|
||||
self.share_btn = None
|
||||
|
||||
if move_buttons:
|
||||
self.up_btn = SimpleButton(gtk.STOCK_GO_UP, self.up_button_clicked)
|
||||
self.tooltips.set_tip(self.up_btn, self._MSG['up'])
|
||||
self.up_btn.set_tooltip_text(self._MSG['up'])
|
||||
self.down_btn = SimpleButton(gtk.STOCK_GO_DOWN,
|
||||
self.down_button_clicked)
|
||||
self.tooltips.set_tip(self.down_btn, self._MSG['down'])
|
||||
self.down_btn.set_tooltip_text(self._MSG['down'])
|
||||
else:
|
||||
self.up_btn = None
|
||||
self.down_btn = None
|
||||
@@ -146,7 +145,7 @@ class ButtonTab(GrampsTab):
|
||||
|
||||
if jump_button:
|
||||
self.jump_btn = SimpleButton(gtk.STOCK_JUMP_TO, self.jump_button_clicked)
|
||||
self.tooltips.set_tip(self.jump_btn, self._MSG['jump'])
|
||||
self.jump_btn.set_tooltip_text(self._MSG['jump'])
|
||||
else:
|
||||
self.jump_btn = None
|
||||
|
||||
|
||||
@@ -240,11 +240,15 @@ class EmbeddedList(ButtonTab):
|
||||
pass
|
||||
|
||||
def _find_row(self, x, y):
|
||||
row = self.tree.get_path_at_pos(x, y)
|
||||
row = self.tree.get_dest_row_at_pos(x, y)
|
||||
if row is None:
|
||||
return len(self.get_data())
|
||||
else:
|
||||
return row[0][0]
|
||||
if row[1] in (gtk.TREE_VIEW_DROP_BEFORE,
|
||||
gtk.TREE_VIEW_DROP_INTO_OR_BEFORE):
|
||||
return row[0][0]
|
||||
else:
|
||||
return row[0][0]+1
|
||||
|
||||
def _handle_drag(self, row, obj):
|
||||
self.get_data().insert(row, obj)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2000-2006 Donald N. Allingham
|
||||
# Copyright (C) 2009 Gary Burton
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -344,11 +345,11 @@ class GalleryTab(ButtonTab):
|
||||
dnd_types = [ self._DND_TYPE.target(), self._DND_EXTRA.target(),
|
||||
DdTargets.MEDIAOBJ.target()]
|
||||
|
||||
self.iconlist.drag_dest_set(gtk.DEST_DEFAULT_ALL, dnd_types,
|
||||
gtk.gdk.ACTION_COPY)
|
||||
self.iconlist.drag_source_set(gtk.gdk.BUTTON1_MASK,
|
||||
[self._DND_TYPE.target()],
|
||||
gtk.gdk.ACTION_COPY)
|
||||
self.iconlist.enable_model_drag_dest(dnd_types,
|
||||
gtk.gdk.ACTION_COPY)
|
||||
self.iconlist.enable_model_drag_source(gtk.gdk.BUTTON1_MASK,
|
||||
[self._DND_TYPE.target()],
|
||||
gtk.gdk.ACTION_COPY)
|
||||
self.iconlist.connect('drag_data_get', self.drag_data_get)
|
||||
if not self.dbstate.db.readonly:
|
||||
self.iconlist.connect('drag_data_received', self.drag_data_received)
|
||||
|
||||
@@ -39,7 +39,7 @@ class NoteModel(gtk.ListStore):
|
||||
self.db = db
|
||||
for handle in note_list:
|
||||
note = self.db.get_note_from_handle(handle)
|
||||
text = note.get().replace('\n', ' ')
|
||||
text = unicode(note.get().replace('\n', ' '))
|
||||
if len(text) > 80:
|
||||
text = text[:80]+"..."
|
||||
self.append(row=[
|
||||
|
||||
@@ -160,11 +160,11 @@ class AddMediaObject(ManagedWindow.ManagedWindow):
|
||||
filename = Utils.get_unicode_path(self.file_text.get_filename())
|
||||
full_file = filename
|
||||
|
||||
pname = Utils.media_path(self.dbase)
|
||||
pname = unicode(Utils.media_path(self.dbase))
|
||||
if self.relpath.get_active():
|
||||
filename = Utils.relative_path(filename, pname)
|
||||
|
||||
if os.path.exists(pname) == 0:
|
||||
if not os.path.exists(pname):
|
||||
msgstr = _("Cannot import %s")
|
||||
msgstr2 = _("The filename supplied could not be found.")
|
||||
ErrorDialog(msgstr % filename, msgstr2)
|
||||
|
||||
@@ -37,6 +37,7 @@ _LOG = logging.getLogger(".objectentries")
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import gtk
|
||||
from pango import ELLIPSIZE_END
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@@ -52,7 +53,7 @@ from DdTargets import DdTargets
|
||||
from Errors import WindowActiveError
|
||||
from Selectors import selector_factory
|
||||
|
||||
class ObjEntry:
|
||||
class ObjEntry(object):
|
||||
"""
|
||||
Handles the selection of a existing or new Object. Supports Drag and Drop
|
||||
to select the object.
|
||||
@@ -86,7 +87,6 @@ class ObjEntry:
|
||||
self.set_val = set_val
|
||||
self.uistate = uistate
|
||||
self.track = track
|
||||
self.tooltips = gtk.Tooltips()
|
||||
|
||||
#connect drag and drop
|
||||
self._init_dnd()
|
||||
@@ -129,6 +129,7 @@ class ObjEntry:
|
||||
self.label.set_use_markup(True)
|
||||
else:
|
||||
self.label.set_text(name)
|
||||
self.label.set_ellipsize(ELLIPSIZE_END)
|
||||
|
||||
def _init_dnd(self):
|
||||
"""inheriting objects must set this
|
||||
@@ -217,25 +218,25 @@ class ObjEntry:
|
||||
image.set_from_stock(gtk.STOCK_REMOVE, gtk.ICON_SIZE_BUTTON)
|
||||
image.show()
|
||||
self.share.add(image)
|
||||
self.tooltips.set_tip(self.share, self.DEL_STR)
|
||||
self.share.set_tooltip_text(self.DEL_STR)
|
||||
if self.add_edt is not None:
|
||||
image = gtk.Image()
|
||||
image.set_from_stock(gtk.STOCK_EDIT, gtk.ICON_SIZE_BUTTON)
|
||||
image.show()
|
||||
self.add_edt.add(image)
|
||||
self.tooltips.set_tip(self.add_edt, self.EDIT_STR)
|
||||
self.add_edt.set_tooltip_text(self.EDIT_STR)
|
||||
else:
|
||||
image = gtk.Image()
|
||||
image.set_from_stock(gtk.STOCK_INDEX, gtk.ICON_SIZE_BUTTON)
|
||||
image.show()
|
||||
self.share.add(image)
|
||||
self.tooltips.set_tip(self.share, self.SHARE_STR)
|
||||
self.share.set_tooltip_text(self.SHARE_STR)
|
||||
if self.add_edt is not None:
|
||||
image = gtk.Image()
|
||||
image.set_from_stock(gtk.STOCK_ADD, gtk.ICON_SIZE_BUTTON)
|
||||
image.show()
|
||||
self.add_edt.add(image)
|
||||
self.tooltips.set_tip(self.add_edt, self.ADD_STR)
|
||||
self.add_edt.set_tooltip_text(self.ADD_STR)
|
||||
|
||||
class PlaceEntry(ObjEntry):
|
||||
"""
|
||||
@@ -382,10 +383,10 @@ class NoteEntry(ObjEntry):
|
||||
|
||||
def get_label(self, note):
|
||||
txt = " ".join(note.get().split())
|
||||
#String must be unicode for truncation to work for non ascii characters
|
||||
txt = unicode(txt)
|
||||
if len(txt) > 35:
|
||||
txt = txt[:35]+"..."
|
||||
else:
|
||||
txt = txt
|
||||
txt = txt[:35] + "..."
|
||||
return "%s [%s]" % (txt, note.gramps_id)
|
||||
|
||||
def call_editor(self, obj=None):
|
||||
|
||||
@@ -58,7 +58,7 @@ from widgets import (MonitoredEntry, PrivacyButton,
|
||||
# Constants
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
WIKI_HELP_PAGE = 'Gramps_3.0_Wiki_Manual_-_Entering_and_Editing_Data:_Detailed'
|
||||
WIKI_HELP_PAGE = '%s_-_Entering_and_Editing_Data:_Detailed_-_part_2' % const.URL_MANUAL_PAGE
|
||||
WIKI_HELP_SEC = _('manual|Editing_Information_About_Events')
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@@ -292,7 +292,7 @@ class EditFamilyEvent(EditEvent):
|
||||
# Delete Query class
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class DelEventQuery:
|
||||
class DelEventQuery(object):
|
||||
def __init__(self, dbstate, uistate, event, person_list, family_list):
|
||||
self.event = event
|
||||
self.db = dbstate.db
|
||||
|
||||
+10
-16
@@ -380,7 +380,7 @@ class ChildEmbedList(EmbeddedList):
|
||||
else:
|
||||
return ("", "")
|
||||
|
||||
class FastMaleFilter:
|
||||
class FastMaleFilter(object):
|
||||
|
||||
def __init__(self, db):
|
||||
self.db = db
|
||||
@@ -389,7 +389,7 @@ class FastMaleFilter:
|
||||
value = self.db.get_raw_person_data(handle)
|
||||
return value[2] == gen.lib.Person.MALE
|
||||
|
||||
class FastFemaleFilter:
|
||||
class FastFemaleFilter(object):
|
||||
|
||||
def __init__(self, db):
|
||||
self.db = db
|
||||
@@ -409,7 +409,6 @@ class EditFamily(EditPrimary):
|
||||
|
||||
def __init__(self, dbstate, uistate, track, family):
|
||||
|
||||
self.tooltips = gtk.Tooltips()
|
||||
EditPrimary.__init__(self, dbstate, uistate, track,
|
||||
family, dbstate.db.get_family_from_handle,
|
||||
dbstate.db.get_family_from_gramps_id)
|
||||
@@ -543,12 +542,10 @@ class EditFamily(EditPrimary):
|
||||
self.mbutton_del = self.top.get_widget('mbutton_del')
|
||||
self.mbutton_edit = self.top.get_widget('mbutton_edit')
|
||||
|
||||
self.tooltips.set_tip(self.mbutton_index,
|
||||
_("Select a person as the mother"))
|
||||
self.tooltips.set_tip(self.mbutton_add,
|
||||
_("Add a new person as the mother"))
|
||||
self.tooltips.set_tip(self.mbutton_del,
|
||||
_("Remove the person as the mother"))
|
||||
self.mbutton_index.set_tooltip_text(_("Select a person as the mother"))
|
||||
self.mbutton_add.set_tooltip_text(_("Add a new person as the mother"))
|
||||
self.mbutton_del.set_tooltip_text(_("Remove the person as the mother"))
|
||||
|
||||
|
||||
self.mbutton_edit.connect('button-press-event', self.edit_mother)
|
||||
self.mbutton_edit.connect('key-press-event', self.edit_mother)
|
||||
@@ -561,12 +558,9 @@ class EditFamily(EditPrimary):
|
||||
self.fbutton_del = self.top.get_widget('fbutton_del')
|
||||
self.fbutton_edit = self.top.get_widget('fbutton_edit')
|
||||
|
||||
self.tooltips.set_tip(self.fbutton_index,
|
||||
_("Select a person as the father"))
|
||||
self.tooltips.set_tip(self.fbutton_add,
|
||||
_("Add a new person as the father"))
|
||||
self.tooltips.set_tip(self.fbutton_del,
|
||||
_("Remove the person as the father"))
|
||||
self.fbutton_index.set_tooltip_text(_("Select a person as the father"))
|
||||
self.fbutton_add.set_tooltip_text(_("Add a new person as the father"))
|
||||
self.fbutton_del.set_tooltip_text(_("Remove the person as the father"))
|
||||
|
||||
self.fbutton_edit.connect('button-press-event', self.edit_father)
|
||||
self.fbutton_edit.connect('key-press-event', self.edit_father)
|
||||
@@ -856,7 +850,7 @@ class EditFamily(EditPrimary):
|
||||
if death and death.get_type() == gen.lib.EventType.BURIAL:
|
||||
death_label.set_label(_("Burial:"))
|
||||
|
||||
self.tooltips.set_tip(btn_edit, _('Edit %s') % name)
|
||||
btn_edit.set_tooltip_text(_('Edit %s') % name)
|
||||
btn_index.hide()
|
||||
btn_add.hide()
|
||||
btn_del.show()
|
||||
|
||||
@@ -301,7 +301,7 @@ class EditMedia(EditPrimary):
|
||||
return cmp(cmp_obj.serialize(True)[1:],
|
||||
self.obj.serialize()[1:]) != 0
|
||||
|
||||
class DeleteMediaQuery:
|
||||
class DeleteMediaQuery(object):
|
||||
|
||||
def __init__(self, dbstate, uistate, media_handle, the_lists):
|
||||
self.db = dbstate.db
|
||||
|
||||
@@ -315,7 +315,7 @@ class EditNote(EditPrimary):
|
||||
self.callback(self.obj.get_handle())
|
||||
self.close()
|
||||
|
||||
class DeleteNoteQuery:
|
||||
class DeleteNoteQuery(object):
|
||||
def __init__(self, dbstate, uistate, note, the_lists):
|
||||
self.note = note
|
||||
self.db = dbstate.db
|
||||
|
||||
@@ -301,7 +301,7 @@ class EditPlace(EditPrimary):
|
||||
# DeletePlaceQuery
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class DeletePlaceQuery:
|
||||
class DeletePlaceQuery(object):
|
||||
|
||||
def __init__(self, dbstate, uistate, place, person_list, family_list,
|
||||
event_list):
|
||||
|
||||
@@ -176,7 +176,7 @@ class EditRepository(EditPrimary):
|
||||
def _cleanup_on_exit(self):
|
||||
self.backref_tab.close()
|
||||
|
||||
class DelRepositoryQuery:
|
||||
class DelRepositoryQuery(object):
|
||||
def __init__(self, dbstate, uistate, repository, sources):
|
||||
self.obj = repository
|
||||
self.db = dbstate.db
|
||||
|
||||
@@ -193,7 +193,7 @@ class EditSource(EditPrimary):
|
||||
def _cleanup_on_exit(self):
|
||||
self.backref_tab.close()
|
||||
|
||||
class DelSrcQuery:
|
||||
class DelSrcQuery(object):
|
||||
def __init__(self, dbstate, uistate, source, the_lists):
|
||||
self.source = source
|
||||
self.db = dbstate.db
|
||||
|
||||
+11
-12
@@ -2,7 +2,7 @@
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2004-2007 Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2008-2009 Brian G. Matherly
|
||||
#
|
||||
# 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
|
||||
@@ -29,6 +29,7 @@
|
||||
import os
|
||||
import sys
|
||||
from gettext import gettext as _
|
||||
from xml.sax.saxutils import escape
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@@ -118,7 +119,9 @@ class ExportAssistant(gtk.Assistant, ManagedWindow.ManagedWindow) :
|
||||
self.top_title = _("Export Assistant")
|
||||
ManagedWindow.ManagedWindow.__init__(self,uistate,[],
|
||||
self.__class__)
|
||||
self.set_window(self, None, self.top_title, isWindow=True)
|
||||
#set_window is present in both parent classes
|
||||
ManagedWindow.ManagedWindow.set_window(self, self, None,
|
||||
self.top_title, isWindow=True)
|
||||
|
||||
#set up callback method for the export plugins
|
||||
self.callback = self.pulse_progressbar
|
||||
@@ -196,8 +199,6 @@ class ExportAssistant(gtk.Assistant, ManagedWindow.ManagedWindow) :
|
||||
table.set_row_spacings(6)
|
||||
table.set_col_spacings(6)
|
||||
|
||||
tip = gtk.Tooltips()
|
||||
|
||||
group = None
|
||||
recent_type = Config.get(Config.RECENT_EXPORT_TYPE)
|
||||
|
||||
@@ -206,11 +207,11 @@ class ExportAssistant(gtk.Assistant, ManagedWindow.ManagedWindow) :
|
||||
description= self.__exporters[ix].get_description()
|
||||
|
||||
button = gtk.RadioButton(group,title)
|
||||
button.set_tooltip_text(description)
|
||||
if not group:
|
||||
group = button
|
||||
self.format_buttons.append(button)
|
||||
table.attach(button,0,2,2*ix,2*ix+1)
|
||||
tip.set_tip(button,description)
|
||||
if ix == recent_type :
|
||||
button.set_active(True)
|
||||
|
||||
@@ -439,15 +440,14 @@ class ExportAssistant(gtk.Assistant, ManagedWindow.ManagedWindow) :
|
||||
#Allow for exotic error: file is still not correct
|
||||
self.check_fileselect(self.chooser, show=False)
|
||||
if self.get_page_complete(self.chooser) :
|
||||
filename = unicode(self.chooser.get_filename(),
|
||||
sys.getfilesystemencoding())
|
||||
filename = Utils.get_unicode_path(self.chooser.get_filename())
|
||||
name = os.path.split(filename)[1]
|
||||
folder = os.path.split(filename)[0]
|
||||
confirm_text = _(
|
||||
'The data will be saved as follows:\n\n'
|
||||
'Format:\t%s\nName:\t%s\nFolder:\t%s\n\n'
|
||||
'Press Apply to proceed, Back to revisit '
|
||||
'your options, or Cancel to abort') % (format, name, folder)
|
||||
'your options, or Cancel to abort') % (format.replace("_",""), name, folder)
|
||||
self.set_page_complete(page, True)
|
||||
else :
|
||||
confirm_text = _(
|
||||
@@ -457,7 +457,7 @@ class ExportAssistant(gtk.Assistant, ManagedWindow.ManagedWindow) :
|
||||
)
|
||||
self.set_page_complete(page, False)
|
||||
|
||||
page.set_label(confirm_text)
|
||||
page.set_label(escape(confirm_text))
|
||||
|
||||
elif self.get_page_type(page) == gtk.ASSISTANT_PAGE_SUMMARY :
|
||||
# The summary page
|
||||
@@ -489,7 +489,7 @@ class ExportAssistant(gtk.Assistant, ManagedWindow.ManagedWindow) :
|
||||
'Note: your currently opened database is safe. '
|
||||
'It was only '
|
||||
'a copy of your data that failed to save.')
|
||||
self.labelsum.set_label(conclusion_text)
|
||||
self.labelsum.set_label(escape(conclusion_text))
|
||||
self.set_page_title(page, conclusion_title)
|
||||
self.set_page_complete(page, True)
|
||||
else :
|
||||
@@ -563,8 +563,7 @@ class ExportAssistant(gtk.Assistant, ManagedWindow.ManagedWindow) :
|
||||
Depending on the success status, set the text for the final page.
|
||||
|
||||
"""
|
||||
filename = unicode(self.chooser.get_filename(),
|
||||
sys.getfilesystemencoding())
|
||||
filename = Utils.get_unicode_path(self.chooser.get_filename())
|
||||
Config.set(Config.RECENT_EXPORT_DIR, os.path.split(filename)[0])
|
||||
ix = self.get_selected_format_index()
|
||||
Config.set(Config.RECENT_EXPORT_TYPE, ix)
|
||||
|
||||
@@ -46,7 +46,7 @@ from Filters import GenericFilter, Rules
|
||||
# WriterOptionBox
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class WriterOptionBox:
|
||||
class WriterOptionBox(object):
|
||||
"""
|
||||
Create a VBox with the option widgets and define methods to retrieve
|
||||
the options.
|
||||
|
||||
@@ -55,7 +55,7 @@ from TransUtils import sgettext as _
|
||||
# Constants
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
WIKI_HELP_PAGE = 'Gramps_3.0_Wiki_Manual_-_Filters'
|
||||
WIKI_HELP_PAGE = WIKI_HELP_PAGE = '%s_-_Filters' % const.URL_MANUAL_PAGE
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
@@ -214,44 +214,6 @@ class MyLesserEqualGreater(gtk.ComboBox):
|
||||
else:
|
||||
self.set_active(self.clist.index('equal to'))
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# MySource - Combo box with list of sources with a standard interface
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class MySource(gtk.ComboBox):
|
||||
|
||||
def __init__(self, db):
|
||||
gtk.ComboBox.__init__(self)
|
||||
self.db = db
|
||||
store = gtk.ListStore(gobject.TYPE_STRING)
|
||||
self.set_model(store)
|
||||
cell = gtk.CellRendererText()
|
||||
self.pack_start(cell, True)
|
||||
self.add_attribute(cell, 'text', 0)
|
||||
|
||||
self.slist = []
|
||||
for src_handle in self.db.get_source_handles(sort_handles=True):
|
||||
src = self.db.get_source_from_handle(src_handle)
|
||||
self.slist.append(src.get_gramps_id())
|
||||
title = src.get_title()
|
||||
if len(title) > 44:
|
||||
title = title[:40] + "..."
|
||||
store.append(row=["%s [%s]" % (title, src.get_gramps_id())])
|
||||
|
||||
self.set_active(0)
|
||||
self.show()
|
||||
|
||||
def get_text(self):
|
||||
active = self.get_active()
|
||||
if active < 0:
|
||||
return ""
|
||||
return self.slist[active]
|
||||
|
||||
def set_text(self, val):
|
||||
if val in self.slist:
|
||||
self.set_active(self.slist.index(val))
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# MyPlaces - AutoCombo text entry with list of places attached. Provides
|
||||
@@ -272,6 +234,8 @@ class MyPlaces(gtk.Entry):
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class MyID(gtk.HBox):
|
||||
_invalid_id_txt = _('Not a valid ID')
|
||||
_empty_id_txt = _invalid_id_txt
|
||||
|
||||
obj_name = {
|
||||
'Person' : _('Person'),
|
||||
@@ -300,10 +264,8 @@ class MyID(gtk.HBox):
|
||||
self.button.show()
|
||||
self.pack_start(self.entry)
|
||||
self.add(self.button)
|
||||
self.tooltips = gtk.Tooltips()
|
||||
self.tooltips.set_tip(self.button, _('Select %s from a list')
|
||||
% self.obj_name[namespace])
|
||||
self.tooltips.enable()
|
||||
self.button.set_tooltip_text(_('Select %s from a list')
|
||||
% self.obj_name[namespace])
|
||||
self.show()
|
||||
self.set_text('')
|
||||
|
||||
@@ -348,13 +310,30 @@ class MyID(gtk.HBox):
|
||||
return name
|
||||
|
||||
def set_text(self, val):
|
||||
try:
|
||||
name = self.name_from_gramps_id(val)
|
||||
self.tooltips.set_tip(self.entry, name)
|
||||
except AttributeError:
|
||||
self.tooltips.set_tip(self.entry, _('Not a valid ID'))
|
||||
if not val:
|
||||
self.entry.set_tooltip_text(self._empty_id_txt)
|
||||
else:
|
||||
try:
|
||||
name = self.name_from_gramps_id(val)
|
||||
self.entry.set_tooltip_text(name)
|
||||
except AttributeError:
|
||||
self.entry.set_tooltip_text(self._invalid_id_txt)
|
||||
self.entry.set_text(val)
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# MySource - select ID of sources with a standard interface
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class MySource(MyID):
|
||||
|
||||
_empty_id_txt = _('Give or select a source ID, leave empty to find objects'
|
||||
' with no source.')
|
||||
def __init__(self, dbstate, uistate, track):
|
||||
MyID.__init__(self, dbstate, uistate, track, namespace='Source')
|
||||
self.entry.set_tooltip_text(self._empty_id_txt)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
#
|
||||
@@ -486,7 +465,7 @@ class EditRule(ManagedWindow.ManagedWindow):
|
||||
t = MyID(self.dbstate, self.uistate, self.track,
|
||||
self.namespace)
|
||||
elif v == _('Source ID:'):
|
||||
t = MySource(self.db)
|
||||
t = MySource(self.dbstate, self.uistate, self.track)
|
||||
elif v == _('Filter name:'):
|
||||
t = MyFilters(self.filterdb.get_filters(self.namespace),
|
||||
self.filter_name)
|
||||
@@ -578,12 +557,38 @@ class EditRule(ManagedWindow.ManagedWindow):
|
||||
tlist[i].set_text(r[i])
|
||||
|
||||
self.selection.connect('changed', self.on_node_selected)
|
||||
self.rname.connect('button-press-event', self._button_press)
|
||||
self.rname.connect('key-press-event', self._key_press)
|
||||
self.get_widget('ok').connect('clicked', self.rule_ok)
|
||||
self.get_widget('cancel').connect('clicked', self.close_window)
|
||||
self.get_widget('help').connect('clicked', self.on_help_clicked)
|
||||
|
||||
self.show()
|
||||
|
||||
def _button_press(self, obj, event):
|
||||
if event.type == gtk.gdk._2BUTTON_PRESS and event.button == 1:
|
||||
return self.expand_collapse()
|
||||
|
||||
def _key_press(self, obj, event):
|
||||
if not event.state or event.state in (gtk.gdk.MOD2_MASK, ):
|
||||
if event.keyval in (gtk.keysyms.Return, gtk.keysyms.KP_Enter):
|
||||
return self.expand_collapse()
|
||||
return False
|
||||
|
||||
def expand_collapse(self):
|
||||
"""
|
||||
Expand or collapse the selected parent name node.
|
||||
Return True if change done, False otherwise
|
||||
"""
|
||||
store, paths = self.selection.get_selected_rows()
|
||||
if paths and len(paths[0]) == 1 :
|
||||
if self.rname.row_expanded(paths[0]):
|
||||
self.rname.collapse_row(paths[0])
|
||||
else:
|
||||
self.rname.expand_row(paths[0], 0)
|
||||
return True
|
||||
return False
|
||||
|
||||
def on_help_clicked(self, obj):
|
||||
"""
|
||||
Display the relevant portion of GRAMPS manual.
|
||||
|
||||
@@ -133,6 +133,8 @@ class ShowResults(ManagedWindow.ManagedWindow):
|
||||
elif self.namespace == 'Note':
|
||||
note = self.db.get_note_from_handle(handle)
|
||||
name = note.get().replace('\n', ' ')
|
||||
#String must be unicode for truncation to work for non ascii characters
|
||||
name = unicode(name)
|
||||
if len(name) > 80:
|
||||
name = name[:80]+"..."
|
||||
gid = note.get_gramps_id()
|
||||
|
||||
@@ -18,9 +18,9 @@ from Filters.Rules._ChangedSinceBase import ChangedSinceBase
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class ChangedSince(ChangedSinceBase):
|
||||
"""Rule that checks for an event changed since a specific time."""
|
||||
"""Rule that checks for an event changed after a specific time."""
|
||||
|
||||
name = _('Events changed before <date time>')
|
||||
description = _("Matches event records changed before a specified "
|
||||
name = _('Events changed after <date time>')
|
||||
description = _("Matches event records changed after a specified "
|
||||
"date/time (yyyy-mm-dd hh:mm:ss) or in the range, if a second "
|
||||
"date/time is given")
|
||||
|
||||
@@ -20,7 +20,7 @@ from Filters.Rules._ChangedSinceBase import ChangedSinceBase
|
||||
class ChangedSince(ChangedSinceBase):
|
||||
"""Rule that checks for families changed since a specific time."""
|
||||
|
||||
name = _('Families changed before <date time>')
|
||||
description = _("Matches family records changed before a specified "
|
||||
name = _('Families changed after <date time>')
|
||||
description = _("Matches family records changed after a specified "
|
||||
"date-time (yyyy-mm-dd hh:mm:ss) or in the range, if a second "
|
||||
"date-time is given")
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user