Changeset 821:158bfb360027 for src/mlx/gui/flightlist.py
- Timestamp:
- 09/25/16 06:42:50 (8 years ago)
- Branch:
- default
- hg-Phase:
- (<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/flightlist.py
r819 r821 251 251 self._reflyButton = gtk.Button(xstr("pendflt_refly_" + which)) 252 252 self._reflyButton.set_sensitive(False) 253 self._reflyButton.connect("clicked", self._reflyClicked) 253 254 buttonBox.pack_start(self._reflyButton, False, False, 2) 254 255 … … 284 285 self._deleteButton.set_sensitive(sensitive) 285 286 287 def _reflyClicked(self, button): 288 """Called when the Refly button is clicked.""" 289 gui = self._wizard.gui 290 gui.beginBusy(xstr("pendflt_refly_busy")) 291 self.set_sensitive(False) 292 293 flight = self._flights[self._flightList.selectedIndex] 294 gui.webHandler.reflyFlights(self._reflyResultCallback, [flight.id]) 295 296 def _reflyResultCallback(self, returned, result): 297 """Called when the refly result is available.""" 298 gobject.idle_add(self._handleReflyResult, returned, result) 299 300 def _handleReflyResult(self, returned, result): 301 """Handle the refly result.""" 302 303 self.set_sensitive(True) 304 gui = self._wizard.gui 305 gui.endBusy() 306 307 print "PendingFlightsFrame._handleReflyResult", returned, result 308 309 if returned: 310 index = self._flightList.selectedIndex 311 312 flight = self._flights[index] 313 314 self._flightList.removeFlight(index) 315 del self._flights[index] 316 317 self._wizard.reflyFlight(flight) 318 319 286 320 #----------------------------------------------------------------------------- 287 321
Note:
See TracChangeset
for help on using the changeset viewer.