From 6b48c8e16e6bce2d4171c4f0b615f5aeedb026f6 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Fri, 12 Apr 2002 05:54:58 +0000 Subject: Set the text of the reply-to. (mail_account_gui_save): Get the reply-to 2002-04-12 Jeffrey Stedfast * mail-account-gui.c (mail_account_gui_new): Set the text of the reply-to. (mail_account_gui_save): Get the reply-to text here. (mail_account_gui_identity_complete): If there is text in the reply-to widget make sure it's valid. * mail-config.c (identity_copy): Copy the reply-to. (config_read): Read in the reply-to for all the accounts. (mail_config_write): Save the reply-to. (impl_GNOME_Evolution_MailConfig_addAccount): Get the reply-to. (identity_destroy): Free the reply-to. svn path=/trunk/; revision=16446 --- mail/ChangeLog | 14 ++ mail/Mail.idl | 1 + mail/mail-account-gui.c | 17 ++ mail/mail-account-gui.h | 1 + mail/mail-callbacks.c | 2 +- mail/mail-config.c | 21 ++- mail/mail-config.glade | 448 +++++++++++++++++++++++++++++++++++------------- mail/mail-config.h | 3 +- 8 files changed, 380 insertions(+), 127 deletions(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index b4a69cf3bd..8c03c58e1c 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,17 @@ +2002-04-12 Jeffrey Stedfast + + * mail-account-gui.c (mail_account_gui_new): Set the text of the + reply-to. + (mail_account_gui_save): Get the reply-to text here. + (mail_account_gui_identity_complete): If there is text in the + reply-to widget make sure it's valid. + + * mail-config.c (identity_copy): Copy the reply-to. + (config_read): Read in the reply-to for all the accounts. + (mail_config_write): Save the reply-to. + (impl_GNOME_Evolution_MailConfig_addAccount): Get the reply-to. + (identity_destroy): Free the reply-to. + 2002-04-11 Jeffrey Stedfast * message-list.etspec: s/Sent/Date. This fixes bug #11159. diff --git a/mail/Mail.idl b/mail/Mail.idl index eedf2bcce8..01f4bb2dfb 100644 --- a/mail/Mail.idl +++ b/mail/Mail.idl @@ -44,6 +44,7 @@ module Evolution { struct Identity { string name; string address; + string reply_to; string organization; }; diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c index f5b1795453..cbe13958db 100644 --- a/mail/mail-account-gui.c +++ b/mail/mail-account-gui.c @@ -106,6 +106,7 @@ mail_account_gui_identity_complete (MailAccountGui *gui, GtkWidget **incomplete) if (incomplete) *incomplete = get_focused_widget (GTK_WIDGET (gui->full_name), GTK_WIDGET (gui->email_address), + GTK_WIDGET (gui->reply_to), NULL); return FALSE; } @@ -114,6 +115,18 @@ mail_account_gui_identity_complete (MailAccountGui *gui, GtkWidget **incomplete) if (!text || !is_email (text)) { if (incomplete) *incomplete = get_focused_widget (GTK_WIDGET (gui->email_address), + GTK_WIDGET (gui->full_name), + GTK_WIDGET (gui->reply_to), + NULL); + return FALSE; + } + + /* make sure that if the reply-to field is filled in, that it is valid */ + text = gtk_entry_get_text (gui->reply_to); + if (text && *text && !is_email (text)) { + if (incomplete) + *incomplete = get_focused_widget (GTK_WIDGET (gui->reply_to), + GTK_WIDGET (gui->email_address), GTK_WIDGET (gui->full_name), NULL); return FALSE; @@ -1393,6 +1406,7 @@ mail_account_gui_new (MailConfigAccount *account, MailAccountsTab *dialog) /* Identity */ gui->full_name = GTK_ENTRY (glade_xml_get_widget (gui->xml, "identity_full_name")); gui->email_address = GTK_ENTRY (glade_xml_get_widget (gui->xml, "identity_address")); + gui->reply_to = GTK_ENTRY (glade_xml_get_widget (gui->xml, "identity_reply_to")); gui->organization = GTK_ENTRY (glade_xml_get_widget (gui->xml, "identity_organization")); prepare_signatures (gui); @@ -1402,6 +1416,8 @@ mail_account_gui_new (MailConfigAccount *account, MailAccountsTab *dialog) 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->reply_to) + gtk_entry_set_text (gui->reply_to, account->id->reply_to); if (account->id->organization) e_utf8_gtk_entry_set_text (gui->organization, account->id->organization); @@ -1829,6 +1845,7 @@ mail_account_gui_save (MailAccountGui *gui) account->id = g_new0 (MailConfigIdentity, 1); account->id->name = e_utf8_gtk_entry_get_text (gui->full_name); account->id->address = e_utf8_gtk_entry_get_text (gui->email_address); + account->id->reply_to = e_utf8_gtk_entry_get_text (gui->reply_to); account->id->organization = e_utf8_gtk_entry_get_text (gui->organization); sig_set_and_write (gui); diff --git a/mail/mail-account-gui.h b/mail/mail-account-gui.h index 6a6735bf48..121b5bb59c 100644 --- a/mail/mail-account-gui.h +++ b/mail/mail-account-gui.h @@ -66,6 +66,7 @@ typedef struct { /* identity */ GtkEntry *full_name; GtkEntry *email_address; + GtkEntry *reply_to; GtkEntry *organization; /* signatures */ diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c index 39c3126f8a..a33237acf2 100644 --- a/mail/mail-callbacks.c +++ b/mail/mail-callbacks.c @@ -353,7 +353,7 @@ composer_sent_cb (char *uri, CamelMimeMessage *message, gboolean sent, void *dat } gtk_widget_destroy (GTK_WIDGET (send->composer)); } else { - e_msg_composer_set_enable_autosave(send->composer, TRUE); + e_msg_composer_set_enable_autosave (send->composer, TRUE); gtk_widget_show (GTK_WIDGET (send->composer)); gtk_object_unref (GTK_OBJECT (send->composer)); } diff --git a/mail/mail-config.c b/mail/mail-config.c index 498ebcf623..e607019636 100644 --- a/mail/mail-config.c +++ b/mail/mail-config.c @@ -181,6 +181,7 @@ identity_copy (const MailConfigIdentity *id) new = g_new0 (MailConfigIdentity, 1); new->name = g_strdup (id->name); new->address = g_strdup (id->address); + new->reply_to = g_strdup (id->reply_to); new->organization = g_strdup (id->organization); new->text_signature = id->text_signature; new->text_random = id->text_random; @@ -198,6 +199,7 @@ identity_destroy (MailConfigIdentity *id) g_free (id->name); g_free (id->address); + g_free (id->reply_to); g_free (id->organization); g_free (id); @@ -719,6 +721,10 @@ config_read (void) id->address = bonobo_config_get_string (config->db, path, NULL); g_free (path); + path = g_strdup_printf ("/Mail/Accounts/identity_reply_to_%d", i); + id->reply_to = bonobo_config_get_string (config->db, path, NULL); + g_free (path); + path = g_strdup_printf ("/Mail/Accounts/identity_organization_%d", i); id->organization = bonobo_config_get_string (config->db, path, NULL); g_free (path); @@ -727,19 +733,19 @@ config_read (void) path = g_strdup_printf ("/Mail/Accounts/identity_signature_text_%d", i); id->text_signature = lookup_signature (bonobo_config_get_long_with_default (config->db, path, -1, NULL)); g_free (path); - + path = g_strdup_printf ("/Mail/Accounts/identity_signature_html_%d", i); id->html_signature = lookup_signature (bonobo_config_get_long_with_default (config->db, path, -1, NULL)); g_free (path); - + path = g_strdup_printf ("/Mail/Accounts/identity_signature_text_random_%d", i); id->text_random = bonobo_config_get_boolean_with_default (config->db, path, FALSE, NULL); g_free (path); - + path = g_strdup_printf ("/Mail/Accounts/identity_signature_html_random_%d", i); id->html_random = bonobo_config_get_boolean_with_default (config->db, path, FALSE, NULL); g_free (path); - + /* get the source */ source = g_new0 (MailConfigService, 1); @@ -1121,12 +1127,16 @@ mail_config_write (void) bonobo_config_set_string_wrapper (config->db, path, account->id->address, NULL); g_free (path); + path = g_strdup_printf ("/Mail/Accounts/identity_reply_to_%d", i); + bonobo_config_set_string_wrapper (config->db, path, account->id->reply_to, NULL); + g_free (path); + path = g_strdup_printf ("/Mail/Accounts/identity_organization_%d", i); bonobo_config_set_string_wrapper (config->db, path, account->id->organization, NULL); g_free (path); mail_config_write_account_sig (account, i); - + /* source info */ path = g_strdup_printf ("/Mail/Accounts/source_url_%d", i); bonobo_config_set_string_wrapper (config->db, path, account->source->url, NULL); @@ -2845,6 +2855,7 @@ impl_GNOME_Evolution_MailConfig_addAccount (PortableServer_Servant servant, mail_id = g_new0 (MailConfigIdentity, 1); mail_id->name = g_strdup (id.name); mail_id->address = g_strdup (id.address); + mail_id->reply_to = g_strdup (id.reply_to); mail_id->organization = g_strdup (id.organization); mail_account->id = mail_id; diff --git a/mail/mail-config.glade b/mail/mail-config.glade index 013f317691..102530307b 100644 --- a/mail/mail-config.glade +++ b/mail/mail-config.glade @@ -205,7 +205,7 @@ Click "Finish" to save your settings. GtkWindow account_editor False - window1 + Account Editor GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False @@ -234,7 +234,7 @@ Click "Finish" to save your settings. GtkFrame - management_frame + frameManagement 3 0 @@ -272,7 +272,7 @@ For example: "Work" or "Personal" GtkHBox - hbox24 + hboxIdentityName 3 False 4 @@ -347,7 +347,7 @@ For example: "Work" or "Personal" GtkTable - table1 + identity_required_table 3 2 2 @@ -477,9 +477,9 @@ For example: "Work" or "Personal" GtkTable - table2 + identity_optional_table 3 - 3 + 4 4 False 3 @@ -499,8 +499,8 @@ For example: "Work" or "Personal" 0 1 - 0 - 1 + 1 + 2 0 0 False @@ -526,8 +526,8 @@ For example: "Work" or "Personal" 0 1 - 1 - 2 + 2 + 3 0 0 False @@ -553,8 +553,8 @@ For example: "Work" or "Personal" 0 1 - 2 - 3 + 3 + 4 0 0 False @@ -577,8 +577,8 @@ For example: "Work" or "Personal" 1 4 - 0 - 1 + 1 + 2 0 0 True @@ -599,8 +599,8 @@ For example: "Work" or "Personal" 3 4 - 1 - 2 + 2 + 3 0 0 False @@ -621,8 +621,8 @@ For example: "Work" or "Personal" 3 4 - 2 - 3 + 3 + 4 0 0 False @@ -643,8 +643,8 @@ For example: "Work" or "Personal" 2 3 - 1 - 2 + 2 + 3 0 0 False @@ -665,8 +665,8 @@ For example: "Work" or "Personal" 2 3 - 2 - 3 + 3 + 4 0 0 False @@ -690,8 +690,8 @@ Random 1 2 - 2 - 3 + 3 + 4 0 0 False @@ -714,8 +714,59 @@ Random 1 2 - 1 - 2 + 2 + 3 + 0 + 0 + True + False + False + False + True + False + + + + + GtkLabel + reply_to_label + + GTK_JUSTIFY_CENTER + False + 0 + 0.5 + 0 + 0 + identity_reply_to + + 0 + 1 + 0 + 1 + 0 + 0 + False + False + False + False + True + False + + + + + GtkEntry + identity_reply_to + True + True + True + 0 + + + 1 + 4 + 0 + 1 0 0 True @@ -4317,124 +4368,225 @@ Quoted False - GtkHBox + GtkNotebook toplevel - False - 0 - - - Custom - etableMailAccounts - mail_accounts_etable_new - 0 - 0 - Thu, 28 Mar 2002 21:15:54 GMT - - 0 - True - True - - + True + True + True + GTK_POS_TOP + False + 2 + 2 + False - GtkVBox - vbox + GtkHBox + vboxMailAccounts False 0 - - 0 - False - True - - GtkLabel - label420 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 + Custom + etableMailAccounts + mail_accounts_etable_new + 0 + 0 + Thu, 28 Mar 2002 21:15:54 GMT 0 - False - False + True + True - GtkVButtonBox - vbuttonbox1 - GTK_BUTTONBOX_START + GtkVBox + vboxMailFunctions + False 0 - 85 - 27 - 7 - 0 0 False - False + True - GtkButton - cmdAccountAdd - True - True - - GTK_RELIEF_NORMAL + GtkLabel + lblMailSpacer + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + 0 + False + False + - GtkButton - cmdAccountEdit - True - True - - GTK_RELIEF_NORMAL + GtkVButtonBox + vbuttonboxMailAccounts + GTK_BUTTONBOX_START + 0 + 85 + 27 + 7 + 0 + + 0 + False + False + + + + GtkButton + cmdAccountAdd + True + True + + GTK_RELIEF_NORMAL + + + + GtkButton + cmdAccountEdit + True + True + + GTK_RELIEF_NORMAL + + + + GtkButton + cmdAccountDelete + True + True + + GTK_RELIEF_NORMAL + - GtkButton - cmdAccountDelete - True - True - - GTK_RELIEF_NORMAL + GtkLabel + label421 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + 0 + False + False + + + + + GtkVButtonBox + vbuttonboxMailExtras + GTK_BUTTONBOX_START + 0 + 85 + 27 + 7 + 0 + + 0 + True + True + + + + GtkButton + cmdAccountDefault + True + True + + GTK_RELIEF_NORMAL + + + + GtkButton + cmdAccountAble + True + True + + GTK_RELIEF_NORMAL + + + + + GtkLabel + Notebook:tab + lblMailAccounts + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + + + GtkHBox + hboxNews + False + 0 - GtkLabel - label421 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 + GtkScrolledWindow + scrolledNewsServers + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_UPDATE_CONTINUOUS + GTK_UPDATE_CONTINUOUS 0 - False - False + True + True + + + GtkCList + clistNewsServers + True + 1 + 80 + GTK_SELECTION_SINGLE + True + GTK_SHADOW_IN + + + GtkLabel + CList:title + lblNewsServers + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + - GtkVButtonBox - vbuttonbox2 - GTK_BUTTONBOX_START + GtkVBox + vboxNewsFunctions + False 0 - 85 - 27 - 7 - 0 0 True @@ -4442,24 +4594,80 @@ Quoted - GtkButton - cmdAccountDefault - True - True - - GTK_RELIEF_NORMAL + GtkLabel + labelNewsSpacer + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + 0 + False + False + - GtkButton - cmdAccountAble - True - True - - GTK_RELIEF_NORMAL + GtkVButtonBox + vbuttonboxNewsServers + GTK_BUTTONBOX_START + 0 + 85 + 27 + 7 + 0 + + 0 + False + True + + + + GtkButton + cmdNewsAdd + True + True + + GTK_RELIEF_NORMAL + + + + GtkButton + cmdNewsEdit + True + True + + GTK_RELIEF_NORMAL + + + + GtkButton + cmdNewsDelete + True + True + + GTK_RELIEF_NORMAL + + + + GtkLabel + Notebook:tab + lblNewsServers + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + @@ -5497,7 +5705,7 @@ Baltic (ISO-8859-4) GtkOptionMenu omenuCharset True - Baltic (IS0-8859-13) + Baltic (ISO-8859-13) Baltic (ISO-8859-4) 0 diff --git a/mail/mail-config.h b/mail/mail-config.h index 4d34374d9a..6d70a3a120 100644 --- a/mail/mail-config.h +++ b/mail/mail-config.h @@ -43,8 +43,9 @@ typedef struct { typedef struct { char *name; char *address; + char *reply_to; char *organization; - + MailConfigSignature *text_signature; gboolean text_random; MailConfigSignature *html_signature; -- cgit v1.2.3