Initial prototype.

* Changed database to introduce Citations
* Introduced new Citation Primary object and CitationBase (equivalent to CitationRef) child object
* Implemented CitationTreeModel and CitationListModel
* Implemented CitationTreeView and CitationListView for new citation views in the navigator
* Implemented EditCitation which is used both for the citation views in the navigator and for the citations of an object
* Implemented the CitationEmbedList to display the citations of an object
* Modified the bottom bar gramplets to support citations
* Implemented the citation selector.
* Modified Media object to include references to Citations
* Initial work on deleting citations


svn: r17960
This commit is contained in:
Tim G L Lyons
2011-07-24 18:30:28 +00:00
parent 1012286be7
commit 9ff46d9eab
50 changed files with 3629 additions and 26 deletions

View File

@@ -30,6 +30,8 @@ Source View
#
#-------------------------------------------------------------------------
import gtk
import logging
LOG = logging.getLogger(".citation")
#-------------------------------------------------------------------------
#
@@ -211,6 +213,37 @@ class SourceView(ListView):
def remove_object_from_handle(self, handle):
the_lists = Utils.get_source_referents(handle, self.dbstate.db)
LOG.debug('source referents %s' % [the_lists])
# per = []
# fam = []
# eve = []
# pla = []
# sou = []
# med = []
# rep = []
citation_referents_list = []
for citation in the_lists[7]:
LOG.debug('citation %s' % citation)
refs = Utils.get_citation_referents(citation, self.dbstate.db)
citation_referents_list += [(citation, refs)]
# (per2 , fam2, eve2, pla2, sou2, med2, rep2) = refs
# per += per2
# fam += fam2
# eve += eve2
# pla += pla2
# sou += sou2
# med += med2
# rep += rep2
# citation_referents_list = (per , fam, eve, pla, sou, med, rep)
LOG.debug('citation_referents_list %s' % [citation_referents_list])
(person_list, family_list, event_list, place_list, source_list,
media_list, repo_list, citation_list) = the_lists
the_lists = (person_list, family_list, event_list, place_list, source_list,
media_list, repo_list, citation_list, citation_referents_list)
LOG.debug('the_lists %s' % [the_lists])
object = self.dbstate.db.get_source_from_handle(handle)
query = DeleteSrcQuery(self.dbstate, self.uistate, object, the_lists)
is_used = any(the_lists)