From ee70fba51ae755b326709750e307e0747abd414d Mon Sep 17 00:00:00 2001 From: Daniel Johnson Date: Wed, 6 Mar 2024 19:31:03 -0500 Subject: [PATCH] Hide and show the notification bar when you log into or out of Lutris. --- lutris/gui/lutriswindow.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lutris/gui/lutriswindow.py b/lutris/gui/lutriswindow.py index 0397f0531..cfb47ec4d 100644 --- a/lutris/gui/lutriswindow.py +++ b/lutris/gui/lutriswindow.py @@ -11,7 +11,7 @@ from urllib.parse import unquote, urlparse from gi.repository import Gdk, Gio, GLib, GObject, Gtk from lutris import services, settings -from lutris.api import read_user_info +from lutris.api import read_user_info, LUTRIS_ACCOUNT_DISCONNECTED from lutris.api import LUTRIS_ACCOUNT_CONNECTED from lutris.database import categories as categories_db from lutris.database import games as games_db @@ -151,6 +151,7 @@ class LutrisWindow(Gtk.ApplicationWindow, DialogLaunchUIDelegate, GObject.add_emission_hook(PreferencesDialog, "settings-changed", self.on_settings_changed) MISSING_GAMES.updated.register(self.update_missing_games_sidebar_row) LUTRIS_ACCOUNT_CONNECTED.register(self.on_lutris_account_connected) + LUTRIS_ACCOUNT_DISCONNECTED.register(self.on_lutris_account_disconnected) LOCAL_LIBRARY_UPDATED.register(self.on_local_library_updated) # Finally trigger the initialization of the view here @@ -872,8 +873,12 @@ class LutrisWindow(Gtk.ApplicationWindow, DialogLaunchUIDelegate, return True def on_lutris_account_connected(self): + self.update_notification() self.sync_library(force=True) + def on_lutris_account_disconnected(self): + self.update_notification() + def on_local_library_updated(self): self.redraw_view()