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:
@ -206,3 +206,27 @@ class SourceGallery(Gallery):
|
||||
else:
|
||||
self.set_has_data(False)
|
||||
|
||||
class CitationGallery(Gallery):
|
||||
"""
|
||||
Displays a gallery of media objects for a Citation.
|
||||
"""
|
||||
def db_changed(self):
|
||||
self.dbstate.db.connect('event-update', self.update)
|
||||
self.connect_signal('Citation', self.update)
|
||||
self.update()
|
||||
|
||||
def update_has_data(self):
|
||||
active_handle = self.get_active('Citation')
|
||||
active = self.dbstate.db.get_citation_from_handle(active_handle)
|
||||
self.set_has_data(self.get_has_data(active))
|
||||
|
||||
def main(self):
|
||||
active_handle = self.get_active('Citation')
|
||||
active = self.dbstate.db.get_citation_from_handle(active_handle)
|
||||
|
||||
self.clear_images()
|
||||
if active:
|
||||
self.load_images(active)
|
||||
else:
|
||||
self.set_has_data(False)
|
||||
|
||||
|
Reference in New Issue
Block a user