diff options
Diffstat (limited to 'mail/mail-config-gui.c')
-rw-r--r-- | mail/mail-config-gui.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/mail/mail-config-gui.c b/mail/mail-config-gui.c index ea8a8d64e2..7e4c090971 100644 --- a/mail/mail-config-gui.c +++ b/mail/mail-config-gui.c @@ -169,6 +169,7 @@ typedef struct MailDialogTransportPage *page; gboolean tpagedone; GtkWidget *chkFormat; + GtkWidget *spinTimeout; } MailDialog; /* private prototypes - these are ugly, rename some of them? */ @@ -1914,15 +1915,23 @@ format_toggled (GtkWidget *widget, MailDialog *dialog) } static void +timeout_changed (GtkWidget *widget, MailDialog *dialog) +{ + gnome_property_box_changed (GNOME_PROPERTY_BOX (dialog->dialog)); +} + +static void mail_config_apply_clicked (GnomePropertyBox *property_box, gint page_num, MailDialog *dialog) { GtkCList *clist; GtkToggleButton *chk; + GtkSpinButton *spin; MailConfigService *t; gboolean send_html; gpointer data; + glong seen_timeout; int i; if (page_num != -1) @@ -1963,6 +1972,11 @@ mail_config_apply_clicked (GnomePropertyBox *property_box, send_html = gtk_toggle_button_get_active (chk); mail_config_set_send_html (send_html); + /* Mark as seen timeout */ + spin = GTK_SPIN_BUTTON (dialog->spinTimeout); + seen_timeout = gtk_spin_button_get_value_as_int (spin); + mail_config_set_mark_as_seen_timeout (seen_timeout); + mail_config_write (); } @@ -2129,6 +2143,14 @@ mail_config (void) GTK_SIGNAL_FUNC (format_toggled), dialog); + dialog->spinTimeout = glade_xml_get_widget (gui, "spinTimeout"); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (dialog->spinTimeout), + mail_config_mark_as_seen_timeout ()); + + gtk_signal_connect (GTK_OBJECT (dialog->spinTimeout), "changed", + GTK_SIGNAL_FUNC (timeout_changed), + dialog); + /* Listen for apply signal */ gtk_signal_connect (GTK_OBJECT (dialog->dialog), "apply", GTK_SIGNAL_FUNC (mail_config_apply_clicked), |