Changeset 80:d3ca14051108 for src/mlx/gui
- Timestamp:
- 04/14/12 09:03:10 (13 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/mlx/gui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/flight.py
r79 r80 549 549 labelAlignment = gtk.Alignment(xalign=0.0, xscale=0.0) 550 550 self._tailNumber = gtk.Label() 551 self._tailNumber.set_width_chars( 6)551 self._tailNumber.set_width_chars(10) 552 552 self._tailNumber.set_alignment(0.0, 0.5) 553 553 labelAlignment.add(self._tailNumber) … … 561 561 labelAlignment = gtk.Alignment(xalign=0.0, xscale=0.0) 562 562 self._departureICAO = gtk.Label() 563 self._departureICAO.set_width_chars( 5)563 self._departureICAO.set_width_chars(6) 564 564 self._departureICAO.set_alignment(0.0, 0.5) 565 565 labelAlignment.add(self._departureICAO) -
src/mlx/gui/gui.py
r78 r80 218 218 """Update the data.""" 219 219 gobject.idle_add(self._monitorWindow.setData, state) 220 gobject.idle_add(self._statusbar.updateTime, state.timestamp) 220 221 221 222 def resetFlightStatus(self): 222 223 """Reset the status of the flight.""" 223 224 self._statusbar.resetFlightStatus() 225 self._statusbar.updateTime() 224 226 self._statusIcon.resetFlightStatus() 225 227 -
src/mlx/gui/statusbar.py
r70 r80 8 8 9 9 import math 10 import time 10 11 11 12 #------------------------------------------------------------------------------- … … 61 62 statusBox.pack_start(gtk.VSeparator(), False, False, 8) 62 63 64 self._timeLabel = gtk.Label("--:--:--") 65 self._timeLabel.set_width_chars(8) 66 self._timeLabel.set_tooltip_text("The simulator time in UTC") 67 self._timeLabel.set_alignment(1.0, 0.5) 68 69 statusBox.pack_start(self._timeLabel, False, False, 8) 70 71 statusBox.pack_start(gtk.VSeparator(), False, False, 8) 72 63 73 self._ratingLabel = gtk.Label() 64 74 self._ratingLabel.set_width_chars(12) … … 75 85 76 86 self._updateFlightStatus() 87 self.updateTime() 77 88 78 89 def updateConnection(self, connecting, connected): … … 85 96 """Update the busy state.""" 86 97 self._busyLabel.set_text("" if message is None else message) 98 99 def updateTime(self, t = None): 100 """Update the time""" 101 timeStr = "--:--:--" if t is None \ 102 else time.strftime("%H:%M:%S", time.gmtime(t)) 103 104 self._timeLabel.set_text(timeStr) 87 105 88 106 def _drawConnState(self, connStateArea, eventOrContext):
Note:
See TracChangeset
for help on using the changeset viewer.