Changeset 690:5ae4c108757e


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)

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • locale/en/mlx.po

    r687 r690  
    710710msgstr "Downloading METARs..."
    711711
     712msgid "simbrief_remember_password"
     713msgstr "_Remember password"
     714
     715msgid "simbrief_remember_tooltip"
     716msgstr ""
     717"If checked, your SimBrief password will be stored, so that you "
     718"should not have to enter it every time. Note, however, that "
     719"the password is stored as text, and anybody who can access "
     720"your files will be able to read it."
     721
    712722msgid "briefing_title"
    713723msgstr "Briefing (%d/2): %s"
  • locale/hu/mlx.po

    r687 r690  
    709709msgstr "METAR-ok letöltése..."
    710710
     711msgid "simbrief_remember_password"
     712msgstr "_Emlékezz a jelszóra"
     713
     714msgid "simbrief_remember_tooltip"
     715msgstr ""
     716"Ha ezt kiválasztod, a SimBrief jelszavadat eltárolja a program, így nem kell "
     717"mindig újból beírnod. Vedd azonban figyelembe, hogy a jelszót szövegként "
     718"tároljuk, ezért bárki elolvashatja, aki hozzáfér a fájljaidhoz."
     719
    711720msgid "briefing_title"
    712721msgstr "Eligazítás (%d/2): %s"
  • 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.