code style
[psensor.git] / src / ui_notify.c
index 716dcfc..faca4dc 100644 (file)
 
 #include <libnotify/notify.h>
 
+/* Macro defined since libnotify 0.5.2 */
+#ifndef NOTIFY_CHECK_VERSION
+#define NOTIFY_CHECK_VERSION(x, y, z) 0
+#endif
+
 #include "ui.h"
 #include "ui_notify.h"
 
@@ -60,11 +65,11 @@ void ui_notify(struct psensor *sensor, struct ui_psensor *ui)
        if (notify_is_initted() == TRUE) {
                name = strdup(sensor->name);
 
-#if defined(NOTIFY_CHECK_VERSION) && NOTIFY_CHECK_VERSION(0, 7, 0)
                /*
-                * since libnotify 0.7 notify_notification_new has
+                * Since libnotify 0.7 notify_notification_new has
                 * only 3 parameters.
                 */
+#if NOTIFY_CHECK_VERSION(0, 7, 0)
                notif = notify_notification_new(_("Temperature alert"),
                                                name,
                                                NULL);