1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
diff --git a/sensors-applet/active-sensor-libnotify.c b/sensors-applet/active-sensor-libnotify.c
index e69b005..f7a7eb8 100644
--- a/sensors-applet/active-sensor-libnotify.c
+++ b/sensors-applet/active-sensor-libnotify.c
@@ -84,10 +84,23 @@ void active_sensor_libnotify_notify(ActiveSensor *active_sensor,
/* now create a new one */
g_debug("Creating new notification");
+ #ifdef NOTIFY_CHECK_VERSION
+ #if NOTIFY_CHECK_VERSION (0, 7, 1)
+ active_sensor->notification[notif_type] = notify_notification_new(summary,
+ message,
+ icon_filename);
+ #else
+ active_sensor->notification[notif_type] = notify_notification_new(summary,
+ message,
+ icon_filename,
+ attach);
+ #endif
+ #else
active_sensor->notification[notif_type] = notify_notification_new(summary,
message,
icon_filename,
attach);
+ #endif
g_signal_connect(active_sensor->notification[notif_type], "closed",
G_CALLBACK(notif_closed_cb),
active_sensor);
diff --git a/sensors-applet/sensors-applet.c b/sensors-applet/sensors-applet.c
index 9486173..81675b8 100644
--- a/sensors-applet/sensors-applet.c
+++ b/sensors-applet/sensors-applet.c
@@ -303,11 +303,23 @@ void sensors_applet_notify(SensorsApplet *sensors_applet,
message = g_strdup_printf(_("An error occurred while trying to save the current sensor configuration. "));
break;
}
-
+ #ifdef NOTIFY_CHECK_VERSION
+ #if NOTIFY_CHECK_VERSION (0, 7, 1)
+ sensors_applet->notification = notify_notification_new(summary,
+ message,
+ GTK_STOCK_DIALOG_WARNING);
+ #else
+ sensors_applet->notification = notify_notification_new(summary,
+ message,
+ GTK_STOCK_DIALOG_WARNING,
+ GTK_WIDGET(sensors_applet->applet));
+ #endif
+ #else
sensors_applet->notification = notify_notification_new(summary,
message,
GTK_STOCK_DIALOG_WARNING,
GTK_WIDGET(sensors_applet->applet));
+ #endif
g_free(summary);
g_free(message);
|