From e9cf822d843cf01f3ae20079ea49ed1a4f83c255 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Wed, 28 Jan 2004 18:58:44 +0000 Subject: If the store is already in the model, remove it and then re-add it. Fixes 2004-01-28 Jeffrey Stedfast * em-folder-tree-model.c (em_folder_tree_model_add_store): If the store is already in the model, remove it and then re-add it. Fixes bug #53422. svn path=/trunk/; revision=24498 --- mail/em-folder-tree-model.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'mail/em-folder-tree-model.c') diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c index 989519c86b..0bcde70a0e 100644 --- a/mail/em-folder-tree-model.c +++ b/mail/em-folder-tree-model.c @@ -671,20 +671,8 @@ em_folder_tree_model_add_store (EMFolderTreeModel *model, CamelStore *store, con g_return_if_fail (CAMEL_IS_STORE (store)); g_return_if_fail (display_name != NULL); - if ((si = g_hash_table_lookup (model->store_hash, store))) { - const char *name; - - path = gtk_tree_row_reference_get_path (si->row); - gtk_tree_model_get_iter ((GtkTreeModel *) model, &iter, path); - gtk_tree_path_free (path); - - gtk_tree_model_get ((GtkTreeModel *) model, &iter, COL_STRING_DISPLAY_NAME, (char **) &name, -1); - - g_warning ("the store `%s' is already in the folder tree as `%s'", - display_name, name); - - return; - } + if ((si = g_hash_table_lookup (model->store_hash, store))) + em_folder_tree_model_remove_store (model, store); uri = camel_url_to_string (((CamelService *) store)->url, CAMEL_URL_HIDE_ALL); -- cgit