Changeset 72:b5374f5675ca for src
- Timestamp:
- 04/11/12 15:09:26 (13 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/flight.py
r71 r72 1197 1197 self._runway.set_width_chars(10) 1198 1198 self._runway.set_tooltip_text("The runway the takeoff is performed from.") 1199 self._runway.connect("changed", self._updateForwardButton) 1199 1200 table.attach(self._runway, 1, 2, 0, 1) 1200 1201 label.set_mnemonic_widget(self._runway) … … 1208 1209 self._sid.set_width_chars(10) 1209 1210 self._sid.set_tooltip_text("The Standard Instrument Deparature procedure followed.") 1211 self._sid.connect("changed", self._updateForwardButton) 1210 1212 table.attach(self._sid, 1, 2, 1, 2) 1211 1213 label.set_mnemonic_widget(self._sid) … … 1223 1225 self._v1.set_numeric(True) 1224 1226 self._v1.set_tooltip_markup("The takeoff decision speed in knots.") 1227 self._v1.connect("changed", self._updateForwardButton) 1225 1228 table.attach(self._v1, 1, 2, 2, 3) 1226 1229 label.set_mnemonic_widget(self._v1) … … 1240 1243 self._vr.set_numeric(True) 1241 1244 self._vr.set_tooltip_markup("The takeoff rotation speed in knots.") 1245 self._vr.connect("changed", self._updateForwardButton) 1242 1246 table.attach(self._vr, 1, 2, 3, 4) 1243 1247 label.set_mnemonic_widget(self._vr) … … 1257 1261 self._v2.set_numeric(True) 1258 1262 self._v2.set_tooltip_markup("The takeoff safety speed in knots.") 1263 self._v2.connect("changed", self._updateForwardButton) 1259 1264 table.attach(self._v2, 1, 2, 4, 5) 1260 1265 label.set_mnemonic_widget(self._v2) … … 1272 1277 def activate(self): 1273 1278 """Activate the page.""" 1279 self._runway.set_text("") 1274 1280 self._runway.set_sensitive(True) 1281 self._sid.set_text("") 1275 1282 self._sid.set_sensitive(True) 1276 1283 self._v1.set_sensitive(True) 1277 1284 self._vr.set_sensitive(True) 1278 1285 self._v2.set_sensitive(True) 1286 self._updateForwardButton() 1279 1287 1280 1288 def finalize(self): … … 1290 1298 flight.vr = self._vr.get_value_as_int() 1291 1299 flight.v2 = self._v2.get_value_as_int() 1292 1300 1301 def _updateForwardButton(self, widget = None): 1302 """Update the Forward buttons sensitivity.""" 1303 self._button.set_sensitive(self._runway.get_text()!="" and 1304 self._sid.get_text()!="" and 1305 self._v1.get_value_as_int()<=self._vr.get_value_as_int() and 1306 self._vr.get_value_as_int()<=self._v2.get_value_as_int()) 1307 1293 1308 def _backClicked(self, button): 1294 1309 """Called when the Back button is pressed.""" … … 1361 1376 page._fromPage = fromPage 1362 1377 page.activate() 1363 self.grabDefault()1364 1378 self.show_all() 1379 if fromPage is not None: 1380 self.grabDefault() 1365 1381 1366 1382 def nextPage(self, finalize = True):
Note:
See TracChangeset
for help on using the changeset viewer.