Changeset 111:3543a2c2192c for src/mlx/gui
- Timestamp:
- 04/26/12 14:54:40 (13 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/info.py
r102 r111 3 3 from common import * 4 4 5 from mlx.i18n import xstr 5 6 import mlx.const as const 6 7 7 8 class FlightInfo(gtk.VBox): 8 9 """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") ] 10 @staticmethod 11 def _delayCodes(): 12 """Get an array of delay codes.""" 13 return [ (const.DELAYCODE_LOADING, xstr("info_delay_loading")), 14 (const.DELAYCODE_VATSIM, xstr("info_delay_vatsim")), 15 (const.DELAYCODE_NETWORK, xstr("info_delay_net")), 16 (const.DELAYCODE_CONTROLLER, xstr("info_delay_atc")), 17 (const.DELAYCODE_SYSTEM, xstr("info_delay_system")), 18 (const.DELAYCODE_NAVIGATION, xstr("info_delay_nav")), 19 (const.DELAYCODE_TRAFFIC, xstr("info_delay_traffic")), 20 (const.DELAYCODE_APRON, xstr("info_delay_apron")), 21 (const.DELAYCODE_WEATHER, xstr("info_delay_weather")), 22 (const.DELAYCODE_PERSONAL, xstr("info_delay_personal")) ] 19 23 20 24 @staticmethod … … 61 65 commentsBox = gtk.HBox() 62 66 63 (frame, self._comments) = FlightInfo._createCommentArea( "_Comments")67 (frame, self._comments) = FlightInfo._createCommentArea(xstr("info_comments")) 64 68 commentsBox.pack_start(frame, True, True, 8) 65 69 66 (frame, self._flightDefects) = FlightInfo._createCommentArea("Flight _defects") 70 (frame, self._flightDefects) = \ 71 FlightInfo._createCommentArea(xstr("info_defects")) 67 72 commentsBox.pack_start(frame, True, True, 8) 68 73 … … 70 75 self.pack_start(self._commentsAlignment, True, True, 8) 71 76 72 frame = gtk.Frame(label = "Delay codes")77 frame = gtk.Frame(label = xstr("info_delay")) 73 78 label = frame.get_label_widget() 74 79 label.set_use_underline(True) … … 86 91 87 92 self._delayCodeWidgets = [] 88 for (_code, label) in FlightInfo._delayCodes :93 for (_code, label) in FlightInfo._delayCodes(): 89 94 button = gtk.CheckButton(label) 90 95 button.set_use_underline(True)
Note:
See TracChangeset
for help on using the changeset viewer.