diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-09-15 18:15:53 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-09-15 18:26:52 +0800 |
commit | 591bcbeb910e0d90dc4076f09c23074c96a2e857 (patch) | |
tree | 16514386d71fae7761beeb2efba10dd918718dae /mail | |
parent | 2e113a61cc18428ecb603374dfcc833c5e276422 (diff) | |
download | gsoc2013-evolution-591bcbeb910e0d90dc4076f09c23074c96a2e857.tar.gz gsoc2013-evolution-591bcbeb910e0d90dc4076f09c23074c96a2e857.tar.zst gsoc2013-evolution-591bcbeb910e0d90dc4076f09c23074c96a2e857.zip |
Remove a bunch of unused functions.
Diffstat (limited to 'mail')
-rw-r--r-- | mail/mail-config.c | 209 | ||||
-rw-r--r-- | mail/mail-config.h | 6 | ||||
-rw-r--r-- | mail/message-list.h | 1 |
3 files changed, 0 insertions, 216 deletions
diff --git a/mail/mail-config.c b/mail/mail-config.c index 1ac6892b74..55a94efdca 100644 --- a/mail/mail-config.c +++ b/mail/mail-config.c @@ -75,13 +75,6 @@ typedef struct { gboolean address_compress; gint address_count; - gboolean mlimit; - gint mlimit_size; - gboolean magic_spacebar; - guint error_time; - guint error_level; - - GPtrArray *mime_types; GSList *jh_header; gboolean jh_check; @@ -93,34 +86,6 @@ typedef struct { extern gint camel_header_param_encode_filenames_in_rfc_2047; static MailConfig *config = NULL; -static guint config_write_timeout = 0; - -static void -config_clear_mime_types (void) -{ - gint i; - - for (i = 0; i < config->mime_types->len; i++) - g_free (config->mime_types->pdata[i]); - - g_ptr_array_set_size (config->mime_types, 0); -} - -static void -config_cache_mime_types (void) -{ - GSList *n, *nn; - - n = gconf_client_get_list (config->gconf, "/apps/evolution/mail/display/mime_types", GCONF_VALUE_STRING, NULL); - while (n != NULL) { - nn = n->next; - g_ptr_array_add (config->mime_types, n->data); - g_slist_free_1 (n); - n = nn; - } - - g_ptr_array_add (config->mime_types, NULL); -} static void config_write_style (void) @@ -287,14 +252,6 @@ gconf_int_value_changed (GConfClient *client, } } -static void -gconf_mime_types_changed (GConfClient *client, guint cnxn_id, - GConfEntry *entry, gpointer user_data) -{ - config_clear_mime_types (); - config_cache_mime_types (); -} - /* Config struct routines */ void mail_config_init (void) @@ -307,7 +264,6 @@ mail_config_init (void) config = g_new0 (MailConfig, 1); config->gconf = gconf_client_get_default (); - config->mime_types = g_ptr_array_new (); config->gtkrc = g_build_filename ( e_get_user_data_dir (), "mail", "config", "gtkrc-mail-fonts", NULL); @@ -360,46 +316,6 @@ mail_config_init (void) gconf_client_notify_add ( config->gconf, key, func, NULL, NULL, NULL); - key = "/apps/evolution/mail/display/error_timeout"; - func = (GConfClientNotifyFunc) gconf_int_value_changed; - gconf_client_notify_add ( - config->gconf, key, func, - &config->error_time, NULL, NULL); - config->error_time = - gconf_client_get_int (config->gconf, key, NULL); - - key = "/apps/evolution/mail/display/error_level"; - func = (GConfClientNotifyFunc) gconf_int_value_changed; - gconf_client_notify_add ( - config->gconf, key, func, - &config->error_level, NULL, NULL); - config->error_level = - gconf_client_get_int (config->gconf, key, NULL); - - key = "/apps/evolution/mail/display/force_message_limit"; - func = (GConfClientNotifyFunc) gconf_bool_value_changed; - gconf_client_notify_add ( - config->gconf, key, func, - &config->mlimit, NULL, NULL); - config->mlimit = - gconf_client_get_bool (config->gconf, key, NULL); - - key = "/apps/evolution/mail/display/message_text_part_limit"; - func = (GConfClientNotifyFunc) gconf_int_value_changed; - gconf_client_notify_add ( - config->gconf, key, func, - &config->mlimit_size, NULL, NULL); - config->mlimit_size = - gconf_client_get_int (config->gconf, key, NULL); - - key = "/apps/evolution/mail/display/magic_spacebar"; - func = (GConfClientNotifyFunc) gconf_bool_value_changed; - gconf_client_notify_add ( - config->gconf, key, func, - &config->magic_spacebar, NULL, NULL); - config->magic_spacebar = - gconf_client_get_bool (config->gconf, key, NULL); - key = "/apps/evolution/mail/display/mark_citations"; func = (GConfClientNotifyFunc) gconf_style_changed; gconf_client_notify_add ( @@ -416,19 +332,6 @@ mail_config_init (void) gconf_client_notify_add ( config->gconf, key, func, NULL, NULL, NULL); - /* MIME Type Configuration */ - - gconf_client_add_dir ( - config->gconf, "/apps/evolution/mail/mime_types", - GCONF_CLIENT_PRELOAD_ONELEVEL, NULL); - - key = "/apps/evolution/mail/mime_types"; - func = (GConfClientNotifyFunc) gconf_mime_types_changed, - gconf_client_notify_add ( - config->gconf, key, func, NULL, NULL, NULL); - - config_cache_mime_types (); - /* Junk Configuration */ gconf_client_add_dir ( @@ -479,8 +382,6 @@ mail_config_clear (void) { if (!config) return; - - config_clear_mime_types (); } void @@ -501,77 +402,6 @@ mail_config_write (void) gconf_client_suggest_sync (config->gconf, NULL); } -void -mail_config_write_on_exit (void) -{ - EAccountList *account_list; - EAccount *account; - EIterator *iter; - - if (config_write_timeout) { - g_source_remove (config_write_timeout); - config_write_timeout = 0; - mail_config_write (); - } - - /* Passwords */ - - /* then we make sure the ones we want to remember are in the - session cache */ - account_list = e_get_account_list (); - iter = e_list_get_iterator ((EList *) account_list); - while (e_iterator_is_valid (iter)) { - gchar *passwd; - - account = (EAccount *) e_iterator_get (iter); - - if (account->source->save_passwd && account->source->url && account->source->url[0]) { - passwd = mail_session_get_password (account->source->url); - mail_session_forget_password (account->source->url); - mail_session_add_password (account->source->url, passwd); - g_free (passwd); - } - - if (account->transport->save_passwd && account->transport->url && account->transport->url[0]) { - passwd = mail_session_get_password (account->transport->url); - mail_session_forget_password (account->transport->url); - mail_session_add_password (account->transport->url, passwd); - g_free (passwd); - } - - e_iterator_next (iter); - } - - g_object_unref (iter); - - /* then we clear out our component passwords */ - e_passwords_clear_passwords ("Mail"); - - /* then we remember them */ - iter = e_list_get_iterator ((EList *) account_list); - while (e_iterator_is_valid (iter)) { - account = (EAccount *) e_iterator_get (iter); - - if (account->source->save_passwd && account->source->url && account->source->url[0]) - mail_session_remember_password (account->source->url); - - if (account->transport->save_passwd && account->transport->url && account->transport->url[0]) - mail_session_remember_password (account->transport->url); - - e_iterator_next (iter); - } - - /* now do cleanup */ - mail_config_clear (); - - g_object_unref (config->gconf); - g_ptr_array_free (config->mime_types, TRUE); - - g_free (config->gtkrc); - - g_free (config); -} - /* Accessor functions */ GConfClient * mail_config_get_gconf_client (void) @@ -591,33 +421,6 @@ mail_config_get_address_count (void) return config->address_count; } -guint -mail_config_get_error_timeout (void) -{ - if (!config) - mail_config_init (); - - return config->error_time; -} - -guint -mail_config_get_error_level (void) -{ - if (!config) - mail_config_init (); - - return config->error_level; -} - -gint -mail_config_get_message_limit (void) -{ - if (!config->mlimit) - return -1; - - return config->mlimit_size; -} - /* timeout interval, in seconds, when to call server update */ gint mail_config_get_sync_timeout (void) @@ -643,18 +446,6 @@ mail_config_get_sync_timeout (void) return res; } -gboolean -mail_config_get_enable_magic_spacebar () -{ - return config->magic_spacebar; -} - -const gchar ** -mail_config_get_allowable_mime_types (void) -{ - return (const gchar **) config->mime_types->pdata; -} - static EAccount * mc_get_account_by (const gchar *given_url, const gchar * (get_url_string)(EAccount *account)) { diff --git a/mail/mail-config.h b/mail/mail-config.h index cc5878456c..6f127ece44 100644 --- a/mail/mail-config.h +++ b/mail/mail-config.h @@ -70,12 +70,10 @@ typedef enum { void mail_config_init (void); void mail_config_clear (void); void mail_config_write (void); -void mail_config_write_on_exit (void); GConfClient *mail_config_get_gconf_client (void); /* General Accessor functions */ -const gchar **mail_config_get_allowable_mime_types (void); void mail_config_service_set_save_passwd (EAccountService *service, gboolean save_passwd); @@ -84,8 +82,6 @@ EAccount *mail_config_get_account_by_source_url (const gchar *url); EAccount *mail_config_get_account_by_transport_url (const gchar *url); gint mail_config_get_address_count (void); -gint mail_config_get_message_limit (void); -gboolean mail_config_get_enable_magic_spacebar (void); EAccountService *mail_config_get_default_transport (void); @@ -96,8 +92,6 @@ void mail_config_uri_deleted (GCompareFunc uri_cmp, const gchar *uri); /* static utility functions */ gchar *mail_config_folder_to_cachename (CamelFolder *folder, const gchar *prefix); gchar *mail_config_folder_to_safe_url (CamelFolder *folder); -guint mail_config_get_error_timeout (void); -guint mail_config_get_error_level (void); gint mail_config_get_sync_timeout (void); diff --git a/mail/message-list.h b/mail/message-list.h index 075c20afe3..4c3e1e4996 100644 --- a/mail/message-list.h +++ b/mail/message-list.h @@ -26,7 +26,6 @@ #include <gtk/gtk.h> #include <camel/camel-folder-thread.h> -#include <table/e-table-simple.h> #include <table/e-tree-scrolled.h> #include <camel/camel-folder.h> |