Merged trunk r17888 through r18397 into geps023.
Conflicts resolved in: /data/grampsxml.dtd /data/grampsxml.rng /src/Filters/Rules/Repository/_MatchesNameSubstringOf.py /src/plugins/import/ImportXml.py (Various property conflicts also resolved) svn: r18405
This commit is contained in:
commit
3adb1b7ffa
10
NEWS
10
NEWS
@ -1,3 +1,13 @@
|
||||
2011-10-01
|
||||
Version 3.3.1 -- "The Tenth Anniversary Edition" bug fix release.
|
||||
* translation updates: ca, cs, de, fr, hr, it, nb, nl, pl, pt_br, sk, sl, sv, uk, zh_cn
|
||||
* new languages in this release: ja (Japanese), vi (Vietnamese)
|
||||
* 36 bugs closed since v3.3.0: http://www.gramps-project.org/bugs/roadmap_page.php?version_id=27
|
||||
* 79 translation commits since v3.3.0
|
||||
* 189 code commits since v3.3.0
|
||||
* ten years since v0.1.1 was first released: http://www.gramps-project.org/wiki/index.php?title=Previous_releases
|
||||
* "Thank you!" to Donald Allingham, The Gramps Developers, translators, and our every day users
|
||||
|
||||
2011-06-12
|
||||
Version 3.3.0 -- the "Prelude to the next version" new feature release.
|
||||
* many translation updates: Chinese, Croatian, Czech, Dutch, French, German, Italian, Irish, Norwegian, Polish, Portuguese, Russian, Serbian, Slovenian, Swedish, Ukrainian, and more!
|
||||
|
@ -33,7 +33,7 @@ AC_SUBST(RELEASE)
|
||||
AC_SUBST(VERSIONSTRING)
|
||||
|
||||
dnl Add the languages which your application supports here.
|
||||
ALL_LINGUAS="hu zh_CN cs da de es fr it nb nl nn pl pt_BR pt_PT ru sv fi lt sk bg hr sl ca sq he uk"
|
||||
ALL_LINGUAS="hu zh_CN cs da de es fr it nb nl nn pl pt_BR pt_PT ru sv fi lt sk bg hr sl ca sq he uk ja vi"
|
||||
GETTEXT_PACKAGE=gramps
|
||||
AC_SUBST(GETTEXT_PACKAGE)
|
||||
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define to the Gettext package name.])
|
||||
@ -152,7 +152,6 @@ src/plugins/webreport/Makefile
|
||||
src/plugins/webstuff/Makefile
|
||||
src/plugins/webstuff/css/Makefile
|
||||
src/plugins/webstuff/images/Makefile
|
||||
src/plugins/webstuff/js/Makefile
|
||||
src/DateHandler/Makefile
|
||||
src/data/Makefile
|
||||
src/glade/Makefile
|
||||
|
@ -81,16 +81,17 @@ HEADER
|
||||
version CDATA #REQUIRED
|
||||
>
|
||||
|
||||
<!ELEMENT researcher (resname, resaddr?, rescity?, resstate?,
|
||||
<!ELEMENT researcher (resname?, resaddr?, reslocality?, rescity?, resstate?,
|
||||
rescountry?, respostal?, resphone?, resemail?)>
|
||||
<!ELEMENT resname (#PCDATA)>
|
||||
<!ELEMENT resaddr (#PCDATA)>
|
||||
<!ELEMENT rescity (#PCDATA)>
|
||||
<!ELEMENT resstate (#PCDATA)>
|
||||
<!ELEMENT rescountry (#PCDATA)>
|
||||
<!ELEMENT respostal (#PCDATA)>
|
||||
<!ELEMENT resphone (#PCDATA)>
|
||||
<!ELEMENT resemail (#PCDATA)>
|
||||
<!ELEMENT resname (#PCDATA)>
|
||||
<!ELEMENT resaddr (#PCDATA)>
|
||||
<!ELEMENT reslocality (#PCDATA)>
|
||||
<!ELEMENT rescity (#PCDATA)>
|
||||
<!ELEMENT resstate (#PCDATA)>
|
||||
<!ELEMENT rescountry (#PCDATA)>
|
||||
<!ELEMENT respostal (#PCDATA)>
|
||||
<!ELEMENT resphone (#PCDATA)>
|
||||
<!ELEMENT resemail (#PCDATA)>
|
||||
|
||||
<!ELEMENT mediapath (#PCDATA)>
|
||||
|
||||
@ -158,19 +159,19 @@ GENDER has values of M, F, or U.
|
||||
rel CDATA #REQUIRED
|
||||
>
|
||||
|
||||
<!ELEMENT address ((daterange|datespan|dateval|datestr)?, street?, city?,
|
||||
county?, state?, country?, postal?, phone?, noteref*,
|
||||
citationref*)>
|
||||
<!ELEMENT address ((daterange|datespan|dateval|datestr)?, street?,
|
||||
locality?, city?, county?, state?, country?, postal?,
|
||||
phone?, noteref*,citationref*)>
|
||||
<!ATTLIST address priv (0|1) #IMPLIED>
|
||||
|
||||
<!ELEMENT street (#PCDATA)>
|
||||
<!ELEMENT street (#PCDATA)>
|
||||
<!ELEMENT locality (#PCDATA)>
|
||||
<!ELEMENT city (#PCDATA)>
|
||||
<!ELEMENT county (#PCDATA)>
|
||||
<!ELEMENT country (#PCDATA)>
|
||||
<!ELEMENT postal (#PCDATA)>
|
||||
<!ELEMENT state (#PCDATA)>
|
||||
<!ELEMENT phone (#PCDATA)>
|
||||
<!ELEMENT city (#PCDATA)>
|
||||
<!ELEMENT county (#PCDATA)>
|
||||
<!ELEMENT state (#PCDATA)>
|
||||
<!ELEMENT country (#PCDATA)>
|
||||
<!ELEMENT postal (#PCDATA)>
|
||||
<!ELEMENT phone (#PCDATA)>
|
||||
|
||||
|
||||
<!-- ************************************************************
|
||||
@ -265,14 +266,15 @@ PLACES
|
||||
|
||||
<!ELEMENT location EMPTY>
|
||||
<!ATTLIST location
|
||||
street CDATA #IMPLIED
|
||||
city CDATA #IMPLIED
|
||||
parish CDATA #IMPLIED
|
||||
county CDATA #IMPLIED
|
||||
state CDATA #IMPLIED
|
||||
country CDATA #IMPLIED
|
||||
postal CDATA #IMPLIED
|
||||
phone CDATA #IMPLIED
|
||||
street CDATA #IMPLIED
|
||||
locality CDATA #IMPLIED
|
||||
city CDATA #IMPLIED
|
||||
parish CDATA #IMPLIED
|
||||
county CDATA #IMPLIED
|
||||
state CDATA #IMPLIED
|
||||
country CDATA #IMPLIED
|
||||
postal CDATA #IMPLIED
|
||||
phone CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!-- ************************************************************
|
||||
|
@ -42,10 +42,15 @@
|
||||
<attribute name="date"><data type="date"/></attribute>
|
||||
<attribute name="version"><text/></attribute>
|
||||
</element>
|
||||
<optional><element name="researcher">
|
||||
<element name="researcher">
|
||||
<optional>
|
||||
<ref name="researcher-content"/>
|
||||
</element></optional>
|
||||
<optional><element name="mediapath"><text/></element></optional>
|
||||
</optional>
|
||||
</element>
|
||||
<optional>
|
||||
<element name="mediapath"><text/>
|
||||
</element>
|
||||
</optional>
|
||||
</element>
|
||||
|
||||
<optional><element name="name-formats">
|
||||
@ -134,6 +139,7 @@
|
||||
<define name="researcher-content">
|
||||
<element name="resname"><text/></element>
|
||||
<optional><element name="resaddr"><text/></element></optional>
|
||||
<optional><element name="reslocality"><text/></element></optional>
|
||||
<optional><element name="rescity"><text/></element></optional>
|
||||
<optional><element name="resstate"><text/></element></optional>
|
||||
<optional><element name="rescountry"><text/></element></optional>
|
||||
@ -191,11 +197,7 @@
|
||||
<attribute name="hlink"><data type="IDREF"/></attribute>
|
||||
</element></zeroOrMore>
|
||||
<zeroOrMore><element name="personref">
|
||||
<attribute name="hlink"><data type="IDREF"/></attribute>
|
||||
<optional><attribute name="priv">
|
||||
<ref name="priv-content"/>
|
||||
</attribute></optional>
|
||||
<attribute name="rel"><text/></attribute>
|
||||
<ref name="personref-content"/>
|
||||
</element></zeroOrMore>
|
||||
<zeroOrMore><element name="noteref">
|
||||
<ref name="noteref-content"/>
|
||||
@ -287,6 +289,7 @@
|
||||
</attribute></optional>
|
||||
<optional><ref name="date-content"/></optional>
|
||||
<optional><element name="street"><text/></element></optional>
|
||||
<optional><element name="locality"><text/></element></optional>
|
||||
<optional><element name="city"><text/></element></optional>
|
||||
<optional><element name="county"><text/></element></optional>
|
||||
<optional><element name="state"><text/></element></optional>
|
||||
@ -472,8 +475,8 @@
|
||||
<ref name="primary-object"/>
|
||||
<optional><element name="ptitle"><text/></element></optional>
|
||||
<optional><element name="coord">
|
||||
<attribute name="long"><data type="float"/></attribute>
|
||||
<attribute name="lat"><data type="float"/></attribute>
|
||||
<attribute name="long"><text/></attribute>
|
||||
<attribute name="lat"><text/></attribute>
|
||||
</element></optional>
|
||||
<zeroOrMore><element name="location">
|
||||
<optional><attribute name="street"><text/></attribute></optional>
|
||||
|
4
debian/control
vendored
4
debian/control
vendored
@ -10,10 +10,10 @@ XS-Python-Version: >=2.5
|
||||
|
||||
Package: gramps
|
||||
Architecture: all
|
||||
Depends: ${python:Depends}, librsvg2-common, python-gtk2, python-pyexiv2, xdg-utils, ${misc:Depends}
|
||||
Depends: ${python:Depends}, librsvg2-common, python-gtk2, python-pyexiv2, xdg-utils, graphviz, python-osmgpsmap ${misc:Depends}
|
||||
Replaces: gramps-manual, gramps-extending-doc
|
||||
Conflicts: gramps-manual, gramps-extending-doc, gramps-common, python-gtk-1.2
|
||||
Recommends: graphviz, ImageMagick, jhead, python-osmgpsmap
|
||||
Recommends:
|
||||
Suggests: ttf-freefont, python-enchant, python-gtkspell
|
||||
Description: Genealogical research program
|
||||
GRAMPS is an Open Source genealogy program written in Python, using
|
||||
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -29,8 +29,12 @@ src/cli/arghandler.py
|
||||
src/cli/argparser.py
|
||||
src/cli/clidbman.py
|
||||
src/cli/grampscli.py
|
||||
src/cli/user.py
|
||||
src/cli/plug/__init__.py
|
||||
|
||||
# gen
|
||||
src/gen/user.py
|
||||
|
||||
# gen db API
|
||||
src/gen/db/base.py
|
||||
src/gen/db/exceptions.py
|
||||
@ -90,6 +94,7 @@ src/gui/filtereditor.py
|
||||
src/gui/grampsbar.py
|
||||
src/gui/grampsgui.py
|
||||
src/gui/makefilter.py
|
||||
src/gui/user.py
|
||||
src/gui/utils.py
|
||||
src/gui/viewmanager.py
|
||||
|
||||
@ -312,6 +317,7 @@ src/plugins/lib/libgedcom.py
|
||||
src/plugins/lib/libgrdb.py
|
||||
src/plugins/lib/libholiday.py
|
||||
src/plugins/lib/libhtmlconst.py
|
||||
src/plugins/lib/libmetadata.py
|
||||
src/plugins/lib/libnarrate.py
|
||||
src/plugins/lib/libpersonview.py
|
||||
src/plugins/lib/libplaceview.py
|
||||
@ -498,6 +504,7 @@ src/Filters/Rules/Person/_IsMale.py
|
||||
src/Filters/Rules/Person/_IsMoreThanNthGenerationAncestorOf.py
|
||||
src/Filters/Rules/Person/_IsMoreThanNthGenerationDescendantOf.py
|
||||
src/Filters/Rules/Person/_IsParentOfFilterMatch.py
|
||||
src/Filters/Rules/Person/_IsRelatedWith.py
|
||||
src/Filters/Rules/Person/_IsSiblingOfFilterMatch.py
|
||||
src/Filters/Rules/Person/_IsSpouseOfFilterMatch.py
|
||||
src/Filters/Rules/Person/_IsWitness.py
|
||||
|
@ -257,6 +257,7 @@ src/gui/views/treemodels/repomodel.py
|
||||
src/gui/views/treemodels/sourcemodel.py
|
||||
|
||||
# gui/widgets - the GUI widgets package
|
||||
src/gui/widgets/basicentry.py
|
||||
src/gui/widgets/menutoolbuttonaction.py
|
||||
src/gui/widgets/styledtextbuffer.py
|
||||
src/gui/widgets/undoablestyledbuffer.py
|
||||
@ -334,8 +335,8 @@ src/Simple/_SimpleDoc.py
|
||||
#
|
||||
# web
|
||||
#
|
||||
src/web/grampsdb/views.py
|
||||
src/web/utils.py
|
||||
src/webapp/grampsdb/views.py
|
||||
src/webapp/utils.py
|
||||
|
||||
#
|
||||
# Glade files
|
||||
|
5680
po/gramps.pot
5680
po/gramps.pot
File diff suppressed because it is too large
Load Diff
20783
po/pt_BR.po
20783
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
@ -18,7 +18,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id:Assistant.py 9912 2008-01-22 09:17:46Z acraphae $
|
||||
# $Id$
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -18,7 +18,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id:AutoComp.py 9912 2008-01-22 09:17:46Z acraphae $
|
||||
# $Id$
|
||||
|
||||
"""
|
||||
Provide autocompletion functionality.
|
||||
|
@ -19,7 +19,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id: _Date_bg.py 9101 2007-10-08 16:41:39Z dallingham $
|
||||
# $Id$
|
||||
|
||||
"""
|
||||
Bulgarian-specific classes for parsing and displaying dates.
|
||||
|
@ -18,6 +18,9 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# DateHandler/_Date_ca.py
|
||||
# $Id$
|
||||
#
|
||||
|
||||
# Catalan Version, 2008
|
||||
|
||||
|
@ -18,6 +18,9 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# DateHandler/_Date_cs.py
|
||||
# $Id$
|
||||
#
|
||||
|
||||
"""
|
||||
Czech-specific classes for parsing and displaying dates.
|
||||
|
@ -18,6 +18,9 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# DateHandler/_Date_da.py
|
||||
# $Id$
|
||||
#
|
||||
|
||||
"""
|
||||
Danish-specific classes for parsing and displaying dates.
|
||||
|
@ -19,7 +19,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id:_Date_de.py 9912 2008-01-22 09:17:46Z acraphae $
|
||||
# $Id$
|
||||
|
||||
"""
|
||||
German-specific classes for parsing and displaying dates.
|
||||
|
@ -19,7 +19,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id:_Date_es.py 9912 2008-01-22 09:17:46Z acraphae $
|
||||
# $Id$
|
||||
|
||||
"""
|
||||
Spanish-specific classes for parsing and displaying dates.
|
||||
|
@ -19,7 +19,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id:_Date_fi.py 9912 2008-01-22 09:17:46Z acraphae $
|
||||
# $Id$
|
||||
|
||||
"""
|
||||
Finnish-specific classes for parsing and displaying dates.
|
||||
|
@ -18,6 +18,9 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# DateHandler/_Date_hr.py
|
||||
# $Id$
|
||||
#
|
||||
|
||||
# Croatian version 2008 by Josip
|
||||
|
||||
|
@ -18,6 +18,9 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# DateHandler/_Date_it.py
|
||||
# $Id$
|
||||
#
|
||||
|
||||
# Italian version, 2009 (derived from the catalan version)
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id:_Date_lt.py 9912 2008-01-22 09:17:46Z acraphae $
|
||||
# $Id$
|
||||
|
||||
"""
|
||||
Lithuanian-specific classes for parsing and displaying dates.
|
||||
|
@ -19,7 +19,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id:_Date_nl.py 9912 2008-01-22 09:17:46Z acraphae $
|
||||
# $Id$
|
||||
|
||||
# Written by Benny Malengier
|
||||
# Last change 2005/12/05:
|
||||
|
@ -18,6 +18,9 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# DateHandler/_Date_pl.py
|
||||
# $Id$
|
||||
#
|
||||
|
||||
# Polish version 2007 by Piotr Czubaszek
|
||||
# Updated in 2010 by Łukasz Rymarczyk
|
||||
|
@ -19,7 +19,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id:_Date_ru.py 9912 2008-01-22 09:17:46Z acraphae $
|
||||
# $Id$
|
||||
|
||||
"""
|
||||
Russian-specific classes for parsing and displaying dates.
|
||||
|
@ -18,6 +18,9 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# DateHandler/_Date_sl.py
|
||||
# $Id$
|
||||
#
|
||||
|
||||
# Slovenian version 2010 by Bernard Banko, based on croatian one by Josip
|
||||
|
||||
|
@ -18,6 +18,9 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# DateHandler/_Date_sr.py
|
||||
# $Id$
|
||||
#
|
||||
|
||||
# Serbian version by Vlada Perić <vlada.peric@gmail.com>, 2009.
|
||||
# Based on the Croatian DateHandler by Josip
|
||||
|
@ -19,7 +19,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id:_Date_sv.py 9912 2008-01-22 09:17:46Z acraphae $
|
||||
# $Id$
|
||||
|
||||
"""
|
||||
Swedish-specific classes for parsing and displaying dates.
|
||||
|
253
src/DateHandler/_Date_zh.py
Normal file
253
src/DateHandler/_Date_zh.py
Normal file
@ -0,0 +1,253 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2004-2006 Donald N. Allingham
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# DateHandler/_Date_zh.py
|
||||
# $Id: _Date_zh.py 18361 2011-10-23 03:13:50Z paul-franklin $
|
||||
#
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Python modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
"""
|
||||
Chinese-specific classes for parsing and displaying dates.
|
||||
"""
|
||||
|
||||
import re
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# GRAMPS modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
from gen.lib import Date
|
||||
from _DateParser import DateParser
|
||||
from _DateDisplay import DateDisplay
|
||||
from _DateHandler import register_datehandler
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Chinese parser
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class DateParserZH(DateParser):
|
||||
"""
|
||||
Convert a text string into a Date object. If the date cannot be
|
||||
converted, the text string is assigned.
|
||||
"""
|
||||
|
||||
# translate english strings into chinese
|
||||
|
||||
modifier_to_int = {
|
||||
u'before' : Date.MOD_BEFORE, u'bef' : Date.MOD_BEFORE,
|
||||
u'bef.' : Date.MOD_BEFORE, u'after' : Date.MOD_AFTER,
|
||||
u'aft' : Date.MOD_AFTER, u'aft.' : Date.MOD_AFTER,
|
||||
u'about' : Date.MOD_ABOUT, u'abt.' : Date.MOD_ABOUT,
|
||||
u'abt' : Date.MOD_ABOUT, u'circa' : Date.MOD_ABOUT,
|
||||
u'c.' : Date.MOD_ABOUT, u'around' : Date.MOD_ABOUT,
|
||||
}
|
||||
|
||||
month_to_int = DateParser.month_to_int
|
||||
|
||||
month_to_int[u"正"] = 1
|
||||
month_to_int[u"一"] = 1
|
||||
month_to_int[u"zhēngyuè"] = 1
|
||||
month_to_int[u"二"] = 2
|
||||
month_to_int[u"èryuè"] = 2
|
||||
month_to_int[u"三"] = 3
|
||||
month_to_int[u"sānyuè"] = 3
|
||||
month_to_int[u"四"] = 4
|
||||
month_to_int[u"sìyuè"] = 4
|
||||
month_to_int[u"五"] = 5
|
||||
month_to_int[u"wǔyuè"] = 5
|
||||
month_to_int[u"六"] = 6
|
||||
month_to_int[u"liùyuè"] = 6
|
||||
month_to_int[u"七"] = 7
|
||||
month_to_int[u"qīyuè"] = 7
|
||||
month_to_int[u"八"] = 8
|
||||
month_to_int[u"bāyuè"] = 8
|
||||
month_to_int[u"九"] = 9
|
||||
month_to_int[u"jiǔyuè"] = 9
|
||||
month_to_int[u"十"] = 10
|
||||
month_to_int[u"shíyuè"] = 10
|
||||
month_to_int[u"十一"] = 11
|
||||
month_to_int[u"shíyīyuè"] = 11
|
||||
month_to_int[u"十二"] = 12
|
||||
month_to_int[u"shí'èryuè"] = 12
|
||||
month_to_int[u"假閏"] = 13
|
||||
month_to_int[u"jiǎ rùn yùe"] = 13
|
||||
|
||||
# translate english strings into chinese
|
||||
|
||||
calendar_to_int = {
|
||||
'gregorian' : Date.CAL_GREGORIAN,
|
||||
'g' : Date.CAL_GREGORIAN,
|
||||
'julian' : Date.CAL_JULIAN,
|
||||
'j' : Date.CAL_JULIAN,
|
||||
'hebrew' : Date.CAL_HEBREW,
|
||||
'h' : Date.CAL_HEBREW,
|
||||
'islamic' : Date.CAL_ISLAMIC,
|
||||
'i' : Date.CAL_ISLAMIC,
|
||||
'french' : Date.CAL_FRENCH,
|
||||
'french republican': Date.CAL_FRENCH,
|
||||
'f' : Date.CAL_FRENCH,
|
||||
'persian' : Date.CAL_PERSIAN,
|
||||
'p' : Date.CAL_PERSIAN,
|
||||
'swedish' : Date.CAL_SWEDISH,
|
||||
's' : Date.CAL_SWEDISH,
|
||||
}
|
||||
|
||||
# translate english strings into chinese
|
||||
|
||||
quality_to_int = {
|
||||
u'estimated' : Date.QUAL_ESTIMATED,
|
||||
u'est.' : Date.QUAL_ESTIMATED,
|
||||
u'est' : Date.QUAL_ESTIMATED,
|
||||
u'calc.' : Date.QUAL_CALCULATED,
|
||||
u'calc' : Date.QUAL_CALCULATED,
|
||||
u'calculated' : Date.QUAL_CALCULATED,
|
||||
}
|
||||
|
||||
# translate english strings into chinese
|
||||
|
||||
bce = [u"before calendar", u"negative year"] + DateParser.bce
|
||||
|
||||
def init_strings(self):
|
||||
"""
|
||||
This method compiles regular expression strings for matching dates.
|
||||
|
||||
Most of the re's in most languages can stay as is. span and range
|
||||
most likely will need to change. Whatever change is done, this method
|
||||
may be called first as DateParser.init_strings(self) so that the
|
||||
invariant expresions don't need to be repeteadly coded. All differences
|
||||
can be coded after DateParser.init_strings(self) call, that way they
|
||||
override stuff from this method. See DateParserRU() as an example.
|
||||
"""
|
||||
DateParser.init_strings(self)
|
||||
|
||||
# day: 日 ; month : 月 ; year : 年
|
||||
|
||||
# See DateParser class; translate english strings (from/to, between/and) into chinese
|
||||
# do not translate <start> and <stop>
|
||||
|
||||
self._span = re.compile(u"(from)\s+(?P<start>.+)\s+to\s+(?P<stop>.+)",
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile(u"(bet|bet.|between)\s+(?P<start>.+)\s+and\s+(?P<stop>.+)",
|
||||
re.IGNORECASE)
|
||||
|
||||
#def _parse_lunisolar(self, date_val=text):
|
||||
#text = text.strip() # otherwise spaces can make it a bad date
|
||||
#date = Date(self._qual_str, self._mod_str, self._cal_str, text, self._ny_str)
|
||||
#return unicode(text)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Chinese display
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class DateDisplayZH(DateDisplay):
|
||||
"""
|
||||
Chinese language date display class.
|
||||
"""
|
||||
|
||||
# translate english strings into chinese
|
||||
|
||||
long_months = ( u"", u"January", u"February", u"March", u"April", u"May",
|
||||
u"June", u"July", u"August", u"September", u"October",
|
||||
u"November", u"December" )
|
||||
|
||||
short_months = ( u"", u"Jan", u"Feb", u"Mar", u"Apr", u"May", u"Jun",
|
||||
u"Jul", u"Aug", u"Sep", u"Oct", u"Nov", u"Dec" )
|
||||
|
||||
calendar = (
|
||||
"", u"Julian", u"Hebrew", u"French Republican",
|
||||
u"Persian", u"Islamic", u"Swedish"
|
||||
)
|
||||
|
||||
_mod_str = ("", u"before ", u"after ", u"around ", "", "", "")
|
||||
|
||||
_qual_str = ("", u"estimated ", u"calculated ", "")
|
||||
|
||||
_bce_str = "%s B.C.E."
|
||||
|
||||
|
||||
def display(self, date):
|
||||
"""
|
||||
Return a text string representing the date.
|
||||
"""
|
||||
|
||||
mod = date.get_modifier()
|
||||
cal = date.get_calendar()
|
||||
qual = date.get_quality()
|
||||
start = date.get_start_date()
|
||||
newyear = date.get_new_year()
|
||||
|
||||
qual_str = (self._qual_str)[qual]
|
||||
|
||||
if mod == Date.MOD_TEXTONLY:
|
||||
return date.get_text()
|
||||
elif start == Date.EMPTY:
|
||||
return ""
|
||||
elif mod == Date.MOD_SPAN:
|
||||
date1 = self.display_cal[cal](start)
|
||||
date2 = self.display_cal[cal](date.get_stop_date())
|
||||
scal = self.format_extras(cal, newyear)
|
||||
# translate english strings into chinese
|
||||
return "%s%s %s %s %s%s" % (qual_str, u'from', date1, u'to',
|
||||
date2, scal)
|
||||
elif mod == Date.MOD_RANGE:
|
||||
date1 = self.display_cal[cal](start)
|
||||
date2 = self.display_cal[cal](date.get_stop_date())
|
||||
scal = self.format_extras(cal, newyear)
|
||||
# translate english strings into chinese
|
||||
return "%s%s %s %s %s%s" % (qual_str, u'between', date1, u'and',
|
||||
date2, scal)
|
||||
else:
|
||||
text = self.display_cal[date.get_calendar()](start)
|
||||
scal = self.format_extras(cal, newyear)
|
||||
return "%s%s%s%s" % (qual_str, (self._mod_str)[mod], text,
|
||||
scal)
|
||||
|
||||
#def _display_chinese(self, date_val):
|
||||
#self._tformat = '%Y年%m月%d日'
|
||||
#year = self._slash_year(date_val[2], date_val[3])
|
||||
#if date_val[3]:
|
||||
#return self.display_iso(date_val)
|
||||
#else:
|
||||
#if date_val[0] == date_val[1] == 0:
|
||||
#value = u'%Y年' % date_val[2]
|
||||
#else:
|
||||
#value = self._tformat.replace('%m月', str(self.lunisolar[date_val[1]]))
|
||||
#value = u'%m月' % date_val[1]
|
||||
#value = u'%d日' % date_val[0]
|
||||
#value = u'%Y年' % date_val[2]
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Register classes
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
register_datehandler(('zh_CN', 'zh_TW', 'zh_SG', 'zh_HK', 'zh', 'chinese', 'Chinese'),
|
||||
DateParserZH, DateDisplayZH)
|
@ -18,6 +18,8 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
"""
|
||||
Provide the database state class
|
||||
|
@ -111,6 +111,7 @@ class _DdTargets(object):
|
||||
|
||||
self.ADDRESS = _DdType(self, 'paddr')
|
||||
self.ATTRIBUTE = _DdType(self, 'pattr')
|
||||
self.CHILDREF = _DdType(self, 'childref')
|
||||
self.DATA = _DdType(self, 'data_tuple')
|
||||
self.EVENT = _DdType(self, 'pevent')
|
||||
self.EVENTREF = _DdType(self, 'eventref')
|
||||
@ -142,6 +143,7 @@ class _DdTargets(object):
|
||||
self._all_gramps_types = [
|
||||
self.ADDRESS,
|
||||
self.ATTRIBUTE,
|
||||
self.CHILDREF,
|
||||
self.EVENT,
|
||||
self.EVENTREF,
|
||||
self.LOCATION,
|
||||
|
@ -403,6 +403,18 @@ class DisplayState(gen.utils.Callback):
|
||||
# but this connection is still made!
|
||||
# self.dbstate.connect('database-changed', self.db_changed)
|
||||
|
||||
def screen_width(self):
|
||||
"""
|
||||
Return the width of the current screen.
|
||||
"""
|
||||
return self.window.get_screen().get_width()
|
||||
|
||||
def screen_height(self):
|
||||
"""
|
||||
Return the height of the current screen.
|
||||
"""
|
||||
return self.window.get_screen().get_height()
|
||||
|
||||
def clear_history(self):
|
||||
"""
|
||||
Clear all history objects.
|
||||
|
@ -21,6 +21,8 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
# Written by B.Malengier
|
||||
|
||||
|
@ -19,6 +19,8 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
"""Provide the common export options for Exporters."""
|
||||
|
||||
|
@ -1,3 +1,26 @@
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# Filters/Rules/Event/_ChangedSince.py
|
||||
# $Id$
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Standard Python modules
|
||||
|
@ -19,6 +19,9 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# Filters/Rules/Event/_HasGallery.py
|
||||
# $Id$
|
||||
#
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -17,6 +17,9 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# Filters/Rules/Event/_MatchesSourceConfidence.py
|
||||
# $Id$
|
||||
#
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -1,3 +1,26 @@
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# Filters/Rules/Family/_ChangedSince.py
|
||||
# $Id$
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Standard Python modules
|
||||
|
@ -19,6 +19,9 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# Filters/Rules/Family/_HasGallery.py
|
||||
# $Id$
|
||||
#
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -19,6 +19,9 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# Filters/Rules/Family/_HasLDS.py
|
||||
# $Id$
|
||||
#
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -17,6 +17,9 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# Filters/Rules/Family/_MatchesSourceConfidence.py
|
||||
# $Id$
|
||||
#
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -1,3 +1,26 @@
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# Filters/Rules/MediaObject/_ChangedSince.py
|
||||
# $Id$
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Standard Python modules
|
||||
|
@ -18,7 +18,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id:_HasMedia.py 9912 2008-01-22 09:17:46Z acraphae $
|
||||
# $Id$
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -1,3 +1,26 @@
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# Filters/Rules/Note/_ChangedSince.py
|
||||
# $Id$
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Standard Python modules
|
||||
|
@ -57,6 +57,7 @@ pkgdata_PYTHON = \
|
||||
_IsMoreThanNthGenerationAncestorOf.py \
|
||||
_IsMoreThanNthGenerationDescendantOf.py \
|
||||
_IsParentOfFilterMatch.py \
|
||||
_IsRelatedWith.py \
|
||||
_IsSiblingOfFilterMatch.py \
|
||||
_IsSpouseOfFilterMatch.py \
|
||||
_IsWitness.py \
|
||||
|
@ -1,3 +1,26 @@
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# Filters/Rules/Person/_ChangedSince.py
|
||||
# $Id$
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Standard Python modules
|
||||
|
@ -18,7 +18,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id:_Everyone.py 9912 2008-01-22 09:17:46Z acraphae $
|
||||
# $Id$
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -19,6 +19,9 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# Filters/Rules/Person/_HasAddress.py
|
||||
# $Id$
|
||||
#
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -17,6 +17,9 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# Filters/Rules/Person/_HasAlternateName.py
|
||||
# $Id$
|
||||
#
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -19,6 +19,9 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# Filters/Rules/Person/_HasAssociation.py
|
||||
# $Id$
|
||||
#
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -18,7 +18,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id:_HasCommonAncestorWith.py 9912 2008-01-22 09:17:46Z acraphae $
|
||||
# $Id$
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -18,7 +18,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id:_HasCommonAncestorWithFilterMatch.py 9912 2008-01-22 09:17:46Z acraphae $
|
||||
# $Id$
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -19,6 +19,9 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# Filters/Rules/Person/_HasLDS.py
|
||||
# $Id$
|
||||
#
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -17,6 +17,9 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# Filters/Rules/Person/_HasNameOriginType.py
|
||||
# $Id$
|
||||
#
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -17,6 +17,9 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# Filters/Rules/Person/_HasNameType.py
|
||||
# $Id$
|
||||
#
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -17,6 +17,9 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# Filters/Rules/Person/_HasNickname.py
|
||||
# $Id$
|
||||
#
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -18,7 +18,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id:_HasTextMatchingSubstringOf.py 9912 2008-01-22 09:17:46Z acraphae $
|
||||
# $Id$
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -17,6 +17,9 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# Filters/Rules/Person/_IsDuplicatedAncestorOf.py
|
||||
# $Id$
|
||||
#
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -18,7 +18,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id:_IsLessThanNthGenerationAncestorOf.py 9912 2008-01-22 09:17:46Z acraphae $
|
||||
# $Id$
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -18,7 +18,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id:_IsLessThanNthGenerationAncestorOfBookmarked.py 9912 2008-01-22 09:17:46Z acraphae $
|
||||
# $Id$
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -18,7 +18,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id:_IsLessThanNthGenerationAncestorOfDefaultPerson.py 9912 2008-01-22 09:17:46Z acraphae $
|
||||
# $Id$
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -18,7 +18,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id:_IsMoreThanNthGenerationAncestorOf.py 9912 2008-01-22 09:17:46Z acraphae $
|
||||
# $Id$
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
97
src/Filters/Rules/Person/_IsRelatedWith.py
Normal file
97
src/Filters/Rules/Person/_IsRelatedWith.py
Normal file
@ -0,0 +1,97 @@
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2011 Robert Cheramy
|
||||
#
|
||||
# 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: _IsRelatedWith.py 18338 2011-10-16 20:21:22Z paul-franklin $
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Standard Python modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gen.ggettext import gettext as _
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# GRAMPS modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from Filters.Rules._Rule import Rule
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# RelatedWith
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class IsRelatedWith(Rule):
|
||||
"""Rule that checks if a person is related to a specified person"""
|
||||
|
||||
labels = [ _('ID:') ]
|
||||
name = _('People related to <Person>')
|
||||
category = _("Relationship filters")
|
||||
description = _("Matches people related to a specified person")
|
||||
|
||||
def prepare(self, db):
|
||||
"""prepare so the rule can be executed efficiently
|
||||
we build the list of people related to <person> here,
|
||||
so that apply is only a check into this list
|
||||
"""
|
||||
self.db = db
|
||||
|
||||
self.relatives = []
|
||||
self.add_relative(db.get_person_from_gramps_id(self.list[0]))
|
||||
|
||||
def reset(self):
|
||||
self.relatives = []
|
||||
|
||||
def apply(self, db, person):
|
||||
return person.handle in self.relatives
|
||||
|
||||
|
||||
def add_relative(self, person):
|
||||
"""Recursive function that scans relatives and add them to self.relatives"""
|
||||
if not(person) or person.handle in self.relatives:
|
||||
return
|
||||
|
||||
# Add the relative to the list
|
||||
self.relatives.append(person.handle)
|
||||
|
||||
for family_handle in person.get_parent_family_handle_list():
|
||||
family = self.db.get_family_from_handle(family_handle)
|
||||
if family:
|
||||
# Check Parents
|
||||
for parent_handle in (family.get_father_handle(), family.get_mother_handle()):
|
||||
if parent_handle:
|
||||
self.add_relative(self.db.get_person_from_handle(parent_handle))
|
||||
# Check Sibilings
|
||||
for child_ref in family.get_child_ref_list():
|
||||
self.add_relative(self.db.get_person_from_handle(child_ref.ref))
|
||||
|
||||
for family_handle in person.get_family_handle_list():
|
||||
family = self.db.get_family_from_handle(family_handle)
|
||||
if family:
|
||||
# Check Spouse
|
||||
for parent_handle in (family.get_father_handle(), family.get_mother_handle()):
|
||||
if parent_handle:
|
||||
self.add_relative(self.db.get_person_from_handle(parent_handle))
|
||||
# Check Children
|
||||
for child_ref in family.get_child_ref_list():
|
||||
self.add_relative(self.db.get_person_from_handle(child_ref.ref))
|
||||
|
||||
return
|
@ -17,6 +17,9 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# Filters/Rules/Person/_MatchesSourceConfidence.py
|
||||
# $Id$
|
||||
#
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -18,7 +18,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id: _NoDeathdate.py 14091 2010-01-18 04:42:17Z pez4brian $
|
||||
# $Id$
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -18,7 +18,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id:_RelationshipPathBetween.py 9912 2008-01-22 09:17:46Z acraphae $
|
||||
# $Id$
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -19,7 +19,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id:__init__.py 9912 2008-01-22 09:17:46Z acraphae $
|
||||
# $Id$
|
||||
|
||||
"""
|
||||
Package providing filter rules for GRAMPS.
|
||||
@ -107,6 +107,7 @@ from _RegExpName import RegExpName
|
||||
from _MatchIdOf import MatchIdOf
|
||||
from _RegExpIdOf import RegExpIdOf
|
||||
from _ChangedSince import ChangedSince
|
||||
from _IsRelatedWith import IsRelatedWith
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -185,5 +186,6 @@ editor_rule_list = [
|
||||
RegExpIdOf,
|
||||
Disconnected,
|
||||
ChangedSince,
|
||||
IsRelatedWith,
|
||||
]
|
||||
|
||||
|
@ -1,3 +1,26 @@
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# Filters/Rules/Place/_ChangedSince.py
|
||||
# $Id$
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Standard Python modules
|
||||
|
@ -19,6 +19,9 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# Filters/Rules/Place/_HasGallery.py
|
||||
# $Id$
|
||||
#
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -17,6 +17,9 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# Filters/Rules/Place/_HasNoLatOrLon.py
|
||||
# $Id$
|
||||
#
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
@ -17,6 +17,9 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# Filters/Rules/Place/_InLatLonNeighborhood.py
|
||||
# $Id$
|
||||
#
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
@ -1,3 +1,26 @@
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# Filters/Rules/Repository/_ChangedSince.py
|
||||
# $Id$
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Standard Python modules
|
||||
|
@ -1,53 +1,53 @@
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2011 Helge Herz
|
||||
#
|
||||
# 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: $
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Standard Python modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gen.ggettext import gettext as _
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# GRAMPS modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from Filters.Rules import Rule
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# "Repositories having a name that contain a substring"
|
||||
#-------------------------------------------------------------------------
|
||||
class MatchesNameSubstringOf(Rule):
|
||||
"""Repository name containing <substring>"""
|
||||
|
||||
labels = [ _('Substring:')]
|
||||
name = _('Repository name containing <substring>')
|
||||
description = _("Matches repositories whose name contains a certain substring")
|
||||
category = _('General filters')
|
||||
|
||||
def apply(self, db, repository):
|
||||
""" Apply the filter """
|
||||
name = repository.get_name()
|
||||
if name.upper().find(self.list[0].upper()) != -1:
|
||||
return True
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2011 Helge Herz
|
||||
#
|
||||
# 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$
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Standard Python modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gen.ggettext import gettext as _
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# GRAMPS modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from Filters.Rules import Rule
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# "Repositories having a name that contain a substring"
|
||||
#-------------------------------------------------------------------------
|
||||
class MatchesNameSubstringOf(Rule):
|
||||
"""Repository name containing <substring>"""
|
||||
|
||||
labels = [ _('Substring:')]
|
||||
name = _('Repository name containing <substring>')
|
||||
description = _("Matches repositories whose name contains a certain substring")
|
||||
category = _('General filters')
|
||||
|
||||
def apply(self, db, repository):
|
||||
""" Apply the filter """
|
||||
name = repository.get_name()
|
||||
if name.upper().find(self.list[0].upper()) != -1:
|
||||
return True
|
||||
return False
|
||||
|
@ -1,3 +1,26 @@
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# Filters/Rules/Source/_ChangedSince.py
|
||||
# $Id$
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Standard Python modules
|
||||
|
@ -19,6 +19,9 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# Filters/Rules/Source/_HasGallery.py
|
||||
# $Id$
|
||||
#
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -20,6 +20,9 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# Filters/Rules/Source/_HasRepository.py
|
||||
# $Id$
|
||||
#
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -17,6 +17,9 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# Filters/Rules/Source/_HasRepositoryCallNumberRef.py
|
||||
# $Id$
|
||||
#
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -17,6 +17,9 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# Filters/Rules/Source/_MatchesRepositoryFilter.py
|
||||
# $Id$
|
||||
#
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -18,7 +18,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id: $
|
||||
# $Id$
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -1,3 +1,26 @@
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# Filters/Rules/_ChangedSinceBase.py
|
||||
# $Id$
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Standard Python modules
|
||||
|
@ -18,7 +18,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id: _MatchesEventFilterBase.py
|
||||
# $Id$
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -19,6 +19,9 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# Filters/Rules/_MatchesSourceConfidenceBase.py
|
||||
# $Id$
|
||||
#
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -18,7 +18,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id: _MatchesSourceFilterBase.py
|
||||
# $Id$
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -18,7 +18,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id:__init__.py 9912 2008-01-22 09:17:46Z acraphae $
|
||||
# $Id$
|
||||
|
||||
"""
|
||||
Package providing filter rules for GRAMPS.
|
||||
|
@ -18,7 +18,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id:_EventSidebarFilter.py 9912 2008-01-22 09:17:46Z acraphae $
|
||||
# $Id$
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -58,8 +58,8 @@ class EventSidebarFilter(SidebarFilter):
|
||||
|
||||
def __init__(self, dbstate, uistate, clicked):
|
||||
self.clicked_func = clicked
|
||||
self.filter_id = gtk.Entry()
|
||||
self.filter_desc = gtk.Entry()
|
||||
self.filter_id = widgets.BasicEntry()
|
||||
self.filter_desc = widgets.BasicEntry()
|
||||
self.filter_event = gen.lib.Event()
|
||||
self.filter_event.set_type((gen.lib.EventType.CUSTOM, u''))
|
||||
self.etype = gtk.ComboBoxEntry()
|
||||
@ -69,11 +69,11 @@ class EventSidebarFilter(SidebarFilter):
|
||||
self.filter_event.set_type,
|
||||
self.filter_event.get_type)
|
||||
|
||||
self.filter_mainparts = gtk.Entry()
|
||||
self.filter_date = gtk.Entry()
|
||||
self.filter_place = gtk.Entry()
|
||||
self.filter_note = gtk.Entry()
|
||||
|
||||
self.filter_mainparts = widgets.BasicEntry()
|
||||
self.filter_date = widgets.BasicEntry()
|
||||
self.filter_place = widgets.BasicEntry()
|
||||
self.filter_note = widgets.BasicEntry()
|
||||
|
||||
self.filter_regex = gtk.CheckButton(_('Use regular expressions'))
|
||||
|
||||
self.generic = gtk.ComboBox()
|
||||
@ -88,15 +88,17 @@ class EventSidebarFilter(SidebarFilter):
|
||||
self.generic.add_attribute(cell, 'text', 0)
|
||||
self.on_filters_changed('Event')
|
||||
|
||||
self.etype.child.set_width_chars(5)
|
||||
|
||||
self.add_text_entry(_('ID'), self.filter_id)
|
||||
self.add_text_entry(_('Description'), self.filter_desc)
|
||||
self.add_entry(_('Type'), self.etype)
|
||||
self.add_text_entry(_('Main Participants'), self.filter_mainparts)
|
||||
self.add_text_entry(_('Participants'), self.filter_mainparts)
|
||||
self.add_text_entry(_('Date'), self.filter_date)
|
||||
self.add_text_entry(_('Place'), self.filter_place)
|
||||
self.add_text_entry(_('Note'), self.filter_note)
|
||||
self.add_filter_entry(_('Custom filter'), self.generic)
|
||||
self.add_entry(None, self.filter_regex)
|
||||
self.add_regex_entry(self.filter_regex)
|
||||
|
||||
def clear(self, obj):
|
||||
self.filter_id.set_text(u'')
|
||||
|
@ -62,10 +62,10 @@ class FamilySidebarFilter(SidebarFilter):
|
||||
|
||||
def __init__(self, dbstate, uistate, clicked):
|
||||
self.clicked_func = clicked
|
||||
self.filter_id = gtk.Entry()
|
||||
self.filter_father = gtk.Entry()
|
||||
self.filter_mother = gtk.Entry()
|
||||
self.filter_child = gtk.Entry()
|
||||
self.filter_id = widgets.BasicEntry()
|
||||
self.filter_father = widgets.BasicEntry()
|
||||
self.filter_mother = widgets.BasicEntry()
|
||||
self.filter_child = widgets.BasicEntry()
|
||||
|
||||
self.filter_event = gen.lib.Event()
|
||||
self.filter_event.set_type((gen.lib.EventType.CUSTOM, u''))
|
||||
@ -85,8 +85,8 @@ class FamilySidebarFilter(SidebarFilter):
|
||||
self.family_stub.set_relationship,
|
||||
self.family_stub.get_relationship)
|
||||
|
||||
self.filter_note = gtk.Entry()
|
||||
|
||||
self.filter_note = widgets.BasicEntry()
|
||||
|
||||
self.filter_regex = gtk.CheckButton(_('Use regular expressions'))
|
||||
|
||||
self.tag = gtk.ComboBox()
|
||||
@ -108,6 +108,9 @@ class FamilySidebarFilter(SidebarFilter):
|
||||
self.tag.pack_start(cell, True)
|
||||
self.tag.add_attribute(cell, 'text', 0)
|
||||
|
||||
self.etype.child.set_width_chars(5)
|
||||
self.rtype.child.set_width_chars(5)
|
||||
|
||||
self.add_text_entry(_('ID'), self.filter_id)
|
||||
self.add_text_entry(_('Father'), self.filter_father)
|
||||
self.add_text_entry(_('Mother'), self.filter_mother)
|
||||
@ -117,7 +120,7 @@ class FamilySidebarFilter(SidebarFilter):
|
||||
self.add_text_entry(_('Family Note'), self.filter_note)
|
||||
self.add_entry(_('Tag'), self.tag)
|
||||
self.add_filter_entry(_('Custom filter'), self.generic)
|
||||
self.add_entry(None, self.filter_regex)
|
||||
self.add_regex_entry(self.filter_regex)
|
||||
|
||||
def clear(self, obj):
|
||||
self.filter_id.set_text(u'')
|
||||
|
@ -40,6 +40,7 @@ import gtk
|
||||
# GRAMPS modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gui import widgets
|
||||
from Filters.SideBar import SidebarFilter
|
||||
from Filters import GenericFilterFactory, build_filter_model, Rules
|
||||
from Filters.Rules.MediaObject import (RegExpIdOf, HasIdOf, HasMedia, HasTag,
|
||||
@ -56,13 +57,12 @@ class MediaSidebarFilter(SidebarFilter):
|
||||
|
||||
def __init__(self, dbstate, uistate, clicked):
|
||||
self.clicked_func = clicked
|
||||
self.filter_id = gtk.Entry()
|
||||
self.filter_title = gtk.Entry()
|
||||
self.filter_type = gtk.Entry()
|
||||
self.filter_path = gtk.Entry()
|
||||
self.filter_date = gtk.Entry()
|
||||
|
||||
self.filter_note = gtk.Entry()
|
||||
self.filter_id = widgets.BasicEntry()
|
||||
self.filter_title = widgets.BasicEntry()
|
||||
self.filter_type = widgets.BasicEntry()
|
||||
self.filter_path = widgets.BasicEntry()
|
||||
self.filter_date = widgets.BasicEntry()
|
||||
self.filter_note = widgets.BasicEntry()
|
||||
|
||||
self.filter_regex = gtk.CheckButton(_('Use regular expressions'))
|
||||
|
||||
@ -93,7 +93,7 @@ class MediaSidebarFilter(SidebarFilter):
|
||||
self.add_text_entry(_('Note'), self.filter_note)
|
||||
self.add_entry(_('Tag'), self.tag)
|
||||
self.add_filter_entry(_('Custom filter'), self.generic)
|
||||
self.add_entry(None, self.filter_regex)
|
||||
self.add_regex_entry(self.filter_regex)
|
||||
|
||||
def clear(self, obj):
|
||||
self.filter_id.set_text('')
|
||||
|
@ -58,8 +58,8 @@ class NoteSidebarFilter(SidebarFilter):
|
||||
|
||||
def __init__(self, dbstate, uistate, clicked):
|
||||
self.clicked_func = clicked
|
||||
self.filter_id = gtk.Entry()
|
||||
self.filter_text = gtk.Entry()
|
||||
self.filter_id = widgets.BasicEntry()
|
||||
self.filter_text = widgets.BasicEntry()
|
||||
|
||||
self.note = Note()
|
||||
self.note.set_type((NoteType.CUSTOM,''))
|
||||
@ -90,12 +90,14 @@ class NoteSidebarFilter(SidebarFilter):
|
||||
self.tag.pack_start(cell, True)
|
||||
self.tag.add_attribute(cell, 'text', 0)
|
||||
|
||||
self.ntype.child.set_width_chars(5)
|
||||
|
||||
self.add_text_entry(_('ID'), self.filter_id)
|
||||
self.add_text_entry(_('Text'), self.filter_text)
|
||||
self.add_entry(_('Type'), self.ntype)
|
||||
self.add_entry(_('Tag'), self.tag)
|
||||
self.add_filter_entry(_('Custom filter'), self.generic)
|
||||
self.add_entry(None, self.filter_regex)
|
||||
self.add_regex_entry(self.filter_regex)
|
||||
|
||||
def clear(self, obj):
|
||||
self.filter_id.set_text('')
|
||||
|
@ -72,10 +72,10 @@ class PersonSidebarFilter(SidebarFilter):
|
||||
|
||||
def __init__(self, dbstate, uistate, clicked):
|
||||
self.clicked_func = clicked
|
||||
self.filter_name = gtk.Entry()
|
||||
self.filter_id = gtk.Entry()
|
||||
self.filter_birth = gtk.Entry()
|
||||
self.filter_death = gtk.Entry()
|
||||
self.filter_name = widgets.BasicEntry()
|
||||
self.filter_id = widgets.BasicEntry()
|
||||
self.filter_birth = widgets.BasicEntry()
|
||||
self.filter_death = widgets.BasicEntry()
|
||||
self.filter_event = gen.lib.Event()
|
||||
self.filter_event.set_type((gen.lib.EventType.CUSTOM, u''))
|
||||
self.etype = gtk.ComboBoxEntry()
|
||||
@ -84,7 +84,7 @@ class PersonSidebarFilter(SidebarFilter):
|
||||
self.filter_event.set_type,
|
||||
self.filter_event.get_type)
|
||||
|
||||
self.filter_note = gtk.Entry()
|
||||
self.filter_note = widgets.BasicEntry()
|
||||
self.filter_gender = gtk.combo_box_new_text()
|
||||
map(self.filter_gender.append_text,
|
||||
[ _('any'), _('male'), _('female'), _('unknown') ])
|
||||
@ -111,6 +111,8 @@ class PersonSidebarFilter(SidebarFilter):
|
||||
self.tag.pack_start(cell, True)
|
||||
self.tag.add_attribute(cell, 'text', 0)
|
||||
|
||||
self.etype.child.set_width_chars(5)
|
||||
|
||||
exdate1 = gen.lib.Date()
|
||||
exdate2 = gen.lib.Date()
|
||||
exdate1.set(gen.lib.Date.QUAL_NONE, gen.lib.Date.MOD_RANGE,
|
||||
@ -133,7 +135,7 @@ class PersonSidebarFilter(SidebarFilter):
|
||||
self.add_text_entry(_('Note'), self.filter_note)
|
||||
self.add_entry(_('Tag'), self.tag)
|
||||
self.add_filter_entry(_('Custom filter'), self.generic)
|
||||
self.add_entry(None, self.filter_regex)
|
||||
self.add_regex_entry(self.filter_regex)
|
||||
|
||||
def clear(self, obj):
|
||||
self.filter_name.set_text(u'')
|
||||
|
@ -41,7 +41,7 @@ import gtk
|
||||
# GRAMPS modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
from gui import widgets
|
||||
from Filters.SideBar import SidebarFilter
|
||||
from Filters import GenericFilterFactory, build_filter_model, Rules
|
||||
from Filters.Rules.Place import (RegExpIdOf, HasIdOf, HasPlace, HasNoteRegexp,
|
||||
@ -58,17 +58,18 @@ class PlaceSidebarFilter(SidebarFilter):
|
||||
def __init__(self, dbstate, uistate, clicked):
|
||||
self.clicked_func = clicked
|
||||
|
||||
self.filter_id = gtk.Entry()
|
||||
self.filter_title = gtk.Entry()
|
||||
self.filter_street = gtk.Entry()
|
||||
self.filter_locality = gtk.Entry()
|
||||
self.filter_city = gtk.Entry()
|
||||
self.filter_county = gtk.Entry()
|
||||
self.filter_state = gtk.Entry()
|
||||
self.filter_country = gtk.Entry()
|
||||
self.filter_zip = gtk.Entry()
|
||||
self.filter_parish = gtk.Entry()
|
||||
self.filter_note = gtk.Entry()
|
||||
self.filter_id = widgets.BasicEntry()
|
||||
self.filter_title = widgets.BasicEntry()
|
||||
self.filter_street = widgets.BasicEntry()
|
||||
self.filter_locality = widgets.BasicEntry()
|
||||
self.filter_city = widgets.BasicEntry()
|
||||
self.filter_county = widgets.BasicEntry()
|
||||
self.filter_state = widgets.BasicEntry()
|
||||
self.filter_country = widgets.BasicEntry()
|
||||
self.filter_zip = widgets.BasicEntry()
|
||||
self.filter_parish = widgets.BasicEntry()
|
||||
self.filter_note = widgets.BasicEntry()
|
||||
|
||||
self.filter_regex = gtk.CheckButton(_('Use regular expressions'))
|
||||
self.generic = gtk.ComboBox()
|
||||
|
||||
@ -94,7 +95,7 @@ class PlaceSidebarFilter(SidebarFilter):
|
||||
self.add_text_entry(_('Church parish'), self.filter_parish)
|
||||
self.add_text_entry(_('Note'), self.filter_note)
|
||||
self.add_filter_entry(_('Custom filter'), self.generic)
|
||||
self.add_entry(None, self.filter_regex)
|
||||
self.add_regex_entry(self.filter_regex)
|
||||
|
||||
def clear(self, obj):
|
||||
self.filter_id.set_text('')
|
||||
|
@ -58,10 +58,10 @@ class RepoSidebarFilter(SidebarFilter):
|
||||
|
||||
def __init__(self, dbstate, uistate, clicked):
|
||||
self.clicked_func = clicked
|
||||
self.filter_id = gtk.Entry()
|
||||
self.filter_title = gtk.Entry()
|
||||
self.filter_address = gtk.Entry()
|
||||
self.filter_url = gtk.Entry()
|
||||
self.filter_id = widgets.BasicEntry()
|
||||
self.filter_title = widgets.BasicEntry()
|
||||
self.filter_address = widgets.BasicEntry()
|
||||
self.filter_url = widgets.BasicEntry()
|
||||
|
||||
self.repo = Repository()
|
||||
self.repo.set_type((RepositoryType.CUSTOM,''))
|
||||
@ -71,7 +71,7 @@ class RepoSidebarFilter(SidebarFilter):
|
||||
self.repo.set_type,
|
||||
self.repo.get_type)
|
||||
|
||||
self.filter_note = gtk.Entry()
|
||||
self.filter_note = widgets.BasicEntry()
|
||||
|
||||
self.filter_regex = gtk.CheckButton(_('Use regular expressions'))
|
||||
|
||||
@ -87,6 +87,8 @@ class RepoSidebarFilter(SidebarFilter):
|
||||
self.generic.add_attribute(cell, 'text', 0)
|
||||
self.on_filters_changed('Repository')
|
||||
|
||||
self.rtype.child.set_width_chars(5)
|
||||
|
||||
self.add_text_entry(_('ID'), self.filter_id)
|
||||
self.add_text_entry(_('Name'), self.filter_title)
|
||||
self.add_entry(_('Type'), self.rtype)
|
||||
@ -94,7 +96,7 @@ class RepoSidebarFilter(SidebarFilter):
|
||||
self.add_text_entry(_('URL'), self.filter_url)
|
||||
self.add_text_entry(_('Note'), self.filter_note)
|
||||
self.add_filter_entry(_('Custom filter'), self.generic)
|
||||
self.add_entry(None, self.filter_regex)
|
||||
self.add_regex_entry(self.filter_regex)
|
||||
|
||||
def clear(self, obj):
|
||||
self.filter_id.set_text('')
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user