* src/DisplayTabs/_BackRefModel.py: allow repository in backref (backref of note)

* src/DisplayTabs/_BackRefList.py: allow edit of repository from backrefs

2007-10-20  Benny Malengier  <benny.malengier@gramps-project.org>


svn: r9218
This commit is contained in:
Benny Malengier 2007-10-20 12:17:24 +00:00
parent b75de5748f
commit 3844d8cb8e
3 changed files with 17 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2007-10-20 Benny Malengier <benny.malengier@gramps-project.org>
* src/DisplayTabs/_BackRefModel.py: allow repository in backref (backref of note)
* src/DisplayTabs/_BackRefList.py: allow edit of repository from backrefs
2007-10-20 Benny Malengier <benny.malengier@gramps-project.org>
* README: gramps 3.0 requires python 2.5

View File

@ -165,3 +165,11 @@ class BackRefList(EmbeddedList):
EditEvent(self.dbstate, self.uistate, [], event)
except Errors.WindowActiveError:
pass
elif reftype == 'Repository':
try:
from Editors import EditRepository
repo = self.dbstate.db.get_repository_from_handle(ref)
EditRepository(self.dbstate, self.uistate, [], repo)
except Errors.WindowActiveError:
pass

View File

@ -87,6 +87,11 @@ class BackRefModel(gtk.ListStore):
name = p.get_title()
gid = p.gramps_id
handle = p.handle
elif dtype == 'Repository':
p = self.db.get_repository_from_handle(ref[1])
name = p.get_name()
gid = p.gramps_id
handle = p.handle
else:
p = self.db.get_object_from_handle(ref[1])
name = p.get_description()