Пример #1
0
 def on_updates(self, event):
     if profile.settings['check_for_updates']:
         if version.check_for_updates():
             VersionWindow(self)
         else:
             dlg = wx.MessageDialog(self, _("You are running the latest version of Horus!"), _(
                 "Updated!"), wx.OK | wx.ICON_INFORMATION)
             dlg.ShowModal()
             dlg.Destroy()
Пример #2
0
    def after_splash_callback(self):
        # Load settings
        profile.load_settings()

        # Load logger
        self.clear_log_if_required()
        logging.config.fileConfig(resources.get_path_for_logger('logger.conf'))

        # Load language
        resources.setup_localization(profile.settings['language'])

        # Load version
        version.download_lastest_data()

        # Create main window
        self.main_window = MainWindow()

        # Check for updates
        if profile.settings['check_for_updates'] and version.check_for_updates(
        ):
            v = VersionWindow(self.main_window)
            if v.download:
                if self.splash is not None:
                    self.splash.Show(False)
                    self.splash = None
                self.main_window.Close(True)
                return

        # Hide Splash
        if self.splash is not None:
            self.splash.Show(False)
            self.splash = None

        # Show main window
        self.SetTopWindow(self.main_window)
        self.main_window.Show()

        if profile.settings['show_welcome']:
            # Create welcome window
            WelcomeDialog(self.main_window)

        set_full_screen_capable(self.main_window)

        if sys.is_darwin():
            wx.CallAfter(self.stupid_mac_os_workaround)