From c1c74c929c1e773d1f79d1b3bd0cf10bb572f8f9 Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Tue, 13 Dec 2011 16:45:10 +0100 Subject: Remove custom EphyToolbar in favor of a vanilla GtkToolbar This allows us to stop using EggEditableToolbar here, we just load a normal toolbar from GtkUIManager in EphyWindow. The special toolbar actions and methods have been moved to EphyWindow too, mostly in a mechanical fashion (probably some simplifications are possible). The code in the bookmarks UI that depended on EphyToolbar has been #if zeroed instead of porting it, since it will go away in the near future too. https://bugzilla.gnome.org/show_bug.cgi?id=664483 --- src/ephy-shell.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/ephy-shell.c') diff --git a/src/ephy-shell.c b/src/ephy-shell.c index 6643e90e2..664ffc1d9 100644 --- a/src/ephy-shell.c +++ b/src/ephy-shell.c @@ -41,7 +41,6 @@ #include "ephy-profile-utils.h" #include "ephy-session.h" #include "ephy-settings.h" -#include "ephy-toolbar.h" #include "ephy-toolbars-model.h" #include "ephy-type-builtins.h" #include "ephy-web-view.h" @@ -631,7 +630,6 @@ ephy_shell_new_tab_full (EphyShell *shell, GtkWidget *nb; int position = -1; gboolean is_empty = FALSE; - EphyToolbar *toolbar; if (flags & EPHY_NEW_TAB_OPEN_PAGE) open_page = TRUE; if (flags & EPHY_NEW_TAB_IN_NEW_WINDOW) in_new_window = TRUE; @@ -655,8 +653,6 @@ ephy_shell_new_tab_full (EphyShell *shell, window = ephy_window_new_with_chrome (chrome, is_popup); } - toolbar = EPHY_TOOLBAR (ephy_window_get_toolbar (window)); - if ((flags & EPHY_NEW_TAB_APPEND_AFTER) && previous_embed != NULL) { nb = ephy_window_get_notebook (window); /* FIXME this assumes the tab is the direct notebook child */ @@ -703,7 +699,7 @@ ephy_shell_new_tab_full (EphyShell *shell, flags & EPHY_NEW_TAB_NEW_PAGE) { EphyWebView *view = ephy_embed_get_web_view (embed); ephy_web_view_set_typed_address (view, ""); - ephy_toolbar_activate_location (toolbar); + ephy_window_activate_location (window); ephy_web_view_load_homepage (view); is_empty = TRUE; } else if (flags & EPHY_NEW_TAB_OPEN_PAGE) { @@ -721,8 +717,7 @@ ephy_shell_new_tab_full (EphyShell *shell, * page was a copy */ if (is_empty) { /* empty page, focus location entry */ - toolbar = EPHY_TOOLBAR (ephy_window_get_toolbar (window)); - ephy_toolbar_activate_location (toolbar); + ephy_window_activate_location (window); } else if (embed != NULL) { /* non-empty page, focus the page. but make sure the widget is realised first! */ gtk_widget_realize (GTK_WIDGET (embed)); -- cgit v1.2.3