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
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
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()
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
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
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
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