diff --git a/src/details_window.py b/src/details_window.py index af273aa..20891ea 100644 --- a/src/details_window.py +++ b/src/details_window.py @@ -67,7 +67,8 @@ class DetailsWindow(Adw.Window): if self.game: self.set_title(_("Edit Game Details")) self.name.set_text(self.game.name) - self.developer.set_text(self.game.developer) + 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): diff --git a/src/game.py b/src/game.py index 4a183cf..1513730 100644 --- a/src/game.py +++ b/src/game.py @@ -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: