aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-session.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-08-06 05:20:59 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-08-06 05:20:59 +0800
commitce3ae8856492d9654f08a0db8b949e2e9a9e1a6f (patch)
treef6982ed4be0258d3fb0a06b37f4c34223a29204f /mail/mail-session.c
parent01fb066a57ffdddeeae9b333f5bcbdcd169f5c75 (diff)
downloadgsoc2013-evolution-ce3ae8856492d9654f08a0db8b949e2e9a9e1a6f.tar.gz
gsoc2013-evolution-ce3ae8856492d9654f08a0db8b949e2e9a9e1a6f.tar.zst
gsoc2013-evolution-ce3ae8856492d9654f08a0db8b949e2e9a9e1a6f.zip
If we are not in interactive mode, don't display error dialogs.
2002-08-05 Jeffrey Stedfast <fejj@ximian.com> * mail-mt.c (mail_msg_check_error): If we are not in interactive mode, don't display error dialogs. * component-factory.c (interactive_cb): Updated to use the new function mail_session_set_interactive(). (owner_unset_cb): Same here. * mail-session.c (mail_session_set_interactive): Renamed from mail_session_enable_interaction(). (mail_session_get_interactive): New function to get the interactive state. svn path=/trunk/; revision=17702
Diffstat (limited to 'mail/mail-session.c')
-rw-r--r--mail/mail-session.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/mail/mail-session.c b/mail/mail-session.c
index eebfa04a12..15221eba34 100644
--- a/mail/mail-session.c
+++ b/mail/mail-session.c
@@ -62,7 +62,7 @@ CamelSession *session;
typedef struct _MailSession {
CamelSession parent_object;
- gboolean interaction_enabled;
+ gboolean interactive;
FILE *filter_logfile;
EMutex *lock;
@@ -361,7 +361,7 @@ do_get_pass(struct _mail_msg *mm)
} else if (m->key) {
m->result = e_passwords_get_password(m->key);
if (m->result == NULL) {
- if (mail_session->interaction_enabled) {
+ if (mail_session->interactive) {
request_password(m);
return;
}
@@ -560,7 +560,7 @@ alert_user(CamelSession *session, CamelSessionAlertType type, const char *prompt
EMsgPort *user_message_reply;
gboolean ret;
- if (!mail_session->interaction_enabled)
+ if (!mail_session->interactive)
return FALSE;
user_message_reply = e_msgport_new ();
@@ -999,12 +999,18 @@ mail_session_init (void)
g_free (camel_dir);
}
-void
-mail_session_enable_interaction (gboolean enable)
+gboolean
+mail_session_get_interactive (void)
{
- MAIL_SESSION (session)->interaction_enabled = enable;
+ return MAIL_SESSION (session)->interactive;
+}
- if (!enable) {
+void
+mail_session_set_interactive (gboolean interactive)
+{
+ MAIL_SESSION (session)->interactive = interactive;
+
+ if (!interactive) {
struct _pass_msg *pm;
struct _user_message_msg *um;