aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-tree.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-02-16 20:14:49 +0800
committerMilan Crha <mcrha@redhat.com>2011-02-16 20:14:49 +0800
commit94e43758de5e90ff3acf70654a53ddf787495f1b (patch)
tree0f7e8bd91d339d92f94221cf61e1623624fdbeba /mail/em-folder-tree.c
parentfd0b59503481461304b8c9818066eb7ce28dfe25 (diff)
downloadgsoc2013-evolution-94e43758de5e90ff3acf70654a53ddf787495f1b.tar.gz
gsoc2013-evolution-94e43758de5e90ff3acf70654a53ddf787495f1b.tar.zst
gsoc2013-evolution-94e43758de5e90ff3acf70654a53ddf787495f1b.zip
Bug #638333 - Critical warning when invoking File->New->Mail Folder
Diffstat (limited to 'mail/em-folder-tree.c')
-rw-r--r--mail/em-folder-tree.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index 51a116f643..69a34357a6 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -64,6 +64,7 @@
#include "e-mail-local.h"
#include "e-mail-session.h"
+#include "e-mail-store.h"
#define d(x)
@@ -1695,8 +1696,18 @@ em_folder_tree_get_type (void)
GtkWidget *
em_folder_tree_new (EMailSession *session)
{
+ const gchar *data_dir;
+ EShell *default_shell;
+ EShellBackend *mail_backend;
+
g_return_val_if_fail (E_IS_MAIL_SESSION (session), NULL);
+ default_shell = e_shell_get_default ();
+ mail_backend = e_shell_get_backend_by_name (default_shell, "mail");
+ data_dir = e_shell_backend_get_data_dir (mail_backend);
+
+ e_mail_store_init (session, data_dir);
+
return g_object_new (
EM_TYPE_FOLDER_TREE, "session", session, NULL);
}