Add toast notification for launching games

This commit is contained in:
kramo
2023-04-03 09:38:48 +02:00
parent f3db0647ae
commit 937f66237c
2 changed files with 14 additions and 3 deletions

View File

@@ -148,6 +148,12 @@ class CartridgesApplication(Adw.Application):
self.win.games[game_id].launch()
title = self.win.games[game_id].name
# The variable is the title of the game
toast = Adw.Toast.new(_("{} launched").format(title))
toast.set_priority(Adw.ToastPriority.HIGH)
self.win.toast_overlay.add_toast(toast)
self.win.update_games([game_id])
if self.win.stack.get_visible_child() == self.win.overview: