Compare commits
61 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1af6e6cf63 | |||
| c54a3cc0d4 | |||
| dff7c4a8b5 | |||
| d4d71670e8 | |||
| 1b4f86ad2d | |||
| 47f4566a9c | |||
| 1c58e1c7b2 | |||
| 12714fd6f1 | |||
| 57e2ee81d4 | |||
| 6ca4f6b84f | |||
| 9150d59c1b | |||
| 3696ea6dd4 | |||
| a8da4bf460 | |||
| 4c28226a3f | |||
| d6d386520c | |||
| d162eca43d | |||
| f9e3d068d3 | |||
| 397809cd7b | |||
| 728c6f3c3b | |||
| 99160920f1 | |||
| 4bd50c6749 | |||
| c7ec7125f7 | |||
| e5c53f3734 | |||
| 6e64cd02bc | |||
| 4dad6d00db | |||
| 438793abf5 | |||
| a8506d868a | |||
| ed7f937da2 | |||
| 3f8586fed9 | |||
| c6c6307318 | |||
| 0d7398c09b | |||
| 949c1494e0 | |||
| cb7227f692 | |||
| 9da1431b6c | |||
| bf0a1cc434 | |||
| 137bc788c5 | |||
| c88c876e38 | |||
| 41c786cc18 | |||
| 6aeba201a4 | |||
| 56c898064d | |||
| e0b0b14c2d | |||
| 129d6e6fbd | |||
| f658139fb4 | |||
| bf00316be0 | |||
| 8bb52bb0d9 | |||
| 6a7594b95f | |||
| 2f52deae58 | |||
| 677ad44e44 | |||
| ae58e5a8d4 | |||
| 23d80230a9 | |||
| 3511390a52 | |||
| 842432b71d | |||
| 25ac9a4f20 | |||
| 011ff47007 | |||
| 10028218eb | |||
| 235180132c | |||
| 4ff82a7581 | |||
| 01f264fa8b | |||
| 571c6305ea | |||
| 9ad6dbef8f | |||
| 17b0fa4fc9 |
+2
-2
@@ -11,8 +11,8 @@ AM_INIT_AUTOMAKE([1.6.3 foreign])
|
||||
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
dnl RELEASE=0.SVN$(svnversion -n .)
|
||||
RELEASE=0beta1
|
||||
RELEASE=0beta.SVN$(svnversion -n .)
|
||||
dnl RELEASE=0beta3
|
||||
dnl RELEASE=0rc1
|
||||
dnl RELEASE=1
|
||||
|
||||
|
||||
Vendored
+12
-5
@@ -3,9 +3,16 @@ gramps for Debian
|
||||
|
||||
This is the Debian package of GRAMPS.
|
||||
|
||||
If you do not install python-reportlab (gramps Recommends it be
|
||||
installed) then you will be able to create usable PDF files only if
|
||||
your database contains solely latin (iso-8859-1) characters. Reportlab
|
||||
will generate PDF files containing non-latin characters although they
|
||||
are quite large as the font must be included in the file.
|
||||
Regarding the extra dependencies:
|
||||
|
||||
Recommends: graphviz
|
||||
Enable creation of graphs
|
||||
Recommends: python-gtkmozembed
|
||||
Recommends: python-webkit
|
||||
Enable html rendering for Geographic view and Web view. If both
|
||||
are installed webkit will be used. python-gtkmozembed may be more
|
||||
stable.
|
||||
Suggests: ttf-freefont
|
||||
Allows more fonts in reports
|
||||
Suggests: python-gtkspell python-enchant
|
||||
allows spell checking in the notes. Both need to be installed.
|
||||
|
||||
Vendored
+251
-6
@@ -1,20 +1,265 @@
|
||||
gramps (3.0.0-1) gutsy; urgency=low
|
||||
gramps (3.2.0-0beta1) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
* works with gtk 2.19. Closes: #566958
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Fri, 05 Mar 2010 14:05:39 -0500
|
||||
|
||||
gramps (3.1.3-2) unstable; urgency=low
|
||||
|
||||
* Switch to dpkg-source 3.0 (quilt) format
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Tue, 05 Jan 2010 20:04:30 -0500
|
||||
|
||||
gramps (3.1.3-1) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
|
||||
-- Stephane Charette <stephanecharette@gmail.com> Mon, 31 Mar 2008 19:42:05 -0700
|
||||
-- James A. Treacy <treacy@debian.org> Sun, 06 Dec 2009 13:46:48 -0500
|
||||
|
||||
gramps (2.90.0-0beta) unstable; urgency=low
|
||||
gramps (3.1.2-2) unstable; urgency=low
|
||||
|
||||
* allow python >= 2.5. Closes: #547150
|
||||
* fix Relationship Graph to use new format for URLs. Closes: #532559
|
||||
* Web report creation fixed. Closes: #537355
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Tue, 17 Nov 2009 11:38:43 -0500
|
||||
|
||||
gramps (3.1.2-1.1) unstable; urgency=low
|
||||
|
||||
* Non-maintainer upload.
|
||||
* debian/control: drop Recommends on python-gnome2-desktop: it is now
|
||||
gone and none of its modules are used anyhow (Closes: #541560)
|
||||
|
||||
-- Stefano Zacchiroli <zack@debian.org> Thu, 08 Oct 2009 13:52:35 +0200
|
||||
|
||||
gramps (3.1.2-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
* Replace Recommends on python-gnome2-extras with python-gtkspell
|
||||
* Do not create the directory /etc/gconf/schemas/. Closes: Bug#525683
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Sun, 07 Jun 2009 14:01:16 -0400
|
||||
|
||||
gramps (3.1.1-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Tue, 10 Mar 2009 09:26:52 -0400
|
||||
|
||||
gramps (3.1.0-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
* link /usr/share/common-licenses/GPL-2 from /usr/share/gramps/COPYING
|
||||
so gramps can find the file.
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Sat, 07 Mar 2009 22:03:09 -0500
|
||||
|
||||
gramps (3.0.4-1) unstable; urgency=low
|
||||
|
||||
* New upstream version. Closes: #506621, #506818
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Sun, 07 Dec 2008 21:39:55 -0500
|
||||
|
||||
gramps (3.0.3-1) unstable; urgency=low
|
||||
|
||||
* New upstream version
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Mon, 20 Oct 2008 20:43:35 -0400
|
||||
|
||||
gramps (3.0.2-1) unstable; urgency=low
|
||||
|
||||
* New upstream version
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Sat, 27 Sep 2008 17:25:09 -0400
|
||||
|
||||
gramps (3.0.1-2) unstable; urgency=low
|
||||
|
||||
* Remove dependency on gnome-doc-utils and scrollkeeper
|
||||
* Disable spell checking in src/Spell.py due to the spell checker
|
||||
crashing. Closes: #492212
|
||||
Spell checking will be reenabled once the offending package is
|
||||
identified and fixed.
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Fri, 29 Aug 2008 11:09:04 -0400
|
||||
|
||||
gramps (3.0.1-1) unstable; urgency=low
|
||||
|
||||
* New upstream version
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Mon, 19 May 2008 09:38:28 -0400
|
||||
|
||||
gramps (3.0.0-6) unstable; urgency=low
|
||||
|
||||
* Fix typo in _EditChildRef.py which can cause gramps to crash. Closes: #476163
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Tue, 15 Apr 2008 23:37:04 -0400
|
||||
|
||||
gramps (3.0.0-5) unstable; urgency=low
|
||||
|
||||
* Remove gtkspell Recommends as it is now provided by python-gnome2-extras.
|
||||
Closes: Bug#474755
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Mon, 07 Apr 2008 17:25:18 -0400
|
||||
|
||||
gramps (3.0.0-4) unstable; urgency=low
|
||||
|
||||
* Fix the binary package python dependency properly. A recent python
|
||||
(>= 2.4.4-6) is needed to ensure python2.5 is supported properly.
|
||||
Closes: #474056
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Thu, 03 Apr 2008 09:46:28 -0400
|
||||
|
||||
gramps (3.0.0-3) unstable; urgency=low
|
||||
|
||||
* Build-Depends on Python2.5. Closes: Bug#473946, #474056
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Wed, 02 Apr 2008 08:28:27 -0400
|
||||
|
||||
gramps (3.0.0-2) unstable; urgency=low
|
||||
|
||||
* Explicitly require python version >= 2.5
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Wed, 26 Mar 2008 09:34:25 -0400
|
||||
|
||||
gramps (3.0.0-1) unstable; urgency=low
|
||||
|
||||
* New upstream release. Closes: #472681
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Tue, 25 Mar 2008 09:35:00 -0400
|
||||
|
||||
gramps (2.2.10-2) unstable; urgency=low
|
||||
|
||||
* Remove build dependency on python-xml. Closes: Bug#468625
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Fri, 29 Feb 2008 13:30:11 -0500
|
||||
|
||||
gramps (2.2.10-1) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
* Added dh_icons to debian/rules. Closes: #454761
|
||||
* Remove version from scrollkeeper dependency. Closes: #456600
|
||||
* Fixed typos in description. Closes: #433559
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Mon, 14 Jan 2008 09:57:25 -0500
|
||||
|
||||
gramps (2.2.9-2) unstable; urgency=low
|
||||
|
||||
* Move debhelper to Build-Depends. Closes: #447948
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Wed, 24 Oct 2007 20:03:36 -0400
|
||||
|
||||
gramps (2.2.9-1) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
|
||||
-- Stephane Charette <stephanecharette@gmail.com> Wed, 16 Jan 2008 21:45:00 -0800
|
||||
-- James A. Treacy <treacy@debian.org> Thu, 18 Oct 2007 13:14:30 -0400
|
||||
|
||||
gramps (2.1.6-1) unstable; urgency=low
|
||||
gramps (2.2.8-2) unstable; urgency=low
|
||||
|
||||
* Work around a bug in gnome-python-extras which caused a deallocation
|
||||
of the TextView in the check if a spell checker is present.
|
||||
Closes: #445864
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Tue, 09 Oct 2007 17:26:54 -0400
|
||||
|
||||
gramps (2.2.8-1) unstable; urgency=low
|
||||
|
||||
* New Upstream version
|
||||
* Misleading error message changed. Closes: #418033
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Mon, 28 May 2007 21:00:51 -0400
|
||||
|
||||
gramps (2.2.7-2) unstable; urgency=low
|
||||
|
||||
* Added dependency on librsvg2-common
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Mon, 23 Apr 2007 19:32:00 -0400
|
||||
|
||||
gramps (2.2.7-1) unstable; urgency=low
|
||||
|
||||
* New upstream version
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Sun, 22 Apr 2007 20:08:55 -0400
|
||||
|
||||
gramps (2.2.6-1) unstable; urgency=low
|
||||
|
||||
* New upstream version
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Mon, 29 Jan 2007 20:12:05 -0500
|
||||
|
||||
gramps (2.2.5-0rc1-1) unstable; urgency=low
|
||||
|
||||
* rc1 of 2.2.5
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Thu, 25 Jan 2007 23:04:24 -0500
|
||||
|
||||
gramps (2.2.4-1) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
|
||||
-- Alex Roitman <shura@gramps-project.org> Thu, 22 Jun 2006 13:28:14 -0700
|
||||
-- James A. Treacy <treacy@debian.org> Wed, 27 Dec 2006 18:04:11 -0500
|
||||
|
||||
gramps (2.2.3-1) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Mon, 27 Nov 2006 00:27:23 -0500
|
||||
|
||||
gramps (2.2.2-2) unstable; urgency=low
|
||||
|
||||
* call dh_desktop in debian/rules so .desktop file is registered. Closes: Bug#398423
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Mon, 13 Nov 2006 20:26:00 -0500
|
||||
|
||||
gramps (2.2.2-1) unstable; urgency=low
|
||||
|
||||
* Bumped upstream version number. 2.2.1-3 and -4 should have been 2.2.2
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Sat, 4 Nov 2006 16:34:47 -0500
|
||||
|
||||
gramps (2.2.1-4) unstable; urgency=low
|
||||
|
||||
* add missing Build-Depends-Indep. Closes: #396874
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Fri, 3 Nov 2006 11:03:35 -0500
|
||||
|
||||
gramps (2.2.1-3) unstable; urgency=low
|
||||
|
||||
* New Upstream release
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Fri, 3 Nov 2006 08:07:38 -0500
|
||||
|
||||
gramps (2.2.1-2) unstable; urgency=low
|
||||
|
||||
* Upload to sid
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Wed, 1 Nov 2006 20:50:28 -0500
|
||||
|
||||
gramps (2.2.1-1) experimental; urgency=low
|
||||
|
||||
* New upstream release
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Mon, 30 Oct 2006 10:32:43 -0500
|
||||
|
||||
gramps (2.1.95-1) experimental; urgency=low
|
||||
|
||||
* Beta release of version 2.2
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Tue, 29 Aug 2006 11:40:08 -0400
|
||||
|
||||
|
||||
gramps (2.1.90-1) experimental; urgency=low
|
||||
|
||||
* Beta release of version 2.2
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Tue, 25 Jul 2006 00:18:15 -0400
|
||||
|
||||
gramps (2.0.11-2) unstable; urgency=low
|
||||
|
||||
* Complies with new python policy
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Wed, 5 Jul 2006 14:47:56 -0400
|
||||
|
||||
gramps (2.0.11-1) unstable; urgency=low
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
4
|
||||
7
|
||||
|
||||
Vendored
+20
-16
@@ -1,23 +1,27 @@
|
||||
Source: gramps
|
||||
Section: gnome
|
||||
Priority: optional
|
||||
Maintainer: James A. Treacy <treacy@debian.org>
|
||||
Build-Depends-Indep: debhelper (>=5.0.37.2), python-xml, python-gnome2, python-glade2, scrollkeeper, libglib2.0-dev, build-essential, gnome-doc-utils, intltool, xsltproc, python-central (>= 0.4.17)
|
||||
Standards-Version: 3.6.2
|
||||
XS-Python-Version: current
|
||||
Maintainer: Stéphane Charette <stephanecharette@gmail.com>
|
||||
Build-Depends-Indep: libxml-parser-perl, python-gtk2, gettext, libgconf2-dev, python-central (>= 0.5.6), python, intltool
|
||||
Build-Depends: debhelper (>= 7)
|
||||
Standards-Version: 3.8.3
|
||||
Homepage: http://www.gramps-project.org/
|
||||
XS-Python-Version: >=2.5
|
||||
|
||||
Package: gramps
|
||||
Architecture: all
|
||||
Depends: ${python:Depends}, python-gnome2, python-glade2, ${misc:Depends}
|
||||
Replaces: gramps-manual, gramps-extending-doc, gramps-help
|
||||
Conflicts: gramps-manual, gramps-extending-doc, gramps-common
|
||||
Recommends: graphviz, ttf-freefont, python-reportlab, python-gnome2-extras
|
||||
Description: Genealogical Research and Analysis Management Program
|
||||
GRAMPS, the Genealogical Research and Analysis Management Programming
|
||||
System, is an Open Source genealogy program written in Python, using
|
||||
the GTK/GNOME interface.
|
||||
GRAMPS has the ability to import GEDCOM files that are used in such
|
||||
programs as FamilyTree Maker for Windows and can produce reports
|
||||
in various formats such as the popular ABIWord and OpenOffice.org
|
||||
formats as well as HTML and PDF.
|
||||
Depends: ${python:Depends}, librsvg2-common, python-gtk2, xdg-utils, ${misc:Depends}
|
||||
Replaces: gramps-manual, gramps-extending-doc
|
||||
Conflicts: gramps-manual, gramps-extending-doc, gramps-common, python-gtk-1.2
|
||||
Recommends: graphviz, python-webkit, python-gtkmozembed
|
||||
Suggests: ttf-freefont, python-enchant, python-gtkspell
|
||||
Description: Genealogical research program
|
||||
GRAMPS is an Open Source genealogy program written in Python, using
|
||||
the GTK/GNOME interface. It is an extremely flexible program fitting
|
||||
the needs for both the amateur genealogist and serious genealogical
|
||||
researcher.
|
||||
GRAMPS has the ability to import GEDCOM files exported from many
|
||||
proprietary genealogy programs and can produce a large number of
|
||||
reports in many popular formats.
|
||||
XB-Python-Version: ${python:Versions}
|
||||
|
||||
|
||||
Vendored
+1
@@ -1 +1,2 @@
|
||||
usr/share/pixmaps
|
||||
usr/share/mime/packages
|
||||
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
/usr/bin/
|
||||
/usr/share/
|
||||
/etc
|
||||
Vendored
+1
-1
@@ -1,3 +1,3 @@
|
||||
?package(gramps):needs="X11" section="Apps/Tools"\
|
||||
?package(gramps):needs="X11" section="Applications/Office"\
|
||||
title="gramps" command="/usr/bin/gramps"\
|
||||
icon="/usr/share/pixmaps/gramps.xpm"
|
||||
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
2
|
||||
Vendored
+29
-32
@@ -4,71 +4,68 @@ build: build-stamp
|
||||
build-stamp:
|
||||
dh_testdir
|
||||
|
||||
./configure \
|
||||
--enable-packager-mode \
|
||||
--disable-scrollkeeper \
|
||||
--prefix=/usr \
|
||||
--mandir=\$${prefix}/share/man \
|
||||
--sysconfdir=/etc
|
||||
#./autogen.sh --prefix=/usr --mandir=\$${prefix}/share/man --sysconfdir=/etc
|
||||
./configure --enable-packager-mode --prefix=/usr --mandir=\$${prefix}/share/man --sysconfdir=/etc
|
||||
# ./configure --prefix=`pwd`/debian/tmp/usr --mandir=\$${prefix}/share/man
|
||||
$(MAKE)
|
||||
# $(MAKE) html
|
||||
|
||||
touch build-stamp
|
||||
|
||||
clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
-rm -f build-stamp
|
||||
|
||||
-$(MAKE) clean
|
||||
-rm -f src/*.pyo src/*/*.pyo src/*/*/*.pyo src/*/*/*/*.pyo
|
||||
-rm -f config.status config.log
|
||||
# [ ! -f Makefile ] || $(MAKE) distclean
|
||||
# -rm -f src/*.pyo src/*/*.pyo
|
||||
# -rm -f config.status config.log
|
||||
|
||||
dh_auto_clean
|
||||
dh_clean
|
||||
|
||||
install: build
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean -k
|
||||
dh_prep
|
||||
dh_installdirs
|
||||
|
||||
GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
|
||||
# Add here commands to install the package into debian/tmp.
|
||||
# GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
|
||||
$(MAKE) install DESTDIR=`pwd`/debian/gramps
|
||||
# Remove help-related dirs, they will go into gramps-help package
|
||||
-rm -rf debian/gramps/usr/share/gnome
|
||||
-rm -rf debian/gramps/usr/share/omf
|
||||
|
||||
# Remove byte-compiled python files
|
||||
-rm -f debian/gramps/usr/share/gramps/COPYING
|
||||
ln -s /usr/share/common-licenses/GPL-2 debian/gramps/usr/share/gramps/COPYING
|
||||
-rm -rf debian/gramps/usr/var
|
||||
# cp src/data/gramps.xml debian/gramps/usr/share/mime/packages
|
||||
-find debian/gramps/usr/share/ -name "*.pyo" -exec rm -f '{}' ';'
|
||||
|
||||
# Copy icon file
|
||||
cp debian/gramps.xpm debian/gramps/usr/share/pixmaps/
|
||||
# cp src/gramps.xpm debian/tmp/usr/share/pixmaps/
|
||||
#cp src/data/gramps.svg debian/gramps/usr/share/pixmaps/
|
||||
#chmod 644 debian/gramps/usr/share/pixmaps/gramps.svg
|
||||
|
||||
# Instal gramps-help things
|
||||
#$(MAKE) -C help install DESTDIR=`pwd`/debian/gramps-help
|
||||
# cp src/images/gramps.svg debian/gramps/usr/share/pixmaps/
|
||||
# chmod 644 debian/gramps/usr/share/pixmaps/gramps.svg
|
||||
|
||||
# Build architecture-independent files here.
|
||||
binary-indep: build install
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_installdocs
|
||||
dh_installmenu --package=gramps
|
||||
dh_installman --package=gramps
|
||||
dh_installdocs FAQ
|
||||
dh_installmenu
|
||||
# dh_installman
|
||||
dh_installmime -i
|
||||
dh_installchangelogs --package=gramps ChangeLog
|
||||
#dh_installchangelogs --package=gramps-help help/ChangeLog
|
||||
dh_gconf --package=gramps
|
||||
#dh_scrollkeeper --package=gramps-help
|
||||
# dh_installchangelogs ChangeLog
|
||||
dh_installchangelogs
|
||||
dh_icons
|
||||
# dh_movefiles -i
|
||||
# dh_gconf -i
|
||||
dh_link -i
|
||||
dh_compress -i
|
||||
dh_fixperms -i
|
||||
dh_python --package=gramps
|
||||
dh_installdeb -i
|
||||
dh_pycentral -i
|
||||
dh_installdeb -i
|
||||
dh_gencontrol -i
|
||||
dh_md5sums -i
|
||||
dh_builddeb -i
|
||||
|
||||
|
||||
# Build architecture-dependent files here.
|
||||
binary-arch: build install
|
||||
|
||||
|
||||
+1
-4
@@ -381,7 +381,6 @@ src/plugins/drawreport/TimeLine.py
|
||||
# plugins/export directory
|
||||
src/plugins/export/export.gpr.py
|
||||
src/plugins/export/ExportCsv.py
|
||||
src/plugins/export/ExportDjango.py
|
||||
src/plugins/export/ExportFtree.py
|
||||
src/plugins/export/ExportGedcom.py
|
||||
src/plugins/export/ExportGeneWeb.py
|
||||
@@ -398,6 +397,7 @@ src/plugins/gramplet/AttributesGramplet.py
|
||||
src/plugins/gramplet/CalendarGramplet.py
|
||||
src/plugins/gramplet/DescendGramplet.py
|
||||
src/plugins/gramplet/FanChartGramplet.py
|
||||
src/plugins/gramplet/FaqGramplet.py
|
||||
src/plugins/gramplet/GivenNameGramplet.py
|
||||
src/plugins/gramplet/gramplet.gpr.py
|
||||
src/plugins/gramplet/PedigreeGramplet.py
|
||||
@@ -420,8 +420,6 @@ src/plugins/graph/GVRelGraph.py
|
||||
# plugins/import directory
|
||||
src/plugins/import/import.gpr.py
|
||||
src/plugins/import/ImportCsv.py
|
||||
src/plugins/import/ImportDjango.py
|
||||
src/plugins/import/ImportDjango.py
|
||||
src/plugins/import/ImportGedcom.py
|
||||
src/plugins/import/ImportGeneWeb.py
|
||||
src/plugins/import/ImportGrdb.py
|
||||
@@ -506,7 +504,6 @@ src/plugins/textreport/Summary.py
|
||||
src/plugins/textreport/textplugins.gpr.py
|
||||
|
||||
# plugins/tool directory
|
||||
src/plugins/tool/CalculateEstimatedDates.py
|
||||
src/plugins/tool/ChangeNames.py
|
||||
src/plugins/tool/ChangeTypes.py
|
||||
src/plugins/tool/Check.py
|
||||
|
||||
+4
-1
@@ -11,6 +11,8 @@ src/gen/lib/styledtexttagtype.py
|
||||
src/LdsUtils.py
|
||||
src/Mime/_WinMime.py
|
||||
src/plugins/docgen/PdfDoc.py
|
||||
src/plugins/export/ExportDjango.gpr.py
|
||||
src/plugins/import/ImportDjango.gpr.py
|
||||
src/plugins/gramplet/DeepConnections.py
|
||||
src/plugins/gramplet/NoteGramplet.py
|
||||
src/plugins/gramplet/PluginManagerGramplet.py
|
||||
@@ -21,8 +23,9 @@ src/plugins/tool/DumpGenderStats.py
|
||||
src/plugins/tool/PHPGedViewConnector.py
|
||||
src/plugins/tool/TestcaseGenerator.py
|
||||
src/plugins/tool/phpgedview.glade
|
||||
src/plugins/gramplet/FaqGramplet.py
|
||||
src/plugins/gramplet/HeadlineNewsGramplet.py
|
||||
src/plugins/quickview/AllNames.py
|
||||
src/plugins/quickview/Query.py
|
||||
src/ReportBase/_DocReportDialog.py
|
||||
src/web/grampsdb/views.py
|
||||
src/web/utils.py
|
||||
|
||||
+837
-1053
File diff suppressed because it is too large
Load Diff
+1991
-2537
File diff suppressed because it is too large
Load Diff
@@ -569,6 +569,11 @@ class PluginStatus(ManagedWindow.ManagedWindow):
|
||||
# If this version is not installed, or > installed, install it
|
||||
good_gpr.add(gpr_file)
|
||||
callback(" " + (_("'%s' is for this version of Gramps.") % gpr_file) + "\n")
|
||||
else:
|
||||
# If the plugin is for another version; inform and do nothing
|
||||
callback(" " + (_("'%s' is for NOT this version of Gramps.") % gpr_file) + "\n")
|
||||
callback(" " + (_("It is for version %d.%d" % vtup) + "\n"))
|
||||
continue
|
||||
else:
|
||||
# another register function doesn't have gramps_target_version
|
||||
if gpr_file in good_gpr:
|
||||
@@ -659,7 +664,6 @@ class PluginStatus(ManagedWindow.ManagedWindow):
|
||||
# i = (filename, module, pdata)
|
||||
pdata = i[2]
|
||||
modname = i[1].__name__
|
||||
descr = self.__pmgr.get_module_description(modname)
|
||||
hidden = pdata.id in self.hidden
|
||||
if hidden:
|
||||
hiddenstr = self.HIDDEN
|
||||
@@ -667,7 +671,7 @@ class PluginStatus(ManagedWindow.ManagedWindow):
|
||||
hiddenstr = self.AVAILABLE
|
||||
self.model.append(row=[
|
||||
'<span weight="bold" color="#267726">%s</span>' % _("OK"),
|
||||
i[0], descr, None, pdata.id, hiddenstr])
|
||||
i[0], pdata.description, None, pdata.id, hiddenstr])
|
||||
|
||||
def __populate_reg_list(self):
|
||||
""" Build list of registered plugins"""
|
||||
|
||||
@@ -639,7 +639,10 @@ def report(dbstate, uistate, person, report_class, options_class,
|
||||
except:
|
||||
LOG.error("Failed to run report.", exc_info=True)
|
||||
break
|
||||
elif (response == gtk.RESPONSE_DELETE_EVENT or
|
||||
response == gtk.RESPONSE_CANCEL):
|
||||
elif response == gtk.RESPONSE_CANCEL:
|
||||
dialog.close()
|
||||
break
|
||||
elif response == gtk.RESPONSE_DELETE_EVENT:
|
||||
#just stop, in ManagedWindow, delete-event is already coupled to
|
||||
#correct action.
|
||||
break
|
||||
|
||||
@@ -88,12 +88,13 @@ class StyleListDisplay(object):
|
||||
_('Document Styles') )
|
||||
|
||||
self.top.connect_signals({
|
||||
"destroy_passed_object" : self.__close,
|
||||
"destroy_passed_object" : self.__close,
|
||||
"on_ok_clicked" : self.on_ok_clicked,
|
||||
"on_add_clicked" : self.on_add_clicked,
|
||||
"on_delete_clicked" : self.on_delete_clicked,
|
||||
"on_button_press" : self.on_button_press,
|
||||
"on_edit_clicked" : self.on_edit_clicked
|
||||
"on_edit_clicked" : self.on_edit_clicked,
|
||||
"on_save_style_clicked" : dummy_callback,
|
||||
})
|
||||
|
||||
title_label = self.top.get_object('title')
|
||||
@@ -198,7 +199,12 @@ class StyleEditor(object):
|
||||
|
||||
self.top.connect_signals({
|
||||
"on_save_style_clicked" : self.on_save_style_clicked,
|
||||
"destroy_passed_object" : self.__close,
|
||||
"destroy_passed_object" : self.__close,
|
||||
"on_ok_clicked" : dummy_callback,
|
||||
"on_add_clicked" : dummy_callback,
|
||||
"on_delete_clicked" : dummy_callback,
|
||||
"on_button_press" : dummy_callback,
|
||||
"on_edit_clicked" : dummy_callback,
|
||||
})
|
||||
|
||||
self.pname = self.top.get_object('pname')
|
||||
@@ -363,3 +369,10 @@ class StyleEditor(object):
|
||||
self.current_name = store.get_value(node, 0)
|
||||
self.current_p = objs[0]
|
||||
self.draw()
|
||||
|
||||
def dummy_callback(obj):
|
||||
"""Dummy callback to satisfy gtkbuilder on connect of signals.
|
||||
There are two widgets in the glade file, although only one is needed,
|
||||
the signals of the other must be connected too
|
||||
"""
|
||||
pass
|
||||
|
||||
+10
-8
@@ -456,18 +456,20 @@ class ProbablyAlive(object):
|
||||
# If the recorded death year is before current year then
|
||||
# things are simple.
|
||||
if death_ref and death_ref.get_role().is_primary():
|
||||
death = self.db.get_event_from_handle(death_ref.ref)
|
||||
if death and death.get_date_object().get_start_date() != gen.lib.Date.EMPTY:
|
||||
death_date = death.get_date_object()
|
||||
if death_ref:
|
||||
death = self.db.get_event_from_handle(death_ref.ref)
|
||||
if death and death.get_date_object().get_start_date() != gen.lib.Date.EMPTY:
|
||||
death_date = death.get_date_object()
|
||||
|
||||
# Look for Cause Of Death, Burial or Cremation events.
|
||||
# These are fairly good indications that someone's not alive.
|
||||
if not death_date:
|
||||
for ev_ref in person.get_primary_event_ref_list():
|
||||
ev = self.db.get_event_from_handle(ev_ref.ref)
|
||||
if ev and ev.type.is_death_fallback():
|
||||
death_date = ev.get_date_object()
|
||||
explain = _("death-related evidence")
|
||||
if ev_ref:
|
||||
ev = self.db.get_event_from_handle(ev_ref.ref)
|
||||
if ev and ev.type.is_death_fallback():
|
||||
death_date = ev.get_date_object()
|
||||
explain = _("death-related evidence")
|
||||
|
||||
# If they were born within X years before current year then
|
||||
# assume they are alive (we already know they are not dead).
|
||||
@@ -838,7 +840,7 @@ def probably_alive(person, db,
|
||||
return False
|
||||
# FIXME: use match here:
|
||||
# if the current_date is before birth, not alive:
|
||||
if (birth - current_date)[0] >= 0:
|
||||
if (birth - current_date)[0] > 0:
|
||||
if return_range:
|
||||
return (False, birth, death, explain, relative)
|
||||
else:
|
||||
|
||||
+1
-1
@@ -190,7 +190,7 @@ else:
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
COPYRIGHT_MSG = u"\u00A9 2001-2006 Donald N. Allingham\n" \
|
||||
u"\u00A9 2007-2009 The Gramps Developers"
|
||||
u"\u00A9 2007-2010 The Gramps Developers"
|
||||
COMMENTS = _("Gramps (Genealogical Research and Analysis "
|
||||
"Management Programming System) is a personal "
|
||||
"genealogy program.")
|
||||
|
||||
+81
-75
@@ -1,124 +1,130 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Id$ -->
|
||||
<authors xmlns:html="http://www.w3.org/1999/xhtml">
|
||||
<author uid="rshura" title="author">
|
||||
Alex Roitman <<html:a href="mailto:shura@gramps-project.org">shura@gramps-project.org</html:a>>
|
||||
</author>
|
||||
<author uid="asleinius" title="contributor">
|
||||
Arturas Sleinius <<html:a href="mailto:asleinius@users.sourceforge.net">asleinius@users.sourceforge.net</html:a>>
|
||||
</author>
|
||||
<author uid="bmcage" title="author">
|
||||
Benny Malengier <<html:a href="mailto:benny.malengier@gramps-project.org">benny.malengier@gramps-project.org</html:a>>
|
||||
</author>
|
||||
<author uid="borilg" title="contributor">
|
||||
Boril Gourinov <<html:a href="mailto:boril.gourinov@gmail.com">boril.gourinov@gmail.com</html:a>>
|
||||
</author>
|
||||
<author uid="pez4brian" title="author">
|
||||
Brian Matherly <<html:a href="mailto:brian@gramps-project.org">brian@gramps-project.org</html:a>>
|
||||
<author uid="acraphae" title="contributor">
|
||||
Raphael Ackermann <<html:a href="mailto:raphael.ackermann@gmail.com">raphael.ackermann@gmail.com</html:a>>
|
||||
</author>
|
||||
<author uid="dallingham" title="author">
|
||||
Don Allingham <<html:a href="mailto:don@gramps-project.org">don@gramps-project.org</html:a>>
|
||||
</author>
|
||||
<author uid="dpeterso" title="author">
|
||||
Donald A. Peterson <<html:a href="mailto:"></html:a>>
|
||||
</author>
|
||||
<author uid="dsblank" title="author">
|
||||
Doug Blank <<html:a href="mailto:doug.blank@gmail.com">doug.blank@gmail.com</html:a>>
|
||||
</author>
|
||||
<author uid="eerot" title="contributor">
|
||||
Eero Tamminen <<html:a href="mailto:eerot@users.sourceforge.net">eerot@users.sourceforge.net</html:a>>
|
||||
</author>
|
||||
<author uid="erikdrgm" title="contributor">
|
||||
Erik De Richter <<html:a href="mailto:erikdrgm@users.sourceforge.net">erikdrgm@users.sourceforge.net</html:a>>
|
||||
<author uid="ander882" title="contributor">
|
||||
Craig J. Anderson <<html:a href="mailto:ander882@hotmail.com">ander882@hotmail.com</html:a>>
|
||||
</author>
|
||||
<author uid="espenbe" title="contributor">
|
||||
Espen Berg <<html:a href="mailto:espenbe@gmail.com">espenbe@gmail.com</html:a>>
|
||||
</author>
|
||||
<author uid="gburto01" title="contributor">
|
||||
Gary Burton <<html:a href="mailto:gary.burton@zen.co.uk">gary.burton@zen.co.uk</html:a>>
|
||||
<author uid="keesb" title="contributor">
|
||||
Kees Bakker <<html:a href="mailto:kees.bakker@xs4all.nl">kees.bakker@xs4all.nl</html:a>>
|
||||
</author>
|
||||
<author uid="betula" title="contributor">
|
||||
Stefan Bjork <<html:a href="mailto:betula@users.sourceforge.net">betula@users.sourceforge.net</html:a>>
|
||||
</author>
|
||||
<author uid="dsblank" title="author">
|
||||
Doug Blank <<html:a href="mailto:doug.blank@gmail.com">doug.blank@gmail.com</html:a>>
|
||||
</author>
|
||||
<author uid="gbritton" title="contributor">
|
||||
Gerald Britton <<html:a href="mailto:gerald.britton@gmail.com">gerald.britton@gmail.com</html:a>>
|
||||
</author>
|
||||
<author uid="jgsack" title="contributor">
|
||||
James G Sack <<html:a href="mailto:jgsack@san.rr.com">jgsack@san.rr.com</html:a>>
|
||||
<author uid="gburto01" title="contributor">
|
||||
Gary Burton <<html:a href="mailto:gary.burton@zen.co.uk">gary.burton@zen.co.uk</html:a>>
|
||||
</author>
|
||||
<author uid="has_no_svn_access" title="contributor">
|
||||
Janne Kovesjärvi <<html:a href="mailto:janne.kovesjarvi@gmail.com">janne.kovesjarvi@gmail.com</html:a>>
|
||||
</author>
|
||||
<author uid="has_no_svn_access" title="contributor">
|
||||
Jason Simanek <<html:a href="mailto:jsimanek@gmail.com">jsimanek@gmail.com</html:a>>
|
||||
</author>
|
||||
<author uid="romjerome" title="contributor">
|
||||
Jérôme Rapinat <<html:a href="mailto:romjerome@yahoo.fr">romjerome@yahoo.fr</html:a>>
|
||||
<author uid="s_charette" title="contributor">
|
||||
Stéphane Charette <<html:a href="mailto:stephanecharette@gmail.com">stephanecharette@gmail.com</html:a>>
|
||||
</author>
|
||||
<author uid="jcreus" title="contributor">
|
||||
Joan Creus <<html:a href="mailto:joan.creus@gmail.com">joan.creus@gmail.com</html:a>>
|
||||
</author>
|
||||
<author uid="josip" title="contributor">
|
||||
Josip Pisoj <<html:a href="mailto:josip@pisoj.com">josip@pisoj.com</html:a>>
|
||||
</author>
|
||||
<author uid="jsanchez" title="contributor">
|
||||
Julio Sánchez <<html:a href="mailto:julio.sanchez@gmail.com">julio.sanchez@gmail.com</html:a>>
|
||||
</author>
|
||||
<author uid="keesb" title="contributor">
|
||||
Kees Bakker <<html:a href="mailto:kees.bakker@xs4all.nl">kees.bakker@xs4all.nl</html:a>>
|
||||
</author>
|
||||
<author uid="kdorichev" title="contributor">
|
||||
Konstantin Dorichev <<html:a href="mailto:kdorichev@gmail.com">kdorichev@gmail.com</html:a>>
|
||||
</author>
|
||||
<author uid="has_no_svn_access" title="contributor">
|
||||
Lubo Vasko <<html:a href="mailto:pgval@inMail.sk">pgval@inMail.sk</html:a>>
|
||||
</author>
|
||||
<author uid="ltosky" title="contributor">
|
||||
Luigi Toscano <<html:a href="mailto:luigi.toscano@tiscali.it">luigi.toscano@tiscali.it</html:a>>
|
||||
</author>
|
||||
<author uid="has_no_svn_access" title="contributor">
|
||||
Luiz Gonzaga dos Santos Filho <<html:a href="mailto:lfilho@gmail.com">lfilho@gmail.com</html:a>>
|
||||
</author>
|
||||
<author uid="zfoldvar" title="contributor">
|
||||
Zsolt Foldvari <<html:a href="mailto:zfoldvar@users.sourceforge.net">zfoldvar@users.sourceforge.net</html:a>>
|
||||
</author>
|
||||
<author uid="borilg" title="contributor">
|
||||
Boril Gourinov <<html:a href="mailto:boril.gourinov@gmail.com">boril.gourinov@gmail.com</html:a>>
|
||||
</author>
|
||||
<author uid="nick-h" title="contributor">
|
||||
Nick Hall <<html:a href="mailto:nick__hall@hotmail.com">nick__hall@hotmail.com</html:a>>
|
||||
</author>
|
||||
<author uid="matlas" title="contributor">
|
||||
Zdeněk Hataš <<html:a href="mailto:zdenek.hatas@gmail.com">zdenek.hatas@gmail.com</html:a>>
|
||||
</author>
|
||||
<author uid="loshawlos" title="author">
|
||||
Martin Hawlisch <<html:a href="mailto:martin.hawlisch@gmx.de">martin.hawlisch@gmx.de</html:a>>
|
||||
</author>
|
||||
<author uid="robhealey1" title="author">
|
||||
Rob G. Healey <<html:a href="mailto:robhealey1@gmail.com">robhealey1@gmail.com</html:a>>
|
||||
</author>
|
||||
<author uid="has_no_svn_access" title="contributor">
|
||||
Łukasz Rymarczyk <<html:a href="mailto:yenidai@poczta.onet.pl">yenidai@poczta.onet.pl</html:a>>
|
||||
Morten Bo Johansen <<html:a href="mailto:mbj@spamcop.net">mbj@spamcop.net</html:a>>
|
||||
</author>
|
||||
<author uid="has_no_svn_access" title="contributor">
|
||||
Janne Kovesjärvi <<html:a href="mailto:janne.kovesjarvi@gmail.com">janne.kovesjarvi@gmail.com</html:a>>
|
||||
</author>
|
||||
<author uid="leonhaeuser" title="contributor">
|
||||
Mirko Leonhäuser <<html:a href="mailto:mirko@leonhaeuser.de">mirko@leonhaeuser.de</html:a>>
|
||||
</author>
|
||||
<author uid="has_no_svn_access" title="contributor">
|
||||
Morten Bo Johansen <<html:a href="mailto:mbj@spamcop.net">mbj@spamcop.net</html:a>>
|
||||
</author>
|
||||
<author uid="loshawlos" title="author">
|
||||
Martin Hawlisch <<html:a href="mailto:martin.hawlisch@gmx.de">martin.hawlisch@gmx.de</html:a>>
|
||||
Sigmund Lorentsen <<html:a href="mailto:sigmund.lorentsen@tele2.no">sigmund.lorentsen@tele2.no</html:a>>
|
||||
</author>
|
||||
<author uid="ldnp" title="contributor">
|
||||
Peter Landgren <<html:a href="mailto:peter.talken@telia.com">peter.talken@telia.com</html:a>>
|
||||
</author>
|
||||
<author uid="acraphae" title="contributor">
|
||||
Raphael Ackermann <<html:a href="mailto:raphael.ackermann@gmail.com">raphael.ackermann@gmail.com</html:a>>
|
||||
<author uid="bmcage" title="author">
|
||||
Benny Malengier <<html:a href="mailto:benny.malengier@gramps-project.org">benny.malengier@gramps-project.org</html:a>>
|
||||
</author>
|
||||
<author uid="hippy" title="author">
|
||||
Richard Taylor <<html:a href="mailto:rjt-gramps@thegrindstone.me.uk">rjt-gramps@thegrindstone.me.uk</html:a>>
|
||||
<author uid="pez4brian" title="author">
|
||||
Brian Matherly <<html:a href="mailto:brian@gramps-project.org">brian@gramps-project.org</html:a>>
|
||||
</author>
|
||||
<author uid="noirauds" title="contributor">
|
||||
Serge Noiraud <<html:a href="mailto:Serge.Noiraud@free.fr">Serge.Noiraud@free.fr</html:a>>
|
||||
</author>
|
||||
<author uid="dpeterso" title="author">
|
||||
Donald A. Peterson <<html:a href="mailto:"></html:a>>
|
||||
</author>
|
||||
<author uid="josip" title="contributor">
|
||||
Josip Pisoj <<html:a href="mailto:josip@pisoj.com">josip@pisoj.com</html:a>>
|
||||
</author>
|
||||
<author uid="romjerome" title="contributor">
|
||||
Jérôme Rapinat <<html:a href="mailto:romjerome@yahoo.fr">romjerome@yahoo.fr</html:a>>
|
||||
</author>
|
||||
<author uid="erikdrgm" title="contributor">
|
||||
Erik De Richter <<html:a href="mailto:erikdrgm@users.sourceforge.net">erikdrgm@users.sourceforge.net</html:a>>
|
||||
</author>
|
||||
<author uid="rshura" title="author">
|
||||
Alex Roitman <<html:a href="mailto:shura@gramps-project.org">shura@gramps-project.org</html:a>>
|
||||
</author>
|
||||
<author uid="has_no_svn_access" title="contributor">
|
||||
Sigmund Lorentsen <<html:a href="mailto:sigmund.lorentsen@tele2.no">sigmund.lorentsen@tele2.no</html:a>>
|
||||
Łukasz Rymarczyk <<html:a href="mailto:yenidai@poczta.onet.pl">yenidai@poczta.onet.pl</html:a>>
|
||||
</author>
|
||||
<author uid="betula" title="contributor">
|
||||
Stefan Bjork <<html:a href="mailto:betula@users.sourceforge.net">betula@users.sourceforge.net</html:a>>
|
||||
<author uid="jgsack" title="contributor">
|
||||
James G Sack <<html:a href="mailto:jgsack@san.rr.com">jgsack@san.rr.com</html:a>>
|
||||
</author>
|
||||
<author uid="s_charette" title="contributor">
|
||||
Stéphane Charette <<html:a href="mailto:stephanecharette@gmail.com">stephanecharette@gmail.com</html:a>>
|
||||
<author uid="jsanchez" title="contributor">
|
||||
Julio Sánchez <<html:a href="mailto:julio.sanchez@gmail.com">julio.sanchez@gmail.com</html:a>>
|
||||
</author>
|
||||
<author uid="simanek" title="contributor">
|
||||
Jason Simanek <<html:a href="mailto:jsimanek@gmail.com">jsimanek@gmail.com</html:a>>
|
||||
</author>
|
||||
<author uid="asleinius" title="contributor">
|
||||
Arturas Sleinius <<html:a href="mailto:asleinius@users.sourceforge.net">asleinius@users.sourceforge.net</html:a>>
|
||||
</author>
|
||||
<author uid="eerot" title="contributor">
|
||||
Eero Tamminen <<html:a href="mailto:eerot@users.sourceforge.net">eerot@users.sourceforge.net</html:a>>
|
||||
</author>
|
||||
<author uid="hippy" title="author">
|
||||
Richard Taylor <<html:a href="mailto:rjt-gramps@thegrindstone.me.uk">rjt-gramps@thegrindstone.me.uk</html:a>>
|
||||
</author>
|
||||
<author uid="ltosky" title="contributor">
|
||||
Luigi Toscano <<html:a href="mailto:luigi.toscano@tiscali.it">luigi.toscano@tiscali.it</html:a>>
|
||||
</author>
|
||||
<author uid="has_no_svn_access" title="contributor">
|
||||
Lubo Vasko <<html:a href="mailto:pgval@inMail.sk">pgval@inMail.sk</html:a>>
|
||||
</author>
|
||||
<author uid="twaugh" title="author">
|
||||
Tim Waugh <<html:a href="mailto:twaugh@redhat.com">twaugh@redhat.com</html:a>>
|
||||
</author>
|
||||
<author uid="matlas" title="contributor">
|
||||
Zdeněk Hataš <<html:a href="mailto:zdenek.hatas@gmail.com">zdenek.hatas@gmail.com</html:a>>
|
||||
</author>
|
||||
<author uid="robhealey1" title="author">
|
||||
Rob G. Healey <<html:a href="mailto:robhealey1@gmail.com">robhealey1@gmail.com</html:a>>
|
||||
</author>
|
||||
<author uid="zfoldvar" title="contributor">
|
||||
Zsolt Foldvari <<html:a href="mailto:zfoldvar@users.sourceforge.net">zfoldvar@users.sourceforge.net</html:a>>
|
||||
</author>
|
||||
</authors>
|
||||
|
||||
+12
-5
@@ -193,6 +193,9 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
|
||||
|
||||
# 3. Special signal for change in home person
|
||||
__signals__['home-person-changed'] = None
|
||||
|
||||
# 4. Signal for change in person group name, parameters are
|
||||
__signals__['person-groupname-rebuild'] = (unicode, unicode)
|
||||
|
||||
def __init__(self):
|
||||
"""Create a new GrampsDB."""
|
||||
@@ -1265,13 +1268,17 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
|
||||
if not self.readonly:
|
||||
# Start transaction
|
||||
with BSDDBTxn(self.env, self.name_group) as txn:
|
||||
name = str(name)
|
||||
data = txn.get(name)
|
||||
sname = str(name)
|
||||
data = txn.get(sname)
|
||||
if data is not None:
|
||||
txn.delete(name)
|
||||
txn.delete(sname)
|
||||
if group is not None:
|
||||
txn.put(name, group)
|
||||
self.emit('person-rebuild')
|
||||
txn.put(sname, group)
|
||||
if group == None:
|
||||
grouppar = u''
|
||||
else:
|
||||
grouppar = group
|
||||
self.emit('person-groupname-rebuild', (name, grouppar))
|
||||
|
||||
def sort_surname_list(self):
|
||||
self.surname_list.sort(key=locale.strxfrm)
|
||||
|
||||
+7
-1
@@ -55,7 +55,13 @@ class Name(SecondaryObject, PrivacyBase, SourceBase, NoteBase, DateBase):
|
||||
FN = 4 # first name
|
||||
|
||||
def __init__(self, source=None, data=None):
|
||||
"""Create a new Name instance, copying from the source if provided."""
|
||||
"""Create a new Name instance, copying from the source if provided.
|
||||
We should connect here to 'person-groupname-rebuild' and do something
|
||||
correct when first parameter is the name, and second parameter is
|
||||
different from the group here. However, that would be complicated and
|
||||
no real errors that cannot be ammended can be done if group is
|
||||
saved differently.
|
||||
"""
|
||||
PrivacyBase.__init__(self, source)
|
||||
SourceBase.__init__(self, source)
|
||||
NoteBase.__init__(self, source)
|
||||
|
||||
@@ -10,10 +10,12 @@
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkVBox" id="dialog-vbox2">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkVBox" id="vbox2">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="place_title">
|
||||
<property name="visible">True</property>
|
||||
@@ -242,10 +244,12 @@
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkVBox" id="dialog-vbox3">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkVBox" id="vbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="merge_title">
|
||||
<property name="visible">True</property>
|
||||
@@ -447,6 +451,7 @@
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkVBox" id="dialog-vbox4">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkTable" id="table8">
|
||||
<property name="visible">True</property>
|
||||
@@ -956,11 +961,13 @@
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkVBox" id="vbox4">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkVBox" id="vbox5">
|
||||
<property name="visible">True</property>
|
||||
<property name="border_width">12</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="people_title">
|
||||
|
||||
@@ -10,9 +10,11 @@
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkVBox" id="dialog-vbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkVBox" id="vbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="title">
|
||||
<property name="visible">True</property>
|
||||
@@ -53,6 +55,7 @@
|
||||
<child>
|
||||
<object class="GtkVButtonBox" id="vbuttonbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">10</property>
|
||||
<property name="layout_style">start</property>
|
||||
<child>
|
||||
@@ -185,9 +188,11 @@
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkVBox" id="dialog-vbox2">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkVBox" id="vbox2">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="title1">
|
||||
<property name="visible">True</property>
|
||||
@@ -277,6 +282,7 @@
|
||||
<object class="GtkVBox" id="vbox3">
|
||||
<property name="visible">True</property>
|
||||
<property name="border_width">12</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="pname">
|
||||
|
||||
@@ -762,8 +762,6 @@ class ViewManager(CLIManager):
|
||||
"""
|
||||
try:
|
||||
GrampsPreferences(self.uistate, self.dbstate)
|
||||
self._key = self.uistate.connect('nameformat-changed',
|
||||
self.active_page.build_tree)
|
||||
except Errors.WindowActiveError:
|
||||
return
|
||||
|
||||
@@ -972,6 +970,8 @@ class ViewManager(CLIManager):
|
||||
self.active_page.set_active()
|
||||
self.notebook.set_current_page(current_cat)
|
||||
self.notebook_cat[current_cat].set_current_page(current_cat_view)
|
||||
self._key = self.uistate.connect('nameformat-changed',
|
||||
self.active_page.build_tree)
|
||||
else:
|
||||
#not one single view loaded
|
||||
WarningDialog(
|
||||
|
||||
@@ -708,7 +708,7 @@ class ListView(NavigationView):
|
||||
else:
|
||||
self.dirty = True
|
||||
|
||||
def object_build(self):
|
||||
def object_build(self, *args):
|
||||
"""
|
||||
Called when the tree must be rebuilt and bookmarks redrawn.
|
||||
"""
|
||||
|
||||
@@ -516,8 +516,8 @@ class FlatBaseModel(gtk.GenericTreeModel):
|
||||
# use cursor as a context manager
|
||||
with self.gen_cursor() as cursor:
|
||||
#loop over database and store the sort field, and the handle
|
||||
return sorted( (conv_unicode_tosrtkey_ongtk(self.sort_func(data)),
|
||||
key) for key, data in cursor )
|
||||
return sorted((map(conv_unicode_tosrtkey_ongtk,
|
||||
self.sort_func(data)), key) for key, data in cursor)
|
||||
|
||||
def _rebuild_search(self, ignore=None):
|
||||
""" function called when view must be build, given a search text
|
||||
@@ -584,7 +584,8 @@ class FlatBaseModel(gtk.GenericTreeModel):
|
||||
Row is only added if search/filter data is such that it must be shown
|
||||
"""
|
||||
data = self.map(handle)
|
||||
insert_val = (conv_unicode_tosrtkey_ongtk(self.sort_func(data)), handle)
|
||||
insert_val = (map(conv_unicode_tosrtkey_ongtk, self.sort_func(data)),
|
||||
handle)
|
||||
if not self.search or \
|
||||
(self.search and self.search.match(handle, self.db)):
|
||||
#row needs to be added to the model
|
||||
@@ -602,7 +603,8 @@ class FlatBaseModel(gtk.GenericTreeModel):
|
||||
"""
|
||||
self.clear_cache(handle)
|
||||
data = self.map(handle)
|
||||
delete_val = (conv_unicode_tosrtkey_ongtk(self.sort_func(data)), handle)
|
||||
delete_val = (map(conv_unicode_tosrtkey_ongtk, self.sort_func(data)),
|
||||
handle)
|
||||
delete_path = self.node_map.delete(delete_val)
|
||||
#delete_path is an integer from 0 to n-1
|
||||
if delete_path is not None:
|
||||
@@ -614,7 +616,7 @@ class FlatBaseModel(gtk.GenericTreeModel):
|
||||
"""
|
||||
self.clear_cache(handle)
|
||||
oldsortkey = self.node_map.get_sortkey(handle)
|
||||
newsortkey = conv_unicode_tosrtkey_ongtk(self.sort_func(self.map(
|
||||
newsortkey = map(conv_unicode_tosrtkey_ongtk, self.sort_func(self.map(
|
||||
handle)))
|
||||
if oldsortkey is None or oldsortkey != newsortkey:
|
||||
#or the changed object is not present in the view due to filtering
|
||||
|
||||
@@ -178,7 +178,7 @@ class PeopleBaseModel(object):
|
||||
def sort_name(self, data):
|
||||
n = Name()
|
||||
n.unserialize(data[COLUMN_NAME])
|
||||
return name_displayer.sort_string(n)
|
||||
return (n.get_group_name(), n.get_first_name())
|
||||
|
||||
def column_name(self, data):
|
||||
handle = data[0]
|
||||
|
||||
@@ -85,7 +85,7 @@ class Node(object):
|
||||
def __init__(self, ref, parent, sortkey, handle):
|
||||
self.name = sortkey
|
||||
if sortkey:
|
||||
self.sortkey = conv_unicode_tosrtkey_ongtk(sortkey)
|
||||
self.sortkey = map(conv_unicode_tosrtkey_ongtk, sortkey)
|
||||
else:
|
||||
self.sortkey = None
|
||||
self.ref = ref
|
||||
|
||||
@@ -5,6 +5,7 @@ SUBDIRS =
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/images/16x16
|
||||
|
||||
dist_pkgdata_DATA = \
|
||||
geo-fixed-zoom.png \
|
||||
gramps-address.png \
|
||||
gramps-attribute.png \
|
||||
gramps-bookmark-delete.png \
|
||||
|
||||
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 816 B |
@@ -19,10 +19,12 @@ dist_pkgdata_DATA = \
|
||||
gramps-bookmark-edit.png \
|
||||
gramps-bookmark-new.png \
|
||||
gramps-bookmark.png \
|
||||
gramps-config.png \
|
||||
gramps-date-edit.png \
|
||||
gramps-date.png \
|
||||
gramps-event.png \
|
||||
gramps-family.png \
|
||||
gramps-fanchart.png \
|
||||
gramps-font-bgcolor.png \
|
||||
gramps-font-color.png \
|
||||
gramps-font.png \
|
||||
@@ -50,6 +52,7 @@ dist_pkgdata_DATA = \
|
||||
gramps-tree-list.png \
|
||||
gramps-tree-select.png \
|
||||
gramps-unlock.png \
|
||||
gramps-view.png \
|
||||
gramps-viewmedia.png \
|
||||
gramps-zoom-best-fit.png \
|
||||
gramps-zoom-fit-width.png \
|
||||
|
||||
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 895 B |
@@ -5,7 +5,6 @@ SUBDIRS =
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/images/scalable
|
||||
|
||||
dist_pkgdata_DATA = \
|
||||
geo-place-add.svg
|
||||
geo-fixed-zoom.svg \
|
||||
geo-free-zoom.svg \
|
||||
geo-place-add.svg \
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/mapstraction
|
||||
|
||||
dist_pkgdata_DATA = \
|
||||
mapstraction.js
|
||||
mapstraction.js \
|
||||
crosshairs.png
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -899,12 +899,24 @@ class BookReportSelector(ManagedWindow.ManagedWindow):
|
||||
item.get_name(),
|
||||
item.get_translated_name(),
|
||||
self.track)
|
||||
response = item_dialog.window.run()
|
||||
if response == gtk.RESPONSE_OK:
|
||||
subject = _get_subject(option_class, self.db)
|
||||
self.book_model.model.set_value(the_iter, 2, subject)
|
||||
self.book.set_item(row, item)
|
||||
item_dialog.close()
|
||||
|
||||
while True:
|
||||
response = item_dialog.window.run()
|
||||
if response == gtk.RESPONSE_OK:
|
||||
# dialog will be closed by connect, now continue work while
|
||||
# rest of dialog is unresponsive, release when finished
|
||||
subject = _get_subject(option_class, self.db)
|
||||
self.book_model.model.set_value(the_iter, 2, subject)
|
||||
self.book.set_item(row, item)
|
||||
item_dialog.close()
|
||||
break
|
||||
elif response == gtk.RESPONSE_CANCEL:
|
||||
item_dialog.close()
|
||||
break
|
||||
elif response == gtk.RESPONSE_DELETE_EVENT:
|
||||
#just stop, in ManagedWindow, delete-event is already coupled to
|
||||
#correct action.
|
||||
break
|
||||
|
||||
def book_button_press(self, obj, event):
|
||||
"""
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2008 - 2009 Douglas S. Blank <doug.blank@gmail.com>
|
||||
# Copyright (C) 2009 B. Malengier <benny.malengier@gmail.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
register(EXPORT,
|
||||
id = "export_django",
|
||||
name = _('Django Export'),
|
||||
description = _('Django is a web framework working on a '
|
||||
'configured database'),
|
||||
version = '1.0',
|
||||
gramps_target_version= '3.2',
|
||||
status = UNSTABLE,
|
||||
export_options_title = _('Django options'),
|
||||
export_options = 'NoFilenameOptions',
|
||||
export_function = 'export_all',
|
||||
extension = "django",
|
||||
fname = "ExportDjango.py",
|
||||
)
|
||||
|
||||
@@ -1,193 +0,0 @@
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2008 - 2009 Douglas S. Blank <doug.blank@gmail.com>
|
||||
# Copyright (C) 2009 B. Malengier <benny.malengier@gmail.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
"""
|
||||
Export to the Django Models on the configured database backend
|
||||
|
||||
|
||||
"""
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
# Standard Python Modules
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
import sys
|
||||
import os
|
||||
import time
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
# Set up logging
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
import logging
|
||||
LOG = logging.getLogger(".ExportDjango")
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
# GRAMPS modules
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
import ExportOptions
|
||||
from Utils import create_id, probably_alive
|
||||
import const
|
||||
import gen.lib
|
||||
|
||||
from TransUtils import get_addon_translator
|
||||
translator = get_addon_translator(__file__)
|
||||
_ = translator.gettext
|
||||
ngettext = translator.ngettext
|
||||
|
||||
from django.conf import settings
|
||||
import web.settings as default_settings
|
||||
try:
|
||||
settings.configure(default_settings)
|
||||
except RuntimeError:
|
||||
# already configured; ignore
|
||||
pass
|
||||
|
||||
from web.libdjango import DjangoInterface
|
||||
|
||||
def export_all(database, filename, option_box=None, callback=None):
|
||||
if not callable(callback):
|
||||
callback = lambda (percent): None # dummy
|
||||
|
||||
start = time.time()
|
||||
total = (database.get_number_of_notes() +
|
||||
database.get_number_of_people() +
|
||||
database.get_number_of_events() +
|
||||
database.get_number_of_families() +
|
||||
database.get_number_of_repositories() +
|
||||
database.get_number_of_places() +
|
||||
database.get_number_of_media_objects() +
|
||||
database.get_number_of_sources()) * 2 # steps
|
||||
count = 0.0
|
||||
dji = DjangoInterface()
|
||||
dji.clear_tables("primary", "secondary", "ref")
|
||||
|
||||
for step in [0, 1]:
|
||||
LOG.debug("Exporting Step %d..." % (step + 1))
|
||||
# ---------------------------------
|
||||
# Person
|
||||
# ---------------------------------
|
||||
for person_handle in database.person_map.keys():
|
||||
data = database.person_map[person_handle]
|
||||
if step == 0:
|
||||
dji.add_person(data)
|
||||
elif step == 1:
|
||||
djperson = dji.add_person_detail(data)
|
||||
djperson.probably_alive = not bool(djperson.death)
|
||||
djperson.save()
|
||||
count += 1
|
||||
callback(100 * count/total)
|
||||
|
||||
# ---------------------------------
|
||||
# Notes
|
||||
# ---------------------------------
|
||||
for note_handle in database.note_map.keys():
|
||||
data = database.note_map[note_handle]
|
||||
if step == 0:
|
||||
dji.add_note(data)
|
||||
count += 1
|
||||
callback(100 * count/total)
|
||||
|
||||
# ---------------------------------
|
||||
# Family
|
||||
# ---------------------------------
|
||||
for family_handle in database.family_map.keys():
|
||||
data = database.family_map[family_handle]
|
||||
if step == 0:
|
||||
dji.add_family(data)
|
||||
elif step == 1:
|
||||
dji.add_family_detail(data)
|
||||
count += 1
|
||||
callback(100 * count/total)
|
||||
|
||||
# ---------------------------------
|
||||
# Source
|
||||
# ---------------------------------
|
||||
for source_handle in database.source_map.keys():
|
||||
data = database.source_map[source_handle]
|
||||
if step == 0:
|
||||
dji.add_source(data)
|
||||
elif step == 1:
|
||||
dji.add_source_detail(data)
|
||||
count += 1
|
||||
callback(100 * count/total)
|
||||
|
||||
# ---------------------------------
|
||||
# Event
|
||||
# ---------------------------------
|
||||
for event_handle in database.event_map.keys():
|
||||
data = database.event_map[event_handle]
|
||||
if step == 0:
|
||||
dji.add_event(data)
|
||||
elif step == 1:
|
||||
dji.add_event_detail(data)
|
||||
count += 1
|
||||
callback(100 * count/total)
|
||||
|
||||
# ---------------------------------
|
||||
# Repository
|
||||
# ---------------------------------
|
||||
for repository_handle in database.repository_map.keys():
|
||||
data = database.repository_map[repository_handle]
|
||||
if step == 0:
|
||||
dji.add_repository(data)
|
||||
elif step == 1:
|
||||
dji.add_repository_detail(data)
|
||||
count += 1
|
||||
callback(100 * count/total)
|
||||
|
||||
# ---------------------------------
|
||||
# Place
|
||||
# ---------------------------------
|
||||
for place_handle in database.place_map.keys():
|
||||
data = database.place_map[place_handle]
|
||||
if step == 0:
|
||||
dji.add_place(data)
|
||||
elif step == 1:
|
||||
dji.add_place_detail(data)
|
||||
count += 1
|
||||
callback(100 * count/total)
|
||||
|
||||
# ---------------------------------
|
||||
# Media
|
||||
# ---------------------------------
|
||||
for media_handle in database.media_map.keys():
|
||||
data = database.media_map[media_handle]
|
||||
if step == 0:
|
||||
dji.add_media(data)
|
||||
elif step == 1:
|
||||
dji.add_media_detail(data)
|
||||
count += 1
|
||||
callback(100 * count/total)
|
||||
|
||||
total_time = time.time() - start
|
||||
msg = ngettext('Export Complete: %d second','Export Complete: %d seconds', total_time ) % total_time
|
||||
LOG.debug(msg)
|
||||
return True
|
||||
|
||||
class NoFilenameOptions(ExportOptions.WriterOptionBox):
|
||||
no_fileselect = True
|
||||
|
||||
@@ -8,7 +8,6 @@ pkgdatadir = $(datadir)/@PACKAGE@/plugins/export
|
||||
pkgdata_PYTHON = \
|
||||
export.gpr.py \
|
||||
ExportCsv.py \
|
||||
ExportDjango.py \
|
||||
ExportFtree.py \
|
||||
ExportGedcom.py \
|
||||
ExportGeneWeb.py \
|
||||
|
||||
@@ -542,6 +542,7 @@ class FanChartWidget(gtk.Widget):
|
||||
text, person, parents, child = self.data[generation][selected]
|
||||
if person and self.context_popup_callback:
|
||||
self.context_popup_callback(widget, event, person.handle)
|
||||
return True
|
||||
self.queue_draw()
|
||||
return True
|
||||
|
||||
|
||||
@@ -35,9 +35,19 @@ class FAQGramplet(Gramplet):
|
||||
def init(self):
|
||||
self.set_use_markup(True)
|
||||
self.clear_text()
|
||||
self.render_text("Draft of a <a wiki='FAQ'>Frequently Asked Questions</a> Gramplet\n\n")
|
||||
self.render_text(" 1. <a href='http://bugs.gramps-project.org/'>Test 1</a>\n")
|
||||
self.render_text(" 2. <a href='http://gramps-project.org//'>Test 2</a>\n")
|
||||
self.render_text(_("<a wiki='Gramps_3.2_Wiki_Manual_-_FAQ'>Frequently Asked Questions</a> (need connection to internet)\n\n"))
|
||||
self.render_text(_(" 1. <a wiki='Gramps_3.2_Wiki_Manual_-_FAQ#How_do_I_change_the_order_of_spouses.3F'>How do I change the order of spouses?</a>\n"))
|
||||
self.render_text(_(" 2. <a wiki='Gramps_3.2_Wiki_Manual_-_FAQ#How_do_I_upgrade_GRAMPS.3F'>Is it necessary to update Gramps every time an update is released?</a>\n"))
|
||||
self.render_text(_(" 3. <a wiki='Gramps_3.2_Wiki_Manual_-_FAQ#How_do_I_keep_backups.3F'>How do I make backups safely?</a>\n"))
|
||||
self.render_text(_(" 4. <a wiki='Gramps_3.2_Wiki_Manual_-_Entering_and_Editing_Data:_Detailed_-_part_1#Editing_Information_About_Relationships'>How should information about marriages be entered?</a>\n"))
|
||||
self.render_text(_(" 5. <a wiki='Gramps_3.2_Wiki_Manual_-_FAQ#What_is_the_difference_between_a_residence_and_an_address.3F'>What's the difference between a residence and an address?</a>\n"))
|
||||
self.render_text(_(" 6. <a wiki='Gramps_3.2_Wiki_Manual_-_FAQ#How_can_I_publish_web_sites_generated_by_GRAMPS.3F'>How can I make a website with Gramps and my tree?</a>\n"))
|
||||
self.render_text(_(" 7. <a href='http://old.nabble.com/German-translation-of-%22occupation%22-ts21786114.html#a21786114'>How do I record one's occupation?</a>\n"))
|
||||
self.render_text(_(" 8. <a wiki='Gramps_3.2_Wiki_Manual_-_FAQ#What_do_I_do_if_I_have_found_a_bug.3F'>What do I do if I have found a bug?</a>\n"))
|
||||
self.render_text(_(" 9. <a wiki='Portal:Using_GRAMPS'>Is there a manual for Gramps?</a>\n"))
|
||||
self.render_text(_(" 10. <a wiki='Category:Tutorials'>Are there tutorials available?</a>\n"))
|
||||
self.render_text(_(" 11. <a wiki='Category:How_do_I...'>How do I ...?</a>\n"))
|
||||
self.render_text(_(" 12. <a wiki='How_you_can_help'>How can I help with Gramps?</a>\n"))
|
||||
|
||||
def post_init(self):
|
||||
self.disconnect("active-changed")
|
||||
|
||||
@@ -16,7 +16,7 @@ pkgdata_PYTHON = \
|
||||
GivenNameGramplet.py \
|
||||
gramplet.gpr.py \
|
||||
PedigreeGramplet.py \
|
||||
PluginManagerGramplet.py\
|
||||
PluginManagerGramplet.py\
|
||||
QuickViewGramplet.py \
|
||||
RelativeGramplet.py \
|
||||
SessionLogGramplet.py \
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
register(GRAMPLET,
|
||||
id="Age on Date Gramplet",
|
||||
name=_("Age on Date Gramplet"),
|
||||
description = _("Gramplet showing ages of living people on a specific date"),
|
||||
version="2.0.0",
|
||||
gramps_target_version="3.2",
|
||||
status = STABLE,
|
||||
@@ -40,6 +41,7 @@ register(GRAMPLET,
|
||||
register(GRAMPLET,
|
||||
id = "Age Stats Gramplet",
|
||||
name = _("Age Stats Gramplet"),
|
||||
description = _("Gramplet showing graphs of various ages"),
|
||||
status = STABLE,
|
||||
fname="AgeStats.py",
|
||||
height=100,
|
||||
@@ -55,6 +57,7 @@ register(GRAMPLET,
|
||||
register(GRAMPLET,
|
||||
id="Attributes Gramplet",
|
||||
name=_("Attributes Gramplet"),
|
||||
description = _("Gramplet showing active person's attributes"),
|
||||
status = STABLE,
|
||||
fname="AttributesGramplet.py",
|
||||
height=150,
|
||||
@@ -70,6 +73,7 @@ register(GRAMPLET,
|
||||
register(GRAMPLET,
|
||||
id="Calendar Gramplet",
|
||||
name=_("Calendar Gramplet"),
|
||||
description = _("Gramplet showing calendar and events on specific dates in history"),
|
||||
status = STABLE,
|
||||
fname="CalendarGramplet.py",
|
||||
height=200,
|
||||
@@ -82,6 +86,7 @@ register(GRAMPLET,
|
||||
register(GRAMPLET,
|
||||
id = "Descendant Gramplet",
|
||||
name=_("Descendant Gramplet"),
|
||||
description = _("Gramplet showing active person's descendants"),
|
||||
status = STABLE,
|
||||
fname="DescendGramplet.py",
|
||||
height=100,
|
||||
@@ -97,6 +102,7 @@ register(GRAMPLET,
|
||||
register(GRAMPLET,
|
||||
id= "Fan Chart Gramplet",
|
||||
name=_("Fan Chart Gramplet"),
|
||||
description = _("Gramplet showing active person's direct ancestors as a fanchart"),
|
||||
status = STABLE,
|
||||
fname="FanChartGramplet.py",
|
||||
height=430,
|
||||
@@ -112,6 +118,7 @@ register(GRAMPLET,
|
||||
register(GRAMPLET,
|
||||
id="FAQ Gramplet",
|
||||
name=_("FAQ Gramplet"),
|
||||
description = _("Gramplet showing frequently asked questions"),
|
||||
status = STABLE,
|
||||
fname="FaqGramplet.py",
|
||||
height=300,
|
||||
@@ -124,6 +131,7 @@ register(GRAMPLET,
|
||||
register(GRAMPLET,
|
||||
id= "Given Name Cloud Gramplet",
|
||||
name=_("Given Name Cloud Gramplet"),
|
||||
description = _("Gramplet showing all given names as a text cloud"),
|
||||
status = STABLE,
|
||||
fname="GivenNameGramplet.py",
|
||||
height=300,
|
||||
@@ -137,6 +145,7 @@ register(GRAMPLET,
|
||||
register(GRAMPLET,
|
||||
id="Pedigree Gramplet",
|
||||
name=_("Pedigree Gramplet"),
|
||||
description = _("Gramplet showing active person's ancestors"),
|
||||
status = STABLE,
|
||||
fname="PedigreeGramplet.py",
|
||||
height=300,
|
||||
@@ -152,6 +161,7 @@ register(GRAMPLET,
|
||||
register(GRAMPLET,
|
||||
id="Plugin Manager Gramplet",
|
||||
name=_("Plugin Manager Gramplet"),
|
||||
description = _("Gramplet showing available third-party plugins (addons)"),
|
||||
status = STABLE,
|
||||
fname="PluginManagerGramplet.py",
|
||||
height=300,
|
||||
@@ -165,6 +175,7 @@ register(GRAMPLET,
|
||||
register(GRAMPLET,
|
||||
id="Quick View Gramplet",
|
||||
name=_("Quick View Gramplet"),
|
||||
description = _("Gramplet showing an active item Quick View"),
|
||||
status = STABLE,
|
||||
fname="QuickViewGramplet.py",
|
||||
height=300,
|
||||
@@ -180,6 +191,7 @@ register(GRAMPLET,
|
||||
register(GRAMPLET,
|
||||
id="Relatives Gramplet",
|
||||
name=_("Relatives Gramplet"),
|
||||
description = _("Gramplet showing active person's relatives"),
|
||||
status = STABLE,
|
||||
fname="RelativeGramplet.py",
|
||||
height=200,
|
||||
@@ -194,6 +206,7 @@ register(GRAMPLET,
|
||||
register(GRAMPLET,
|
||||
id="Session Log Gramplet",
|
||||
name=_("Session Log Gramplet"),
|
||||
description = _("Gramplet showing all activity for this session"),
|
||||
status = STABLE,
|
||||
fname="SessionLogGramplet.py",
|
||||
height=230,
|
||||
@@ -207,6 +220,7 @@ register(GRAMPLET,
|
||||
register(GRAMPLET,
|
||||
id="Statistics Gramplet",
|
||||
name=_("Statistics Gramplet"),
|
||||
description = _("Gramplet showing summary data of the family tree"),
|
||||
status = STABLE,
|
||||
fname="StatsGramplet.py",
|
||||
height=230,
|
||||
@@ -220,6 +234,7 @@ register(GRAMPLET,
|
||||
register(GRAMPLET,
|
||||
id= "Surname Cloud Gramplet",
|
||||
name=_("Surname Cloud Gramplet"),
|
||||
description = _("Gramplet showing all surnames as a text cloud"),
|
||||
status = STABLE,
|
||||
fname="SurnameCloudGramplet.py",
|
||||
height=300,
|
||||
@@ -233,6 +248,7 @@ register(GRAMPLET,
|
||||
register(GRAMPLET,
|
||||
id="TODO Gramplet",
|
||||
name=_("TODO Gramplet"),
|
||||
description = _("Gramplet for generic notes"),
|
||||
status = STABLE,
|
||||
fname="ToDoGramplet.py",
|
||||
height=300,
|
||||
@@ -246,6 +262,7 @@ register(GRAMPLET,
|
||||
register(GRAMPLET,
|
||||
id= "Top Surnames Gramplet",
|
||||
name=_("Top Surnames Gramplet"),
|
||||
description = _("Gramplet showing most frequent surnames in this tree"),
|
||||
status = STABLE,
|
||||
fname="TopSurnamesGramplet.py",
|
||||
height=230,
|
||||
@@ -258,6 +275,7 @@ register(GRAMPLET,
|
||||
register(GRAMPLET,
|
||||
id="Welcome Gramplet",
|
||||
name=_("Welcome Gramplet"),
|
||||
description = _("Gramplet showing a welcome message"),
|
||||
status = STABLE,
|
||||
fname="WelcomeGramplet.py",
|
||||
height=300,
|
||||
@@ -271,6 +289,7 @@ register(GRAMPLET,
|
||||
register(GRAMPLET,
|
||||
id = "What's Next Gramplet",
|
||||
name =_("What's Next Gramplet"),
|
||||
description = _("Gramplet suggesting items to research"),
|
||||
status = STABLE,
|
||||
fname="WhatsNext.py",
|
||||
height = 230,
|
||||
@@ -280,3 +299,4 @@ register(GRAMPLET,
|
||||
version="1.0.0",
|
||||
gramps_target_version="3.2",
|
||||
)
|
||||
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2008 - 2009 Douglas S. Blank <doug.blank@gmail.com>
|
||||
# Copyright (C) 2009 B. Malengier <benny.malengier@gmail.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
register(IMPORT,
|
||||
id = "import_django",
|
||||
name = _('Django Import'),
|
||||
description = _('Django is a web framework working on a '
|
||||
'configured database'),
|
||||
version = '1.0',
|
||||
gramps_target_version = '3.2',
|
||||
status = UNSTABLE,
|
||||
import_function = 'import_data',
|
||||
extension = "django",
|
||||
fname = "ImportDjango.py",
|
||||
)
|
||||
|
||||
@@ -1,195 +0,0 @@
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2008 - 2009 Douglas S. Blank <doug.blank@gmail.com>
|
||||
# Copyright (C) 2009 B. Malengier <benny.malengier@gmail.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
"""
|
||||
Import from the Django dji on the configured database backend
|
||||
|
||||
"""
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Standard Python Modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import time
|
||||
import sys
|
||||
import os
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
# Set up logging
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
import logging
|
||||
LOG = logging.getLogger(".ImportDjango")
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# GRAMPS modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import gen.lib
|
||||
from QuestionDialog import ErrorDialog
|
||||
from Utils import create_id
|
||||
import const
|
||||
|
||||
from TransUtils import get_addon_translator
|
||||
translator = get_addon_translator(__file__)
|
||||
_ = translator.gettext
|
||||
ngettext = translator.ngettext
|
||||
|
||||
from django.conf import settings
|
||||
import web.settings as default_settings
|
||||
try:
|
||||
settings.configure(default_settings)
|
||||
except:
|
||||
pass
|
||||
|
||||
from web.libdjango import DjangoInterface
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Django Reader
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class DjangoReader(object):
|
||||
def __init__(self, db, filename, callback):
|
||||
if not callable(callback):
|
||||
callback = lambda (percent): None # dummy
|
||||
self.db = db
|
||||
self.dji = DjangoInterface()
|
||||
self.filename = filename
|
||||
self.callback = callback
|
||||
self.debug = 0
|
||||
|
||||
def process(self):
|
||||
sql = None
|
||||
total = (self.dji.Note.count() +
|
||||
self.dji.Person.count() +
|
||||
self.dji.Event.count() +
|
||||
self.dji.Family.count() +
|
||||
self.dji.Repository.count() +
|
||||
self.dji.Place.count() +
|
||||
self.dji.Media.count() +
|
||||
self.dji.Source.count())
|
||||
self.trans = self.db.transaction_begin("",batch=True)
|
||||
self.db.disable_signals()
|
||||
count = 0.0
|
||||
self.t = time.time()
|
||||
|
||||
# ---------------------------------
|
||||
# Process note
|
||||
# ---------------------------------
|
||||
notes = self.dji.Note.all()
|
||||
for note in notes:
|
||||
data = self.dji.get_note(note)
|
||||
self.db.note_map[str(note.handle)] = data
|
||||
count += 1
|
||||
self.callback(100 * count/total)
|
||||
|
||||
# ---------------------------------
|
||||
# Process event
|
||||
# ---------------------------------
|
||||
events = self.dji.Event.all()
|
||||
for event in events:
|
||||
data = self.dji.get_event(event)
|
||||
self.db.event_map[str(event.handle)] = data
|
||||
count += 1
|
||||
self.callback(100 * count/total)
|
||||
|
||||
# ---------------------------------
|
||||
# Process person
|
||||
# ---------------------------------
|
||||
## Do this after Events to get the birth/death data
|
||||
people = self.dji.Person.all()
|
||||
for person in people:
|
||||
data = self.dji.get_person(person)
|
||||
self.db.person_map[str(person.handle)] = data
|
||||
count += 1
|
||||
self.callback(100 * count/total)
|
||||
|
||||
# ---------------------------------
|
||||
# Process family
|
||||
# ---------------------------------
|
||||
families = self.dji.Family.all()
|
||||
for family in families:
|
||||
data = self.dji.get_family(family)
|
||||
self.db.family_map[str(family.handle)] = data
|
||||
count += 1
|
||||
self.callback(100 * count/total)
|
||||
|
||||
# ---------------------------------
|
||||
# Process repository
|
||||
# ---------------------------------
|
||||
repositories = self.dji.Repository.all()
|
||||
for repo in repositories:
|
||||
data = self.dji.get_repository(repo)
|
||||
self.db.repository_map[str(repo.handle)] = data
|
||||
count += 1
|
||||
self.callback(100 * count/total)
|
||||
|
||||
# ---------------------------------
|
||||
# Process place
|
||||
# ---------------------------------
|
||||
places = self.dji.Place.all()
|
||||
for place in places:
|
||||
data = self.dji.get_place(place)
|
||||
self.db.place_map[str(place.handle)] = data
|
||||
count += 1
|
||||
self.callback(100 * count/total)
|
||||
|
||||
# ---------------------------------
|
||||
# Process source
|
||||
# ---------------------------------
|
||||
sources = self.dji.Source.all()
|
||||
for source in sources:
|
||||
data = self.dji.get_source(source)
|
||||
self.db.source_map[str(source.handle)] = data
|
||||
count += 1
|
||||
self.callback(100 * count/total)
|
||||
|
||||
# ---------------------------------
|
||||
# Process media
|
||||
# ---------------------------------
|
||||
media = self.dji.Media.all()
|
||||
for med in media:
|
||||
data = self.dji.get_media(med)
|
||||
self.db.media_map[str(med.handle)] = data
|
||||
count += 1
|
||||
self.callback(100 * count/total)
|
||||
|
||||
|
||||
return None
|
||||
|
||||
def cleanup(self):
|
||||
self.t = time.time() - self.t
|
||||
msg = ngettext('Import Complete: %d second','Import Complete: %d seconds', self.t ) % self.t
|
||||
self.db.transaction_commit(self.trans, _("Django import"))
|
||||
self.db.enable_signals()
|
||||
self.db.request_rebuild()
|
||||
LOG.debug(msg)
|
||||
|
||||
def import_data(db, filename, callback=None):
|
||||
g = DjangoReader(db, filename, callback)
|
||||
g.process()
|
||||
g.cleanup()
|
||||
|
||||
@@ -8,7 +8,6 @@ pkgdatadir = $(datadir)/@PACKAGE@/plugins/import
|
||||
pkgdata_PYTHON = \
|
||||
import.gpr.py \
|
||||
ImportCsv.py \
|
||||
ImportDjango.py \
|
||||
ImportGedcom.py \
|
||||
ImportGeneWeb.py \
|
||||
ImportGpkg.py \
|
||||
|
||||
@@ -120,6 +120,7 @@ class BasePersonView(ListView):
|
||||
'person-update' : self.row_update,
|
||||
'person-delete' : self.row_delete,
|
||||
'person-rebuild' : self.object_build,
|
||||
'person-groupname-rebuild' : self.object_build,
|
||||
}
|
||||
|
||||
ListView.__init__(
|
||||
|
||||
@@ -1,543 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2007 Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian 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
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id$
|
||||
|
||||
"Calculate Estimated Dates"
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
# python modules
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
from gen.ggettext import gettext as _
|
||||
import time
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
# GRAMPS modules
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
from PluginUtils import Tool, PluginWindows, MenuToolOptions
|
||||
from gen.plug.menu import BooleanOption, NumberOption, StringOption, \
|
||||
FilterOption, PersonOption, EnumeratedListOption
|
||||
import gen.lib
|
||||
import config
|
||||
from gen.display.name import displayer as name_displayer
|
||||
import Errors
|
||||
from ReportBase import ReportUtils
|
||||
from docgen import TextBufDoc
|
||||
from Simple import make_basic_stylesheet, SimpleAccess, SimpleDoc, SimpleTable
|
||||
from QuestionDialog import QuestionDialog
|
||||
from Utils import create_id, probably_alive_range
|
||||
import DateHandler
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
# Tool Classes
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class CalcEstDateOptions(MenuToolOptions):
|
||||
""" Calculate Estimated Date options """
|
||||
def __init__(self, name, person_id=None, dbstate=None):
|
||||
self.__db = dbstate.get_database()
|
||||
self.__dbstate = dbstate
|
||||
MenuToolOptions.__init__(self, name, person_id, dbstate)
|
||||
|
||||
def get_dbstate(self):
|
||||
return self.__dbstate
|
||||
|
||||
def add_menu_options(self, menu):
|
||||
|
||||
""" Add the options """
|
||||
category_name = _("Options")
|
||||
|
||||
self.__filter = FilterOption(_("Filter"), 0)
|
||||
self.__filter.set_help(_("Select filter to restrict people"))
|
||||
menu.add_option(category_name, "filter", self.__filter)
|
||||
self.__filter.connect('value-changed', self.__filter_changed)
|
||||
|
||||
self.__pid = PersonOption(_("Filter Person"))
|
||||
self.__pid.set_help(_("The center person for the filter"))
|
||||
menu.add_option(category_name, "pid", self.__pid)
|
||||
self.__pid.connect('value-changed', self.__update_filters)
|
||||
|
||||
self.__update_filters()
|
||||
|
||||
source_text = StringOption(_("Source text"),
|
||||
_("Calculated Date Estimates"))
|
||||
source_text.set_help(_("Source to remove and/or add"))
|
||||
menu.add_option(category_name, "source_text", source_text)
|
||||
|
||||
remove = BooleanOption(_("Remove previously added events, notes, and source"), True)
|
||||
remove.set_help(_("Remove calculated events, notes, and source; occurs immediately on Execute"))
|
||||
menu.add_option(category_name, "remove", remove)
|
||||
|
||||
birth = EnumeratedListOption(_("Birth"), 0)
|
||||
birth.add_item(0, _("Do not add birth events"))
|
||||
birth.add_item(1, _("Add birth events without dates"))
|
||||
birth.add_item(2, _("Add birth events with dates"))
|
||||
birth.set_help( _("Add a birth events with or without estimated dates"))
|
||||
menu.add_option(category_name, "add_birth", birth)
|
||||
|
||||
death = EnumeratedListOption(_("Death"), 0)
|
||||
death.add_item(0, _("Do not add death events"))
|
||||
death.add_item(1, _("Add death events without dates"))
|
||||
death.add_item(2, _("Add death events with dates"))
|
||||
death.set_help( _("Add death events with or without estimated dates"))
|
||||
menu.add_option(category_name, "add_death", death)
|
||||
|
||||
# -----------------------------------------------------
|
||||
num = NumberOption(_("Maximum age"),
|
||||
config.get('behavior.max-age-prob-alive'),
|
||||
0, 200)
|
||||
num.set_help(_("Maximum age that one can live to"))
|
||||
menu.add_option(category_name, "MAX_AGE_PROB_ALIVE", num)
|
||||
|
||||
num = NumberOption(_("Maximum sibling age difference"),
|
||||
config.get('behavior.max-sib-age-diff'),
|
||||
0, 200)
|
||||
num.set_help(_("Maximum age difference between siblings"))
|
||||
menu.add_option(category_name, "MAX_SIB_AGE_DIFF", num)
|
||||
|
||||
num = NumberOption(_("Average years between generations"),
|
||||
config.get('behavior.avg-generation-gap'),
|
||||
0, 200)
|
||||
num.set_help(_("Average years between two generations"))
|
||||
menu.add_option(category_name, "AVG_GENERATION_GAP", num)
|
||||
|
||||
dates = EnumeratedListOption(_("Estimated Dates"), 0)
|
||||
dates.add_item(0, _("Approximate (about)"))
|
||||
dates.add_item(1, _("Extremes (after and before)"))
|
||||
dates.set_help( _("Dates on events are either about or after/before"))
|
||||
menu.add_option(category_name, "dates", dates)
|
||||
|
||||
def __update_filters(self):
|
||||
"""
|
||||
Update the filter list based on the selected person
|
||||
"""
|
||||
gid = self.__pid.get_value()
|
||||
person = self.__db.get_person_from_gramps_id(gid)
|
||||
filter_list = ReportUtils.get_person_filters(person, False)
|
||||
self.__filter.set_filters(filter_list)
|
||||
|
||||
def __filter_changed(self):
|
||||
"""
|
||||
Handle filter change. If the filter is not specific to a person,
|
||||
disable the person option
|
||||
"""
|
||||
filter_value = self.__filter.get_value()
|
||||
if filter_value in [1, 2, 3, 4]:
|
||||
# Filters 0, 2, 3, 4 and 5 rely on the center person
|
||||
self.__pid.set_available(True)
|
||||
else:
|
||||
# The rest don't
|
||||
self.__pid.set_available(False)
|
||||
|
||||
|
||||
class CalcToolManagedWindow(PluginWindows.ToolManagedWindowBatch):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
PluginWindows.ToolManagedWindowBatch.__init__(self, *args, **kwargs)
|
||||
if self.fail: return
|
||||
self.help_page = self.add_page(_("Help"))
|
||||
self.write_to_page(self.help_page,
|
||||
_("The Calculate Estimated Dates Tool is used to add and remove "
|
||||
"birth and death events for people that are missing these "
|
||||
"events.\n\n"
|
||||
"To use:\n"
|
||||
"1. Go to the Options tab\n"
|
||||
"2. Check the [ ] Remove option to remove previous estimates\n"
|
||||
"3. Select the Add date options to date events with or without dates\n"
|
||||
"4. Click on Execute\n"
|
||||
"5. Select the people with which to add events\n"
|
||||
"6. Click on 'Add Selected Events' button to create\n\n"
|
||||
"NOTES: if you decide to make an event permanent, remove it from "
|
||||
"the Source. Otherwise, it will get removed the next time you "
|
||||
"automatically remove these events.\n\n"
|
||||
"You may have to run the tool repeatedly (without removing previous "
|
||||
"events) to add all of the events possible."))
|
||||
self.set_current_frame(_("Help"))
|
||||
|
||||
def get_title(self):
|
||||
return _("Calculate Estimated Dates")
|
||||
|
||||
def initial_frame(self):
|
||||
return _("Options")
|
||||
|
||||
def set_reselect(self):
|
||||
self.reselect = True
|
||||
|
||||
def run(self):
|
||||
BUTTONS = ((_("Select All"), self.select_all),
|
||||
(_("Select None"), self.select_none),
|
||||
(_("Toggle Selection"), self.toggle_select),
|
||||
(_("Add Selected Events"), self.apply_selection),
|
||||
)
|
||||
|
||||
if hasattr(self, "table") and self.table:
|
||||
self.reselect = False
|
||||
if self.options.handler.options_dict['remove']:
|
||||
QuestionDialog(_("Remove Events, Notes, and Source and Reselect Data"),
|
||||
_("Are you sure you want to remove previous events, notes, and source and reselect data?"),
|
||||
_("Remove and Run Select Again"),
|
||||
self.set_reselect,
|
||||
self.window)
|
||||
else:
|
||||
QuestionDialog(_("Reselect Data"),
|
||||
_("Are you sure you want to reselect data?"),
|
||||
_("Run Select Again"),
|
||||
self.set_reselect,
|
||||
self.window)
|
||||
if not self.reselect:
|
||||
return
|
||||
|
||||
current_date = gen.lib.Date()
|
||||
current_date.set_yr_mon_day(*time.localtime(time.time())[0:3])
|
||||
self.action = {}
|
||||
widget = self.add_results_frame(_("Select"))
|
||||
document = TextBufDoc(make_basic_stylesheet(), None)
|
||||
document.dbstate = self.dbstate
|
||||
document.uistate = self.uistate
|
||||
document.open("", container=widget)
|
||||
self.sdb = SimpleAccess(self.db)
|
||||
sdoc = SimpleDoc(document)
|
||||
stab = SimpleTable(self.sdb)
|
||||
self.table = stab
|
||||
stab.columns(_("Select"), _("Person"), _("Action"),
|
||||
_("Birth Date"), _("Death Date"),
|
||||
_("Evidence"), _("Relative"))
|
||||
self.results_write(_("Processing...\n"))
|
||||
self.filter_option = self.options.menu.get_option_by_name('filter')
|
||||
self.filter = self.filter_option.get_filter() # the actual filter
|
||||
people = self.filter.apply(self.db,
|
||||
self.db.iter_person_handles())
|
||||
num_people = self.db.get_number_of_people()
|
||||
source_text = self.options.handler.options_dict['source_text']
|
||||
source = None
|
||||
add_birth = self.options.handler.options_dict['add_birth']
|
||||
add_death = self.options.handler.options_dict['add_death']
|
||||
remove_old = self.options.handler.options_dict['remove']
|
||||
|
||||
self.MAX_SIB_AGE_DIFF = self.options.handler.options_dict['MAX_SIB_AGE_DIFF']
|
||||
self.MAX_AGE_PROB_ALIVE = self.options.handler.options_dict['MAX_AGE_PROB_ALIVE']
|
||||
self.AVG_GENERATION_GAP = self.options.handler.options_dict['AVG_GENERATION_GAP']
|
||||
if remove_old:
|
||||
self.trans = self.db.transaction_begin("",batch=True)
|
||||
self.db.disable_signals()
|
||||
self.results_write(_("Removing old estimations... "))
|
||||
self.progress.set_pass((_("Removing '%s'...") % source_text),
|
||||
num_people)
|
||||
for person_handle in people:
|
||||
self.progress.step()
|
||||
pupdate = 0
|
||||
person = self.db.get_person_from_handle(person_handle)
|
||||
birth_ref = person.get_birth_ref()
|
||||
if birth_ref:
|
||||
birth = self.db.get_event_from_handle(birth_ref.ref)
|
||||
source_list = birth.get_source_references()
|
||||
for source_ref in source_list:
|
||||
#print "birth handle:", source_ref
|
||||
source = self.db.get_source_from_handle(source_ref.ref)
|
||||
if source:
|
||||
#print "birth source:", source, source.get_title()
|
||||
if source.get_title() == source_text:
|
||||
person.set_birth_ref(None)
|
||||
person.remove_handle_references('Event',[birth_ref.ref])
|
||||
# remove note
|
||||
note_list = birth.get_referenced_note_handles()
|
||||
birth.remove_handle_references('Note',
|
||||
[note_handle for (obj_type, note_handle) in note_list])
|
||||
for (obj_type, note_handle) in note_list:
|
||||
self.db.remove_note(note_handle, self.trans)
|
||||
self.db.remove_event(birth_ref.ref, self.trans)
|
||||
self.db.commit_source(source, self.trans)
|
||||
pupdate = 1
|
||||
break
|
||||
death_ref = person.get_death_ref()
|
||||
if death_ref:
|
||||
death = self.db.get_event_from_handle(death_ref.ref)
|
||||
source_list = death.get_source_references()
|
||||
for source_ref in source_list:
|
||||
#print "death handle:", source_ref
|
||||
source = self.db.get_source_from_handle(source_ref.ref)
|
||||
if source:
|
||||
#print "death source:", source, source.get_title()
|
||||
if source.get_title() == source_text:
|
||||
person.set_death_ref(None)
|
||||
person.remove_handle_references('Event',[death_ref.ref])
|
||||
# remove note
|
||||
note_list = death.get_referenced_note_handles()
|
||||
birth.remove_handle_references('Note',
|
||||
[note_handle for (obj_type, note_handle) in note_list])
|
||||
for (obj_type, note_handle) in note_list:
|
||||
self.db.remove_note(note_handle, self.trans)
|
||||
self.db.remove_event(death_ref.ref, self.trans)
|
||||
self.db.commit_source(source, self.trans)
|
||||
pupdate = 1
|
||||
break
|
||||
if pupdate == 1:
|
||||
self.db.commit_person(person, self.trans)
|
||||
if source:
|
||||
self.db.remove_source(source.handle, self.trans)
|
||||
self.results_write(_("done!\n"))
|
||||
self.db.transaction_commit(self.trans, _("Removed date estimates"))
|
||||
self.db.enable_signals()
|
||||
self.db.request_rebuild()
|
||||
if add_birth or add_death:
|
||||
self.results_write(_("Selecting... \n\n"))
|
||||
self.progress.set_pass(_('Selecting...'),
|
||||
num_people)
|
||||
row = 0
|
||||
for person_handle in people:
|
||||
self.progress.step()
|
||||
person = self.db.get_person_from_handle(person_handle)
|
||||
birth_ref = person.get_birth_ref()
|
||||
death_ref = person.get_death_ref()
|
||||
add_birth_event, add_death_event = False, False
|
||||
if not birth_ref or not death_ref:
|
||||
date1, date2, explain, other = self.calc_estimates(person)
|
||||
if birth_ref:
|
||||
ev = self.db.get_event_from_handle(birth_ref.ref)
|
||||
date1 = ev.get_date_object()
|
||||
elif not birth_ref and add_birth and date1:
|
||||
if date1.match( current_date, "<"):
|
||||
add_birth_event = True
|
||||
date1.make_vague()
|
||||
else:
|
||||
date1 = gen.lib.Date()
|
||||
else:
|
||||
date1 = gen.lib.Date()
|
||||
if death_ref:
|
||||
ev = self.db.get_event_from_handle(death_ref.ref)
|
||||
date2 = ev.get_date_object()
|
||||
elif not death_ref and add_death and date2:
|
||||
if date2.match( current_date, "<"):
|
||||
add_death_event = True
|
||||
date2.make_vague()
|
||||
else:
|
||||
date2 = gen.lib.Date()
|
||||
else:
|
||||
date2 = gen.lib.Date()
|
||||
# Describe
|
||||
if add_birth_event and add_death_event:
|
||||
action = _("Add birth and death events")
|
||||
elif add_birth_event:
|
||||
action = _("Add birth event")
|
||||
elif add_death_event:
|
||||
action = _("Add death event")
|
||||
else:
|
||||
continue
|
||||
#stab.columns(_("Select"), _("Person"), _("Action"),
|
||||
# _("Birth Date"), _("Death Date"), _("Evidence"), _("Relative"))
|
||||
if add_birth == 1 and not birth_ref: # no date
|
||||
date1 = gen.lib.Date()
|
||||
if add_death == 1 and not death_ref: # no date
|
||||
date2 = gen.lib.Date()
|
||||
if person == other:
|
||||
other = None
|
||||
stab.row("checkbox",
|
||||
person,
|
||||
action,
|
||||
date1,
|
||||
date2,
|
||||
explain or "",
|
||||
other or "")
|
||||
if add_birth_event:
|
||||
stab.set_cell_markup(3, row, "<b>%s</b>" % DateHandler.displayer.display(date1))
|
||||
if add_death_event:
|
||||
stab.set_cell_markup(4, row, "<b>%s</b>" % DateHandler.displayer.display(date2))
|
||||
self.action[person.handle] = (add_birth_event, add_death_event)
|
||||
row += 1
|
||||
if row > 0:
|
||||
self.results_write(" ")
|
||||
for text, function in BUTTONS:
|
||||
self.make_button(text, function, widget)
|
||||
self.results_write("\n")
|
||||
stab.write(sdoc)
|
||||
self.results_write(" ")
|
||||
for text, function in BUTTONS:
|
||||
self.make_button(text, function, widget)
|
||||
self.results_write("\n")
|
||||
else:
|
||||
self.results_write(_("No events to be added."))
|
||||
self.results_write("\n")
|
||||
self.results_write("\n")
|
||||
self.progress.close()
|
||||
self.set_current_frame(_("Select"))
|
||||
|
||||
def make_button(self, text, function, widget):
|
||||
import gtk
|
||||
button = gtk.Button(text)
|
||||
buffer = widget.get_buffer()
|
||||
iter = buffer.get_end_iter()
|
||||
anchor = buffer.create_child_anchor(iter)
|
||||
widget.add_child_at_anchor(button, anchor)
|
||||
button.connect("clicked", function)
|
||||
button.show()
|
||||
self.results_write(" ")
|
||||
|
||||
def select_all(self, obj):
|
||||
select_col = self.table.model_index_of_column[_("Select")]
|
||||
for row in self.table.treeview.get_model():
|
||||
row[select_col] = True
|
||||
|
||||
def select_none(self, obj):
|
||||
select_col = self.table.model_index_of_column[_("Select")]
|
||||
for row in self.table.treeview.get_model():
|
||||
row[select_col] = False
|
||||
|
||||
def toggle_select(self, obj):
|
||||
select_col = self.table.model_index_of_column[_("Select")]
|
||||
for row in self.table.treeview.get_model():
|
||||
row[select_col] = not row[select_col]
|
||||
|
||||
def apply_selection(self, *args, **kwargs):
|
||||
# Do not add birth or death event if one exists, no matter what
|
||||
if self.table.treeview.get_model() is None:
|
||||
return
|
||||
self.trans = self.db.transaction_begin("",batch=True)
|
||||
self.pre_run()
|
||||
source_text = self.options.handler.options_dict['source_text']
|
||||
select_col = self.table.model_index_of_column[_("Select")]
|
||||
source = self.get_or_create_source(source_text)
|
||||
self.db.disable_signals()
|
||||
self.results_write(_("Selecting... "))
|
||||
self.progress.set_pass((_("Adding events '%s'...") % source_text),
|
||||
len(self.table.treeview.get_model()))
|
||||
count = 0
|
||||
for row in self.table.treeview.get_model():
|
||||
self.progress.step()
|
||||
select = row[select_col] # live select value
|
||||
if not select:
|
||||
continue
|
||||
pupdate = False
|
||||
index = row[0] # order put in
|
||||
row_data = self.table.get_raw_data(index)
|
||||
person = row_data[1] # check, person, action, date1, date2
|
||||
date1 = row_data[3] # date
|
||||
date2 = row_data[4] # date
|
||||
evidence = row_data[5] # evidence
|
||||
other = row_data[6] # other person
|
||||
add_birth_event, add_death_event = self.action[person.handle]
|
||||
birth_ref = person.get_birth_ref()
|
||||
death_ref = person.get_death_ref()
|
||||
if not birth_ref and add_birth_event:
|
||||
other_name = self.sdb.name(other)
|
||||
if other_name:
|
||||
explanation = _("Added birth event based on %(evidence)s, from %(name)s") % {
|
||||
'evidence' : evidence, 'name' : other_name }
|
||||
else:
|
||||
explanation = _("Added birth event based on %s") % evidence
|
||||
modifier = self.get_modifier("birth")
|
||||
birth = self.create_event(_("Estimated birth date"),
|
||||
gen.lib.EventType.BIRTH,
|
||||
date1, source, explanation, modifier)
|
||||
event_ref = gen.lib.EventRef()
|
||||
event_ref.set_reference_handle(birth.get_handle())
|
||||
person.set_birth_ref(event_ref)
|
||||
pupdate = True
|
||||
count += 1
|
||||
if not death_ref and add_death_event:
|
||||
other_name = self.sdb.name(other)
|
||||
if other_name:
|
||||
explanation = _("Added death event based on %(evidence)s, from %(person)s") % {
|
||||
'evidence' : evidence, 'person' : other_name }
|
||||
else:
|
||||
explanation = _("Added death event based on %s") % evidence
|
||||
modifier = self.get_modifier("death")
|
||||
death = self.create_event(_("Estimated death date"),
|
||||
gen.lib.EventType.DEATH,
|
||||
date2, source, explanation, modifier)
|
||||
event_ref = gen.lib.EventRef()
|
||||
event_ref.set_reference_handle(death.get_handle())
|
||||
person.set_death_ref(event_ref)
|
||||
pupdate = True
|
||||
count += 1
|
||||
if pupdate:
|
||||
self.db.commit_person(person, self.trans)
|
||||
self.results_write(_(" Done! Committing..."))
|
||||
self.results_write("\n")
|
||||
self.db.transaction_commit(self.trans, _("Add date estimates"))
|
||||
self.db.enable_signals()
|
||||
self.db.request_rebuild()
|
||||
self.results_write(_("Added %d events.") % count)
|
||||
self.results_write("\n\n")
|
||||
self.progress.close()
|
||||
|
||||
def get_modifier(self, event_type):
|
||||
setting = self.options.handler.options_dict['dates']
|
||||
if event_type == "birth":
|
||||
if setting == 0:
|
||||
return gen.lib.Date.MOD_ABOUT
|
||||
else:
|
||||
return gen.lib.Date.MOD_AFTER
|
||||
else:
|
||||
if setting == 0:
|
||||
return gen.lib.Date.MOD_ABOUT
|
||||
else:
|
||||
return gen.lib.Date.MOD_BEFORE
|
||||
|
||||
def get_or_create_source(self, source_text):
|
||||
source_list = self.db.get_source_handles()
|
||||
for source_handle in source_list:
|
||||
source = self.db.get_source_from_handle(source_handle)
|
||||
if source.get_title() == source_text:
|
||||
return source
|
||||
source = gen.lib.Source()
|
||||
source.set_title(source_text)
|
||||
self.db.add_source(source, self.trans)
|
||||
return source
|
||||
|
||||
def create_event(self, description=_("Estimated date"),
|
||||
type=None, date=None, source=None,
|
||||
note_text="", modifier=None):
|
||||
event = gen.lib.Event()
|
||||
event.set_description(description)
|
||||
note = gen.lib.Note()
|
||||
note.handle = create_id()
|
||||
note.type.set(gen.lib.NoteType.EVENT)
|
||||
note.set(note_text)
|
||||
self.db.add_note(note, self.trans)
|
||||
event.add_note(note.handle)
|
||||
if type:
|
||||
event.set_type(gen.lib.EventType(type))
|
||||
if date:
|
||||
if modifier:
|
||||
date.set_modifier(modifier)
|
||||
date.set_quality(gen.lib.Date.QUAL_ESTIMATED)
|
||||
date.set_yr_mon_day(date.get_year(), 0, 0)
|
||||
event.set_date_object(date)
|
||||
if source:
|
||||
sref = gen.lib.SourceRef()
|
||||
sref.set_reference_handle(source.get_handle())
|
||||
event.add_source_reference(sref)
|
||||
self.db.commit_source(source, self.trans)
|
||||
self.db.add_event(event, self.trans)
|
||||
return event
|
||||
|
||||
def calc_estimates(self, person):
|
||||
return probably_alive_range(person, self.db,
|
||||
self.MAX_SIB_AGE_DIFF,
|
||||
self.MAX_AGE_PROB_ALIVE,
|
||||
self.AVG_GENERATION_GAP)
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/plugins/tool
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
CalculateEstimatedDates.py \
|
||||
ChangeNames.py \
|
||||
ChangeTypes.py \
|
||||
Check.py \
|
||||
@@ -55,7 +54,6 @@ GLADEFILES = \
|
||||
soundgen.glade \
|
||||
verify.glade
|
||||
|
||||
|
||||
dist_pkgdata_DATA = $(GLADEFILES)
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
|
||||
@@ -419,6 +419,8 @@ class VerifyResults(ManagedWindow):
|
||||
|
||||
self.top.connect_signals({
|
||||
"destroy_passed_object" : self.close,
|
||||
"on_verify_ok_clicked" : self.__dummy,
|
||||
"on_help_clicked" : self.__dummy,
|
||||
})
|
||||
|
||||
self.warn_tree = self.top.get_object('warn_tree')
|
||||
@@ -492,6 +494,12 @@ class VerifyResults(ManagedWindow):
|
||||
self.window.show()
|
||||
self.window_shown = False
|
||||
|
||||
def __dummy(self, obj):
|
||||
"""dummy callback, needed because VerifyResults is in same glade file
|
||||
as Verify, so callbacks of Verify must be defined.
|
||||
"""
|
||||
pass
|
||||
|
||||
def load_ignored(self,db_filename):
|
||||
md5sum = md5(db_filename)
|
||||
self.ignores_filename = os.path.join(
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<object class="GtkVBox" id="vbox2">
|
||||
<property name="visible">True</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="title">
|
||||
<property name="visible">True</property>
|
||||
@@ -60,14 +61,14 @@ Select the names you wish Gramps to convert. </property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="button6">
|
||||
<property name="label">gtk-cancel</property>
|
||||
<object class="GtkButton" id="help">
|
||||
<property name="label">gtk-help</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<signal name="clicked" handler="destroy_passed_object" object="changenames"/>
|
||||
<signal name="clicked" handler="on_help_clicked"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -76,14 +77,14 @@ Select the names you wish Gramps to convert. </property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button5">
|
||||
<property name="label" translatable="yes">_Accept changes and close</property>
|
||||
<object class="GtkButton" id="button6">
|
||||
<property name="label">gtk-cancel</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="clicked" handler="on_ok_clicked" object="changenames"/>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<signal name="clicked" handler="destroy_passed_object" object="changenames"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -91,10 +92,27 @@ Select the names you wish Gramps to convert. </property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button5">
|
||||
<property name="label" translatable="yes">_Accept changes and close</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="clicked" handler="on_ok_clicked" object="changenames"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="padding">6</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
@@ -12,10 +12,12 @@
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkVBox" id="dialog-vbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkVBox" id="vbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="title">
|
||||
|
||||
@@ -28,10 +28,12 @@
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkVBox" id="dialog-vbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkVBox" id="vbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="title">
|
||||
|
||||
@@ -12,10 +12,12 @@
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkVBox" id="dialog-vbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkVBox" id="vbox2">
|
||||
<property name="visible">True</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="title">
|
||||
<property name="visible">True</property>
|
||||
|
||||
@@ -8,14 +8,15 @@
|
||||
<property name="default_height">300</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<property name="has_separator">False</property>
|
||||
<signal name="delete_event" handler="on_result_delete_event"/>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkVBox" id="dialog-vbox2">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkVBox" id="vbox5">
|
||||
<property name="visible">True</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="title">
|
||||
@@ -36,6 +37,7 @@
|
||||
<object class="GtkVButtonBox" id="vbuttonbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="events_box">
|
||||
<property name="label" translatable="yes">Search for events</property>
|
||||
|
||||
@@ -24,28 +24,6 @@
|
||||
GRAMPS registration file
|
||||
"""
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
# Calculate Estimated Dates
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
register(TOOL,
|
||||
id = 'calculateestimateddates',
|
||||
name = _("Calculate Estimated Dates"),
|
||||
description = _("Calculates estimated dates for birth and death."),
|
||||
version = '0.90',
|
||||
gramps_target_version = '3.2',
|
||||
status = UNSTABLE,
|
||||
fname = 'CalculateEstimatedDates.py',
|
||||
authors = ["Douglas S. Blank"],
|
||||
authors_email = ["dblank@cs.brynmawr.edu"],
|
||||
category = TOOL_DBPROC,
|
||||
toolclass = 'CalcToolManagedWindow',
|
||||
optionclass = 'CalcEstDateOptions',
|
||||
tool_modes = [TOOL_MODE_GUI]
|
||||
)
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
# Fix Capitalization of Family Names
|
||||
|
||||
@@ -7,9 +7,11 @@
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkVBox" id="dialog-vbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkVBox" id="vbox6">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="title">
|
||||
<property name="visible">True</property>
|
||||
@@ -701,10 +703,12 @@
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkVBox" id="dialog-vbox2">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkVBox" id="vbox5">
|
||||
<property name="visible">True</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="title2">
|
||||
@@ -741,6 +745,7 @@
|
||||
<child>
|
||||
<object class="GtkVBox" id="vbox7">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
|
||||
@@ -5,7 +5,7 @@ register(VIEW,
|
||||
description = _("The view showing relations through a fanchart"),
|
||||
version = '1.0',
|
||||
gramps_target_version = '3.2',
|
||||
status = UNSTABLE,
|
||||
status = STABLE,
|
||||
fname = 'fanchartview.py',
|
||||
authors = [u"Douglas S. Blank"],
|
||||
authors_email = ["doug.blank@gmail.com"],
|
||||
|
||||
@@ -558,6 +558,7 @@ class FanChartWidget(gtk.Widget):
|
||||
text, person, parents, child = self.data[generation][selected]
|
||||
if person and self.context_popup_callback:
|
||||
self.context_popup_callback(widget, event, person.handle)
|
||||
return True
|
||||
self.queue_draw()
|
||||
return True
|
||||
|
||||
|
||||
@@ -566,9 +566,12 @@ class PedigreeView(NavigationView):
|
||||
self.bookmarks.redraw()
|
||||
|
||||
def person_rebuild(self,dummy=None):
|
||||
self.format_helper.clear_cache()
|
||||
self.dirty = True
|
||||
self.rebuild_trees(self.get_active())
|
||||
if self.active:
|
||||
self.format_helper.clear_cache()
|
||||
self.dirty = True
|
||||
self.rebuild_trees(self.get_active())
|
||||
else:
|
||||
self.dirty = True
|
||||
|
||||
def request_resize(self):
|
||||
self.size_request_cb(self.notebook.parent,None,None)
|
||||
|
||||
@@ -101,6 +101,13 @@ class PlaceTreeView(PlaceBaseView):
|
||||
<menuitem action="EditBook"/>
|
||||
</placeholder>
|
||||
</menu>
|
||||
<menu action="GoMenu">
|
||||
<placeholder name="CommonGo">
|
||||
<menuitem action="Back"/>
|
||||
<menuitem action="Forward"/>
|
||||
<separator/>
|
||||
</placeholder>
|
||||
</menu>
|
||||
<menu action="EditMenu">
|
||||
<placeholder name="CommonEdit">
|
||||
<menuitem action="Add"/>
|
||||
@@ -114,6 +121,10 @@ class PlaceTreeView(PlaceBaseView):
|
||||
</menu>
|
||||
</menubar>
|
||||
<toolbar name="ToolBar">
|
||||
<placeholder name="CommonNavigation">
|
||||
<toolitem action="Back"/>
|
||||
<toolitem action="Forward"/>
|
||||
</placeholder>
|
||||
<placeholder name="CommonEdit">
|
||||
<toolitem action="Add"/>
|
||||
<toolitem action="Edit"/>
|
||||
|
||||
+48
-30
@@ -211,55 +211,72 @@ class RelationshipView(NavigationView):
|
||||
self.redraw()
|
||||
|
||||
def person_update(self, handle_list):
|
||||
person = self.get_active()
|
||||
if person:
|
||||
while not self.change_person(person):
|
||||
pass
|
||||
if self.active:
|
||||
person = self.get_active()
|
||||
if person:
|
||||
while not self.change_person(person):
|
||||
pass
|
||||
else:
|
||||
self.change_person(None)
|
||||
else:
|
||||
self.change_person(None)
|
||||
self.dirty = True
|
||||
|
||||
def person_rebuild(self):
|
||||
"""Large change to person database"""
|
||||
if self.active:
|
||||
self.bookmarks.redraw()
|
||||
person = self.get_active()
|
||||
if person:
|
||||
while not self.change_person(person):
|
||||
pass
|
||||
person = self.get_active()
|
||||
if person:
|
||||
while not self.change_person(person):
|
||||
pass
|
||||
else:
|
||||
self.change_person(None)
|
||||
else:
|
||||
self.change_person(None)
|
||||
self.dirty = True
|
||||
|
||||
def family_update(self, handle_list):
|
||||
person = self.get_active()
|
||||
if person:
|
||||
while not self.change_person(person):
|
||||
pass
|
||||
if self.active:
|
||||
person = self.get_active()
|
||||
if person:
|
||||
while not self.change_person(person):
|
||||
pass
|
||||
else:
|
||||
self.change_person(None)
|
||||
else:
|
||||
self.change_person(None)
|
||||
self.dirty = True
|
||||
|
||||
def family_add(self, handle_list):
|
||||
person = self.get_active()
|
||||
if person:
|
||||
while not self.change_person(person):
|
||||
pass
|
||||
if self.active:
|
||||
person = self.get_active()
|
||||
if person:
|
||||
while not self.change_person(person):
|
||||
pass
|
||||
else:
|
||||
self.change_person(None)
|
||||
else:
|
||||
self.change_person(None)
|
||||
self.dirty = True
|
||||
|
||||
def family_delete(self, handle_list):
|
||||
person = self.get_active()
|
||||
if person:
|
||||
while not self.change_person(person):
|
||||
pass
|
||||
if self.active:
|
||||
person = self.get_active()
|
||||
if person:
|
||||
while not self.change_person(person):
|
||||
pass
|
||||
else:
|
||||
self.change_person(None)
|
||||
else:
|
||||
self.change_person(None)
|
||||
self.dirty = True
|
||||
|
||||
def family_rebuild(self):
|
||||
person = self.get_active()
|
||||
if person:
|
||||
while not self.change_person(person):
|
||||
pass
|
||||
if self.active:
|
||||
person = self.get_active()
|
||||
if person:
|
||||
while not self.change_person(person):
|
||||
pass
|
||||
else:
|
||||
self.change_person(None)
|
||||
else:
|
||||
self.change_person(None)
|
||||
self.dirty = True
|
||||
|
||||
def change_page(self):
|
||||
NavigationView.change_page(self)
|
||||
@@ -553,6 +570,7 @@ class RelationshipView(NavigationView):
|
||||
self.uistate.modify_statusbar(self.dbstate)
|
||||
|
||||
self.order_action.set_sensitive(self.reorder_sensitive)
|
||||
self.dirty = False
|
||||
|
||||
return True
|
||||
|
||||
|
||||
@@ -4148,7 +4148,8 @@ class IndividualPage(BasePage):
|
||||
childlist = [child_ref.ref for child_ref in child_ref_list]
|
||||
sibling.update(childlist)
|
||||
|
||||
# now that we have all natural siblings, display them...
|
||||
# now that we have all siblings in families of the person,
|
||||
# display them...
|
||||
if sibling:
|
||||
trow = Html("tr") + (
|
||||
Html("td", _("Siblings"), class_ = "ColumnAttribute", inline = True)
|
||||
@@ -4177,148 +4178,159 @@ class IndividualPage(BasePage):
|
||||
# Also try to identify half-siblings
|
||||
half_siblings = set()
|
||||
|
||||
# if we have a known father...
|
||||
showallsiblings = self.report.options['showhalfsiblings']
|
||||
if father_handle and showallsiblings:
|
||||
# 1) get all of the families in which this father is involved
|
||||
# 2) get all of the children from those families
|
||||
# 3) if the children are not already listed as siblings...
|
||||
# 4) then remember those children since we're going to list them
|
||||
father = db.get_person_from_handle(father_handle)
|
||||
for family_handle in father.get_family_handle_list():
|
||||
family = db.get_family_from_handle(family_handle)
|
||||
for half_child_ref in family.get_child_ref_list():
|
||||
half_child_handle = half_child_ref.ref
|
||||
if half_child_handle not in sibling:
|
||||
if half_child_handle != self.person.handle:
|
||||
# we have a new step/half sibling
|
||||
half_siblings.add(half_child_handle)
|
||||
|
||||
# do the same thing with the mother (see "father" just above):
|
||||
if mother_handle and showallsiblings:
|
||||
mother = db.get_person_from_handle(mother_handle)
|
||||
for family_handle in mother.get_family_handle_list():
|
||||
family = db.get_family_from_handle(family_handle)
|
||||
for half_child_ref in family.get_child_ref_list():
|
||||
half_child_handle = half_child_ref.ref
|
||||
if half_child_handle not in sibling:
|
||||
if half_child_handle != self.person.handle:
|
||||
# we have a new half sibling
|
||||
half_siblings.add(half_child_handle)
|
||||
|
||||
# now that we have all half- siblings, display them...
|
||||
if half_siblings:
|
||||
trow = Html("tr") + (
|
||||
Html("td", _("Half Siblings"), class_ = "ColumnAttribute", inline = True)
|
||||
)
|
||||
table += trow
|
||||
|
||||
tcell = Html("td", class_ = "ColumnValue")
|
||||
trow += tcell
|
||||
|
||||
ordered = Html("ol")
|
||||
tcell += ordered
|
||||
|
||||
if birthorder:
|
||||
kids = sorted(add_birthdate(db, half_siblings))
|
||||
|
||||
ordered.extend(
|
||||
self.display_child_link(child_handle)
|
||||
for birth_date, child_handle in kids)
|
||||
else:
|
||||
ordered += map(self.display_child_link, half_siblings)
|
||||
|
||||
# get step-siblings
|
||||
if showallsiblings:
|
||||
step_siblings = set()
|
||||
|
||||
# to find the step-siblings, we need to identify
|
||||
# all of the families that can be linked back to
|
||||
# the current person, and then extract the children
|
||||
# from those families
|
||||
all_family_handles = set()
|
||||
all_parent_handles = set()
|
||||
tmp_parent_handles = set()
|
||||
|
||||
# first we queue up the parents we know about
|
||||
if mother_handle:
|
||||
tmp_parent_handles.add(mother_handle)
|
||||
if father_handle:
|
||||
tmp_parent_handles.add(father_handle)
|
||||
|
||||
while len(tmp_parent_handles):
|
||||
# pop the next parent from the set
|
||||
parent_handle = tmp_parent_handles.pop()
|
||||
|
||||
# add this parent to our official list
|
||||
all_parent_handles.add(parent_handle)
|
||||
|
||||
# get all families with this parent
|
||||
parent = db.get_person_from_handle(parent_handle)
|
||||
for family_handle in parent.get_family_handle_list():
|
||||
|
||||
all_family_handles.add(family_handle)
|
||||
|
||||
# we already have 1 parent from this family
|
||||
# (see "parent" above) so now see if we need
|
||||
# to queue up the other parent
|
||||
family = db.get_family_from_handle(family_handle)
|
||||
tmp_mother_handle = family.get_mother_handle()
|
||||
if tmp_mother_handle and \
|
||||
tmp_mother_handle != parent and \
|
||||
tmp_mother_handle not in tmp_parent_handles and \
|
||||
tmp_mother_handle not in all_parent_handles:
|
||||
tmp_parent_handles.add(tmp_mother_handle)
|
||||
tmp_father_handle = family.get_father_handle()
|
||||
if tmp_father_handle and \
|
||||
tmp_father_handle != parent and \
|
||||
tmp_father_handle not in tmp_parent_handles and \
|
||||
tmp_father_handle not in all_parent_handles:
|
||||
tmp_parent_handles.add(tmp_father_handle)
|
||||
|
||||
# once we get here, we have all of the families
|
||||
# that could result in step-siblings; note that
|
||||
# we can only have step-siblings if the number
|
||||
# of families involved is > 1
|
||||
|
||||
if len(all_family_handles) > 1:
|
||||
while len(all_family_handles):
|
||||
# pop the next family from the set
|
||||
family_handle = all_family_handles.pop()
|
||||
# look in this family for children we haven't yet seen
|
||||
family = db.get_family_from_handle(family_handle)
|
||||
for step_child_ref in family.get_child_ref_list():
|
||||
step_child_handle = step_child_ref.ref
|
||||
if step_child_handle not in sibling and \
|
||||
step_child_handle not in half_siblings and \
|
||||
step_child_handle != self.person.handle:
|
||||
# we have a new step sibling
|
||||
step_siblings.add(step_child_handle)
|
||||
|
||||
# now that we have all step- siblings, display them...
|
||||
if len(step_siblings):
|
||||
trow = Html("tr") + (
|
||||
Html("td", _("Step Siblings"), class_ = "ColumnAttribute", inline = True)
|
||||
)
|
||||
table += trow
|
||||
|
||||
tcell = Html("td", class_ = "ColumnValue")
|
||||
trow += tcell
|
||||
|
||||
ordered = Html("ol")
|
||||
tcell += ordered
|
||||
|
||||
if birthorder:
|
||||
kids = []
|
||||
kids = sorted(add_birthdate(db, step_siblings))
|
||||
|
||||
ordered.extend(
|
||||
self.display_child_link(child_handle)
|
||||
for birth_date, child_handle in kids)
|
||||
|
||||
else:
|
||||
ordered += map(self.display_child_link,
|
||||
step_siblings)
|
||||
## FOLLOWING CODE IS WRONG, AS showallsiblings = False
|
||||
## THIS CODE WILL NOT RUN
|
||||
## TO FIX: the code only works if the user has his
|
||||
## half/step siblings in a specific way in the database,
|
||||
## however this way is not the official way
|
||||
## The official way is:
|
||||
## 1. step or half siblings _must_ be present
|
||||
## somewhere in the same family. So the search
|
||||
## here over other families is wrong
|
||||
## 2. to determine the relationship, only the child
|
||||
## relationship must be looked at, nothing else!
|
||||
showallsiblings = False #self.report.options['showhalfsiblings']
|
||||
## # if we have a known father...
|
||||
## if father_handle and showallsiblings:
|
||||
## # 1) get all of the families in which this father is involved
|
||||
## # 2) get all of the children from those families
|
||||
## # 3) if the children are not already listed as siblings...
|
||||
## # 4) then remember those children since we're going to list them
|
||||
## father = db.get_person_from_handle(father_handle)
|
||||
## for family_handle in father.get_family_handle_list():
|
||||
## family = db.get_family_from_handle(family_handle)
|
||||
## for half_child_ref in family.get_child_ref_list():
|
||||
## half_child_handle = half_child_ref.ref
|
||||
## if half_child_handle not in sibling:
|
||||
## if half_child_handle != self.person.handle:
|
||||
## # we have a new step/half sibling
|
||||
## half_siblings.add(half_child_handle)
|
||||
##
|
||||
## # do the same thing with the mother (see "father" just above):
|
||||
## if mother_handle and showallsiblings:
|
||||
## mother = db.get_person_from_handle(mother_handle)
|
||||
## for family_handle in mother.get_family_handle_list():
|
||||
## family = db.get_family_from_handle(family_handle)
|
||||
## for half_child_ref in family.get_child_ref_list():
|
||||
## half_child_handle = half_child_ref.ref
|
||||
## if half_child_handle not in sibling:
|
||||
## if half_child_handle != self.person.handle:
|
||||
## # we have a new half sibling
|
||||
## half_siblings.add(half_child_handle)
|
||||
##
|
||||
## # now that we have all half- siblings, display them...
|
||||
## if half_siblings:
|
||||
## trow = Html("tr") + (
|
||||
## Html("td", _("Half Siblings"), class_ = "ColumnAttribute", inline = True)
|
||||
## )
|
||||
## table += trow
|
||||
##
|
||||
## tcell = Html("td", class_ = "ColumnValue")
|
||||
## trow += tcell
|
||||
##
|
||||
## ordered = Html("ol")
|
||||
## tcell += ordered
|
||||
##
|
||||
## if birthorder:
|
||||
## kids = sorted(add_birthdate(db, half_siblings))
|
||||
##
|
||||
## ordered.extend(
|
||||
## self.display_child_link(child_handle)
|
||||
## for birth_date, child_handle in kids)
|
||||
## else:
|
||||
## ordered += map(self.display_child_link, half_siblings)
|
||||
##
|
||||
## # get step-siblings
|
||||
## if showallsiblings:
|
||||
## step_siblings = set()
|
||||
##
|
||||
## # to find the step-siblings, we need to identify
|
||||
## # all of the families that can be linked back to
|
||||
## # the current person, and then extract the children
|
||||
## # from those families
|
||||
## all_family_handles = set()
|
||||
## all_parent_handles = set()
|
||||
## tmp_parent_handles = set()
|
||||
##
|
||||
## # first we queue up the parents we know about
|
||||
## if mother_handle:
|
||||
## tmp_parent_handles.add(mother_handle)
|
||||
## if father_handle:
|
||||
## tmp_parent_handles.add(father_handle)
|
||||
##
|
||||
## while len(tmp_parent_handles):
|
||||
## # pop the next parent from the set
|
||||
## parent_handle = tmp_parent_handles.pop()
|
||||
##
|
||||
## # add this parent to our official list
|
||||
## all_parent_handles.add(parent_handle)
|
||||
##
|
||||
## # get all families with this parent
|
||||
## parent = db.get_person_from_handle(parent_handle)
|
||||
## for family_handle in parent.get_family_handle_list():
|
||||
##
|
||||
## all_family_handles.add(family_handle)
|
||||
##
|
||||
## # we already have 1 parent from this family
|
||||
## # (see "parent" above) so now see if we need
|
||||
## # to queue up the other parent
|
||||
## family = db.get_family_from_handle(family_handle)
|
||||
## tmp_mother_handle = family.get_mother_handle()
|
||||
## if tmp_mother_handle and \
|
||||
## tmp_mother_handle != parent and \
|
||||
## tmp_mother_handle not in tmp_parent_handles and \
|
||||
## tmp_mother_handle not in all_parent_handles:
|
||||
## tmp_parent_handles.add(tmp_mother_handle)
|
||||
## tmp_father_handle = family.get_father_handle()
|
||||
## if tmp_father_handle and \
|
||||
## tmp_father_handle != parent and \
|
||||
## tmp_father_handle not in tmp_parent_handles and \
|
||||
## tmp_father_handle not in all_parent_handles:
|
||||
## tmp_parent_handles.add(tmp_father_handle)
|
||||
##
|
||||
## # once we get here, we have all of the families
|
||||
## # that could result in step-siblings; note that
|
||||
## # we can only have step-siblings if the number
|
||||
## # of families involved is > 1
|
||||
##
|
||||
## if len(all_family_handles) > 1:
|
||||
## while len(all_family_handles):
|
||||
## # pop the next family from the set
|
||||
## family_handle = all_family_handles.pop()
|
||||
## # look in this family for children we haven't yet seen
|
||||
## family = db.get_family_from_handle(family_handle)
|
||||
## for step_child_ref in family.get_child_ref_list():
|
||||
## step_child_handle = step_child_ref.ref
|
||||
## if step_child_handle not in sibling and \
|
||||
## step_child_handle not in half_siblings and \
|
||||
## step_child_handle != self.person.handle:
|
||||
## # we have a new step sibling
|
||||
## step_siblings.add(step_child_handle)
|
||||
##
|
||||
## # now that we have all step- siblings, display them...
|
||||
## if len(step_siblings):
|
||||
## trow = Html("tr") + (
|
||||
## Html("td", _("Step Siblings"), class_ = "ColumnAttribute", inline = True)
|
||||
## )
|
||||
## table += trow
|
||||
##
|
||||
## tcell = Html("td", class_ = "ColumnValue")
|
||||
## trow += tcell
|
||||
##
|
||||
## ordered = Html("ol")
|
||||
## tcell += ordered
|
||||
##
|
||||
## if birthorder:
|
||||
## kids = []
|
||||
## kids = sorted(add_birthdate(db, step_siblings))
|
||||
##
|
||||
## ordered.extend(
|
||||
## self.display_child_link(child_handle)
|
||||
## for birth_date, child_handle in kids)
|
||||
##
|
||||
## else:
|
||||
## ordered += map(self.display_child_link,
|
||||
## step_siblings)
|
||||
|
||||
# return parents division to its caller
|
||||
return section
|
||||
@@ -5840,11 +5852,12 @@ class NavWebOptions(MenuReportOptions):
|
||||
showparents.set_help(_('Whether to include a parents column'))
|
||||
menu.add_option(category_name, 'showparents', showparents)
|
||||
|
||||
showallsiblings = BooleanOption(_("Include half and/ or "
|
||||
"step-siblings on the individual pages"), False)
|
||||
showallsiblings.set_help(_( "Whether to include half and/ or "
|
||||
"step-siblings with the parents and siblings"))
|
||||
menu.add_option(category_name, 'showhalfsiblings', showallsiblings)
|
||||
# This is programmed wrong, remove
|
||||
#showallsiblings = BooleanOption(_("Include half and/ or "
|
||||
# "step-siblings on the individual pages"), False)
|
||||
#showallsiblings.set_help(_( "Whether to include half and/ or "
|
||||
# "step-siblings with the parents and siblings"))
|
||||
#menu.add_option(category_name, 'showhalfsiblings', showallsiblings)
|
||||
|
||||
birthorder = BooleanOption(_('Sort all children in birth order'), False)
|
||||
birthorder.set_help(_('Whether to display children in birth order'
|
||||
|
||||
@@ -55,6 +55,7 @@ log = logging.getLogger(".WebPage")
|
||||
#------------------------------------------------------------------------
|
||||
from gen.lib import date, Date, Name, Person, NameType, EventType
|
||||
import const
|
||||
import constfunc
|
||||
from ReportBase import Report, ReportUtils, MenuReportOptions, CSS_FILES
|
||||
from gen.plug.menu import BooleanOption, NumberOption, StringOption, \
|
||||
EnumeratedListOption, FilterOption, PersonOption, \
|
||||
@@ -1026,7 +1027,7 @@ class WebCalReport(Report):
|
||||
Imagine we run gramps on Windows (heaven forbits), we don't want to
|
||||
see backslashes in the URL.
|
||||
"""
|
||||
if (Utils.win):
|
||||
if (constfunc.win()):
|
||||
fname = fname.replace('\\',"/")
|
||||
subdirs = self.build_subdirs(subdir, fname)
|
||||
return (prefix or '') + "/".join(subdirs + [fname])
|
||||
|
||||
+4
-3
@@ -28,6 +28,7 @@ Provide soundex calculation
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import string
|
||||
import unicodedata
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@@ -45,11 +46,11 @@ TABLE = string.maketrans('ABCDEFGIJKLMNOPQRSTUVXYZ',
|
||||
#-------------------------------------------------------------------------
|
||||
def soundex(strval):
|
||||
"Return the soundex value to a string argument."
|
||||
|
||||
strval = strval.upper().strip()
|
||||
|
||||
strval = unicodedata.normalize('NFKD',
|
||||
strval.upper().strip()).encode('ASCII', 'ignore')
|
||||
if not strval:
|
||||
return "Z000"
|
||||
strval = strval.encode('iso-8859-1')
|
||||
str2 = strval[0]
|
||||
strval = strval.translate(TABLE, IGNORE)
|
||||
if not strval:
|
||||
|
||||
Reference in New Issue
Block a user