Fixes for bad date detection ZODB source display
svn: r1123
This commit is contained in:
parent
6ae786b5a4
commit
e2eebf00d1
@ -264,7 +264,7 @@ class Date:
|
|||||||
try:
|
try:
|
||||||
return self.get_fmt(SingleDate.getDate)
|
return self.get_fmt(SingleDate.getDate)
|
||||||
except:
|
except:
|
||||||
return "DATE CONVERSION ERROR"
|
return "DATE ERROR (d%d/m%d/y%d)" % (self.start.day,self.start.month,self.start.year)
|
||||||
|
|
||||||
def getQuoteDate(self):
|
def getQuoteDate(self):
|
||||||
if self.calendar == GREGORIAN:
|
if self.calendar == GREGORIAN:
|
||||||
|
@ -2029,7 +2029,6 @@ class GrampsDB(Persistent):
|
|||||||
"""returns a map of gramps's IDs to Source instances"""
|
"""returns a map of gramps's IDs to Source instances"""
|
||||||
return extmap(self.sourceMap)
|
return extmap(self.sourceMap)
|
||||||
|
|
||||||
|
|
||||||
def getObjectMap(self):
|
def getObjectMap(self):
|
||||||
"""returns a map of gramps's IDs to Object instances"""
|
"""returns a map of gramps's IDs to Object instances"""
|
||||||
return self.objectMap
|
return self.objectMap
|
||||||
|
@ -247,21 +247,23 @@ class SourceEditor:
|
|||||||
self.author_field.set_text("")
|
self.author_field.set_text("")
|
||||||
self.pub_field.set_text("")
|
self.pub_field.set_text("")
|
||||||
|
|
||||||
values = self.db.getSourceMap().values()
|
values = []
|
||||||
values.sort(by_title)
|
for v in self.db.getSourceKeys():
|
||||||
|
values.append(self.db.getSourceDisplay(v))
|
||||||
|
values.sort()
|
||||||
|
|
||||||
sel_child = None
|
sel_child = None
|
||||||
list = []
|
list = []
|
||||||
for src in values:
|
for src in values:
|
||||||
l = gtk.GtkLabel("%s [%s]" % (src.getTitle(),src.getId()))
|
l = gtk.GtkLabel("%s [%s]" % (src[0],src[1]))
|
||||||
l.show()
|
l.show()
|
||||||
l.set_alignment(0,0.5)
|
l.set_alignment(0,0.5)
|
||||||
c = gtk.GtkListItem()
|
c = gtk.GtkListItem()
|
||||||
c.add(l)
|
c.add(l)
|
||||||
c.set_data("s",src)
|
c.set_data("s",src[1])
|
||||||
c.show()
|
c.show()
|
||||||
list.append(c)
|
list.append(c)
|
||||||
if self.active_source == src:
|
if self.active_source and self.active_source.getId() == src[1]:
|
||||||
sel_child = c
|
sel_child = c
|
||||||
|
|
||||||
self.title_menu.list.append_items(list)
|
self.title_menu.list.append_items(list)
|
||||||
@ -293,7 +295,8 @@ class SourceEditor:
|
|||||||
Utils.destroy_passed_object(obj)
|
Utils.destroy_passed_object(obj)
|
||||||
|
|
||||||
def on_source_changed(self,obj):
|
def on_source_changed(self,obj):
|
||||||
self.active_source = obj.list.get_selection()[0].get_data("s")
|
id = obj.list.get_selection()[0].get_data("s")
|
||||||
|
self.active_source = self.db.getSource(id)
|
||||||
|
|
||||||
if self.active_source == None:
|
if self.active_source == None:
|
||||||
self.author_field.set_text(self.active_source.getAuthor())
|
self.author_field.set_text(self.active_source.getAuthor())
|
||||||
|
Loading…
Reference in New Issue
Block a user