Beispiel #1
0
 def run_printdlg(self, win, printout):
     pd = ProgressDialog(_('Printing...'), win)
     try:
         pd.run(self.printing, [printout, ])
         pd.listener(_('Done'), 1.0)
     except Exception:
         msg = _('Error while printing!')
         error_dialog(win, win.app.appdata.app_name, msg)
         return False
     finally:
         pd.destroy()
     return True
Beispiel #2
0
 def print_calibration(self, app, win, path, media=''):
     pd = ProgressDialog(_('Loading calibration page...'), win)
     try:
         loader = get_loader(path)
         doc_presenter = pd.run(loader, [app.appdata, path])
         self.printing(Printout(doc_presenter), media)
         pd.listener(_('Done'), 1.0)
     except Exception:
         txt = _('Error while printing of calibration page!')
         txt += '\n' + _('Check your printer status and connection.')
         error_dialog(win, app.appdata.app_name, txt)
     finally:
         pd.destroy()