* src/GrampsParser.py: remove debugging statement
* src/RelLib.py: remove debugging statement * src/gramps_main.py: If an invalid ID is found while attempting to access the history, invalidate the history list (set to empty list). This should only happen after a reordering of IDs. svn: r2282
This commit is contained in:
parent
7df344ec86
commit
9ce580c501
@ -275,7 +275,6 @@ class GrampsParser:
|
|||||||
if attrs.has_key('ref'):
|
if attrs.has_key('ref'):
|
||||||
self.witness = RelLib.Witness(RelLib.Event.ID,attrs['ref'])
|
self.witness = RelLib.Witness(RelLib.Event.ID,attrs['ref'])
|
||||||
if attrs.has_key('name'):
|
if attrs.has_key('name'):
|
||||||
print "name",attrs['name']
|
|
||||||
self.witness = RelLib.Witness(RelLib.Event.NAME,attrs['name'])
|
self.witness = RelLib.Witness(RelLib.Event.NAME,attrs['name'])
|
||||||
|
|
||||||
def start_coord(self,attrs):
|
def start_coord(self,attrs):
|
||||||
|
@ -90,7 +90,7 @@ class PeopleView:
|
|||||||
except:
|
except:
|
||||||
self.parent.change_active_person(None)
|
self.parent.change_active_person(None)
|
||||||
self.person_tree.unselect()
|
self.person_tree.unselect()
|
||||||
|
|
||||||
def change_alpha_page(self,obj,junk,page):
|
def change_alpha_page(self,obj,junk,page):
|
||||||
"""Change the page. Be careful not to take action while the pages
|
"""Change the page. Be careful not to take action while the pages
|
||||||
are begin removed. If clearing_tabs is set, then we don't do anything"""
|
are begin removed. If clearing_tabs is set, then we don't do anything"""
|
||||||
|
@ -2304,12 +2304,9 @@ class GrampsDB(Persistent):
|
|||||||
return self.surnames
|
return self.surnames
|
||||||
|
|
||||||
def addSurname(self,name):
|
def addSurname(self,name):
|
||||||
try:
|
if name and name not in self.surnames:
|
||||||
if name and name not in self.surnames:
|
self.surnames.append(name)
|
||||||
self.surnames.append(name)
|
self.surnames.sort()
|
||||||
self.surnames.sort()
|
|
||||||
except:
|
|
||||||
print name
|
|
||||||
|
|
||||||
def getBookmarks(self):
|
def getBookmarks(self):
|
||||||
"""returns the list of Person instances in the bookmarks"""
|
"""returns the list of Person instances in the bookmarks"""
|
||||||
|
@ -397,29 +397,34 @@ class Gramps:
|
|||||||
item.show()
|
item.show()
|
||||||
gomenu.append(item)
|
gomenu.append(item)
|
||||||
|
|
||||||
if len(self.history) > 0:
|
try:
|
||||||
# Draw separator
|
if len(self.history) > 0:
|
||||||
item = gtk.MenuItem()
|
# Draw separator
|
||||||
item.show()
|
item = gtk.MenuItem()
|
||||||
gomenu.append(item)
|
item.show()
|
||||||
|
gomenu.append(item)
|
||||||
pids = self.mhistory[:]
|
|
||||||
pids.reverse()
|
pids = self.mhistory[:]
|
||||||
num = 0
|
pids.reverse()
|
||||||
haveit = []
|
num = 0
|
||||||
for pid in pids:
|
haveit = []
|
||||||
if num >= 10:
|
for pid in pids:
|
||||||
break
|
if num >= 10:
|
||||||
if pid not in haveit:
|
break
|
||||||
haveit.append(pid)
|
if pid not in haveit:
|
||||||
person = self.db.getPerson(pid)
|
haveit.append(pid)
|
||||||
item = gtk.MenuItem("_%d. %s [%s]" %
|
person = self.db.getPerson(pid)
|
||||||
(num,person.getPrimaryName().getName(),pid))
|
item = gtk.MenuItem("_%d. %s [%s]" %
|
||||||
item.connect("activate",self.bookmark_callback,person)
|
(num,person.getPrimaryName().getName(),pid))
|
||||||
item.show()
|
item.connect("activate",self.bookmark_callback,person)
|
||||||
gomenu.append(item)
|
item.show()
|
||||||
num = num + 1
|
gomenu.append(item)
|
||||||
else:
|
num = num + 1
|
||||||
|
else:
|
||||||
|
self.back.set_sensitive(0)
|
||||||
|
self.forward.set_sensitive(0)
|
||||||
|
except:
|
||||||
|
self.history = []
|
||||||
self.back.set_sensitive(0)
|
self.back.set_sensitive(0)
|
||||||
self.forward.set_sensitive(0)
|
self.forward.set_sensitive(0)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user