diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-02-09 06:57:34 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-02-09 06:57:34 +0800 |
commit | 18df0dfdf27495931b1aed2e8f88942d44eedc7e (patch) | |
tree | 69fb538eb670604a20414bba903f0f9caa85e39a /mail/mail-config-druid.c | |
parent | 56f97fa4b440719e412b9e56e833f88b0e130d05 (diff) | |
download | gsoc2013-evolution-18df0dfdf27495931b1aed2e8f88942d44eedc7e.tar.gz gsoc2013-evolution-18df0dfdf27495931b1aed2e8f88942d44eedc7e.tar.zst gsoc2013-evolution-18df0dfdf27495931b1aed2e8f88942d44eedc7e.zip |
Cast the CamelMedium to a CamelMimePart before performing actions on it as
2001-02-08 Jeffrey Stedfast <fejj@ximian.com>
* mail-display.c (on_object_requested): Cast the CamelMedium to a
CamelMimePart before performing actions on it as if it were a
CamelMimePart.
* mail-config-druid.c (druid_finish): Save the auto-check settings.
(construct): Initialize auto-check widgets.
(mail_config_druid_get_auto_check): New function
(mail_config_druid_get_auto_check_minutes): New functions
* mail-config.c (config_read): Read in whether or not to check
every x minutes.
(mail_config_write): Save auto-check config data and SSL.
svn path=/trunk/; revision=8126
Diffstat (limited to 'mail/mail-config-druid.c')
-rw-r--r-- | mail/mail-config-druid.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/mail/mail-config-druid.c b/mail/mail-config-druid.c index d33247d33a..748506ff80 100644 --- a/mail/mail-config-druid.c +++ b/mail/mail-config-druid.c @@ -203,6 +203,8 @@ druid_finish (GnomeDruidPage *page, gpointer arg1, gpointer user_data) /* construct the source */ source = g_new0 (MailConfigService, 1); source->keep_on_server = mail_config_druid_get_keep_mail_on_server (druid); + source->auto_check = mail_config_druid_get_auto_check (druid); + source->auto_check_time = mail_config_druid_get_auto_check_minutes (druid); source->save_passwd = mail_config_druid_get_save_password (druid); str = mail_config_druid_get_source_url (druid); if (str) { @@ -318,6 +320,14 @@ incoming_check (MailConfigDruid *druid) } static void +auto_check_toggled (GtkToggleButton *button, gpointer data) +{ + MailConfigDruid *druid = data; + + gtk_widget_set_sensitive (GTK_WIDGET (druid->incoming_auto_check_min), button->active); +} + +static void incoming_changed (GtkWidget *widget, gpointer data) { MailConfigDruid *druid = data; @@ -1076,6 +1086,9 @@ construct (MailConfigDruid *druid) druid->incoming_path = GTK_ENTRY (glade_xml_get_widget (gui, "txtIncomingPath")); gtk_signal_connect (GTK_OBJECT (druid->incoming_path), "changed", incoming_changed, druid); druid->incoming_keep_mail = GTK_CHECK_BUTTON (glade_xml_get_widget (gui, "chkIncomingKeepMail")); + druid->incoming_auto_check = GTK_CHECK_BUTTON (glade_xml_get_widget (gui, "chkAutoCheck")); + gtk_signal_connect (GTK_OBJECT (druid->incoming_auto_check), "toggled", auto_check_toggled, druid); + druid->incoming_auto_check_min = GTK_SPIN_BUTTON (glade_xml_get_widget (gui, "spinAutoCheckMinutes")); druid->incoming_check_settings = GTK_CHECK_BUTTON (glade_xml_get_widget (gui, "chkIncomingCheckSettings")); druid->have_auth_page = TRUE; @@ -1217,6 +1230,23 @@ mail_config_druid_get_keep_mail_on_server (MailConfigDruid *druid) gboolean +mail_config_druid_get_auto_check (MailConfigDruid *druid) +{ + g_return_val_if_fail (IS_MAIL_CONFIG_DRUID (druid), FALSE); + + return GTK_TOGGLE_BUTTON (druid->incoming_auto_check)->active; +} + + +gint +mail_config_druid_get_auto_check_minutes (MailConfigDruid *druid) +{ + g_return_val_if_fail (IS_MAIL_CONFIG_DRUID (druid), 0); + + return gtk_spin_button_get_value_as_int (druid->incoming_auto_check_min); +} + +gboolean mail_config_druid_get_save_password (MailConfigDruid *druid) { g_return_val_if_fail (IS_MAIL_CONFIG_DRUID (druid), FALSE); |