Replace deprecated glib function if new glib is available

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14813 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2006-09-07 11:38:29 +00:00
parent e49d29690b
commit 96a8790a69

View File

@ -100,7 +100,12 @@ gnc_budget_new(QofBook *book)
budget = g_new0(GncBudget, 1);
qof_instance_init (&budget->inst, GNC_ID_BUDGET, book);
#ifdef HAVE_GLIB29
g_date_set_time_t(&date, time(NULL));
#else
/* Deprecated since glib-2.10; use g_date_set_time_t instead. */
g_date_set_time(&date, time(NULL));
#endif
g_date_subtract_days(&date, g_date_get_day(&date)-1);
recurrenceSet(&budget->recurrence, 1, PERIOD_MONTH, &date);