/* Set the current text window for the notebook to the window that refers to a particular tvbuff.  */
void set_notebook_page(GtkWidget *nb_ptr, tvbuff_t *tvb)
/* Set the current text window for the notebook to the window that refers to a particular tvbuff.  */
void set_notebook_page(GtkWidget *nb_ptr, tvbuff_t *tvb)
{
    int num;
    GtkWidget *bv_page, *bv;
    tvbuff_t *bv_tvb;
    for (num = 0;
         (bv_page = gtk_notebook_get_nth_page(GTK_NOTEBOOK(nb_ptr), num)) != NULL;
         num++) {
        bv = gtk_bin_get_child(GTK_BIN(bv_page));
        bv_tvb = (tvbuff_t *)g_object_get_data(G_OBJECT(bv), E_BYTE_VIEW_TVBUFF_KEY);
        if (bv_tvb == tvb) {
            gtk_notebook_set_current_page(GTK_NOTEBOOK(nb_ptr), num);
            break;
        }
    }
}