X-Git-Url: http://wpitchoune.net/gitweb/?p=psensor-pkg-debian.git;a=blobdiff_plain;f=src%2Fui_notify.c;h=719f50210cf7847946f7cc28a9a3d087db1df45d;hp=6361f06648d678160f2bc376ecc025e6e8b50a6a;hb=bd7036af56a4b61b2b473dccbeac5e26f78b57da;hpb=e248180cc4ebc258fdd5778a26c08287089165b1 diff --git a/src/ui_notify.c b/src/ui_notify.c index 6361f06..719f502 100644 --- a/src/ui_notify.c +++ b/src/ui_notify.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2014 jeanfi@gmail.com + * Copyright (C) 2010-2016 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -53,13 +53,13 @@ void ui_notify(struct psensor *sensor, struct ui_psensor *ui) || t.tv_sec - last_notification_tv.tv_sec >= 60) last_notification_tv = t; else - return ; + return; if (notify_is_initted() == FALSE) notify_init("psensor"); if (notify_is_initted() == TRUE) { - if (ui->config->temperature_unit == CELSIUS) + if (config_get_temperature_unit() == CELSIUS) use_celsius = 1; else use_celsius = 0; @@ -75,8 +75,8 @@ void ui_notify(struct psensor *sensor, struct ui_psensor *ui) if (is_temp_type(sensor->type)) summary = _("Temperature alert"); - else if (is_fan_type(sensor->type)) - summary = _("Fan alert"); + else if (sensor->type & SENSOR_TYPE_RPM) + summary = _("Fan speed alert"); else summary = _("N/A");