Changeset 98:f017d907fa39 for src/mlx/gui
- Timestamp:
- 04/21/12 14:58:44 (13 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.