From 6de1430d76058824ca085abe31e52dac556db259 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Sun, 20 Nov 2016 08:06:52 +0100 Subject: [PATCH] [magneto] make updates notifications go away after the default timeout. In the recent versions of GNOME, this became super annoying. --- magneto/src/magneto/core/interfaces.py | 9 ++++----- magneto/src/magneto/gtk3/interfaces.py | 4 ++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/magneto/src/magneto/core/interfaces.py b/magneto/src/magneto/core/interfaces.py index 11e9edd03..9089e1c40 100644 --- a/magneto/src/magneto/core/interfaces.py +++ b/magneto/src/magneto/core/interfaces.py @@ -369,7 +369,7 @@ class MagnetoCore(MagnetoCoreUI): self.show_alert( _("Sabayon updates available"), _("Updates are available"), - urgency = "critical", + urgency = "normal", force = self.manual_check_triggered, buttons = [("upgrade", _("Upgrade now"), upgrade_cb,)] ) @@ -389,10 +389,9 @@ class MagnetoCore(MagnetoCoreUI): return self.update_tooltip(_("Repositories are being updated")) - # This does not seem to be extremely useful: - # self.show_alert(_("Sabayon repositories status"), - # _("Repositories are being updated automatically") - # ) + self.show_alert(_("Sabayon repositories status"), + _("Repositories are being updated automatically") + ) def upgrading_signal(self): if not config.settings['APPLET_ENABLED']: diff --git a/magneto/src/magneto/gtk3/interfaces.py b/magneto/src/magneto/gtk3/interfaces.py index ec4ea66f8..e07303df7 100644 --- a/magneto/src/magneto/gtk3/interfaces.py +++ b/magneto/src/magneto/gtk3/interfaces.py @@ -152,8 +152,12 @@ class Magneto(MagnetoCore): if urgency == 'critical': n.set_urgency(Notify.Urgency.CRITICAL) + if urgency == 'normal': + n.set_urgency(Notify.Urgency.NORMAL) + n.set_timeout(Notify.EXPIRES_DEFAULT) elif urgency == 'low': n.set_urgency(Notify.Urgency.LOW) + n.set_timeout(Notify.EXPIRES_DEFAULT) self.last_alert = (title, text) if buttons: