aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-12-12 07:29:55 +0800
committerDan Winship <danw@src.gnome.org>2000-12-12 07:29:55 +0800
commit8997c57f5c1451e366a374a6e0bb74aa2f37e832 (patch)
tree76c388dfa1977ad9f7bb0d6217774e0485a228e9 /mail
parent045479b2a4f78e688036dc4fdab64226743a7d3f (diff)
downloadgsoc2013-evolution-8997c57f5c1451e366a374a6e0bb74aa2f37e832.tar
gsoc2013-evolution-8997c57f5c1451e366a374a6e0bb74aa2f37e832.tar.gz
gsoc2013-evolution-8997c57f5c1451e366a374a6e0bb74aa2f37e832.tar.bz2
gsoc2013-evolution-8997c57f5c1451e366a374a6e0bb74aa2f37e832.tar.lz
gsoc2013-evolution-8997c57f5c1451e366a374a6e0bb74aa2f37e832.tar.xz
gsoc2013-evolution-8997c57f5c1451e366a374a6e0bb74aa2f37e832.tar.zst
gsoc2013-evolution-8997c57f5c1451e366a374a6e0bb74aa2f37e832.zip
New function to tell the code that it's ok (or not) to interact with the
* session.c (mail_session_enable_interaction): New function to tell the code that it's ok (or not) to interact with the user when trying to authenticate to a service. Starts out turned off. (mail_session_request_dialog): If interaction is disabled, fail if the password isn't in the cache. * component-factory.c (owner_set_cb): Call mail_session_enable_interaction() after everything else. (This means that the IMAP password dialog will no longer pop up [under the splash screen] at startup.) svn path=/trunk/; revision=6924
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog13
-rw-r--r--mail/component-factory.c2
-rw-r--r--mail/mail-session.h1
-rw-r--r--mail/session.c13
4 files changed, 28 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 36c7b214e3..a2a3d09a88 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,18 @@
2000-12-11 Dan Winship <danw@helixcode.com>
+ * session.c (mail_session_enable_interaction): New function to
+ tell the code that it's ok (or not) to interact with the user when
+ trying to authenticate to a service. Starts out turned off.
+ (mail_session_request_dialog): If interaction is disabled, fail if
+ the password isn't in the cache.
+
+ * component-factory.c (owner_set_cb): Call
+ mail_session_enable_interaction() after everything else. (This
+ means that the IMAP password dialog will no longer pop up [under
+ the splash screen] at startup.)
+
+2000-12-11 Dan Winship <danw@helixcode.com>
+
* component-factory.c (create_view): Deal with "mailstorage" type
views (top-level mail storages) by trying to fill the storage's
folder tree again if we failed before.
diff --git a/mail/component-factory.c b/mail/component-factory.c
index e0774b5abd..7cf16745bb 100644
--- a/mail/component-factory.c
+++ b/mail/component-factory.c
@@ -151,6 +151,8 @@ owner_set_cb (EvolutionShellComponent *shell_component,
mail_do_setup_folder ("Sent", &sent_folder);
/* Don't proceed until those _folder variables are valid. */
mail_operation_wait_for_finish ();
+
+ mail_session_enable_interaction (TRUE);
}
static void
diff --git a/mail/mail-session.h b/mail/mail-session.h
index 3df9516156..18d54c8573 100644
--- a/mail/mail-session.h
+++ b/mail/mail-session.h
@@ -33,6 +33,7 @@ extern "C" {
#endif /* __cplusplus }*/
void mail_session_init (void);
+void mail_session_enable_interaction (gboolean enable);
char *mail_session_request_dialog (const char *prompt, gboolean secret,
const char *key, gboolean async);
void mail_session_forget_passwords (BonoboUIComponent *uih, void *user_data,
diff --git a/mail/session.c b/mail/session.c
index aa98c20908..185b72f9e8 100644
--- a/mail/session.c
+++ b/mail/session.c
@@ -13,7 +13,9 @@
#include "mail-threads.h"
CamelSession *session;
-GHashTable *passwords;
+
+static GHashTable *passwords;
+static gboolean interaction_enabled;
static void
request_callback (gchar *string, gpointer data)
@@ -41,6 +43,9 @@ mail_session_request_dialog (const char *prompt, gboolean secret, const char *ke
if (ans)
return g_strdup (ans);
+ if (!interaction_enabled)
+ return NULL;
+
if (!async) {
dialog = gnome_request_dialog (secret, prompt, NULL, 0,
request_callback, &ans, NULL);
@@ -260,6 +265,12 @@ mail_session_init (void)
}
}
+void
+mail_session_enable_interaction (gboolean enable)
+{
+ interaction_enabled = enable;
+}
+
static gboolean
free_entry (gpointer key, gpointer value, gpointer user_data)
{