Index: src/mlx/gui/flight.py
===================================================================
--- src/mlx/gui/flight.py	(revision 999)
+++ src/mlx/gui/flight.py	(revision 1002)
@@ -684,10 +684,10 @@
         printOperation.set_use_full_page(False)
 
-        result = printOperation.run(Gtk.PRINT_OPERATION_ACTION_PRINT_DIALOG,
+        result = printOperation.run(Gtk.PrintOperationAction.PRINT_DIALOG,
                                     wizard.gui.mainWindow)
 
-        if result == Gtk.PRINT_OPERATION_RESULT_APPLY:
+        if result == Gtk.PrintOperationResult.APPLY:
             self._printSettings = printOperation.get_print_settings()
-        elif result == Gtk.PRINT_OPERATION_RESULT_ERROR:
+        elif result == Gtk.PrintOperationResult.ERROR:
             errorDialog(xstr("flightsel_print_failed",
                              wizard.gui.mainWindow,
@@ -705,4 +705,5 @@
 
         cr = context.get_cairo_context()
+
         cr.set_antialias(cairo.ANTIALIAS_GRAY)
 
@@ -712,5 +713,7 @@
         cr.stroke()
 
-        layout = cr.create_layout()
+        pcr = context.create_pango_context()
+
+        layout = Pango.Layout(pcr) # cr.create_layout()
         layout.set_text("Malév VA official briefing")
         font = Pango.FontDescription("sans")
@@ -719,6 +722,6 @@
         layout.set_font_description(font)
 
-        (_ink, (x0, y0, x1, y1)) = layout.get_extents()
-        width = float(x1 + 1 - x0) / Pango.SCALE
+        (_ink, logical) = layout.get_extents()
+        width = logical.width / Pango.SCALE
 
         y = 25 * scale
@@ -726,28 +729,28 @@
         cr.move_to((context.get_width() - width)/2.0, y)
         cr.set_line_width(0.1 * scale)
-        cr.layout_path(layout)
+        PangoCairo.layout_path(cr, layout)
         cr.stroke_preserve()
         cr.fill()
 
-        y += float(y1 + 1 - y0) / Pango.SCALE
+        y += logical.height / Pango.SCALE
         y += 6 * scale
 
-        layout = cr.create_layout()
+        layout = Pango.Layout(pcr)
         layout.set_text("%s (%s) részére" %
                         (loginResult.pilotName, loginResult.pilotID))
         font = Pango.FontDescription("sans")
         font.set_size(int(16 * scale * Pango.SCALE))
-        font.set_weight(450)
+        font.set_weight(Pango.Weight.MEDIUM)
         layout.set_font_description(font)
-        (_ink, (x0, y0, x1, y1)) = layout.get_extents()
-        width = float(x1 + 1 - x0) / Pango.SCALE
+        (_ink, logical) = layout.get_extents()
+        width = logical.width / Pango.SCALE
 
         cr.move_to((context.get_width() - width)/2.0, y)
         cr.set_line_width(0.1 * scale)
-        cr.layout_path(layout)
+        PangoCairo.layout_path(cr, layout)
         cr.stroke_preserve()
         cr.fill()
 
-        y += float(y1 + 1 - y0) / Pango.SCALE
+        y += logical.height / Pango.SCALE
         y += 4 * scale
 
@@ -761,5 +764,5 @@
         font = Pango.FontDescription("sans")
         font.set_size(int(7 * scale * Pango.SCALE))
-        font.set_weight(150)
+        font.set_weight(Pango.Weight.ULTRALIGHT)
 
         table = []
@@ -793,13 +796,13 @@
         totalHeight = 0
         for (label, value) in table:
-            labelLayout = cr.create_layout()
+            labelLayout = Pango.Layout(pcr)
             labelLayout.set_text(label)
             labelLayout.set_font_description(font)
 
-            (_ink, (x0, y0, x1, y1)) = labelLayout.get_extents()
-            maxLabelWidth = max(maxLabelWidth, x1 + 1 - x0)
-            labelHeight = y1 + 1 - y0
-
-            valueLayout = cr.create_layout()
+            (_ink, logical) = labelLayout.get_extents()
+            maxLabelWidth = max(maxLabelWidth, logical.width)
+            labelHeight = logical.height
+
+            valueLayout = Pango.Layout(pcr)
             valueLayout.set_text(value)
             valueLayout.set_font_description(font)
@@ -817,6 +820,6 @@
             valueLayout.set_width(int(valueWidth * Pango.SCALE))
 
-            (_ink, (x0, y0, x1, y1)) = valueLayout.get_extents()
-            valueHeight = y1 + 1 - y0
+            (_ink, logical) = valueLayout.get_extents()
+            valueHeight = logical.height
 
             height = float(max(labelHeight, valueHeight))/Pango.SCALE
@@ -837,5 +840,5 @@
             cr.move_to(labelX, y)
             cr.set_line_width(0.1)
-            cr.layout_path(labelLayout)
+            PangoCairo.layout_path(cr, labelLayout)
             cr.stroke_preserve()
             cr.fill()
@@ -843,5 +846,5 @@
             cr.move_to(valueX, y)
             cr.set_line_width(0.1)
-            cr.layout_path(valueLayout)
+            PangoCairo.layout_path(cr, valueLayout)
             cr.stroke_preserve()
             cr.fill()
