Compare commits
138 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 562fdbb06a | |||
| f83f4c8451 | |||
| 838f3adba7 | |||
| 7d15137109 | |||
| c210a14acc | |||
| 92c5cceea3 | |||
| 5eea9ca023 | |||
| 19bfd81a9b | |||
| 296d7557b7 | |||
| 3eea6dc8dc | |||
| d7200b028a | |||
| a79e8f8860 | |||
| fa60e78ee2 | |||
| 46979f512d | |||
| 1231c01b05 | |||
| bdf97fabd0 | |||
| a8a8b41210 | |||
| 1091c221ba | |||
| ccfe2230ef | |||
| e3bfa40a70 | |||
| 1bb2a2fec0 | |||
| 77cf544636 | |||
| 33daf99b33 | |||
| 20b3131237 | |||
| 1a11e6ba36 | |||
| 2dd4eb7526 | |||
| be37e4cc45 | |||
| f668c23cf2 | |||
| 90c0f43c9d | |||
| 5819fa672e | |||
| 40f7314699 | |||
| e942c940fa | |||
| 9c0f5a96ef | |||
| e01b04e117 | |||
| e3e6a36f3b | |||
| 74968f9b5a | |||
| 200b4f3015 | |||
| 35763a3c29 | |||
| 8996d04cb9 | |||
| 36b418ec65 | |||
| 62d1419a83 | |||
| 89cf7676e1 | |||
| 22b13fc772 | |||
| 7150429195 | |||
| 741eedcbe1 | |||
| a1ae8852cf | |||
| 9bc4a82007 | |||
| a414670cec | |||
| c1487b1e59 | |||
| 5af7f07875 | |||
| 8708c60f33 | |||
| a87b267515 | |||
| 0884741057 | |||
| f2f4d5974c | |||
| b72ae432e7 | |||
| 13e1d5420e | |||
| f5a8db75c2 | |||
| bdd110de18 | |||
| 8b198624ef | |||
| 8f0bcd136b | |||
| 5e275bedfd | |||
| 5791d2d0d3 | |||
| 01aa78127e | |||
| 10342a03cc | |||
| 1fd757e6fa | |||
| 8af1f7e6f5 | |||
| 41d752a75b | |||
| 783619455f | |||
| 6e50919487 | |||
| 7a9fe58b48 | |||
| 69f1ec0508 | |||
| a8aea11b07 | |||
| 09f20eaf9f | |||
| a4ca60e98f | |||
| 12e19ef445 | |||
| a12f166b09 | |||
| 170d7e4cdb | |||
| 328a9d329d | |||
| 277e91a1ca | |||
| 6ca6765458 | |||
| bced98bd71 | |||
| b5cd86498b | |||
| 7045418dec | |||
| a5b5842ec3 | |||
| 20b39325b6 | |||
| cbade510a9 | |||
| 82d7d7db9a | |||
| f3d110f7ec | |||
| 6968dcdf97 | |||
| 243d02a6f5 | |||
| 1aa71cceaa | |||
| d8b100757f | |||
| 80a6b71e13 | |||
| dfa36127f8 | |||
| f17a5125f3 | |||
| c58ca7575b | |||
| 4f1943b180 | |||
| b147cb2ca3 | |||
| 3a4a01ba9e | |||
| f84de89864 | |||
| adc4608ba5 | |||
| fd363c528b | |||
| e60da9001a | |||
| b2ea7dea08 | |||
| eea46c8875 | |||
| 4f44f6f98f | |||
| 62358e931b | |||
| a7319dac47 | |||
| dc0cd05ef8 | |||
| 76e66f6104 | |||
| b94008e412 | |||
| 2acc96fa62 | |||
| dcca22245c | |||
| 27ff0c989e | |||
| 0df382465c | |||
| 28f2bc8bac | |||
| 58e7af6ddf | |||
| e0adfcbb7b | |||
| bc0ce2aada | |||
| 9e7e513b13 | |||
| e43da1a226 | |||
| cd036d3ec7 | |||
| a162c6796e | |||
| 2e8b234b94 | |||
| 5f51aeeb63 | |||
| 4742d33e26 | |||
| f0ece22743 | |||
| 62b29c6e61 | |||
| c6688c8927 | |||
| 38a6412aa5 | |||
| 7244448c51 | |||
| 5705dfe107 | |||
| cd53f3a842 | |||
| d5ccbb092d | |||
| 3affb0a3fd | |||
| 028e5caf03 | |||
| 8dd881dc2f | |||
| c0bf571c62 |
@@ -1,3 +1,14 @@
|
||||
Version 3.2.6 -- the "So far, so good." bug fix release.
|
||||
* fix memory leaks
|
||||
* fix corrupted reports
|
||||
* fix crash in cramplets
|
||||
* fix gedcom import and export
|
||||
* import speed improvements
|
||||
* NarrativeWeb fixes
|
||||
* prevent corrupting databases
|
||||
* many translation updates
|
||||
* other changes; see the changelog and the 3.2.6 roadmap: http://www.gramps-project.org/bugs/roadmap_page.php?version_id=23
|
||||
|
||||
Version 3.2.5 -- the "I intend to live forever" bug fix release.
|
||||
* fix Gramps so it again runs with Python 2.5
|
||||
* write all notes and sources to gedcom files
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ dnl May need to run automake && aclocal first
|
||||
|
||||
AC_PREREQ(2.57)
|
||||
dnl NOTE: arg to macro below becomes the "VERSION"
|
||||
AC_INIT(gramps, 3.2.5, [gramps-bugs@lists.sourceforge.net])
|
||||
AC_INIT(gramps, 3.2.7, [gramps-bugs@lists.sourceforge.net])
|
||||
AC_CONFIG_SRCDIR(configure.in)
|
||||
AM_INIT_AUTOMAKE([1.6.3 foreign])
|
||||
|
||||
|
||||
+716
-529
File diff suppressed because it is too large
Load Diff
+6
-6
@@ -7591,7 +7591,7 @@ msgstr "Registros de Família"
|
||||
#: ../src/plugins/textreport/NumberOfAncestorsReport.py:199
|
||||
#: ../src/plugins/textreport/Summary.py:283
|
||||
msgid "The basic style used for the text display."
|
||||
msgstr "O estilo básico usado para a exibição de texto."
|
||||
msgstr "O estilo de base utilizado na apresentação de texto."
|
||||
|
||||
#: ../src/plugins/Records.py:509
|
||||
msgid "The style used for headings."
|
||||
@@ -9431,7 +9431,7 @@ msgstr "Filtro"
|
||||
#: ../src/plugins/gramplet/PedigreeGramplet.py:222
|
||||
#, fuzzy, python-format
|
||||
msgid "(b. %(birthdate)s, d. %(deathdate)s)"
|
||||
msgstr "Nasceu: %(birth_date)s, Faleceu: %(death_date)s."
|
||||
msgstr "Nasceu: %(birthdate)s, Faleceu: %(deathdate)s."
|
||||
|
||||
#: ../src/plugins/gramplet/PedigreeGramplet.py:227
|
||||
#, fuzzy, python-format
|
||||
@@ -16201,7 +16201,7 @@ msgstr "O estilo usado para o nome do cônjuge."
|
||||
|
||||
#: ../src/plugins/textreport/KinshipReport.py:102
|
||||
msgid "Kinship Report for %s"
|
||||
msgstr "Relatório de parentesco para %s"
|
||||
msgstr "Relatório de Parentesco de %s"
|
||||
|
||||
#: ../src/plugins/textreport/KinshipReport.py:330
|
||||
msgid "The maximum number of descendant generations"
|
||||
@@ -16213,7 +16213,7 @@ msgstr "Número maximum de gerações ascendentes"
|
||||
|
||||
#: ../src/plugins/textreport/KinshipReport.py:338
|
||||
msgid "Whether to include spouses"
|
||||
msgstr "Se deseja incluir os cônjuges"
|
||||
msgstr "Se deve incluir os cônjuges"
|
||||
|
||||
#: ../src/plugins/textreport/KinshipReport.py:341
|
||||
msgid "Include cousins"
|
||||
@@ -16229,12 +16229,12 @@ msgstr "Inclui tios/tias/sobrinhos/sobrinhas"
|
||||
|
||||
#: ../src/plugins/textreport/KinshipReport.py:346
|
||||
msgid "Whether to include aunts/uncles/nephews/nieces"
|
||||
msgstr "Se deseja incluir tios/tias/sobrinhos/sobrinhas"
|
||||
msgstr "Se deve incluir tios/tias/sobrinhos/sobrinhas"
|
||||
|
||||
#: ../src/plugins/textreport/KinshipReport.py:371
|
||||
#: ../src/plugins/textreport/Summary.py:273
|
||||
msgid "The basic style used for sub-headings."
|
||||
msgstr "O estilo básico utilizado para sub-títulos."
|
||||
msgstr "O estilo de base utilizado nos sub-cabeçalhos."
|
||||
|
||||
#: ../src/plugins/textreport/MarkerReport.py:82
|
||||
#, fuzzy, python-format
|
||||
|
||||
+5555
-3162
File diff suppressed because it is too large
Load Diff
+4
-1
@@ -62,7 +62,7 @@ import gtk
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gen.ggettext import sgettext as _
|
||||
from gen.lib import Date
|
||||
from gen.lib.date import Date, NextYear
|
||||
import DateHandler
|
||||
import const
|
||||
import GrampsDisplay
|
||||
@@ -150,6 +150,9 @@ class DateEdit(object):
|
||||
# if text could not be parsed it is assumed invalid
|
||||
if self.date_obj.get_modifier() == Date.MOD_TEXTONLY:
|
||||
return ValidationError(_('Bad Date'))
|
||||
elif (self.date_obj.to_calendar(calendar_name=Date.CAL_GREGORIAN) >>
|
||||
NextYear()):
|
||||
return ValidationError(_('Date more than one year in the future'))
|
||||
|
||||
def invoke_date_editor(self, obj):
|
||||
"""
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
# but that is not necessarily portable.
|
||||
# If not using GNU make, then list all .py files individually
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/DateHandler
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
_Date_bg.py\
|
||||
_Date_ca.py\
|
||||
_Date_cs.py\
|
||||
@@ -32,7 +30,7 @@ pkgdata_PYTHON = \
|
||||
__init__.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/DateHandler
|
||||
pkgpythondir = @pkgpythondir@/DateHandler
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/DateHandler
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
MOSTLYCLEANFILES = *pyc *pyo
|
||||
@@ -50,4 +48,4 @@ docs:
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
@@ -96,18 +96,20 @@ def julian_valid(date_tuple):
|
||||
|
||||
def swedish_valid(date_tuple):
|
||||
""" Checks if date_tuple is a valid date in Swedish Calendar """
|
||||
valid = gregorian_valid(date_tuple)
|
||||
# not sure how <= and >= works with tuples???
|
||||
valid_J = julian_valid(date_tuple)
|
||||
date_tuple = (date_tuple[2], date_tuple[1], date_tuple[0])
|
||||
if date_tuple <= (1700, 2, 28):
|
||||
valid = False
|
||||
if date_tuple == (1700, 2, 29): # leapday 1700 was skipped
|
||||
valid = False
|
||||
if date_tuple == (1712, 2, 30): # extra day was inserted 1712
|
||||
valid = True
|
||||
if date_tuple >= (1712, 3, 1): # back to julian
|
||||
valid = False
|
||||
return valid
|
||||
# Swedish calendar starts as Julian 1700-03-01 and ends 1712-03-01 as Julian
|
||||
if date_tuple >= (1700, 2, 29) and date_tuple < (1712, 3, 1):
|
||||
if date_tuple == (1712, 2, 30): # extra day was inserted 1712, not valid Julian
|
||||
return True
|
||||
if valid_J:
|
||||
if date_tuple == (1700, 2, 29): # leapday 1700 was skipped
|
||||
return False
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
else:
|
||||
return False
|
||||
|
||||
def french_valid(date_tuple):
|
||||
""" Checks if date_tuple is a valid date in French Calendar """
|
||||
@@ -216,7 +218,7 @@ class DateParser(object):
|
||||
"januari" : 1, "februari" : 2,
|
||||
"mars" : 3, "april" : 4,
|
||||
"maj" : 5, "juni" : 6,
|
||||
"juli" : 7, "augisti" : 8,
|
||||
"juli" : 7, "augusti" : 8,
|
||||
"september" : 9, "oktober" : 10,
|
||||
"november" : 11, "december" : 12,
|
||||
}
|
||||
|
||||
+126
-10
@@ -48,6 +48,59 @@ from _DateHandler import register_datehandler
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class DateParserLT(DateParser):
|
||||
"""
|
||||
Convert a text string into a Date object. If the date cannot be
|
||||
converted, the text string is assigned.
|
||||
"""
|
||||
|
||||
month_to_int = DateParser.month_to_int
|
||||
|
||||
# Custom months not the same as long months
|
||||
|
||||
month_to_int[u"sausis"] = 1
|
||||
month_to_int[u"vasaris"] = 2
|
||||
month_to_int[u"kovas"] = 3
|
||||
month_to_int[u"balandis"] = 4
|
||||
month_to_int[u"gegužė"] = 5
|
||||
month_to_int[u"gegužis"] = 5
|
||||
month_to_int[u"birželis"] = 6
|
||||
month_to_int[u"liepa"] = 7
|
||||
month_to_int[u"rugpjūtis"] = 8
|
||||
month_to_int[u"rugsėjis"] = 9
|
||||
month_to_int[u"spalis"] = 10
|
||||
month_to_int[u"lapkritis"] = 11
|
||||
month_to_int[u"gruodis"] = 12
|
||||
|
||||
# For not full months
|
||||
|
||||
month_to_int[u"saus"] = 1
|
||||
month_to_int[u"vasa"] = 2
|
||||
month_to_int[u"vasar"] = 2
|
||||
month_to_int[u"bala"] = 4
|
||||
month_to_int[u"balan"] = 4
|
||||
month_to_int[u"baland"] = 4
|
||||
month_to_int[u"gegu"] = 5
|
||||
month_to_int[u"geguž"] = 5
|
||||
month_to_int[u"birž"] = 6
|
||||
month_to_int[u"birže"] = 6
|
||||
month_to_int[u"biržel"] = 6
|
||||
month_to_int[u"liep"] = 7
|
||||
month_to_int[u"rugp"] = 8
|
||||
month_to_int[u"rugpj"] = 8
|
||||
month_to_int[u"rugpjū"] = 8
|
||||
month_to_int[u"rugpjūt"] = 8
|
||||
month_to_int[u"rugs"] = 9
|
||||
month_to_int[u"rugsė"] = 9
|
||||
month_to_int[u"rugsėj"] = 9
|
||||
month_to_int[u"rugsėjis"] = 9
|
||||
month_to_int[u"spal"] = 10
|
||||
month_to_int[u"lapk"] = 11
|
||||
month_to_int[u"lapkr"] = 11
|
||||
month_to_int[u"lapkri"] = 11
|
||||
month_to_int[u"lapkrit"] = 11
|
||||
month_to_int[u"gru"] = 12
|
||||
month_to_int[u"gruo"] = 12
|
||||
month_to_int[u"gruod"] = 12
|
||||
|
||||
modifier_to_int = {
|
||||
u'prieš' : Date.MOD_BEFORE,
|
||||
@@ -64,11 +117,11 @@ class DateParserLT(DateParser):
|
||||
u'h' : Date.CAL_HEBREW,
|
||||
u'islamo' : Date.CAL_ISLAMIC,
|
||||
u'i' : Date.CAL_ISLAMIC,
|
||||
u'prancuzų respublikos': Date.CAL_FRENCH,
|
||||
u'prancūzų respublikos': Date.CAL_FRENCH,
|
||||
u'r' : Date.CAL_FRENCH,
|
||||
u'persų' : Date.CAL_PERSIAN,
|
||||
u'p' : Date.CAL_PERSIAN,
|
||||
u'swedish' : Date.CAL_SWEDISH,
|
||||
u'švedų' : Date.CAL_SWEDISH,
|
||||
u's' : Date.CAL_SWEDISH,
|
||||
}
|
||||
|
||||
@@ -92,6 +145,27 @@ class DateParserLT(DateParser):
|
||||
('|'.join(_range_1), '|'.join(_range_2)),
|
||||
re.IGNORECASE)
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
# FIXME: oficial long date format (ex, 2011 m. vasario 4 d.)
|
||||
# is not recognized correctly:
|
||||
# with self._text2 - day is recognized as year, year - as day
|
||||
# with self._iso - month not recognized, day recognized,
|
||||
# year increased by 1, date treated as double
|
||||
# TODO: in _DateParser.py in _parse_calendar modify groups
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
# # gregorian and julian
|
||||
#
|
||||
# self._text2 = re.compile('(\d+)?\s*?m\.?\s*?%s\.?\s*((\d+)(/\d+)?)?\s*?d?\.?' %
|
||||
# self._mon_str, re.IGNORECASE)
|
||||
#
|
||||
# self._iso = re.compile('(\d+)(/\d+)?\s*?m?\.?\s+?%s\.?\s*((\d+))?\s*?d?\.?' %
|
||||
# self._mon_str, re.IGNORECASE)
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Lithuanian displayer
|
||||
@@ -102,9 +176,13 @@ class DateDisplayLT(DateDisplay):
|
||||
Lithuanian language date display class.
|
||||
"""
|
||||
|
||||
long_months = ( u"", u"Sausis", u"Vasaris", u"Kovas", u"Balandis", u"Gegužė",
|
||||
u"Birželis", u"Liepa", u"Rugpjūtis", u"Rugsejis", u"Spalis",
|
||||
u"Lapkritis", u"Gruodis" )
|
||||
long_months = ( u"", u"sausio", u"vasario", u"kovo", u"balandžio", u"gegužės",
|
||||
u"birželio", u"liepos", u"rugpjūčio", u"rugsėjo", u"spalio",
|
||||
u"lapkričio", u"gruodžio" )
|
||||
|
||||
long_months_vardininkas = ( u"", u"sausis", u"vasaris", u"kovas", u"balandis", u"gegužė",
|
||||
u"birželis", u"liepa", u"rugpjūtis", u"rugsėjis", u"spalis",
|
||||
u"lapkritis", u"gruodis" )
|
||||
|
||||
short_months = ( u"", u"Sau", u"Vas", u"Kov", u"Bal", u"Geg", u"Bir",
|
||||
u"Lie", u"Rgp", u"Rgs", u"Spa", u"Lap", u"Grd" )
|
||||
@@ -112,10 +190,10 @@ class DateDisplayLT(DateDisplay):
|
||||
calendar = (
|
||||
u"", u"julijaus",
|
||||
u"hebrajų",
|
||||
u"prancuzų respublikos",
|
||||
u"prancūzų respublikos",
|
||||
u"persų",
|
||||
u"islamo",
|
||||
u"swedish"
|
||||
u"švedų"
|
||||
)
|
||||
|
||||
_mod_str = (u"",
|
||||
@@ -127,9 +205,47 @@ class DateDisplayLT(DateDisplay):
|
||||
_qual_str = (u"", u"apytikriai ", u"apskaičiuota ")
|
||||
|
||||
formats = (
|
||||
"YYYY-MM-DD (ISO)", "Skaitmeninis", "Mėnuo Diena, Metai",
|
||||
"Mėn DD, YYYY", "Diena Mėnuo Metai", "DD Mėn YYYY"
|
||||
)
|
||||
"mmmm-MM-DD (ISO)", "mmmm m. mėnesio diena d.", "Mėn diena, metai")
|
||||
|
||||
def _display_gregorian(self, date_val):
|
||||
"""
|
||||
display gregorian calendar date in different format
|
||||
"""
|
||||
year = self._slash_year(date_val[2], date_val[3])
|
||||
value = self.display_iso(date_val)
|
||||
|
||||
if self.format == 0:
|
||||
return self.display_iso(date_val)
|
||||
elif self.format == 1:
|
||||
|
||||
# mmmm m. mėnesio diena d. (YYYY m. month DD d.)
|
||||
|
||||
if date_val[0] == 0:
|
||||
if date_val[1] == 0:
|
||||
value = year
|
||||
else:
|
||||
value = "%s m. %s" % (year, self.long_months_vardininkas[date_val[1]])
|
||||
else:
|
||||
value = "%s m. %s %d d." % (year, self.long_months[date_val[1]],
|
||||
date_val[0])
|
||||
elif self.format == 2:
|
||||
|
||||
# MON Day, Year
|
||||
|
||||
if date_val[0] == 0:
|
||||
if date_val[1] == 0:
|
||||
value = year
|
||||
else:
|
||||
value = "%s %s" % (self.short_months[date_val[1]], year)
|
||||
else:
|
||||
value = "%s %d, %s" % (self.short_months[date_val[1]],
|
||||
date_val[0], year)
|
||||
|
||||
|
||||
if date_val[2] < 0:
|
||||
return self._bce_str % value
|
||||
else:
|
||||
return value
|
||||
|
||||
def display(self, date):
|
||||
"""
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
SUBDIRS = Rules SideBar
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/Filters
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/Filters
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
_FilterComboBox.py \
|
||||
_FilterList.py \
|
||||
_FilterMenu.py \
|
||||
@@ -17,7 +17,6 @@ pkgdata_PYTHON = \
|
||||
_SearchFilter.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/Filters
|
||||
pkgpythondir = @pkgpythondir@/Filters
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
MOSTLYCLEANFILES = *pyc *pyo
|
||||
@@ -26,4 +25,4 @@ GRAMPS_PY_MODPATH = "../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# This is the src/Filters/Rules/Event level Makefile for Gramps
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/Filters/Rules/Event
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/Filters/Rules/Event
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
_ChangedSince.py\
|
||||
_MatchesFilter.py\
|
||||
_EventPrivate.py\
|
||||
@@ -24,7 +24,7 @@ pkgdata_PYTHON = \
|
||||
__init__.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/Filters/Rules/Event
|
||||
pkgpythondir = @pkgpythondir@/Filters/Rules/Event
|
||||
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
MOSTLYCLEANFILES = *pyc *pyo
|
||||
@@ -33,4 +33,4 @@ GRAMPS_PY_MODPATH = "../../../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# This is the src/Filters/Rules/Family level Makefile for Gramps
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/Filters/Rules/Family
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/Filters/Rules/Family
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
_AllFamilies.py\
|
||||
_ChangedSince.py\
|
||||
_FamilyPrivate.py\
|
||||
@@ -38,7 +38,6 @@ pkgdata_PYTHON = \
|
||||
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/Filters/Rules/Family
|
||||
pkgpythondir = @pkgpythondir@/Filters/Rules/Family
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
MOSTLYCLEANFILES = *pyc *pyo
|
||||
@@ -47,4 +46,4 @@ GRAMPS_PY_MODPATH = "../../../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
SUBDIRS = Person Family Event Place Source MediaObject Repository Note
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/Filters/Rules
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/Filters/Rules
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
_ChangedSinceBase.py\
|
||||
_Everything.py\
|
||||
_HasEventBase.py\
|
||||
@@ -29,7 +29,6 @@ pkgdata_PYTHON = \
|
||||
_HasMarkerBase.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/Filters/Rules
|
||||
pkgpythondir = @pkgpythondir@/Filters/Rules
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
MOSTLYCLEANFILES = *pyc *pyo
|
||||
@@ -38,4 +37,4 @@ GRAMPS_PY_MODPATH = "../../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# This is the src/Filters/Rules/MediaObject level Makefile for Gramps
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/Filters/Rules/MediaObject
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/Filters/Rules/MediaObject
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
_AllMedia.py\
|
||||
_ChangedSince.py\
|
||||
_HasIdOf.py\
|
||||
@@ -17,7 +17,7 @@ pkgdata_PYTHON = \
|
||||
__init__.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/Filters/Rules/MediaObject
|
||||
pkgpythondir = @pkgpythondir@/Filters/Rules/MediaObject
|
||||
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
MOSTLYCLEANFILES = *pyc *pyo
|
||||
@@ -26,4 +26,4 @@ GRAMPS_PY_MODPATH = "../../../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# This is the src/Filters/Rules/Note level Makefile for Gramps
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/Filters/Rules/Note
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/Filters/Rules/Note
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
_AllNotes.py\
|
||||
_ChangedSince.py\
|
||||
_HasIdOf.py\
|
||||
@@ -17,7 +17,6 @@ pkgdata_PYTHON = \
|
||||
__init__.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/Filters/Rules/Note
|
||||
pkgpythondir = @pkgpythondir@/Filters/Rules/Note
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
MOSTLYCLEANFILES = *pyc *pyo
|
||||
@@ -26,4 +25,4 @@ GRAMPS_PY_MODPATH = "../../../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# This is the src/Filters/Rules/Person level Makefile for Gramps
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/Filters/Rules/Person
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/Filters/Rules/Person
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
_ChangedSince.py\
|
||||
_Disconnected.py \
|
||||
_DeepRelationshipPathBetween.py \
|
||||
@@ -74,7 +74,6 @@ pkgdata_PYTHON = \
|
||||
__init__.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/Filters/Rules/Person
|
||||
pkgpythondir = @pkgpythondir@/Filters/Rules/Person
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
MOSTLYCLEANFILES = *pyc *pyo
|
||||
@@ -83,4 +82,4 @@ GRAMPS_PY_MODPATH = "../../../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
@@ -63,20 +63,28 @@ class HasCommonAncestorWith(Rule):
|
||||
def add_ancs(self, db, person):
|
||||
if person.handle not in self.ancestor_cache:
|
||||
self.ancestor_cache[person.handle] = set()
|
||||
# We are going to compare ancestors of one person with that of
|
||||
# another person; if that other person is an ancestor and itself
|
||||
# has no ancestors is must be included, this is achieved by the
|
||||
# little trick of making a person his own ancestor.
|
||||
self.ancestor_cache[person.handle].add(person.handle)
|
||||
else:
|
||||
return
|
||||
|
||||
for fam_handle in person.get_parent_family_handle_list():
|
||||
parentless_fam = True
|
||||
fam = db.get_family_from_handle(fam_handle)
|
||||
if fam:
|
||||
for par_handle in (fam.get_father_handle(), fam.get_mother_handle()):
|
||||
if par_handle:
|
||||
parentless_fam = False
|
||||
par = db.get_person_from_handle(par_handle)
|
||||
if par and par.handle not in self.ancestor_cache:
|
||||
self.add_ancs(db, par)
|
||||
if par:
|
||||
self.ancestor_cache[person.handle].add(par)
|
||||
self.ancestor_cache[person.handle] |= self.ancestor_cache[par.handle]
|
||||
if parentless_fam:
|
||||
self.ancestor_cache[person.handle].add(fam_handle)
|
||||
|
||||
def reset(self):
|
||||
self.ancestor_cache = {}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# This is the src/Filters/Rules/Place level Makefile for Gramps
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/Filters/Rules/Place
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/Filters/Rules/Place
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
_AllPlaces.py\
|
||||
_ChangedSince.py\
|
||||
_HasIdOf.py\
|
||||
@@ -21,7 +21,6 @@ pkgdata_PYTHON = \
|
||||
__init__.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/Filters/Rules/Place
|
||||
pkgpythondir = @pkgpythondir@/Filters/Rules/Place
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
MOSTLYCLEANFILES = *pyc *pyo
|
||||
@@ -30,4 +29,4 @@ GRAMPS_PY_MODPATH = "../../../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# This is the src/Filters/Rules/Media level Makefile for Gramps
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/Filters/Rules/Repository
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/Filters/Rules/Repository
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
_AllRepos.py\
|
||||
_ChangedSince.py\
|
||||
_HasIdOf.py\
|
||||
@@ -16,7 +16,6 @@ pkgdata_PYTHON = \
|
||||
__init__.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/Filters/Rules/Repository
|
||||
pkgpythondir = @pkgpythondir@/Filters/Rules/Repository
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
MOSTLYCLEANFILES = *pyc *pyo
|
||||
@@ -25,4 +24,4 @@ GRAMPS_PY_MODPATH = "../../../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# This is the src/Filters/Rules/Source level Makefile for Gramps
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/Filters/Rules/Source
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/Filters/Rules/Source
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
_ChangedSince.py\
|
||||
_MatchesFilter.py\
|
||||
_SourcePrivate.py\
|
||||
@@ -19,7 +19,6 @@ pkgdata_PYTHON = \
|
||||
__init__.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/Filters/Rules/Source
|
||||
pkgpythondir = @pkgpythondir@/Filters/Rules/Source
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
MOSTLYCLEANFILES = *pyc *pyo
|
||||
@@ -28,4 +27,4 @@ GRAMPS_PY_MODPATH = "../../../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# This is the src/Filters/SideBar level Makefile for Gramps
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/Filters/SideBar
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/Filters/SideBar
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
_EventSidebarFilter.py \
|
||||
_FamilySidebarFilter.py \
|
||||
__init__.py \
|
||||
@@ -15,7 +15,6 @@ pkgdata_PYTHON = \
|
||||
_NoteSidebarFilter.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/Filters/SideBar
|
||||
pkgpythondir = @pkgpythondir@/Filters/SideBar
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
MOSTLYCLEANFILES = *pyc *pyo
|
||||
@@ -24,4 +23,4 @@ GRAMPS_PY_MODPATH = "../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
@@ -3,16 +3,14 @@
|
||||
# but that is not necessarily portable.
|
||||
# If not using GNU make, then list all .py files individually
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/GrampsLocale
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/GrampsLocale
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
_GrampsLocale.py\
|
||||
__init__.py
|
||||
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/GrampsLocale
|
||||
pkgpythondir = @pkgpythondir@/GrampsLocale
|
||||
|
||||
|
||||
dist_pkgdata_DATA =
|
||||
|
||||
@@ -23,4 +21,4 @@ GRAMPS_PY_MODPATH = "../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
# but that is not necessarily portable.
|
||||
# If not using GNU make, then list all .py files individually
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/GrampsLogger
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
_ErrorReportAssistant.py\
|
||||
_ErrorView.py\
|
||||
_GtkHandler.py\
|
||||
@@ -13,7 +11,7 @@ pkgdata_PYTHON = \
|
||||
_RotateHandler.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/GrampsLogger
|
||||
pkgpythondir = @pkgpythondir@/GrampsLogger
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/GrampsLogger
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
MOSTLYCLEANFILES = *pyc *pyo
|
||||
@@ -22,4 +20,4 @@ GRAMPS_PY_MODPATH = "../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
@@ -3,16 +3,15 @@
|
||||
# but that is not necessarily portable.
|
||||
# If not using GNU make, then list all .py files individually
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/Merge
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/Merge
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
__init__.py \
|
||||
_MergePerson.py \
|
||||
_MergePlace.py \
|
||||
_MergeSource.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/Merge
|
||||
pkgpythondir = @pkgpythondir@/Merge
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
MOSTLYCLEANFILES = *pyc *pyo
|
||||
@@ -21,4 +20,4 @@ GRAMPS_PY_MODPATH = "../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
# but that is not necessarily portable.
|
||||
# If not using GNU make, then list all .py files individually
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/PluginUtils
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/PluginUtils
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
__init__.py\
|
||||
_GuiOptions.py\
|
||||
_Options.py\
|
||||
@@ -23,4 +23,4 @@ GRAMPS_PY_MODPATH = "../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
@@ -537,7 +537,11 @@ class PluginStatus(ManagedWindow.ManagedWindow):
|
||||
except:
|
||||
callback(_("Unable to open '%s'") % path)
|
||||
return
|
||||
buffer = cStringIO.StringIO(fp.read())
|
||||
try:
|
||||
buffer = cStringIO.StringIO(fp.read())
|
||||
except:
|
||||
callback(_("Error in reading '%s'") % path)
|
||||
return
|
||||
fp.close()
|
||||
# file_obj is either Zipfile or TarFile
|
||||
if path.endswith(".zip") or path.endswith(".ZIP"):
|
||||
|
||||
@@ -259,7 +259,7 @@ def cli_tool(dbstate, name,category,tool_class, options_class, options_str_dict)
|
||||
|
||||
# run tool
|
||||
try:
|
||||
tool_class(dbstate,None, options_class, name,None)
|
||||
tool_class(dbstate, None, clt.option_class, name, None)
|
||||
except:
|
||||
log.error("Failed to start tool.", exc_info=True)
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# This is the src/Report level Makefile for Gramps
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/ReportBase
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/ReportBase
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
__init__.py\
|
||||
_Bibliography.py\
|
||||
_CommandLineReport.py\
|
||||
@@ -32,4 +32,4 @@ GRAMPS_PY_MODPATH = "../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
@@ -223,7 +223,7 @@ class Bibliography(object):
|
||||
if ( self.mode & self.MODE_DATE ) == self.MODE_DATE:
|
||||
date1 = source_ref1.get_date_object()
|
||||
date2 = source_ref2.get_date_object()
|
||||
if date1.is_equal(date2):
|
||||
if not date1.is_equal(date2):
|
||||
return False
|
||||
if ( self.mode & self.MODE_CONF ) == self.MODE_CONF:
|
||||
conf1 = source_ref1.get_confidence_level()
|
||||
|
||||
@@ -129,7 +129,17 @@ def write_endnotes(bibliography, database, doc, printnotes=False):
|
||||
first = True
|
||||
reflines = ""
|
||||
for key, ref in ref_list:
|
||||
txt = "%s: %s" % (key, ref.get_page())
|
||||
datepresent = False
|
||||
date = ref.get_date_object()
|
||||
if date is not None and not date.is_empty():
|
||||
datepresent = True
|
||||
if datepresent:
|
||||
if ref.get_page():
|
||||
txt = "%s: %s - %s" % (key, ref.get_page(), str(date))
|
||||
else:
|
||||
txt = "%s: %s" % (key, str(date))
|
||||
else:
|
||||
txt = "%s: %s" % (key, ref.get_page())
|
||||
if first:
|
||||
reflines += txt
|
||||
first = False
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
# This is the src/Report level Makefile for Gramps
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/Simple
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/Simple
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
_SimpleDoc.py\
|
||||
_SimpleAccess.py\
|
||||
_SimpleTable.py\
|
||||
__init__.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/Simple
|
||||
pkgpythondir = @pkgpythondir@/Simple
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
MOSTLYCLEANFILES = *pyc *pyo
|
||||
@@ -18,4 +17,4 @@ GRAMPS_PY_MODPATH = "../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
+1
-2
@@ -252,8 +252,7 @@ def run_thumbnailer(mime_type, src_file, dest_file, size=const.THUMBSCALE):
|
||||
'%o' : dest_file,
|
||||
}
|
||||
cmdlist = [ sublist.get(x, x) for x in cmd.split() ]
|
||||
os.spawnvpe(os.P_WAIT, cmdlist[0], cmdlist, os.environ)
|
||||
return True
|
||||
return os.spawnvpe(os.P_WAIT, cmdlist[0], cmdlist, os.environ) == 0
|
||||
return False
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
+4
-4
@@ -665,7 +665,7 @@ class ProbablyAlive(object):
|
||||
val = d.get_year() - years
|
||||
d.set_year(val)
|
||||
return (d, d.copy_offset_ymd(self.MAX_AGE_PROB_ALIVE),
|
||||
_("descendent birth date"),
|
||||
_("descendant birth date"),
|
||||
child)
|
||||
child_death_ref = child.get_death_ref()
|
||||
if child_death_ref:
|
||||
@@ -674,7 +674,7 @@ class ProbablyAlive(object):
|
||||
if dobj.get_start_date() != gen.lib.Date.EMPTY:
|
||||
return (dobj.copy_offset_ymd(- self.AVG_GENERATION_GAP),
|
||||
dobj.copy_offset_ymd(- self.AVG_GENERATION_GAP + self.MAX_AGE_PROB_ALIVE),
|
||||
_("descendent death date"),
|
||||
_("descendant death date"),
|
||||
child)
|
||||
date1, date2, explain, other = descendants_too_old (child, years + self.AVG_GENERATION_GAP)
|
||||
if date1 and date2:
|
||||
@@ -690,7 +690,7 @@ class ProbablyAlive(object):
|
||||
val = d.get_year() - years
|
||||
d.set_year(val)
|
||||
return (d, d.copy_offset_ymd(self.MAX_AGE_PROB_ALIVE),
|
||||
_("descendent birth-related date"),
|
||||
_("descendant birth-related date"),
|
||||
child)
|
||||
|
||||
elif ev and ev.type.is_death_fallback():
|
||||
@@ -698,7 +698,7 @@ class ProbablyAlive(object):
|
||||
if dobj.get_start_date() != gen.lib.Date.EMPTY:
|
||||
return (dobj.copy_offset_ymd(- self.AVG_GENERATION_GAP),
|
||||
dobj.copy_offset_ymd(- self.AVG_GENERATION_GAP + self.MAX_AGE_PROB_ALIVE),
|
||||
_("descendent death-related date"),
|
||||
_("descendant death-related date"),
|
||||
child)
|
||||
|
||||
return (None, None, "", None)
|
||||
|
||||
+5
-5
@@ -3,9 +3,9 @@
|
||||
# but that is not necessarily portable.
|
||||
# If not using GNU make, then list all .py files individually
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/cli
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/cli
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
__init__.py \
|
||||
arghandler.py \
|
||||
argparser.py \
|
||||
@@ -13,7 +13,7 @@ pkgdata_PYTHON = \
|
||||
grampscli.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/cli
|
||||
pkgpythondir = @pkgpythondir@/cli
|
||||
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
MOSTLYCLEANFILES = *pyc *pyo
|
||||
@@ -22,7 +22,7 @@ GRAMPS_PY_MODPATH = "../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
pylint:
|
||||
PYTHONPATH=$(GRAMPS_PY_MODPATH) pylint $(pkgdata_PYTHON) > pylint.out
|
||||
PYTHONPATH=$(GRAMPS_PY_MODPATH) pylint $(pkgpython_PYTHON) > pylint.out
|
||||
|
||||
+2
-2
@@ -42,10 +42,10 @@ from gettext import gettext as _
|
||||
#-------------------------------------------------------------------------
|
||||
PROGRAM_NAME = "Gramps"
|
||||
if "@VERSIONSTRING@" == "@" + "VERSIONSTRING" + "@":
|
||||
VERSION = "3.2.5"
|
||||
VERSION = "3.2.7"
|
||||
else:
|
||||
VERSION = "@VERSIONSTRING@"
|
||||
VERSION_TUPLE = (3, 2, 5)
|
||||
VERSION_TUPLE = (3, 2, 7)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
+38
-37
@@ -83,6 +83,7 @@ img {
|
||||
margin:0 auto;
|
||||
padding: 1cm 0px .5em 0px;
|
||||
background:url(../images/Web_Mainz_Mid.png) #FFF2C6 repeat;
|
||||
overflow: hidden;
|
||||
}
|
||||
.content div.snapshot {
|
||||
margin:0;
|
||||
@@ -132,7 +133,7 @@ h4 {
|
||||
font-size:1.4em;
|
||||
font-weight:normal;
|
||||
font-style:italic;
|
||||
color:#767D25;
|
||||
color:#000;
|
||||
text-align:center;
|
||||
margin:0;
|
||||
padding:.5em 0 .2em 0;
|
||||
@@ -608,10 +609,12 @@ table.individuallist tbody tr td.ColumnName a {
|
||||
#streetaddress {
|
||||
display:block;
|
||||
}
|
||||
#locality, .locality {
|
||||
display: block;
|
||||
}
|
||||
#city:after {
|
||||
content:",";
|
||||
}
|
||||
#country { }
|
||||
#email {
|
||||
display:block;
|
||||
}
|
||||
@@ -625,15 +628,12 @@ table.individuallist tbody tr td.ColumnName a {
|
||||
/* Download
|
||||
----------------------------------------------------- */
|
||||
#Download {
|
||||
padding:1cm;
|
||||
height:396px;
|
||||
width: 965px;
|
||||
float: center;
|
||||
}
|
||||
table.download {
|
||||
border:solid 2px #000;
|
||||
width:100%;
|
||||
}
|
||||
table.download img {
|
||||
float:center;
|
||||
width:97%;
|
||||
}
|
||||
table.download thead tr th {
|
||||
text-align:center;
|
||||
@@ -912,51 +912,52 @@ div#sourcerefs ol li ol {
|
||||
/* Footer
|
||||
----------------------------------------------------- */
|
||||
#footer {
|
||||
clear:both;
|
||||
width:965px;
|
||||
font-size:12px;
|
||||
line-height:130%;
|
||||
font-family:sans-serif;
|
||||
margin:0 auto;
|
||||
padding:15px 0 0 0;
|
||||
background:url(../images/Web_Mainz_MidLight.png) #FFF2C6;
|
||||
border-top:dashed 1px #7D5925;
|
||||
overflow: hidden;
|
||||
clear: both;
|
||||
width: 965px;
|
||||
font-size: 12px;
|
||||
line-height: 130%;
|
||||
font-family: sans-serif;
|
||||
margin: 0 auto;
|
||||
padding: 15px 0 0 0;
|
||||
background: url(../images/Web_Mainz_MidLight.png) #FFF2C6;
|
||||
border-top: dashed 1px #7D5925;
|
||||
}
|
||||
#footer a, #footer a:visited {
|
||||
text-decoration:none;
|
||||
text-decoration: none;
|
||||
}
|
||||
#footer a:hover {
|
||||
text-decoration:underline;
|
||||
text-decoration: underline;
|
||||
}
|
||||
#footer img {
|
||||
border:0;
|
||||
margin:0 auto;
|
||||
vertical-align:middle;
|
||||
border: 0;
|
||||
margin: 0 auto;
|
||||
vertical-align: middle;
|
||||
}
|
||||
#footer p#createdate {
|
||||
float:left;
|
||||
width:40%;
|
||||
text-align:left;
|
||||
margin-left:10px;
|
||||
float: left;
|
||||
width: 45%;
|
||||
text-align: left;
|
||||
margin-left: 10px;
|
||||
}
|
||||
#footer p#copyright {
|
||||
float:right;
|
||||
width:40%;
|
||||
text-align:right;
|
||||
margin-right:10px;
|
||||
float: right;
|
||||
width: 40%;
|
||||
text-align: right;
|
||||
margin-right: 10px;
|
||||
}
|
||||
#footer p#copyright img {
|
||||
margin-right:10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
#user_footer {
|
||||
width:70%;
|
||||
float:left;
|
||||
margin:1em;
|
||||
width: 70%;
|
||||
float: left;
|
||||
margin: 1em;
|
||||
}
|
||||
#user_footer p {
|
||||
font:normal 1em/1.2em serif;
|
||||
margin:0;
|
||||
padding:0;
|
||||
font: normal 1em/1.2em serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Calendar Styles
|
||||
|
||||
+33
-66
@@ -204,90 +204,57 @@ p#user_header {
|
||||
background-color:#542;
|
||||
}
|
||||
|
||||
/* Navigation
|
||||
/* Alphabet and Navigation Menus
|
||||
----------------------------------------------------- */
|
||||
div#navigation, div#subnavigation {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
div#navigation ul, div#subnavigation ul {
|
||||
list-style:none;
|
||||
min-width: 900px;
|
||||
height: 40px;
|
||||
margin:0;
|
||||
padding: 0px 0px 0px 16px;
|
||||
border-bottom: solid 2px #5D835F;
|
||||
}
|
||||
div#navigation ul li, div#subnavigation ul li {
|
||||
float:left;
|
||||
}
|
||||
div#navigation ul li a, div#subnavigation ul li a {
|
||||
display: block;
|
||||
padding: 12px 16px 14px 1px;
|
||||
float:left;
|
||||
font: .8em bold italic small-caps verdana, serif;
|
||||
color: #000;
|
||||
text-decoration:none;
|
||||
margin:0;
|
||||
}
|
||||
div#navigation ul li a:hover, div#subnavigation ul li a:hover {
|
||||
background-color: #C1B398;
|
||||
}
|
||||
#navigation ul li.CurrentSection a, #subnavigation ul li.CurrentSection a {
|
||||
font-size:19px;
|
||||
margin-top:-6px;
|
||||
padding-top:11px;
|
||||
padding-bottom:8px;
|
||||
border-right:solid 1px #542;
|
||||
border-left:solid 1px #542;
|
||||
border-bottom:solid 1px #FFF;
|
||||
background-color:#FFF;
|
||||
}
|
||||
#navigation ul li.CurrentSection a:hover {
|
||||
background-color:#FFF;
|
||||
}
|
||||
#subnavigation ul li.CurrentSection a {
|
||||
border-width:0 0 1px 0;
|
||||
}
|
||||
|
||||
/* Alphabet Navigation
|
||||
----------------------------------------------------- */
|
||||
div#alphabet {
|
||||
div#alphabet, div#navigation, div#subnavigation {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
background-color: #A97;
|
||||
}
|
||||
div#alphabet ul {
|
||||
list-style:none;
|
||||
min-width:770px;
|
||||
height:24px;
|
||||
margin:0;
|
||||
div#alphabet ul, div#navigation ul, div#subnavigation ul {
|
||||
list-style: none;
|
||||
min-width: 770px;
|
||||
height: 24px;
|
||||
margin: 0;
|
||||
padding: 0px 0px 0px 16px;
|
||||
border-width: 2px 0px 4px 0px;
|
||||
border-style: solid;
|
||||
border-color: #000;
|
||||
}
|
||||
div#alphabet ul li:after {
|
||||
content:" |";
|
||||
div#alphabet ul li:after, div#navigation ul li:after, div#subnavigation ul li:after {
|
||||
content: " |";
|
||||
}
|
||||
div#alphabet ul li {
|
||||
margin:0;
|
||||
float:left;
|
||||
div#alphabet ul li, div#navigation ul li, div#subnavigation ul li {
|
||||
margin: 0;
|
||||
float: left;
|
||||
}
|
||||
div#alphabet ul li a {
|
||||
display:block;
|
||||
div#alphabet ul li a, div#navigation ul li a, div#subnavigation ul li a {
|
||||
display: block;
|
||||
padding: 4px 8px 4px 8px;
|
||||
float:left;
|
||||
font:bold 16px/100% sans;
|
||||
margin:0;
|
||||
text-decoration:none;
|
||||
float: left;
|
||||
font: bold 16px/100% sans;
|
||||
margin: 0;
|
||||
text-decoration: none;
|
||||
color: #000;
|
||||
}
|
||||
div#alphabet ul li a:hover {
|
||||
div#alphabet ul li a:hover, div#navigation ul li a:hover, div#subnavigation ul li a:hover {
|
||||
background-color: #000;
|
||||
color: #FFF;
|
||||
}
|
||||
div#navigation ul li.CurrentSection a, div#subnavigation ul li.CurrentSection a {
|
||||
padding: 4px 2px 3px 2px;
|
||||
border-right: solid 1px #542;
|
||||
border-left: solid 1px #542;
|
||||
border-bottom: solid 2px #5D835F;
|
||||
background-color: #F2F6EE;
|
||||
}
|
||||
div#navigation ul li.CurrentSection a:hover {
|
||||
background-color: #5D835F;
|
||||
color: #FFF;
|
||||
}
|
||||
div#subnavigation ul li.CurrentSection a {
|
||||
border-width: 0 0 1px 0;
|
||||
}
|
||||
|
||||
/* Main Table
|
||||
----------------------------------------------------- */
|
||||
|
||||
+3
-4
@@ -12,15 +12,14 @@ SUBDIRS = \
|
||||
proxy \
|
||||
utils
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/gen
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/gen
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
__init__.py \
|
||||
ggettext.py \
|
||||
updatecallback.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/gen
|
||||
pkgpythondir = @pkgpythondir@/gen
|
||||
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
@@ -30,4 +29,4 @@ GRAMPS_PY_MODPATH = "../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
# but that is not necessarily portable.
|
||||
# If not using GNU make, then list all .py files individually
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/gen/db
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/gen/db
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
__init__.py \
|
||||
backup.py \
|
||||
base.py \
|
||||
@@ -20,7 +20,6 @@ pkgdata_PYTHON = \
|
||||
write.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/gen/db
|
||||
pkgpythondir = @pkgpythondir@/gen/db
|
||||
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
@@ -30,4 +29,4 @@ GRAMPS_PY_MODPATH = "../../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
@@ -59,8 +59,8 @@ DBMODE_W = "w" # Full Reaw/Write access
|
||||
DBPAGE = 16384 # Size of the pages used to hold items in the database
|
||||
DBMODE = 0666 # Unix mode for database creation
|
||||
DBCACHE = 0x4000000 # Size of the shared memory buffer pool
|
||||
DBLOCKS = 25000 # Maximum number of locks supported
|
||||
DBOBJECTS = 25000 # Maximum number of simultaneously locked objects
|
||||
DBLOCKS = 100000 # Maximum number of locks supported
|
||||
DBOBJECTS = 100000 # Maximum number of simultaneously locked objects
|
||||
DBUNDO = 1000 # Maximum size of undo buffer
|
||||
|
||||
from bsddb.db import DB_CREATE, DB_AUTO_COMMIT, DB_DUP, DB_DUPSORT, DB_RDONLY
|
||||
|
||||
@@ -67,6 +67,29 @@ class DbVersionError(Exception):
|
||||
"Gramps.\nPlease upgrade to the corresponding version or use "
|
||||
"XML for porting data between different database versions.")
|
||||
|
||||
class DbEnvironmentError(Exception):
|
||||
"""
|
||||
Error used to report that the database 'environment' could not be opened.
|
||||
Most likely, the database was created by a different version of the underlying database engine.
|
||||
"""
|
||||
def __init__(self, msg):
|
||||
Exception.__init__(self)
|
||||
self.msg = msg
|
||||
|
||||
def __str__(self):
|
||||
return (_("Gramps has detected an problem in opening the 'environment' "
|
||||
"of the underlying Berkeley database. The most likely cause "
|
||||
"is that the database was created with an old version "
|
||||
"of the Berkeley database, and you are now using a new version. "
|
||||
"It is quite likely that your database has not been "
|
||||
"changed by Gramps.\nIf possible, you could revert to your "
|
||||
"old version of Gramps and its support software; export "
|
||||
"your database to XML; close the database; then upgrade again "
|
||||
"to this version "
|
||||
"and import the XML file. Alternatively, it may be possible "
|
||||
"to upgrade your database.")
|
||||
+ '\n\n' + str(self.msg))
|
||||
|
||||
class DbUpgradeRequiredError(Exception):
|
||||
"""
|
||||
Error used to report that a database needs to be upgraded before it can be
|
||||
|
||||
+9
-6
@@ -419,13 +419,12 @@ class DbBsddbRead(DbReadBase, Callback):
|
||||
self.emit('repository-rebuild')
|
||||
self.emit('note-rebuild')
|
||||
|
||||
@staticmethod
|
||||
def __find_next_gramps_id(prefix, map_index, trans):
|
||||
def __find_next_gramps_id(self, prefix, map_index, trans):
|
||||
"""
|
||||
Helper function for find_next_<object>_gramps_id methods
|
||||
"""
|
||||
index = prefix % map_index
|
||||
while trans.has_key(str(index)):
|
||||
while trans.get(str(index), txn=self.txn) is not None:
|
||||
map_index += 1
|
||||
index = prefix % map_index
|
||||
map_index += 1
|
||||
@@ -606,8 +605,8 @@ class DbBsddbRead(DbReadBase, Callback):
|
||||
|
||||
def __get_obj_from_gramps_id(self, val, tbl, class_, prim_tbl):
|
||||
try:
|
||||
if tbl.has_key(str(val)):
|
||||
data = tbl.get(str(val), txn=self.txn)
|
||||
data = tbl.get(str(val), txn=self.txn)
|
||||
if data is not None:
|
||||
obj = class_()
|
||||
### FIXME: this is a dirty hack that works without no
|
||||
### sensible explanation. For some reason, for a readonly
|
||||
@@ -713,6 +712,8 @@ class DbBsddbRead(DbReadBase, Callback):
|
||||
"""
|
||||
Return if a key exists in the name_group table.
|
||||
"""
|
||||
# The use of has_key seems allright because there is no write lock
|
||||
# on the name_group table when this is called.
|
||||
return self.name_group.has_key(str(name))
|
||||
|
||||
def get_number_of_records(self, table):
|
||||
@@ -962,7 +963,7 @@ class DbBsddbRead(DbReadBase, Callback):
|
||||
|
||||
table = key2table[obj_key]
|
||||
#return str(gramps_id) in table
|
||||
return table.has_key(str(gramps_id))
|
||||
return table.get(str(gramps_id), txn=self.txn) is not None
|
||||
|
||||
def find_initial_person(self):
|
||||
person = self.get_default_person()
|
||||
@@ -979,6 +980,8 @@ class DbBsddbRead(DbReadBase, Callback):
|
||||
str_ = val % 1
|
||||
except TypeError: # missing conversion specifier
|
||||
prefix_var = val + "%d"
|
||||
except ValueError: # incomplete format
|
||||
prefix_var = default+"%04d"
|
||||
else:
|
||||
prefix_var = val # OK as given
|
||||
else:
|
||||
|
||||
@@ -248,7 +248,7 @@ class DbUndo(object):
|
||||
if db.undo_callback:
|
||||
if self.undo_available():
|
||||
db.undo_callback(_("_Undo %s")
|
||||
% transaction.get_description())
|
||||
% self.translist[self.undoindex].get_description())
|
||||
else:
|
||||
db.undo_callback(None)
|
||||
|
||||
|
||||
+30
-10
@@ -51,8 +51,8 @@ from sys import maxint
|
||||
from gen.lib import (GenderStats, Person, Family, Event, Place, Source,
|
||||
MediaObject, Repository, Note)
|
||||
from gen.db import (DbBsddbRead, DbWriteBase, BSDDBTxn,
|
||||
DbTxn, GrampsCursor,DbVersionError,
|
||||
DbUpgradeRequiredError,
|
||||
DbTxn, GrampsCursor, DbVersionError,
|
||||
DbUpgradeRequiredError, DbEnvironmentError,
|
||||
DbUndoBSDDB as DbUndo)
|
||||
from gen.db.dbconst import *
|
||||
from gen.utils.callback import Callback
|
||||
@@ -393,18 +393,32 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
|
||||
|
||||
self.set_auto_remove()
|
||||
|
||||
# Set not to flush to disk synchronous, this greatly speeds up
|
||||
# database changes, but comes at the cause of loss of durability, so
|
||||
# power loss might cause a need to run db recovery, see BSDDB manual
|
||||
## NOTE: due to pre 4.8 bsddb bug it is needed to set this flag before
|
||||
## open of env, #16492 - http://download.oracle.com/docs/cd/E17076_02/html/installation/changelog_4_8.html
|
||||
self.env.set_flags(db.DB_TXN_WRITE_NOSYNC, 1)
|
||||
|
||||
# The DB_PRIVATE flag must go if we ever move to multi-user setup
|
||||
env_flags = db.DB_CREATE | db.DB_PRIVATE |\
|
||||
db.DB_INIT_MPOOL | db.DB_INIT_LOCK |\
|
||||
db.DB_INIT_LOG | db.DB_INIT_TXN | db.DB_THREAD
|
||||
|
||||
|
||||
# As opposed to before, we always try recovery on databases
|
||||
env_flags |= db.DB_RECOVER
|
||||
|
||||
# Environment name is now based on the filename
|
||||
env_name = name
|
||||
|
||||
self.env.open(env_name, env_flags)
|
||||
try:
|
||||
self.env.open(env_name, env_flags)
|
||||
except Exception, msg:
|
||||
try:
|
||||
self.__close_early()
|
||||
except:
|
||||
pass
|
||||
raise DbEnvironmentError(msg)
|
||||
self.env.txn_checkpoint()
|
||||
|
||||
if callback:
|
||||
@@ -1002,6 +1016,11 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
|
||||
return
|
||||
self.env.txn_checkpoint()
|
||||
|
||||
lockstats = self.env.lock_stat()
|
||||
_LOG.debug("lock occupancy: %d%%, locked object occupancy: %d%%" % (
|
||||
round(lockstats['maxnlocks']*100/lockstats['maxlocks']),
|
||||
round(lockstats['maxnobjects']*100/lockstats['maxobjects'])))
|
||||
|
||||
self.__close_metadata()
|
||||
self.name_group.close()
|
||||
self.surnames.close()
|
||||
@@ -1340,7 +1359,8 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
|
||||
except:
|
||||
pass
|
||||
finally:
|
||||
cursor.close()
|
||||
if 'cursor' in locals():
|
||||
cursor.close()
|
||||
|
||||
def commit_base(self, obj, data_map, key, transaction, change_time):
|
||||
"""
|
||||
@@ -1581,8 +1601,8 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
|
||||
self.undodb.clear()
|
||||
self.env.txn_checkpoint()
|
||||
|
||||
if db.version() < (4, 7):
|
||||
self.env.set_flags(db.DB_TXN_NOSYNC, 1) # async txn
|
||||
#if db.version() < (4, 7):
|
||||
# self.env.set_flags(db.DB_TXN_NOSYNC, 1) # async txn
|
||||
|
||||
if self.secondary_connected and not no_magic:
|
||||
# Disconnect unneeded secondary indices
|
||||
@@ -1621,8 +1641,8 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
|
||||
"""
|
||||
if transaction.batch:
|
||||
self.env.txn_checkpoint()
|
||||
if db.version() < (4, 7):
|
||||
self.env.set_flags(db.DB_TXN_NOSYNC, 0) # sync txn
|
||||
#if db.version() < (4, 7):
|
||||
# self.env.set_flags(db.DB_TXN_NOSYNC, 0) # sync txn
|
||||
|
||||
if not transaction.no_magic:
|
||||
# create new secondary indices to replace the ones removed
|
||||
@@ -1671,7 +1691,7 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
|
||||
import upgrade
|
||||
upgrade.gramps_upgrade_14(self)
|
||||
|
||||
print "Upgrade time:", int(time.time()-t), "seconds"
|
||||
_LOG.debug("Upgrade time: %d seconds" % int(time.time()-t))
|
||||
|
||||
def set_auto_remove(self):
|
||||
"""
|
||||
|
||||
@@ -3,15 +3,13 @@
|
||||
# but that is not necessarily portable.
|
||||
# If not using GNU make, then list all .py files individually
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/gen/display
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/gen/display
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
name.py\
|
||||
__init__.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/gen/display
|
||||
pkgpythondir = @pkgpythondir@/gen/display
|
||||
|
||||
|
||||
dist_pkgdata_DATA =
|
||||
|
||||
@@ -22,4 +20,4 @@ GRAMPS_PY_MODPATH = "../../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
# but that is not necessarily portable.
|
||||
# If not using GNU make, then list all .py files individually
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/gen/lib
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/gen/lib
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
addressbase.py \
|
||||
address.py \
|
||||
attrbase.py \
|
||||
@@ -66,7 +66,6 @@ pkgdata_PYTHON = \
|
||||
witness.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/gen/lib
|
||||
pkgpythondir = @pkgpythondir@/gen/lib
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
MOSTLYCLEANFILES = *pyc *pyo
|
||||
@@ -75,7 +74,7 @@ GRAMPS_PY_MODPATH = "../../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
pylint:
|
||||
pylint --disable-msg=W0403,C0103 $(pkgdata_PYTHON)
|
||||
pylint --disable-msg=W0403,C0103 $(pkgpython_PYTHON)
|
||||
|
||||
@@ -65,7 +65,7 @@ class Attribute(SecondaryObject, PrivacyBase, SourceBase, NoteBase):
|
||||
NoteBase.__init__(self, source)
|
||||
|
||||
if source:
|
||||
self.type = source.type
|
||||
self.type = AttributeType(source.type)
|
||||
self.value = source.value
|
||||
else:
|
||||
self.type = AttributeType()
|
||||
|
||||
+20
-5
@@ -550,11 +550,26 @@ def islamic_ymd(sdn):
|
||||
return (year, month, day)
|
||||
|
||||
def swedish_sdn(year, month, day):
|
||||
"""Convert a Swedish (almost Julian) date to an SDN number."""
|
||||
return julian_sdn(year, month, day)-1
|
||||
"""Convert a Swedish date to an SDN number."""
|
||||
datum = (year, month, day)
|
||||
# Swedish Calendar
|
||||
if (1700,3,1) <= datum <= (1712,2,30):
|
||||
return julian_sdn(year, month, day) -1
|
||||
# Gregorian Calendar (1753-03-01)
|
||||
elif (1753, 3, 1) <= datum:
|
||||
return gregorian_sdn(year, month, day)
|
||||
else:
|
||||
return julian_sdn(year, month, day)
|
||||
|
||||
def swedish_ymd(sdn):
|
||||
"""Convert an SDN number to a Swedish (almost Julian) calendar date."""
|
||||
"""Convert an SDN number to a Swedish calendar date."""
|
||||
if sdn == 2346425:
|
||||
return (1712,2,30)
|
||||
return julian_ymd(sdn+1)
|
||||
return (1712,2,30)
|
||||
# Swedish Calendar
|
||||
elif 2342042 <= sdn < 2346425:
|
||||
return julian_ymd(sdn+1)
|
||||
# Gregorian Calendar (1753-03-01)
|
||||
elif 2361390 <= sdn:
|
||||
return gregorian_ymd(sdn)
|
||||
else:
|
||||
return julian_ymd(sdn)
|
||||
|
||||
@@ -55,8 +55,8 @@ class ChildRef(SecondaryObject, PrivacyBase, SourceBase, NoteBase, RefBase):
|
||||
NoteBase.__init__(self, source)
|
||||
RefBase.__init__(self, source)
|
||||
if source:
|
||||
self.frel = source.frel
|
||||
self.mrel = source.mrel
|
||||
self.frel = ChildRefType(source.frel)
|
||||
self.mrel = ChildRefType(source.mrel)
|
||||
else:
|
||||
self.frel = ChildRefType()
|
||||
self.mrel = ChildRefType()
|
||||
|
||||
@@ -1702,6 +1702,16 @@ def Today():
|
||||
current_date.set_yr_mon_day(*time.localtime(time.time())[0:3])
|
||||
return current_date
|
||||
|
||||
def NextYear():
|
||||
"""
|
||||
Returns a Date object set to next year
|
||||
"""
|
||||
import time
|
||||
next_year = Date()
|
||||
thisyear = time.localtime(time.time())
|
||||
next_year.set_yr_mon_day(thisyear[0]+1, thisyear[1], thisyear[2])
|
||||
return next_year
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Date Functions
|
||||
|
||||
@@ -76,7 +76,7 @@ class Event(SourceBase, NoteBase, MediaBase, AttributeBase,
|
||||
|
||||
if source:
|
||||
self.__description = source.__description
|
||||
self.__type = source.__type
|
||||
self.__type = EventType(source.__type)
|
||||
else:
|
||||
self.__description = ""
|
||||
self.__type = EventType()
|
||||
|
||||
@@ -58,7 +58,7 @@ class EventRef(SecondaryObject, PrivacyBase, NoteBase, AttributeBase, RefBase):
|
||||
AttributeBase.__init__(self, source)
|
||||
RefBase.__init__(self, source)
|
||||
if source:
|
||||
self.__role = source.__role
|
||||
self.__role = EventRoleType(source.__role)
|
||||
else:
|
||||
self.__role = EventRoleType()
|
||||
|
||||
|
||||
@@ -189,9 +189,52 @@ class EventType(GrampsType):
|
||||
]
|
||||
|
||||
_ABBREVIATIONS = {
|
||||
BIRTH: _("birth abbreviation|b"),
|
||||
DEATH: _("death abbreviation|d"),
|
||||
MARRIAGE: _("marriage abbreviation|m"),
|
||||
BIRTH: _("birth abbreviation|b."),
|
||||
DEATH: _("death abbreviation|d."),
|
||||
MARRIAGE: _("marriage abbreviation|m."),
|
||||
UNKNOWN: _("Unknown abbreviation|unkn."),
|
||||
CUSTOM: _("Custom abbreviation|cust."),
|
||||
ADOPT: _("Adopted abbreviation|adop."),
|
||||
ADULT_CHRISTEN : _("Adult Christening abbreviation|a.chr."),
|
||||
BAPTISM: _("Baptism abbreviation|bap."),
|
||||
BAR_MITZVAH : _("Bar Mitzvah abbreviation|bar."),
|
||||
BAS_MITZVAH : _("Bas Mitzvah abbreviation|bas."),
|
||||
BLESS: _("Blessing abbreviation|bles."),
|
||||
BURIAL: _("Burial abbreviation|bur."),
|
||||
CAUSE_DEATH : _("Cause Of Death abbreviation|d.cau."),
|
||||
CENSUS: _("Census abbreviation|cens."),
|
||||
CHRISTEN: _("Christening abbreviation|chr."),
|
||||
CONFIRMATION: _("Confirmation abbreviation|conf."),
|
||||
CREMATION: _("Cremation abbreviation|crem."),
|
||||
DEGREE: _("Degree abbreviation|deg."),
|
||||
EDUCATION: _("Education abbreviation|edu."),
|
||||
ELECTED: _("Elected abbreviation|elec."),
|
||||
EMIGRATION: _("Emigration abbreviation|em."),
|
||||
FIRST_COMMUN: _("First Communion abbreviation|f.comm."),
|
||||
IMMIGRATION: _("Immigration abbreviation|im."),
|
||||
GRADUATION: _("Graduation abbreviation|grad."),
|
||||
MED_INFO: _("Medical Information abbreviation|medinf."),
|
||||
MILITARY_SERV: _("Military Service abbreviation|milser."),
|
||||
NATURALIZATION: _("Naturalization abbreviation|nat."),
|
||||
NOB_TITLE: _("Nobility Title abbreviation|nob."),
|
||||
NUM_MARRIAGES: _("Number of Marriages abbreviation|n.o.mar."),
|
||||
OCCUPATION: _("Occupation abbreviation|occ."),
|
||||
ORDINATION: _("Ordination abbreviation|ord."),
|
||||
PROBATE: _("Probate abbreviation|prob."),
|
||||
PROPERTY: _("Property abbreviation|prop."),
|
||||
RELIGION: _("Religion abbreviation|rel."),
|
||||
RESIDENCE: _("Residence abbreviation|res."),
|
||||
RETIREMENT: _("Retirement abbreviation|ret."),
|
||||
WILL: _("Will abbreviation|will."),
|
||||
MARR_SETTL: _("Marriage Settlement abbreviation|m.set."),
|
||||
MARR_LIC: _("Marriage License abbreviation|m.lic."),
|
||||
MARR_CONTR: _("Marriage Contract abbreviation|m.con."),
|
||||
MARR_BANNS: _("Marriage Banns abbreviation|m.ban."),
|
||||
MARR_ALT: _("Alternate Marriage abbreviation|alt.mar."),
|
||||
ENGAGEMENT: _("Engagement abbreviation|engd."),
|
||||
DIVORCE: _("Divorce abbreviation|div."),
|
||||
DIV_FILING: _("Divorce Filing abbreviation|div.f."),
|
||||
ANNULMENT: _("Annulment abbreviation|annul.")
|
||||
}
|
||||
|
||||
def __init__(self, value=None):
|
||||
@@ -243,10 +286,11 @@ class EventType(GrampsType):
|
||||
"""
|
||||
Returns the abbreviation for this event. Uses the explicitly
|
||||
given abbreviations, or first letter of each word, or the first
|
||||
three letters. Appends a period after the abbreviation.
|
||||
three letters. Appends a period after the abbreviation,
|
||||
but not if string is in _ABBREVIATIONS.
|
||||
"""
|
||||
if self.value in self._ABBREVIATIONS:
|
||||
return self._ABBREVIATIONS[self.value] + "."
|
||||
return self._ABBREVIATIONS[self.value]
|
||||
else:
|
||||
abbrev = str(self)
|
||||
if " " in abbrev:
|
||||
|
||||
@@ -78,7 +78,8 @@ class LocationBase(object):
|
||||
:returns: Returns the list of all textual attributes of the object.
|
||||
:rtype: list
|
||||
"""
|
||||
return [self.city, self.state, self.country, self.postal, self.phone]
|
||||
return [self.street, self.city, self.county, self.state, self.country,
|
||||
self.postal, self.phone]
|
||||
|
||||
def set_street(self, val):
|
||||
"""Set the street portion of the Location."""
|
||||
|
||||
+1
-1
@@ -81,7 +81,7 @@ class Name(SecondaryObject, PrivacyBase, SourceBase, NoteBase, DateBase):
|
||||
self.surname = source.surname
|
||||
self.suffix = source.suffix
|
||||
self.title = source.title
|
||||
self.type = source.type
|
||||
self.type = NameType(source.type)
|
||||
self.prefix = source.prefix
|
||||
self.patronymic = source.patronymic
|
||||
self.group_as = source.group_as
|
||||
|
||||
+2
-2
@@ -133,10 +133,10 @@ class Note(BasicPrimaryObject):
|
||||
"""Return the text string associated with the note.
|
||||
|
||||
:returns: The *clear* text of the note contents.
|
||||
:rtype: str
|
||||
:rtype: unicode
|
||||
|
||||
"""
|
||||
return str(self.text)
|
||||
return unicode(self.text)
|
||||
|
||||
def set_styledtext(self, text):
|
||||
"""Set the text associated with the note to the passed string.
|
||||
|
||||
@@ -51,7 +51,7 @@ class RepoRef(SecondaryObject, PrivacyBase, NoteBase, RefBase):
|
||||
RefBase.__init__(self, source)
|
||||
if source:
|
||||
self.call_number = source.call_number
|
||||
self.media_type = source.media_type
|
||||
self.media_type = SourceMediaType(source.media_type)
|
||||
else:
|
||||
self.call_number = ""
|
||||
self.media_type = SourceMediaType()
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ class Url(SecondaryObject, PrivacyBase):
|
||||
if source:
|
||||
self.path = source.path
|
||||
self.desc = source.desc
|
||||
self.type = source.type
|
||||
self.type = UrlType(source.type)
|
||||
else:
|
||||
self.path = ""
|
||||
self.desc = ""
|
||||
|
||||
@@ -3,16 +3,15 @@
|
||||
# but that is not necessarily portable.
|
||||
# If not using GNU make, then list all .py files individually
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/gen/mime
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/gen/mime
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
__init__.py\
|
||||
_gnomemime.py\
|
||||
_winmime.py\
|
||||
_pythonmime.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/gen/mime
|
||||
pkgpythondir = @pkgpythondir@/gen/mime
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
MOSTLYCLEANFILES = *pyc *pyo
|
||||
@@ -21,4 +20,4 @@ GRAMPS_PY_MODPATH = "../../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
@@ -8,9 +8,9 @@ SUBDIRS = \
|
||||
docgen\
|
||||
menu
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/gen/plug
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/gen/plug
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
__init__.py \
|
||||
_docgenplugin.py \
|
||||
_export.py \
|
||||
@@ -22,8 +22,6 @@ pkgdata_PYTHON = \
|
||||
utils.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/gen/plug
|
||||
pkgpythondir = @pkgpythondir@/gen/plug
|
||||
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
MOSTLYCLEANFILES = *pyc *pyo
|
||||
@@ -32,4 +30,4 @@ GRAMPS_PY_MODPATH = "../../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
@@ -3,16 +3,14 @@
|
||||
# but that is not necessarily portable.
|
||||
# If not using GNU make, then list all .py files individually
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/gen/plug/docbackend
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/gen/plug/docbackend
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
__init__.py \
|
||||
cairobackend.py \
|
||||
docbackend.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/gen/plug/docbackend
|
||||
pkgpythondir = @pkgpythondir@/gen/plug/docbackend
|
||||
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
MOSTLYCLEANFILES = *pyc *pyo
|
||||
@@ -21,4 +19,4 @@ GRAMPS_PY_MODPATH = "../../../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
@@ -341,15 +341,35 @@ class DocBackend(object):
|
||||
for opentag in opentags:
|
||||
otext += opentag[0]
|
||||
start = pos
|
||||
#add remainder of text, no markup present there
|
||||
otext += self.ESCAPE_FUNC()(text[start:end])
|
||||
|
||||
#opentags should be empty. If not, user gave tags on positions that
|
||||
# are over the end of the text. Just close the tags still open
|
||||
#add remainder of text, no markup present there if all is correct
|
||||
if opentags:
|
||||
# a problem, we don't have a closing tag left but there are open
|
||||
# tags. Just keep them up to end of text
|
||||
pos = len(text)
|
||||
print 'WARNING: DocBackend : More style tags in text than length '\
|
||||
'of text allows.\n', opentags
|
||||
if pos > start:
|
||||
if split:
|
||||
#make sure text can split
|
||||
splitpos = text[start:pos].find(split)
|
||||
while splitpos != -1:
|
||||
otext += self.ESCAPE_FUNC()(text[start:start+splitpos])
|
||||
#close open tags
|
||||
for opentag in reversed(opentags):
|
||||
otext += opentag[1]
|
||||
#add split text
|
||||
otext += self.ESCAPE_FUNC()(split)
|
||||
#open the tags again
|
||||
for opentag in opentags:
|
||||
otext += opentag[0]
|
||||
#obtain new values
|
||||
start = start + splitpos + lensplit
|
||||
splitpos = text[start:pos].find(split)
|
||||
|
||||
otext += self.ESCAPE_FUNC()(text[start:pos])
|
||||
for opentag in reversed(opentags):
|
||||
otext += opentag[1]
|
||||
|
||||
else:
|
||||
otext += self.ESCAPE_FUNC()(text[start:end])
|
||||
|
||||
return otext
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/gen/plug/docgen
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
__init__.py \
|
||||
basedoc.py \
|
||||
drawdoc.py \
|
||||
@@ -20,7 +20,7 @@ pkgdata_PYTHON = \
|
||||
textdoc.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/gen/plug/docgen
|
||||
pkgpythondir = @pkgpythondir@/gen/plug/docgen
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/gen/plug/docgen
|
||||
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
@@ -30,4 +30,4 @@ GRAMPS_PY_MODPATH = "../../../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
# but that is not necessarily portable.
|
||||
# If not using GNU make, then list all .py files individually
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/gen/plug/menu
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/gen/plug/menu
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
__init__.py \
|
||||
_boolean.py \
|
||||
_booleanlist.py \
|
||||
@@ -28,8 +28,6 @@ pkgdata_PYTHON = \
|
||||
_text.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/gen/plug/menu
|
||||
pkgpythondir = @pkgpythondir@/gen/plug/menu
|
||||
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
MOSTLYCLEANFILES = *pyc *pyo
|
||||
@@ -38,4 +36,4 @@ GRAMPS_PY_MODPATH = "../../../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
# but that is not necessarily portable.
|
||||
# If not using GNU make, then list all .py files individually
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/gen/proxy
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/gen/proxy
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
__init__.py \
|
||||
filter.py \
|
||||
living.py \
|
||||
@@ -14,8 +14,6 @@ pkgdata_PYTHON = \
|
||||
proxybase.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/gen/proxy
|
||||
pkgpythondir = @pkgpythondir@/gen/proxy
|
||||
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
MOSTLYCLEANFILES = *pyc *pyo
|
||||
@@ -24,4 +22,4 @@ GRAMPS_PY_MODPATH = "../../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
# but that is not necessarily portable.
|
||||
# If not using GNU make, then list all .py files individually
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/gen/utils
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/gen/utils
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
__init__.py \
|
||||
callback.py \
|
||||
callman.py \
|
||||
@@ -13,8 +13,6 @@ pkgdata_PYTHON = \
|
||||
fallback.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/gen/utils
|
||||
pkgpythondir = @pkgpythondir@/gen/utils
|
||||
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
MOSTLYCLEANFILES = *pyc *pyo
|
||||
@@ -23,4 +21,4 @@ GRAMPS_PY_MODPATH = "../../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
+3
-5
@@ -9,9 +9,9 @@ SUBDIRS = \
|
||||
views \
|
||||
widgets
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/gui
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/gui
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
__init__.py \
|
||||
columnorder.py \
|
||||
configure.py \
|
||||
@@ -25,8 +25,6 @@ pkgdata_PYTHON = \
|
||||
viewmanager.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/gui
|
||||
pkgpythondir = @pkgpythondir@/gui
|
||||
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
MOSTLYCLEANFILES = *pyc *pyo
|
||||
@@ -35,4 +33,4 @@ GRAMPS_PY_MODPATH = "../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
@@ -1000,7 +1000,7 @@ class GrampsPreferences(ConfigureDialog):
|
||||
def select_mediapath(self, *obj):
|
||||
f = gtk.FileChooserDialog(
|
||||
_("Select media directory"),
|
||||
action=gtk.FILE_CHOOSER_ACTION_CREATE_FOLDER,
|
||||
action=gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER,
|
||||
buttons=(gtk.STOCK_CANCEL,
|
||||
gtk.RESPONSE_CANCEL,
|
||||
gtk.STOCK_APPLY,
|
||||
|
||||
@@ -305,6 +305,10 @@ class DbLoader(CLIDbLoader):
|
||||
except gen.db.exceptions.DbVersionError, msg:
|
||||
self.dbstate.no_database()
|
||||
self._errordialog( _("Cannot open database"), str(msg))
|
||||
except gen.db.exceptions.DbEnvironmentError, msg:
|
||||
_LOG.error("dbloader: read_file: DbEnvironmentError detected")
|
||||
self.dbstate.no_database()
|
||||
self._errordialog( _("Cannot open database"), str(msg))
|
||||
except OSError, msg:
|
||||
self.dbstate.no_database()
|
||||
self._errordialog(
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
SUBDIRS = \
|
||||
displaytabs
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/gui/editors
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/gui/editors
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
addmedia.py\
|
||||
__init__.py\
|
||||
editaddress.py \
|
||||
@@ -37,7 +37,6 @@ pkgdata_PYTHON = \
|
||||
objectentries.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/gui/editors
|
||||
pkgpythondir = @pkgpythondir@/gui/editors
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
MOSTLYCLEANFILES = *pyc *pyo
|
||||
@@ -46,4 +45,4 @@ GRAMPS_PY_MODPATH = "../../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# This is the src/gui/editors/displaytabs level Makefile for Gramps
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/gui/editors/displaytabs
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/gui/editors/displaytabs
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
addrembedlist.py \
|
||||
addressmodel.py \
|
||||
attrembedlist.py \
|
||||
@@ -47,7 +47,6 @@ pkgdata_PYTHON = \
|
||||
__init__.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/gui/editors/displaytabs
|
||||
pkgpythondir = @pkgpythondir@/gui/editors/displaytabs
|
||||
|
||||
# clean up all the byte-compiled files
|
||||
MOSTLYcLEANFILES = *pyc *pyo
|
||||
@@ -56,4 +55,4 @@ GRAMPS_PY_MODPATH = "../../../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
@@ -51,7 +51,7 @@ class ChildModel(gtk.ListStore):
|
||||
def __init__(self, family, db):
|
||||
self.family = family
|
||||
gtk.ListStore.__init__(self, int, str, str, str, str, str,
|
||||
str, str, str, str, str, str, int, int)
|
||||
str, str, str, str, str, str, str, str)
|
||||
self.db = db
|
||||
index = 1
|
||||
for child_ref in self.get_data():
|
||||
@@ -88,12 +88,18 @@ class ChildModel(gtk.ListStore):
|
||||
return u""
|
||||
|
||||
def column_birth_sort(self, data):
|
||||
"""
|
||||
Return a sort key to use for the birth column.
|
||||
As python int can be larger than C int, we cast int
|
||||
to a string of 12 long prepended with 0 as needed.
|
||||
This gives correct string sort for years in the millenia around today
|
||||
"""
|
||||
event_ref = data.get_birth_ref()
|
||||
if event_ref and event_ref.ref:
|
||||
event = self.db.get_event_from_handle(event_ref.ref)
|
||||
return event.get_date_object().get_sort_value()
|
||||
return '%012d' % event.get_date_object().get_sort_value()
|
||||
else:
|
||||
return 0
|
||||
return '%012d' % 0
|
||||
|
||||
def column_death_day(self, data):
|
||||
event_ref = data.get_death_ref()
|
||||
@@ -104,12 +110,18 @@ class ChildModel(gtk.ListStore):
|
||||
return u""
|
||||
|
||||
def column_death_sort(self, data):
|
||||
"""
|
||||
Return a sort key to use for the death column.
|
||||
As python int can be larger than C int, we cast int
|
||||
to a string of 12 long prepended with 0 as needed.
|
||||
This gives correct string sort for years in the millenia around today
|
||||
"""
|
||||
event_ref = data.get_death_ref()
|
||||
if event_ref and event_ref.ref:
|
||||
event = self.db.get_event_from_handle(event_ref.ref)
|
||||
return event.get_date_object().get_sort_value()
|
||||
return '%012d' % event.get_date_object().get_sort_value()
|
||||
else:
|
||||
return 0
|
||||
return '%012d' % 0
|
||||
|
||||
def column_birth_place(self, data):
|
||||
event_ref = data.get_birth_ref()
|
||||
|
||||
@@ -249,8 +249,7 @@ class EventEmbedList(DbGUIElement, GroupEmbeddedList):
|
||||
except Errors.WindowActiveError:
|
||||
from QuestionDialog import WarningDialog
|
||||
WarningDialog(_("Cannot share this reference"),
|
||||
self.__blocked_text() )
|
||||
pass
|
||||
self.__blocked_text())
|
||||
|
||||
def edit_button_clicked(self, obj):
|
||||
ref = self.get_selected()
|
||||
@@ -263,7 +262,7 @@ class EventEmbedList(DbGUIElement, GroupEmbeddedList):
|
||||
except Errors.WindowActiveError:
|
||||
from QuestionDialog import WarningDialog
|
||||
WarningDialog(_("Cannot edit this reference"),
|
||||
self.__blocked_text() )
|
||||
self.__blocked_text())
|
||||
elif ref and ref[0] != self._WORKGROUP:
|
||||
#bring up family editor
|
||||
key = self._groups[ref[0]][0]
|
||||
|
||||
@@ -282,6 +282,16 @@ class GalleryTab(ButtonTab, DbGUIElement):
|
||||
self.changed = True
|
||||
self.rebuild()
|
||||
|
||||
def __blocked_text(self):
|
||||
"""
|
||||
Return the common text used when mediaref cannot be edited
|
||||
"""
|
||||
return _("This media reference cannot be edited at this time. "
|
||||
"Either the associated media object is already being "
|
||||
"edited or another media reference that is associated with "
|
||||
"the same media object is being edited.\n\nTo edit this "
|
||||
"media reference, you need to close the media object.")
|
||||
|
||||
def share_button_clicked(self, obj):
|
||||
"""
|
||||
Function called when the Share button is clicked.
|
||||
@@ -300,7 +310,9 @@ class GalleryTab(ButtonTab, DbGUIElement):
|
||||
EditMediaRef(self.dbstate, self.uistate, self.track,
|
||||
src, sref, self.add_callback)
|
||||
except Errors.WindowActiveError:
|
||||
pass
|
||||
from QuestionDialog import WarningDialog
|
||||
WarningDialog(_("Cannot share this reference"),
|
||||
self.__blocked_text())
|
||||
|
||||
def del_button_clicked(self, obj):
|
||||
ref = self.get_selected()
|
||||
@@ -318,7 +330,9 @@ class GalleryTab(ButtonTab, DbGUIElement):
|
||||
EditMediaRef(self.dbstate, self.uistate, self.track,
|
||||
obj, ref, None)
|
||||
except Errors.WindowActiveError:
|
||||
pass
|
||||
from QuestionDialog import WarningDialog
|
||||
WarningDialog(_("Cannot edit this reference"),
|
||||
self.__blocked_text())
|
||||
|
||||
def media_delete(self, del_media_handle_list):
|
||||
"""
|
||||
|
||||
@@ -113,6 +113,16 @@ class SourceEmbedList(EmbeddedList, DbGUIElement):
|
||||
except Errors.WindowActiveError:
|
||||
pass
|
||||
|
||||
def __blocked_text(self):
|
||||
"""
|
||||
Return the common text used when sourceref cannot be edited
|
||||
"""
|
||||
return _("This source reference cannot be edited at this time. "
|
||||
"Either the associated source is already being edited "
|
||||
"or another source reference that is associated with "
|
||||
"the same source is being edited.\n\nTo edit this "
|
||||
"source reference, you need to close the source.")
|
||||
|
||||
def share_button_clicked(self, obj):
|
||||
from gui.editors import EditSourceRef
|
||||
SelectSource = SelectorFactory('Source')
|
||||
@@ -130,7 +140,9 @@ class SourceEmbedList(EmbeddedList, DbGUIElement):
|
||||
self.object_added)
|
||||
|
||||
except Errors.WindowActiveError:
|
||||
pass
|
||||
from QuestionDialog import WarningDialog
|
||||
WarningDialog(_("Cannot share this reference"),
|
||||
self.__blocked_text())
|
||||
|
||||
def edit_button_clicked(self, obj):
|
||||
from gui.editors import EditSourceRef
|
||||
@@ -143,14 +155,8 @@ class SourceEmbedList(EmbeddedList, DbGUIElement):
|
||||
src, sref, self.object_edited)
|
||||
except Errors.WindowActiveError:
|
||||
from QuestionDialog import WarningDialog
|
||||
WarningDialog(
|
||||
_("Cannot edit this reference"),
|
||||
_("This source reference cannot be edited at this time. "
|
||||
"Either the associated source is already being edited "
|
||||
"or another source reference that is associated with "
|
||||
"the same source is being edited.\n\nTo edit this "
|
||||
"source reference, you need to close the source.")
|
||||
)
|
||||
WarningDialog(_("Cannot edit this reference"),
|
||||
self.__blocked_text())
|
||||
|
||||
def object_added(self, reference, primary):
|
||||
"""
|
||||
|
||||
@@ -95,8 +95,8 @@ class ChildEmbedList(EmbeddedList):
|
||||
'del' : _('Remove the child from the family'),
|
||||
'edit' : _('Edit the child reference'),
|
||||
'share' : _('Add an existing person as a child of the family'),
|
||||
'up' : _('Move the child up in the childrens list'),
|
||||
'down' : _('Move the child down in the childrens list'),
|
||||
'up' : _('Move the child up in the children list'),
|
||||
'down' : _('Move the child down in the children list'),
|
||||
}
|
||||
|
||||
_column_names = [
|
||||
@@ -911,15 +911,13 @@ class EditFamily(EditPrimary):
|
||||
if birth:
|
||||
#if event changes it view needs to update
|
||||
self.callman.register_handles({'event': [birth.get_handle()]})
|
||||
if birth and birth.get_type() == gen.lib.EventType.BAPTISM:
|
||||
birth_label.set_label(_("Baptism:"))
|
||||
birth_label.set_label("%s:" % birth.get_type())
|
||||
|
||||
death = get_death_or_fallback(db, person)
|
||||
if death:
|
||||
#if event changes it view needs to update
|
||||
self.callman.register_handles({'event': [death.get_handle()]})
|
||||
if death and death.get_type() == gen.lib.EventType.BURIAL:
|
||||
death_label.set_label(_("Burial:"))
|
||||
death_label.set_label("%s:" % death.get_type())
|
||||
|
||||
btn_edit.set_tooltip_text(_('Edit %s') % name)
|
||||
btn_index.hide()
|
||||
@@ -949,11 +947,23 @@ class EditFamily(EditPrimary):
|
||||
death_str = ""
|
||||
death_obj.set_text(death_str)
|
||||
|
||||
def fix_parent_handles(self, orig_handle, new_handle, trans):
|
||||
def fix_parent_handles(self, orig_handle, new_handle, trans, remove_fam=True):
|
||||
"""
|
||||
Adjust the reference of the parents to point to the right family.
|
||||
|
||||
The remove_fam parameter is needed for the special case that the
|
||||
original mother is equal to the new father. If that is the case the call
|
||||
to fix the fathers does not add the new family because that family
|
||||
is already present in the family_list. The subsequent call to fix the
|
||||
mothers would remove the family handle with the result that the data
|
||||
is not in a good state: the family points to the person, but the person
|
||||
does not point back to the family.
|
||||
"""
|
||||
if orig_handle != new_handle:
|
||||
if orig_handle:
|
||||
person = self.db.get_person_from_handle(orig_handle)
|
||||
person.family_list.remove(self.obj.handle)
|
||||
if remove_fam:
|
||||
person.family_list.remove(self.obj.handle)
|
||||
self.db.commit_person(person, trans)
|
||||
if new_handle:
|
||||
person = self.db.get_person_from_handle(new_handle)
|
||||
@@ -1060,10 +1070,12 @@ class EditFamily(EditPrimary):
|
||||
|
||||
trans = self.db.transaction_begin()
|
||||
|
||||
remove_fam = not (original.get_mother_handle() ==
|
||||
self.obj.get_father_handle())
|
||||
self.fix_parent_handles(original.get_father_handle(),
|
||||
self.obj.get_father_handle(), trans)
|
||||
self.fix_parent_handles(original.get_mother_handle(),
|
||||
self.obj.get_mother_handle(), trans)
|
||||
self.obj.get_mother_handle(), trans, remove_fam)
|
||||
|
||||
orig_set = set(original.get_child_ref_list())
|
||||
new_set = set(self.obj.get_child_ref_list())
|
||||
|
||||
@@ -76,6 +76,7 @@ class EditRepoRef(EditReference):
|
||||
notebook.remove_page(0)
|
||||
self.primtab = RefTab(self.dbstate, self.uistate, self.track,
|
||||
_('_General'), tblref)
|
||||
self.track_ref_for_deletion("primtab")
|
||||
|
||||
def _connect_signals(self):
|
||||
self.define_ok_button(self.top.get_object('ok'),self.ok_clicked)
|
||||
@@ -107,7 +108,7 @@ class EditRepoRef(EditReference):
|
||||
self.source,
|
||||
self.db.readonly)
|
||||
|
||||
self.privacy = PrivacyButton(
|
||||
self.ref_privacy = PrivacyButton(
|
||||
self.top.get_object("private_ref"),
|
||||
self.source_ref,
|
||||
self.db.readonly)
|
||||
@@ -146,33 +147,33 @@ class EditRepoRef(EditReference):
|
||||
self._add_tab(notebook_src, self.primtab)
|
||||
self._add_tab(notebook_ref, self.reftab)
|
||||
|
||||
self.note_tab = self._add_tab(
|
||||
notebook_src,
|
||||
NoteTab(self.dbstate, self.uistate, self.track,
|
||||
self.source.get_note_list(),
|
||||
notetype=NoteType.REPO))
|
||||
self.note_tab = NoteTab(self.dbstate, self.uistate, self.track,
|
||||
self.source.get_note_list(),
|
||||
notetype=NoteType.REPO)
|
||||
self._add_tab(notebook_src, self.note_tab)
|
||||
self.track_ref_for_deletion("note_tab")
|
||||
|
||||
self.comment_tab = self._add_tab(
|
||||
notebook_ref,
|
||||
NoteTab(self.dbstate, self.uistate, self.track,
|
||||
self.source_ref.get_note_list(),
|
||||
notetype=NoteType.REPOREF))
|
||||
self.comment_tab = NoteTab(self.dbstate, self.uistate, self.track,
|
||||
self.source_ref.get_note_list(),
|
||||
notetype=NoteType.REPOREF)
|
||||
self._add_tab(notebook_ref, self.comment_tab)
|
||||
self.track_ref_for_deletion("comment_tab")
|
||||
|
||||
self.address_tab = self._add_tab(
|
||||
notebook_src,
|
||||
AddrEmbedList(self.dbstate,self.uistate,self.track,
|
||||
self.source.get_address_list()))
|
||||
self.address_tab = AddrEmbedList(self.dbstate, self.uistate, self.track,
|
||||
self.source.get_address_list())
|
||||
self._add_tab(notebook_src, self.address_tab)
|
||||
self.track_ref_for_deletion("address_tab")
|
||||
|
||||
self.web_list = self._add_tab(
|
||||
notebook_src,
|
||||
WebEmbedList(self.dbstate,self.uistate,self.track,
|
||||
self.source.get_url_list()))
|
||||
self.web_list = WebEmbedList(self.dbstate, self.uistate, self.track,
|
||||
self.source.get_url_list())
|
||||
self._add_tab(notebook_src, self.web_list)
|
||||
self.track_ref_for_deletion("web_list")
|
||||
|
||||
self.backref_tab = self._add_tab(
|
||||
notebook_src,
|
||||
SourceBackRefList(self.dbstate, self.uistate, self.track,
|
||||
self.db.find_backlink_handles(self.source.handle),
|
||||
self.enable_warnbox))
|
||||
self.backref_tab = SourceBackRefList(self.dbstate, self.uistate, self.track,
|
||||
self.db.find_backlink_handles(self.source.handle),
|
||||
self.enable_warnbox)
|
||||
self._add_tab(notebook_src, self.backref_tab)
|
||||
self.track_ref_for_deletion("backref_tab")
|
||||
|
||||
self._setup_notebook_tabs( notebook_src)
|
||||
self._setup_notebook_tabs( notebook_ref)
|
||||
|
||||
@@ -1079,6 +1079,8 @@ class FilterEditor(ManagedWindow.ManagedWindow):
|
||||
filters = self.filterdb.get_filters(space)
|
||||
name = gfilter.get_name()
|
||||
for the_filter in filters:
|
||||
if the_filter.get_name() == name:
|
||||
continue
|
||||
for rule in the_filter.get_rules():
|
||||
values = rule.values()
|
||||
if issubclass(rule.__class__, MatchesFilterBase) \
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
# but that is not necessarily portable.
|
||||
# If not using GNU make, then list all .py files individually
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/gui/selectors
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/gui/selectors
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
__init__.py \
|
||||
baseselector.py \
|
||||
selectevent.py \
|
||||
@@ -20,7 +20,6 @@ pkgdata_PYTHON = \
|
||||
selectorfactory.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/gui/selectors
|
||||
pkgpythondir = @pkgpythondir@/gui/selectors
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
MOSTLYCLEANFILES = *pyc *pyo
|
||||
@@ -29,4 +28,4 @@ GRAMPS_PY_MODPATH = "../../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2003-2006 Donald N. Allingham
|
||||
# 2009 Gary Burton
|
||||
# 2009-2011 Gary Burton
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -286,7 +286,6 @@ class BaseSelector(ManagedWindow.ManagedWindow):
|
||||
if self.sort_col != data:
|
||||
self.sortorder = gtk.SORT_ASCENDING
|
||||
self.sort_col = data
|
||||
self.build_tree()
|
||||
else:
|
||||
if (self.columns[data].get_sort_order() == gtk.SORT_DESCENDING
|
||||
or not self.columns[data].get_sort_indicator()):
|
||||
@@ -294,6 +293,7 @@ class BaseSelector(ManagedWindow.ManagedWindow):
|
||||
else:
|
||||
self.sortorder = gtk.SORT_DESCENDING
|
||||
self.model.reverse_order()
|
||||
self.build_tree()
|
||||
|
||||
handle = self.first_selected()
|
||||
if handle:
|
||||
|
||||
+1
-1
@@ -119,7 +119,7 @@ class ProgressMeter(object):
|
||||
self.__dialog.set_border_width(12)
|
||||
self.__dialog.vbox.set_spacing(10)
|
||||
self.__dialog.vbox.set_border_width(24)
|
||||
self.__dialog.set_size_request(350, 125)
|
||||
self.__dialog.set_size_request(400, 125)
|
||||
|
||||
tlbl = gtk.Label('<span size="larger" weight="bold">%s</span>' % title)
|
||||
tlbl.set_use_markup(True)
|
||||
|
||||
@@ -6,16 +6,15 @@
|
||||
SUBDIRS = \
|
||||
treemodels
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/gui/views
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/gui/views
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
__init__.py \
|
||||
listview.py \
|
||||
navigationview.py \
|
||||
pageview.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/gui/views
|
||||
pkgpythondir = @pkgpythondir@/gui/views
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
MOSTLYCLEANFILES = *pyc *pyo
|
||||
@@ -24,7 +23,7 @@ GRAMPS_PY_MODPATH = "../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
pylint:
|
||||
PYTHONPATH=$(GRAMPS_PY_MODPATH) pylint $(pkgdata_PYTHON) > pylint.out
|
||||
PYTHONPATH=$(GRAMPS_PY_MODPATH) pylint $(pkgpython_PYTHON) > pylint.out
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
# but that is not necessarily portable.
|
||||
# If not using GNU make, then list all .py files individually
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/gui/views/treemodels
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/gui/views/treemodels
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
__init__.py \
|
||||
eventmodel.py \
|
||||
familymodel.py \
|
||||
@@ -19,7 +19,6 @@ pkgdata_PYTHON = \
|
||||
treebasemodel.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/gui/views/treemodels
|
||||
pkgpythondir = @pkgpythondir@/gui/views/treemodels
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
MOSTLYCLEANFILES = *pyc *pyo
|
||||
@@ -28,7 +27,7 @@ GRAMPS_PY_MODPATH = "../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
pylint:
|
||||
PYTHONPATH=$(GRAMPS_PY_MODPATH) pylint $(pkgdata_PYTHON) > pylint.out
|
||||
PYTHONPATH=$(GRAMPS_PY_MODPATH) pylint $(pkgpython_PYTHON) > pylint.out
|
||||
|
||||
@@ -833,13 +833,21 @@ class TreeBaseModel(gtk.GenericTreeModel):
|
||||
"""
|
||||
if not self.tree or not self.tree[None].children:
|
||||
return None
|
||||
_LOG.debug('path argument of on_get_iter method %s' % str(path))
|
||||
node = self.tree[None]
|
||||
pathlist = list(path)
|
||||
for index in pathlist:
|
||||
if self.__reverse:
|
||||
node = self.nodemap.node(node.children[-index - 1][1])
|
||||
else:
|
||||
node = self.nodemap.node(node.children[index][1])
|
||||
try:
|
||||
for index in pathlist:
|
||||
if self.__reverse:
|
||||
node = self.nodemap.node(node.children[-index - 1][1])
|
||||
else:
|
||||
node = self.nodemap.node(node.children[index][1])
|
||||
except IndexError:
|
||||
# From the gtk.TreeModel.get_iter documentation:
|
||||
# This method raises a ValueError exception if path is not a valid
|
||||
# tree path.
|
||||
raise ValueError("list index, %s, out of range; max is %d; reverse is %s" % \
|
||||
(index, len(node.children), self.__reverse))
|
||||
return node
|
||||
|
||||
def on_get_path(self, node):
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
# but that is not necessarily portable.
|
||||
# If not using GNU make, then list all .py files individually
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/gui/widgets
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/gui/widgets
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
__init__.py \
|
||||
buttons.py \
|
||||
expandcollapsearrow.py \
|
||||
@@ -27,7 +27,6 @@ pkgdata_PYTHON = \
|
||||
valuetoolitem.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/gui/widgets
|
||||
pkgpythondir = @pkgpythondir@/gui/widgets
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
MOSTLYCLEANFILES = *pyc *pyo
|
||||
@@ -36,5 +35,5 @@ GRAMPS_PY_MODPATH = "../../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
|
||||
@@ -755,6 +755,8 @@ class GuiGramplet(object):
|
||||
'attribute_match',
|
||||
handle)
|
||||
return True
|
||||
else: # overzealous l10n while setting the link?
|
||||
warn( "Unknown link type " + link_type, RuntimeWarning, 2)
|
||||
return False # did not handle event
|
||||
|
||||
def get_title(self):
|
||||
@@ -1102,6 +1104,8 @@ class GrampletPane(gtk.ScrolledWindow):
|
||||
return True
|
||||
|
||||
def set_columns(self, num):
|
||||
if num < 1:
|
||||
num = 1
|
||||
# clear the gramplets:
|
||||
self.clear_gramplets()
|
||||
# clear the columns:
|
||||
|
||||
@@ -21,14 +21,14 @@ SUBDIRS = \
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/plugins
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
pkgpython_PYTHON = \
|
||||
bookreport.gpr.py\
|
||||
BookReport.py\
|
||||
records.gpr.py\
|
||||
Records.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/plugins
|
||||
pkgpythondir = @pkgpythondir@/plugins
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/plugins
|
||||
|
||||
GLADEFILES = \
|
||||
bookreport.glade
|
||||
@@ -46,4 +46,4 @@ GRAMPS_PY_MODPATH = "../:../docgen"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
@@ -449,7 +449,7 @@ class LaTeXDoc(BaseDoc, TextDoc):
|
||||
self._backend.write(' \\renewcommand\\theenumi{\\arabic{enumi}}')
|
||||
else:
|
||||
# roman, set the case correctly
|
||||
elf._backend.write(' \\renewcommand\\theenumi{\\%soman{enumi}}'
|
||||
self._backend.write(' \\renewcommand\\theenumi{\\%soman{enumi}}'
|
||||
% ('r' if leader_1.islower() else 'R'))
|
||||
|
||||
self._backend.write(' \\setcounter{enumi}{%d} ' % num)
|
||||
|
||||
@@ -1,39 +1,39 @@
|
||||
# This is the src/plugins/docgen level Makefile for Gramps
|
||||
# We could use GNU make's ':=' syntax for nice wildcard use,
|
||||
# but that is not necessarily portable.
|
||||
# If not using GNU make, then list all .py files individually
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/plugins/docgen
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
AsciiDoc.py \
|
||||
docgen.gpr.py\
|
||||
GtkPrint.py \
|
||||
HtmlDoc.py \
|
||||
LaTeXDoc.py \
|
||||
ODFDoc.py \
|
||||
PdfDoc.py \
|
||||
PSDrawDoc.py \
|
||||
RTFDoc.py \
|
||||
SvgDrawDoc.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/plugins/docgen
|
||||
pkgpythondir = @pkgpythondir@/plugins/docgen
|
||||
|
||||
GLADEFILES = \
|
||||
gtkprint.glade
|
||||
|
||||
GRAPHICS =
|
||||
|
||||
DATAFILES =
|
||||
|
||||
dist_pkgdata_DATA = $(GLADEFILES) $(GRAPHICS) $(DATAFILES)
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
MOSTLYCLEANFILES = *pyc *pyo
|
||||
|
||||
GRAMPS_PY_MODPATH = "../../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
# This is the src/plugins/docgen level Makefile for Gramps
|
||||
# We could use GNU make's ':=' syntax for nice wildcard use,
|
||||
# but that is not necessarily portable.
|
||||
# If not using GNU make, then list all .py files individually
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/plugins/docgen
|
||||
|
||||
pkgpython_PYTHON = \
|
||||
AsciiDoc.py \
|
||||
docgen.gpr.py\
|
||||
GtkPrint.py \
|
||||
HtmlDoc.py \
|
||||
LaTeXDoc.py \
|
||||
ODFDoc.py \
|
||||
PdfDoc.py \
|
||||
PSDrawDoc.py \
|
||||
RTFDoc.py \
|
||||
SvgDrawDoc.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/plugins/docgen
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/plugins/docgen
|
||||
|
||||
GLADEFILES = \
|
||||
gtkprint.glade
|
||||
|
||||
GRAPHICS =
|
||||
|
||||
DATAFILES =
|
||||
|
||||
dist_pkgdata_DATA = $(GLADEFILES) $(GRAPHICS) $(DATAFILES)
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
MOSTLYCLEANFILES = *pyc *pyo
|
||||
|
||||
GRAMPS_PY_MODPATH = "../../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
@@ -1222,9 +1222,6 @@ class ODFDoc(BaseDoc, TextDoc, DrawDoc):
|
||||
"""
|
||||
text = str(styledtext)
|
||||
s_tags = styledtext.get_tags()
|
||||
text = text.replace('&', '\1') # must be the first
|
||||
text = text.replace('<', '\2')
|
||||
text = text.replace('>', '\3')
|
||||
markuptext = self._backend.add_markup_from_styled(text, s_tags, '\n')
|
||||
# we need to know if we have new styles to add.
|
||||
# if markuptext contains : FontColor, FontFace, FontSize ...
|
||||
@@ -1243,9 +1240,6 @@ class ODFDoc(BaseDoc, TextDoc, DrawDoc):
|
||||
start = m.end()
|
||||
linenb = 1
|
||||
self.start_paragraph(style_name)
|
||||
markuptext = markuptext.replace('\1', '&') # must be the first
|
||||
markuptext = markuptext.replace('\2', '<')
|
||||
markuptext = markuptext.replace('\3', '>')
|
||||
for line in markuptext.split('\n'):
|
||||
[line, sigcount] = process_spaces(line, format)
|
||||
if sigcount == 0:
|
||||
|
||||
@@ -1,27 +1,26 @@
|
||||
# This is the src/plugins/drawreport level Makefile for Gramps
|
||||
# We could use GNU make's ':=' syntax for nice wildcard use,
|
||||
# but that is not necessarily portable.
|
||||
# If not using GNU make, then list all .py files individually
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/plugins/drawreport
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
AncestorTree.py \
|
||||
Calendar.py\
|
||||
DescendTree.py \
|
||||
drawplugins.gpr.py\
|
||||
FanChart.py \
|
||||
StatisticsChart.py \
|
||||
TimeLine.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/plugins/drawreport
|
||||
pkgpythondir = @pkgpythondir@/plugins/drawreport
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
MOSTLYCLEANFILES = *pyc *pyo
|
||||
|
||||
GRAMPS_PY_MODPATH = "../../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgdata_PYTHON));
|
||||
# This is the src/plugins/drawreport level Makefile for Gramps
|
||||
# We could use GNU make's ':=' syntax for nice wildcard use,
|
||||
# but that is not necessarily portable.
|
||||
# If not using GNU make, then list all .py files individually
|
||||
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/plugins/drawreport
|
||||
|
||||
pkgpython_PYTHON = \
|
||||
AncestorTree.py \
|
||||
Calendar.py\
|
||||
DescendTree.py \
|
||||
drawplugins.gpr.py\
|
||||
FanChart.py \
|
||||
StatisticsChart.py \
|
||||
TimeLine.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/plugins/drawreport
|
||||
|
||||
# Clean up all the byte-compiled files
|
||||
MOSTLYCLEANFILES = *pyc *pyo
|
||||
|
||||
GRAMPS_PY_MODPATH = "../../"
|
||||
|
||||
pycheck:
|
||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
||||
pychecker $(pkgpython_PYTHON));
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user