diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2003-01-23 11:09:31 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2003-01-23 11:09:31 +0800 |
commit | 8825b35b7613fd532813a422b908a097c2791513 (patch) | |
tree | c03b982ca2c1404c9e06c5a3e695a471d7ef89f7 /mail/mail-config.c | |
parent | c9d980f3b91cdd426177d827596dc10aa2cc595d (diff) | |
download | gsoc2013-evolution-8825b35b7613fd532813a422b908a097c2791513.tar.gz gsoc2013-evolution-8825b35b7613fd532813a422b908a097c2791513.tar.zst gsoc2013-evolution-8825b35b7613fd532813a422b908a097c2791513.zip |
Removed. (mail_config_set_thread_list): Removed.
2003-01-22 Jeffrey Stedfast <fejj@ximian.com>
* mail-config.c (mail_config_get_thread_list): Removed.
(mail_config_set_thread_list): Removed.
(mail_config_uri_renamed): No longer needs to change threaded
state for each url either.
(mail_config_write_on_exit): Updated.
* folder-browser-ui.c (folder_browser_ui_add_list): Get the
threaded state via gconf.
* folder-browser.c (folder_browser_toggle_threads): Save the
threaded state.
svn path=/trunk/; revision=19580
Diffstat (limited to 'mail/mail-config.c')
-rw-r--r-- | mail/mail-config.c | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/mail/mail-config.c b/mail/mail-config.c index a6be7afa8d..ee3e5121e6 100644 --- a/mail/mail-config.c +++ b/mail/mail-config.c @@ -80,8 +80,6 @@ typedef struct { EAccountList *accounts; guint accounts_notify_id; - GHashTable *threaded_hash; - GSList *signatures; int sig_nextid; @@ -418,24 +416,6 @@ mail_config_write (void) gconf_client_suggest_sync (config->gconf, NULL); } -static gboolean -hash_save_state (gpointer key, gpointer value, gpointer user_data) -{ - char *path; - gboolean bool = GPOINTER_TO_INT (value); - -#warning "need to rewrite hash_save_state(), probably shouldn't use gconf tho" -#if 0 - path = g_strconcat ("/apps/Evolution/Mail/", (char *)user_data, "/", (char *)key, - NULL); - e_config_listener_set_boolean (config->db, path, bool); - g_free (path); - g_free (key); -#endif - - return TRUE; -} - void mail_config_write_on_exit (void) { @@ -450,10 +430,6 @@ mail_config_write_on_exit (void) mail_config_write (); } - /* Message Threading */ - if (config->threaded_hash) - g_hash_table_foreach_remove (config->threaded_hash, hash_save_state, "Threads"); - /* Passwords */ /* then we make sure the ones we want to remember are in the @@ -534,65 +510,6 @@ uri_to_key (const char *uri) return rval; } -gboolean -mail_config_get_thread_list (const char *uri) -{ -#warning "FIXME: need to rework how we save state, probably shouldn't use gconf" -#if 0 - if (uri && *uri) { - gpointer key, val; - char *dbkey; - - dbkey = uri_to_key (uri); - - if (!config->threaded_hash) - config->threaded_hash = g_hash_table_new (g_str_hash, g_str_equal); - - if (!g_hash_table_lookup_extended (config->threaded_hash, dbkey, &key, &val)) { - gboolean value; - char *str; - - str = g_strdup_printf ("/apps/Evolution/Mail/Threads/%s", dbkey); - value = e_config_listener_get_boolean_with_default (config->db, str, FALSE, NULL); - g_free (str); - - g_hash_table_insert (config->threaded_hash, dbkey, - GINT_TO_POINTER (value)); - - return value; - } else { - g_free(dbkey); - return GPOINTER_TO_INT (val); - } - } -#endif - - /* return the default value */ - - return gconf_client_get_bool (config->gconf, "/apps/evolution/mail/display/thread_list", NULL); -} - -void -mail_config_set_thread_list (const char *uri, gboolean value) -{ - if (uri && *uri) { - char *dbkey = uri_to_key (uri); - gpointer key, val; - - if (!config->threaded_hash) - config->threaded_hash = g_hash_table_new (g_str_hash, g_str_equal); - - if (g_hash_table_lookup_extended (config->threaded_hash, dbkey, &key, &val)) { - g_hash_table_insert (config->threaded_hash, dbkey, - GINT_TO_POINTER (value)); - g_free (dbkey); - } else { - g_hash_table_insert (config->threaded_hash, dbkey, - GINT_TO_POINTER (value)); - } - } -} - const char * mail_config_get_label_name (int label) { @@ -982,7 +899,6 @@ mail_config_uri_renamed (GCompareFunc uri_cmp, const char *old, const char *new) EAccount *account; EIterator *iter; int i, work = 0; - gpointer oldkey, newkey, hashkey; gpointer val; char *oldname, *newname; char *cachenames[] = { "config/hidestate-", @@ -1013,21 +929,6 @@ mail_config_uri_renamed (GCompareFunc uri_cmp, const char *old, const char *new) g_object_unref (iter); - oldkey = uri_to_key (old); - newkey = uri_to_key (new); - - /* call this to load the hash table and the key */ - mail_config_get_thread_list (old); - if (g_hash_table_lookup_extended (config->threaded_hash, oldkey, &hashkey, &val)) { - /*printf ("changing key in threaded_hash\n");*/ - g_hash_table_remove (config->threaded_hash, hashkey); - g_hash_table_insert (config->threaded_hash, g_strdup (newkey), val); - work = 2; - } - - g_free (oldkey); - g_free (newkey); - /* ignore return values or if the files exist or * not, doesn't matter */ |