Changeset 868:15ff07dedf9a for src


Ignore:
Timestamp:
06/18/17 18:18:35 (7 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

A double click in the accepted flights list views the selected flight (re #307)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/gui/flightlist.py

    r867 r868  
    657657                                      multiSelection = False)
    658658        self._flightList.connect("selection-changed", self._selectionChanged)
     659        self._flightList.connect("row-activated", self._rowActivated)
    659660
    660661        hbox.pack_start(self._flightList, True, True, 4)
     
    713714        self._viewButton.set_sensitive(len(selectedIndexes)==1)
    714715
     716    def _rowActivated(self, timetable, index):
     717        """Called when a row has been activated (e.g. double-clicked) in the
     718        flight list."""
     719        self._viewSelected()
     720
    715721    def _refreshClicked(self, button):
    716722        """Called when the refresh button has been clicked."""
     
    720726    def _viewClicked(self, button):
    721727        """Called when the view button has been clicked."""
     728        self._viewSelected()
     729
     730    def _viewSelected(self):
     731        """View the selected flight."""
    722732        gui = self._gui
    723733        gui.beginBusy(xstr("pendflt_pirep_busy"))
Note: See TracChangeset for help on using the changeset viewer.