aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-config.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-05-12 04:58:44 +0800
committerDan Winship <danw@src.gnome.org>2001-05-12 04:58:44 +0800
commit714cf99b72b368750d167e8b4861dc8394878458 (patch)
treed0d5b57b1f21fa3f458995ba40cb4a32ed188673 /mail/mail-config.c
parentba099582f365aa886cf426c4b7c422244ccec2e4 (diff)
downloadgsoc2013-evolution-714cf99b72b368750d167e8b4861dc8394878458.tar.gz
gsoc2013-evolution-714cf99b72b368750d167e8b4861dc8394878458.tar.zst
gsoc2013-evolution-714cf99b72b368750d167e8b4861dc8394878458.zip
callback to use GNOME-VFS to load http data. (on_url_requested): Handle
* mail-display.c (load_http): callback to use GNOME-VFS to load http data. (on_url_requested): Handle http: URLs that refer to either MIME parts or web data. (mail_display_redisplay_when_loaded): Moved out of mail_content_loaded and made more generic. * mail-format.c (add_url): Handle two different kinds of URLs (URLs that point to CamelMimeParts and URLs that point to GByteArrays). (mail_content_loaded): Use mail_display_redisplay_when_loaded. (format_mime_part): Renamed from "call_handler_function". Also, record Content-Location if the part has one. (This is not yet 100% correct: it doesn't deal with relative URLs correctly.) (handle_text_html): Use Content-Location URL rather than Content-ID, when available (will help deal with relative URLs once GtkHTML supports that better). (etc): Update for changes. * mail-config.c (mail_config_get_http_mode, mail_config_set_http_mode): get/set HTTP image downloading mode. (config_read, mail_config_write_on_exit): save/load that data. svn path=/trunk/; revision=9773
Diffstat (limited to 'mail/mail-config.c')
-rw-r--r--mail/mail-config.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/mail/mail-config.c b/mail/mail-config.c
index eb6c3982c8..3a76d57805 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -65,6 +65,8 @@ typedef struct {
char *pgp_path;
CamelPgpType pgp_type;
+
+ MailConfigHTTPMode http_mode;
} MailConfig;
static const char GCONFPATH[] = "/apps/Evolution/Mail";
@@ -449,6 +451,14 @@ config_read (void)
if (def)
config->pgp_type = CAMEL_PGP_TYPE_NONE;
g_free (str);
+
+ /* HTTP images */
+ str = g_strdup_printf ("=%s/config/Mail=/Display/http_images",
+ evolution_dir);
+ config->http_mode = gnome_config_get_int_with_default (str, &def);
+ if (def)
+ config->http_mode = MAIL_CONFIG_HTTP_NEVER;
+ g_free (str);
gnome_config_sync ();
}
@@ -626,6 +636,12 @@ mail_config_write_on_exit (void)
gnome_config_set_int (str, config->pgp_type);
g_free (str);
+ /* HTTP images */
+ str = g_strdup_printf ("=%s/config/Mail=/Display/http_images",
+ evolution_dir);
+ gnome_config_set_int (str, config->http_mode);
+ g_free (str);
+
/* Passwords */
gnome_config_private_clean_section ("/Evolution/Passwords");
sources = mail_config_get_sources ();
@@ -858,6 +874,18 @@ mail_config_set_pgp_path (const char *pgp_path)
config->pgp_path = g_strdup (pgp_path);
}
+MailConfigHTTPMode
+mail_config_get_http_mode (void)
+{
+ return config->http_mode;
+}
+
+void
+mail_config_set_http_mode (MailConfigHTTPMode mode)
+{
+ config->http_mode = mode;
+}
+
const MailConfigAccount *
mail_config_get_default_account (void)
{