* src/docgen/ODFDoc.py: Add "open with" option for book reports
* src/docgen/OpenOfficeDoc.py: Add "open with" option for book reports * src/plugins/BookReport.py: Add "open with" option for book reports * src/PluginUtils/_PluginMgr.py: Add "open with" option for book reports svn: r7976
This commit is contained in:
parent
0cebd61da3
commit
c6c5c8be50
@ -1,3 +1,9 @@
|
||||
2007-01-24 Brian Matherly <brian@gramps-project.org>
|
||||
* src/docgen/ODFDoc.py: Add "open with" option for book reports
|
||||
* src/docgen/OpenOfficeDoc.py: Add "open with" option for book reports
|
||||
* src/plugins/BookReport.py: Add "open with" option for book reports
|
||||
* src/PluginUtils/_PluginMgr.py: Add "open with" option for book reports
|
||||
|
||||
2007-01-24 Douglas Blank <dblank@cs.brynmawr.edu>
|
||||
* src/plugins/Calendar.py: 0000871: Holidays do not work in Windows
|
||||
* src/plugins/holidays.xml: 0000871: Holidays do not work in Windows
|
||||
|
@ -373,7 +373,8 @@ def register_text_doc(name,classref, table, paper, style, ext,
|
||||
# Book document generator registration
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def register_book_doc(name,classref, table, paper, style, ext, clname=''):
|
||||
def register_book_doc(name,classref, table, paper, style, ext,
|
||||
print_report_label=None, clname=''):
|
||||
"""Register a text document generator"""
|
||||
del_index = -1
|
||||
for i in range(0,len(bookdoc_list)):
|
||||
@ -385,7 +386,8 @@ def register_book_doc(name,classref, table, paper, style, ext, clname=''):
|
||||
|
||||
if not clname:
|
||||
clname = ext[1:]
|
||||
bookdoc_list.append((name,classref,table,paper,style,ext,None,clname))
|
||||
bookdoc_list.append((name,classref,table,paper,style,ext,
|
||||
print_report_label,clname))
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -414,6 +414,7 @@ class ODFDoc(BaseDoc.BaseDoc):
|
||||
self._write_meta_file()
|
||||
self._write_mimetype_file()
|
||||
self._write_zip()
|
||||
print self.print_req
|
||||
if self.print_req:
|
||||
app = Mime.get_application(_apptype)
|
||||
Utils.launch(app[0],self.filename)
|
||||
@ -1185,5 +1186,5 @@ except:
|
||||
print_label = None
|
||||
|
||||
register_text_doc(_('Open Document Text'), ODFDoc, 1, 1, 1, ".odt", print_label)
|
||||
register_book_doc(_("Open Document Text"), ODFDoc, 1, 1, 1, ".odt")
|
||||
register_book_doc(_("Open Document Text"), ODFDoc, 1, 1, 1, ".odt", print_label)
|
||||
register_draw_doc(_("Open Document Text"), ODFDoc, 1, 1, ".odt", print_label);
|
||||
|
@ -1020,7 +1020,7 @@ try:
|
||||
print_label = None
|
||||
|
||||
register_text_doc(mtype,OpenOfficeDoc,1,1,1,".sxw",print_label)
|
||||
register_book_doc(mtype,OpenOfficeDoc,1,1,1,".sxw")
|
||||
register_book_doc(mtype,OpenOfficeDoc,1,1,1,".sxw", print_label)
|
||||
register_draw_doc(mtype,OpenOfficeDoc,1,1, ".sxw",print_label);
|
||||
except:
|
||||
register_text_doc(_('OpenOffice.org Writer'),
|
||||
|
@ -1067,6 +1067,9 @@ class BookReportDialog(ReportDialog):
|
||||
self.rptlist.append(obj)
|
||||
newpage = 1
|
||||
self.doc.open(self.target_path)
|
||||
|
||||
if self.print_report.get_active():
|
||||
self.doc.print_requested ()
|
||||
|
||||
def make_report(self):
|
||||
"""The actual book report. Start it out, then go through the item list
|
||||
|
Loading…
Reference in New Issue
Block a user