Fix DetailsWindow bugs
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user