From ed15317206504bcfb8e996bf17bf7bf59ede4004 Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Wed, 7 Jun 2006 22:20:21 +0000 Subject: [PATCH] Don't launch exec unless there is new mail. SVN revision: 23261 --- e_mod_main.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/e_mod_main.c b/e_mod_main.c index b3e18f0..60d187b 100644 --- a/e_mod_main.c +++ b/e_mod_main.c @@ -629,6 +629,7 @@ _mail_parse_pop(void *data, void *data2) _mail_set_text(inst, num, num); if ((ci->use_exec) && (ci->exec != NULL)) { + if (num <= 0) break; if (!inst->exe) { inst->exit_handler = ecore_event_handler_add(ECORE_EXE_EVENT_DEL, _mail_cb_exe_exit, inst); @@ -850,11 +851,9 @@ _mail_config_updated(const char *id) if (!inst->gcc->id) continue; if (!strcmp(inst->gcc->id, ci->id)) { + if (inst->check_timer) ecore_timer_del(inst->check_timer); if ((ci->type == 0) || (ci->type == 1)) - { - if (inst->check_timer) ecore_timer_del(inst->check_timer); - inst->check_timer = ecore_timer_add((ci->check_time * 60.0), _mail_cb_check, inst); - } + inst->check_timer = ecore_timer_add((ci->check_time * 60.0), _mail_cb_check, inst); if (ci->show_label) edje_object_signal_emit(inst->mail_obj, "label_active", ""); @@ -863,5 +862,4 @@ _mail_config_updated(const char *id) break; } } - }