[evolution/email-factory-3-4: 39/47] commit df85cb1b7a47f713cb775f648f735e642a1bb71b Author: Matthew Barnes <mbarnes redhat com> Date:
- From: Srinivasa Ragavan <sragavan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/email-factory-3-4: 39/47] commit df85cb1b7a47f713cb775f648f735e642a1bb71b Author: Matthew Barnes <mbarnes redhat com> Date:
- Date: Tue, 3 Jan 2012 09:38:41 +0000 (UTC)
commit 7248cf9db818cc33dfbe76b0a6fb4d5ee273d3bd
Author: Srinivasa Ragavan <sragavan gnome org>
Date: Tue Jan 3 12:07:58 2012 +0530
commit df85cb1b7a47f713cb775f648f735e642a1bb71b
Author: Matthew Barnes <mbarnes redhat com>
Date: Fri Dec 16 06:34:13 2011 -0500
EMailSession: Add "activity-added" signal.
EMailBackend catches these signals and forwards the
EActivity to e_shell_backend_add_activity().
mail/e-mail-ui-session.c | 28 ++++++++++++++++++++++++++++
mail/e-mail-ui-session.h | 3 +++
2 files changed, 31 insertions(+), 0 deletions(-)
---
diff --git a/mail/e-mail-ui-session.c b/mail/e-mail-ui-session.c
index 1ecf488..49b038c 100644
--- a/mail/e-mail-ui-session.c
+++ b/mail/e-mail-ui-session.c
@@ -88,6 +88,13 @@ enum {
PROP_VFOLDER_STORE
};
+enum {
+ ACTIVITY_ADDED,
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL];
+
G_DEFINE_TYPE_WITH_CODE (
EMailUISession,
e_mail_ui_session,
@@ -737,6 +744,16 @@ e_mail_ui_session_class_init (EMailUISessionClass *class)
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 (EMailUISessionClass, activity_added),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__OBJECT,
+ G_TYPE_NONE, 1,
+ E_TYPE_ACTIVITY);
+
}
static void
@@ -777,3 +794,14 @@ e_mail_ui_session_get_vfolder_store (EMailUISession *session)
return session->priv->vfolder_store;
}
+
+void
+e_mail_session_add_activity (EMailSession *session,
+ EActivity *activity)
+{
+ g_return_if_fail (E_IS_MAIL_UI_SESSION (session));
+ g_return_if_fail (E_IS_ACTIVITY (activity));
+
+ g_signal_emit (session, signals[ACTIVITY_ADDED], 0, activity);
+}
+
diff --git a/mail/e-mail-ui-session.h b/mail/e-mail-ui-session.h
index 3bc9302..5d29634 100644
--- a/mail/e-mail-ui-session.h
+++ b/mail/e-mail-ui-session.h
@@ -32,6 +32,7 @@
#include <libemail-engine/mail-folder-cache.h>
#include <mail/e-mail-enums.h>
#include <mail/e-mail-account-store.h>
+#include <e-util/e-activity.h>
/* Standard GObject macros */
#define E_TYPE_MAIL_UI_SESSION \
@@ -74,6 +75,8 @@ CamelStore * e_mail_ui_session_get_vfolder_store
EMailAccountStore *
e_mail_ui_session_get_account_store
(EMailUISession *session);
+void e_mail_session_add_activity (EMailSession *session,
+ EActivity *activity);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]