[evolution] Make EMailNotebookView and EMailPanedView extensible.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Make EMailNotebookView and EMailPanedView extensible.
- Date: Tue, 22 Nov 2011 05:12:58 +0000 (UTC)
commit 6f3b2df27f1bcd71880879bf8236663b72002086
Author: Matthew Barnes <mbarnes redhat com>
Date: Mon Nov 21 01:02:26 2011 -0500
Make EMailNotebookView and EMailPanedView extensible.
Since they each implement EMailReader.
mail/e-mail-notebook-view.c | 6 +++++-
mail/e-mail-paned-view.c | 18 ++++++++++++------
2 files changed, 17 insertions(+), 7 deletions(-)
---
diff --git a/mail/e-mail-notebook-view.c b/mail/e-mail-notebook-view.c
index e737b88..aa6b373 100644
--- a/mail/e-mail-notebook-view.c
+++ b/mail/e-mail-notebook-view.c
@@ -75,7 +75,9 @@ static void e_mail_notebook_view_reader_init (EMailReaderInterface *interface);
G_DEFINE_TYPE_WITH_CODE (
EMailNotebookView, e_mail_notebook_view, E_TYPE_MAIL_VIEW,
G_IMPLEMENT_INTERFACE (
- E_TYPE_MAIL_READER, e_mail_notebook_view_reader_init))
+ E_TYPE_MAIL_READER, e_mail_notebook_view_reader_init)
+ G_IMPLEMENT_INTERFACE (
+ E_TYPE_EXTENSIBLE, NULL))
#if HAVE_CLUTTER
static void
@@ -624,6 +626,8 @@ mail_notebook_view_constructed (GObject *object)
priv->book, "switch-page",
G_CALLBACK (mnv_page_changed), object);
+ e_extensible_load_extensions (E_EXTENSIBLE (object));
+
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (e_mail_notebook_view_parent_class)->constructed (object);
}
diff --git a/mail/e-mail-paned-view.c b/mail/e-mail-paned-view.c
index c9ebb8a..84e7894 100644
--- a/mail/e-mail-paned-view.c
+++ b/mail/e-mail-paned-view.c
@@ -86,7 +86,9 @@ static void e_mail_paned_view_reader_init (EMailReaderInterface *interface);
G_DEFINE_TYPE_WITH_CODE (
EMailPanedView, e_mail_paned_view, E_TYPE_MAIL_VIEW,
G_IMPLEMENT_INTERFACE (
- E_TYPE_MAIL_READER, e_mail_paned_view_reader_init))
+ E_TYPE_MAIL_READER, e_mail_paned_view_reader_init)
+ G_IMPLEMENT_INTERFACE (
+ E_TYPE_EXTENSIBLE, NULL))
static void
mail_paned_view_save_boolean (EMailView *view,
@@ -626,11 +628,13 @@ mail_paned_view_constructed (GObject *object)
shell_settings = e_shell_get_shell_settings (shell);
/* Make headers collapsable and store state of headers in config file */
- em_format_html_set_headers_collapsable (EM_FORMAT_HTML (priv->formatter), TRUE);
- g_object_bind_property (shell_settings, "paned-view-headers-state",
- EM_FORMAT_HTML (priv->formatter), "headers-state",
- G_BINDING_BIDIRECTIONAL |
- G_BINDING_SYNC_CREATE);
+ em_format_html_set_headers_collapsable (
+ EM_FORMAT_HTML (priv->formatter), TRUE);
+ g_object_bind_property (
+ shell_settings, "paned-view-headers-state",
+ priv->formatter, "headers-state",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
web_view = em_format_html_get_web_view (
EM_FORMAT_HTML (priv->formatter));
@@ -718,6 +722,8 @@ mail_paned_view_constructed (GObject *object)
* set_preview_visible() method relies on it. */
e_mail_view_set_preview_visible (view, TRUE);
+ e_extensible_load_extensions (E_EXTENSIBLE (object));
+
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (e_mail_paned_view_parent_class)->constructed (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]