Show an error dialog if the printing operation is not successful.

pull/61/head
Christian T. Jacobs 2017-06-27 20:02:05 +01:00
rodzic 9a1371390e
commit 6b7d42e6dd
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -18,6 +18,7 @@
# along with PyQSO. If not, see <http://www.gnu.org/licenses/>.
from gi.repository import Gtk, Pango, PangoCairo
from pyqso.auxiliary_dialogs import error
class Printer(object):
@ -54,6 +55,9 @@ class Printer(object):
self.text_to_print += str(r["CALL"]) + "\t---\t" + str(r["QSO_DATE"]) + "\t---\t" + str(r["TIME_ON"]) + "\t---\t" + str(r["FREQ"]) + "\t---\t" + str(r["MODE"]) + "\n"
result = self.operation.run(self.action, parent=self.application.window)
if(result == Gtk.PrintOperationResult.ERROR):
error(parent=self.application.window, message="Unable to print the log.")
return result
def begin_print(self, operation, context):