From 6908bbda3b2cb195d43f79e656273150380c0235 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Sat, 28 Aug 2004 10:19:44 +0000 Subject: Make sure to instantiate the toolbars model before instantiating the 2004-08-28 Christian Persch * src/ephy-window.c: (ephy_window_init): Make sure to instantiate the toolbars model before instantiating the bookmarksbar model; otherwise forwarding doesn't work. Fixes bug #151267. --- src/ephy-window.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/ephy-window.c') diff --git a/src/ephy-window.c b/src/ephy-window.c index 7feff9d63..9f5d1c2bb 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -590,7 +590,6 @@ ephy_window_fullscreen (EphyWindow *window) gtk_widget_show (popup); - egg_editable_toolbar_set_model (EGG_EDITABLE_TOOLBAR (window->priv->toolbar), EGG_TOOLBARS_MODEL ( @@ -2145,6 +2144,7 @@ ephy_window_init (EphyWindow *window) { EphyExtension *manager; EphyEmbedSingle *single; + EggToolbarsModel *model; LOG ("EphyWindow initialising %p", window) @@ -2188,6 +2188,13 @@ ephy_window_init (EphyWindow *window) window->priv->enc_menu = ephy_encoding_menu_new (window); window->priv->bmk_menu = ephy_bookmarks_menu_new (window); + /* get the toolbars model *before* getting the bookmarksbar model + * (via ephy_bookmarsbar_new()), so that the toolbars model is + * instantiated *before* the bookmarksbarmodel, to make forwarding + * works. See bug #151267. + */ + model= EGG_TOOLBARS_MODEL (ephy_shell_get_toolbars_model (ephy_shell, FALSE)); + /* create the toolbars */ window->priv->toolbar = toolbar_new (window); window->priv->bookmarksbar = ephy_bookmarksbar_new (window); @@ -2218,9 +2225,7 @@ ephy_window_init (EphyWindow *window) * the toolbar */ egg_editable_toolbar_set_model - (EGG_EDITABLE_TOOLBAR (window->priv->toolbar), - EGG_TOOLBARS_MODEL - (ephy_shell_get_toolbars_model (ephy_shell, FALSE))); + (EGG_EDITABLE_TOOLBAR (window->priv->toolbar), model); g_signal_connect (window, "window-state-event", G_CALLBACK (ephy_window_state_event_cb), -- cgit v1.2.3