Use the Recurrences for the SX frequency, not the FreqSpec list.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15611 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Joshua Sled 2007-02-18 23:14:17 +00:00
parent 4e6e352b8b
commit 0d96264c06

View File

@ -490,14 +490,11 @@ gsltma_populate_tree_store(GncSxListTreeModelAdapter *model)
for (list = model->instances->sx_instance_list; list != NULL; list = list->next) for (list = model->instances->sx_instance_list; list != NULL; list = list->next)
{ {
GncSxInstances *instances = (GncSxInstances*)list->data; GncSxInstances *instances = (GncSxInstances*)list->data;
FreqSpec *fs; gchar *frequency_str;
GString *frequency_str;
char last_occur_date_buf[MAX_DATE_LENGTH+1]; char last_occur_date_buf[MAX_DATE_LENGTH+1];
char next_occur_date_buf[MAX_DATE_LENGTH+1]; char next_occur_date_buf[MAX_DATE_LENGTH+1];
frequency_str = g_string_sized_new(32); frequency_str = recurrenceListToString(gnc_sx_get_schedule(instances->sx));
fs = xaccSchedXactionGetFreqSpec(instances->sx);
xaccFreqSpecGetFreqStr(fs, frequency_str);
_format_conditional_date(xaccSchedXactionGetLastOccurDate(instances->sx), _format_conditional_date(xaccSchedXactionGetLastOccurDate(instances->sx),
last_occur_date_buf, MAX_DATE_LENGTH); last_occur_date_buf, MAX_DATE_LENGTH);
@ -508,11 +505,11 @@ gsltma_populate_tree_store(GncSxListTreeModelAdapter *model)
gtk_tree_store_set(model->orig, &iter, gtk_tree_store_set(model->orig, &iter,
SXLTMA_COL_NAME, xaccSchedXactionGetName(instances->sx), SXLTMA_COL_NAME, xaccSchedXactionGetName(instances->sx),
SXLTMA_COL_ENABLED, xaccSchedXactionGetEnabled(instances->sx), SXLTMA_COL_ENABLED, xaccSchedXactionGetEnabled(instances->sx),
SXLTMA_COL_FREQUENCY, frequency_str->str, SXLTMA_COL_FREQUENCY, frequency_str,
SXLTMA_COL_LAST_OCCUR, last_occur_date_buf, SXLTMA_COL_LAST_OCCUR, last_occur_date_buf,
SXLTMA_COL_NEXT_OCCUR, next_occur_date_buf, SXLTMA_COL_NEXT_OCCUR, next_occur_date_buf,
-1); -1);
g_string_free(frequency_str, TRUE); g_free(frequency_str);
} }
} }