Remove Evas list from all E-MODULES.

SVN revision: 36977
master
Cedric BAIL 14 years ago
parent 7f2423922f
commit 950288fff8
  1. 10
      e_mod_config.c
  2. 2
      e_mod_config_box.c
  3. 36
      e_mod_main.c
  4. 6
      e_mod_main.h
  5. 18
      imap.c
  6. 4
      imap.h
  7. 14
      imap2.c
  8. 14
      mbox.c
  9. 10
      mdir.c
  10. 16
      pop.c

@ -8,7 +8,7 @@ struct _E_Config_Dialog_Data
double check_time;
int show_popup;
int show_popup_empty;
Evas_List *boxes;
Eina_List *boxes;
/* Evas Object References */
Evas_Object *il;
@ -177,7 +177,7 @@ _load_boxes (E_Config_Dialog * cfd)
return;
if (!ci->boxes)
return;
if (evas_list_count (ci->boxes) <= 0)
if (eina_list_count (ci->boxes) <= 0)
return;
snprintf (buf, sizeof (buf), "%s/module.edj",
@ -187,7 +187,7 @@ _load_boxes (E_Config_Dialog * cfd)
for (i = 0; i <= 3; i++)
{
Evas_List *box;
Eina_List *box;
int found = -1;
char *name;
@ -295,7 +295,7 @@ _cb_edit_box (void *data, void *data2)
E_Config_Dialog *cfd;
E_Config_Dialog_Data *cfdata;
Evas_Object *il;
Evas_List *l;
Eina_List *l;
Config_Item *ci;
const char *s;
@ -332,7 +332,7 @@ _cb_del_box (void *data, void *data2)
E_Config_Dialog *cfd;
E_Config_Dialog_Data *cfdata;
Evas_Object *il;
Evas_List *l;
Eina_List *l;
Config_Item *ci;
const char *s;

@ -379,7 +379,7 @@ _basic_apply_data (E_Config_Dialog * cfd, E_Config_Dialog_Data * cfdata)
if (is_new)
{
/* cfd->data = cb; */
mail_ci->boxes = evas_list_append (mail_ci->boxes, cb);
mail_ci->boxes = eina_list_append (mail_ci->boxes, cb);
e_config_save_queue ();
_mail_box_added (mail_ci, cb->name);
}

@ -79,7 +79,7 @@ _gc_init (E_Gadcon * gc, const char *name, const char *id, const char *style)
E_Gadcon_Client *gcc;
Instance *inst;
Mail *mail;
Evas_List *l;
Eina_List *l;
int have_pop = 0, have_imap = 0, have_mbox = 0;
inst = E_NEW (Instance, 1);
@ -106,7 +106,7 @@ _gc_init (E_Gadcon * gc, const char *name, const char *id, const char *style)
else
edje_object_signal_emit (inst->mail_obj, "label_passive", "");
mail_config->instances = evas_list_append (mail_config->instances, inst);
mail_config->instances = eina_list_append (mail_config->instances, inst);
for (l = inst->ci->boxes; l; l = l->next)
{
Config_Box *cb;
@ -170,7 +170,7 @@ _gc_shutdown (E_Gadcon_Client * gcc)
_mail_cb_mouse_out);
if (inst->popup) e_object_del (E_OBJECT (inst->popup));
mail_config->instances = evas_list_remove (mail_config->instances, inst);
mail_config->instances = eina_list_remove (mail_config->instances, inst);
_mail_free (inst->mail);
free (inst);
inst = NULL;
@ -217,7 +217,7 @@ _mail_cb_mouse_down (void *data, Evas * e, Evas_Object * obj,
{
Instance *inst = data;
Evas_Event_Mouse_Down *ev = event_info;
Evas_List *l;
Eina_List *l;
if (!inst)
return;
@ -232,7 +232,7 @@ _mail_cb_mouse_down (void *data, Evas * e, Evas_Object * obj,
e_menu_post_deactivate_callback_set (mn, _mail_menu_cb_post, inst);
mail_config->menu = mn;
if ((inst->ci->boxes) && (evas_list_count (inst->ci->boxes) > 0))
if ((inst->ci->boxes) && (eina_list_count (inst->ci->boxes) > 0))
{
E_Menu_Item *mm;
@ -289,7 +289,7 @@ _mail_cb_mouse_in (void *data, Evas * e, Evas_Object * obj, void *event_info)
{
Instance *inst = data;
Evas_Object *list;
Evas_List *l;
Eina_List *l;
char buf[256];
char path[PATH_MAX];
@ -366,7 +366,7 @@ _mail_menu_cb_configure (void *data, E_Menu * m, E_Menu_Item * mi)
static Config_Item *
_mail_config_item_get (const char *id)
{
Evas_List *l;
Eina_List *l;
Config_Item *ci;
char buf[128];
@ -378,7 +378,7 @@ _mail_config_item_get (const char *id)
if (mail_config->items)
{
const char *p;
ci = evas_list_last (mail_config->items)->data;
ci = eina_list_last (mail_config->items)->data;
p = strrchr (ci->id, '.');
if (p) num = atoi (p + 1) + 1;
}
@ -405,7 +405,7 @@ _mail_config_item_get (const char *id)
ci->show_popup_empty = 0;
ci->boxes = NULL;
mail_config->items = evas_list_append (mail_config->items, ci);
mail_config->items = eina_list_append (mail_config->items, ci);
return ci;
}
@ -476,7 +476,7 @@ e_modapi_init (E_Module * m)
ci->show_popup_empty = 0;
ci->boxes = NULL;
mail_config->items = evas_list_append (mail_config->items, ci);
mail_config->items = eina_list_append (mail_config->items, ci);
}
mail_config->module = m;
@ -540,14 +540,14 @@ e_modapi_shutdown (E_Module * m)
evas_stringshare_del (cb->cur_path);
if (cb->exec)
evas_stringshare_del (cb->exec);
ci->boxes = evas_list_remove_list (ci->boxes, ci->boxes);
ci->boxes = eina_list_remove_list (ci->boxes, ci->boxes);
free (cb);
cb = NULL;
}
if (ci->id)
evas_stringshare_del (ci->id);
mail_config->items =
evas_list_remove_list (mail_config->items, mail_config->items);
eina_list_remove_list (mail_config->items, mail_config->items);
free (ci);
ci = NULL;
}
@ -601,7 +601,7 @@ static int
_mail_cb_check (void *data)
{
Instance *inst = data;
Evas_List *l;
Eina_List *l;
int have_imap = 0, have_pop = 0, have_mbox = 0;
if (!inst)
@ -646,7 +646,7 @@ void
_mail_set_text (void *data)
{
Instance *inst = data;
Evas_List *l;
Eina_List *l;
char buf[1024];
int count = 0;
@ -706,7 +706,7 @@ _mail_cb_exe_exit (void *data, int type, void *event)
void
_mail_box_added (Config_Item *ci, const char *box_name)
{
Evas_List *l, *b;
Eina_List *l, *b;
for (l = mail_config->instances; l; l = l->next)
{
@ -745,7 +745,7 @@ _mail_box_added (Config_Item *ci, const char *box_name)
void
_mail_box_deleted (Config_Item *ci, const char *box_name)
{
Evas_List *d, *i;
Eina_List *d, *i;
Config_Box *cb;
for (i = mail_config->instances; i; i = i->next)
@ -784,7 +784,7 @@ _mail_box_deleted (Config_Item *ci, const char *box_name)
_mail_mbox_del_mailbox (cb);
break;
}
ci->boxes = evas_list_remove (ci->boxes, cb);
ci->boxes = eina_list_remove (ci->boxes, cb);
e_config_save_queue ();
break;
}
@ -794,7 +794,7 @@ _mail_box_deleted (Config_Item *ci, const char *box_name)
void
_mail_config_updated (Config_Item *ci)
{
Evas_List *l;
Eina_List *l;
if (!mail_config)
return;

@ -44,8 +44,8 @@ struct _Config
E_Module *module;
E_Config_Dialog *config_dialog;
E_Menu *menu;
Evas_List *instances;
Evas_List *items;
Eina_List *instances;
Eina_List *items;
};
struct _Config_Item
@ -58,7 +58,7 @@ struct _Config_Item
unsigned char show_popup;
unsigned char show_popup_empty;
Evas_List *boxes;
Eina_List *boxes;
};
struct _Config_Box

@ -13,13 +13,13 @@ static int _mail_imap_server_del (void *data, int type, void *event);
static int _mail_imap_server_data (void *data, int type, void *event);
static void _mail_imap_server_logout (ImapServer * is);
static Evas_List *iservers = NULL;
static Eina_List *iservers = NULL;
void
_mail_imap_check_mail (void *data)
{
Ecore_Con_Type type;
Evas_List *l;
Eina_List *l;
for (l = iservers; l; l = l->next)
{
@ -81,7 +81,7 @@ _mail_imap_del_mailbox (void *data)
if (!cb)
return;
ic = _mail_imap_client_get (cb);
ic->server->clients = evas_list_remove (ic->server->clients, ic);
ic->server->clients = eina_list_remove (ic->server->clients, ic);
}
void
@ -100,7 +100,7 @@ _mail_imap_shutdown ()
ecore_event_handler_del (is->del_handler);
if (is->data_handler)
ecore_event_handler_del (is->data_handler);
iservers = evas_list_remove_list (iservers, iservers);
iservers = eina_list_remove_list (iservers, iservers);
E_FREE(is);
}
}
@ -109,7 +109,7 @@ _mail_imap_shutdown ()
static ImapServer *
_mail_imap_server_find (Ecore_Con_Server * server)
{
Evas_List *l;
Eina_List *l;
for (l = iservers; l; l = l->next)
{
@ -126,7 +126,7 @@ static ImapServer *
_mail_imap_server_get (Config_Box *cb)
{
ImapServer *is = NULL;
Evas_List *l = NULL;
Eina_List *l = NULL;
for (l = iservers; l; l = l->next)
{
@ -155,7 +155,7 @@ _mail_imap_server_get (Config_Box *cb)
is->server = NULL;
is->cmd = 0;
is->state = IMAP_STATE_DISCONNECTED;
iservers = evas_list_append (iservers, is);
iservers = eina_list_append (iservers, is);
}
return is;
}
@ -165,7 +165,7 @@ _mail_imap_client_get (Config_Box *cb)
{
ImapServer *is;
ImapClient *ic;
Evas_List *l;
Eina_List *l;
int found = 0;
if (!cb)
@ -191,7 +191,7 @@ _mail_imap_client_get (Config_Box *cb)
ic->server = is;
ic->config->num_new = 0;
ic->config->num_total = 0;
ic->server->clients = evas_list_append (ic->server->clients, ic);
ic->server->clients = eina_list_append (ic->server->clients, ic);
}
return ic;
}

@ -29,8 +29,8 @@ struct _ImapServer
const char *pass;
Ecore_Con_Server *server;
Evas_List *clients;
Evas_List *current;
Eina_List *clients;
Eina_List *current;
int cmd;
ImapState state;
void *data;

@ -30,7 +30,7 @@ static void _mail_imap_server_noop (ImapClient *ic);
static int elements (char *p);
static char *find_rn (char *data, unsigned int size);
static Evas_List *iclients = NULL;
static Eina_List *iclients = NULL;
static Ecore_Event_Handler *add_handler = NULL;
static Ecore_Event_Handler *del_handler = NULL;
@ -40,7 +40,7 @@ void
_mail_imap_check_mail (void *data)
{
Ecore_Con_Type type;
Evas_List *l;
Eina_List *l;
for (l = iclients; l; l = l->next)
{
@ -122,7 +122,7 @@ _mail_imap_del_mailbox (void *data)
ic = _mail_imap_client_get (cb);
if (!ic)
return;
iclients = evas_list_remove (iclients, ic);
iclients = eina_list_remove (iclients, ic);
_mail_imap_client_logout (ic);
E_FREE (ic);
@ -148,7 +148,7 @@ _mail_imap_shutdown ()
ImapClient *ic;
ic = iclients->data;
iclients = evas_list_remove_list (iclients, iclients);
iclients = eina_list_remove_list (iclients, iclients);
_mail_imap_client_logout (ic);
E_FREE (ic->prev.data);
E_FREE (ic);
@ -169,7 +169,7 @@ _mail_imap_shutdown ()
static ImapClient *
_mail_imap_client_find (Ecore_Con_Server *server)
{
Evas_List *l;
Eina_List *l;
for (l = iclients; l; l = l->next)
{
@ -186,7 +186,7 @@ static ImapClient *
_mail_imap_client_get (Config_Box *cb)
{
ImapClient *ic;
Evas_List *l;
Eina_List *l;
if (!cb)
return NULL;
@ -206,7 +206,7 @@ _mail_imap_client_get (Config_Box *cb)
ic->config->num_new = 0;
ic->config->num_total = 0;
iclients = evas_list_append (iclients, ic);
iclients = eina_list_append (iclients, ic);
return ic;
}

@ -2,7 +2,7 @@
#include "e_mod_main.h"
#include "mbox.h"
static Evas_List *mboxes;
static Eina_List *mboxes;
static void _mail_mbox_check_mail_parser (Config_Box *cb);
static void _mail_mbox_check_mail_monitor (void *data, Ecore_File_Monitor * monitor,
@ -28,13 +28,13 @@ _mail_mbox_add_mailbox (void *data, void *data2)
mb->monitor =
ecore_file_monitor_add (mb->config->new_path, _mail_mbox_check_mail_monitor, mb);
mboxes = evas_list_append (mboxes, mb);
mboxes = eina_list_append (mboxes, mb);
}
void
_mail_mbox_check_monitors ()
{
Evas_List *l;
Eina_List *l;
for (l = mboxes; l; l = l->next)
{
@ -66,7 +66,7 @@ void
_mail_mbox_del_mailbox (void *data)
{
Config_Box *cb;
Evas_List *l;
Eina_List *l;
cb = data;
if (!cb)
@ -82,7 +82,7 @@ _mail_mbox_del_mailbox (void *data)
continue;
if (mb->monitor)
ecore_file_monitor_del (mb->monitor);
mboxes = evas_list_remove (mboxes, mb);
mboxes = eina_list_remove (mboxes, mb);
free (mb);
mb = NULL;
break;
@ -101,7 +101,7 @@ _mail_mbox_shutdown ()
mb = mboxes->data;
if (mb->monitor)
ecore_file_monitor_del (mb->monitor);
mboxes = evas_list_remove_list (mboxes, mboxes);
mboxes = eina_list_remove_list (mboxes, mboxes);
free (mb);
mb = NULL;
}
@ -109,7 +109,7 @@ _mail_mbox_shutdown ()
void _mail_mbox_check_mail (void *data)
{
Evas_List *l;
Eina_List *l;
Instance *inst;
int num_new_prev;

@ -2,7 +2,7 @@
#include "e_mod_main.h"
#include "mdir.h"
static Evas_List *mdirs;
static Eina_List *mdirs;
static void _mail_mdir_check_mail (void *data, Ecore_File_Monitor * monitor,
Ecore_File_Event event, const char *path);
@ -26,14 +26,14 @@ _mail_mdir_add_mailbox (void *data, void *data2)
mc->monitor =
ecore_file_monitor_add (cb->new_path, _mail_mdir_check_mail, mc);
mdirs = evas_list_append (mdirs, mc);
mdirs = eina_list_append (mdirs, mc);
}
void
_mail_mdir_del_mailbox (void *data)
{
Config_Box *cb;
Evas_List *l;
Eina_List *l;
cb = data;
if (!cb)
@ -47,7 +47,7 @@ _mail_mdir_del_mailbox (void *data)
continue;
if (mc->config != cb)
continue;
mdirs = evas_list_remove (mdirs, mc);
mdirs = eina_list_remove (mdirs, mc);
free (mc);
mc = NULL;
break;
@ -66,7 +66,7 @@ _mail_mdir_shutdown ()
mc = mdirs->data;
if (mc->monitor)
ecore_file_monitor_del (mc->monitor);
mdirs = evas_list_remove_list (mdirs, mdirs);
mdirs = eina_list_remove_list (mdirs, mdirs);
free (mc);
mc = NULL;
}

16
pop.c

@ -9,13 +9,13 @@ static PopClient *_mail_pop_client_get (void *data);
static PopClient *_mail_pop_client_get_from_server (void *data);
static void _mail_pop_client_quit (void *data);
static Evas_List *pclients;
static Eina_List *pclients;
void
_mail_pop_check_mail (void *data)
{
Ecore_Con_Type type = ECORE_CON_REMOTE_SYSTEM;
Evas_List *l;
Eina_List *l;
Instance *inst;
inst = data;
@ -67,7 +67,7 @@ _mail_pop_add_mailbox (void *data)
pc = _mail_pop_client_get (cb);
pc->config->num_new = 0;
pc->config->num_total = 0;
pclients = evas_list_append (pclients, pc);
pclients = eina_list_append (pclients, pc);
}
void
@ -88,7 +88,7 @@ _mail_pop_del_mailbox (void *data)
ecore_event_handler_del (pc->del_handler);
if (pc->data_handler)
ecore_event_handler_del (pc->data_handler);
pclients = evas_list_remove (pclients, pc);
pclients = eina_list_remove (pclients, pc);
}
void
@ -112,7 +112,7 @@ _mail_pop_shutdown ()
ecore_event_handler_del (pc->del_handler);
if (pc->data_handler)
ecore_event_handler_del (pc->data_handler);
pclients = evas_list_remove_list (pclients, pclients);
pclients = eina_list_remove_list (pclients, pclients);
free (pc);
pc = NULL;
}
@ -220,7 +220,7 @@ static PopClient *
_mail_pop_client_get (void *data)
{
PopClient *pc;
Evas_List *l;
Eina_List *l;
Config_Box *cb;
int found = 0;
@ -228,7 +228,7 @@ _mail_pop_client_get (void *data)
if (!cb)
return NULL;
if ((!pclients) || (evas_list_count (pclients) <= 0))
if ((!pclients) || (eina_list_count (pclients) <= 0))
{
pc = E_NEW (PopClient, 1);
pc->server = NULL;
@ -289,7 +289,7 @@ static PopClient *
_mail_pop_client_get_from_server (void *data)
{
Ecore_Con_Server *server = data;
Evas_List *l;
Eina_List *l;
if (!pclients)
return NULL;

Loading…
Cancel
Save