diff options
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 10 | ||||
-rw-r--r-- | mail/folder-browser.c | 2 | ||||
-rw-r--r-- | mail/mail-config.c | 23 |
3 files changed, 29 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index f59364ae39..bc372e151c 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,13 @@ +2001-06-26 Jeffrey Stedfast <fejj@ximian.com> + + * folder-browser.c (my_folder_browser_init): Helps if I spell + "received" correctly. + + * mail-config.c (mail_config_set_thread_list): If the value is + already in the hash table, first remove it before setting the new + value so we don't leak. + (mail_config_set_show_preview): Same. + 2001-06-26 Dan Winship <danw@ximian.com> * mail-mt.c (op_status_timeout): Don't pop up a progress dialog to diff --git a/mail/folder-browser.c b/mail/folder-browser.c index d43a03e04c..5acc7f8c7e 100644 --- a/mail/folder-browser.c +++ b/mail/folder-browser.c @@ -1788,7 +1788,7 @@ my_folder_browser_init (GtkObject *object) e_tree_drag_dest_set (fb->message_list->tree, GTK_DEST_DEFAULT_ALL, drag_types, num_drag_types, GDK_ACTION_MOVE | GDK_ACTION_COPY); - gtk_signal_connect (GTK_OBJECT (fb->message_list->tree), "tree_drag_data_recieved", + gtk_signal_connect (GTK_OBJECT (fb->message_list->tree), "tree_drag_data_received", GTK_SIGNAL_FUNC (message_list_drag_data_recieved), fb); /* cut, copy & paste */ diff --git a/mail/mail-config.c b/mail/mail-config.c index 7c65a5cacb..183c31436a 100644 --- a/mail/mail-config.c +++ b/mail/mail-config.c @@ -819,7 +819,6 @@ mail_config_is_configured (void) gboolean mail_config_get_show_preview (const char *uri) { - return TRUE; if (uri) { gboolean value = FALSE; @@ -829,8 +828,8 @@ mail_config_get_show_preview (const char *uri) value = GPOINTER_TO_INT (g_hash_table_lookup (config->preview_hash, uri)); if (!value) { - /* just in case we got a NULL because it just wasn't in the hash table yet */ - gboolean def; + /* add the preference to the hash table */ + gboolean def = FALSE; char *str; str = g_strdup_printf ("=%s/config/Mail=/Preview/%s", evolution_dir, uri); @@ -855,9 +854,16 @@ void mail_config_set_show_preview (const char *uri, gboolean value) { if (uri) { + gpointer key, val; + if (!config->preview_hash) config->preview_hash = g_hash_table_new (g_str_hash, g_str_equal); + if (g_hash_table_lookup_extended (config->preview_hash, uri, &key, &val)) { + g_hash_table_remove (config->preview_hash, uri); + g_free (key); + } + g_hash_table_insert (config->preview_hash, g_strdup (uri), GINT_TO_POINTER (value)); } else config->show_preview = value; @@ -875,8 +881,8 @@ mail_config_get_thread_list (const char *uri) value = GPOINTER_TO_INT (g_hash_table_lookup (config->threaded_hash, uri)); if (!value) { - /* just in case we got a NULL because it just wasn't in the hash table yet */ - gboolean def; + /* add the preference to the hash table */ + gboolean def = FALSE; char *str; str = g_strdup_printf ("=%s/config/Mail=/Threads/%s", evolution_dir, uri); @@ -901,9 +907,16 @@ void mail_config_set_thread_list (const char *uri, gboolean value) { if (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, uri, &key, &val)) { + g_hash_table_remove (config->threaded_hash, uri); + g_free (key); + } + g_hash_table_insert (config->threaded_hash, g_strdup (uri), GINT_TO_POINTER (value)); } else config->thread_list = value; |