2006-05-08 Don Allingham <don@gramps-project.org>
* src/GrampsDb/_GrampsDbBase.py: get_default_handle() * src/DisplayState.py: use get_default_handle, fix race condition svn: r6591
This commit is contained in:
parent
4bb09d2fc8
commit
2a7a35a259
@ -1,3 +1,7 @@
|
||||
2006-05-08 Don Allingham <don@gramps-project.org>
|
||||
* src/GrampsDb/_GrampsDbBase.py: get_default_handle()
|
||||
* src/DisplayState.py: use get_default_handle, fix race condition
|
||||
|
||||
2006-05-08 Alex Roitman <shura@gramps-project.org>
|
||||
* src/GrampsDb/_GrampsBSDDB.py (load): Better non-TXN support.
|
||||
* src/UndoHistory.py (__init__): Rename list to tree.
|
||||
|
@ -329,7 +329,7 @@ class DisplayState(GrampsDb.GrampsDBCallback):
|
||||
pname = NameDisplay.displayer.display(person)
|
||||
name = "[%s] %s" % (person.get_gramps_id(),pname)
|
||||
if Config.get(Config.STATUSBAR) > 1:
|
||||
if person.handle != self.dbstate.db.get_default_person().handle:
|
||||
if person.handle != self.dbstate.db.get_default_handle():
|
||||
msg = self.display_relationship()
|
||||
if msg:
|
||||
name = "%s (%s)" % (name,msg)
|
||||
|
@ -1530,6 +1530,12 @@ class GrampsDbBase(GrampsDBCallback):
|
||||
return None
|
||||
return None
|
||||
|
||||
def get_default_handle(self):
|
||||
"""returns the default Person of the database"""
|
||||
if self.metadata:
|
||||
return self.metadata.get('default')
|
||||
return None
|
||||
|
||||
def get_save_path(self):
|
||||
"""returns the save path of the file, or "" if one does not exist"""
|
||||
return self.path
|
||||
|
Loading…
Reference in New Issue
Block a user