Changeset 98:f017d907fa39
- Timestamp:
- 04/21/12 14:58:44 (13 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/mlx
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/const.py
r97 r98 143 143 # Flight type: charter 144 144 FLIGHTTYPE_CHARTER = 3 145 146 #------------------------------------------------------------------------------- 147 148 # Delay code: loading problems 149 DELAYCODE_LOADING = 0 150 151 # Delay code: VATSIM problem 152 DELAYCODE_VATSIM = 1 153 154 # Delay code: network problems 155 DELAYCODE_NETWORK = 2 156 157 # Delay code: controller's fault 158 DELAYCODE_CONTROLLER = 3 159 160 # Delay code: system crash or freeze 161 DELAYCODE_SYSTEM = 4 162 163 # Delay code: navigation problem 164 DELAYCODE_NAVIGATION = 5 165 166 # Delay code: traffic problems 167 DELAYCODE_TRAFFIC = 6 168 169 # Delay code: apron navigation 170 DELAYCODE_APRON = 7 171 172 # Delay code: weather problems 173 DELAYCODE_WEATHER = 8 174 175 # Delay code: personal reasons 176 DELAYCODE_PERSONAL = 9 145 177 146 178 #------------------------------------------------------------------------------- -
src/mlx/gui/info.py
r97 r98 3 3 from common import * 4 4 5 import mlx.const as const 6 5 7 class FlightInfo(gtk.VBox): 6 8 """The flight info tab.""" 9 _delayCodes = [ (const.DELAYCODE_LOADING, "L_oading problems"), 10 (const.DELAYCODE_VATSIM, "_VATSIM problem"), 11 (const.DELAYCODE_NETWORK, "_Net problems"), 12 (const.DELAYCODE_CONTROLLER, "Controller's _fault"), 13 (const.DELAYCODE_SYSTEM, "S_ystem crash/freeze"), 14 (const.DELAYCODE_NAVIGATION, "Navi_gation problem"), 15 (const.DELAYCODE_TRAFFIC, "T_raffic problems"), 16 (const.DELAYCODE_APRON, "_Apron navigation problem"), 17 (const.DELAYCODE_WEATHER, "_Weather problems"), 18 (const.DELAYCODE_PERSONAL, "_Personal reasons") ] 19 7 20 @staticmethod 8 21 def _createCommentArea(label): … … 69 82 table.set_col_spacings(16) 70 83 71 self._loadingProblems = gtk.CheckButton("L_oading problems") 72 self._loadingProblems.set_use_underline(True) 73 table.attach(self._loadingProblems, 0, 1, 0, 1) 84 row = 0 85 column = 0 74 86 75 self._vatsimProblem = gtk.CheckButton("_VATSIM problem") 76 self._vatsimProblem.set_use_underline(True) 77 table.attach(self._vatsimProblem, 1, 2, 0, 1) 78 79 self._netProblems = gtk.CheckButton("_Net problems") 80 self._netProblems.set_use_underline(True) 81 table.attach(self._netProblems, 0, 1, 1, 2) 82 83 self._controllersFault = gtk.CheckButton("Controllers _fault") 84 self._controllersFault.set_use_underline(True) 85 table.attach(self._controllersFault, 1, 2, 1, 2) 86 87 self._systemCrash = gtk.CheckButton("S_ystem crash/freeze") 88 self._systemCrash.set_use_underline(True) 89 table.attach(self._systemCrash, 0, 1, 2, 3) 90 91 self._navigationProblem = gtk.CheckButton("Navi_gation problem") 92 self._navigationProblem.set_use_underline(True) 93 table.attach(self._navigationProblem, 1, 2, 2, 3) 94 95 self._trafficProblems = gtk.CheckButton("T_raffic problems") 96 self._trafficProblems.set_use_underline(True) 97 table.attach(self._trafficProblems, 0, 1, 3, 4) 98 99 self._apronProblem = gtk.CheckButton("_Apron navigation problem") 100 self._apronProblem.set_use_underline(True) 101 table.attach(self._apronProblem, 1, 2, 3, 4) 102 103 self._weatherProblems = gtk.CheckButton("_Weather problems") 104 self._weatherProblems.set_use_underline(True) 105 table.attach(self._weatherProblems, 0, 1, 4, 5) 106 107 self._personalReasons = gtk.CheckButton("_Personal reasons") 108 self._personalReasons.set_use_underline(True) 109 table.attach(self._personalReasons, 1, 2, 4, 5) 87 self._delayCodeWidgets = [] 88 for (_code, label) in FlightInfo._delayCodes: 89 button = gtk.CheckButton(label) 90 button.set_use_underline(True) 91 table.attach(button, column, column + 1, row, row + 1) 92 self._delayCodeWidgets.append(button) 93 if column==0: 94 column += 1 95 else: 96 row += 1 97 column = 0 110 98 111 99 alignment.add(table)
Note:
See TracChangeset
for help on using the changeset viewer.