mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-20 11:48:30 -06:00
2001-06-09 Dave Peticolas <dave@krondo.com>
* src/gnome/reconcile-list.c (gnc_reconcile_list_refresh): fix bugs * src/gnome/dialog-utils.c (gnc_clist_add_check): fix bugs git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4571 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
d25f757053
commit
e496f9cd52
@ -1,5 +1,10 @@
|
||||
2001-06-09 Dave Peticolas <dave@krondo.com>
|
||||
|
||||
* src/gnome/reconcile-list.c (gnc_reconcile_list_refresh): fix
|
||||
bugs
|
||||
|
||||
* src/gnome/dialog-utils.c (gnc_clist_add_check): fix bugs
|
||||
|
||||
* doc/sgml/pt_PT/Makefile.am: remove adjust balance docs
|
||||
|
||||
* doc/sgml/C/Makefile.am: remove adjust balance docs
|
||||
|
@ -753,7 +753,7 @@ gnc_clist_add_check (GtkCList *list)
|
||||
|
||||
check_info = g_new0 (GNCCListCheckInfo, 1);
|
||||
|
||||
gtk_object_set_data (object, "gnc-check_info", check_info);
|
||||
gtk_object_set_data (object, "gnc-check-info", check_info);
|
||||
|
||||
gtk_signal_connect (object, "realize",
|
||||
GTK_SIGNAL_FUNC (check_realize), check_info);
|
||||
@ -762,6 +762,9 @@ gnc_clist_add_check (GtkCList *list)
|
||||
gtk_signal_connect (object, "destroy",
|
||||
GTK_SIGNAL_FUNC (check_destroy), check_info);
|
||||
|
||||
if (GTK_WIDGET_REALIZED (GTK_WIDGET (list)))
|
||||
check_realize (GTK_WIDGET (list), check_info);
|
||||
|
||||
return check_info;
|
||||
}
|
||||
|
||||
@ -774,7 +777,7 @@ gnc_clist_set_check (GtkCList *list, int row, int col, gboolean checked)
|
||||
|
||||
g_return_if_fail (GTK_IS_CLIST (list));
|
||||
|
||||
check_info = gtk_object_get_data (GTK_OBJECT (list), "gnc-check_info");
|
||||
check_info = gtk_object_get_data (GTK_OBJECT (list), "gnc-check-info");
|
||||
if (!check_info)
|
||||
check_info = gnc_clist_add_check (list);
|
||||
|
||||
|
@ -395,7 +395,9 @@ gnc_reconcile_list_refresh (GNCReconcileList *list)
|
||||
GtkCList *clist = GTK_CLIST(list);
|
||||
GtkAdjustment *adjustment;
|
||||
gfloat save_value = 0.0;
|
||||
Split *old_focus_split;
|
||||
Split *old_split;
|
||||
gint old_focus_row;
|
||||
gint new_row;
|
||||
|
||||
g_return_if_fail (list != NULL);
|
||||
@ -405,6 +407,9 @@ gnc_reconcile_list_refresh (GNCReconcileList *list)
|
||||
if (adjustment != NULL)
|
||||
save_value = adjustment->value;
|
||||
|
||||
old_focus_row = clist->focus_row;
|
||||
old_focus_split = gtk_clist_get_row_data (clist, old_focus_row);
|
||||
|
||||
gtk_clist_freeze (clist);
|
||||
|
||||
gtk_clist_clear (clist);
|
||||
@ -418,13 +423,13 @@ gnc_reconcile_list_refresh (GNCReconcileList *list)
|
||||
|
||||
gtk_clist_columns_autosize (clist);
|
||||
|
||||
if (adjustment != NULL)
|
||||
if (adjustment)
|
||||
{
|
||||
save_value = CLAMP (save_value, adjustment->lower, adjustment->upper);
|
||||
gtk_adjustment_set_value (adjustment, save_value);
|
||||
}
|
||||
|
||||
if (old_split != NULL)
|
||||
if (old_split)
|
||||
{
|
||||
new_row = gtk_clist_find_row_from_data (clist, old_split);
|
||||
if (new_row >= 0)
|
||||
@ -436,6 +441,17 @@ gnc_reconcile_list_refresh (GNCReconcileList *list)
|
||||
}
|
||||
}
|
||||
|
||||
if (old_focus_split)
|
||||
{
|
||||
new_row = gtk_clist_find_row_from_data (clist, old_focus_split);
|
||||
|
||||
if (new_row < 0)
|
||||
new_row = old_focus_row;
|
||||
|
||||
if (new_row >= 0)
|
||||
clist->focus_row = new_row;
|
||||
}
|
||||
|
||||
gtk_clist_thaw (clist);
|
||||
}
|
||||
|
||||
@ -626,7 +642,10 @@ gnc_reconcile_list_set_sort_order (GNCReconcileList *list, sort_type_t key)
|
||||
if (list->list_type == RECLIST_DEBIT)
|
||||
return;
|
||||
|
||||
xaccQuerySetSortIncreasing (list->query, !(key == BY_AMOUNT), !(key == BY_AMOUNT), !(key == BY_AMOUNT));
|
||||
xaccQuerySetSortIncreasing (list->query,
|
||||
!(key == BY_AMOUNT),
|
||||
!(key == BY_AMOUNT),
|
||||
!(key == BY_AMOUNT));
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user