aboutsummaryrefslogtreecommitdiffstats
path: root/mail/e-mail-view.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/e-mail-view.c')
-rw-r--r--mail/e-mail-view.c55
1 files changed, 55 insertions, 0 deletions
diff --git a/mail/e-mail-view.c b/mail/e-mail-view.c
index a5ff760541..dd99f9317d 100644
--- a/mail/e-mail-view.c
+++ b/mail/e-mail-view.c
@@ -37,6 +37,11 @@ enum {
LAST_SIGNAL
};
+enum {
+ PROP_0,
+ PROP_SHELL_VIEW
+};
+
static guint signals[LAST_SIGNAL] = { 0 };
static void
@@ -54,12 +59,47 @@ e_mail_view_finalize (GObject *object)
}
static void
+mail_view_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ switch (property_id) {
+ case PROP_SHELL_VIEW:
+ E_MAIL_VIEW(object)->content = g_value_get_object (value);
+
+ return;
+ }
+
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+}
+
+static void
+mail_view_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ switch (property_id) {
+ case PROP_SHELL_VIEW:
+ g_value_set_object (
+ value, E_MAIL_VIEW(object)->content);
+
+ return;
+ }
+
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+}
+
+static void
e_mail_view_class_init (EMailViewClass *klass)
{
GObjectClass * object_class = G_OBJECT_CLASS (klass);
e_mail_view_parent_class = g_type_class_peek_parent (klass);
object_class->finalize = e_mail_view_finalize;
+ object_class->set_property = mail_view_set_property;
+ object_class->get_property = mail_view_get_property;
signals[PANE_CLOSE] =
g_signal_new ("pane-close",
@@ -69,6 +109,21 @@ e_mail_view_class_init (EMailViewClass *klass)
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
+ /**
+ * EMailView:shell-content
+ *
+ * The #EShellContent to which the widget belongs.
+ **/
+ g_object_class_install_property (
+ object_class,
+ PROP_SHELL_VIEW,
+ g_param_spec_object (
+ "shell-content",
+ NULL,
+ NULL,
+ E_TYPE_SHELL_CONTENT,
+ G_PARAM_READWRITE |
+ G_PARAM_CONSTRUCT_ONLY));
}