* src/DisplayTrace.py: identify more linux versions
* src/gramps_main.py: fix callbacks for reports * src/plugins/ReorderIds.py: handle integers larger that 32bit * src/Plugins.py: keep a separate lists for formats that support the book format * src/docgen/PdfDoc.py: register as a format supporting books * src/docgen/OpenOfficeDoc.py: register as a format supporting books * src/plugins/BookReport.py: Support different lists for books svn: r1804
This commit is contained in:
@@ -76,6 +76,7 @@ _expect = []
|
||||
_attempt = []
|
||||
_loaddir = []
|
||||
_textdoc = []
|
||||
_bookdoc = []
|
||||
_drawdoc = []
|
||||
_failmsg = []
|
||||
_bkitems = []
|
||||
@@ -486,6 +487,18 @@ def register_text_doc(name,classref, table, paper, style, ext):
|
||||
return
|
||||
_textdoc.append((name,classref,table,paper,style,ext))
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Text document registration
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def register_book_doc(name,classref, table, paper, style, ext):
|
||||
"""Register a text document generator"""
|
||||
for n in _bookdoc:
|
||||
if n[0] == name:
|
||||
return
|
||||
_bookdoc.append((name,classref,table,paper,style,ext))
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Drawing document registration
|
||||
@@ -654,6 +667,36 @@ def get_text_doc_menu(main_menu,tables,callback,obj=None):
|
||||
index = index + 1
|
||||
main_menu.set_menu(myMenu)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# get_text_doc_menu
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def get_book_menu(main_menu,tables,callback,obj=None):
|
||||
|
||||
index = 0
|
||||
myMenu = gtk.Menu()
|
||||
_bookdoc.sort()
|
||||
for item in _bookdoc:
|
||||
if tables and item[2] == 0:
|
||||
continue
|
||||
name = item[0]
|
||||
menuitem = gtk.MenuItem(name)
|
||||
menuitem.set_data("name",item[1])
|
||||
menuitem.set_data("styles",item[4])
|
||||
menuitem.set_data("paper",item[3])
|
||||
menuitem.set_data("ext",item[5])
|
||||
menuitem.set_data("obj",obj)
|
||||
if callback:
|
||||
menuitem.connect("activate",callback)
|
||||
menuitem.show()
|
||||
myMenu.append(menuitem)
|
||||
if name == GrampsCfg.output_preference:
|
||||
myMenu.set_active(index)
|
||||
callback(menuitem)
|
||||
index = index + 1
|
||||
main_menu.set_menu(myMenu)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# get_text_doc_list
|
||||
@@ -666,6 +709,18 @@ def get_text_doc_list():
|
||||
l.append(item[0])
|
||||
return l
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# get_text_doc_list
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def get_book_doc_list():
|
||||
l = []
|
||||
_bookdoc.sort()
|
||||
for item in _bookdoc:
|
||||
l.append(item[0])
|
||||
return l
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# get_draw_doc_list
|
||||
|
Reference in New Issue
Block a user