syncevo-dbus-server: deal with libnotify 0.5.x compile error (BMC #10453)
The version check for the 0.7.0 API change incorrectly switched to the new API with libnotify 0.5.2 and thus fails to compile, because 0.5.2 only has NOTIFY_CHECK_VERSION(), but not the new API. A more complex version check is part of this patch.
This commit is contained in:
parent
de0e1869af
commit
857745727d
1 changed files with 5 additions and 2 deletions
|
@ -6108,9 +6108,12 @@ void AutoSyncManager::Notification::send(const char *summary,
|
|||
notify_notification_clear_actions(m_notification);
|
||||
notify_notification_close(m_notification, NULL);
|
||||
}
|
||||
#if !defined(NOTIFY_CHECK_VERSION)
|
||||
#ifndef NOTIFY_CHECK_VERSION
|
||||
# define NOTIFY_CHECK_VERSION(_x,_y,_z) 0
|
||||
#endif
|
||||
#if !NOTIFY_CHECK_VERSION(0,7,0)
|
||||
m_notification = notify_notification_new(summary, body, NULL, NULL);
|
||||
#else // NOTIFY_CHECK_VERSION(0,7,0) is redundant, because 0.7.0 introduced NOTIFY_CHECK_VERSION
|
||||
#else
|
||||
m_notification = notify_notification_new(summary, body, NULL);
|
||||
#endif
|
||||
//if actions are not supported, don't add actions
|
||||
|
|
Loading…
Reference in a new issue