[Gnucash-changes] OK, turn on the shared-quick-fill code.

Linas Vepstas linas at cvs.gnucash.org
Mon May 31 20:00:01 EDT 2004


Log Message:
-----------
OK, turn on the shared-quick-fill code.
This should complete teh backport of the 2.0 quickfill code.
Please review & test; I think I did this right but I'm getting cross-eyed
from sitting in front of the monitor too long ...

Tags:
----
gnucash-1-8-branch

Modified Files:
--------------
    gnucash/src/register/ledger-core:
        split-register-load.c

Revision Data
-------------
Index: split-register-load.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/ledger-core/split-register-load.c,v
retrieving revision 1.23.2.3
retrieving revision 1.23.2.4
diff -Lsrc/register/ledger-core/split-register-load.c -Lsrc/register/ledger-core/split-register-load.c -u -r1.23.2.3 -r1.23.2.4
--- src/register/ledger-core/split-register-load.c
+++ src/register/ledger-core/split-register-load.c
@@ -1,5 +1,7 @@
 /********************************************************************\
  * split-register-load.c -- split register loading code             *
+ * Copyright (C) 1998-2000 Linas Vepstas <linas at linas.org>          *
+ * Copyright (C) 2000 Dave Peticolas                                *
  *                                                                  *
  * This program is free software; you can redistribute it and/or    *
  * modify it under the terms of the GNU General Public License as   *
@@ -23,6 +25,7 @@
 #include "config.h"
 
 #include "Group.h"
+#include "account-quickfill.h"
 #include "combocell.h"
 #include "global-options.h"
 #include "gnc-component-manager.h"
@@ -587,11 +590,20 @@
   LEAVE ("\n");
 }
 
+#define QKEY  "split_reg_shared_quickfill"
+
+static gboolean 
+skip_cb (Account *account, gpointer x)
+{
+  return xaccAccountGetPlaceholder (account);
+}
+ 
 void
 gnc_split_register_load_xfer_cells (SplitRegister *reg, Account *base_account)
 {
   AccountGroup *group;
   ComboCell *cell;
+  QuickFill *qf;
 
   group = xaccAccountGetRoot(base_account);
   if (group == NULL)
@@ -600,13 +612,19 @@
   if (group == NULL)
     return;
 
+  qf = gnc_get_shared_account_name_quickfill (group, QKEY, skip_cb, NULL);
+
   cell = (ComboCell *)
     gnc_table_layout_get_cell (reg->table->layout, XFRM_CELL);
   gnc_combo_cell_clear_menu (cell);
+  gnc_combo_cell_use_quickfill_cache (cell, qf);
   gnc_load_xfer_cell (cell, group);
 
   cell = (ComboCell *)
     gnc_table_layout_get_cell (reg->table->layout, MXFRM_CELL);
   gnc_combo_cell_clear_menu (cell);
+  gnc_combo_cell_use_quickfill_cache (cell, qf);
   gnc_load_xfer_cell (cell, group);
 }
+
+/* ====================== END OF FILE ================================== */


More information about the gnucash-changes mailing list