0001232: Preview now allows Print; no more PRINT_OPERATION failure
svn: r10426
This commit is contained in:
parent
015bde9e01
commit
7b8ed5ded7
@ -537,9 +537,19 @@ class GtkPrint(CairoDoc):
|
|||||||
# run print dialog
|
# run print dialog
|
||||||
while True:
|
while True:
|
||||||
self.preview = None
|
self.preview = None
|
||||||
res = operation.run(gtk.PRINT_OPERATION_ACTION_PRINT_DIALOG, None)
|
res = operation.run(gtk.PRINT_OPERATION_ACTION_PRINT_DIALOG)
|
||||||
if self.preview is None:
|
if self.preview is None: # cancel or print
|
||||||
break
|
break
|
||||||
|
# set up printing again; can't reuse PrintOperation?
|
||||||
|
operation = gtk.PrintOperation()
|
||||||
|
operation.set_default_page_setup(page_setup)
|
||||||
|
operation.connect("begin_print", self.on_begin_print)
|
||||||
|
operation.connect("draw_page", self.on_draw_page)
|
||||||
|
operation.connect("paginate", self.on_paginate)
|
||||||
|
operation.connect("preview", self.on_preview)
|
||||||
|
# set print settings if it was stored previously
|
||||||
|
if PRINT_SETTINGS is not None:
|
||||||
|
operation.set_print_settings(PRINT_SETTINGS)
|
||||||
|
|
||||||
# store print settings if printing was successful
|
# store print settings if printing was successful
|
||||||
if res == gtk.PRINT_OPERATION_RESULT_APPLY:
|
if res == gtk.PRINT_OPERATION_RESULT_APPLY:
|
||||||
|
Loading…
Reference in New Issue
Block a user