diff options
author | Jeffrey Stedfast <fejj@helixcode.com> | 2001-01-06 05:40:42 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-01-06 05:40:42 +0800 |
commit | 61058499ba91ae5a2d50f58cec94f2102990f95a (patch) | |
tree | 55d55b1bef58694d57666f84332c07698e87eeff /mail/mail-config-druid.c | |
parent | 80aa9c98e1c4e3d48af157baa0a1476358e7c512 (diff) | |
download | gsoc2013-evolution-61058499ba91ae5a2d50f58cec94f2102990f95a.tar.gz gsoc2013-evolution-61058499ba91ae5a2d50f58cec94f2102990f95a.tar.zst gsoc2013-evolution-61058499ba91ae5a2d50f58cec94f2102990f95a.zip |
Since the druid now handles adding the new account to the config, we'll
2001-01-05 Jeffrey Stedfast <fejj@helixcode.com>
* mail-accounts.c (mail_add): Since the druid now handles adding
the new account to the config, we'll just connect to the destroy
event and show the druid.
(mail_add_finished): Just reload the account list here.
* mail-config-druid.c (druid_finish): New callback to handle the
"finish" signal. On second thought, it seems it would be best for
the finish callback to be here rather than in mail-accounts.c.
* mail-accounts.[c,h]: Added. Contains source for the Account manager
window. And just like mail-config-druid.c, it's not yet complete.
* mail-config-druid.c (mail_config_druid_get_incoming_keep_mail):
Renamed from _delete_mail
(mail_config_druid_get_transport_url): New convenience function
that replaces the get_hostname, get_protocol, etc.
(mail_config_druid_get_source_url): Same.
* mail-config-druid.glade: Changed "Delete mail from server" to
"Keep mail on server" as this has a more positive ring to it. Both
I and Aaron agree this is the better phrase.
svn path=/trunk/; revision=7275
Diffstat (limited to 'mail/mail-config-druid.c')
-rw-r--r-- | mail/mail-config-druid.c | 45 |
1 files changed, 43 insertions, 2 deletions
diff --git a/mail/mail-config-druid.c b/mail/mail-config-druid.c index 788679b3e3..b8f2bbbf8e 100644 --- a/mail/mail-config-druid.c +++ b/mail/mail-config-druid.c @@ -171,7 +171,7 @@ mail_config_create_html (const char *name, const char *str1, const char *str2, } static void -druid_cancel (GtkWidget *widget, gpointer user_data) +druid_cancel (GnomeDruidPage *page, gpointer arg1, gpointer user_data) { /* Cancel the setup of the account */ MailConfigDruid *druid = user_data; @@ -179,6 +179,47 @@ druid_cancel (GtkWidget *widget, gpointer user_data) gtk_widget_destroy (GTK_WIDGET (druid)); } +static void +druid_finish (GnomeDruidPage *page, gpointer arg1, gpointer user_data) +{ + /* Cancel the setup of the account */ + MailConfigDruid *druid = user_data; + MailConfigAccount *account; + MailConfigIdentity *id; + MailConfigService *source; + MailConfigService *transport; + + account = g_new0 (MailConfigAccount, 1); + account->name = mail_config_druid_get_account_name (druid); + account->default = mail_config_druid_get_default_account (druid); + + /* construct the identity */ + id = g_new0 (MailConfigIdentity, 1); + id->name = mail_config_druid_get_full_name (druid); + id->address = mail_config_druid_get_email_address (druid); + id->reply_to = mail_config_druid_get_reply_to (druid); + id->organization = mail_config_druid_get_organization (druid); + id->signature = mail_config_druid_get_sigfile (druid); + + /* construct the source */ + source = g_new0 (MailConfigService, 1); + source->url = mail_config_druid_get_source_url (druid); + source->keep_mail_on_server = mail_config_druid_get_keep_mail_on_server (druid); + source->save_password = mail_config_druid_get_save_password (druid); + + /* construct the transport */ + transport = g_new0 (MailConfigService, 1); + transport->url = mail_config_druid_get_transport_url (druid); + + account->id = id; + account->source = source; + account->transport = transport; + + mail_config_add_accounts (account); + + gtk_widget_destroy (GTK_WIDGET (druid)); +} + /* Identity Page */ static void identity_check (MailConfigDruid *druid) @@ -894,7 +935,7 @@ mail_config_druid_get_transport_url (MailConfigDruid *druid) url = g_new0 (CamelURL, 1); /* FIXME: get the real protocol */ url->protocol = g_strdup ("smtp"); - host = g_strdup (gtk_entry_get_text (druid->incoming_hostname)); + host = g_strdup (gtk_entry_get_text (druid->outgoing_hostname)); if (host && (pport = strchr (host, ':'))) { port = atoi (pport + 1); *pport = '\0'; |