Disable the 'install' button for the Linux runner.

You probably don't need to do this.
This commit is contained in:
Daniel Johnson 2023-12-08 05:32:21 -05:00
parent fb7600318b
commit b75c800d43
2 changed files with 8 additions and 0 deletions

View file

@ -80,6 +80,7 @@ class RunnerBox(Gtk.Box):
_button = Gtk.Button.new_from_icon_name("system-software-install-symbolic", Gtk.IconSize.BUTTON)
_button.get_style_context().add_class("circular")
_button.connect("clicked", self.on_install_clicked)
_button.set_sensitive(not self.runner.is_installed())
_button.show()
return _button

View file

@ -3,6 +3,7 @@
import os
import stat
from gettext import gettext as _
from typing import Callable
# Lutris Modules
from lutris.exceptions import GameConfigError, MissingExecutableError
@ -126,6 +127,12 @@ class linux(Runner):
"""Well of course Linux is installed, you're using Linux right ?"""
return True
def can_uninstall(self):
return False
def uninstall(self, uninstall_callback: Callable[[], None]) -> None:
raise RuntimeError("Linux shouldn't be installed.")
def get_launch_config_command(self, gameplay_info, launch_config):
# The linux runner has no command (by default) beyond the 'exe' itself;
# so the command in gameplay_info is discarded.