[GNC-dev] Register text selection

Robert Fewell 14ubobit at gmail.com
Mon May 21 11:33:25 EDT 2018


Sorry I did not explain the third option very well, have a transaction
between say "Checking Account" and "Cash in Wallet" with both registers
open.
Position the cursor on a transaction somewhere in the "Checking Account",
go back to the "Cash in Wallet" and edit a transaction between the two and
commit it.
If you go back to the "Checking Account" you will find the text highlighted
where the cursor was.

I had a look at the "Edit Account Dialog" and the "Edit Customer Dialog",
both do not preselect the first entry when opened and the cursor is at the
beginning of that entry. When you tab to the next entry it is preselected
but with the cursor hidden. If you type a letter, the cursor becomes
visible as usual or if you left arrow it shows at the start or right arrow
it shows at the end of the text.

I think I will close my PR and start again if required after you have made
your changes.

Bob

On 21 May 2018 at 14:14, Geert Janssens <geert.gnucash at kobaltwit.be> wrote:

> Op maandag 21 mei 2018 13:08:05 CEST schreef Robert Fewell:
> > I have been looking at getting the middle mouse button to work for
> pasting
> > selected text and whilst trying to do that started to wonder about the
> > existing preselected text.
> >
> > Currently...
> > If you open a register, the blank transaction date text is preselected.
> > If you start Gnucash with saved open registers, the last register in the
> > list to load has the blank date text preselected, this may not be the
> > current open register.
> >
> > If you navigate by keyboard, the next field text is preselected and the
> > cursor set to the end of text.
> > If you navigate by mouse, the text is not selected and the cursor is the
> > mouse position.
> > If you update a transaction in one register and have the other
> > corresponding register open, the text where the cursor is will get
> > selected. (I think this is an easy fix).
> >
> > I am just wondering if we should be doing this preselected text at all ?
> >
> As far as I can tell the first two (text navigation hightlights the full
> text,
> mouse navigation sets the text cursor) are at least common behavior, if
> not
> default. Find any dialog with more than one text field and try what
> happens if
> you tab from one field to the next or click in random fields. I would find
> it
> disturbing if the register would behave differently.
>
> I don't understand exactly what you mean with the third behavior.
>
> > Some might say it is a good indication of where the focus is, only with
> > keyboard navigation, but one could simply add something like this to your
> > css file which would also work for mouse navigation...
> >
> > cursor entry {
> >   background-color: pink;
> > }
> >
> > So just asking the question.
>
> It's not just a matter of visual indication. It's also about ergonomics.
> Text
> and mouse navigation have different dynamics and this is reflected in the
> way
> text is selected or not when entering a text field.
>
> For your information I plan to work in this area of the code soon to fix
> input
> methods. I intend to drop all code related to text manipulation from the
> sheet
> and make the gtk entry responsible for it instead. Perhaps it's best you
> hold
> off other changes related to text entry until that's done to avoid doing
> double work.
>
> Geert
>
>
>


More information about the gnucash-devel mailing list