Changeset 996:8035d80d5feb for src/mlx/gui/statusbar.py
- Timestamp:
- 07/04/19 17:57:45 (5 years ago)
- Branch:
- python3
- hg-Phase:
- (<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/statusbar.py
r994 r996 20 20 #------------------------------------------------------------------------------- 21 21 22 class Statusbar( gtk.Frame, FlightStatusHandler):22 class Statusbar(Gtk.Frame, FlightStatusHandler): 23 23 """A status bar for the logger.""" 24 24 def __init__(self, iconDirectory): 25 25 """Construct the status bar.""" 26 gtk.Frame.__init__(self)26 Gtk.Frame.__init__(self) 27 27 FlightStatusHandler.__init__(self) 28 28 … … 30 30 self._connected = False 31 31 32 self.set_shadow_type( gtk.ShadowType.NONE)32 self.set_shadow_type(Gtk.ShadowType.NONE) 33 33 34 frameAlignment = gtk.Alignment(xscale = 1.0, yscale = 1.0)34 frameAlignment = Gtk.Alignment(xscale = 1.0, yscale = 1.0) 35 35 36 36 frameAlignment.set_padding(padding_top = 2, padding_bottom = 2, … … 38 38 self.add(frameAlignment) 39 39 40 statusBox = gtk.HBox()40 statusBox = Gtk.HBox() 41 41 frameAlignment.add(statusBox) 42 42 … … 50 50 self._connGreenIcon = pixbuf_new_from_file(iconPath) 51 51 52 self._connStateArea = gtk.DrawingArea()52 self._connStateArea = Gtk.DrawingArea() 53 53 self._connStateArea.set_size_request(18, 18) 54 54 self._connStateArea.set_tooltip_markup(xstr("statusbar_conn_tooltip")) … … 56 56 self._connStateArea.connect("draw", self._drawConnState) 57 57 58 alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5)58 alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5) 59 59 alignment.add(self._connStateArea) 60 60 61 61 statusBox.pack_start(alignment, False, False, 8) 62 62 63 statusBox.pack_start( gtk.VSeparator(), False, False, 8)63 statusBox.pack_start(Gtk.VSeparator(), False, False, 8) 64 64 65 self._stageLabel = gtk.Label()65 self._stageLabel = Gtk.Label() 66 66 longestStage = xstr("flight_stage_" + 67 67 const.stage2string(const.STAGE_PUSHANDTAXI)) … … 72 72 statusBox.pack_start(self._stageLabel, False, False, 8) 73 73 74 statusBox.pack_start( gtk.VSeparator(), False, False, 8)74 statusBox.pack_start(Gtk.VSeparator(), False, False, 8) 75 75 76 self._timeLabel = gtk.Label("--:--:--")76 self._timeLabel = Gtk.Label("--:--:--") 77 77 self._timeLabel.set_width_chars(8) 78 78 self._timeLabel.set_tooltip_text(xstr("statusbar_time_tooltip")) … … 81 81 statusBox.pack_start(self._timeLabel, False, False, 8) 82 82 83 statusBox.pack_start( gtk.VSeparator(), False, False, 8)83 statusBox.pack_start(Gtk.VSeparator(), False, False, 8) 84 84 85 self._ratingLabel = gtk.Label()85 self._ratingLabel = Gtk.Label() 86 86 self._ratingLabel.set_width_chars(20) 87 87 self._ratingLabel.set_tooltip_text(xstr("statusbar_rating_tooltip")) … … 90 90 statusBox.pack_start(self._ratingLabel, False, False, 8) 91 91 92 self._busyLabel = gtk.Label()92 self._busyLabel = Gtk.Label() 93 93 self._busyLabel.set_width_chars(30) 94 94 self._busyLabel.set_tooltip_text(xstr("statusbar_busy_tooltip"))
Note:
See TracChangeset
for help on using the changeset viewer.