Ejemplo n.º 1
0
static void
real_sync_allow_stop (CajaWindow *window,
                      CajaWindowSlot *slot)
{
    CajaNavigationWindow *navigation_window;
    CajaNotebook *notebook;

    navigation_window = CAJA_NAVIGATION_WINDOW (window);
    caja_navigation_window_set_spinner_active (navigation_window, slot->allow_stop);

    notebook = CAJA_NOTEBOOK (CAJA_NAVIGATION_WINDOW_PANE (slot->pane)->notebook);
    caja_notebook_sync_loading (notebook, slot);
}
Ejemplo n.º 2
0
int
caja_notebook_add_tab (CajaNotebook *notebook,
                       CajaWindowSlot *slot,
                       int position,
                       gboolean jump_to)
{
    GtkNotebook *gnotebook = GTK_NOTEBOOK (notebook);
    GtkWidget *tab_label;

    g_return_val_if_fail (CAJA_IS_NOTEBOOK (notebook), -1);
    g_return_val_if_fail (CAJA_IS_WINDOW_SLOT (slot), -1);

    tab_label = build_tab_label (notebook, slot);

    position = gtk_notebook_insert_page (GTK_NOTEBOOK (notebook),
                                         slot->content_box,
                                         tab_label,
                                         position);

    caja_notebook_sync_tab_label (notebook, slot);
    caja_notebook_sync_loading (notebook, slot);


    /* FIXME gtk bug! */
    /* FIXME: this should be fixed in gtk 2.12; check & remove this! */
    /* The signal handler may have reordered the tabs */
    position = gtk_notebook_page_num (gnotebook, slot->content_box);

    if (jump_to)
    {
        gtk_notebook_set_current_page (gnotebook, position);

    }

    return position;
}