mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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:
parent
e49d29690b
commit
96a8790a69
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user