[magneto] make updates notifications go away after the default timeout.

In the recent versions of GNOME, this became super annoying.
This commit is contained in:
Fabio Erculiani
2016-11-20 08:06:52 +01:00
parent 9c300b0a3c
commit 6de1430d76
2 changed files with 8 additions and 5 deletions

View File

@@ -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']:

View File

@@ -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: