Changeset 99:b55ca557d5e9
- Timestamp:
- 04/21/12 15:08:59 (13 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/mlx
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/gui.py
r97 r99 243 243 """Get the flight defects.""" 244 244 return self._flightInfo.flightDefects 245 246 @property 247 def delayCodes(self): 248 """Get the delay codes.""" 249 return self._flightInfo.delayCodes 245 250 246 251 def run(self): -
src/mlx/gui/info.py
r98 r99 120 120 buffer.get_end_iter(), True)) 121 121 122 @property 123 def delayCodes(self): 124 """Get the list of delay codes checked by the user.""" 125 codes = [] 126 for index in range(0, len(FlightInfo._delayCodes)): 127 if self._delayCodeWidgets[index].get_active(): 128 codes.append(FlightInfo._delayCodes[index][0]) 129 return codes 130 122 131 def enable(self): 123 132 """Enable the flight info tab.""" -
src/mlx/pirep.py
r97 r99 9 9 class PIREP(object): 10 10 """A pilot's report of a flight.""" 11 _delayCodeNames = { const.DELAYCODE_LOADING : "Loading Problems", 12 const.DELAYCODE_NETWORK : "Net Problems", 13 const.DELAYCODE_SYSTEM : "System Crash/Freezing", 14 const.DELAYCODE_TRAFFIC : "Traffic Problems", 15 const.DELAYCODE_WEATHER : "Weather Problems", 16 const.DELAYCODE_VATSIM : "VATSIM Problem", 17 const.DELAYCODE_CONTROLLER : "Controller's Fault", 18 const.DELAYCODE_NAVIGATION : "Navigation Problem", 19 const.DELAYCODE_APRON : "Apron Navigation Problems", 20 const.DELAYCODE_PERSONAL : "Personal Reasons" } 21 11 22 @staticmethod 12 23 def _formatLine(timeStr, line): … … 40 51 self.comments = gui.comments 41 52 self.flightDefects = gui.flightDefects 53 self.delayCodes = gui.delayCodes 42 54 43 55 flight = gui.flight … … 86 98 87 99 This is basically a collection of the delay codes, if any.""" 88 # FIXME: implement the proper delay codes 89 return "UTC" 100 if not self.delayCodes: 101 return "UTC" 102 else: 103 s = "" 104 for code in self.delayCodes: 105 if s: s += ", " 106 s += PIREP._delayCodeNames[code] 107 return s 90 108 91 109 def getSTAR(self):
Note:
See TracChangeset
for help on using the changeset viewer.