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 | |
parent | 56f97fa4b440719e412b9e56e833f88b0e130d05 (diff) | |
download | gsoc2013-evolution-18df0dfdf27495931b1aed2e8f88942d44eedc7e.tar gsoc2013-evolution-18df0dfdf27495931b1aed2e8f88942d44eedc7e.tar.gz gsoc2013-evolution-18df0dfdf27495931b1aed2e8f88942d44eedc7e.tar.bz2 gsoc2013-evolution-18df0dfdf27495931b1aed2e8f88942d44eedc7e.tar.lz gsoc2013-evolution-18df0dfdf27495931b1aed2e8f88942d44eedc7e.tar.xz 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
-rw-r--r-- | mail/ChangeLog | 15 | ||||
-rw-r--r-- | mail/mail-config-druid.c | 30 | ||||
-rw-r--r-- | mail/mail-config-druid.h | 6 | ||||
-rw-r--r-- | mail/mail-config.c | 17 | ||||
-rw-r--r-- | mail/mail-config.glade | 66 | ||||
-rw-r--r-- | mail/mail-config.glade.h | 2 | ||||
-rw-r--r-- | mail/mail-config.h | 2 | ||||
-rw-r--r-- | mail/mail-display.c | 2 |
8 files changed, 139 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 39b1c20ed4..71ebcc3a15 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,18 @@ +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. + 2001-02-07 Jeffrey Stedfast <fejj@ximian.com> * mail-autofilter.c (rule_add_subject): Use "contains" because the 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); diff --git a/mail/mail-config-druid.h b/mail/mail-config-druid.h index 836e00a6ae..9f3fed8547 100644 --- a/mail/mail-config-druid.h +++ b/mail/mail-config-druid.h @@ -69,6 +69,8 @@ struct _MailConfigDruid { GtkEntry *incoming_username; GtkEntry *incoming_path; GtkCheckButton *incoming_keep_mail; + GtkCheckButton *incoming_auto_check; + GtkSpinButton *incoming_auto_check_min; GtkCheckButton *incoming_check_settings; /* authentication */ @@ -122,6 +124,10 @@ gboolean mail_config_druid_get_keep_mail_on_server (MailConfigDruid *druid); gboolean mail_config_druid_get_save_password (MailConfigDruid *druid); +gboolean mail_config_druid_get_auto_check (MailConfigDruid *druid); + +gint mail_config_druid_get_auto_check_minutes (MailConfigDruid *druid); + char *mail_config_druid_get_transport_url (MailConfigDruid *druid); gboolean mail_config_druid_get_transport_requires_auth (MailConfigDruid *druid); diff --git a/mail/mail-config.c b/mail/mail-config.c index a4f9c15a86..3076ebacef 100644 --- a/mail/mail-config.c +++ b/mail/mail-config.c @@ -99,6 +99,8 @@ service_copy (const MailConfigService *source) new = g_new0 (MailConfigService, 1); new->url = g_strdup (source->url); new->keep_on_server = source->keep_on_server; + new->auto_check = source->auto_check; + new->auto_check_time = source->auto_check_time; new->save_passwd = source->save_passwd; new->use_ssl = source->use_ssl; @@ -260,6 +262,12 @@ config_read (void) path = g_strdup_printf ("source_keep_on_server_%d", i); source->keep_on_server = gnome_config_get_bool (path); g_free (path); + path = g_strdup_printf ("source_auto_check_%d", i); + source->auto_check = gnome_config_get_bool (path); + g_free (path); + path = g_strdup_printf ("source_auto_check_time_%d", i); + source->auto_check_time = gnome_config_get_int (path); + g_free (path); path = g_strdup_printf ("source_save_passwd_%d", i); source->save_passwd = gnome_config_get_bool (path); g_free (path); @@ -402,9 +410,18 @@ mail_config_write (void) path = g_strdup_printf ("source_keep_on_server_%d", i); gnome_config_set_bool (path, account->source->keep_on_server); g_free (path); + path = g_strdup_printf ("source_auto_check_%d", i); + gnome_config_set_bool (path, account->source->auto_check); + g_free (path); + path = g_strdup_printf ("source_auto_check_time_%d", i); + gnome_config_set_int (path, account->source->auto_check_time); + g_free (path); path = g_strdup_printf ("source_save_passwd_%d", i); gnome_config_set_bool (path, account->source->save_passwd); g_free (path); + path = g_strdup_printf ("source_use_ssl_%d", i); + gnome_config_set_bool (path, account->source->use_ssl); + g_free (path); /* transport info */ path = g_strdup_printf ("transport_url_%d", i); diff --git a/mail/mail-config.glade b/mail/mail-config.glade index 9f481a8adb..9c67cd60a0 100644 --- a/mail/mail-config.glade +++ b/mail/mail-config.glade @@ -711,6 +711,72 @@ Click "Next" to begin. </text> </widget> <widget> + <class>GtkHBox</class> + <name>hbox39</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + + <widget> + <class>GtkCheckButton</class> + <name>chkAutoCheck</name> + <can_focus>True</can_focus> + <label>Automatically check mail every</label> + <active>False</active> + <draw_indicator>True</draw_indicator> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkSpinButton</class> + <name>spinAutoCheckMinutes</name> + <can_focus>True</can_focus> + <climb_rate>1</climb_rate> + <digits>0</digits> + <numeric>True</numeric> + <update_policy>GTK_UPDATE_ALWAYS</update_policy> + <snap>False</snap> + <wrap>False</wrap> + <value>1440</value> + <lower>0</lower> + <upper>1440</upper> + <step>1</step> + <page>10</page> + <page_size>10</page_size> + <child> + <padding>2</padding> + <expand>False</expand> + <fill>True</fill> + </child> + </widget> + + <widget> + <class>GtkLabel</class> + <name>lblMinutes</name> + <label>minutes.</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + </widget> + + <widget> <class>GtkCheckButton</class> <name>chkIncomingCheckSettings</name> <can_focus>True</can_focus> diff --git a/mail/mail-config.glade.h b/mail/mail-config.glade.h index f5660ebe7c..81d686570a 100644 --- a/mail/mail-config.glade.h +++ b/mail/mail-config.glade.h @@ -23,6 +23,8 @@ gchar *s = N_("Host:"); gchar *s = N_("Username:"); gchar *s = N_("Path:"); gchar *s = N_("Keep mail on server"); +gchar *s = N_("Automatically check mail every"); +gchar *s = N_("minutes."); gchar *s = N_("Check settings"); gchar *s = N_("Authentication"); gchar *s = N_("Authentication"); diff --git a/mail/mail-config.h b/mail/mail-config.h index 5a3cda5c42..ee9191a4c8 100644 --- a/mail/mail-config.h +++ b/mail/mail-config.h @@ -42,6 +42,8 @@ typedef struct { typedef struct { gchar *url; gboolean keep_on_server; + gboolean auto_check; + gint auto_check_time; gboolean save_passwd; gboolean use_ssl; } MailConfigService; diff --git a/mail/mail-display.c b/mail/mail-display.c index 404dc9f3ed..9f599bc797 100644 --- a/mail/mail-display.c +++ b/mail/mail-display.c @@ -696,7 +696,7 @@ on_object_requested (GtkHTML *html, GtkHTMLEmbedded *eb, gpointer data) hbox = gtk_hbox_new (FALSE, 2); gtk_container_set_border_width (GTK_CONTAINER (hbox), 2); - if (mail_part_is_inline (medium)) { + if (mail_part_is_inline (CAMEL_MIME_PART (medium))) { arrow = gnome_stock_new_with_icon (GNOME_STOCK_PIXMAP_DOWN); } else { arrow = gnome_stock_new_with_icon (GNOME_STOCK_PIXMAP_FORWARD); |