static void
path_bar_location_changed_callback (GtkWidget *widget,
                                    GFile *location,
                                    CajaNavigationWindowPane *pane)
{
    CajaNavigationWindowSlot *slot;
    CajaWindowPane *win_pane;
    int i;

    g_assert (CAJA_IS_NAVIGATION_WINDOW_PANE (pane));

    win_pane = CAJA_WINDOW_PANE(pane);

    slot = CAJA_NAVIGATION_WINDOW_SLOT (win_pane->active_slot);

    /* check whether we already visited the target location */
    i = bookmark_list_get_uri_index (slot->back_list, location);
    if (i >= 0)
    {
        caja_navigation_window_back_or_forward (CAJA_NAVIGATION_WINDOW (win_pane->window), TRUE, i, FALSE);
    }
    else
    {
        caja_window_slot_go_to (win_pane->active_slot, location, FALSE);
    }
}
static void
activate_back_or_forward_menu_item (GtkMenuItem *menu_item,
                                    CajaNavigationWindow *window,
                                    gboolean back)
{
    int index;

    g_assert (GTK_IS_MENU_ITEM (menu_item));
    g_assert (CAJA_IS_NAVIGATION_WINDOW (window));

    index = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (menu_item), "user_data"));

    caja_navigation_window_back_or_forward (window, back, index, should_open_in_new_tab ());
}
Exemplo n.º 3
0
void
caja_navigation_window_go_forward (CajaNavigationWindow *window)
{
    caja_navigation_window_back_or_forward (window, FALSE, 0, FALSE);
}