aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/temperature/e_mod_main.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2008-03-10 06:45:05 +0000
committerCarsten Haitzler <raster@rasterman.com>2008-03-10 06:45:05 +0000
commit17d1bbe1a85a2b578c93e2e43c054190b045e704 (patch)
tree7d512a62f1d2da7f2279f038b2f5f1ca244c966c /src/modules/temperature/e_mod_main.c
parentfix batget restart on shelf re-config so it displays right (diff)
downloadenlightenment-17d1bbe1a85a2b578c93e2e43c054190b045e704.tar.gz
use new exe flag to make children die! die! die! kill the children... KILL!
... child processes that is. :) SVN revision: 33975
Diffstat (limited to 'src/modules/temperature/e_mod_main.c')
-rw-r--r--src/modules/temperature/e_mod_main.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/src/modules/temperature/e_mod_main.c b/src/modules/temperature/e_mod_main.c
index 98055c12f..e4b07e9e0 100644
--- a/src/modules/temperature/e_mod_main.c
+++ b/src/modules/temperature/e_mod_main.c
@@ -91,16 +91,7 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
inst->o_temp = o;
inst->module = temperature_config->module;
inst->have_temp = -1;
- snprintf(buf, sizeof(buf),
- "%s/%s/tempget %i \"%s\" %i",
- e_module_dir_get(temperature_config->module), MODULE_ARCH,
- inst->sensor_type,
- (inst->sensor_name != NULL ? inst->sensor_name : "-null-"),
- inst->poll_interval);
- inst->tempget_exe = ecore_exe_pipe_run(buf,
- ECORE_EXE_PIPE_READ |
- ECORE_EXE_PIPE_READ_LINE_BUFFERED,
- inst);
+
inst->tempget_data_handler =
ecore_event_handler_add(ECORE_EXE_EVENT_DATA,
_temperature_cb_exe_data,
@@ -110,6 +101,8 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
_temperature_cb_exe_del,
inst);
+ temperature_face_update_config(inst);
+
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN,
_temperature_face_cb_mouse_down, inst);
return gcc;
@@ -390,10 +383,13 @@ void
temperature_face_update_config(Config_Face *inst)
{
char buf[PATH_MAX];
-
- ecore_exe_terminate(inst->tempget_exe);
- ecore_exe_free(inst->tempget_exe);
- inst->tempget_exe = NULL;
+
+ if (inst->tempget_exe)
+ {
+ ecore_exe_terminate(inst->tempget_exe);
+ ecore_exe_free(inst->tempget_exe);
+ inst->tempget_exe = NULL;
+ }
snprintf(buf, sizeof(buf),
"%s/%s/tempget %i \"%s\" %i",
e_module_dir_get(temperature_config->module), MODULE_ARCH,
@@ -402,7 +398,8 @@ temperature_face_update_config(Config_Face *inst)
inst->poll_interval);
inst->tempget_exe = ecore_exe_pipe_run(buf,
ECORE_EXE_PIPE_READ |
- ECORE_EXE_PIPE_READ_LINE_BUFFERED,
+ ECORE_EXE_PIPE_READ_LINE_BUFFERED |
+ ECORE_EXE_NOT_LEADER,
inst);
}