summaryrefslogtreecommitdiff
path: root/sensors-applet/active-sensor.c
diff options
context:
space:
mode:
authorinfo-cppsp <[email protected]>2018-01-24 21:11:34 +0100
committerraveit65 <[email protected]>2018-01-25 14:59:35 +0100
commitaaddbc0387c7e4089fe1d828ae422f2c88885d9f (patch)
treee95bc90a835060814d600f23ce845d808f037ee7 /sensors-applet/active-sensor.c
parent826c61d7a97c6dcb4a5136dfc15cc6702515b480 (diff)
downloadmate-sensors-applet-aaddbc0387c7e4089fe1d828ae422f2c88885d9f.tar.bz2
mate-sensors-applet-aaddbc0387c7e4089fe1d828ae422f2c88885d9f.tar.xz
Fix popup shower on removed HDD
Added timer to active sensors, to suppress infinite popups, when a drive is removed from the system, with its sensor still active in msa. fixes #62
Diffstat (limited to 'sensors-applet/active-sensor.c')
-rw-r--r--sensors-applet/active-sensor.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sensors-applet/active-sensor.c b/sensors-applet/active-sensor.c
index 5ffb262..6ae6831 100644
--- a/sensors-applet/active-sensor.c
+++ b/sensors-applet/active-sensor.c
@@ -420,6 +420,11 @@ ActiveSensor *active_sensor_new(SensorsApplet *sensors_applet,
active_sensor->sensor_row = sensor_row;
+#ifdef HAVE_LIBNOTIFY
+ /* set a base time, creation -5 minutes */
+ active_sensor->ierror_ts = time(NULL) - 300;
+#endif
+
int i;
for (i = 0; i < NUM_ALARMS; i++) {
active_sensor->alarm_timeout_id[i] = -1;