/* This routine is called when the user clicks the "Close" button in the "Decode As..." dialog window. This routine then destroys the dialog box and performs other housekeeping functions. */
static void decode_close_cb(GtkWidget *close_bt _U_, gpointer parent_w)
/* This routine is called when the user clicks the "Close" button in the "Decode As..." dialog window. This routine then destroys the dialog box and performs other housekeeping functions. */
static void decode_close_cb(GtkWidget *close_bt _U_, gpointer parent_w)
{
    GtkWidget *notebook, *notebook_pg;
    gint page_num;
    decode_as_t *entry;
    notebook =  (GtkWidget *)g_object_get_data(G_OBJECT(parent_w), E_NOTEBOOK);
    page_num = gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook));
    notebook_pg = gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook), page_num);
    entry = (decode_as_t *)g_object_get_data(G_OBJECT(notebook_pg), E_PAGE_DECODE_AS_DATA);
    if ((entry->num_items == 1) && (entry->free_func != NULL))
        entry->free_func(g_object_get_data(G_OBJECT(notebook_pg), E_PAGE_VALUE));
    window_destroy(GTK_WIDGET(parent_w));
    g_slist_free(decode_dimmable);
    decode_dimmable = NULL;
}