aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-window.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-06-16 20:31:08 +0800
committerChristian Persch <chpe@src.gnome.org>2004-06-16 20:31:08 +0800
commite107b8c04820a45b8b4daca62e767cdfd8e62e23 (patch)
tree536c5f23466c16b391603b2634ca32f58fddbf6c /src/ephy-window.c
parenta6c12b524b75382eb362e400df3b40c23bf24067 (diff)
downloadgsoc2013-epiphany-e107b8c04820a45b8b4daca62e767cdfd8e62e23.tar
gsoc2013-epiphany-e107b8c04820a45b8b4daca62e767cdfd8e62e23.tar.gz
gsoc2013-epiphany-e107b8c04820a45b8b4daca62e767cdfd8e62e23.tar.bz2
gsoc2013-epiphany-e107b8c04820a45b8b4daca62e767cdfd8e62e23.tar.lz
gsoc2013-epiphany-e107b8c04820a45b8b4daca62e767cdfd8e62e23.tar.xz
gsoc2013-epiphany-e107b8c04820a45b8b4daca62e767cdfd8e62e23.tar.zst
gsoc2013-epiphany-e107b8c04820a45b8b4daca62e767cdfd8e62e23.zip
Go back to construction the toolbar when the model is set, fixes bug
2004-06-16 Christian Persch <chpe@cvs.gnome.org> * lib/egg/egg-editable-toolbar.c: (egg_editable_toolbar_disconnect_model), (egg_editable_toolbar_deconstruct), (egg_editable_toolbar_set_model), (egg_editable_toolbar_class_init), (egg_editable_toolbar_finalize), (egg_editable_toolbar_new), (egg_editable_toolbar_new_with_model), (egg_editable_toolbar_set_fixed): * lib/egg/egg-editable-toolbar.h: * lib/egg/egg-toolbars-model.c: (egg_toolbars_model_get_flags), (parse_toolbars): * src/bookmarks/ephy-bookmarksbar.c: (ephy_bookmarksbar_set_window), (ephy_bookmarksbar_class_init): * src/ephy-window.c: (ephy_window_fullscreen), (ephy_window_unfullscreen), (ephy_window_init): * src/toolbar.c: (toolbar_style_changed_cb), (parent_set_cb), (toolbar_init), (toolbar_finalize), (toolbar_new): Go back to construction the toolbar when the model is set, fixes bug #144191. 2004-06-15 Marco Pesenti Gritti <marco@gnome.org>
Diffstat (limited to 'src/ephy-window.c')
-rw-r--r--src/ephy-window.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 9de3366ae..49c177f7a 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -547,8 +547,10 @@ ephy_window_fullscreen (EphyWindow *window)
"size-changed", G_CALLBACK (size_changed_cb),
window);
- g_object_set (G_OBJECT (window->priv->toolbar), "ToolbarsModel",
- ephy_shell_get_toolbars_model (ephy_shell, TRUE), NULL);
+ egg_editable_toolbar_set_model
+ (EGG_EDITABLE_TOOLBAR (window->priv->toolbar),
+ EGG_TOOLBARS_MODEL (
+ ephy_shell_get_toolbars_model (ephy_shell, TRUE)));
sync_chromes_visibility (window);
}
@@ -565,8 +567,10 @@ ephy_window_unfullscreen (EphyWindow *window)
gtk_widget_destroy (window->priv->exit_fullscreen_popup);
window->priv->exit_fullscreen_popup = NULL;
- g_object_set (G_OBJECT (window->priv->toolbar), "ToolbarsModel",
- ephy_shell_get_toolbars_model (ephy_shell, FALSE), NULL);
+ egg_editable_toolbar_set_model
+ (EGG_EDITABLE_TOOLBAR (window->priv->toolbar),
+ EGG_TOOLBARS_MODEL (
+ ephy_shell_get_toolbars_model (ephy_shell, FALSE)));
sync_chromes_visibility (window);
}
@@ -1988,6 +1992,15 @@ ephy_window_init (EphyWindow *window)
manager = EPHY_EXTENSION (ephy_shell_get_extensions_manager (ephy_shell));
ephy_extension_attach_window (manager, window);
+ /* We only set the model now after attaching the extensions, so that
+ * extensions already have created their actions which may be on
+ * the toolbar
+ */
+ egg_editable_toolbar_set_model
+ (EGG_EDITABLE_TOOLBAR (window->priv->toolbar),
+ EGG_TOOLBARS_MODEL
+ (ephy_shell_get_toolbars_model (ephy_shell, FALSE)));
+
g_signal_connect (window, "window-state-event",
G_CALLBACK (ephy_window_state_event_cb),
window);