aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-tree-model.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-01-29 02:58:44 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-01-29 02:58:44 +0800
commite9cf822d843cf01f3ae20079ea49ed1a4f83c255 (patch)
tree11a105759105a324ef1dfa367fa75653eb800f00 /mail/em-folder-tree-model.c
parentc2d0fb9b196b8cc93b4467f8872eea10e7e8b8c5 (diff)
downloadgsoc2013-evolution-e9cf822d843cf01f3ae20079ea49ed1a4f83c255.tar
gsoc2013-evolution-e9cf822d843cf01f3ae20079ea49ed1a4f83c255.tar.gz
gsoc2013-evolution-e9cf822d843cf01f3ae20079ea49ed1a4f83c255.tar.bz2
gsoc2013-evolution-e9cf822d843cf01f3ae20079ea49ed1a4f83c255.tar.lz
gsoc2013-evolution-e9cf822d843cf01f3ae20079ea49ed1a4f83c255.tar.xz
gsoc2013-evolution-e9cf822d843cf01f3ae20079ea49ed1a4f83c255.tar.zst
gsoc2013-evolution-e9cf822d843cf01f3ae20079ea49ed1a4f83c255.zip
If the store is already in the model, remove it and then re-add it. Fixes
2004-01-28 Jeffrey Stedfast <fejj@ximian.com> * 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
Diffstat (limited to 'mail/em-folder-tree-model.c')
-rw-r--r--mail/em-folder-tree-model.c16
1 files changed, 2 insertions, 14 deletions
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);