/* Fills the entry boxes of the "one day" display when gddcalc hides
 * it, so that if the display is shown again it will not contain the
 * results of a previous call to c1_Populate and c1_ShowResults.
 */

#include <gtk/gtk.h>
#include <gtk/gtkx.h>
#include "gddcalc.h"

void c1_Depopulate() {

	size_t lth = 48;
	char *bfr = malloc(lth);

	strcpy(bfr, "");
	gtk_entry_set_text (GTK_ENTRY (c1_entry1), (gchar*) bfr);
	gtk_entry_set_text (GTK_ENTRY (c1_entry2), (gchar*) bfr);
	gtk_entry_set_text (GTK_ENTRY (c1_entry3), (gchar*) bfr);
	gtk_entry_set_text (GTK_ENTRY (c1_entry4), (gchar*) bfr);
	gtk_entry_set_text (GTK_ENTRY (c1_entry5), (gchar*) bfr);
	gtk_entry_set_text (GTK_ENTRY (c1_entry6), (gchar*) bfr);
	gtk_entry_set_text (GTK_ENTRY (c1_entry8), (gchar*) bfr);
	gtk_entry_set_text (GTK_ENTRY (c1_entry9), (gchar*) bfr);
	gtk_entry_set_text (GTK_ENTRY (c1_entry10), (gchar*) bfr);
	gtk_entry_set_text (GTK_ENTRY (c1_entry11), (gchar*) bfr);
	gtk_entry_set_text (GTK_ENTRY (c1_entry12), (gchar*) bfr);
	free(bfr);

// A minus 1 entry here will cause month to be blank when/if c1_frame
// is reopened later.

	gtk_combo_box_set_active(GTK_COMBO_BOX (c1_cbtxt_month), -1);
}
