Esempio n. 1
0
    def install_dialog(self):
        """Ask the user if she wants to install the runner.

        Return success of runner installation.
        """
        dialog = dialogs.QuestionDialog({
            "question": ("The required runner is not installed.\n"
                         "Do you wish to install it now?"),
            "title":
            "Required runner unavailable",
        })
        if Gtk.ResponseType.YES == dialog.result:

            from lutris.gui.dialogs.runners import simple_downloader
            from lutris.gui.dialogs import ErrorDialog
            try:
                if hasattr(self, "get_version"):
                    self.install(downloader=simple_downloader,
                                 version=self.get_version(use_default=False))
                else:
                    self.install(downloader=simple_downloader)
            except RunnerInstallationError as ex:
                ErrorDialog(ex.message)

            return self.is_installed()
        return False
Esempio n. 2
0
 def on_window_delete(self, *_args):
     if self.application.running_games:
         dlg = dialogs.QuestionDialog({
             "question":
             "Some games are still running, are you sure you want to quit Lutris?",
             "title": "Quit Lutris?",
         })
         if dlg.result != Gtk.ResponseType.YES:
             return True
Esempio n. 3
0
 def on_disconnect(self, *_args):
     """Callback from user disconnect"""
     dlg = dialogs.QuestionDialog({
         "question":
         _("Do you want to log out from Lutris?"),
         "title":
         _("Log out?"),
     })
     if dlg.result != Gtk.ResponseType.YES:
         return
     api.disconnect()
Esempio n. 4
0
 def on_disconnect(self, *_args):
     """Callback from user disconnect"""
     dlg = dialogs.QuestionDialog({
         "question": "Do you want to log out from Lutris?",
         "title": "Log out?",
     })
     if dlg.result != Gtk.ResponseType.YES:
         return
     api.disconnect()
     self.toggle_connection(False)
     self.actions["synchronize"].props.enabled = False
Esempio n. 5
0
    def install_dialog(self):
        """Ask the user if she wants to install the runner.

        Return True if the runner was installed."""
        dialog = dialogs.QuestionDialog({
            'question': ("The required runner is not installed.\n"
                         "Do you wish to install it now?"),
            'title':
            "Required runner unavailable"
        })
        if Gtk.ResponseType.YES == dialog.result:
            if self.install() or self.is_installed:
                return True
Esempio n. 6
0
    def install_dialog(self):
        """Ask the user if she wants to install the runner.

        Return success of runner installation.
        """
        dialog = dialogs.QuestionDialog({
            'question': ("The required runner is not installed.\n"
                         "Do you wish to install it now?"),
            'title': "Required runner unavailable"
        })
        if Gtk.ResponseType.YES == dialog.result:
            return self.install()
        return False
Esempio n. 7
0
    def install_dialog(self):
        """Ask the user if she wants to install the runner.

        Return success of runner installation.
        """
        dialog = dialogs.QuestionDialog({
            'question': ("The required runner is not installed.\n"
                         "Do you wish to install it now?"),
            'title': "Required runner unavailable"
        })
        if Gtk.ResponseType.YES == dialog.result:
            if hasattr(self, 'get_version'):
                version = self.get_version(use_default=False)
            else:
                version = None
            if version:
                return self.install(version=version)
            return self.install()
        return False