Citation refinements
svn: r18584
This commit is contained in:
@@ -923,6 +923,9 @@ class SimpleAccess(object):
|
||||
return "%s: %s [%s]" % (_(object_class),
|
||||
self.title(obj),
|
||||
self.gid(obj))
|
||||
elif isinstance(obj, gen.lib.Citation):
|
||||
return "%s: [%s]" % (_(object_class),
|
||||
self.gid(obj))
|
||||
elif isinstance(obj, gen.lib.Place):
|
||||
return "%s: %s [%s]" % (_(object_class),
|
||||
place_name(self.dbase,
|
||||
@@ -965,10 +968,10 @@ class SimpleAccess(object):
|
||||
return "%s and %s" % (mother_text, father_text)
|
||||
elif isinstance(obj, gen.lib.MediaObject):
|
||||
return obj.desc
|
||||
elif isinstance(obj, gen.lib.Citation):
|
||||
return obj.gramps_id
|
||||
elif isinstance(obj, gen.lib.Source):
|
||||
return self.title(obj)
|
||||
elif isinstance(obj, gen.lib.Citation):
|
||||
return self.page(obj)
|
||||
elif isinstance(obj, gen.lib.Place):
|
||||
return place_name(self.dbase, obj.handle)
|
||||
elif isinstance(obj, gen.lib.Repository):
|
||||
|
@@ -156,7 +156,7 @@ class SimpleTable(object):
|
||||
if (objclass == 'Filter' and
|
||||
handle[0] in ['Person', 'Family', 'Place', 'Event',
|
||||
'Repository', 'Note', 'MediaObject',
|
||||
'Source']):
|
||||
'Citation', 'Source']):
|
||||
menu_item = gtk.MenuItem(_("See data not in Filter"))
|
||||
menu_item.connect("activate",
|
||||
lambda widget: self.show_not_in_filter(handle[0]))
|
||||
@@ -178,7 +178,7 @@ class SimpleTable(object):
|
||||
"""
|
||||
Handle events on tables. obj is a treeview
|
||||
"""
|
||||
from gui.editors import (EditPerson, EditEvent, EditFamily, EditSource,
|
||||
from gui.editors import (EditPerson, EditEvent, EditFamily, EditCitation, EditSource,
|
||||
EditPlace, EditRepository, EditNote, EditMedia)
|
||||
selection = obj.get_selection()
|
||||
store, paths = selection.get_selected_rows()
|
||||
@@ -219,6 +219,15 @@ class SimpleTable(object):
|
||||
return True # handled event
|
||||
except Errors.WindowActiveError:
|
||||
pass
|
||||
elif objclass == 'Citation':
|
||||
ref = self.access.dbase.get_citation_from_handle(handle)
|
||||
if ref:
|
||||
try:
|
||||
EditCitation(self.simpledoc.doc.dbstate,
|
||||
self.simpledoc.doc.uistate, [], ref)
|
||||
return True # handled event
|
||||
except Errors.WindowActiveError:
|
||||
pass
|
||||
elif objclass == 'Source':
|
||||
ref = self.access.dbase.get_source_from_handle(handle)
|
||||
if ref:
|
||||
@@ -349,14 +358,14 @@ class SimpleTable(object):
|
||||
retval.append(self.access.describe(item))
|
||||
if (self.__link_col == col or link is None):
|
||||
link = ('Family', item.handle)
|
||||
elif isinstance(item, gen.lib.Source):
|
||||
retval.append(self.access.describe(item))
|
||||
if (self.__link_col == col or link is None):
|
||||
link = ('Source', item.handle)
|
||||
elif isinstance(item, gen.lib.Citation):
|
||||
retval.append(self.access.describe(item))
|
||||
if (self.__link_col == col or link is None):
|
||||
link = ('Citation', item.handle)
|
||||
elif isinstance(item, gen.lib.Source):
|
||||
retval.append(self.access.describe(item))
|
||||
if (self.__link_col == col or link is None):
|
||||
link = ('Source', item.handle)
|
||||
elif isinstance(item, gen.lib.Event):
|
||||
retval.append(self.access.describe(item))
|
||||
if (self.__link_col == col or link is None):
|
||||
|
Reference in New Issue
Block a user