libgnomecanvas backed gnc_item_edit vs. GtkEntry

Josh Sled jsled at asynchronous.org
Thu Dec 23 18:16:50 EST 2004


On Thu, Dec 23, 2004 at 10:21:59AM -0500, Chris Shoemaker wrote:

| I noticed that the g2 branch fails to indicate cursor position when
| typing in an account entry.  I also read the note about this in
| GNOME2_STATUS.  Looking at gnucash-item-edit.{ch}, or really
| src/register/register-gnome/* for that matter, I see that GncItemEdit
| (among other similar things) is backed by GnomeCanvasItem.  Obviously,
| this works.  But it seems pointlessly complex.

There's some amount of design motivation behind the register [and
register-gnome] that's not exactly clear to me either.

I believe the current desires are best captured by: "get thing working
under gnome2 first, then later get things working right."

| I'm still trying to understand the character of the G2 port, too.  I
| get the "fix bugs" goal (e.g. cursor won't show), but would making
| GncItemEdit backed by GtkEntry be in accord with the goals of the g2
| port?  I'm kinda walking in blind here, so someone let me know if I'm
| missing something.

It is fundamentally backed by a GtkEntry; the GnucashItemEdit can wrap a
couple of gtk widgets [a combo box, for instance], but it primarily wraps
the GtkEntry.  The reason it's a gnome canvas item is that the register
is a gnome-canvas, which takes gnome canvas items.  I've been thinking
about just how bad it would look/feel if the register-gnome was just "raw"
gtk layout-managers + widgets ... but any experiments I was thinking of
performing along those lines would be after the gnome2 port is completed.

The appropriate signals and actions should be proxied to the gtk entry as
much as possible.  It's a bit less clear to me why the cursor isn't showing,
as it's generally unclear to me right now how the damaged-area painting is
supposed to be handed there.

Derek's response is right on, though: if you can find a different solution
that works while both reducing complexity and not regressing functionality,
that's a good thing.

...jsled

-- 
http://asynchronous.org/jsled/


More information about the gnucash-devel mailing list