projects
/
psensor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f51bc62
)
fixed libnotify version check
author
Jean-Philippe Orsini
<jeanfi@gmail.com>
Mon, 7 Nov 2011 11:36:58 +0000
(11:36 +0000)
committer
Jean-Philippe Orsini
<jeanfi@gmail.com>
Mon, 7 Nov 2011 11:36:58 +0000
(11:36 +0000)
src/ui_notify.c
patch
|
blob
|
history
diff --git
a/src/ui_notify.c
b/src/ui_notify.c
index
716dcfc
..
57eb63a
100644
(file)
--- a/
src/ui_notify.c
+++ b/
src/ui_notify.c
@@
-60,11
+60,14
@@
void ui_notify(struct psensor *sensor, struct ui_psensor *ui)
if (notify_is_initted() == TRUE) {
name = strdup(sensor->name);
if (notify_is_initted() == TRUE) {
name = strdup(sensor->name);
-#if defined(NOTIFY_CHECK_VERSION) && NOTIFY_CHECK_VERSION(0, 7, 0)
/*
/*
- *
s
ince libnotify 0.7 notify_notification_new has
+ *
S
ince libnotify 0.7 notify_notification_new has
* only 3 parameters.
* only 3 parameters.
- */
+ *
+ * NOTIFY_CHECK_VERSION exists since 0.5.2.
+ */
+#ifdef NOTIFY_CHECK_VERSION
+#if NOTIFY_CHECK_VERSION(0, 7, 0)
notif = notify_notification_new(_("Temperature alert"),
name,
NULL);
notif = notify_notification_new(_("Temperature alert"),
name,
NULL);
@@
-74,6
+77,12
@@
void ui_notify(struct psensor *sensor, struct ui_psensor *ui)
NULL,
GTK_WIDGET(ui->main_window));
#endif
NULL,
GTK_WIDGET(ui->main_window));
#endif
+#else
+ notif = notify_notification_new(_("Temperature alert"),
+ name,
+ NULL,
+ GTK_WIDGET(ui->main_window));
+#endif
notify_notification_show(notif, NULL);
notify_notification_show(notif, NULL);