mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix freq=None recurrnence + file-restore.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16186 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -529,7 +529,7 @@ sx_recurrence_handler(xmlNodePtr node, gpointer _pdata)
|
||||
|
||||
if (!dom_tree_generic_parse(node, sx_recurrence_list_handlers, &schedule))
|
||||
return FALSE;
|
||||
g_return_val_if_fail(schedule, FALSE);
|
||||
// g_return_val_if_fail(schedule, FALSE);
|
||||
g_debug("setting freshly-parsed schedule: [%s]", recurrenceListToString(schedule));
|
||||
gnc_sx_set_schedule(parsing_data->sx, schedule);
|
||||
parsing_data->saw_recurrence = TRUE;
|
||||
|
||||
@@ -166,11 +166,6 @@ void gnc_sx_edit_model_set_name(GncSxEditModel *mdl, gchar *new_name);
|
||||
- [x] src/gnome/druid-acct-period.c
|
||||
|
||||
- gnc_frequency
|
||||
- [ ] Freq=none doesn't work::
|
||||
|
||||
* 17:00:29 CRIT <gnc.engine.recurrence> recurrenceListNextInstance: assertion `rlist && ref && next && g_date_valid(ref)' failed
|
||||
* 17:00:36 CRIT <gnc.engine.sx> gnc_sx_set_schedule: assertion `sx && schedule' failed
|
||||
|
||||
- [ ] 'every x months' spin button makes large jumps::
|
||||
|
||||
<andi5> jsled: another topic: you have probably seen the "every x months"
|
||||
@@ -179,6 +174,10 @@ void gnc_sx_edit_model_set_name(GncSxEditModel *mdl, gchar *new_name);
|
||||
spinning... it is run because the changed(?) signal handler is too slow
|
||||
|
||||
- [ ] support nth-weekday Recurrence period.
|
||||
- [x] Freq=none doesn't work::
|
||||
|
||||
* 17:00:29 CRIT <gnc.engine.recurrence> recurrenceListNextInstance: assertion `rlist && ref && next && g_date_valid(ref)' failed
|
||||
* 17:00:36 CRIT <gnc.engine.sx> gnc_sx_set_schedule: assertion `sx && schedule' failed
|
||||
|
||||
- since-last-run
|
||||
- [ ] "reminder" instances should show number of days until due
|
||||
|
||||
@@ -267,9 +267,15 @@ recurrenceListNextInstance(const GList *rlist, const GDate *ref, GDate *next)
|
||||
const GList *iter;
|
||||
GDate nextSingle; /* The next date for an individual recurrence */
|
||||
|
||||
g_return_if_fail(rlist && ref && next && g_date_valid(ref));
|
||||
|
||||
g_date_clear(next, 1);
|
||||
|
||||
// empty rlist = no recurrence
|
||||
if (rlist == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
g_return_if_fail(ref && next && g_date_valid(ref));
|
||||
|
||||
for (iter = rlist; iter; iter = iter->next) {
|
||||
const Recurrence *r = iter->data;
|
||||
|
||||
@@ -318,15 +324,18 @@ recurrenceListToString(const GList *r)
|
||||
const GList *iter;
|
||||
GString *str;
|
||||
gchar *s;
|
||||
g_return_val_if_fail(r, NULL);
|
||||
|
||||
str = g_string_new("");
|
||||
for(iter = r; iter; iter = iter->next){
|
||||
if (iter != r)
|
||||
g_string_append(str, " + ");
|
||||
s = recurrenceToString((Recurrence *)iter->data);
|
||||
g_string_append(str, s);
|
||||
g_free(s);
|
||||
if (r == NULL) {
|
||||
g_string_append(str, "None");
|
||||
} else {
|
||||
for(iter = r; iter; iter = iter->next){
|
||||
if (iter != r)
|
||||
g_string_append(str, " + ");
|
||||
s = recurrenceToString((Recurrence *)iter->data);
|
||||
g_string_append(str, s);
|
||||
g_free(s);
|
||||
}
|
||||
}
|
||||
return g_string_free(str, FALSE);
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ gnc_sx_get_schedule(const SchedXaction *sx)
|
||||
void
|
||||
gnc_sx_set_schedule(SchedXaction *sx, GList *schedule)
|
||||
{
|
||||
g_return_if_fail(sx && schedule);
|
||||
g_return_if_fail(sx);
|
||||
gnc_sx_begin_edit(sx);
|
||||
sx->schedule = schedule;
|
||||
qof_instance_set_dirty(&sx->inst);
|
||||
|
||||
Reference in New Issue
Block a user