Re: GnuCash needs developers (esp for GTK/GNOME/Guile work).



Miguel de Icaza <miguel@nuclecu.unam.mx> writes:

[ I've taken guile out of the headers since this is UI specific. ]

> It would be useful if you submited a list of the features you need
> from the matrix/spreadsheet widget.  Maybe the author of that code
> might be able to adapt it to suit your needs.

Good point, but I don't want to make too much impolite noise on these
lists.

The current Motif front end uses Xbae, so if you know that, then it's
at least an example of *a* widget that's flexible enough (more or
less).

What we need (at a minimum) is, the ability to display a bunch of rows
of cells.  Each cell should be able to have a different background and
foreground color.  To edit a cell, you should be able to click on it,
and when you do, a cell specific widget should appear, overlaying the
cell.  (Right now we need comboboxes and text widgets.)  When you
click somewhere else a signal should be emitted, and if everything
goes OK, the widget should disappear to be replaced by either the old
or new contents depending on whether the modification was accepted or
rejected.  We also need to be able to handle large numbers of rows.
They will easily reach into the thousands, and insertion and deletion
of a few (single) rows will be common, and must be fast.

Items we *might* need are per-cell fonts and the ability to show and
hide columns.

There main candidates for the task that I can see are GtkCList,
GtkSheet and GnomeCanvas.  Here's (a modified version of) what I said
about the options when I mentioned it on the GnuCash a while back.

You could:

  1) Take the GtkCList widget, and modify its source to support fonts
     (maybe), per-cell colors, and in-place editing widgets (right now
     CLists are read-only.  The code is not that complex, or that
     voluminous, so this shouldn't be too hard.  Ideally, these
     changes would then propagate upstream as an enhancement to the
     CList, or as a new widget, depending on what compromises are
     required.  The current GnuCash GTK register is based on a CList,
     but it's an ugly hack which doesn't modify the CList at all.

  2) Take the GtkSheet widget and modify it to do what we need.
     Specifically, it will need to support per-cell fonts (maybe),
     in-place editing, etc.  Right now it only supports the standard
     spreadsheet model where you edit in a plain text edit box in the
     top left corner.  These changes should also eventually go back
     upstream.

  3) Take the GnomeCanvas and build what we want on top of that.  In
     some ways this might be the easiest and the most flexible.  The
     GnomeCanvas is like the Tk Canvas.  You would have to decide
     whether to represent the visible but inactive cells as actual
     widgets, or just draw their contents yourself.  The currently
     active widget would, of course, be a real widget, and you'd have
     to move it around, and change its type, appropriately as the user
     selects different cells.

Of all these, I think the last one would be the most flexible, and
probably the easiest to manage.  It would make it easy to add fancy
stuff later since we'll have as much control as we want over the
layout, appearance, etc. without having as many synchronization issues
with the upstream source.

> Well, the Canvas will help you in the coding, but you still have to do
> pretty much everything else.

Right.

Thanks

-- 
Rob Browning <rlb@cs.utexas.edu> PGP=E80E0D04F521A094 532B97F5D64E3930



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]