Ignore:
Timestamp:
01/28/14 16:12:22 (11 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

The cruise level is initialized to 0 so that the Next button is disabled unless a valid value is entered (re #223)

Location:
src/mlx/gui
Files:
2 edited

Legend:

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

    r474 r554  
    9292    FILL = gtk.FILL
    9393    EXPAND = gtk.EXPAND
     94
     95    UPDATE_IF_VALID = gtk.UPDATE_IF_VALID
    9496
    9597    pixbuf_new_from_file = gdk.pixbuf_new_from_file
     
    164166    FILL = gtk.AttachOptions.FILL
    165167    EXPAND = gtk.AttachOptions.EXPAND
     168
     169    UPDATE_IF_VALID = gtk.SpinButtonUpdatePolicy.IF_VALID
    166170
    167171    pixbuf_new_from_file = gdkPixbuf.Pixbuf.new_from_file
  • src/mlx/gui/flight.py

    r551 r554  
    17111711        self._cruiseLevel = gtk.SpinButton()
    17121712        self._cruiseLevel.set_increments(step = 10, page = 100)
    1713         self._cruiseLevel.set_range(min = 50, max = 500)
     1713        self._cruiseLevel.set_range(min = 0, max = 500)
    17141714        self._cruiseLevel.set_tooltip_text(xstr("route_level_tooltip"))
    17151715        self._cruiseLevel.set_numeric(True)
     
    17751775    def activate(self):
    17761776        """Setup the route from the booked flight."""
    1777         self._cruiseLevel.set_value(240)
     1777        self._cruiseLevel.set_value(0)
     1778        self._cruiseLevel.set_text("")
    17781779        self._route.get_buffer().set_text(self._wizard._bookedFlight.route)
    17791780        self._updateForwardButton()
Note: See TracChangeset for help on using the changeset viewer.