comparison notify.c @ 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 58a3312a1c59
children
comparison
equal deleted inserted replaced
10:fe1a21ab4f69 11:2da5037fdfad
27 } 27 }
28 28
29 void send_notify(struct UpdatesInfo *info) 29 void send_notify(struct UpdatesInfo *info)
30 { 30 {
31 NotifyNotification *ntfy; 31 NotifyNotification *ntfy;
32 ntfy = notify_notification_new(_("Software Update(s)"), notify_text(info), info->critical > 0 ? "software-update-urgent" : "software-update-available"); 32 ntfy = notify_notification_new(
33 _("Software Update(s)"),
34 _(notify_text(info)),
35 info->critical > 0 ? "software-update-urgent" : "software-update-available"
36 #if (NOTIFY_VERSION_MAJOR == 0 && NOTIFY_VERSION_MINOR < 7)
37 , NULL
38 #endif
39 );
33 notify_notification_set_timeout(ntfy, 3000); 40 notify_notification_set_timeout(ntfy, 3000);
34 notify_notification_set_urgency(ntfy, info->critical > 0 ? NOTIFY_URGENCY_CRITICAL : NOTIFY_URGENCY_NORMAL); 41 notify_notification_set_urgency(ntfy, info->critical > 0 ? NOTIFY_URGENCY_CRITICAL : NOTIFY_URGENCY_NORMAL);
35 notify_notification_show(ntfy, NULL); 42 notify_notification_show(ntfy, NULL);
36 } 43 }
37 44