Changeset 1144:a73548e0c689 for src/mlx/gui/weighthelp.py
- Timestamp:
- 04/21/24 14:20:42 (2 weeks ago)
- Branch:
- python3
- hg-Phase:
- (<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/weighthelp.py
r1143 r1144 58 58 59 59 60 self._weightsTable = table = Gtk.Table(1 6, 5)60 self._weightsTable = table = Gtk.Table(17, 5) 61 61 table.set_homogeneous(False) 62 62 table.set_row_spacings(4) … … 95 95 96 96 97 label = Gtk.Label(xstr("weighthelp_flight_type")) 98 label.set_alignment(0.0, 0.5) 99 table.attach(label, 0, 1, row, row+1) 100 101 self._flightTypeLabel = label = Gtk.Label(xstr("flighttype_scheduled")) 102 label.set_alignment(1.0, 0.5) 103 table.attach(label, 1, 2, row, row + 1) 104 105 row += 1 97 106 98 107 self._crewLabel = Gtk.Label(xstr("weighthelp_crew") % ("99",)) … … 109 118 110 119 table.attach(Gtk.Label("kg"), 2, 3, row, row+1) 120 121 self._crewInfo = Gtk.Label(xstr("weighthelp_crew_info") % ("-",)) 122 alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5, 123 xscale = 0.0, yscale = 0.0) 124 alignment.add(self._crewInfo) 125 table.attach(alignment, 3, 5, row, row+1) 111 126 112 127 row += 1 … … 129 144 table.attach(Gtk.Label("kg"), 2, 3, row, row+1) 130 145 146 self._paxInfo = Gtk.Label(xstr("weighthelp_pax_info") % 147 ("-", "-", "-")) 148 alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5, 149 xscale = 0.0, yscale = 0.0) 150 alignment.add(self._paxInfo) 151 table.attach(alignment, 3, 5, row, row+1) 152 131 153 row += 1 132 154 … … 382 404 crewWeight = self._getCrewWeight() 383 405 if crewWeight is None: 406 self._flightTypeLabel.set_text("-") 384 407 self._crewLabel.set_text(xstr("weighthelp_crew") % ("-",)) 385 408 self._crewWeight.set_text("-") 386 else: 409 self._crewInfo.set_text(xstr("weighthelp_crew_info") % ("-",)) 410 else: 411 self._flightTypeLabel.set_text(xstr("flighttype_" + 412 const.flightType2string(self._flightType))) 387 413 self._crewLabel.set_text(xstr("weighthelp_crew") % 388 414 (str(self._cockpitCrew) + "+" + 389 415 str(self._cabinCrew),)) 390 416 self._crewWeight.set_text("%.0f" % (crewWeight,)) 417 self._crewInfo.set_text(xstr("weighthelp_crew_info") % 418 (self._dowCabinCrew,)) 419 391 420 392 421 paxWeight = self._getPaxWeight() … … 394 423 self._paxLabel.set_text(xstr("weighthelp_pax") % ("-",)) 395 424 self._paxWeight.set_text("-") 425 self._paxInfo.set_text(xstr("weighthelp_pax_info") % ("-", "-", "-")) 396 426 else: 397 427 self._paxLabel.set_text(xstr("weighthelp_pax") % … … 400 430 str(self._infants),)) 401 431 self._paxWeight.set_text("%.0f" % (paxWeight,)) 432 self._paxInfo.set_text(xstr("weighthelp_pax_info") % 433 (const.getPassengerWeight(self._flightType), 434 const.WEIGHT_CHILD, const.WEIGHT_INFANT)) 402 435 403 436 self._setWeightLabel(self._bagWeight, self._bag)
Note:
See TracChangeset
for help on using the changeset viewer.