mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix the item ordering (so it appears in ascending order)
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7002 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
98f2b6a280
commit
47563841db
@ -489,7 +489,7 @@ billterms_term_refresh (BillTermsWindow *btw)
|
|||||||
static void
|
static void
|
||||||
billterms_window_refresh (BillTermsWindow *btw)
|
billterms_window_refresh (BillTermsWindow *btw)
|
||||||
{
|
{
|
||||||
GList *list;
|
GList *list, *node;
|
||||||
GtkAdjustment *vadjustment;
|
GtkAdjustment *vadjustment;
|
||||||
GtkCList *clist;
|
GtkCList *clist;
|
||||||
gfloat save_value = 0.0;
|
gfloat save_value = 0.0;
|
||||||
@ -514,12 +514,14 @@ billterms_window_refresh (BillTermsWindow *btw)
|
|||||||
if (list == NULL) {
|
if (list == NULL) {
|
||||||
btw->current_term = NULL;
|
btw->current_term = NULL;
|
||||||
billterms_term_refresh (btw);
|
billterms_term_refresh (btw);
|
||||||
|
} else {
|
||||||
|
list = g_list_reverse (g_list_copy (list));
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( ; list; list = list->next) {
|
for ( node = list; node; node = node->next) {
|
||||||
char *row_text[2];
|
char *row_text[2];
|
||||||
gint row;
|
gint row;
|
||||||
GncBillTerm *term = list->data;
|
GncBillTerm *term = node->data;
|
||||||
|
|
||||||
gnc_gui_component_watch_entity (btw->component_id,
|
gnc_gui_component_watch_entity (btw->component_id,
|
||||||
gncBillTermGetGUID (term),
|
gncBillTermGetGUID (term),
|
||||||
@ -533,6 +535,8 @@ billterms_window_refresh (BillTermsWindow *btw)
|
|||||||
gtk_clist_set_selectable (clist, row, TRUE);
|
gtk_clist_set_selectable (clist, row, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_list_free (list);
|
||||||
|
|
||||||
gnc_gui_component_watch_entity_type (btw->component_id,
|
gnc_gui_component_watch_entity_type (btw->component_id,
|
||||||
GNC_BILLTERM_MODULE_NAME,
|
GNC_BILLTERM_MODULE_NAME,
|
||||||
GNC_EVENT_CREATE | GNC_EVENT_DESTROY);
|
GNC_EVENT_CREATE | GNC_EVENT_DESTROY);
|
||||||
|
@ -293,7 +293,7 @@ new_tax_table_dialog (TaxTableWindow *ttw, gboolean new_table,
|
|||||||
static void
|
static void
|
||||||
tax_table_entries_refresh (TaxTableWindow *ttw, gboolean new_table)
|
tax_table_entries_refresh (TaxTableWindow *ttw, gboolean new_table)
|
||||||
{
|
{
|
||||||
GList *list;
|
GList *list, *node;
|
||||||
GtkAdjustment *vadjustment = NULL;
|
GtkAdjustment *vadjustment = NULL;
|
||||||
GtkCList *clist;
|
GtkCList *clist;
|
||||||
gfloat save_value = 0.0;
|
gfloat save_value = 0.0;
|
||||||
@ -314,10 +314,13 @@ tax_table_entries_refresh (TaxTableWindow *ttw, gboolean new_table)
|
|||||||
|
|
||||||
/* Add the items to the list */
|
/* Add the items to the list */
|
||||||
list = gncTaxTableGetEntries (ttw->current_table);
|
list = gncTaxTableGetEntries (ttw->current_table);
|
||||||
for ( ; list; list = list->next) {
|
if (list)
|
||||||
|
list = g_list_reverse (g_list_copy (list));
|
||||||
|
|
||||||
|
for (node = list ; node; node = node->next) {
|
||||||
char *row_text[3];
|
char *row_text[3];
|
||||||
gint row;
|
gint row;
|
||||||
GncTaxTableEntry *entry = list->data;
|
GncTaxTableEntry *entry = node->data;
|
||||||
Account *acc = gncTaxTableEntryGetAccount (entry);
|
Account *acc = gncTaxTableEntryGetAccount (entry);
|
||||||
gnc_numeric amount = gncTaxTableEntryGetAmount (entry);
|
gnc_numeric amount = gncTaxTableEntryGetAmount (entry);
|
||||||
|
|
||||||
@ -346,6 +349,8 @@ tax_table_entries_refresh (TaxTableWindow *ttw, gboolean new_table)
|
|||||||
g_free (row_text[1]);
|
g_free (row_text[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_list_free (list);
|
||||||
|
|
||||||
if (!new_table) {
|
if (!new_table) {
|
||||||
if (vadjustment) {
|
if (vadjustment) {
|
||||||
save_value = CLAMP (save_value, vadjustment->lower,
|
save_value = CLAMP (save_value, vadjustment->lower,
|
||||||
@ -373,7 +378,7 @@ tax_table_entries_refresh (TaxTableWindow *ttw, gboolean new_table)
|
|||||||
static void
|
static void
|
||||||
tax_table_window_refresh (TaxTableWindow *ttw)
|
tax_table_window_refresh (TaxTableWindow *ttw)
|
||||||
{
|
{
|
||||||
GList *list;
|
GList *list, *node;
|
||||||
GtkAdjustment *vadjustment;
|
GtkAdjustment *vadjustment;
|
||||||
GtkCList *clist;
|
GtkCList *clist;
|
||||||
gfloat save_value = 0.0;
|
gfloat save_value = 0.0;
|
||||||
@ -397,11 +402,13 @@ tax_table_window_refresh (TaxTableWindow *ttw)
|
|||||||
/* If there are no tables, clear the entries list */
|
/* If there are no tables, clear the entries list */
|
||||||
if (list == NULL)
|
if (list == NULL)
|
||||||
gtk_clist_clear (GTK_CLIST (ttw->entries_clist));
|
gtk_clist_clear (GTK_CLIST (ttw->entries_clist));
|
||||||
|
else
|
||||||
|
list = g_list_reverse (g_list_copy (list));
|
||||||
|
|
||||||
for ( ; list; list = list->next) {
|
for (node = list; node; node = node->next) {
|
||||||
char *row_text[2];
|
char *row_text[2];
|
||||||
gint row;
|
gint row;
|
||||||
GncTaxTable *table = list->data;
|
GncTaxTable *table = node->data;
|
||||||
|
|
||||||
gnc_gui_component_watch_entity (ttw->component_id,
|
gnc_gui_component_watch_entity (ttw->component_id,
|
||||||
gncTaxTableGetGUID (table),
|
gncTaxTableGetGUID (table),
|
||||||
@ -415,6 +422,8 @@ tax_table_window_refresh (TaxTableWindow *ttw)
|
|||||||
gtk_clist_set_selectable (clist, row, TRUE);
|
gtk_clist_set_selectable (clist, row, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_list_free (list);
|
||||||
|
|
||||||
gnc_gui_component_watch_entity_type (ttw->component_id,
|
gnc_gui_component_watch_entity_type (ttw->component_id,
|
||||||
GNC_TAXTABLE_MODULE_NAME,
|
GNC_TAXTABLE_MODULE_NAME,
|
||||||
GNC_EVENT_CREATE | GNC_EVENT_DESTROY);
|
GNC_EVENT_CREATE | GNC_EVENT_DESTROY);
|
||||||
|
Loading…
Reference in New Issue
Block a user