Changeset 675:122e92f35a2c for src
- Timestamp:
- 08/23/15 07:35:33 (9 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/flight.py
r638 r675 1748 1748 self._cruiseLevel.set_tooltip_text(xstr("route_level_tooltip")) 1749 1749 self._cruiseLevel.set_numeric(True) 1750 self._cruiseLevel.connect("changed", self._cruiseLevelChanged) 1750 1751 self._cruiseLevel.connect("value-changed", self._cruiseLevelChanged) 1751 1752 label.set_mnemonic_widget(self._cruiseLevel) … … 1822 1823 def _updateForwardButton(self): 1823 1824 """Update the sensitivity of the forward button.""" 1824 self._button.set_sensitive(self._cruiseLevel.get_value_as_int()>=50 and \ 1825 self._getRoute()!="") 1826 1827 def _cruiseLevelChanged(self, spinButton): 1825 cruiseLevelText = self._cruiseLevel.get_text() 1826 cruiseLevel = int(cruiseLevelText) if cruiseLevelText else 0 1827 self._button.set_sensitive(cruiseLevel>=50 and self._getRoute()!="") 1828 1829 def _cruiseLevelChanged(self, *arg): 1828 1830 """Called when the cruise level has changed.""" 1829 1831 self._updateForwardButton()
Note:
See TracChangeset
for help on using the changeset viewer.