aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-navigation-up-action.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ephy-navigation-up-action.c')
-rw-r--r--src/ephy-navigation-up-action.c73
1 files changed, 0 insertions, 73 deletions
diff --git a/src/ephy-navigation-up-action.c b/src/ephy-navigation-up-action.c
index 1c5a7cd0c..9d3f78dd0 100644
--- a/src/ephy-navigation-up-action.c
+++ b/src/ephy-navigation-up-action.c
@@ -45,77 +45,6 @@ static void ephy_navigation_up_action_class_init (EphyNavigationUpActionClass *k
G_DEFINE_TYPE (EphyNavigationUpAction, ephy_navigation_up_action, EPHY_TYPE_NAVIGATION_ACTION)
static void
-activate_up_menu_item_cb (GtkWidget *menuitem,
- EphyNavigationUpAction *action)
-{
- EphyWindow *window;
- EphyEmbed *embed;
- char *url;
-
- window = _ephy_navigation_action_get_window (EPHY_NAVIGATION_ACTION (action));
- embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
- g_return_if_fail (embed != NULL);
-
- url = g_object_get_data (G_OBJECT (menuitem), URL_DATA_KEY);
- g_return_if_fail (url != NULL);
-
- ephy_link_open (EPHY_LINK (action), url, NULL,
- ephy_gui_is_middle_click () ? EPHY_LINK_NEW_TAB : 0);
-}
-
-static GtkWidget *
-build_dropdown_menu (EphyNavigationAction *nav_action)
-{
- EphyNavigationUpAction *action;
- EphyWindow *window;
- EphyEmbed *embed;
- EphyHistory *history;
- GtkMenuShell *menu;
- GtkWidget *item;
- GSList *list, *l;
- char *url;
-
- action = EPHY_NAVIGATION_UP_ACTION (nav_action);
- window = _ephy_navigation_action_get_window (nav_action);
- embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
- g_return_val_if_fail (embed != NULL, NULL);
-
- menu = GTK_MENU_SHELL (gtk_menu_new ());
- history = EPHY_HISTORY (ephy_embed_shell_get_global_history (embed_shell));
-
- list = ephy_web_view_get_go_up_list (ephy_embed_get_web_view (embed));
- for (l = list; l != NULL; l = l->next) {
- EphyNode *node;
- const char *title = NULL;
-
- url = g_strdup (l->data);
-
- if (url == NULL) continue;
-
- node = ephy_history_get_page (history, url);
- if (node != NULL) {
- title = ephy_node_get_property_string (node, EPHY_NODE_PAGE_PROP_TITLE);
- }
-
- item = _ephy_navigation_action_new_history_menu_item (title ? title : url, url);
-
- g_object_set_data_full (G_OBJECT (item), URL_DATA_KEY, url,
- (GDestroyNotify) g_free);
- g_signal_connect (item, "activate",
- G_CALLBACK (activate_up_menu_item_cb), action);
-
- gtk_menu_shell_append (menu, item);
- gtk_widget_show (item);
- }
-
- /* the list data has been consumed */
- g_slist_foreach (list, (GFunc) g_free, NULL);
- g_slist_free (list);
-
- return GTK_WIDGET (menu);
-}
-
-static void
action_activate (GtkAction *action)
{
EphyWindow *window;
@@ -144,8 +73,6 @@ static void
ephy_navigation_up_action_class_init (EphyNavigationUpActionClass *klass)
{
GtkActionClass *action_class = GTK_ACTION_CLASS (klass);
- EphyNavigationActionClass *nav_action_class = EPHY_NAVIGATION_ACTION_CLASS (klass);
action_class->activate = action_activate;
- nav_action_class->build_dropdown_menu = build_dropdown_menu;
}