Fix DetailsWindow bugs

This commit is contained in:
kramo
2023-04-20 02:05:20 +02:00
parent 1e3df843ba
commit d505705493
2 changed files with 7 additions and 3 deletions

View File

@@ -67,6 +67,7 @@ class DetailsWindow(Adw.Window):
if self.game:
self.set_title(_("Edit Game Details"))
self.name.set_text(self.game.name)
if self.game.developer:
self.developer.set_text(self.game.developer)
self.executable.set_text(shlex.join(self.game.executable))
self.apply_button.set_label(_("Apply"))
@@ -218,7 +219,7 @@ class DetailsWindow(Adw.Window):
self.close()
self.win.show_details_view(self.game)
def focus_executable(self):
def focus_executable(self, *_args):
self.set_focus(self.executable)
def set_cover(self, _source, result, *_args):

View File

@@ -106,7 +106,10 @@ class Game(Gtk.Box):
self.game_cover = GameCover({self.cover}, self.get_cover_path())
self.win.game_covers[self.game_id] = self.game_cover
if self.win.stack.get_visible_child() == self.win.details_view:
if (
self.win.stack.get_visible_child() == self.win.details_view
and self.win.active_game == self
):
self.win.show_details_view(self)
if not self.removed and not self.blacklisted: