diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-11-22 01:42:34 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-11-22 13:12:36 +0800 |
commit | 5fabd29bd2580bbe479034634b405abfa36bb500 (patch) | |
tree | 1ed5bb5fed2f74e3fd2d831ac84b929d55ab5ca9 /mail/e-mail-browser.c | |
parent | f9ffebc2f7a6fb285e686133dcccf17766c2ba79 (diff) | |
download | gsoc2013-evolution-5fabd29bd2580bbe479034634b405abfa36bb500.tar.gz gsoc2013-evolution-5fabd29bd2580bbe479034634b405abfa36bb500.tar.zst gsoc2013-evolution-5fabd29bd2580bbe479034634b405abfa36bb500.zip |
Add EMailReader.get_preview_pane() method.
Also give EMailReader::show-search-bar signal a default implementation,
since it can now dig up the search bar widget itself.
Diffstat (limited to 'mail/e-mail-browser.c')
-rw-r--r-- | mail/e-mail-browser.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/mail/e-mail-browser.c b/mail/e-mail-browser.c index 29ddf3df09..dbc2500713 100644 --- a/mail/e-mail-browser.c +++ b/mail/e-mail-browser.c @@ -64,7 +64,7 @@ struct _EMailBrowserPrivate { GtkWidget *main_toolbar; GtkWidget *message_list; GtkWidget *alert_bar; - GtkWidget *search_bar; + GtkWidget *preview_pane; GtkWidget *statusbar; guint show_deleted : 1; @@ -529,9 +529,9 @@ mail_browser_dispose (GObject *object) priv->alert_bar = NULL; } - if (priv->search_bar != NULL) { - g_object_unref (priv->search_bar); - priv->search_bar = NULL; + if (priv->preview_pane != NULL) { + g_object_unref (priv->preview_pane); + priv->preview_pane = NULL; } if (priv->statusbar != NULL) { @@ -705,10 +705,10 @@ mail_browser_constructed (GObject *object) widget = e_preview_pane_new (web_view); gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0); + browser->priv->preview_pane = g_object_ref (widget); gtk_widget_show (widget); search_bar = e_preview_pane_get_search_bar (E_PREVIEW_PANE (widget)); - browser->priv->search_bar = g_object_ref (search_bar); g_signal_connect_swapped ( search_bar, "changed", @@ -854,6 +854,16 @@ mail_browser_get_popup_menu (EMailReader *reader) return GTK_MENU (widget); } +static EPreviewPane * +mail_browser_get_preview_pane (EMailReader *reader) +{ + EMailBrowser *browser; + + browser = E_MAIL_BROWSER (reader); + + return E_PREVIEW_PANE (browser->priv->preview_pane); +} + static GtkWindow * mail_browser_get_window (EMailReader *reader) { @@ -889,16 +899,6 @@ mail_browser_set_message (EMailReader *reader, } static void -mail_browser_show_search_bar (EMailReader *reader) -{ - EMailBrowser *browser; - - browser = E_MAIL_BROWSER (reader); - - gtk_widget_show (browser->priv->search_bar); -} - -static void e_mail_browser_class_init (EMailBrowserClass *class) { GObjectClass *object_class; @@ -982,9 +982,9 @@ e_mail_browser_reader_init (EMailReaderInterface *interface) interface->get_hide_deleted = mail_browser_get_hide_deleted; interface->get_message_list = mail_browser_get_message_list; interface->get_popup_menu = mail_browser_get_popup_menu; + interface->get_preview_pane = mail_browser_get_preview_pane; interface->get_window = mail_browser_get_window; interface->set_message = mail_browser_set_message; - interface->show_search_bar = mail_browser_show_search_bar; } static void |