aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-session.c
diff options
context:
space:
mode:
author5 <NotZed@Ximian.com>2001-10-16 02:55:18 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-10-16 02:55:18 +0800
commit3ac3a15e3ccad3b7eb27f9f1db172effa951b554 (patch)
tree27667c3db149010cfebc224fa9436b8fe1c5c17a /mail/mail-session.c
parenta58f0363043a173d3c6fa2afad13e43cad563d60 (diff)
downloadgsoc2013-evolution-3ac3a15e3ccad3b7eb27f9f1db172effa951b554.tar.gz
gsoc2013-evolution-3ac3a15e3ccad3b7eb27f9f1db172effa951b554.tar.zst
gsoc2013-evolution-3ac3a15e3ccad3b7eb27f9f1db172effa951b554.zip
Proxy get-password call to main thread. (forget_password): same for
2001-10-15 <NotZed@Ximian.com> * mail-session.c (get_password): Proxy get-password call to main thread. (forget_password): same for forget_password. (get_filter_driver): and same for get_filter_driver, since it uses gtk objects. * mail-mt.c (mail_call_main): new generic interface for calling stuff/proxying in the gui thread. svn path=/trunk/; revision=13679
Diffstat (limited to 'mail/mail-session.c')
-rw-r--r--mail/mail-session.c31
1 files changed, 26 insertions, 5 deletions
diff --git a/mail/mail-session.c b/mail/mail-session.c
index 643f60fc42..bf8d5560c3 100644
--- a/mail/mail-session.c
+++ b/mail/mail-session.c
@@ -131,8 +131,8 @@ make_key (CamelService *service, const char *item)
}
static char *
-get_password (CamelSession *session, const char *prompt, gboolean secret,
- CamelService *service, const char *item, CamelException *ex)
+main_get_password (CamelSession *session, const char *prompt, gboolean secret,
+ CamelService *service, const char *item, CamelException *ex)
{
MailSession *mail_session = MAIL_SESSION (session);
gboolean cache = TRUE;
@@ -173,9 +173,16 @@ get_password (CamelSession *session, const char *prompt, gboolean secret,
return ans;
}
+static char *
+get_password (CamelSession *session, const char *prompt, gboolean secret,
+ CamelService *service, const char *item, CamelException *ex)
+{
+ return (char *)mail_call_main(MAIL_CALL_p_ppippp, (MailMainFunc)main_get_password,
+ session, prompt, secret, service, item, ex);
+}
+
static void
-forget_password (CamelSession *session, CamelService *service,
- const char *item, CamelException *ex)
+main_forget_password (CamelSession *session, CamelService *service, const char *item, CamelException *ex)
{
char *key = make_key (service, item);
@@ -184,6 +191,13 @@ forget_password (CamelSession *session, CamelService *service,
g_free (key);
}
+static void
+forget_password (CamelSession *session, CamelService *service, const char *item, CamelException *ex)
+{
+ mail_call_main(MAIL_CALL_p_pppp, (MailMainFunc)main_forget_password,
+ session, service, item, ex);
+}
+
static gboolean
alert_user (CamelSession *session, CamelSessionAlertType type,
const char *prompt, gboolean cancel)
@@ -317,7 +331,7 @@ get_folder (CamelFilterDriver *d, const char *uri, void *data, CamelException *e
}
static CamelFilterDriver *
-get_filter_driver (CamelSession *session, const char *type, CamelException *ex)
+main_get_filter_driver (CamelSession *session, const char *type, CamelException *ex)
{
CamelFilterDriver *driver;
RuleContext *fc;
@@ -369,6 +383,13 @@ get_filter_driver (CamelSession *session, const char *type, CamelException *ex)
return driver;
}
+static CamelFilterDriver *
+get_filter_driver (CamelSession *session, const char *type, CamelException *ex)
+{
+ return (CamelFilterDriver *)mail_call_main(MAIL_CALL_p_ppp, (MailMainFunc)main_get_filter_driver,
+ session, type, ex);
+}
+
char *
mail_session_get_password (const char *url_string)
{