From f744966790c9027ceccf9393f49978a80b1b010c Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Wed, 24 Jan 2001 22:24:44 +0000 Subject: Added a 3rd page to the account editor to allow users to set their HTML 2001-01-24 Jeffrey Stedfast * mail-config.glade: Added a 3rd page to the account editor to allow users to set their HTML sending preference and also allow them to change their message status timeout. * mail-accounts.c (construct): Added handlers for the send-html checkbox and for the mark-message-as timeout spinbutton. svn path=/trunk/; revision=7789 --- mail/ChangeLog | 9 +++++ mail/mail-accounts.c | 31 ++++++++++++++ mail/mail-accounts.h | 4 ++ mail/mail-config.glade | 103 +++++++++++++++++++++++++++++++++++++++++++++++ mail/mail-config.glade.h | 4 ++ 5 files changed, 151 insertions(+) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index 823c0fe5bf..bc67dc4344 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,12 @@ +2001-01-24 Jeffrey Stedfast + + * mail-config.glade: Added a 3rd page to the account editor to + allow users to set their HTML sending preference and also allow + them to change their message status timeout. + + * mail-accounts.c (construct): Added handlers for the send-html + checkbox and for the mark-message-as timeout spinbutton. + 2001-01-23 Jeffrey Stedfast * mail-account-editor.c (apply_changes): Save the source and diff --git a/mail/mail-accounts.c b/mail/mail-accounts.c index d7a71cfd82..29200a5c5a 100644 --- a/mail/mail-accounts.c +++ b/mail/mail-accounts.c @@ -330,6 +330,24 @@ news_delete (GtkButton *button, gpointer data) } #endif /* ENABLE_NNTP */ +/* temp widget callbacks */ +static void +send_html_toggled (GtkToggleButton *button, gpointer data) +{ + mail_config_set_send_html (button->active); +} + +static void +timeout_changed (GtkEntry *entry, gpointer data) +{ + MailAccountsDialog *dialog = data; + gint val; + + val = (gint) (gtk_spin_button_get_value_as_float (dialog->timeout) * 1000); + + mail_config_set_mark_as_seen_timeout (val); +} + static void construct (MailAccountsDialog *dialog) { @@ -389,6 +407,19 @@ construct (MailAccountsDialog *dialog) gtk_notebook_remove_page (GTK_NOTEBOOK (notebook), 1); #endif + /* get those temp widgets */ + dialog->send_html = GTK_CHECK_BUTTON (glade_xml_get_widget (gui, "chkSendHTML")); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->send_html), + mail_config_get_send_html ()); + gtk_signal_connect (GTK_OBJECT (dialog->send_html), "toggled", + GTK_SIGNAL_FUNC (send_html_toggled), dialog); + + dialog->timeout = GTK_SPIN_BUTTON (glade_xml_get_widget (gui, "spinMarkTimeout")); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (dialog->timeout), + (1.0 * mail_config_get_mark_as_seen_timeout ()) / 1000.0); + gtk_signal_connect (GTK_OBJECT (dialog->timeout), "changed", + GTK_SIGNAL_FUNC (timeout_changed), dialog); + /* now to fill in the clists */ dialog->accounts_row = -1; dialog->accounts = mail_config_get_accounts (); diff --git a/mail/mail-accounts.h b/mail/mail-accounts.h index 86dd7a42ea..e2f355cd3d 100644 --- a/mail/mail-accounts.h +++ b/mail/mail-accounts.h @@ -62,6 +62,10 @@ struct _MailAccountsDialog { GtkButton *news_add; GtkButton *news_edit; GtkButton *news_delete; + + /* temporary widgets */ + GtkCheckButton *send_html; + GtkSpinButton *timeout; }; typedef struct _MailAccountsDialog MailAccountsDialog; diff --git a/mail/mail-config.glade b/mail/mail-config.glade index 577b4becf9..3573488b83 100644 --- a/mail/mail-config.glade +++ b/mail/mail-config.glade @@ -2950,6 +2950,109 @@ SMTP 0 0 + + + GtkVBox + vbox38 + False + 0 + + + GtkCheckButton + chkSendHTML + True + + False + True + + 0 + False + False + + + + + GtkHBox + hbox38 + False + 0 + + 0 + False + True + + + + GtkLabel + lblMarkAsRead + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 4 + 0 + + 0 + False + False + + + + + GtkSpinButton + spinMarkTimeout + True + 1 + 1 + True + GTK_UPDATE_IF_VALID + False + False + 1.5 + 0 + 10 + 0.1 + 1 + 1 + + 0 + False + True + + + + + GtkLabel + lblSeconds + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 4 + 0 + + 0 + False + False + + + + + + + GtkLabel + Notebook:tab + lblOther + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + diff --git a/mail/mail-config.glade.h b/mail/mail-config.glade.h index f56c824cb0..23c8adca0a 100644 --- a/mail/mail-config.glade.h +++ b/mail/mail-config.glade.h @@ -97,3 +97,7 @@ gchar *s = N_("Add"); gchar *s = N_("Edit"); gchar *s = N_("Delete"); gchar *s = N_("News"); +gchar *s = N_("Send mail in HTML format by default."); +gchar *s = N_("Mark messages as \"Read\" after:"); +gchar *s = N_("seconds."); +gchar *s = N_("Other"); -- cgit v1.2.3