aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-04-01 21:16:56 +0800
committerMilan Crha <mcrha@redhat.com>2010-04-01 21:16:56 +0800
commit0fb529bac06fd4d423e32d49b46b69008b5964f2 (patch)
treea3c4622e268e504aec749f02721d13c42b467ed8
parentbf3a5df6d947669e62926ea2d5f25f73503faaaf (diff)
downloadgsoc2013-evolution-0fb529bac06fd4d423e32d49b46b69008b5964f2.tar.gz
gsoc2013-evolution-0fb529bac06fd4d423e32d49b46b69008b5964f2.tar.zst
gsoc2013-evolution-0fb529bac06fd4d423e32d49b46b69008b5964f2.zip
Bug #612916 - Runtime error on console when opening a message window
-rw-r--r--mail/e-mail-browser.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/mail/e-mail-browser.c b/mail/e-mail-browser.c
index 26d3a876f1..a6461e2bfe 100644
--- a/mail/e-mail-browser.c
+++ b/mail/e-mail-browser.c
@@ -481,16 +481,24 @@ mail_browser_constructed (GObject *object)
const gchar *id;
guint merge_id;
+ /* Chain up to parent's constructed() method. */
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
+
priv = E_MAIL_BROWSER_GET_PRIVATE (object);
reader = E_MAIL_READER (object);
- ui_manager = priv->ui_manager;
- domain = GETTEXT_PACKAGE;
- html_display = e_mail_reader_get_html_display (reader);
shell_backend = e_mail_reader_get_shell_backend (reader);
-
shell = e_shell_backend_get_shell (shell_backend);
+
+ ui_manager = e_ui_manager_new ();
+ e_shell_configure_ui_manager (shell, E_UI_MANAGER (ui_manager));
+
+ priv->ui_manager = ui_manager;
+ domain = GETTEXT_PACKAGE;
+
+ html_display = e_mail_reader_get_html_display (reader);
e_shell_watch_window (shell, GTK_WINDOW (object));
web_view = E_WEB_VIEW (EM_FORMAT_HTML (html_display)->html);
@@ -796,23 +804,11 @@ mail_browser_iface_init (EMailReaderIface *iface)
static void
mail_browser_init (EMailBrowser *browser)
{
- EShell *shell;
- EShellBackend *shell_backend;
- GtkUIManager *ui_manager;
- EMailReader *reader;
GConfBridge *bridge;
const gchar *prefix;
browser->priv = E_MAIL_BROWSER_GET_PRIVATE (browser);
- reader = E_MAIL_READER (browser);
- shell_backend = e_mail_reader_get_shell_backend (reader);
- shell = e_shell_backend_get_shell (shell_backend);
-
- ui_manager = e_ui_manager_new ();
- e_shell_configure_ui_manager (shell, E_UI_MANAGER (ui_manager));
-
- browser->priv->ui_manager = ui_manager;
browser->priv->action_group = gtk_action_group_new ("mail-browser");
browser->priv->html_display = em_format_html_display_new ();