#include <gtk/gtk.h>

void clicked_cb (GtkButton *b, GtkWidget *box)
{
    GtkWidget *calendar = gtk_calendar_new ();
    gtk_widget_show (GTK_WIDGET (calendar)) ;
    gtk_box_pack_start (GTK_BOX (box), calendar, FALSE, FALSE, 0 );
}

int main (int argc, char *argv[])
{
    gtk_init (&argc, &argv);
    GtkWindow *window
        = (GtkWindow*) g_object_new (GTK_TYPE_WINDOW,
                                     "title", "DEBUG",
                                     "default-height", 400,
                                     "default-width", 400,
                                     "border-width", 10,
                                      NULL);
    g_signal_connect (G_OBJECT (window), "destroy",
                      G_CALLBACK (gtk_main_quit), NULL);

    GtkWidget *submit_button = gtk_button_new_with_label ("Add calendar");
    GtkWidget *vertical_box = gtk_vbox_new (TRUE, 10);

    g_signal_connect (G_OBJECT (submit_button), "clicked",
                      G_CALLBACK (clicked_cb), (gpointer) vertical_box);
    gtk_box_pack_start (GTK_BOX (vertical_box), submit_button,
                        FALSE, FALSE, 0);
    gtk_container_add (GTK_CONTAINER (window), vertical_box);

    gtk_widget_show_all (GTK_WIDGET (window));
    gtk_main ();
    return 0;
} 
