Compare commits
123 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8b4b8da242 | |||
| 046d0fc897 | |||
| 1c58f0f0ba | |||
| 7b40ee1aea | |||
| b1c33334d2 | |||
| b84716e1e9 | |||
| c134937e9d | |||
| 5647b44801 | |||
| 7e01ef0f6b | |||
| 11437b7c27 | |||
| 23bad21b29 | |||
| 8546dc91e5 | |||
| cd0d479ec1 | |||
| 6fe4cff9e2 | |||
| 5a76e262c6 | |||
| acb3371b72 | |||
| adfc952c02 | |||
| 82b1c17360 | |||
| 16d631bbb3 | |||
| 3e4b3f69a9 | |||
| f9415e8fd1 | |||
| f6d9997204 | |||
| f21fb8d6d8 | |||
| 9efe53787d | |||
| 5c11bc6f09 | |||
| 027b333860 | |||
| 0a2d52a5a0 | |||
| 3dcc74a173 | |||
| fe337c21cd | |||
| b2d58a27e4 | |||
| c9cef9e4da | |||
| 7fdf47ac3c | |||
| 1e70d474f6 | |||
| 2169c8ab4f | |||
| 17f7e5f6fd | |||
| afd9b2f40f | |||
| 33b209eed7 | |||
| 90dc718dd0 | |||
| c79c29ec9a | |||
| 605f9d0f24 | |||
| 01c80b19db | |||
| 049698426e | |||
| cba3502131 | |||
| dfa9118384 | |||
| 2e84a2457b | |||
| ee8559dd69 | |||
| e984e15c9d | |||
| 393a2d9748 | |||
| 96fbb98733 | |||
| 9b30450f33 | |||
| 92b0b99e25 | |||
| 755807436a | |||
| 155aea5d72 | |||
| 3c80aaa2b0 | |||
| e91cdcbd8b | |||
| 38a90e201f | |||
| 61bff1a65c | |||
| 91281166c1 | |||
| 17e9750bb5 | |||
| 33414b0c78 | |||
| ec43a7122c | |||
| 76c1044a64 | |||
| d91cbd91bf | |||
| 644d0ac540 | |||
| 99c8ae9181 | |||
| 57f66d842f | |||
| 83c19420b4 | |||
| d1c4c853bb | |||
| 6f90f1cb46 | |||
| b69ee2b401 | |||
| ab0021c02b | |||
| f4fb59aefe | |||
| f660795ce1 | |||
| fe1d2530b1 | |||
| 81ad0c8602 | |||
| fbc6543ea7 | |||
| c639654f9b | |||
| ac8bc209e1 | |||
| 2e9066a6cf | |||
| d99f6eac3f | |||
| 9dbf20d795 | |||
| c0cc2ff7ba | |||
| 66639dd2cb | |||
| 38290f7c57 | |||
| 43dc1d299b | |||
| 9710e7adcf | |||
| d719751914 | |||
| 96c80a44e2 | |||
| 9dfa170293 | |||
| f3b7e35c69 | |||
| 4c9197b403 | |||
| 3ed392bab0 | |||
| edd6fc6ee7 | |||
| ae81cbc6ee | |||
| c9d41950eb | |||
| 8b0b4a3785 | |||
| 4989c9e5d4 | |||
| 78c286fce2 | |||
| ec7001837a | |||
| 4bf6ab292d | |||
| 6f6c74ae8b | |||
| 8440ccbf87 | |||
| 6cbe9e3c0d | |||
| f99b1ac371 | |||
| 848eb99bb7 | |||
| d1f26d9f7a | |||
| 51ff6e4569 | |||
| 69e08ceafb | |||
| fc080a686b | |||
| bb5428d725 | |||
| 5604a27bf4 | |||
| 63430a1ce3 | |||
| 7496974691 | |||
| 3a2af65bc0 | |||
| 26c80611b2 | |||
| 641b7e5e07 | |||
| f6af0cb380 | |||
| a5e4bf8637 | |||
| 077d0ded1f | |||
| 7b1eae9a5b | |||
| 5a46c30439 | |||
| 9e742feac4 | |||
| eb4e5ddc1f |
@@ -1,3 +1,28 @@
|
||||
Version 3.2.0 (beta1) -- the "I am your father" release.
|
||||
* New Plugin System:
|
||||
-> In the Help Menu -> Menu Status, all available plugins are visible. All
|
||||
plugins can be hidden, saving resources and hiding options you do not need.
|
||||
* Faster:
|
||||
-> Many under the hood improvements have occurred that should improve
|
||||
performance enormously. New features are implemented as plugins that can
|
||||
be hidden.
|
||||
-> Performance improvement example: Insertion of a new person in a family
|
||||
tree with 30000 people previously took 4 seconds on a 1.4GHz PC running
|
||||
Gramps 3.1, but now takes milliseconds.
|
||||
* New Views:
|
||||
-> There are new views, and some existing views have been greatly improved
|
||||
-> People view can now be sorted on the columns
|
||||
-> A Place treeview is present, nicely grouping your places under country
|
||||
groups
|
||||
-> GeoView has left it's beta status behind and shows your data on an online
|
||||
map (OpenStreetMap or Google Maps, a fast internet connection is required)
|
||||
-> Help Menu -> Extra Reports/Tools open a webpage with downloadable views
|
||||
* Other Improvements:
|
||||
-> Styled Notes now in most output formats that support styles
|
||||
-> New languages
|
||||
-> Select language in which report should be created (not yet available in
|
||||
all reports)
|
||||
|
||||
Version 3.1.3 -- the "What name?" release.
|
||||
* contains translation updates, crash fixes, bug fixes, and minor updates.
|
||||
* fixes and updates to:
|
||||
|
||||
+3
-3
@@ -11,8 +11,8 @@ AM_INIT_AUTOMAKE([1.6.3 foreign])
|
||||
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
RELEASE=0.SVN$(svnversion -n .)
|
||||
dnl RELEASE=0beta
|
||||
dnl RELEASE=0.SVN$(svnversion -n .)
|
||||
RELEASE=0beta1
|
||||
dnl RELEASE=0rc1
|
||||
dnl RELEASE=1
|
||||
|
||||
@@ -33,7 +33,7 @@ AC_SUBST(RELEASE)
|
||||
AC_SUBST(VERSIONSTRING)
|
||||
|
||||
dnl Add the languages which your application supports here.
|
||||
ALL_LINGUAS="hu zh_CN cs da de es fr it nb nl nn pl pt_BR ro ru sv eo fi lt sk tr bg hr sl ca mk sq he"
|
||||
ALL_LINGUAS="hu zh_CN cs da de es fr it nb nl nn pl pt_BR ru sv eo fi lt sk bg hr sl ca sq"
|
||||
GETTEXT_PACKAGE=gramps
|
||||
AC_SUBST(GETTEXT_PACKAGE)
|
||||
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define to the Gettext package name.])
|
||||
|
||||
+5
-7
@@ -381,7 +381,7 @@ src/plugins/drawreport/TimeLine.py
|
||||
# plugins/export directory
|
||||
src/plugins/export/export.gpr.py
|
||||
src/plugins/export/ExportCsv.py
|
||||
src/plugins/export/ExportDjango.gpr.py
|
||||
src/plugins/export/ExportDjango.py
|
||||
src/plugins/export/ExportFtree.py
|
||||
src/plugins/export/ExportGedcom.py
|
||||
src/plugins/export/ExportGeneWeb.py
|
||||
@@ -420,7 +420,7 @@ src/plugins/graph/GVRelGraph.py
|
||||
# plugins/import directory
|
||||
src/plugins/import/import.gpr.py
|
||||
src/plugins/import/ImportCsv.py
|
||||
src/plugins/import/ImportDjango.gpr.py
|
||||
src/plugins/import/ImportDjango.py
|
||||
src/plugins/import/ImportDjango.py
|
||||
src/plugins/import/ImportGedcom.py
|
||||
src/plugins/import/ImportGeneWeb.py
|
||||
@@ -534,8 +534,8 @@ src/plugins/tool/Verify.py
|
||||
#plugins/view directory
|
||||
src/plugins/view/eventview.py
|
||||
src/plugins/view/familyview.py
|
||||
src/plugins/view/fanchartview.gpr.py
|
||||
src/plugins/view/fanchartview.py
|
||||
src/plugins/view/fanchartview.gpr.py
|
||||
src/plugins/view/geoview.py
|
||||
src/plugins/view/geoview.gpr.py
|
||||
src/plugins/view/grampletview.py
|
||||
@@ -543,8 +543,6 @@ src/plugins/view/htmlrenderer.py
|
||||
src/plugins/view/mediaview.py
|
||||
src/plugins/view/noteview.py
|
||||
src/plugins/view/pedigreeview.py
|
||||
src/plugins/view/pedigreeviewext.py
|
||||
src/plugins/view/pedigreeviewext.gpr.py
|
||||
src/plugins/view/personlistview.py
|
||||
src/plugins/view/persontreeview.py
|
||||
src/plugins/view/placelistview.py
|
||||
@@ -895,8 +893,8 @@ src/plugins/tool/verify.glade
|
||||
#
|
||||
# web
|
||||
#
|
||||
src/web/grampsdb/views.py
|
||||
src/web/utils.py
|
||||
#src/web/grampsdb/views.py
|
||||
#src/web/utils.py
|
||||
#
|
||||
# Files to extract from and then merge into
|
||||
#
|
||||
|
||||
+417
-499
File diff suppressed because it is too large
Load Diff
+20901
-20843
File diff suppressed because it is too large
Load Diff
+4615
-4142
File diff suppressed because it is too large
Load Diff
+77
-17
@@ -56,27 +56,87 @@ class DateParserDE(DateParser):
|
||||
month_to_int[u"jan"] = 1
|
||||
month_to_int[u"jänner"] = 1
|
||||
month_to_int[u"jän"] = 1
|
||||
# Add other common latin, local and historical variants
|
||||
|
||||
# Add other common latin,
|
||||
|
||||
month_to_int[u"januaris"] = 1
|
||||
month_to_int[u"januarii"] = 1
|
||||
month_to_int[u"januarius"] = 1
|
||||
month_to_int[u"februaris"] = 2
|
||||
month_to_int[u"februarii"] = 2
|
||||
month_to_int[u"februarius"] = 2
|
||||
month_to_int[u"martii"] = 3
|
||||
month_to_int[u"martius"] = 3
|
||||
month_to_int[u"aprilis"] = 4
|
||||
month_to_int[u"maius"] = 5
|
||||
month_to_int[u"maii"] = 5
|
||||
month_to_int[u"junius"] = 6
|
||||
month_to_int[u"junii"] = 6
|
||||
month_to_int[u"julius"] = 7
|
||||
month_to_int[u"julii"] = 7
|
||||
month_to_int[u"augustus"] = 8
|
||||
month_to_int[u"augusti"] = 8
|
||||
month_to_int[u"septembris"] = 9
|
||||
month_to_int[u"7bris"] = 9
|
||||
month_to_int[u"september"] = 9
|
||||
month_to_int[u"october"] = 10
|
||||
month_to_int[u"octobris"] = 10
|
||||
month_to_int[u"8bris"] = 10
|
||||
month_to_int[u"novembris"] = 11
|
||||
month_to_int[u"9bris"] = 11
|
||||
month_to_int[u"november"] = 11
|
||||
month_to_int[u"decembris"] = 12
|
||||
month_to_int[u"10bris"] = 12
|
||||
month_to_int[u"xbris"] = 12
|
||||
month_to_int[u"december"] = 12
|
||||
|
||||
# local and historical variants
|
||||
|
||||
month_to_int[u"jenner"] = 1
|
||||
month_to_int[u"feber"] = 2
|
||||
month_to_int[u"februaris"] = 2
|
||||
month_to_int[u"merz"] = 3
|
||||
month_to_int[u"aprilis"] = 4
|
||||
month_to_int[u"maius"] = 5
|
||||
month_to_int[u"junius"] = 6
|
||||
month_to_int[u"julius"] = 7
|
||||
month_to_int[u"augst"] = 8
|
||||
month_to_int[u"7ber"] = 9
|
||||
month_to_int[u"7bris"] = 9
|
||||
month_to_int[u"8ber"] = 10
|
||||
month_to_int[u"8bris"] = 10
|
||||
month_to_int[u"9ber"] = 11
|
||||
month_to_int[u"9bris"] = 11
|
||||
month_to_int[u"10ber"] = 12
|
||||
month_to_int[u"10bris"] = 12
|
||||
month_to_int[u"xber"] = 12
|
||||
month_to_int[u"xbris"] = 12
|
||||
|
||||
# old german names
|
||||
|
||||
month_to_int[u"hartung"] = 1
|
||||
month_to_int[u"eismond"] = 1
|
||||
month_to_int[u"hornung"] = 2
|
||||
month_to_int[u"schmelzmond"] = 2
|
||||
month_to_int[u"taumond"] = 2
|
||||
month_to_int[u"narrenmond"] = 2
|
||||
month_to_int[u"rebmond"] = 2
|
||||
month_to_int[u"hintester"] = 2
|
||||
month_to_int[u"lenzing"] = 3
|
||||
month_to_int[u"lenzmond"] = 3
|
||||
month_to_int[u"launing"] = 4
|
||||
month_to_int[u"ostermond"] = 4
|
||||
month_to_int[u"winnemond"] = 5
|
||||
month_to_int[u"weidenmonat"] = 5
|
||||
month_to_int[u"blumenmond"] = 5
|
||||
month_to_int[u"brachet"] = 6
|
||||
month_to_int[u"brachmond"] = 6
|
||||
month_to_int[u"heuert"] = 7
|
||||
month_to_int[u"heumond"] = 7
|
||||
month_to_int[u"ernting"] = 8
|
||||
month_to_int[u"erntemond"] = 8
|
||||
month_to_int[u"bisemond"] = 8
|
||||
month_to_int[u"scheiding"] = 9
|
||||
month_to_int[u"herbstmond"] = 9
|
||||
month_to_int[u"gilbhard"] = 10
|
||||
month_to_int[u"gilbhart"] = 10
|
||||
month_to_int[u"windmond"] = 11
|
||||
month_to_int[u"nebelung"] = 11
|
||||
month_to_int[u"wintermond"] = 11
|
||||
month_to_int[u"julmond"] = 12
|
||||
month_to_int[u"heilmond"] = 12
|
||||
month_to_int[u"christmond"] = 12
|
||||
month_to_int[u"dustermond"] = 12
|
||||
|
||||
modifier_to_int = {
|
||||
u'vor' : Date.MOD_BEFORE,
|
||||
@@ -137,13 +197,13 @@ class DateDisplayDE(DateDisplay):
|
||||
"""
|
||||
German language date display class.
|
||||
"""
|
||||
# TODO: Translate these month strings:
|
||||
long_months = ( u"", u"January", u"February", u"March", u"April", u"May",
|
||||
u"June", u"July", u"August", u"September", u"October",
|
||||
u"November", u"December" )
|
||||
|
||||
short_months = ( u"", u"Jan", u"Feb", u"Mar", u"Apr", u"May", u"Jun",
|
||||
u"Jul", u"Aug", u"Sep", u"Oct", u"Nov", u"Dec" )
|
||||
long_months = ( u"", u"Januar", u"Februar", u"März", u"April", u"Mai",
|
||||
u"Juni", u"Juli", u"August", u"September", u"Oktober",
|
||||
u"November", u"Dezember" )
|
||||
|
||||
short_months = ( u"", u"Jan", u"Feb", u"Mär", u"Apr", u"Mai", u"Jun",
|
||||
u"Jul", u"Aug", u"Sep", u"Okt", u"Nov", u"Dez" )
|
||||
|
||||
calendar = (
|
||||
"", u" (julianisch)", u" (hebräisch)",
|
||||
|
||||
+31
-3
@@ -80,10 +80,22 @@ class History(gen.utils.Callback):
|
||||
'mru-changed' : (list, )
|
||||
}
|
||||
|
||||
def __init__(self):
|
||||
def __init__(self, dbstate, nav_type):
|
||||
gen.utils.Callback.__init__(self)
|
||||
self.clear()
|
||||
|
||||
dbstate.connect('database-changed', self.connect_signals)
|
||||
self.signal_map = {}
|
||||
self.signal_map[nav_type.lower() + '-delete'] = self.handles_removed
|
||||
self.signal_map[nav_type.lower() + '-rebuild'] = self.history_changed
|
||||
|
||||
def connect_signals(self, dbstate):
|
||||
"""
|
||||
Connects database signals when the database has changed.
|
||||
"""
|
||||
for sig in self.signal_map:
|
||||
dbstate.connect(sig, self.signal_map[sig])
|
||||
|
||||
def clear(self):
|
||||
"""
|
||||
Clears the history, resetting the values back to their defaults
|
||||
@@ -191,6 +203,22 @@ class History(gen.utils.Callback):
|
||||
if not self.at_end():
|
||||
self.history = self.history[0:self.index+1]
|
||||
|
||||
def handles_removed(self, handle_list):
|
||||
"""
|
||||
Called in response to an object-delete signal.
|
||||
Removes a list of handles from the history.
|
||||
"""
|
||||
for handle in handle_list:
|
||||
self.remove(handle)
|
||||
|
||||
def history_changed(self):
|
||||
"""
|
||||
Called in response to an object-rebuild signal.
|
||||
Objects in the history list may have been deleted.
|
||||
"""
|
||||
self.clear()
|
||||
self.emit('mru-changed', (self.mru, ))
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Recent Docs Menu
|
||||
@@ -370,13 +398,13 @@ class DisplayState(gen.utils.Callback):
|
||||
"""
|
||||
return self.history_lookup.get((nav_type, nav_group))
|
||||
|
||||
def register(self, nav_type, nav_group):
|
||||
def register(self, dbstate, nav_type, nav_group):
|
||||
"""
|
||||
Create a history and navigation object for the specified
|
||||
navigation type and group, if they don't exist.
|
||||
"""
|
||||
if (nav_type, nav_group) not in self.history_lookup:
|
||||
history = History()
|
||||
history = History(dbstate, nav_type)
|
||||
self.history_lookup[(nav_type, nav_group)] = history
|
||||
|
||||
def get_active(self, nav_type, nav_group=0):
|
||||
|
||||
@@ -28,6 +28,7 @@ gdir_PYTHON = \
|
||||
Bookmarks.py\
|
||||
config.py\
|
||||
const.py\
|
||||
constfunc.py\
|
||||
DateEdit.py\
|
||||
Date.py\
|
||||
DbState.py\
|
||||
|
||||
@@ -536,16 +536,22 @@ class GuiFamilyOption(gtk.HBox):
|
||||
|
||||
def __initialize_family(self):
|
||||
"""
|
||||
Find a family to initialize the option with. Any family will do, but
|
||||
try to find a family that the user is likely interested in.
|
||||
Find a family to initialize the option with. If there is no active
|
||||
family, try to find a family that the user is likely interested in.
|
||||
"""
|
||||
family_list = []
|
||||
|
||||
# First try the family of the active person
|
||||
person_handle = self.__uistate.get_active('Person')
|
||||
person = self.__dbstate.db.get_person_from_handle(person_handle)
|
||||
if person:
|
||||
family_list = person.get_family_handle_list()
|
||||
# Use the active family if one is selected
|
||||
family = self.__uistate.get_active('Family')
|
||||
if family:
|
||||
family_list = [family]
|
||||
|
||||
if not family_list:
|
||||
# Next try the family of the active person
|
||||
person_handle = self.__uistate.get_active('Person')
|
||||
person = self.__dbstate.db.get_person_from_handle(person_handle)
|
||||
if person:
|
||||
family_list = person.get_family_handle_list()
|
||||
|
||||
if not family_list:
|
||||
# Next try the family of the default person in the database.
|
||||
@@ -558,6 +564,8 @@ class GuiFamilyOption(gtk.HBox):
|
||||
for family in self.__db.iter_family_handles():
|
||||
self.__update_family(family)
|
||||
break
|
||||
else:
|
||||
self.__update_family(family_list[0])
|
||||
|
||||
def __get_family_clicked(self, obj): # IGNORE:W0613 - obj is unused
|
||||
"""
|
||||
|
||||
+4
-4
@@ -923,10 +923,10 @@ class RelationshipCalculator(object):
|
||||
rel1 == rel2[:len(rel1)]:
|
||||
#loop, keep one message in storage!
|
||||
self.__loopDetected = True
|
||||
self.__msg += [_("Relationship loop detected:") + \
|
||||
_("Person %s connects to himself via %s") % \
|
||||
(person.get_primary_name().get_name(),
|
||||
rel2[len(rel1):])]
|
||||
self.__msg += [_("Relationship loop detected:") + " " +
|
||||
_("Person %(person)s connects to himself via %(relation)s") %
|
||||
{'person' : person.get_primary_name().get_name(),
|
||||
'relation' : rel2[len(rel1):] }]
|
||||
return
|
||||
elif store:
|
||||
pmap[person.handle] = [[rel_str], [rel_fam]]
|
||||
|
||||
+41
-9
@@ -948,33 +948,52 @@ class ScratchPadListView(object):
|
||||
|
||||
def database_changed(self,db):
|
||||
self._db = db
|
||||
# Note: delete event is emitted before the delete, so checking
|
||||
# if valid on this is useless !
|
||||
db_signals = (
|
||||
'person-update',
|
||||
'person-rebuild',
|
||||
'family-update',
|
||||
'family-delete',
|
||||
'family-rebuild',
|
||||
'source-update',
|
||||
'source-rebuild',
|
||||
'place-update',
|
||||
'place-delete',
|
||||
'place-rebuild',
|
||||
'media-update',
|
||||
'media-delete',
|
||||
'media-rebuild',
|
||||
'event-update',
|
||||
'event-rebuild',
|
||||
'repository-update',
|
||||
'repository-rebuild'
|
||||
'repository-rebuild',
|
||||
'note-rebuild'
|
||||
)
|
||||
|
||||
for signal in db_signals:
|
||||
self._db.connect(signal,self.remove_invalid_objects)
|
||||
|
||||
self._db.connect('person-delete', gen_del_obj(self.delete_object, 'person-link'))
|
||||
self._db.connect('source-delete', gen_del_obj(self.delete_object, 'source-link'))
|
||||
self._db.connect('repository-delete', gen_del_obj(self.delete_object, 'repo-link'))
|
||||
self._db.connect('event-delete', gen_del_obj(self.delete_object, 'pevent'))
|
||||
self._db.connect('person-delete',
|
||||
gen_del_obj(self.delete_object, 'person-link'))
|
||||
self._db.connect('person-delete',
|
||||
gen_del_obj(self.delete_object_ref, 'personref'))
|
||||
self._db.connect('source-delete',
|
||||
gen_del_obj(self.delete_object, 'source-link'))
|
||||
self._db.connect('source-delete',
|
||||
gen_del_obj(self.delete_object_ref, 'srcref'))
|
||||
self._db.connect('repository-delete',
|
||||
gen_del_obj(self.delete_object, 'repo-link'))
|
||||
self._db.connect('event-delete',
|
||||
gen_del_obj(self.delete_object, 'pevent'))
|
||||
self._db.connect('event-delete',
|
||||
gen_del_obj(self.delete_object_ref, 'eventref'))
|
||||
self._db.connect('media-delete',
|
||||
gen_del_obj(self.delete_object, 'mediaobj'))
|
||||
self._db.connect('media-delete',
|
||||
gen_del_obj(self.delete_object_ref, 'mediaref'))
|
||||
self._db.connect('place-delete',
|
||||
gen_del_obj(self.delete_object, 'place-link'))
|
||||
self._db.connect('note-delete',
|
||||
gen_del_obj(self.delete_object, 'note-link'))
|
||||
# family-delete not needed, cannot be dragged!
|
||||
|
||||
self.remove_invalid_objects()
|
||||
|
||||
@@ -996,6 +1015,16 @@ class ScratchPadListView(object):
|
||||
if data[2] in handle_list:
|
||||
model.remove(o.iter)
|
||||
|
||||
def delete_object_ref(self, handle_list, link_type):
|
||||
model = self._widget.get_model()
|
||||
|
||||
if model:
|
||||
for o in model:
|
||||
if o[0] == link_type:
|
||||
data = o[1]._obj.get_reference_handle()
|
||||
if data in handle_list:
|
||||
model.remove(o.iter)
|
||||
|
||||
# Method to manage the wrapper classes.
|
||||
|
||||
def register_wrapper_classes(self):
|
||||
@@ -1153,7 +1182,6 @@ class ScratchPadListView(object):
|
||||
# remember time for double drop workaround.
|
||||
self._previous_drop_time = realTime
|
||||
|
||||
|
||||
# proxy methods to provide access to the real widget functions.
|
||||
|
||||
def set_model(self,model=None):
|
||||
@@ -1237,6 +1265,10 @@ class ScratchPadWindow(ManagedWindow.ManagedWindow):
|
||||
|
||||
self.object_list.set_model(ScratchPadWindow.otree)
|
||||
|
||||
#Database might have changed, objects might have been removed,
|
||||
#we need to reevaluate if all data is valid
|
||||
self.object_list.remove_invalid_objects()
|
||||
|
||||
self.top.connect_signals({
|
||||
"on_close_scratchpad" : self.close,
|
||||
"on_clear_clicked": self.on_clear_clicked,
|
||||
|
||||
@@ -52,6 +52,7 @@ LOG = logging.getLogger(".clidbman")
|
||||
import gen.db
|
||||
from gen.plug import BasePluginManager
|
||||
import config
|
||||
import constfunc
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@@ -367,6 +368,13 @@ def time_val(dirpath):
|
||||
meta = os.path.join(dirpath, META_NAME)
|
||||
if os.path.isfile(meta):
|
||||
tval = os.stat(meta)[9]
|
||||
# This gives creation date in Windows, but correct date in Linux
|
||||
if constfunc.win():
|
||||
# Try to use last modified date instead in Windows
|
||||
# and check that it is later than the creation date.
|
||||
tval_mod = os.stat(meta)[8]
|
||||
if tval_mod > tval:
|
||||
tval = tval_mod
|
||||
last = time.strftime('%x %X', time.localtime(tval))
|
||||
else:
|
||||
tval = 0
|
||||
|
||||
@@ -205,13 +205,6 @@ register('interface.pedview-layout', 0)
|
||||
register('interface.pedview-show-images', True)
|
||||
register('interface.pedview-show-marriage', False)
|
||||
register('interface.pedview-tree-size', 0)
|
||||
register('interface.pedviewext-layout', 0)
|
||||
register('interface.pedviewext-show-images', True)
|
||||
register('interface.pedviewext-show-marriage', False)
|
||||
register('interface.pedviewext-tree-size', 5)
|
||||
register('interface.pedviewext-tree-direction', 2)
|
||||
register('interface.pedviewext-scroll-direction', False)
|
||||
register('interface.pedviewext-show-unknown-peoples', False)
|
||||
register('interface.person-height', 550)
|
||||
register('interface.person-ref-height', 350)
|
||||
register('interface.person-ref-width', 600)
|
||||
|
||||
@@ -1178,7 +1178,7 @@ div#Addresses {
|
||||
}
|
||||
div#Addresses table.infolist {
|
||||
font-size: 12px;
|
||||
background- color: #D8F3D6;
|
||||
background-color: #D8F3D6;
|
||||
}
|
||||
div#Addresses table.infolist tbody tr td {
|
||||
border-bottom: solid 1px #5D835F;
|
||||
@@ -1193,7 +1193,7 @@ div#Addresses table.infolist tbody tr td.ColumnCity {
|
||||
width: 8%;
|
||||
}
|
||||
div#Addresses table.infolist tbody tr td.ColumnCounty {
|
||||
with: 8%;
|
||||
width: 8%;
|
||||
}
|
||||
div#Addresses table.infolist tbody tr td.ColumnState {
|
||||
width: 12%;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
<_tip number="10"><b>The Family View</b><br/>The Family View is used to display a typical family unit as two parents and their children.</_tip>
|
||||
|
||||
<_tip number="11"><b>Changing the Active Person</b><br/>Changing the Active Person in views is easy. In the Relationship view juct click on anyone. In the Ancestry View doubleclick on the person or right click to select any of their spouses, siblings, children or parents.</_tip>
|
||||
<_tip number="11"><b>Changing the Active Person</b><br/>Changing the Active Person in views is easy. In the Relationship view just click on anyone. In the Ancestry View doubleclick on the person or right click to select any of their spouses, siblings, children or parents.</_tip>
|
||||
|
||||
<_tip number="12"><b>Who Was Born When?</b><br/>Under "Tools > Analysis and exploration > Compare Individual Events..." you can compare the data of individuals in your database. This is useful, say, if you wish to list the birth dates of everyone in your database. You can use a custom filter to narrow the results.</_tip>
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ class Gramplet(object):
|
||||
Connect the given method to the active-changed signal for the
|
||||
navigation type requested.
|
||||
"""
|
||||
self.uistate.register(nav_type, self.nav_group)
|
||||
self.uistate.register(self.dbstate, nav_type, self.nav_group)
|
||||
history = self.uistate.get_history(nav_type, self.nav_group)
|
||||
self.connect(history, "active-changed", method)
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
<property name="default_width">500</property>
|
||||
<property name="default_height">300</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<signal name="delete_event" handler="on_scratch_pad_delete_event"/>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkVBox" id="dialog-vbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow86">
|
||||
<property name="visible">True</property>
|
||||
@@ -58,7 +58,6 @@
|
||||
<property name="can_default">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="clicked" handler="on_clear_all_clicked"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2000-2006 Donald N. Allingham
|
||||
# Copyright (C) 2009 Gary Burton
|
||||
# Copyright (C) 2009-2010 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
|
||||
@@ -38,6 +38,8 @@ import urlparse
|
||||
import gtk
|
||||
import pango
|
||||
import os
|
||||
import sys
|
||||
import urllib
|
||||
import gobject
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@@ -55,7 +57,7 @@ import Errors
|
||||
import gen.mime
|
||||
from DdTargets import DdTargets
|
||||
from buttontab import ButtonTab
|
||||
|
||||
import constfunc
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
#
|
||||
@@ -200,7 +202,6 @@ class GalleryTab(ButtonTab, DbGUIElement):
|
||||
self.iconlist.set_margin(12)
|
||||
self.iconlist.set_spacing(24)
|
||||
self.iconlist.set_reorderable(True)
|
||||
self.iconlist.set_item_width(item_width)
|
||||
self.iconlist.set_selection_mode(gtk.SELECTION_SINGLE)
|
||||
|
||||
# connect the signals
|
||||
@@ -366,7 +367,7 @@ class GalleryTab(ButtonTab, DbGUIElement):
|
||||
DdTargets.MEDIAOBJ.target()]
|
||||
|
||||
self.iconlist.enable_model_drag_dest(dnd_types,
|
||||
gtk.gdk.ACTION_COPY)
|
||||
gtk.gdk.ACTION_MOVE|gtk.gdk.ACTION_COPY)
|
||||
self.iconlist.enable_model_drag_source(gtk.gdk.BUTTON1_MASK,
|
||||
[self._DND_TYPE.target()],
|
||||
gtk.gdk.ACTION_COPY)
|
||||
@@ -454,28 +455,35 @@ class GalleryTab(ButtonTab, DbGUIElement):
|
||||
elif self._DND_EXTRA and mytype == self._DND_EXTRA.drag_type:
|
||||
self.handle_extra_type(mytype, obj)
|
||||
except pickle.UnpicklingError:
|
||||
d = Utils.fix_encoding(sel_data.data.replace('\0',' ').strip())
|
||||
protocol, site, mfile, j, k, l = urlparse.urlparse(d)
|
||||
if protocol == "file":
|
||||
name = Utils.fix_encoding(mfile)
|
||||
mime = gen.mime.get_type(name)
|
||||
if not gen.mime.is_valid_type(mime):
|
||||
return
|
||||
photo = gen.lib.MediaObject()
|
||||
photo.set_path(name)
|
||||
photo.set_mime_type(mime)
|
||||
basename = os.path.basename(name)
|
||||
(root, ext) = os.path.splitext(basename)
|
||||
photo.set_description(root)
|
||||
trans = self.dbstate.db.transaction_begin()
|
||||
self.dbstate.db.add_object(photo, trans)
|
||||
oref = gen.lib.MediaRef()
|
||||
oref.set_reference_handle(photo.get_handle())
|
||||
self.get_data().append(oref)
|
||||
self.changed = True
|
||||
# self.dataobj.add_media_reference(oref)
|
||||
self.dbstate.db.transaction_commit(trans,
|
||||
_("Drag Media Object"))
|
||||
#modern file managers provide URI_LIST. For Windows split sel_data.data
|
||||
if constfunc.win():
|
||||
files = sel_data.data.split('\n')
|
||||
else:
|
||||
files = sel_data.get_uris()
|
||||
for file in files:
|
||||
d = Utils.fix_encoding(file.replace('\0',' ').strip())
|
||||
protocol, site, mfile, j, k, l = urlparse.urlparse(d)
|
||||
if protocol == "file":
|
||||
name = Utils.fix_encoding(mfile)
|
||||
name = unicode(urllib.url2pathname(
|
||||
name.encode(sys.getfilesystemencoding())))
|
||||
mime = gen.mime.get_type(name)
|
||||
if not gen.mime.is_valid_type(mime):
|
||||
return
|
||||
photo = gen.lib.MediaObject()
|
||||
photo.set_path(name)
|
||||
photo.set_mime_type(mime)
|
||||
basename = os.path.basename(name)
|
||||
(root, ext) = os.path.splitext(basename)
|
||||
photo.set_description(root)
|
||||
trans = self.dbstate.db.transaction_begin()
|
||||
self.dbstate.db.add_object(photo, trans)
|
||||
oref = gen.lib.MediaRef()
|
||||
oref.set_reference_handle(photo.get_handle())
|
||||
self.get_data().append(oref)
|
||||
self.changed = True
|
||||
self.dbstate.db.transaction_commit(trans,
|
||||
_("Drag Media Object"))
|
||||
self.rebuild()
|
||||
|
||||
def handle_extra_type(self, objtype, obj):
|
||||
|
||||
@@ -166,7 +166,7 @@ class EditChildRef(EditSecondary):
|
||||
|
||||
def edit_child(self, obj,event):
|
||||
if button_activated(event, _LEFT_BUTTON):
|
||||
from _EditPerson import EditPerson
|
||||
from editperson import EditPerson
|
||||
handle = self.obj.ref
|
||||
try:
|
||||
person = self.db.get_person_from_handle(handle)
|
||||
|
||||
+51
-33
@@ -32,7 +32,6 @@ Manages the main window and the pluggable views
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import os
|
||||
|
||||
from gen.ggettext import gettext as _
|
||||
from cStringIO import StringIO
|
||||
from collections import defaultdict
|
||||
@@ -884,7 +883,13 @@ class ViewManager(CLIManager):
|
||||
self.pages.append([])
|
||||
nrpage = 0
|
||||
for pdata, page_def in cat_views:
|
||||
page = page_def(self.dbstate, self.uistate)
|
||||
try:
|
||||
page = page_def(self.dbstate, self.uistate)
|
||||
except:
|
||||
import traceback
|
||||
LOG.warn("View '%s' failed to load." % pdata.id)
|
||||
traceback.print_exc()
|
||||
continue
|
||||
# Category is (string, trans):
|
||||
page.set_category(pdata.category)
|
||||
page.set_ident(page.get_category() + '_' + pdata.id)
|
||||
@@ -960,12 +965,21 @@ class ViewManager(CLIManager):
|
||||
uitoolitems)
|
||||
#set view cat to last used in this category
|
||||
self.notebook_cat[-1].set_current_page(default_cat_views[indexcat])
|
||||
|
||||
if self.views:
|
||||
self.active_page = self.pages[current_cat][current_cat_view]
|
||||
self.buttons[current_cat].set_active(True)
|
||||
self.active_page.set_active()
|
||||
self.notebook.set_current_page(current_cat)
|
||||
self.notebook_cat[current_cat].set_current_page(current_cat_view)
|
||||
else:
|
||||
#not one single view loaded
|
||||
WarningDialog(
|
||||
_("No views loaded"),
|
||||
_("No view plugins are loaded. Go to Help->Plugin "
|
||||
"Manager, and make sure some plugins of type 'View' are "
|
||||
"enabled. Then restart Gramps"))
|
||||
|
||||
self.active_page = self.pages[current_cat][current_cat_view]
|
||||
self.buttons[current_cat].set_active(True)
|
||||
self.active_page.set_active()
|
||||
self.notebook.set_current_page(current_cat)
|
||||
self.notebook_cat[current_cat].set_current_page(current_cat_view)
|
||||
|
||||
def __views_to_show(self, use_last = True):
|
||||
"""
|
||||
@@ -1159,36 +1173,40 @@ class ViewManager(CLIManager):
|
||||
:Type view_page: integer >=0 to switch to a specific page, or -1 to
|
||||
switch to the active view in the category
|
||||
"""
|
||||
if view_page == -1:
|
||||
#just show active one
|
||||
view_page = self.notebook_cat[category_page].get_current_page()
|
||||
if self.dbstate.open:
|
||||
self.__disconnect_previous_page()
|
||||
if len(self.pages) > 0:
|
||||
self.active_page = self.pages[category_page][view_page]
|
||||
self.active_page.set_active()
|
||||
newcurpageid = self.views[category_page][view_page][0].id
|
||||
config.set('preferences.last-view', newcurpageid)
|
||||
olddefaults = config.get('preferences.last-views')
|
||||
if len(olddefaults) != len(self.pages):
|
||||
#number views changed, we cannot trust the old
|
||||
olddefaults = [''] * len(self.pages)
|
||||
olddefaults[category_page] = newcurpageid
|
||||
config.set('preferences.last-views', olddefaults)
|
||||
config.save()
|
||||
if self.notebook_cat:
|
||||
if view_page == -1:
|
||||
#just show active one
|
||||
view_page = self.notebook_cat[category_page].get_current_page()
|
||||
if self.dbstate.open:
|
||||
self.__disconnect_previous_page()
|
||||
if len(self.pages) > 0:
|
||||
self.active_page = self.pages[category_page][view_page]
|
||||
self.active_page.set_active()
|
||||
newcurpageid = self.views[category_page][view_page][0].id
|
||||
config.set('preferences.last-view', newcurpageid)
|
||||
olddefaults = config.get('preferences.last-views')
|
||||
if len(olddefaults) != len(self.pages):
|
||||
#number views changed, we cannot trust the old
|
||||
olddefaults = [''] * len(self.pages)
|
||||
olddefaults[category_page] = newcurpageid
|
||||
config.set('preferences.last-views', olddefaults)
|
||||
config.save()
|
||||
|
||||
self.__connect_active_page(category_page, view_page)
|
||||
self.__connect_active_page(category_page, view_page)
|
||||
|
||||
self.uimanager.ensure_update()
|
||||
self.uimanager.ensure_update()
|
||||
|
||||
while gtk.events_pending():
|
||||
gtk.main_iteration()
|
||||
while gtk.events_pending():
|
||||
gtk.main_iteration()
|
||||
|
||||
self.active_page.change_page()
|
||||
if self._key:
|
||||
self.uistate.disconnect(self._key)
|
||||
self._key = self.uistate.connect(
|
||||
'nameformat-changed', self.active_page.build_tree)
|
||||
self.active_page.change_page()
|
||||
if self._key:
|
||||
self.uistate.disconnect(self._key)
|
||||
self._key = self.uistate.connect(
|
||||
'nameformat-changed', self.active_page.build_tree)
|
||||
else:
|
||||
#no views loaded
|
||||
pass
|
||||
|
||||
def import_data(self, obj):
|
||||
"""
|
||||
|
||||
@@ -92,7 +92,7 @@ class NavigationView(PageView):
|
||||
self.nav_group = nav_group
|
||||
self.mru_active = DISABLED
|
||||
|
||||
self.uistate.register(self.navigation_type(), self.nav_group)
|
||||
self.uistate.register(state, self.navigation_type(), self.nav_group)
|
||||
|
||||
|
||||
def navigation_type(self):
|
||||
|
||||
@@ -435,13 +435,14 @@ class PageView(DbGUIElement):
|
||||
if not self.__configure_content:
|
||||
self.__configure_content = self._get_configure_page_funcs()
|
||||
title = _("Configure %(cat)s - %(view)s") % \
|
||||
{'cat': self.get_category(), 'view': self.get_title()}
|
||||
{'cat': self.get_translated_category(),
|
||||
'view': self.get_title()}
|
||||
try:
|
||||
ViewConfigureDialog(self.uistate, self.dbstate,
|
||||
self.__configure_content,
|
||||
self, self._config, dialogtitle=title,
|
||||
ident=_("%(cat)s - %(view)s") %
|
||||
{'cat': self.get_category(),
|
||||
{'cat': self.get_translated_category(),
|
||||
'view': self.get_title()})
|
||||
except Errors.WindowActiveError:
|
||||
return
|
||||
|
||||
@@ -627,6 +627,13 @@ class FlatBaseModel(gtk.GenericTreeModel):
|
||||
node = self.get_iter(path)
|
||||
self.row_changed(path, node)
|
||||
|
||||
def handle2path(self, handle):
|
||||
"""
|
||||
Obtain from a handle, a path.
|
||||
Part of common api with flat/treebasemodel
|
||||
"""
|
||||
return self.on_get_path(handle)
|
||||
|
||||
def on_get_flags(self):
|
||||
"""
|
||||
Returns the GtkTreeModelFlags for this particular type of model
|
||||
|
||||
@@ -228,7 +228,7 @@ class TreeBaseModel(gtk.GenericTreeModel):
|
||||
the hierarchy. Each entry is a node object.
|
||||
handle2node A dictionary of gramps handles. Each entry is a node object.
|
||||
nodemap A NodeMap, mapping id's of the nodes to the node objects. Node
|
||||
refer to other notes via id's in a linked list form.
|
||||
refer to other nodes via id's in a linked list form.
|
||||
|
||||
The model obtains data from database as needed and holds a cache of most
|
||||
recently used data.
|
||||
@@ -577,8 +577,9 @@ class TreeBaseModel(gtk.GenericTreeModel):
|
||||
path = self.on_get_path(child_node)
|
||||
node = self.get_iter(path)
|
||||
self.row_inserted(path, node)
|
||||
self.__total += 1
|
||||
self.__displayed += 1
|
||||
if handle:
|
||||
self.__total += 1
|
||||
self.__displayed += 1
|
||||
|
||||
if handle:
|
||||
self.handle2node[handle] = child_node
|
||||
@@ -607,16 +608,16 @@ class TreeBaseModel(gtk.GenericTreeModel):
|
||||
node.set_handle(None)
|
||||
self.__displayed -= 1
|
||||
self.__total -= 1
|
||||
else:
|
||||
elif node.parent: # don't remove the hidden root node
|
||||
path = self.on_get_path(node)
|
||||
self.nodemap.node(node.parent).remove_child(node, self.nodemap)
|
||||
del self.tree[node.ref]
|
||||
if node.handle is not None:
|
||||
del self.handle2node[node.handle]
|
||||
self.__displayed -= 1
|
||||
self.__total -= 1
|
||||
self.nodemap.del_node(node)
|
||||
del node
|
||||
self.__displayed -= 1
|
||||
self.__total -= 1
|
||||
|
||||
# emit row_deleted signal
|
||||
self.row_deleted(path)
|
||||
@@ -724,6 +725,13 @@ class TreeBaseModel(gtk.GenericTreeModel):
|
||||
"""
|
||||
return self.handle2node.get(handle)
|
||||
|
||||
def handle2path(self, handle):
|
||||
"""
|
||||
Obtain from a handle, a path.
|
||||
Part of common api with flat/treebasemodel
|
||||
"""
|
||||
return self.on_get_path(self.get_node(handle))
|
||||
|
||||
# The following implement the public interface of gtk.GenericTreeModel
|
||||
|
||||
def on_get_flags(self):
|
||||
|
||||
@@ -176,7 +176,8 @@ def _get_subject(options, dbase):
|
||||
else:
|
||||
mother_name = _("unknown mother")
|
||||
|
||||
name = _("%s and %s (%s)") % (father_name, mother_name, family_id)
|
||||
name = _("%(father)s and %(mother)s (%(id)s)") % {
|
||||
'father' : father_name, 'mother' : mother_name, 'id' : family_id }
|
||||
return name
|
||||
|
||||
return _("Not Applicable")
|
||||
|
||||
@@ -210,9 +210,9 @@ def _find_records(db, filter, callname):
|
||||
father = db.get_person_from_handle(father_handle)
|
||||
mother = db.get_person_from_handle(mother_handle)
|
||||
|
||||
name = _("%s and %s") % (
|
||||
_person_get_display_name(father, callname),
|
||||
_person_get_display_name(mother, callname))
|
||||
name = _("%(father)s and %(mother)s") % {
|
||||
'father' : _person_get_display_name(father, callname),
|
||||
'mother' : _person_get_display_name(mother, callname) }
|
||||
|
||||
_record(None, family_mostchildren,
|
||||
len(family.get_child_ref_list()),
|
||||
|
||||
@@ -8,6 +8,7 @@ pkgdatadir = $(datadir)/@PACKAGE@/plugins/export
|
||||
pkgdata_PYTHON = \
|
||||
export.gpr.py \
|
||||
ExportCsv.py \
|
||||
ExportDjango.py \
|
||||
ExportFtree.py \
|
||||
ExportGedcom.py \
|
||||
ExportGeneWeb.py \
|
||||
|
||||
@@ -81,6 +81,6 @@ class LogGramplet(Gramplet):
|
||||
if mother_handle:
|
||||
mother = self.dbstate.db.get_person_from_handle(mother_handle)
|
||||
mother_name = name_displayer.display(mother)
|
||||
name = _("%s and %s") % (mother_name, father_name)
|
||||
name = _("%(mother)s and %(father)s") % { 'mother' : mother_name, 'father' : father_name }
|
||||
self.link(name, ltype, handle)
|
||||
self.append_text("\n")
|
||||
|
||||
@@ -330,8 +330,8 @@ class CSVParser(object):
|
||||
try:
|
||||
data = [[r.strip() for r in row] for row in reader]
|
||||
except csv.Error, e:
|
||||
ErrorDialog(_('format error: file %s, line %d: %s') %
|
||||
(self.filename, reader.line_num, e))
|
||||
ErrorDialog(_('format error: file %(fname)s, line %(line)d: %(zero)s') % {
|
||||
'fname' : self.filename, 'line' : reader.line_num, 'zero' : e })
|
||||
try:
|
||||
fp.close()
|
||||
except:
|
||||
|
||||
@@ -2825,9 +2825,9 @@ def importData(database, filename, callback=None, cl=0):
|
||||
if database.has_name_group_key(key) :
|
||||
present = database.get_name_group_mapping(key)
|
||||
if not value == present:
|
||||
msg = _("Your family tree groups name %s together"
|
||||
" with %s, did not change this grouping to %s") % (
|
||||
key, present, value)
|
||||
msg = _("Your family tree groups name %(key)s together"
|
||||
" with %(present)s, did not change this grouping to %(value)s") % {
|
||||
'key' : key, 'present' : present, 'value' : value }
|
||||
LOG.warn(msg)
|
||||
else:
|
||||
database.set_name_group_mapping(key, value)
|
||||
|
||||
@@ -688,7 +688,8 @@ class ProgenParser(object):
|
||||
date.set(gen.lib.Date.QUAL_NONE, gen.lib.Date.MOD_ABOUT, gen.lib.Date.CAL_GREGORIAN, (0, month, year, None))
|
||||
return date
|
||||
|
||||
log.warning(_("date did not match: '%s' (%s)") % (txt.encode('utf-8'), diag_msg or ''))
|
||||
log.warning(_("date did not match: '%(text)s' (%(msg)s)") % {
|
||||
'text' : txt.encode('utf-8'), 'msg' : diag_msg or '' } )
|
||||
# Hmmm. Just use the plain text.
|
||||
date.set_as_text(txt)
|
||||
return date
|
||||
@@ -1238,9 +1239,11 @@ class ProgenParser(object):
|
||||
father_handle = father > 0 and self.__find_person_handle("I%d" % father) or None
|
||||
mother_handle = mother > 0 and self.__find_person_handle("I%d" % mother) or None
|
||||
if father > 0 and not father_handle:
|
||||
log.warning(_("cannot find father for I%s (father=%d)") % (pers_id, father))
|
||||
log.warning(_("cannot find father for I%(person)s (father=%(id)d)") % {
|
||||
'person' : pers_id, 'id' : father } )
|
||||
elif mother > 0 and not mother_handle:
|
||||
log.warning(_("cannot find mother for I%s (mother=%d)") % (pers_id, mother))
|
||||
log.warning(_("cannot find mother for I%(person)s (mother=%(mother)d)") % {
|
||||
'person' : pers_id, 'mother' : mother } )
|
||||
else:
|
||||
fam = self.fm2fam.get((father_handle, mother_handle), None)
|
||||
if not fam:
|
||||
|
||||
@@ -1310,9 +1310,9 @@ class GrampsParser(UpdateCallback):
|
||||
if self.db.has_name_group_key(key) :
|
||||
present = self.db.get_name_group_mapping(key)
|
||||
if not value == present:
|
||||
msg = _("Your family tree groups name %s together"
|
||||
" with %s, did not change this grouping to %s") % (
|
||||
key, present, value)
|
||||
msg = _("Your family tree groups name %(key)s together"
|
||||
" with %(parent)s, did not change this grouping to %(value)s") % {
|
||||
'key' : key, 'parent' : present, 'value' : value }
|
||||
self.errmsg(msg)
|
||||
else:
|
||||
self.db.set_name_group_mapping(key, value)
|
||||
@@ -2479,11 +2479,11 @@ def version_is_valid(filename, cli):
|
||||
parser = VersionParser(filename)
|
||||
|
||||
if parser.get_xmlns_version() > libgrampsxml.GRAMPS_XML_VERSION:
|
||||
msg = _("The .gramps file you are importing was made by version %s of "
|
||||
"Gramps, while you are running an older version %s. "
|
||||
msg = _("The .gramps file you are importing was made by version %(newer)s of "
|
||||
"Gramps, while you are running an older version %(older)s. "
|
||||
"The file will not be imported. Please upgrade to the latest "
|
||||
"version of Gramps and try again."
|
||||
) % (parser.get_gramps_version(), const.VERSION)
|
||||
"version of Gramps and try again." ) % {
|
||||
'newer' : parser.get_gramps_version(), 'older' : const.VERSION }
|
||||
if cli:
|
||||
LOG.warn(msg)
|
||||
return False
|
||||
|
||||
@@ -8,6 +8,7 @@ pkgdatadir = $(datadir)/@PACKAGE@/plugins/import
|
||||
pkgdata_PYTHON = \
|
||||
import.gpr.py \
|
||||
ImportCsv.py \
|
||||
ImportDjango.py \
|
||||
ImportGedcom.py \
|
||||
ImportGeneWeb.py \
|
||||
ImportGpkg.py \
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||
# Copyright (C) 2009 Gary Burton
|
||||
# Copyright (C) 2009-2010 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
|
||||
@@ -1814,6 +1814,7 @@ class GedcomParser(UpdateCallback):
|
||||
TOKEN_RIN : self.__ignore,
|
||||
TOKEN_NOTE : self.__repo_note,
|
||||
TOKEN_RNOTE : self.__repo_note,
|
||||
TOKEN_CHAN : self.__repo_chan,
|
||||
}
|
||||
|
||||
self.event_parse_tbl = {
|
||||
@@ -1904,6 +1905,9 @@ class GedcomParser(UpdateCallback):
|
||||
|
||||
self.person_fact_parse_tbl = {
|
||||
TOKEN_TYPE : self.__person_fact_type,
|
||||
TOKEN_SOUR : self.__person_attr_source,
|
||||
TOKEN_NOTE : self.__person_attr_note,
|
||||
TOKEN_RNOTE : self.__person_attr_note,
|
||||
}
|
||||
|
||||
self.person_attr_parse_tbl = {
|
||||
@@ -2640,11 +2644,7 @@ class GedcomParser(UpdateCallback):
|
||||
self.__add_default_source(person)
|
||||
|
||||
# commit the person to the database
|
||||
if person.change:
|
||||
self.dbase.commit_person(person, self.trans,
|
||||
change_time=state.person.change)
|
||||
else:
|
||||
self.dbase.commit_person(person, self.trans)
|
||||
self.dbase.commit_person(person, self.trans, state.person.change)
|
||||
|
||||
def __person_sour(self, line, state):
|
||||
"""
|
||||
@@ -3250,7 +3250,6 @@ class GedcomParser(UpdateCallback):
|
||||
|
||||
def __person_fact_type(self, line, state):
|
||||
state.attr.set_type(line.data)
|
||||
self.__skip_subordinate_levels(state.level)
|
||||
|
||||
def __person_bapl(self, line, state):
|
||||
"""
|
||||
@@ -3682,11 +3681,7 @@ class GedcomParser(UpdateCallback):
|
||||
self.__add_default_source(family)
|
||||
|
||||
# commit family to database
|
||||
if family.change:
|
||||
self.dbase.commit_family(family, self.trans,
|
||||
change_time=family.change)
|
||||
else:
|
||||
self.dbase.commit_family(family, self.trans)
|
||||
self.dbase.commit_family(family, self.trans, family.change)
|
||||
|
||||
def __family_husb(self, line, state):
|
||||
"""
|
||||
@@ -4795,7 +4790,7 @@ class GedcomParser(UpdateCallback):
|
||||
state.level = level
|
||||
|
||||
self.__parse_level(state, self.source_func, self.__undefined)
|
||||
self.dbase.commit_source(state.source, self.trans)
|
||||
self.dbase.commit_source(state.source, self.trans, state.source.change)
|
||||
|
||||
def __source_attr(self, line, state):
|
||||
"""
|
||||
@@ -4889,6 +4884,15 @@ class GedcomParser(UpdateCallback):
|
||||
"""
|
||||
self.__parse_note(line, state.repo_ref, state.level+1)
|
||||
|
||||
def __repo_chan(self, line, state):
|
||||
"""
|
||||
@param line: The current line in GedLine format
|
||||
@type line: GedLine
|
||||
@param state: The current state
|
||||
@type state: CurrentState
|
||||
"""
|
||||
self.__parse_change(line, state.repo, state.level+1)
|
||||
|
||||
def __source_abbr(self, line, state):
|
||||
"""
|
||||
@param line: The current line in GedLine format
|
||||
@@ -4984,11 +4988,7 @@ class GedcomParser(UpdateCallback):
|
||||
self.__add_default_source(media)
|
||||
|
||||
# commit the person to the database
|
||||
if media.change:
|
||||
self.dbase.commit_media_object(media, self.trans,
|
||||
change_time=media.change)
|
||||
else:
|
||||
self.dbase.commit_media_object(media, self.trans)
|
||||
self.dbase.commit_media_object(media, self.trans, media.change)
|
||||
|
||||
def __obje_form(self, line, state):
|
||||
"""
|
||||
@@ -5079,7 +5079,7 @@ class GedcomParser(UpdateCallback):
|
||||
@param state: The current state
|
||||
@type state: CurrentState
|
||||
"""
|
||||
self.__skip_subordinate_levels(state.level+1)
|
||||
self.__parse_change(line, state.media, state.level+1)
|
||||
|
||||
def __person_attr_type(self, line, state):
|
||||
"""
|
||||
@@ -5152,7 +5152,7 @@ class GedcomParser(UpdateCallback):
|
||||
state.level = 1
|
||||
self.__parse_level(state, self.repo_parse_tbl, self.__ignore)
|
||||
|
||||
self.dbase.commit_repository(repo, self.trans)
|
||||
self.dbase.commit_repository(repo, self.trans, repo.change)
|
||||
|
||||
def __repo_name(self, line, state):
|
||||
"""
|
||||
@@ -5494,8 +5494,8 @@ class GedcomParser(UpdateCallback):
|
||||
line = self.__get_next_line()
|
||||
if self.__level_is_finished(line, level):
|
||||
if skips and self.want_parse_warnings:
|
||||
msg = _("skipped %d subordinate(s) at line %d")\
|
||||
% (skips, line.line - skips)
|
||||
msg = _("skipped %(skip)d subordinate(s) at line %(line)d") % {
|
||||
'skip' : skips, 'line' : line.line - skips }
|
||||
self.__warn(msg)
|
||||
return
|
||||
skips += 1
|
||||
@@ -5929,4 +5929,4 @@ def __build_date_string(day, mon, year, bce, mmap):
|
||||
retval = "(%d %s)" % (day, mmap[mon])
|
||||
else:
|
||||
retval = "%d %s %d%s" % (day, mmap[mon], year, bce)
|
||||
return retval
|
||||
return retval
|
||||
|
||||
@@ -290,31 +290,15 @@ class BasePersonView(ListView):
|
||||
active_name = _("Delete Person (%s)") % name_displayer.display(person)
|
||||
|
||||
# delete the person from the database
|
||||
# Above will emit person-delete, which removes the person via
|
||||
# callback to the model, so row delete is signaled
|
||||
self.dbstate.db.delete_person_from_database(person, trans)
|
||||
|
||||
# remove the person from the list
|
||||
self.remove_from_person_list(person)
|
||||
|
||||
# commit the transaction
|
||||
self.dbstate.db.transaction_commit(trans, active_name)
|
||||
|
||||
# select the previously active person, turn off the busy cursor
|
||||
history = self.uistate.get_history(self.navigation_type(),
|
||||
self.navigation_group())
|
||||
history.back()
|
||||
self.uistate.set_busy_cursor(False)
|
||||
|
||||
def remove_from_person_list(self, person):
|
||||
"""Remove the selected person from the list. A person object is
|
||||
expected, not an ID"""
|
||||
node = self.model.get_node(person.get_handle())
|
||||
path = self.model.on_get_path(node)
|
||||
(col, row) = path
|
||||
if row > 0:
|
||||
self.selection.select_path((col, row))
|
||||
elif row == 0 and self.model.on_get_iter(path):
|
||||
self.selection.select_path(path)
|
||||
|
||||
def dummy_report(self, obj):
|
||||
""" For the xml UI definition of popup to work, the submenu
|
||||
Quick Report must have an entry in the xml
|
||||
|
||||
@@ -133,9 +133,9 @@ class EniroSVMapService(MapService):
|
||||
if (54.55 < latitude < 69.05) and (8.05 < longitude < 24.15):
|
||||
coord_ok = True
|
||||
else:
|
||||
msg2 = _("Latitude not within %s to %s\n") + \
|
||||
_("Longitude not within %s to %s")
|
||||
msg2 = msg2 % (54.55, 69.05, 8.05, 24.15)
|
||||
msg2 = _("Latitude not within %(lat1)s to %(lat2)s\n") + \
|
||||
_("Longitude not within %(long1)s to %(long2)s")
|
||||
msg2 = msg2 % {'lat1' : 54.55, 'lat2' : 69.05, 'long1' : 8.05, 'long2' : 24.15 }
|
||||
WarningDialog(_("Eniro map not available"), msg2 )
|
||||
return
|
||||
|
||||
|
||||
@@ -95,9 +95,8 @@ def run_fam(database, document, family):
|
||||
|
||||
# display the results
|
||||
|
||||
sdoc.title(_("Sorted events of family\n %s - %s") %
|
||||
(sdb.name(sdb.father(family)),
|
||||
sdb.name(sdb.mother(family))))
|
||||
sdoc.title(_("Sorted events of family\n %(father)s - %(mother)s") % {
|
||||
'father' : sdb.name(sdb.father(family)), 'mother' : sdb.name(sdb.mother(family)) })
|
||||
sdoc.paragraph("")
|
||||
|
||||
stab.columns(_("Family Member"), _("Event Type"),
|
||||
|
||||
@@ -77,8 +77,8 @@ class AllRelReport():
|
||||
p1 = self.sdb.name(self.person)
|
||||
if self.person.handle == self.home_person.handle :
|
||||
self.sdoc.paragraph(_FMT_VOID % (
|
||||
_("%s and %s are the same person.") % ( p1, p2))
|
||||
)
|
||||
_("%(person)s and %(active_person)s are the same person.")) % {
|
||||
'person' : p1, 'active_person' : p2 })
|
||||
return
|
||||
|
||||
#check if not a family too:
|
||||
@@ -203,7 +203,8 @@ class AllRelReport():
|
||||
"""
|
||||
p2 = self.sdb.name(self.home_person)
|
||||
p1 = self.sdb.name(self.person)
|
||||
self.sdoc.title(_("Relationships of %s to %s") % (p1 ,p2))
|
||||
self.sdoc.title(_("Relationships of %(person)s to %(active_person)s") % {
|
||||
'person' : p1 ,'active_person' : p2 })
|
||||
self.sdoc.paragraph("")
|
||||
|
||||
def print_details_header(self, relations, pers1, pers2,
|
||||
|
||||
@@ -127,7 +127,8 @@ class SimpleBookTitleOptions(MenuReportOptions):
|
||||
|
||||
dateinfo = time.localtime(time.time())
|
||||
rname = self.__db.get_researcher().get_name()
|
||||
footer_string = _('Copyright %d %s') % (dateinfo[0], rname)
|
||||
footer_string = _('Copyright %(year)d %(name)s') % {
|
||||
'year' : dateinfo[0], 'name' : rname }
|
||||
footer = StringOption(_('Footer'), footer_string )
|
||||
footer.set_help(_("Footer string for the page."))
|
||||
menu.add_option(category_name, "footer", footer)
|
||||
|
||||
@@ -158,6 +158,7 @@ class CalcToolManagedWindow(PluginWindows.ToolManagedWindowBatch):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
PluginWindows.ToolManagedWindowBatch.__init__(self, *args, **kwargs)
|
||||
if self.fail: return
|
||||
self.help_page = self.add_page(_("Help"))
|
||||
self.write_to_page(self.help_page,
|
||||
_("The Calculate Estimated Dates Tool is used to add and remove "
|
||||
@@ -443,7 +444,8 @@ class CalcToolManagedWindow(PluginWindows.ToolManagedWindowBatch):
|
||||
if not birth_ref and add_birth_event:
|
||||
other_name = self.sdb.name(other)
|
||||
if other_name:
|
||||
explanation = _("Added birth event based on %s, from %s") % (evidence, other_name)
|
||||
explanation = _("Added birth event based on %(evidence)s, from %(name)s") % {
|
||||
'evidence' : evidence, 'name' : other_name }
|
||||
else:
|
||||
explanation = _("Added birth event based on %s") % evidence
|
||||
modifier = self.get_modifier("birth")
|
||||
@@ -458,7 +460,8 @@ class CalcToolManagedWindow(PluginWindows.ToolManagedWindowBatch):
|
||||
if not death_ref and add_death_event:
|
||||
other_name = self.sdb.name(other)
|
||||
if other_name:
|
||||
explanation = _("Added death event based on %s, from %s") % (evidence, other_name)
|
||||
explanation = _("Added death event based on %(evidence)s, from %(person)s") % {
|
||||
'evidence' : evidence, 'person' : other_name }
|
||||
else:
|
||||
explanation = _("Added death event based on %s") % evidence
|
||||
modifier = self.get_modifier("death")
|
||||
|
||||
+77
-60
@@ -1453,13 +1453,13 @@ class CheckIntegrity(object):
|
||||
_('The database has passed internal checks'),
|
||||
parent=uistate.window)
|
||||
else:
|
||||
print "No errors were found: the database has passed internal checks."
|
||||
print("No errors were found: the database has passed internal checks.")
|
||||
return 0
|
||||
|
||||
self.text = cStringIO.StringIO()
|
||||
if blink > 0:
|
||||
self.text.write(ngettext("%d broken child/family link was fixed\n", \
|
||||
"%d broken child-family links were found\n", blink) % blink)
|
||||
self.text.write(ngettext("%(quantity)d broken child/family link was fixed\n", \
|
||||
"%(quantity)d broken child-family links were found\n", blink) % { 'quantity' : blink } )
|
||||
for (person_handle, family_handle) in self.broken_links:
|
||||
person = self.db.get_person_from_handle(person_handle)
|
||||
if person:
|
||||
@@ -1472,11 +1472,13 @@ class CheckIntegrity(object):
|
||||
except:
|
||||
pn = _("Unknown")
|
||||
self.text.write('\t')
|
||||
self.text.write(_("%s was removed from the family of %s\n") % (cn, pn))
|
||||
self.text.write(_("%(person)s was removed from the family of %(family)s\n") % {
|
||||
'person' : cn, 'family' : pn } )
|
||||
|
||||
if plink > 0:
|
||||
self.text.write(ngettext("%d broken spouse/family link was fixed\n", \
|
||||
"%d broken spouse/family links were found\n", plink) % plink)
|
||||
self.text.write(ngettext("%(quantity)d broken spouse/family link was fixed\n",
|
||||
"%(quantity)d broken spouse/family links were found\n", plink) % {
|
||||
'quantity' : plink })
|
||||
for (person_handle, family_handle) in self.broken_parent_links:
|
||||
person = self.db.get_person_from_handle(person_handle)
|
||||
if person:
|
||||
@@ -1489,11 +1491,12 @@ class CheckIntegrity(object):
|
||||
else:
|
||||
pn = family_handle
|
||||
self.text.write('\t')
|
||||
self.text.write(_("%s was restored to the family of %s\n") % (cn, pn))
|
||||
self.text.write(_("%(person)s was restored to the family of %(family)s\n") % {
|
||||
'person' : cn, 'family' : pn } )
|
||||
|
||||
if slink > 0:
|
||||
self.text.write(ngettext("%d duplicate spouse/family link was found\n", \
|
||||
"%d duplicate spouse/family links were found\n", slink) % slink)
|
||||
self.text.write(ngettext("%(quantity)d duplicate spouse/family link was found\n", \
|
||||
"%(quantity)d duplicate spouse/family links were found\n", slink) % { 'quantity' : slink })
|
||||
for (person_handle, family_handle) in self.broken_parent_links:
|
||||
person = self.db.get_person_from_handle(person_handle)
|
||||
if person:
|
||||
@@ -1506,98 +1509,112 @@ class CheckIntegrity(object):
|
||||
else:
|
||||
pn = _("None")
|
||||
self.text.write('\t')
|
||||
self.text.write(_("%s was restored to the family of %s\n") % (cn, pn))
|
||||
self.text.write(_("%(person)s was restored to the family of %(family)s\n") % {
|
||||
'person' : cn, 'family' : pn } )
|
||||
|
||||
if efam == 1:
|
||||
self.text.write(_("%d family with no parents or children found, removed.\n"))
|
||||
self.text.write("\t%s\n" % self.empty_family[0])
|
||||
elif efam > 1:
|
||||
self.text.write(_("%d families with no parents or children, removed.\n") % efam)
|
||||
self.text.write(_("%(quantity)d families with no parents or children, removed.\n") % {
|
||||
'quantity' : efam })
|
||||
|
||||
if rel:
|
||||
self.text.write(ngettext("%d corrupted family relationship fixed\n", \
|
||||
"%d corrupted family relationship fixed\n", rel) % rel )
|
||||
self.text.write(ngettext("%d corrupted family relationship fixed\n",
|
||||
"%d corrupted family relationship fixed\n", rel) % rel )
|
||||
|
||||
if person_references:
|
||||
self.text.write(ngettext("%d person was referenced but not found\n", \
|
||||
"%d persons were referenced, but not found\n", person_references) % person_references)
|
||||
self.text.write(ngettext("%d person was referenced but not found\n",
|
||||
"%d persons were referenced, but not found\n",
|
||||
person_references) % person_references)
|
||||
|
||||
if invalid_dates:
|
||||
self.text.write(ngettext("%d date was corrected\n", \
|
||||
"%d dates were corrected\n", invalid_dates) % invalid_dates)
|
||||
self.text.write(ngettext("%d date was corrected\n",
|
||||
"%d dates were corrected\n",
|
||||
invalid_dates) % invalid_dates)
|
||||
|
||||
if repo_references:
|
||||
self.text.write(ngettext("%d repository was referenced but not found\n", \
|
||||
"%d repositories were referenced, but not found\n", repo_references) % repo_references)
|
||||
self.text.write(ngettext("%(quantity)d repository was referenced but not found\n", \
|
||||
"%(quantity)d repositories were referenced, but not found\n", repo_references) % {
|
||||
'quantity' : repo_references })
|
||||
|
||||
if photos:
|
||||
self.text.write(ngettext("%d media object was referenced, but not found\n", \
|
||||
"%d media objects were referenced, but not found\n", photos) % photos)
|
||||
self.text.write(ngettext("%(quantity)d media object was referenced, but not found\n", \
|
||||
"%(quantity)d media objects were referenced, but not found\n", photos) % { 'quantity' : photos })
|
||||
|
||||
if bad_photos:
|
||||
self.text.write(ngettext("Reference to %d missing media object was kept\n", \
|
||||
"References to %d media objects were kept\n", bad_photos) % bad_photos)
|
||||
self.text.write(ngettext("Reference to %(quantity)d missing media object was kept\n", \
|
||||
"References to %(quantity)d media objects were kept\n", bad_photos) % {
|
||||
'quantity' : bad_photos })
|
||||
|
||||
if replaced_photos:
|
||||
self.text.write(ngettext("%d missing media object was replaced\n", \
|
||||
"%d missing media objects were replaced\n", replaced_photos) % replaced_photos)
|
||||
self.text.write(ngettext("%(quantity)d missing media object was replaced\n", \
|
||||
"%(quantity)d missing media objects were replaced\n", replaced_photos) % {
|
||||
'quantity' : replaced_photos })
|
||||
|
||||
if removed_photos:
|
||||
self.text.write(ngettext("%d missing media object was removed\n", \
|
||||
"%d missing media objects were removed\n", removed_photos) % removed_photos)
|
||||
self.text.write(ngettext("%(quantity)d missing media object was removed\n", \
|
||||
"%(quantity)d missing media objects were removed\n", removed_photos) % {
|
||||
'quantity' : removed_photos })
|
||||
|
||||
if event_invalid:
|
||||
self.text.write(ngettext("%d invalid event reference was removed\n", \
|
||||
"%d invalid event references were removed\n", event_invalid) % event_invalid)
|
||||
self.text.write(ngettext("%(quantity)d invalid event reference was removed\n", \
|
||||
"%(quantity)d invalid event references were removed\n", event_invalid) % {
|
||||
'quantity' : event_invalid })
|
||||
|
||||
if birth_invalid:
|
||||
self.text.write(ngettext("%d invalid birth event name was fixed\n", \
|
||||
"%d invalid birth event names were fixed\n", birth_invalid) % birth_invalid)
|
||||
self.text.write(ngettext("%(quantity)d invalid birth event name was fixed\n", \
|
||||
"%(quantity)d invalid birth event names were fixed\n", birth_invalid) % {
|
||||
'quantity' : birth_invalid })
|
||||
|
||||
if death_invalid:
|
||||
self.text.write(ngettext("%d invalid death event name was fixed\n", \
|
||||
"%d invalid death event names were fixed\n", death_invalid) % death_invalid)
|
||||
self.text.write(ngettext("%(quantity)d invalid death event name was fixed\n", \
|
||||
"%(quantity)d invalid death event names were fixed\n", death_invalid) % {
|
||||
'quantity' : death_invalid })
|
||||
|
||||
if place_references:
|
||||
self.text.write(ngettext("%d place was referenced but not found\n", \
|
||||
"%d places were referenced, but not found\n", place_references) % place_references)
|
||||
self.text.write(ngettext("%(quantity)d place was referenced but not found\n", \
|
||||
"%(quantity)d places were referenced, but not found\n", place_references) % {
|
||||
'quantity' : place_references })
|
||||
|
||||
if source_references:
|
||||
self.text.write(ngettext("%d source was referenced but not found\n", \
|
||||
"%d sources were referenced, but not found\n", source_references) % source_references)
|
||||
self.text.write(ngettext("%(quantity)d source was referenced but not found\n", \
|
||||
"%(quantity)d sources were referenced, but not found\n", source_references) % {
|
||||
'quantity' : source_references })
|
||||
|
||||
if media_references:
|
||||
self.text.write(ngettext("%d media object was referenced but not found\n", \
|
||||
"%d media objects were referenced but not found\n", media_references) % media_references)
|
||||
|
||||
if note_references:
|
||||
self.text.write(ngettext("%d note object was referenced but not found\n", \
|
||||
"%d note objects were referenced but not found\n", note_references) % note_references)
|
||||
self.text.write(ngettext("%(quantity)d note object was referenced but not found\n", \
|
||||
"%(quantity)d note objects were referenced but not found\n", note_references) % {
|
||||
'quantity' : note_references })
|
||||
|
||||
if name_format:
|
||||
self.text.write(ngettext("%d invalid name format reference was removed\n", \
|
||||
"%d invalid name format references were removed\n", name_format) % name_format)
|
||||
self.text.write(ngettext("%(quantity)d invalid name format reference was removed\n", \
|
||||
"%(quantity)d invalid name format references were removed\n", name_format) % {
|
||||
'quantity' : name_format })
|
||||
|
||||
if empty_objs > 0 :
|
||||
self.text.write(_("%d empty objects removed:\n"
|
||||
" %d person objects\n"
|
||||
" %d family objects\n"
|
||||
" %d event objects\n"
|
||||
" %d source objects\n"
|
||||
" %d media objects\n"
|
||||
" %d place objects\n"
|
||||
" %d repository objects\n"
|
||||
" %d note objects\n"
|
||||
) % (empty_objs,
|
||||
len(self.empty_objects['persons']),
|
||||
len(self.empty_objects['families']),
|
||||
len(self.empty_objects['events']),
|
||||
len(self.empty_objects['sources']),
|
||||
len(self.empty_objects['media']),
|
||||
len(self.empty_objects['places']),
|
||||
len(self.empty_objects['repos']),
|
||||
len(self.empty_objects['notes'])
|
||||
) )
|
||||
self.text.write(_("%(empty_obj)d empty objects removed:\n"
|
||||
" %(person)d person objects\n"
|
||||
" %(family)d family objects\n"
|
||||
" %(event)d event objects\n"
|
||||
" %(source)d source objects\n"
|
||||
" %(media)d media objects\n"
|
||||
" %(place)d place objects\n"
|
||||
" %(repo)d repository objects\n"
|
||||
" %(note)d note objects\n" ) % {
|
||||
'empty_obj' : empty_objs,
|
||||
'person' : len(self.empty_objects['persons']),
|
||||
'family' : len(self.empty_objects['families']),
|
||||
'event' : len(self.empty_objects['events']),
|
||||
'source' : len(self.empty_objects['sources']),
|
||||
'media' : len(self.empty_objects['media']),
|
||||
'place' : len(self.empty_objects['places']),
|
||||
'repo' : len(self.empty_objects['repos']),
|
||||
'note' : len(self.empty_objects['notes']) } )
|
||||
|
||||
return errors
|
||||
|
||||
|
||||
@@ -452,8 +452,8 @@ class PathChange(BatchOp):
|
||||
to_text = unicode(self.to_entry.get_text())
|
||||
text = _(
|
||||
'The following action is to be performed:\n\n'
|
||||
'Operation:\t%s\nReplace:\t\t%s\nWith:\t\t%s'
|
||||
) % (self.title.replace('_',''), from_text, to_text)
|
||||
'Operation:\t%(title)s\nReplace:\t\t%(src_fname)s\nWith:\t\t%(dest_fname)s') % {
|
||||
'title' : self.title.replace('_',''), 'src_fname' : from_text, 'dest_fname' : to_text }
|
||||
return text
|
||||
|
||||
def _prepare(self):
|
||||
|
||||
@@ -185,7 +185,8 @@ class RelCalc(Tool.Tool, ManagedWindow.ManagedWindow):
|
||||
if other_person is None:
|
||||
pass
|
||||
elif self.person.handle == other_person.handle:
|
||||
rstr = _("%s and %s are the same person.") % (p1, p2)
|
||||
rstr = _("%(person)s and %(active_person)s are the same person.") % {
|
||||
'person' : p1, 'active_person' : p2 }
|
||||
text.append((rstr, ""))
|
||||
elif len(rel_strings) == 0:
|
||||
rstr = _("%(person)s and %(active_person)s are not related.") % {
|
||||
@@ -209,8 +210,8 @@ class RelCalc(Tool.Tool, ManagedWindow.ManagedWindow):
|
||||
p2c = self.db.get_person_from_handle(common[1])
|
||||
p1str = name_displayer.display(p1c)
|
||||
p2str = name_displayer.display(p2c)
|
||||
commontext = " " + _("Their common ancestors are %s and %s."
|
||||
) % (p1str,p2str)
|
||||
commontext = " " + _("Their common ancestors are %(ancestor1)s and %(ancestor2)s.") % {
|
||||
'ancestor1' : p1str, 'ancestor2' : p2str }
|
||||
elif length > 2:
|
||||
index = 0
|
||||
commontext = " " + _("Their common ancestors are: ")
|
||||
|
||||
@@ -87,6 +87,7 @@
|
||||
<object class="GtkComboBoxEntry" id="markercombo">
|
||||
<property name="visible">True</property>
|
||||
<property name="model">model1</property>
|
||||
<property name="text_column">0</property>
|
||||
<accelerator key="M" signal="grab_focus" modifiers="GDK_MOD1_MASK"/>
|
||||
<child>
|
||||
<object class="GtkCellRendererText" id="renderer1"/>
|
||||
|
||||
@@ -8,6 +8,8 @@ pkgdatadir = $(datadir)/@PACKAGE@/plugins/view
|
||||
pkgdata_PYTHON = \
|
||||
eventview.py \
|
||||
familyview.py \
|
||||
fanchartview.gpr.py \
|
||||
fanchartview.py \
|
||||
geoview.py \
|
||||
geoview.gpr.py \
|
||||
grampletview.py \
|
||||
@@ -15,8 +17,6 @@ pkgdata_PYTHON = \
|
||||
mediaview.py \
|
||||
noteview.py \
|
||||
pedigreeview.py \
|
||||
pedigreeviewext.py \
|
||||
pedigreeviewext.gpr.py \
|
||||
personlistview.py \
|
||||
persontreeview.py \
|
||||
placelistview.py \
|
||||
|
||||
+13
-11
@@ -498,11 +498,11 @@ class GeoView(HtmlView):
|
||||
configdialog.add_text(table,
|
||||
_("You can adjust the time period with the two following values."), 1)
|
||||
configdialog.add_pos_int_entry(table,
|
||||
_('The number of years before the first event date.'),
|
||||
_('The number of years before the first event date'),
|
||||
2, 'preferences.timeperiod-before-range',
|
||||
self.config_update_int)
|
||||
configdialog.add_pos_int_entry(table,
|
||||
_('The number of years after the last event date.'),
|
||||
_('The number of years after the last event date'),
|
||||
3, 'preferences.timeperiod-after-range',
|
||||
self.config_update_int)
|
||||
|
||||
@@ -547,7 +547,7 @@ class GeoView(HtmlView):
|
||||
_('Test the network '),
|
||||
1, 'preferences.network-test')
|
||||
configdialog.add_pos_int_entry(table,
|
||||
_('Time out for the network connection test '),
|
||||
_('Time out for the network connection test'),
|
||||
2, 'preferences.network-timeout',
|
||||
self.config_update_int)
|
||||
configdialog.add_pos_int_entry(table,
|
||||
@@ -640,7 +640,7 @@ class GeoView(HtmlView):
|
||||
"""
|
||||
prefix = widget.get_text().lower()
|
||||
count = 0
|
||||
found = "inconnu"
|
||||
found = _("Unknown")
|
||||
if event.keyval == KEY_TAB:
|
||||
for place in self.plist:
|
||||
if prefix in place[0].lower():
|
||||
@@ -918,9 +918,12 @@ class GeoView(HtmlView):
|
||||
latitude, longitude = conv_lat_lon(self.reallatitude,
|
||||
self.reallongitude,
|
||||
"D.D8")
|
||||
mess = "lon= %s \tlat= %s\tzoom= %s" % ( latitude,
|
||||
longitude,
|
||||
self.realzoom)
|
||||
mess = "%s= %s\t%s= %s\t%s= %s" % ( _("Latitude"),
|
||||
latitude,
|
||||
_("Longitude"),
|
||||
longitude,
|
||||
_("Zoom"),
|
||||
self.realzoom)
|
||||
self.context_id = self.uistate.status.push(1, mess)
|
||||
gobject.timeout_add(timeloop,
|
||||
self._savezoomandposition, timeloop)
|
||||
@@ -1022,6 +1025,7 @@ class GeoView(HtmlView):
|
||||
<separator/>
|
||||
<menuitem action="AddPlaceMenu"/>
|
||||
<menuitem action="LinkPlaceMenu"/>
|
||||
<menuitem action="FilterEdit"/>
|
||||
</menu>
|
||||
</menubar>
|
||||
<toolbar name="ToolBar">
|
||||
@@ -1089,9 +1093,8 @@ class GeoView(HtmlView):
|
||||
self._add_action('EventMapsMenu', 'geo-show-event', _('_Event'),
|
||||
callback=self._event_places,
|
||||
tip=_("Attempt to view places connected to all events."))
|
||||
self._add_toggle_action('Filter', None, _('_Filter Sidebar'),
|
||||
callback=self.filter_toggle_action,
|
||||
value=config.get('interface.filter'))
|
||||
self._add_toggle_action('FilterEdit', None, _('_Filter Sidebar'),
|
||||
callback=self.filter_toggle_action)
|
||||
config.connect('interface.filter', self.filter_toggle)
|
||||
|
||||
def go_back(self, button): # pylint: disable-msg=W0613
|
||||
@@ -2249,7 +2252,6 @@ class GeoView(HtmlView):
|
||||
self.filter.hide()
|
||||
active = False
|
||||
config.set('interface.filter', active)
|
||||
self.build_tree()
|
||||
|
||||
def filter_clicked(self):
|
||||
"""
|
||||
|
||||
@@ -32,8 +32,9 @@ Media View.
|
||||
from gen.ggettext import gettext as _
|
||||
import urlparse
|
||||
import os
|
||||
import sys
|
||||
import cPickle as pickle
|
||||
|
||||
import urllib
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# GTK/Gnome modules
|
||||
@@ -146,12 +147,14 @@ class MediaView(ListView):
|
||||
|
||||
dnd_types = [ self._DND_TYPE.target() ]
|
||||
|
||||
self.list.drag_dest_set(gtk.DEST_DEFAULT_ALL, dnd_types,
|
||||
gtk.gdk.ACTION_COPY)
|
||||
self.list.drag_dest_set(gtk.DEST_DEFAULT_MOTION|gtk.DEST_DEFAULT_DROP,
|
||||
dnd_types,
|
||||
gtk.gdk.ACTION_MOVE|gtk.gdk.ACTION_COPY)
|
||||
self.list.drag_source_set(gtk.gdk.BUTTON1_MASK,
|
||||
[self._DND_TYPE.target()],
|
||||
gtk.gdk.ACTION_COPY)
|
||||
self.list.connect('drag_data_get', self.drag_data_get)
|
||||
#connected in listview already
|
||||
#self.list.connect('drag_data_get', self.drag_data_get)
|
||||
self.list.connect('drag_data_received', self.drag_data_received)
|
||||
|
||||
def drag_data_get(self, widget, context, sel_data, info, time):
|
||||
@@ -193,35 +196,36 @@ class MediaView(ListView):
|
||||
|
||||
If the selection data is define, extract the value from sel_data.data,
|
||||
and decide if this is a move or a reorder.
|
||||
The only data we accept on mediaview is dropping a file, so URI_LIST.
|
||||
We assume this is what we obtain
|
||||
"""
|
||||
if sel_data and sel_data.data:
|
||||
cleaned_string = sel_data.data.replace('\0', ' ')
|
||||
cleaned_string = cleaned_string.replace("\r", " ").strip()
|
||||
data_list = Utils.fix_encoding(cleaned_string).split('\n')
|
||||
for d in [item.strip() for item in data_list]:
|
||||
protocol, site, mfile, j, k, l = urlparse.urlparse(d)
|
||||
if protocol == "file":
|
||||
name = Utils.fix_encoding(mfile)
|
||||
mime = gen.mime.get_type(name)
|
||||
if not gen.mime.is_valid_type(mime):
|
||||
return
|
||||
photo = gen.lib.MediaObject()
|
||||
#If in Windows, the url from urlparse.urlparse(d) above is incorrect
|
||||
# It leaves a "/" first in the url and this is not a valid Windows path/file name.
|
||||
if constfunc.win():
|
||||
if name[0] == "/":
|
||||
name = name[1:]
|
||||
# Then replace all %20 with a space
|
||||
name = name.replace('%20',' ')
|
||||
photo.set_path(name)
|
||||
photo.set_mime_type(mime)
|
||||
basename = os.path.basename(name)
|
||||
(root, ext) = os.path.splitext(basename)
|
||||
photo.set_description(root)
|
||||
trans = self.dbstate.db.transaction_begin()
|
||||
self.dbstate.db.add_object(photo, trans)
|
||||
self.dbstate.db.transaction_commit(trans,
|
||||
_("Drag Media Object"))
|
||||
if not sel_data:
|
||||
return
|
||||
#modern file managers provide URI_LIST. For Windows split sel_data.data
|
||||
if constfunc.win():
|
||||
files = sel_data.data.split('\n')
|
||||
else:
|
||||
files = sel_data.get_uris()
|
||||
for file in files:
|
||||
clean_string = Utils.fix_encoding(
|
||||
file.replace('\0',' ').replace("\r", " ").strip())
|
||||
protocol, site, mfile, j, k, l = urlparse.urlparse(clean_string)
|
||||
if protocol == "file":
|
||||
name = unicode(urllib.url2pathname(
|
||||
mfile.encode(sys.getfilesystemencoding())))
|
||||
mime = gen.mime.get_type(name)
|
||||
if not gen.mime.is_valid_type(mime):
|
||||
return
|
||||
photo = gen.lib.MediaObject()
|
||||
photo.set_path(name)
|
||||
photo.set_mime_type(mime)
|
||||
basename = os.path.basename(name)
|
||||
(root, ext) = os.path.splitext(basename)
|
||||
photo.set_description(root)
|
||||
trans = self.dbstate.db.transaction_begin()
|
||||
self.dbstate.db.add_object(photo, trans)
|
||||
self.dbstate.db.transaction_commit(trans,
|
||||
_("Drag Media Object"))
|
||||
widget.emit_stop_by_name('drag_data_received')
|
||||
|
||||
def get_bookmarks(self):
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
# encoding:utf-8
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2009 Benny Malengier
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id$
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
# default views of Gramps
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
register(VIEW,
|
||||
id = 'pedigreeviewext',
|
||||
name = _("Pedigree View"),
|
||||
description = _("The view showing an ancestor pedigree of the selected person"),
|
||||
version = '1.0',
|
||||
gramps_target_version = '3.2',
|
||||
status = STABLE,
|
||||
fname = 'pedigreeviewext.py',
|
||||
authors = [u"The Gramps project"],
|
||||
authors_email = ["http://gramps-project.org"],
|
||||
category = ("Ancestry", _("Ancestry")),
|
||||
viewclass = 'PedigreeViewExt',
|
||||
order = START,
|
||||
)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2001-2007 Donald N. Allingham
|
||||
# Copyright (C) 2009 Gary Burton
|
||||
# Copyright (C) 2009-2010 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
|
||||
@@ -568,7 +568,7 @@ class RelationshipView(NavigationView):
|
||||
fmt = '<span size="larger" weight="bold">%s</span>'
|
||||
text = fmt % cgi.escape(name)
|
||||
label = widgets.DualMarkupLabel(text, _GenderCode[person.gender],
|
||||
x_align=1, y_align=0)
|
||||
x_align=1)
|
||||
if self._config.get('preferences.releditbtn'):
|
||||
button = widgets.IconButton(self.edit_button_press,
|
||||
person.handle)
|
||||
|
||||
@@ -1268,7 +1268,7 @@ class BasePage(object):
|
||||
|
||||
# TODO. Check if build_url_fname can be used.
|
||||
newpath = "/".join(['..']*3 + [newpath])
|
||||
if ( constfunc.win ):
|
||||
if constfunc.win():
|
||||
newpath = newpath.replace('\\',"/")
|
||||
|
||||
# begin hyperlink
|
||||
@@ -1346,7 +1346,7 @@ class BasePage(object):
|
||||
real_path, newpath = self.report.prepare_copy_media(photo)
|
||||
# TODO. Check if build_url_fname can be used.
|
||||
newpath = "/".join(['..']*3 + [newpath])
|
||||
if ( constfunc.win ):
|
||||
if constfunc.win():
|
||||
newpath = newpath.replace('\\',"/")
|
||||
|
||||
# begin hyperlink
|
||||
@@ -3628,7 +3628,7 @@ class IndividualPage(BasePage):
|
||||
if mime_type:
|
||||
(photoUrl, thumbnailUrl) = self.report.prepare_copy_media(photo)
|
||||
thumbnailUrl = "/".join(['..']*3 + [thumbnailUrl])
|
||||
if ( constfunc.win ):
|
||||
if constfunc.win():
|
||||
thumbnailUrl = thumbnailUrl.replace('\\',"/")
|
||||
url = self.report.build_url_fname_html(person.handle, "ppl", True)
|
||||
boxbg += self.person_link(url, person, name_style = True,
|
||||
@@ -5441,7 +5441,7 @@ class NavWebReport(Report):
|
||||
if up:
|
||||
subdirs = ['..']*3 + subdirs
|
||||
nname = "/".join(subdirs + [fname])
|
||||
if ( constfunc.win ):
|
||||
if constfunc.win():
|
||||
nname = nname.replace('\\',"/")
|
||||
return nname
|
||||
|
||||
|
||||
Reference in New Issue
Block a user