diff options
author | Christian Hesse <mail@eworm.de> | 2013-07-07 20:44:29 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2013-07-07 20:44:29 +0200 |
commit | cbd48697eede13207b60a66b72de573105b776d4 (patch) | |
tree | b4269ec7ac5a776ebd66a98a68c31f8229152809 /netlink-notify.c | |
parent | 05c8a23ec8725815b54f9d73c184a70e491c2f20 (diff) | |
download | netlink-notify-cbd48697eede13207b60a66b72de573105b776d4.tar.gz netlink-notify-cbd48697eede13207b60a66b72de573105b776d4.tar.zst |
fix compilation with libnotify < 0.7.0
Diffstat (limited to 'netlink-notify.c')
-rw-r--r-- | netlink-notify.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/netlink-notify.c b/netlink-notify.c index 9bd22e4..eeeeee1 100644 --- a/netlink-notify.c +++ b/netlink-notify.c @@ -303,11 +303,6 @@ static int msg_handler (struct sockaddr_nl *nl, struct nlmsghdr *msg) { return 0; } - address = notify_notification_new(TEXT_TOPIC, notifystr, ICON_NETWORK_ADDRESS); - notify_notification_set_category(address, PROGNAME); - notify_notification_set_urgency(address, NOTIFY_URGENCY_NORMAL); - notify_notification_set_timeout(address, NOTIFICATION_TIMEOUT); - break; case RTM_DELADDR: rth = IFA_RTA (ifa); @@ -359,7 +354,12 @@ static int msg_handler (struct sockaddr_nl *nl, struct nlmsghdr *msg) { if (address == NULL) { if (notification[ifi->ifi_index] == NULL) { notification[ifi->ifi_index] = notify_notification_new(TEXT_TOPIC, notifystr, - (ifi->ifi_flags & CHECK_CONNECTED ? ICON_NETWORK_CONNECTED : ICON_NETWORK_DISCONNECTED)); + (ifi->ifi_flags & CHECK_CONNECTED ? ICON_NETWORK_CONNECTED : ICON_NETWORK_DISCONNECTED) +#if NOTIFY_CHECK_VERSION(0, 7, 0) + ); +#else + , NULL); +#endif notify_notification_set_category(notification[ifi->ifi_index], PROGNAME); notify_notification_set_urgency(notification[ifi->ifi_index], NOTIFY_URGENCY_NORMAL); } else |