aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-account-gui.c
diff options
context:
space:
mode:
authorPeter Williams <peterw@ximian.com>2001-08-14 05:23:04 +0800
committerPeter Williams <peterw@src.gnome.org>2001-08-14 05:23:04 +0800
commite86531cbd14a2ac303a5744ab5eb99c0c214dc50 (patch)
treede52fac44bfed276ed932178cf09e78996bc14e1 /mail/mail-account-gui.c
parenta5facd0e78bda439cd4e72f50817fe5f5dbb910c (diff)
downloadgsoc2013-evolution-e86531cbd14a2ac303a5744ab5eb99c0c214dc50.tar
gsoc2013-evolution-e86531cbd14a2ac303a5744ab5eb99c0c214dc50.tar.gz
gsoc2013-evolution-e86531cbd14a2ac303a5744ab5eb99c0c214dc50.tar.bz2
gsoc2013-evolution-e86531cbd14a2ac303a5744ab5eb99c0c214dc50.tar.lz
gsoc2013-evolution-e86531cbd14a2ac303a5744ab5eb99c0c214dc50.tar.xz
gsoc2013-evolution-e86531cbd14a2ac303a5744ab5eb99c0c214dc50.tar.zst
gsoc2013-evolution-e86531cbd14a2ac303a5744ab5eb99c0c214dc50.zip
Break most of the functionality into a separate function.
2001-08-13 Peter Williams <peterw@ximian.com> * mail-send-recv.c (mail_autoreceive_setup): Break most of the functionality into a separate function. (autoreceive_setup_list): Rename of mail_autoreceive_setup that is passed a list of accounts. (mail_autoreceive_setup_account): New function. Set up a single account using autoreceive_setup_account. * mail-send-receive.h: Prototype mail_autoreceive_setup_account. * mail-account-gui.c (mail_account_gui_save): Instead of setting up all accounts, set up only this source with the new mail_autoreceive_setup_account. * mail-config-druid.c (druid_finish): ... which means we can call mail_config_add_account() after the MailConfigAccount has been created by mail_account_gui_save() because we no longer need the account to be in the list for mail_autoreceive_setup() * mail-config.c (mail_config_add_account): ... which means we can possibly add a shortcut to the account's sources's Inbox here. (maybe_add_shortcut): New function. If the store is a storage, add a shortcut to its inbox. Hope that /INBOX exists. (add_shortcut_entry): New function. Creates a shortcut if it doesn't yet exist. 2001-08-13 Peter Williams <peterw@ximian.com> * mail-account-gui.c (service_complete): Take account of the fact that service->path may be NULL (if service is a transport.) * mail-config-druid.c (druid_finish): Bleah, bugfix in case the account has no source. svn path=/trunk/; revision=11961
Diffstat (limited to 'mail/mail-account-gui.c')
-rw-r--r--mail/mail-account-gui.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c
index 0078d25175..7117eacf47 100644
--- a/mail/mail-account-gui.c
+++ b/mail/mail-account-gui.c
@@ -117,17 +117,24 @@ service_complete (MailAccountGuiService *service, GtkWidget **incomplete)
{
const CamelProvider *prov = service->provider;
char *text;
-
+ GtkWidget *path;
+
if (!prov)
return TRUE;
-
+
+ /* transports don't have a path */
+ if (service->path)
+ path = GTK_WIDGET (service->path);
+ else
+ path = NULL;
+
if (CAMEL_PROVIDER_NEEDS (prov, CAMEL_URL_PART_HOST)) {
text = gtk_entry_get_text (service->hostname);
if (!text || !*text) {
if (incomplete)
*incomplete = get_focused_widget (GTK_WIDGET (service->hostname),
GTK_WIDGET (service->username),
- GTK_WIDGET (service->path),
+ path,
NULL);
return FALSE;
}
@@ -138,14 +145,19 @@ service_complete (MailAccountGuiService *service, GtkWidget **incomplete)
if (!text || !*text) {
if (incomplete)
*incomplete = get_focused_widget (GTK_WIDGET (service->username),
- GTK_WIDGET (service->path),
GTK_WIDGET (service->hostname),
+ path,
NULL);
return FALSE;
}
}
if (CAMEL_PROVIDER_NEEDS (prov, CAMEL_URL_PART_PATH)) {
+ if (!path) {
+ printf ("aagh, transports aren't supposed to have paths.\n");
+ return TRUE;
+ }
+
text = gtk_entry_get_text (service->path);
if (!text || !*text) {
if (incomplete)
@@ -1618,8 +1630,8 @@ mail_account_gui_save (MailAccountGui *gui)
account->smime_encrypt_to_self = gtk_toggle_button_get_active (gui->smime_encrypt_to_self);
account->smime_always_sign = gtk_toggle_button_get_active (gui->smime_always_sign);
- mail_autoreceive_setup ();
-
+ mail_autoreceive_setup_account (account->source);
+
return TRUE;
}