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/bookmarks/ephy-bookmarks-ui.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/bookmarks') diff --git a/src/bookmarks/ephy-bookmarks-ui.c b/src/bookmarks/ephy-bookmarks-ui.c index 1f97eddb3..7ce3a0d0b 100644 --- a/src/bookmarks/ephy-bookmarks-ui.c +++ b/src/bookmarks/ephy-bookmarks-ui.c @@ -108,6 +108,7 @@ activate_bookmarks_menu (GtkAction *action, EphyWindow *window) } } +#if 0 static void activate_bookmark_properties (GtkAction *action, EggEditableToolbar *etoolbar) @@ -177,6 +178,7 @@ selected_bookmark_action (EggEditableToolbar *etoolbar, gtk_action_set_visible (action, visible); } +#endif static void erase_bookmarks_menu (EphyWindow *window) @@ -241,7 +243,9 @@ ephy_bookmarks_ui_attach_window (EphyWindow *window) EphyNode *topics; BookmarksWindowData *data; GtkUIManager *manager; +#if 0 EggEditableToolbar *etoolbar; +#endif GtkActionGroup *actions; GtkAction *action; @@ -252,7 +256,9 @@ ephy_bookmarks_ui_attach_window (EphyWindow *window) g_return_if_fail (data == NULL); manager = GTK_UI_MANAGER (ephy_window_get_ui_manager (window)); +#if 0 etoolbar = EGG_EDITABLE_TOOLBAR (ephy_window_get_toolbar (window)); +#endif data = g_new0 (BookmarksWindowData, 1); g_object_set_data_full (G_OBJECT (window), BM_WINDOW_DATA_KEY, data, g_free); @@ -298,36 +304,42 @@ ephy_bookmarks_ui_attach_window (EphyWindow *window) /* Add popup menu actions that are specific to the bookmark widgets */ action = gtk_action_new ("ToolbarBookmarkProperties", _("_Properties"), _("Show properties for this bookmark"), GTK_STOCK_PROPERTIES); +#if 0 g_signal_connect_object (action, "activate", G_CALLBACK (activate_bookmark_properties), G_OBJECT (etoolbar), 0); g_signal_connect_object (etoolbar, "notify::selected", G_CALLBACK (selected_bookmark_action), G_OBJECT (action), 0); +#endif gtk_action_group_add_action (actions, action); g_object_unref (action); /* FIXME ngettext */ action = gtk_action_new ("ToolbarBookmarkOpenInTab", _("Open in New _Tab"), _("Open this bookmark in a new tab"), STOCK_NEW_TAB); +#if 0 g_signal_connect_object (action, "activate", G_CALLBACK (activate_bookmark_open_tab), G_OBJECT (etoolbar), 0); g_signal_connect_object (etoolbar, "notify::selected", G_CALLBACK (selected_bookmark_action), G_OBJECT (action), 0); +#endif gtk_action_group_add_action (actions, action); g_object_unref (action); /* FIXME ngettext */ action = gtk_action_new ("ToolbarBookmarkOpenInWindow", _("Open in New _Window"), _("Open this bookmark in a new window"), GTK_STOCK_NEW); +#if 0 g_signal_connect_object (action, "activate", G_CALLBACK (activate_bookmark_open_window), G_OBJECT (etoolbar), 0); g_signal_connect_object (etoolbar, "notify::selected", G_CALLBACK (selected_bookmark_action), G_OBJECT (action), 0); +#endif gtk_action_group_add_action (actions, action); g_object_unref (action); -- cgit v1.2.3