From 5282170b4a72eba2068d1d973a567ae5439f5c64 Mon Sep 17 00:00:00 2001 From: Srinivasa Ragavan Date: Thu, 8 Jul 2010 17:10:49 +0530 Subject: More changes and modifications. --- mail/e-mail-view.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) (limited to 'mail/e-mail-view.c') 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 @@ -53,6 +58,39 @@ e_mail_view_finalize (GObject *object) G_OBJECT_CLASS (e_mail_view_parent_class)->finalize (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) { @@ -60,6 +98,8 @@ e_mail_view_class_init (EMailViewClass *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)); } -- cgit v1.2.3