From dbd459b5e19fac55ce9e4b9c1c3a668b7697a704 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Tue, 27 Mar 2001 15:01:17 +0000 Subject: Fill in signature and organization too. (mail_account_gui_save): Preserve * mail-account-gui.c (mail_account_gui_new): Fill in signature and organization too. (mail_account_gui_save): Preserve the "enabled" flag on the source. svn path=/trunk/; revision=8977 --- mail/ChangeLog | 6 ++++++ mail/mail-account-gui.c | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/mail/ChangeLog b/mail/ChangeLog index b030625eed..182db7c29d 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,9 @@ +2001-03-27 Dan Winship + + * mail-account-gui.c (mail_account_gui_new): Fill in signature and + organization too. + (mail_account_gui_save): Preserve the "enabled" flag on the source. + 2001-03-27 Not Zed * mail-send-recv.c (receive_done): Use gnome-dialog-close instead diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c index 0cf07a58fc..62857d0519 100644 --- a/mail/mail-account-gui.c +++ b/mail/mail-account-gui.c @@ -740,6 +740,12 @@ mail_account_gui_new (MailConfigAccount *account) e_utf8_gtk_entry_set_text (gui->full_name, account->id->name); if (account->id->address) gtk_entry_set_text (gui->email_address, account->id->address); + if (account->id->organization) + e_utf8_gtk_entry_set_text (gui->organization, account->id->organization); + if (account->id->signature) { + gnome_file_entry_set_default_path (gui->signature, account->id->signature); + gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (gui->signature)), account->id->signature); + } } /* Source */ @@ -1043,6 +1049,7 @@ gboolean mail_account_gui_save (MailAccountGui *gui) { MailConfigAccount *account = gui->account; + gboolean old_enabled; if (!mail_account_gui_identity_complete (gui) || !mail_account_gui_source_complete (gui) || @@ -1062,9 +1069,12 @@ mail_account_gui_save (MailAccountGui *gui) account->id->organization = e_utf8_gtk_entry_get_text (gui->organization); account->id->signature = gnome_file_entry_get_full_path (gui->signature, TRUE); + old_enabled = account->source && account->source->enabled; service_destroy (account->source); account->source = g_new0 (MailConfigService, 1); save_service (&gui->source, gui->extra_config, account->source); + if (account->source && account->source->url && old_enabled) + account->source->enabled = TRUE; account->source->auto_check = gtk_toggle_button_get_active (gui->source_auto_check); if (account->source->auto_check) account->source->auto_check_time = gtk_spin_button_get_value_as_int (gui->source_auto_check_min); -- cgit v1.2.3