Enlightenment CVS committal

Author  : englebass
Project : e_modules
Module  : mail

Dir     : e_modules/mail


Modified Files:
        e_mod_main.h e_mod_main.c 


Log Message:
Only initialize the mailboxes which belong to this gadget.

===================================================================
RCS file: /cvs/e/e_modules/mail/e_mod_main.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- e_mod_main.h        20 Sep 2006 22:12:18 -0000      1.9
+++ e_mod_main.h        15 Mar 2007 13:15:56 -0000      1.10
@@ -1,3 +1,6 @@
+/*
+ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
+ */
 #define D_(str) dgettext(PACKAGE, str)
 
 #ifndef E_MOD_MAIN_H
===================================================================
RCS file: /cvs/e/e_modules/mail/e_mod_main.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -3 -r1.42 -r1.43
--- e_mod_main.c        30 Dec 2006 23:33:59 -0000      1.42
+++ e_mod_main.c        15 Mar 2007 13:15:56 -0000      1.43
@@ -1,4 +1,7 @@
 /*
+ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
+ */
+/*
  * Copyright (C) 2006 Christopher Michael
  *
  * Portions of this code Copyright (C) 2004 Embrace project.
@@ -70,7 +73,7 @@
   Instance *inst;
   Mail *mail;
   Config_Item *ci;
-  Evas_List *l, *j;
+  Evas_List *l;
   int have_pop = 0, have_imap = 0, have_mbox = 0;
 
   inst = E_NEW (Instance, 1);
@@ -100,54 +103,48 @@
     edje_object_signal_emit (inst->mail_obj, "label_passive", "");
 
   mail_config->instances = evas_list_append (mail_config->instances, inst);
-  for (l = mail_config->items; l; l = l->next)
+  for (l = ci->boxes; l; l = l->next)
     {
-      Config_Item *ci;
+       Config_Box *cb;
 
-      ci = l->data;
-      for (j = ci->boxes; j; j = j->next)
-       {
-         Config_Box *cb;
-
-         cb = j->data;
-         switch (cb->type)
-           {
-           case MAIL_TYPE_IMAP:
-             have_imap = 1;
-             _mail_imap_add_mailbox (cb);
-             if (!inst->check_timer)
-               inst->check_timer =
+       cb = l->data;
+       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 =
+                       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);
-             break;
-           case MAIL_TYPE_MDIR:
-             _mail_mdir_add_mailbox (inst, cb);
-             break;
-           case MAIL_TYPE_MBOX:
-             have_mbox = 1;
-             _mail_mbox_add_mailbox (inst, cb);
-             if (!inst->check_timer)
-               inst->check_timer =
+                       inst);
+            break;
+         case MAIL_TYPE_MDIR:
+            _mail_mdir_add_mailbox (inst, cb);
+            break;
+         case MAIL_TYPE_MBOX:
+            have_mbox = 1;
+            _mail_mbox_add_mailbox (inst, cb);
+            if (!inst->check_timer)
+              inst->check_timer =
                  ecore_timer_add ((ci->check_time * 60.0), _mail_cb_check,
-                                  inst);
-             break;
-           }
-       }
-      if (have_pop)
-       _mail_pop_check_mail (inst);
-      if (have_imap)
-       _mail_imap_check_mail (inst);
-      if (have_mbox)
-       _mail_mbox_check_mail (inst);
+                       inst);
+            break;
+        }
     }
+  if (have_pop)
+    _mail_pop_check_mail (inst);
+  if (have_imap)
+    _mail_imap_check_mail (inst);
+  if (have_mbox)
+    _mail_mbox_check_mail (inst);
   return gcc;
 }
 



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to