diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-07-26 23:15:44 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-07-27 00:26:55 +0800 |
commit | 36b9debed099b1ad0b5d6a8af792f620bf7f124a (patch) | |
tree | 797f5587b1a6503ca0751c0243989a21eafab700 /mail/e-mail-message-pane.c | |
parent | 9279429501af7858716b0e317810a264192bb763 (diff) | |
download | gsoc2013-evolution-36b9debed099b1ad0b5d6a8af792f620bf7f124a.tar.gz gsoc2013-evolution-36b9debed099b1ad0b5d6a8af792f620bf7f124a.tar.zst gsoc2013-evolution-36b9debed099b1ad0b5d6a8af792f620bf7f124a.zip |
More code cleanup.
Diffstat (limited to 'mail/e-mail-message-pane.c')
-rw-r--r-- | mail/e-mail-message-pane.c | 75 |
1 files changed, 13 insertions, 62 deletions
diff --git a/mail/e-mail-message-pane.c b/mail/e-mail-message-pane.c index 8ca6802639..8df46a1a39 100644 --- a/mail/e-mail-message-pane.c +++ b/mail/e-mail-message-pane.c @@ -36,46 +36,8 @@ struct _EMailMessagePanePrivate { gint placeholder; }; -enum { - PROP_0, - PROP_PREVIEW_VISIBLE -}; - G_DEFINE_TYPE (EMailMessagePane, e_mail_message_pane, E_TYPE_MAIL_PANED_VIEW) -/* This is too trivial to put in a file. - * It gets merged with the EMailReader UI. */ -static void -mail_message_pane_set_property (GObject *object, - guint property_id, - const GValue *value, - GParamSpec *pspec) -{ - switch (property_id) { - case PROP_PREVIEW_VISIBLE: - return; - } - - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); -} - -static void -mail_message_pane_get_property (GObject *object, - guint property_id, - GValue *value, - GParamSpec *pspec) -{ - switch (property_id) { - case PROP_PREVIEW_VISIBLE: - g_value_set_boolean ( - value, - TRUE); - return; - } - - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); -} - static void mail_message_pane_constructed (GObject *object) { @@ -90,19 +52,17 @@ mail_message_pane_constructed (GObject *object) e_mail_paned_view_hide_message_list_pane (E_MAIL_PANED_VIEW(object), FALSE); } -static void -message_pane_set_preview_visible (EMailView *view, - gboolean preview_visible) +static gboolean +mail_message_pane_get_preview_visible (EMailView *view) { - /* Chain up to parent's set_preview_visible() method. */ - E_MAIL_VIEW_CLASS (e_mail_message_pane_parent_class)-> - set_preview_visible (view, TRUE); + return TRUE; } -static gboolean -message_pane_get_preview_visible (EMailView *view) +static void +mail_message_pane_set_preview_visible (EMailView *view, + gboolean preview_visible) { - return TRUE; + /* Ignore the request. */ } static void @@ -114,18 +74,11 @@ e_mail_message_pane_class_init (EMailMessagePaneClass *class) g_type_class_add_private (class, sizeof (EMailMessagePanePrivate)); object_class = G_OBJECT_CLASS (class); - object_class->set_property = mail_message_pane_set_property; - object_class->get_property = mail_message_pane_get_property; object_class->constructed = mail_message_pane_constructed; mail_view_class = E_MAIL_VIEW_CLASS (class); - mail_view_class->set_preview_visible = message_pane_set_preview_visible; - mail_view_class->get_preview_visible = message_pane_get_preview_visible; - - g_object_class_override_property ( - object_class, - PROP_PREVIEW_VISIBLE, - "preview-visible"); + mail_view_class->get_preview_visible = mail_message_pane_get_preview_visible; + mail_view_class->set_preview_visible = mail_message_pane_set_preview_visible; } static void @@ -134,14 +87,12 @@ e_mail_message_pane_init (EMailMessagePane *browser) browser->priv = E_MAIL_MESSAGE_PANE_GET_PRIVATE (browser); } -GtkWidget * -e_mail_message_pane_new (EShellContent *content) +EMailView * +e_mail_message_pane_new (EShellView *shell_view) { - g_return_val_if_fail (E_IS_SHELL_CONTENT (content), NULL); + g_return_val_if_fail (E_IS_SHELL_VIEW (shell_view), NULL); return g_object_new ( E_TYPE_MAIL_MESSAGE_PANE, - "shell-content", content, - "preview-visible", TRUE, - NULL); + "shell-view", shell_view, NULL); } |