hide thermometer when there is no temperature info...

SVN revision: 12772
This commit is contained in:
Carsten Haitzler 2005-01-05 07:56:56 +00:00
parent a8fecbd451
commit 477d160e1f
3 changed files with 21 additions and 5 deletions

View File

@ -5596,15 +5596,15 @@ collections {
}
programs {
program {
name: "on";
signal: "enable";
name: "known";
signal: "known";
source: "";
action: STATE_SET "default" 0.0;
target: "fade_clip";
}
program {
name: "off";
signal: "disable";
name: "unknown";
signal: "unknown";
source: "";
action: STATE_SET "faded" 0.0;
target: "fade_clip";

View File

@ -602,6 +602,8 @@ _temperature_face_init(Temperature_Face *ef)
edje_object_size_min_calc(ef->temp_object, &bw, &bh);
ef->minsize = bh;
ef->minsize = bw;
ef->have_temp = -1;
_temperature_face_reconfigure(ef);
@ -747,10 +749,22 @@ _temperature_cb_check(void *data)
therms = e_file_ls("/proc/acpi/thermal_zone");
if (!therms)
{
/* disable therm object */
if (ef->have_temp != 0)
{
/* disable therm object */
edje_object_signal_emit(ef->temp_object, "unknown", "");
edje_object_part_text_set(ef->temp_object, "reading", "NO TEMP");
ef->have_temp = 0;
}
}
else
{
if (ef->have_temp != 1)
{
/* disable therm object */
edje_object_signal_emit(ef->temp_object, "known", "");
ef->have_temp = 1;
}
while (therms)
{
char buf[4096], units[32];

View File

@ -41,6 +41,8 @@ struct _Temperature_Face
Evas_Coord xx, yy;
Evas_Coord fx, fy, fw;
int have_temp;
Ecore_Timer *temperature_check_timer;
Ecore_Event_Handler *ev_handler_container_resize;