aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/em-folder-tree.c')
-rw-r--r--mail/em-folder-tree.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index 26c08fe49c..eb7b3e4215 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -1779,13 +1779,27 @@ em_folder_tree_new (EMailBackend *backend,
EAlertSink *alert_sink)
{
EMFolderTreeModel *model;
+
+ g_return_val_if_fail (E_IS_MAIL_BACKEND (backend), NULL);
+ g_return_val_if_fail (E_IS_ALERT_SINK (alert_sink), NULL);
+
+ model = em_folder_tree_model_get_default ();
+
+ return em_folder_tree_new_with_model (backend, alert_sink, model);
+}
+
+GtkWidget *
+em_folder_tree_new_with_model (EMailBackend *backend,
+ EAlertSink *alert_sink,
+ EMFolderTreeModel *model)
+{
EMailSession *session;
const gchar *data_dir;
g_return_val_if_fail (E_IS_MAIL_BACKEND (backend), NULL);
g_return_val_if_fail (E_IS_ALERT_SINK (alert_sink), NULL);
+ g_return_val_if_fail (EM_IS_FOLDER_TREE_MODEL (model), NULL);
- model = em_folder_tree_model_get_default ();
session = e_mail_backend_get_session (backend);
data_dir = e_shell_backend_get_data_dir (E_SHELL_BACKEND (backend));