aboutsummaryrefslogtreecommitdiffstats
path: root/mail/e-mail-session.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-12-16 19:34:13 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-12-16 23:57:57 +0800
commitdf85cb1b7a47f713cb775f648f735e642a1bb71b (patch)
treebf10c7928cc7074e22a64fb268413577b0b780da /mail/e-mail-session.c
parent0427f2cac23a9ccec8590515678bc1ae32c54cf5 (diff)
downloadgsoc2013-evolution-df85cb1b7a47f713cb775f648f735e642a1bb71b.tar.gz
gsoc2013-evolution-df85cb1b7a47f713cb775f648f735e642a1bb71b.tar.zst
gsoc2013-evolution-df85cb1b7a47f713cb775f648f735e642a1bb71b.zip
EMailSession: Add "activity-added" signal.
EMailBackend catches these signals and forwards the EActivity to e_shell_backend_add_activity().
Diffstat (limited to 'mail/e-mail-session.c')
-rw-r--r--mail/e-mail-session.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/mail/e-mail-session.c b/mail/e-mail-session.c
index ba4819d9e0..24fd0be3ef 100644
--- a/mail/e-mail-session.c
+++ b/mail/e-mail-session.c
@@ -117,6 +117,13 @@ enum {
PROP_VFOLDER_STORE
};
+enum {
+ ACTIVITY_ADDED,
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL];
+
static const gchar *local_folder_names[E_MAIL_NUM_LOCAL_FOLDERS] = {
N_("Inbox"), /* E_MAIL_LOCAL_FOLDER_INBOX */
N_("Drafts"), /* E_MAIL_LOCAL_FOLDER_DRAFTS */
@@ -1772,6 +1779,16 @@ e_mail_session_class_init (EMailSessionClass *class)
CAMEL_TYPE_STORE,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
+
+ signals[ACTIVITY_ADDED] = g_signal_new (
+ "activity-added",
+ G_OBJECT_CLASS_TYPE (class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EMailSessionClass, activity_added),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__OBJECT,
+ G_TYPE_NONE, 1,
+ E_TYPE_ACTIVITY);
}
static void
@@ -1826,6 +1843,16 @@ e_mail_session_new (void)
NULL);
}
+void
+e_mail_session_add_activity (EMailSession *session,
+ EActivity *activity)
+{
+ g_return_if_fail (E_IS_MAIL_SESSION (session));
+ g_return_if_fail (E_IS_ACTIVITY (activity));
+
+ g_signal_emit (session, signals[ACTIVITY_ADDED], 0, activity);
+}
+
EMailAccountStore *
e_mail_session_get_account_store (EMailSession *session)
{