aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-component.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-12-02 06:18:49 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-12-02 06:18:49 +0800
commit81660eb86333fcb3d3e643300c4e041396e92b98 (patch)
tree36330b5db2dc6d0a57246aff225fa73a865bb3da /mail/mail-component.c
parent7af66de0238f45979c19eaa3cc9a2e2ba1d9dea0 (diff)
downloadgsoc2013-evolution-81660eb86333fcb3d3e643300c4e041396e92b98.tar.gz
gsoc2013-evolution-81660eb86333fcb3d3e643300c4e041396e92b98.tar.zst
gsoc2013-evolution-81660eb86333fcb3d3e643300c4e041396e92b98.zip
Updated to call em_folder_tree_model_set_folder_info().
2003-12-01 Jeffrey Stedfast <fejj@ximian.com> * em-folder-tree.c (em_folder_tree_get_folder_info__got): Updated to call em_folder_tree_model_set_folder_info(). (folder_subscribed_cb): Removed. (folder_unsubscribed_cb): Removed. (folder_created_cb): Removed. (folder_deleted_cb): Removed. (folder_renamed_cb): Removed. * em-folder-tree-model.c (em_folder_tree_store_set_folder_info): New function to replace tree_store_set_folder_info() which had been in em-folder-tree.c (em_folder_tree_model_remove_uri): Made private. (em_folder_tree_model_remove_store_info): Made private. (em_folder_tree_model_remove_folders): New function to replace remove_folders() from em-folder-tree.c (em_folder_tree_model_new): No longer takes any args. * em-folder-tree.c (em_folder_tree_new): Updated. * mail-component.c (add_store): Add the store to the model rather than the treeview. (impl_createControls): create a new treeview based on the already-instantiated model. (mail_component_init): Create a new tree model. (mail_component_remove_store): Remove the store from the model directly. (mail_component_get_tree_model): Updated. * em-folder-tree.c (folder_unsubscribed_cb): Call em_folder_tree_model_remove_folders() rather than the deprecated internal remove_folders() function. (folder_renamed_cb): Same. (em_folder_tree_remove_store): Removed. (em_folder_tree_add_store): Removed. (remove_folders): Removed. svn path=/trunk/; revision=23545
Diffstat (limited to 'mail/mail-component.c')
-rw-r--r--mail/mail-component.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/mail/mail-component.c b/mail/mail-component.c
index c278e6217b..6f06889e81 100644
--- a/mail/mail-component.c
+++ b/mail/mail-component.c
@@ -77,7 +77,7 @@ static BonoboObjectClass *parent_class = NULL;
struct _MailComponentPrivate {
char *base_directory;
- EMFolderTree *emft;
+ EMFolderTreeModel *model;
MailAsyncEvent *async_event;
GHashTable *store_hash; /* display_name by store */
@@ -96,7 +96,7 @@ add_store (MailComponent *component, const char *name, CamelStore *store, CamelE
{
camel_object_ref (store);
g_hash_table_insert (component->priv->store_hash, store, g_strdup (name));
- em_folder_tree_add_store (component->priv->emft, store, name);
+ em_folder_tree_model_add_store (component->priv->model, store, name);
mail_note_store (store, NULL, NULL, NULL);
}
@@ -327,8 +327,8 @@ impl_createControls (PortableServer_Servant servant,
GtkWidget *tree_widget;
GtkWidget *view_widget;
- tree_widget = (GtkWidget *) priv->emft;
view_widget = em_folder_browser_new ();
+ tree_widget = (GtkWidget *) em_folder_tree_new_with_model (priv->model);
em_format_set_session ((EMFormat *) ((EMFolderView *) view_widget)->preview, session);
gtk_widget_show (tree_widget);
@@ -431,7 +431,7 @@ mail_component_init (MailComponent *component)
if (camel_mkdir (priv->base_directory, 0777) == -1 && errno != EEXIST)
abort ();
- priv->emft = (EMFolderTree *) em_folder_tree_new ();
+ priv->model = em_folder_tree_model_new ();
/* EPFIXME: Turn into an object? */
mail_session_init (priv->base_directory);
@@ -624,7 +624,7 @@ mail_component_remove_store (MailComponent *component, CamelStore *store)
being removed. ?? */
mail_note_store_remove (store);
- em_folder_tree_remove_store (priv->emft, store);
+ em_folder_tree_model_remove_store (priv->model, store);
mail_async_event_emit (priv->async_event, MAIL_ASYNC_THREAD, (MailAsyncFunc) store_disconnect, store, NULL, NULL);
}
@@ -675,12 +675,8 @@ mail_component_remove_folder (MailComponent *component, CamelStore *store, const
EMFolderTreeModel *
mail_component_get_tree_model (MailComponent *component)
{
- EMFolderTreeModel *model;
-
- model = em_folder_tree_get_model (component->priv->emft);
- g_object_ref (model);
-
- return model;
+ g_object_ref (component->priv->model);
+ return component->priv->model;
}
struct _CamelFolder *