Enabled Quickviews on all list views; enabled References Quickview for all views

svn: r13947
This commit is contained in:
Doug Blank
2009-12-31 14:59:44 +00:00
parent fa1413c640
commit 205b3beadd
10 changed files with 121 additions and 37 deletions

View File

@ -54,9 +54,9 @@ import gtk
#
#-------------------------------------------------------------------------
from gen.plug import (CATEGORY_QR_PERSON, CATEGORY_QR_FAMILY,
from gen.plug import (CATEGORY_QR_PERSON, CATEGORY_QR_FAMILY, CATEGORY_QR_MEDIA,
CATEGORY_QR_EVENT, CATEGORY_QR_SOURCE, CATEGORY_QR_MISC,
CATEGORY_QR_PLACE, CATEGORY_QR_REPOSITORY)
CATEGORY_QR_PLACE, CATEGORY_QR_REPOSITORY, CATEGORY_QR_NOTE)
from gui.pluginmanager import GuiPluginManager
def create_quickreport_menu(category,dbstate,uistate, handle) :
@ -64,7 +64,7 @@ def create_quickreport_menu(category,dbstate,uistate, handle) :
quick_report_list of _PluginMgr.py
It collects the reports of the requested category, which must be one of
CATEGORY_QR_PERSON, CATEGORY_QR_FAMILY,
CATEGORY_QR_EVENT, CATEGORY_QR_SOURCE,
CATEGORY_QR_EVENT, CATEGORY_QR_SOURCE, CATEGORY_QR_MEDIA,
CATEGORY_QR_PLACE, CATEGORY_QR_REPOSITORY
It constructs the ui string of the quick report menu, and it's actions
The action callback function is constructed, using the dbstate and the
@ -112,7 +112,7 @@ def get_quick_report_list(qv_category=None):
Returns a list of PluginData of quick views of category qv_category
CATEGORY_QR_PERSON, CATEGORY_QR_FAMILY, CATEGORY_QR_EVENT,
CATEGORY_QR_SOURCE, CATEGORY_QR_MISC, CATEGORY_QR_PLACE,
CATEGORY_QR_REPOSITORY or None for all
CATEGORY_QR_REPOSITORY, CATEGORY_QR_MEDIA or None for all
"""
names = []
pmgr = GuiPluginManager.get_instance()
@ -202,8 +202,12 @@ def run_report(dbstate, uistate, category, handle, pdata, container=None,
obj = dbstate.db.get_source_from_handle(handle)
elif category == CATEGORY_QR_PLACE :
obj = dbstate.db.get_place_from_handle(handle)
elif category == CATEGORY_QR_MEDIA :
obj = dbstate.db.get_object_from_handle(handle)
elif category == CATEGORY_QR_REPOSITORY :
obj = dbstate.db.get_repository_from_handle(handle)
elif category == CATEGORY_QR_NOTE :
obj = dbstate.db.get_note_from_handle(handle)
elif category == CATEGORY_QR_MISC:
obj = handle
else: