projects/pk-update-icon

changeset 11:2da5037fdfad

add compatibility with libnotify version < 0.7
author Guido Berhoerster <guido@berhoerster.name>
date Tue Oct 11 17:07:49 2011 +0200 (2011-10-11)
parents fe1a21ab4f69
children db42ea75e9ff
files notify.c
line diff
     1.1 --- a/notify.c	Tue Oct 11 17:07:49 2011 +0200
     1.2 +++ b/notify.c	Tue Oct 11 17:07:49 2011 +0200
     1.3 @@ -29,7 +29,14 @@
     1.4  void send_notify(struct UpdatesInfo *info)
     1.5  {
     1.6  	NotifyNotification *ntfy;
     1.7 -	ntfy = notify_notification_new(_("Software Update(s)"), notify_text(info), info->critical > 0 ? "software-update-urgent" : "software-update-available");
     1.8 +	ntfy = notify_notification_new(
     1.9 +		_("Software Update(s)"),
    1.10 +		_(notify_text(info)),
    1.11 +		info->critical > 0 ? "software-update-urgent" : "software-update-available"
    1.12 +#if (NOTIFY_VERSION_MAJOR == 0 && NOTIFY_VERSION_MINOR < 7)
    1.13 +		, NULL
    1.14 +#endif
    1.15 +	);
    1.16  	notify_notification_set_timeout(ntfy, 3000);
    1.17  	notify_notification_set_urgency(ntfy, info->critical > 0 ? NOTIFY_URGENCY_CRITICAL : NOTIFY_URGENCY_NORMAL);
    1.18  	notify_notification_show(ntfy, NULL);