aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-config-gui.c
diff options
context:
space:
mode:
authorRichard Hult <rhult@hem.passagen.se>2000-08-17 06:56:34 +0800
committerJP Rosevear <jpr@src.gnome.org>2000-08-17 06:56:34 +0800
commit1cd648f355688ad788a81b832e8e7e7ad1aa6d1a (patch)
treea63649ccaeaa73502e2b25e1b312fb5a24f9a169 /mail/mail-config-gui.c
parentc60f1c5c77d1ca39618ecea09caaaa36b17beadd (diff)
downloadgsoc2013-evolution-1cd648f355688ad788a81b832e8e7e7ad1aa6d1a.tar
gsoc2013-evolution-1cd648f355688ad788a81b832e8e7e7ad1aa6d1a.tar.gz
gsoc2013-evolution-1cd648f355688ad788a81b832e8e7e7ad1aa6d1a.tar.bz2
gsoc2013-evolution-1cd648f355688ad788a81b832e8e7e7ad1aa6d1a.tar.lz
gsoc2013-evolution-1cd648f355688ad788a81b832e8e7e7ad1aa6d1a.tar.xz
gsoc2013-evolution-1cd648f355688ad788a81b832e8e7e7ad1aa6d1a.tar.zst
gsoc2013-evolution-1cd648f355688ad788a81b832e8e7e7ad1aa6d1a.zip
Use a configurable timeout.
2000-08-16 Richard Hult <rhult@hem.passagen.se> * mail-ops.c (cleanup_display_message): Use a configurable timeout. * mail-config.c (mail_config_set_mark_as_seen_timeout): New function for the settable mark-as-seen timeout. (mail_config_mark_as_seen_timeout): Likewise. (mail_config_write): Write the timeout setting. (config_read): Read timeout setting. * mail-config-gui.c (mail_config): Add option for the settable mark-as-seen timeout. (mail_config_apply_clicked): Likewise. (timeout_changed): New function for the timeout setting. svn path=/trunk/; revision=4859
Diffstat (limited to 'mail/mail-config-gui.c')
-rw-r--r--mail/mail-config-gui.c22
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),