Dave Peticolas <[EMAIL PROTECTED]> writes:
> >
> > >>>>> On Sat, 27 Nov 1999 15:25:16 -0800, Dave Peticolas
> > >>>>> <[EMAIL PROTECTED]> said:
> >
> > Dave> Also, I looked through the gtk source code and I can't find any
> > Dave> indication that gtk_editable_set_position is being ignored as
> > Dave> described above. Can anyone verify the described behavior above?
> > Dave> Is there a demonstrable bug associated with the current code?
> >
> > I would be glad to verify it, if I understood it. Would someone
> > please explain to me what he was talking about (how it applies to user
> > interaction with the application) in that bug report, so that I could
> > attempt to reproduce?
>
> According to the report, you can't call gtk_editable_set_position
> to set the cursor position during an insert callback, which is what
> the code was doing. However, with Rob's patch, it's not using that
> call anymore, so the report doesn't seem to apply.
The version I got out of CVS still has the bug - I assume that the CVS
version lags somewhat behine "real" development.
As to verification - look at the code in gtk_entry_key_press in
gtk-1.2.6/gtk/gtkentry.c:1161 which does the following
tmp_pos = editable->current_pos;
gtk_editable_insert_text (editable, event->string, event->length, &tmp_pos);
editable->current_pos = tmp_pos;
gtk_editable_insert_text emits the signal - the last argument is
passed on to the callback as "position"
Any update to the position via gtk_editable_set_position will be lost
because that sets the current_pos field in the entry struct, not "tmp_pos".
The effect of this is that as you type into a text cell if the text
you enter matches one of the existing strings up to a point characters
after the match start to insert at the beginning of the cell, not where
you think the insertion point is.
Eg If I want entries "Local Store" and "Local Garage" and already have
the former typing "Local Garage" into a cell produces "GarageLocal
Store" which is definately not what I expected!
--
Gnucash Developer's List
To unsubscribe send empty email to: [EMAIL PROTECTED]