gnucash/src/register/ledger-core/split-register-layout.c

Dave Peticolas dave@krondo.com
25 Nov 2001 16:02:33 -0800


--=-B4yK9wqsvurisKfw2VCQ
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Sun, 2001-11-25 at 15:35, Derek Atkins wrote:
> linas@linas.org (Linas Vepstas) writes:
>=20
> > The germans have long yelled at me for this feature, they want to have
> > some weird ID numbers as a column in the register.  As long as the code
> > is C, and static/compile-time, its hard to add this feature. =3D20
> >=20
> > -----------
> > The need to modify the register in this way was *THE MAIN REASON*
> > why scheme was added as an extension language.  However, I think
> > we lost sight of this: we wrote lots and lots of scheme code, but
> > approximately 0% of it is devoted to making gnucash configurable.
> >=20
> > (changing the color/width/labels on columns doesn't count as=3D20
> > 'configuration'.)
>=20
> Actually, this is very close to what I mentioned on gnucash-devel
> regarding reworking the SplitLedger in general.  A much better
> approach would be a configurable table-row where you create a list of
> cells-definitions.  Each cell-definition contains:
>=20
> 	label
> 	widget_type
> 	get_function
> 	set_function

Again, this is all done save for the scheme configuration.
And now that we are seriously talking about lots of different
registers, it's time to implement such a configuration.


> Then I can create, eg, a Bank Register by creating a list:
>=20
> 	{ "Date", DATE, xaccTransGetDateEnteredTS, xaccTransSetDateEnteredTS }
> 	{ "Num", TEXT, xacc... }
> 	{ "Description", TEXT, ... }
> 	...
>=20
> I'd like to extend this to GncEntry, which would look something like
> this:
>=20
> 	{ "Date", DATE, gncEntryGetDate, gncEntrySetDate }
> 	{ "Description", TEXT, gncEntryGetDescription, gncEntrySetDescription }
> 	...
>=20
> Obviously this needs a little more work because not all the functions
> take the same argument; some will take a Split, some would take a
> Transaction (whereas in the GncEntry it is always taking an entry).
>=20
> Moreover, this doesn't work very well in the case of choices, where
> somehow you have to set the possible choices in the cell descriptor.
>=20
> This means I have three choices:
> 	a) make the SplitLedger extensible (somehow)

It should be a), I think.

dave


--=-B4yK9wqsvurisKfw2VCQ
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQA8AYaZ5effKKCmfpIRAsW7AJ9lgvaTBdnhac44/ONlRoAKV1eh1wCgl4HP
b4jVQmPc/j/Gks8BKYaN7ag=
=FF56
-----END PGP SIGNATURE-----

--=-B4yK9wqsvurisKfw2VCQ--