aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/em-folder-tree.c25
-rw-r--r--mail/em-folder-tree.h1
2 files changed, 26 insertions, 0 deletions
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index 8d856c12e5..aa15a797d6 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -1767,6 +1767,31 @@ em_folder_tree_new (EMailBackend *backend,
"backend", backend, NULL);
}
+EActivity *
+em_folder_tree_new_activity (EMFolderTree *folder_tree)
+{
+ EActivity *activity;
+ EMailBackend *backend;
+ EAlertSink *alert_sink;
+ GCancellable *cancellable;
+
+ g_return_val_if_fail (EM_IS_FOLDER_TREE (folder_tree), NULL);
+
+ activity = e_activity_new ();
+
+ alert_sink = em_folder_tree_get_alert_sink (folder_tree);
+ e_activity_set_alert_sink (activity, alert_sink);
+
+ cancellable = camel_operation_new ();
+ e_activity_set_cancellable (activity, cancellable);
+ g_object_unref (cancellable);
+
+ backend = em_folder_tree_get_backend (folder_tree);
+ e_shell_backend_add_activity (E_SHELL_BACKEND (backend), activity);
+
+ return activity;
+}
+
PangoEllipsizeMode
em_folder_tree_get_ellipsize (EMFolderTree *folder_tree)
{
diff --git a/mail/em-folder-tree.h b/mail/em-folder-tree.h
index d2cd643d37..0e6eba4659 100644
--- a/mail/em-folder-tree.h
+++ b/mail/em-folder-tree.h
@@ -92,6 +92,7 @@ struct _EMFolderTreeClass {
GType em_folder_tree_get_type (void);
GtkWidget * em_folder_tree_new (EMailBackend *backend,
EAlertSink *alert_sink);
+EActivity * em_folder_tree_new_activity (EMFolderTree *folder_tree);
PangoEllipsizeMode
em_folder_tree_get_ellipsize (EMFolderTree *folder_tree);
void em_folder_tree_set_ellipsize (EMFolderTree *folder_tree,