Changeset 241:dea155dd3ac0 for src/mlx/gui
- Timestamp:
- 06/10/12 12:32:09 (12 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/mlx/gui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/common.py
r232 r241 179 179 return self._currentInteger 180 180 181 def reset(self): 182 """Reset the integer.""" 183 self.set_int(None) 184 181 185 def set_int(self, value): 182 186 """Set the integer.""" -
src/mlx/gui/flight.py
r233 r241 1888 1888 self._v1 = IntegerEntry() 1889 1889 self._v1.set_width_chars(4) 1890 self._v1.set_tooltip_markup(xstr("takeoff_v1_tooltip "))1890 self._v1.set_tooltip_markup(xstr("takeoff_v1_tooltip_knots")) 1891 1891 self._v1.connect("integer-changed", self._valueChanged) 1892 1892 table.attach(self._v1, 2, 3, 2, 3) 1893 1893 label.set_mnemonic_widget(self._v1) 1894 1895 table.attach(gtk.Label(xstr("label_knots")), 3, 4, 2, 3) 1894 1895 self._v1Unit = gtk.Label(xstr("label_knots")) 1896 table.attach(self._v1Unit, 3, 4, 2, 3) 1896 1897 1897 1898 label = gtk.Label(xstr("takeoff_vr")) … … 1903 1904 self._vr = IntegerEntry() 1904 1905 self._vr.set_width_chars(4) 1905 self._vr.set_tooltip_markup(xstr("takeoff_vr_tooltip "))1906 self._vr.set_tooltip_markup(xstr("takeoff_vr_tooltip_knots")) 1906 1907 self._vr.connect("integer-changed", self._valueChanged) 1907 1908 table.attach(self._vr, 2, 3, 3, 4) 1908 1909 label.set_mnemonic_widget(self._vr) 1909 1910 1910 table.attach(gtk.Label(xstr("label_knots")), 3, 4, 3, 4) 1911 self._vrUnit = gtk.Label(xstr("label_knots")) 1912 table.attach(self._vrUnit, 3, 4, 3, 4) 1911 1913 1912 1914 label = gtk.Label(xstr("takeoff_v2")) … … 1918 1920 self._v2 = IntegerEntry() 1919 1921 self._v2.set_width_chars(4) 1920 self._v2.set_tooltip_markup(xstr("takeoff_v2_tooltip "))1922 self._v2.set_tooltip_markup(xstr("takeoff_v2_tooltip_knots")) 1921 1923 self._v2.connect("integer-changed", self._valueChanged) 1922 1924 table.attach(self._v2, 2, 3, 4, 5) 1923 1925 label.set_mnemonic_widget(self._v2) 1924 1926 1925 table.attach(gtk.Label(xstr("label_knots")), 3, 4, 4, 5) 1927 self._v2Unit = gtk.Label(xstr("label_knots")) 1928 table.attach(self._v2Unit, 3, 4, 4, 5) 1926 1929 1927 1930 self.addCancelFlightButton() … … 1968 1971 self._v2.set_int(None) 1969 1972 self._v2.set_sensitive(True) 1973 1974 i18nSpeedUnit = self._wizard.gui.flight.getI18NSpeedUnit() 1975 speedUnit = xstr("label" + i18nSpeedUnit) 1976 self._v1Unit.set_text(speedUnit) 1977 self._vrUnit.set_text(speedUnit) 1978 self._v2Unit.set_text(speedUnit) 1979 1980 self._v1.set_tooltip_markup(xstr("takeoff_v1_tooltip" + i18nSpeedUnit)) 1981 self._vr.set_tooltip_markup(xstr("takeoff_vr_tooltip" + i18nSpeedUnit)) 1982 self._v2.set_tooltip_markup(xstr("takeoff_v2_tooltip" + i18nSpeedUnit)) 1983 1970 1984 self._button.set_sensitive(False) 1971 1985 self._forwardAllowed = False … … 1985 1999 self._updateForwardButton() 1986 2000 2001 def reset(self): 2002 """Reset the page if the wizard is reset.""" 2003 super(TakeoffPage, self).reset() 2004 self._v1.reset() 2005 self._vr.reset() 2006 self._v2.reset() 2007 1987 2008 def _updateForwardButton(self): 1988 2009 """Update the sensitivity of the forward button based on some conditions.""" … … 2103 2124 self._vref = IntegerEntry() 2104 2125 self._vref.set_width_chars(5) 2105 self._vref.set_tooltip_markup(xstr("landing_vref_tooltip "))2126 self._vref.set_tooltip_markup(xstr("landing_vref_tooltip_knots")) 2106 2127 self._vref.connect("integer-changed", self._vrefChanged) 2107 2128 table.attach(self._vref, 3, 4, 5, 6) 2108 2129 label.set_mnemonic_widget(self._vref) 2109 2110 table.attach(gtk.Label(xstr("label_knots")), 4, 5, 5, 6) 2130 2131 self._vrefUnit = gtk.Label(xstr("label_knots")) 2132 table.attach(self._vrefUnit, 4, 5, 5, 6) 2111 2133 2112 2134 self.addCancelFlightButton() … … 2149 2171 """Reset the page if the wizard is reset.""" 2150 2172 super(LandingPage, self).reset() 2173 self._vref.reset() 2151 2174 self._flightEnded = False 2152 2175 2153 2176 def activate(self): 2154 2177 """Called when the page is activated.""" … … 2169 2192 self._vref.set_int(None) 2170 2193 self._vref.set_sensitive(True) 2194 2195 i18nSpeedUnit = self._wizard.gui.flight.getI18NSpeedUnit() 2196 speedUnit = xstr("label" + i18nSpeedUnit) 2197 self._vrefUnit.set_text(speedUnit) 2198 2199 self._vref.set_tooltip_markup(xstr("landing_vref_tooltip" + 2200 i18nSpeedUnit)) 2171 2201 2172 2202 self._updateForwardButton() -
src/mlx/gui/gui.py
r239 r241 338 338 """Called when we have connected to the simulator.""" 339 339 self._connected = True 340 self._logger.untimedMessage("Connected to the simulator %s" % (descriptor,)) 340 self._logger.untimedMessage("MLX %s connected to the simulator %s" % \ 341 (const.VERSION, descriptor)) 341 342 fs.sendMessage(const.MESSAGETYPE_INFORMATION, 342 343 "Welcome to MAVA Logger X " + const.VERSION)
Note:
See TracChangeset
for help on using the changeset viewer.