Remove @watch_errors() from the configuration dialog

This commit is contained in:
Daniel Johnson 2023-12-15 19:25:14 -05:00 committed by Mathieu Comandon
parent b13ab1b29e
commit 2e439359b8
4 changed files with 0 additions and 22 deletions

View file

@ -8,7 +8,6 @@ from gi.repository import GdkPixbuf, Gtk, Pango
from lutris import runners, settings
from lutris.config import LutrisConfig, make_game_config_id
from lutris.exceptions import watch_errors
from lutris.game import Game
from lutris.gui import dialogs
from lutris.gui.config import DIALOG_HEIGHT, DIALOG_WIDTH
@ -253,7 +252,6 @@ class GameDialogCommon(SavableModelessDialog, DialogInstallUIDelegate):
box.hide()
return box
@watch_errors()
def on_reset_preferred_launch_config_clicked(self, _button, launch_config_box):
game_config = self.game.config.game_level.get("game", {})
game_config.pop("preferred_launch_config_name", None)
@ -372,7 +370,6 @@ class GameDialogCommon(SavableModelessDialog, DialogInstallUIDelegate):
runner_liststore.append(("%s (%s)" % (runner.human_name, description), runner.name))
return runner_liststore
@watch_errors()
def on_slug_change_clicked(self, widget):
if self.slug_entry.get_sensitive() is False:
widget.set_label(_("Apply"))
@ -380,7 +377,6 @@ class GameDialogCommon(SavableModelessDialog, DialogInstallUIDelegate):
else:
self.change_game_slug()
@watch_errors()
def on_slug_entry_activate(self, _widget):
self.change_game_slug()
@ -394,7 +390,6 @@ class GameDialogCommon(SavableModelessDialog, DialogInstallUIDelegate):
self.slug_entry.set_sensitive(False)
self.slug_change_button.set_label(_("Change"))
@watch_errors()
def on_move_clicked(self, _button):
new_location = DirectoryDialog("Select new location for the game",
default_path=self.game.directory, parent=self)
@ -404,7 +399,6 @@ class GameDialogCommon(SavableModelessDialog, DialogInstallUIDelegate):
move_dialog.connect("game-moved", self.on_game_moved)
move_dialog.move()
@watch_errors()
def on_game_moved(self, dialog):
"""Show a notification when the game is moved"""
new_directory = dialog.new_directory
@ -540,7 +534,6 @@ class GameDialogCommon(SavableModelessDialog, DialogInstallUIDelegate):
if self.game_box:
self.game_box.filter = value
@watch_errors()
def on_runner_changed(self, widget):
"""Action called when runner drop down is changed."""
new_runner_index = widget.get_active()
@ -642,7 +635,6 @@ class GameDialogCommon(SavableModelessDialog, DialogInstallUIDelegate):
return False
return True
@watch_errors()
def on_save(self, _button):
"""Save game info and destroy widget."""
if not self.is_valid():
@ -687,7 +679,6 @@ class GameDialogCommon(SavableModelessDialog, DialogInstallUIDelegate):
self.saved = True
return True
@watch_errors()
def on_custom_image_select(self, _widget, image_type):
dialog = Gtk.FileChooserNative.new(
_("Please choose a custom image"),
@ -732,7 +723,6 @@ class GameDialogCommon(SavableModelessDialog, DialogInstallUIDelegate):
dialog.destroy()
@watch_errors()
def on_custom_image_reset_clicked(self, _widget, image_type):
slug = self.slug or self.game.slug
service_media = self.service_medias[image_type]

View file

@ -5,7 +5,6 @@ from gi.repository import Gtk
from lutris.database import categories as categories_db
from lutris.database import games as games_db
from lutris.exceptions import watch_errors
from lutris.game import Game
from lutris.gui.dialogs import ErrorDialog, QuestionDialog, SavableModelessDialog
@ -60,7 +59,6 @@ class EditCategoryGamesDialog(SavableModelessDialog):
frame.add(sw)
return frame
@watch_errors()
def on_delete_clicked(self, _button):
dlg = QuestionDialog(
{
@ -75,7 +73,6 @@ class EditCategoryGamesDialog(SavableModelessDialog):
game.remove_category(self.category)
self.destroy()
@watch_errors()
def on_save(self, _button):
"""Save game info and destroy widget."""
removed_games = []

View file

@ -5,7 +5,6 @@ from gettext import gettext as _
from gi.repository import Gtk
from lutris.database import categories as categories_db
from lutris.exceptions import watch_errors
from lutris.gui import dialogs
from lutris.gui.dialogs import SavableModelessDialog
@ -79,7 +78,6 @@ class EditGameCategoriesDialog(SavableModelessDialog):
return hbox
@watch_errors()
def on_save(self, _button):
"""Save game info and destroy widget."""
removed_categories = set()

View file

@ -3,7 +3,6 @@ from gettext import gettext as _
from gi.repository import GObject, Gtk
from lutris import runners
from lutris.exceptions import watch_errors
from lutris.gui.config.runner import RunnerConfigDialog
from lutris.gui.dialogs import ErrorDialog, QuestionDialog
from lutris.gui.dialogs.runner_install import RunnerInstallDialog
@ -84,14 +83,12 @@ class RunnerBox(Gtk.Box):
_button.show()
return _button
@watch_errors()
def on_versions_clicked(self, widget):
window = self.get_toplevel()
application = window.get_application()
title = _("Manage %s versions") % self.runner.name
application.show_window(RunnerInstallDialog, title=title, runner=self.runner, parent=window)
@watch_errors()
def on_install_clicked(self, widget):
"""Install a runner."""
logger.debug("Install of %s requested", self.runner)
@ -110,13 +107,11 @@ class RunnerBox(Gtk.Box):
else:
ErrorDialog("Runner failed to install", parent=self.get_toplevel())
@watch_errors()
def on_configure_clicked(self, widget):
window = self.get_toplevel()
application = window.get_application()
application.show_window(RunnerConfigDialog, runner=self.runner, parent=window)
@watch_errors()
def on_remove_clicked(self, widget):
dialog = QuestionDialog(
{
@ -132,14 +127,12 @@ class RunnerBox(Gtk.Box):
self.runner.uninstall(on_runner_uninstalled)
@watch_errors()
def on_runner_installed(self, widget):
"""Called after the runnner is installed"""
self.runner_label_box.set_sensitive(True)
self.action_alignment.get_children()[0].destroy()
self.action_alignment.add(self.get_action_button())
@watch_errors()
def on_runner_removed(self, widget):
"""Called after the runner is removed"""
self.runner_label_box.set_sensitive(False)