Ignore:
Timestamp:
10/20/15 15:23:41 (9 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
cef
Phase:
public
Message:

The SimBrief credentials are stored and used, if available (re #279)

File:
1 edited

Legend:

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

    r687 r690  
    16821682        label.set_mnemonic_widget(self._password)
    16831683
     1684        self._rememberButton = gtk.CheckButton(xstr("simbrief_remember_password"))
     1685        self._rememberButton.set_use_underline(True)
     1686        self._rememberButton.set_tooltip_text(xstr("simbrief_remember_tooltip"))
     1687        table.attach(self._rememberButton, 1, 2, 2, 3, ypadding = 8)
     1688
    16841689        self.addCancelFlightButton()
    16851690
     
    16891694    def activate(self):
    16901695        """Activate the SimBrief setup page"""
     1696        config = self._wizard.gui.config
     1697
     1698        self._userName.set_text(config.simBriefUserName)
     1699        self._password.set_text(config.simBriefPassword)
     1700        self._rememberButton.set_active(config.rememberSimBriefPassword)
     1701
    16911702        self._updateForwardButton()
     1703
    16921704
    16931705    def _updateForwardButton(self):
     
    17041716            self._wizard.nextPage()
    17051717        else:
     1718            config = self._wizard.gui.config
     1719
     1720            config.simBriefUserName = self._userName.get_text()
     1721
     1722            rememberPassword = self._rememberButton.get_active()
     1723            config.simBriefPassword = \
     1724              self._password.get_text() if rememberPassword else ""
     1725            config.rememberSimBriefPassword = rememberPassword
     1726
     1727            config.save()
     1728
    17061729            plan = self._getPlan()
    17071730            print "plan:", plan
Note: See TracChangeset for help on using the changeset viewer.