From dfe3c031ec0b60abbb2385579f0be21abdd37fff Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Mon, 28 Jul 2003 20:31:09 +0000 Subject: [PATCH] 2003-07-28 Tim Waugh * src/plugins/GraphViz.py: Adapt. * src/Report.py, src/TextDoc.py, src/DrawDoc.py, src/Plugins.py: More support for making printable output formats. svn: r1938 --- gramps2/ChangeLog | 4 ++-- gramps2/src/Plugins.py | 15 +++++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 0ce8f189b..a146bcb2e 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,7 +1,7 @@ 2003-07-28 Tim Waugh * src/plugins/GraphViz.py: Adapt. - * src/Report.py, src/TextDoc.py, src/DrawDoc.py: More support for - making printable output formats. + * src/Report.py, src/TextDoc.py, src/DrawDoc.py, src/Plugins.py: More + support for making printable output formats. * src/docgen/PSDrawDoc.py, src/docgen/PdfDrawDoc.py: Make these output formats printable. diff --git a/gramps2/src/Plugins.py b/gramps2/src/Plugins.py index b86e8174d..e78b8c010 100644 --- a/gramps2/src/Plugins.py +++ b/gramps2/src/Plugins.py @@ -480,12 +480,13 @@ def register_tool(task, name, # Text document registration # #------------------------------------------------------------------------- -def register_text_doc(name,classref, table, paper, style, ext): +def register_text_doc(name,classref, table, paper, style, ext, + print_report_label = None): """Register a text document generator""" for n in _textdoc: if n[0] == name: return - _textdoc.append((name,classref,table,paper,style,ext)) + _textdoc.append((name,classref,table,paper,style,ext,printable)) #------------------------------------------------------------------------- # @@ -504,12 +505,13 @@ def register_book_doc(name,classref, table, paper, style, ext): # Drawing document registration # #------------------------------------------------------------------------- -def register_draw_doc(name,classref,paper,style, ext): +def register_draw_doc(name,classref,paper,style, ext, + print_report_label = None): """Register a drawing document generator""" for n in _drawdoc: if n[0] == name: return - _drawdoc.append((name,classref,paper,style,ext)) + _drawdoc.append((name,classref,paper,style,ext,print_report_label)) #------------------------------------------------------------------------- # @@ -643,7 +645,6 @@ def build_import_menu(top_menu,callback): # #------------------------------------------------------------------------- def get_text_doc_menu(main_menu,tables,callback,obj=None): - index = 0 myMenu = gtk.Menu() _textdoc.sort() @@ -657,6 +658,7 @@ def get_text_doc_menu(main_menu,tables,callback,obj=None): menuitem.set_data("paper",item[3]) menuitem.set_data("ext",item[5]) menuitem.set_data("obj",obj) + menuitem.set_data("printable",item[6]) if callback: menuitem.connect("activate",callback) menuitem.show() @@ -743,13 +745,14 @@ def get_draw_doc_menu(main_menu,callback=None,obj=None): index = 0 myMenu = gtk.Menu() - for (name,classref,paper,styles,ext) in _drawdoc: + for (name,classref,paper,styles,ext,printable) in _drawdoc: menuitem = gtk.MenuItem(name) menuitem.set_data("name",classref) menuitem.set_data("styles",styles) menuitem.set_data("paper",paper) menuitem.set_data("ext",ext) menuitem.set_data("obj",obj) + menuitem.set_data("printable",printable) if callback: menuitem.connect("activate",callback) menuitem.show()