Add a local option for imap to make ecore_con able to use local imap

servers, not just remote.


SVN revision: 25855
master
Christopher Michael 16 years ago
parent 1ec5a40b4a
commit 7fe4e842b2
  1. 15
      e_mod_config_box.c
  2. 1
      e_mod_main.c
  3. 1
      e_mod_main.h
  4. 13
      imap.c

@ -8,6 +8,7 @@ struct _E_Config_Dialog_Data
int use_exec;
char *port;
int ssl;
int local;
char *host;
char *user;
char *pass;
@ -70,6 +71,7 @@ _fill_data (Config_Box * cb, E_Config_Dialog_Data * cfdata)
cfdata->type = 0;
cfdata->ssl = 0;
cfdata->use_exec = 0;
cfdata->local = 0;
snprintf (buf, sizeof (buf), "110");
cfdata->port = strdup (buf);
return;
@ -81,7 +83,8 @@ _fill_data (Config_Box * cb, E_Config_Dialog_Data * cfdata)
cfdata->type = cb->type;
cfdata->ssl = cb->ssl;
cfdata->use_exec = cb->use_exec;
cfdata->local = cb->local;
snprintf (buf, sizeof (buf), "%d", cb->port);
cfdata->port = strdup (buf);
@ -183,8 +186,13 @@ _basic_create_widgets (E_Config_Dialog * cfd, Evas * evas,
ob = e_widget_entry_add (evas, &cfdata->port);
cfdata->port_entry = ob;
e_widget_frametable_object_append (of, ob, 1, 1, 1, 1, 0, 0, 1, 0);
e_widget_list_object_append (o, of, 1, 1, 0.5);
ob = e_widget_label_add (evas, D_("Local:"));
e_widget_frametable_object_append (of, ob, 0, 2, 1, 1, 0, 0, 1, 0);
ob = e_widget_check_add (evas, "", &(cfdata->local));
e_widget_frametable_object_append (of, ob, 1, 2, 1, 1, 0, 0, 1, 0);
e_widget_list_object_append (o, of, 1, 1, 0.5);
of = e_widget_frametable_add (evas, D_("Mailbox Settings"), 1);
ob = e_widget_label_add (evas, D_("Name:"));
e_widget_frametable_object_append (of, ob, 0, 0, 1, 1, 0, 0, 1, 0);
@ -250,6 +258,7 @@ _basic_apply_data (E_Config_Dialog * cfd, E_Config_Dialog_Data * cfdata)
cb->type = 0;
cb->port = 110;
cb->ssl = 0;
cb->local = 0;
is_new = 1;
}
@ -263,6 +272,8 @@ _basic_apply_data (E_Config_Dialog * cfd, E_Config_Dialog_Data * cfdata)
cb->type = cfdata->type;
cb->port = atoi (cfdata->port);
cb->ssl = cfdata->ssl;
cb->local = cfdata->local;
cb->use_exec = cfdata->use_exec;
if (cb->exec)
evas_stringshare_del (cb->exec);

@ -357,6 +357,7 @@ e_modapi_init (E_Module * m)
E_CONFIG_VAL (D, T, type, INT);
E_CONFIG_VAL (D, T, port, INT);
E_CONFIG_VAL (D, T, ssl, UCHAR);
E_CONFIG_VAL (D, T, local, UCHAR);
E_CONFIG_VAL (D, T, host, STR);
E_CONFIG_VAL (D, T, user, STR);
E_CONFIG_VAL (D, T, pass, STR);

@ -58,6 +58,7 @@ struct _Config_Box
int type;
int port;
unsigned char local;
unsigned char ssl;
const char *host;
const char *user;

@ -14,9 +14,9 @@ static Evas_List *iservers;
void
_mail_imap_check_mail (void *data)
{
Ecore_Con_Type type = ECORE_CON_REMOTE_SYSTEM;
Evas_List *l, *j;
ImapClient *ic;
Ecore_Con_Type type;
Evas_List *l, *j;
ImapClient *ic;
for (l = iservers; l; l = l->next)
{
@ -44,7 +44,12 @@ _mail_imap_check_mail (void *data)
ic = j->data;
if (!ic->server->server)
{
if (ecore_con_ssl_available_get () && (ic->config->ssl))
if (ic->config->local)
type = ECORE_CON_LOCAL_SYSTEM;
else
type = ECORE_CON_REMOTE_SYSTEM;
if (ecore_con_ssl_available_get () && (ic->config->ssl))
type |= ECORE_CON_USE_SSL;
ic->server->state = IMAP_STATE_DISCONNECTED;
ic->server->server =

Loading…
Cancel
Save