aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-session.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-05-21 17:10:00 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-05-21 17:10:00 +0800
commitffa75e6801faaffb2626d83779fe0a91a8f58d3a (patch)
treede74dcb1ab7ea1e4dc93d9421215bb02a2c05f99 /mail/mail-session.c
parent2bc97c08c1ca8057f03b3b3d872eafa306bab22c (diff)
downloadgsoc2013-evolution-ffa75e6801faaffb2626d83779fe0a91a8f58d3a.tar.gz
gsoc2013-evolution-ffa75e6801faaffb2626d83779fe0a91a8f58d3a.tar.zst
gsoc2013-evolution-ffa75e6801faaffb2626d83779fe0a91a8f58d3a.zip
add marshaller for p_ppppp call.
2004-05-21 Not Zed <NotZed@Ximian.com> * mail-mt.c (do_call): add marshaller for p_ppppp call. * mail-session.c (get_password): fix for camel api changes. (forget_password): same. ** See #58376. * message-list.c (mail_regen_list): do some timeout foo so we don't keep doing list regnerations if we're getting called too often. God knows what this will break. (message_list_set_selected): removede bug printf. (regen_list_free): move the message-list poking stuff into regen_list_regened. (message_list_set_folder): call mail_regen_cancel to cancel any regen stuff. (mail_regen_cancel): cancel/clear outstanding regenerations. (message_list_destroy): do it here too. (message_list_select_uid): also set the pending select uid if we have a timeout pending. * mail-component.c (impl_createControls): set the defualt parent to the main folderview as soon as its created. * em-folder-tree.c (emft_popup_copy_folder_selected): use get_toplevel rather than get_ancestor. seems the more reliable one. also we're always parented so we shoudl always find a toplevel window. (em_folder_tree_create_folder): same. (emft_popup_delete_response): set error parent. (emft_popup_delete_folder, emft_popup_rename_folder) (emft_popup_rename_folder, emft_popup_rename_folder): svn path=/trunk/; revision=26030
Diffstat (limited to 'mail/mail-session.c')
-rw-r--r--mail/mail-session.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/mail/mail-session.c b/mail/mail-session.c
index 9b16b99b82..d4c63fdd30 100644
--- a/mail/mail-session.c
+++ b/mail/mail-session.c
@@ -86,8 +86,8 @@ typedef struct _MailSessionClass {
static CamelSessionClass *ms_parent_class;
-static char *get_password(CamelSession *session, const char *prompt, guint32 flags, CamelService *service, const char *item, CamelException *ex);
-static void forget_password(CamelSession *session, CamelService *service, const char *item, CamelException *ex);
+static char *get_password(CamelSession *session, CamelService *service, const char *domain, const char *prompt, const char *item, guint32 flags, CamelException *ex);
+static void forget_password(CamelSession *session, CamelService *service, const char *domain, const char *item, CamelException *ex);
static gboolean alert_user(CamelSession *session, CamelSessionAlertType type, const char *prompt, gboolean cancel);
static CamelFilterDriver *get_filter_driver(CamelSession *session, const char *type, CamelException *ex);
@@ -172,15 +172,16 @@ struct _pass_msg {
struct _mail_msg msg;
CamelSession *session;
- const char *prompt;
- guint32 flags;
CamelService *service;
+ const char *domain;
+ const char *prompt;
const char *item;
+ guint32 flags;
CamelException *ex;
char *service_url;
char *key;
-
+
EAccountService *config_service;
GtkWidget *check;
GtkWidget *entry;
@@ -323,7 +324,7 @@ do_get_pass(struct _mail_msg *mm)
if (account)
m->result = g_strdup(account->source->url);
} else if (m->key) {
- m->result = e_passwords_get_password ("Mail", m->key);
+ m->result = e_passwords_get_password (m->domain?m->domain:"Mail", m->key);
if (m->result == NULL || (m->flags & CAMEL_SESSION_PASSWORD_REPROMPT)) {
if (mail_session->interactive) {
request_password(m);
@@ -352,8 +353,8 @@ static struct _mail_msg_op get_pass_op = {
};
static char *
-get_password (CamelSession *session, const char *prompt, guint32 flags,
- CamelService *service, const char *item, CamelException *ex)
+get_password (CamelSession *session, CamelService *service, const char *domain,
+ const char *prompt, const char *item, guint32 flags, CamelException *ex)
{
struct _pass_msg *m, *r;
EMsgPort *pass_reply;
@@ -369,6 +370,7 @@ get_password (CamelSession *session, const char *prompt, guint32 flags,
m->prompt = prompt;
m->flags = flags;
m->service = service;
+ m->domain = domain;
m->item = item;
m->ex = ex;
if (service)
@@ -395,20 +397,20 @@ get_password (CamelSession *session, const char *prompt, guint32 flags,
}
static void
-main_forget_password (CamelSession *session, CamelService *service, const char *item, CamelException *ex)
+main_forget_password (CamelSession *session, CamelService *service, const char *domain, const char *item, CamelException *ex)
{
char *key = make_key (service, item);
- e_passwords_forget_password ("Mail", key);
+ e_passwords_forget_password (domain?domain:"Mail", key);
g_free (key);
}
static void
-forget_password (CamelSession *session, CamelService *service, const char *item, CamelException *ex)
+forget_password (CamelSession *session, CamelService *service, const char *domain, const char *item, CamelException *ex)
{
- mail_call_main(MAIL_CALL_p_pppp, (MailMainFunc)main_forget_password,
- session, service, item, ex);
+ mail_call_main(MAIL_CALL_p_ppppp, (MailMainFunc)main_forget_password,
+ session, service, domain, item, ex);
}
/* ********************************************************************** */