[evolution/email-factory-3-4: 46/53] commit e3735c74444e3fdc35d1677c3cdf68dfc174ce10 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: 46/53] commit e3735c74444e3fdc35d1677c3cdf68dfc174ce10 Author: Matthew Barnes <mbarnes redhat com> Date:
- Date: Tue, 17 Jan 2012 14:58:21 +0000 (UTC)
commit 49a2c83d06789c2ffee6f0f9a64cebf8b58a4dbc
Author: Srinivasa Ragavan <sragavan gnome org>
Date: Tue Jan 3 13:15:30 2012 +0530
commit e3735c74444e3fdc35d1677c3cdf68dfc174ce10
Author: Matthew Barnes <mbarnes redhat com>
Date: Sat Dec 24 17:44:51 2011 -0500
Move EMailLabelListStore to EMailSession.
Access the EMailLabelListStore through EMailSession instead
of EShellSettings, which was a quick hack of mine during
kill-bonobo.
mail/e-mail-ui-session.c | 39 ++++++++++++++++++++++++++++++++++++++-
mail/e-mail-ui-session.h | 2 ++
2 files changed, 40 insertions(+), 1 deletions(-)
---
diff --git a/mail/e-mail-ui-session.c b/mail/e-mail-ui-session.c
index 697d572..b12dc56 100644
--- a/mail/e-mail-ui-session.c
+++ b/mail/e-mail-ui-session.c
@@ -82,6 +82,7 @@ struct _EMailUISessionPrivate {
FILE *filter_logfile;
CamelStore *vfolder_store;
EMailAccountStore *account_store;
+ EMailLabelListStore *label_store;
EAccountList *account_list;
gulong account_changed_handler_id;
@@ -90,6 +91,7 @@ struct _EMailUISessionPrivate {
enum {
PROP_0,
PROP_ACCOUNT_STORE,
+ PROP_LABEL_STORE,
PROP_VFOLDER_STORE
};
@@ -466,6 +468,12 @@ mail_ui_session_dispose (GObject *object)
priv->account_store = NULL;
}
+ if (priv->label_store != NULL) {
+ g_object_unref (priv->label_store);
+ priv->label_store = NULL;
+ }
+
+
if (priv->vfolder_store != NULL) {
g_object_unref (priv->vfolder_store);
priv->vfolder_store = NULL;
@@ -699,6 +707,14 @@ mail_ui_session_get_property (GObject *object,
E_MAIL_UI_SESSION (object)));
return;
+ case PROP_LABEL_STORE:
+ g_value_set_object (
+ value,
+ e_mail_session_get_label_store (
+ E_MAIL_SESSION (object)));
+ return;
+
+
case PROP_VFOLDER_STORE:
g_value_set_object (
value,
@@ -800,7 +816,17 @@ e_mail_ui_session_class_init (EMailUISessionClass *class)
CAMEL_TYPE_STORE,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
-
+ g_object_class_install_property (
+ object_class,
+ PROP_LABEL_STORE,
+ g_param_spec_object (
+ "label-store",
+ "Label Store",
+ "Mail label store",
+ E_TYPE_MAIL_LABEL_LIST_STORE,
+ G_PARAM_READABLE |
+ G_PARAM_STATIC_STRINGS));
+
signals[ACTIVITY_ADDED] = g_signal_new (
"activity-added",
G_OBJECT_CLASS_TYPE (class),
@@ -816,6 +842,8 @@ e_mail_ui_session_class_init (EMailUISessionClass *class)
static void
e_mail_ui_session_init (EMailUISession *session)
{
+ session->priv = E_MAIL_UI_SESSION_GET_PRIVATE (session);
+ session->priv->label_store = e_mail_label_list_store_new ();
}
@@ -862,3 +890,12 @@ e_mail_session_add_activity (EMailSession *session,
g_signal_emit (session, signals[ACTIVITY_ADDED], 0, activity);
}
+EMailLabelListStore *
+e_mail_session_get_label_store (EMailSession *session)
+{
+ g_return_val_if_fail (E_IS_MAIL_SESSION (session), NULL);
+
+ return session->priv->label_store;
+}
+
+
diff --git a/mail/e-mail-ui-session.h b/mail/e-mail-ui-session.h
index 5d29634..46d98cc 100644
--- a/mail/e-mail-ui-session.h
+++ b/mail/e-mail-ui-session.h
@@ -77,6 +77,8 @@ EMailAccountStore *
(EMailUISession *session);
void e_mail_session_add_activity (EMailSession *session,
EActivity *activity);
+EMailLabelListStore *
+ e_mail_session_get_label_store (EMailSession *session);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]