Changeset 112:d8661c37cda9 for src/mlx/gui
- Timestamp:
- 04/26/12 17:20:50 (13 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/statusbar.py
r80 r112 6 6 7 7 import mlx.const as const 8 from mlx.i18n import xstr 8 9 9 10 import math … … 36 37 self._connStateArea = gtk.DrawingArea() 37 38 self._connStateArea.set_size_request(16, 16) 38 self._connStateArea.set_tooltip_markup('The state of the connection.\n' 39 '<span foreground="grey">Grey</span> means idle.\n' 40 '<span foreground="red">Red</span> means trying to connect.\n' 41 '<span foreground="green">Green</span> means connected.') 39 self._connStateArea.set_tooltip_markup(xstr("statusbar_conn_tooltip")) 42 40 43 41 if pygobject: … … 54 52 55 53 self._stageLabel = gtk.Label() 56 self._stageLabel.set_width_chars(20) 57 self._stageLabel.set_tooltip_text("The flight stage") 54 longestStage = xstr("flight_stage_" + 55 const.stage2string(const.STAGE_PUSHANDTAXI)) 56 print len(longestStage) 57 self._stageLabel.set_width_chars(len(longestStage) + 3) 58 self._stageLabel.set_tooltip_text(xstr("statusbar_stage_tooltip")) 58 59 self._stageLabel.set_alignment(0.0, 0.5) 59 60 … … 64 65 self._timeLabel = gtk.Label("--:--:--") 65 66 self._timeLabel.set_width_chars(8) 66 self._timeLabel.set_tooltip_text( "The simulator time in UTC")67 self._timeLabel.set_tooltip_text(xstr("statusbar_time_tooltip")) 67 68 self._timeLabel.set_alignment(1.0, 0.5) 68 69 … … 73 74 self._ratingLabel = gtk.Label() 74 75 self._ratingLabel.set_width_chars(12) 75 self._ratingLabel.set_tooltip_text( "The flight rating")76 self._ratingLabel.set_tooltip_text(xstr("statusbar_rating_tooltip")) 76 77 self._ratingLabel.set_alignment(0.0, 0.5) 77 78 … … 80 81 self._busyLabel = gtk.Label() 81 82 self._busyLabel.set_width_chars(30) 82 self._busyLabel.set_tooltip_text( "The status of the background tasks.")83 self._busyLabel.set_tooltip_text(xstr("statusbar_busy_tooltip")) 83 84 self._busyLabel.set_alignment(1.0, 0.5) 84 85 statusBox.pack_start(self._busyLabel, True, True, 8) … … 126 127 def _updateFlightStatus(self): 127 128 """Update the flight status information.""" 128 self._stageLabel.set_text("-" if self._stage is None 129 else const.stage2string(self._stage).upper()) 129 if self._stage is None: 130 text = "-" 131 else: 132 text = xstr("flight_stage_" + const.stage2string(self._stage)).upper() 133 self._stageLabel.set_text(text) 130 134 131 135 if self._noGoReason is None:
Note:
See TracChangeset
for help on using the changeset viewer.