diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-08-10 09:38:06 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-09-14 20:08:47 +0800 |
commit | 05f73c28429519681a1983a61245df080b6b9ef5 (patch) | |
tree | 2168eea19bb86fdc6f24b710bac4553f65041e1e /mail/em-folder-tree.c | |
parent | bf1b8a45c5a45f96679a9a82589393c20631f6a8 (diff) | |
download | gsoc2013-evolution-05f73c28429519681a1983a61245df080b6b9ef5.tar gsoc2013-evolution-05f73c28429519681a1983a61245df080b6b9ef5.tar.gz gsoc2013-evolution-05f73c28429519681a1983a61245df080b6b9ef5.tar.bz2 gsoc2013-evolution-05f73c28429519681a1983a61245df080b6b9ef5.tar.lz gsoc2013-evolution-05f73c28429519681a1983a61245df080b6b9ef5.tar.xz gsoc2013-evolution-05f73c28429519681a1983a61245df080b6b9ef5.tar.zst gsoc2013-evolution-05f73c28429519681a1983a61245df080b6b9ef5.zip |
Add em_folder_tree_new_with_model().
This is so an EMFolderTree can be created with a custom model, such as
perhaps only a subset of available stores added.
Diffstat (limited to 'mail/em-folder-tree.c')
-rw-r--r-- | mail/em-folder-tree.c | 16 |
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)); |