Changeset 755:2b64e14287fc


Ignore:
Timestamp:
01/06/16 14:16:46 (9 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Added a check for any signs of a previous running of the program, and if none found, a question about registration (re #285)

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • locale/en/mlx.po

    r753 r755  
    21232123msgstr "There was some communication error, try again later."
    21242124
     2125msgid "register_ask"
     2126msgstr "Would you like to register with MAVA?"
     2127
     2128msgid "register_ask_sec"
     2129msgstr ""
     2130"It seems, you have not run the program\n"
     2131"on this computer, or at least not logged in yet.\n"
     2132"\n"
     2133"If you would like to register, click the\n"
     2134"<b>Register</b> button below and fill the form."
     2135
    21252136msgid "register_title"
    21262137msgstr "Registration"
  • locale/hu/mlx.po

    r753 r755  
    21372137msgstr "Valamilyen kommunikációs probléma adódott, próbáld újra később."
    21382138
     2139msgid "register_ask"
     2140msgstr "Szeretnél regisztrálni?"
     2141
     2142msgid "register_ask_sec"
     2143msgstr ""
     2144"Úgy tűnik, nem futtattad még a programot ezen a\n"
     2145"számítógépen, vagy legalábbis nem jelentkeztél még be.\n"
     2146"\n"
     2147"Ha szeretnél regisztrálni, kattints a <b>Regisztráció</b>\n"
     2148"gombra, majd töltsd ki a megjelenő űrlapot."
     2149
    21392150msgid "register_title"
    21402151msgstr "Regisztráció"
  • src/mlx/gui/gui.py

    r746 r755  
    447447                                    self._mainWindow)
    448448            self._updater.start()
     449        else:
     450            self.updateDone()
    449451
    450452        cef.initialize(self._programDirectory, self._cefInitialized)
     
    457459
    458460        self._disconnect()
     461
     462    def updateDone(self):
     463        """Called when the update is done (and there is no need to restart)."""
     464        gobject.idle_add(self._updateDone)
    459465
    460466    def connected(self, fsType, descriptor):
     
    16941700            self._credentialsAvailable = True
    16951701            self._credentialsCondition.notify()
     1702
     1703    def _updateDone(self):
     1704        """Called when the update is done.
     1705
     1706        It checks if we already know the PID, and if not, asks the user whether
     1707        to register."""
     1708        if not self.config.pilotID and not self.config.password:
     1709            dialog = gtk.MessageDialog(parent = self._mainWindow,
     1710                                       type = MESSAGETYPE_QUESTION,
     1711                                       message_format = xstr("register_ask"))
     1712
     1713            dialog.set_title(WINDOW_TITLE_BASE)
     1714            dialog.format_secondary_markup(xstr("register_ask_sec"))
     1715
     1716            dialog.add_button(xstr("button_cancel"), 0)
     1717            dialog.add_button(xstr("button_register"), 1)
     1718            dialog.set_default_response(1)
     1719
     1720            result = dialog.run()
     1721            dialog.hide()
     1722            if result == 1:
     1723                self._wizard.jumpPage("register")
  • src/mlx/gui/update.py

    r300 r755  
    124124        if not self._waitAfterFinish:
    125125            gobject.idle_add(self._progressWindow.hide)
     126            self._gui.updateDone()
    126127
    127128    def downloadingManifest(self):
     
    286287        if self._restart:
    287288            self._gui.restart()
     289        else:
     290            self._gui.updateDone()
    288291
    289292#-------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.