Mercurial > projects > pk-update-icon
changeset 11:2da5037fdfad
add compatibility with libnotify version < 0.7
author | Guido Berhoerster <guido@berhoerster.name> |
---|---|
date | Tue, 11 Oct 2011 17:07:49 +0200 |
parents | fe1a21ab4f69 |
children | db42ea75e9ff |
files | notify.c |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/notify.c Tue Oct 11 17:07:49 2011 +0200 +++ b/notify.c Tue Oct 11 17:07:49 2011 +0200 @@ -29,7 +29,14 @@ void send_notify(struct UpdatesInfo *info) { NotifyNotification *ntfy; - ntfy = notify_notification_new(_("Software Update(s)"), notify_text(info), info->critical > 0 ? "software-update-urgent" : "software-update-available"); + ntfy = notify_notification_new( + _("Software Update(s)"), + _(notify_text(info)), + info->critical > 0 ? "software-update-urgent" : "software-update-available" +#if (NOTIFY_VERSION_MAJOR == 0 && NOTIFY_VERSION_MINOR < 7) + , NULL +#endif + ); notify_notification_set_timeout(ntfy, 3000); notify_notification_set_urgency(ntfy, info->critical > 0 ? NOTIFY_URGENCY_CRITICAL : NOTIFY_URGENCY_NORMAL); notify_notification_show(ntfy, NULL);