make changes for lot management high-level API

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9390 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Linas Vepstas 2003-09-21 18:16:31 +00:00
parent 325d4ffd66
commit 3b6d67f15f
3 changed files with 13 additions and 13 deletions

View File

@ -33,7 +33,7 @@
#include "Period.h" #include "Period.h"
#include "Query.h" #include "Query.h"
#include "Scrub.h" #include "Scrub.h"
#include "Scrub2.h" #include "Scrub3.h"
#include "Transaction.h" #include "Transaction.h"
#include "dialog-utils.h" #include "dialog-utils.h"
#include "druid-acct-period.h" #include "druid-acct-period.h"
@ -397,7 +397,7 @@ scrub_all(void)
AccountGroup *group = gnc_get_current_group (); AccountGroup *group = gnc_get_current_group ();
xaccGroupScrubOrphans (group); xaccGroupScrubOrphans (group);
xaccGroupScrubImbalance (group); xaccGroupScrubImbalance (group);
xaccGroupScrubLotsBalance (group); xaccGroupScrubLots (group);
} }
/* =============================================================== */ /* =============================================================== */

View File

@ -51,7 +51,7 @@
#include "gnc-lot.h" #include "gnc-lot.h"
#include "kvp_frame.h" #include "kvp_frame.h"
#include "messages.h" #include "messages.h"
#include "Scrub2.h" #include "Scrub3.h"
#include "Transaction.h" #include "Transaction.h"
#include "dialog-utils.h" #include "dialog-utils.h"
@ -112,7 +112,7 @@ lv_show_splits (GNCLotViewer *lv)
if (NULL == lot) return; if (NULL == lot) return;
gnc_engine_suspend_events(); /* XXX remove when xaccSplitGetCapGains() fixed */ /* gnc_engine_suspend_events(); XXX remove when xaccSplitGetCapGains() fixed */
gtk_clist_freeze (lv->mini_clist); gtk_clist_freeze (lv->mini_clist);
gtk_clist_clear (lv->mini_clist); gtk_clist_clear (lv->mini_clist);
split_list = gnc_lot_get_split_list (lot); split_list = gnc_lot_get_split_list (lot);
@ -189,7 +189,7 @@ gnc_engine_suspend_events(); /* XXX remove when xaccSplitGetCapGains() fixed */
gtk_clist_set_selectable (lv->mini_clist, row, FALSE); gtk_clist_set_selectable (lv->mini_clist, row, FALSE);
} }
gtk_clist_thaw (lv->mini_clist); gtk_clist_thaw (lv->mini_clist);
gnc_engine_resume_events(); /* XXX remove when xaccSplitGetCapGains() fixed */ /* gnc_engine_resume_events(); XXX remove when xaccSplitGetCapGains() fixed */
} }
/* ======================================================================== */ /* ======================================================================== */
@ -325,7 +325,7 @@ lv_scrub_lot_cb (GtkButton *but, gpointer user_data)
{ {
GNCLotViewer *lv = user_data; GNCLotViewer *lv = user_data;
if (NULL == lv->selected_lot) return; if (NULL == lv->selected_lot) return;
xaccLotScrubDoubleBalance (lv->selected_lot); xaccScrubLot (lv->selected_lot);
gnc_lot_viewer_fill (lv); gnc_lot_viewer_fill (lv);
lv_show_splits (lv); lv_show_splits (lv);
} }
@ -337,7 +337,7 @@ static void
lv_scrub_acc_cb (GtkButton *but, gpointer user_data) lv_scrub_acc_cb (GtkButton *but, gpointer user_data)
{ {
GNCLotViewer *lv = user_data; GNCLotViewer *lv = user_data;
xaccAccountScrubLotsBalance (lv->account); xaccAccountScrubLots (lv->account);
gnc_lot_viewer_fill (lv); gnc_lot_viewer_fill (lv);
lv_show_splits (lv); lv_show_splits (lv);
} }
@ -407,13 +407,12 @@ get_realized_gains (GNCLot *lot, gnc_commodity *currency)
static void static void
gnc_lot_viewer_fill (GNCLotViewer *lv) gnc_lot_viewer_fill (GNCLotViewer *lv)
{ {
int row, nlots; int row;
LotList *lot_list, *node; LotList *lot_list, *node;
GNCLot *selected_lot; GNCLot *selected_lot;
int selected_row = -1; int selected_row = -1;
lot_list = xaccAccountGetLotList (lv->account); lot_list = xaccAccountGetLotList (lv->account);
nlots = g_list_length (lot_list);
selected_lot = lv->selected_lot; selected_lot = lv->selected_lot;
gtk_clist_freeze (lv->lot_clist); gtk_clist_freeze (lv->lot_clist);
@ -523,6 +522,7 @@ lv_window_destroy_cb (GtkObject *object, gpointer user_data)
{ {
GNCLotViewer *lv = user_data; GNCLotViewer *lv = user_data;
gnc_close_gui_component_by_data (LOT_VIEWER_CM_CLASS, lv); gnc_close_gui_component_by_data (LOT_VIEWER_CM_CLASS, lv);
gnc_unregister_gui_component_by_data (LOT_VIEWER_CM_CLASS, lv);
g_free (lv); g_free (lv);
} }

View File

@ -31,7 +31,7 @@
#include "AccWindow.h" #include "AccWindow.h"
#include "Scrub.h" #include "Scrub.h"
#include "Scrub2.h" #include "Scrub3.h"
#include "dialog-account.h" #include "dialog-account.h"
#include "dialog-options.h" #include "dialog-options.h"
#include "dialog-transfer.h" #include "dialog-transfer.h"
@ -669,7 +669,7 @@ gnc_acct_tree_window_menu_scrub_cb(GtkWidget * widget,
xaccAccountScrubOrphans (account); xaccAccountScrubOrphans (account);
xaccAccountScrubImbalance (account); xaccAccountScrubImbalance (account);
xaccAccountScrubLotsBalance (account); xaccAccountScrubLots (account);
gnc_resume_gui_refresh (); gnc_resume_gui_refresh ();
} }
@ -692,7 +692,7 @@ gnc_acct_tree_window_menu_scrub_sub_cb(GtkWidget * widget,
xaccAccountTreeScrubOrphans (account); xaccAccountTreeScrubOrphans (account);
xaccAccountTreeScrubImbalance (account); xaccAccountTreeScrubImbalance (account);
xaccAccountTreeScrubLotsBalance (account); xaccAccountTreeScrubLots (account);
gnc_resume_gui_refresh (); gnc_resume_gui_refresh ();
} }
@ -707,7 +707,7 @@ gnc_acct_tree_window_menu_scrub_all_cb(GtkWidget * widget,
xaccGroupScrubOrphans (group); xaccGroupScrubOrphans (group);
xaccGroupScrubImbalance (group); xaccGroupScrubImbalance (group);
xaccGroupScrubLotsBalance (group); xaccGroupScrubLots (group);
gnc_resume_gui_refresh (); gnc_resume_gui_refresh ();
} }