aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-config.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/mail-config.c')
-rw-r--r--mail/mail-config.c36
1 files changed, 35 insertions, 1 deletions
diff --git a/mail/mail-config.c b/mail/mail-config.c
index fb06f9e17f..d8ca32e0bd 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -110,6 +110,11 @@ typedef struct {
guint address_compress_notify_id;
gboolean address_compress;
gint address_count;
+ guint mlimit_size_notify_id;
+ guint mlimit_notify_id;
+ gboolean mlimit;
+ gint mlimit_size;
+
GPtrArray *mime_types;
guint mime_types_notify_id;
@@ -339,6 +344,20 @@ gconf_address_compress_changed (GConfClient *client, guint cnxn_id,
}
static void
+gconf_mlimit_size_changed (GConfClient *client, guint cnxn_id,
+ GConfEntry *entry, gpointer user_data)
+{
+ config->mlimit_size = gconf_client_get_int (config->gconf, "/apps/evolution/mail/display/message_text_part_limit", NULL);
+}
+
+static void
+gconf_mlimit_changed (GConfClient *client, guint cnxn_id,
+ GConfEntry *entry, gpointer user_data)
+{
+ config->mlimit = gconf_client_get_bool (config->gconf, "/apps/evolution/mail/display/force_message_limit", NULL);
+}
+
+static void
gconf_mime_types_changed (GConfClient *client, guint cnxn_id,
GConfEntry *entry, gpointer user_data)
{
@@ -373,7 +392,11 @@ mail_config_init (void)
config->font_notify_id = gconf_client_notify_add (config->gconf, "/apps/evolution/mail/display/address_compress",
gconf_address_compress_changed, NULL, NULL, NULL);
config->font_notify_id = gconf_client_notify_add (config->gconf, "/apps/evolution/mail/display/address_count",
- gconf_address_count_changed, NULL, NULL, NULL);
+ gconf_address_count_changed, NULL, NULL, NULL);
+ config->mlimit_notify_id = gconf_client_notify_add (config->gconf, "/apps/evolution/mail/display/force_message_limit",
+ gconf_mlimit_changed, NULL, NULL, NULL);
+ config->mlimit_size_notify_id = gconf_client_notify_add (config->gconf, "/apps/evolution/mail/display/message_text_part_limit",
+ gconf_mlimit_size_changed, NULL, NULL, NULL);
config->spell_notify_id = gconf_client_notify_add (config->gconf, "/GNOME/Spell",
gconf_style_changed, NULL, NULL, NULL);
config->mark_citations__notify_id = gconf_client_notify_add (config->gconf, "/apps/evolution/mail/display/mark_citations",
@@ -397,6 +420,8 @@ mail_config_init (void)
config_cache_mime_types ();
config->address_compress = gconf_client_get_bool (config->gconf, "/apps/evolution/mail/display/address_compress", NULL);
config->address_count = gconf_client_get_int (config->gconf, "/apps/evolution/mail/display/address_count", NULL);
+ config->mlimit = gconf_client_get_bool (config->gconf, "/apps/evolution/mail/display/force_message_limit", NULL);
+ config->mlimit_size = gconf_client_get_int (config->gconf, "/apps/evolution/mail/display/message_text_part_limit", NULL);
config->accounts = e_account_list_new (config->gconf);
config->signatures = e_signature_list_new (config->gconf);
}
@@ -538,6 +563,15 @@ mail_config_get_address_count (void)
return config->address_count;
}
+int
+mail_config_get_message_limit (void)
+{
+ if (!config->mlimit)
+ return -1;
+
+ return config->mlimit_size;
+}
+
const char *
mail_config_get_label_color_by_name (const char *name)
{