Changeset 619:7763179ff6b0 for src/mlx/gui
- Timestamp:
- 03/29/15 12:10:53 (10 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/mlx/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/flight.py
r607 r619 7 7 from mlx.flight import Flight 8 8 from mlx.checks import PayloadChecker 9 from mlx.gates import lhbpGates 9 10 import mlx.util as util 10 11 from mlx.pirep import PIREP … … 818 819 self._gateList.set_sensitive(True) 819 820 occupiedGateNumbers = self._wizard._fleet.getOccupiedGateNumbers() 820 for gate Number in const.lhbpGateNumbers:821 if gate Number not in occupiedGateNumbers:822 self._listStore.append([gate Number])821 for gate in lhbpGates: 822 if gate.isAvailable(lhbpGates, occupiedGateNumbers): 823 self._listStore.append([gate.number]) 823 824 824 825 def finalize(self): … … 3253 3254 self._wizard.bookedFlight.arrivalICAO=="LHBP" and \ 3254 3255 not self._wizard.entranceExam: 3255 occupiedGate s = self._wizard._fleet.getOccupiedGateNumbers()3256 for gate Number in const.lhbpGateNumbers:3257 if gate Number not in occupiedGates:3258 self._gatesModel.append([gate Number])3256 occupiedGateNumbers = self._wizard._fleet.getOccupiedGateNumbers() 3257 for gate in lhbpGates.gates: 3258 if gate.isAvailable(lhbpGates, occupiedGateNumbers): 3259 self._gatesModel.append([gate.number]) 3259 3260 self._gateLabel.set_sensitive(True) 3260 3261 self._gate.set_sensitive(True) -
src/mlx/gui/gates.py
r300 r619 4 4 from mlx.i18n import xstr 5 5 import mlx.const as const 6 from mlx.gates import Gates, lhbpGates 6 7 7 8 #------------------------------------------------------------------------------- … … 82 83 statusBox.pack_start(gatesFrame, True, True, 4) 83 84 84 self._gatesTable = table = gtk.Table(14, 4) 85 self._gatesTable = table = gtk.Table(lhbpGates.numRows, 86 lhbpGates.numColumns) 85 87 table.set_tooltip_markup(xstr("gates_gates_tooltip")) 86 88 alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5, … … 94 96 column = 0 95 97 row = 0 96 for gateNumber in const.lhbpGateNumbers: 97 label = gtk.Label() 98 label.set_markup("<b>" + gateNumber + "</b>") 99 table.attach(label, column, column + 1, row, row + 1) 98 for (type, data) in lhbpGates.displayInfos: 99 if type==Gates.DISPLAY_GATE: 100 gate = data 100 101 101 self._gateLabels[gateNumber] = label 102 103 if column==1 and row==12: 104 column = 2 105 row = 1 106 elif row==13: 102 label = gtk.Label() 103 label.set_markup("<b>" + gate.number + "</b>") 104 table.attach(label, column, column + 1, row, row + 1) 105 106 self._gateLabels[gate.number] = label 107 row += 1 108 elif type==Gates.DISPLAY_SPACE: 109 row += 1 110 elif type==Gates.DISPLAY_NEW_COLUMN: 111 row = 0 107 112 column += 1 108 row = 0 109 else: 110 row += 1 111 113 112 114 button = gtk.Button(xstr("gates_refresh")) 113 115 button.set_use_underline(True) … … 168 170 169 171 occupiedGateNumbers = fleet.getOccupiedGateNumbers() 170 for gateNumber in const.lhbpGateNumbers: 172 for gate in lhbpGates.gates: 173 gateNumber = gate.number 171 174 markup = gateNumber 172 175 if gateNumber in occupiedGateNumbers:
Note:
See TracChangeset
for help on using the changeset viewer.