Add a local option for imap to make ecore_con able to use local imap
servers, not just remote. SVN revision: 25855
This commit is contained in:
parent
1ec5a40b4a
commit
7fe4e842b2
|
@ -8,6 +8,7 @@ struct _E_Config_Dialog_Data
|
||||||
int use_exec;
|
int use_exec;
|
||||||
char *port;
|
char *port;
|
||||||
int ssl;
|
int ssl;
|
||||||
|
int local;
|
||||||
char *host;
|
char *host;
|
||||||
char *user;
|
char *user;
|
||||||
char *pass;
|
char *pass;
|
||||||
|
@ -70,6 +71,7 @@ _fill_data (Config_Box * cb, E_Config_Dialog_Data * cfdata)
|
||||||
cfdata->type = 0;
|
cfdata->type = 0;
|
||||||
cfdata->ssl = 0;
|
cfdata->ssl = 0;
|
||||||
cfdata->use_exec = 0;
|
cfdata->use_exec = 0;
|
||||||
|
cfdata->local = 0;
|
||||||
snprintf (buf, sizeof (buf), "110");
|
snprintf (buf, sizeof (buf), "110");
|
||||||
cfdata->port = strdup (buf);
|
cfdata->port = strdup (buf);
|
||||||
return;
|
return;
|
||||||
|
@ -81,6 +83,7 @@ _fill_data (Config_Box * cb, E_Config_Dialog_Data * cfdata)
|
||||||
cfdata->type = cb->type;
|
cfdata->type = cb->type;
|
||||||
cfdata->ssl = cb->ssl;
|
cfdata->ssl = cb->ssl;
|
||||||
cfdata->use_exec = cb->use_exec;
|
cfdata->use_exec = cb->use_exec;
|
||||||
|
cfdata->local = cb->local;
|
||||||
|
|
||||||
snprintf (buf, sizeof (buf), "%d", cb->port);
|
snprintf (buf, sizeof (buf), "%d", cb->port);
|
||||||
cfdata->port = strdup (buf);
|
cfdata->port = strdup (buf);
|
||||||
|
@ -183,6 +186,11 @@ _basic_create_widgets (E_Config_Dialog * cfd, Evas * evas,
|
||||||
ob = e_widget_entry_add (evas, &cfdata->port);
|
ob = e_widget_entry_add (evas, &cfdata->port);
|
||||||
cfdata->port_entry = ob;
|
cfdata->port_entry = ob;
|
||||||
e_widget_frametable_object_append (of, ob, 1, 1, 1, 1, 0, 0, 1, 0);
|
e_widget_frametable_object_append (of, ob, 1, 1, 1, 1, 0, 0, 1, 0);
|
||||||
|
|
||||||
|
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);
|
e_widget_list_object_append (o, of, 1, 1, 0.5);
|
||||||
|
|
||||||
of = e_widget_frametable_add (evas, D_("Mailbox Settings"), 1);
|
of = e_widget_frametable_add (evas, D_("Mailbox Settings"), 1);
|
||||||
|
@ -250,6 +258,7 @@ _basic_apply_data (E_Config_Dialog * cfd, E_Config_Dialog_Data * cfdata)
|
||||||
cb->type = 0;
|
cb->type = 0;
|
||||||
cb->port = 110;
|
cb->port = 110;
|
||||||
cb->ssl = 0;
|
cb->ssl = 0;
|
||||||
|
cb->local = 0;
|
||||||
is_new = 1;
|
is_new = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -263,6 +272,8 @@ _basic_apply_data (E_Config_Dialog * cfd, E_Config_Dialog_Data * cfdata)
|
||||||
cb->type = cfdata->type;
|
cb->type = cfdata->type;
|
||||||
cb->port = atoi (cfdata->port);
|
cb->port = atoi (cfdata->port);
|
||||||
cb->ssl = cfdata->ssl;
|
cb->ssl = cfdata->ssl;
|
||||||
|
cb->local = cfdata->local;
|
||||||
|
|
||||||
cb->use_exec = cfdata->use_exec;
|
cb->use_exec = cfdata->use_exec;
|
||||||
if (cb->exec)
|
if (cb->exec)
|
||||||
evas_stringshare_del (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, type, INT);
|
||||||
E_CONFIG_VAL (D, T, port, INT);
|
E_CONFIG_VAL (D, T, port, INT);
|
||||||
E_CONFIG_VAL (D, T, ssl, UCHAR);
|
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, host, STR);
|
||||||
E_CONFIG_VAL (D, T, user, STR);
|
E_CONFIG_VAL (D, T, user, STR);
|
||||||
E_CONFIG_VAL (D, T, pass, STR);
|
E_CONFIG_VAL (D, T, pass, STR);
|
||||||
|
|
|
@ -58,6 +58,7 @@ struct _Config_Box
|
||||||
|
|
||||||
int type;
|
int type;
|
||||||
int port;
|
int port;
|
||||||
|
unsigned char local;
|
||||||
unsigned char ssl;
|
unsigned char ssl;
|
||||||
const char *host;
|
const char *host;
|
||||||
const char *user;
|
const char *user;
|
||||||
|
|
7
imap.c
7
imap.c
|
@ -14,7 +14,7 @@ static Evas_List *iservers;
|
||||||
void
|
void
|
||||||
_mail_imap_check_mail (void *data)
|
_mail_imap_check_mail (void *data)
|
||||||
{
|
{
|
||||||
Ecore_Con_Type type = ECORE_CON_REMOTE_SYSTEM;
|
Ecore_Con_Type type;
|
||||||
Evas_List *l, *j;
|
Evas_List *l, *j;
|
||||||
ImapClient *ic;
|
ImapClient *ic;
|
||||||
|
|
||||||
|
@ -44,6 +44,11 @@ _mail_imap_check_mail (void *data)
|
||||||
ic = j->data;
|
ic = j->data;
|
||||||
if (!ic->server->server)
|
if (!ic->server->server)
|
||||||
{
|
{
|
||||||
|
if (ic->config->local)
|
||||||
|
type = ECORE_CON_LOCAL_SYSTEM;
|
||||||
|
else
|
||||||
|
type = ECORE_CON_REMOTE_SYSTEM;
|
||||||
|
|
||||||
if (ecore_con_ssl_available_get () && (ic->config->ssl))
|
if (ecore_con_ssl_available_get () && (ic->config->ssl))
|
||||||
type |= ECORE_CON_USE_SSL;
|
type |= ECORE_CON_USE_SSL;
|
||||||
ic->server->state = IMAP_STATE_DISCONNECTED;
|
ic->server->state = IMAP_STATE_DISCONNECTED;
|
||||||
|
|
Loading…
Reference in New Issue