Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mail
Dir : e_modules/mail Modified Files: e_mod_main.c Log Message: Perform an initial mail check on startup for imap and pop instead of waiting for the timer to fire. =================================================================== RCS file: /cvs/e/e_modules/mail/e_mod_main.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -3 -r1.27 -r1.28 --- e_mod_main.c 15 Jun 2006 13:05:53 -0000 1.27 +++ e_mod_main.c 20 Jun 2006 21:56:38 -0000 1.28 @@ -66,6 +66,7 @@ Mail *mail; Config_Item *ci; Evas_List *l, *j; + int have_pop = 0, have_imap = 0; inst = E_NEW(Instance, 1); ci = _mail_config_item_get(id); @@ -103,11 +104,13 @@ switch (cb->type) { case MAIL_TYPE_IMAP: + have_imap = 1; _mail_imap_add_mailbox(cb); if (!inst->check_timer) inst->check_timer = ecore_timer_add((ci->check_time * 60.0), _mail_cb_check, inst); break; case MAIL_TYPE_POP: + have_pop = 1; _mail_pop_add_mailbox(cb); if (!inst->check_timer) inst->check_timer = ecore_timer_add((ci->check_time * 60.0), _mail_cb_check, inst); @@ -119,7 +122,9 @@ _mail_mbox_add_mailbox(inst, cb); break; } - } + } + if (have_pop) _mail_pop_check_mail(inst); + if (have_imap) _mail_imap_check_mail(inst); } return gcc; } _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs