GnuCash
Contact   Instructions
Bug 796775 - Auto fill not working correctly (only match the first char you type ...)
Summary: Auto fill not working correctly (only match the first char you type ...)
Status: NEW
Alias: None
Product: GnuCash
Classification: Unclassified
Component: Windows (show other bugs)
Version: 3.2
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: windows
QA Contact: windows
URL:
Whiteboard:
Keywords:
: 796776 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-07-22 22:30 EDT by Alex Mak
Modified: 2018-10-28 21:30 EDT (History)
4 users (show)

See Also:


Attachments
Screenshot showing quickfill of chinese characters with selection. (5.87 KB, image/png)
2018-09-17 16:56 EDT, John Ralls
no flags Details
Autofill cannot best match after the first letter (618.75 KB, image/jpeg)
2018-09-17 20:57 EDT, Alex Mak
no flags Details
Pinyin (Chinese mode) (620.76 KB, image/jpeg)
2018-09-18 21:38 EDT, Alex Mak
no flags Details
Pinyin English mode (645.10 KB, image/jpeg)
2018-09-18 21:38 EDT, Alex Mak
no flags Details

Description Alex Mak 2018-07-22 22:30:13 EDT
Auto fill not working correctly (only match the first char you type ...)
1. Open a register
2. Type first letter into the description field ,the suggested string appended at the end of the first letter.
3. Type second letter, the appended string at step 2 didn't change and autofill cannot best match the second letter anymore.
Comment 1 John Ralls 2018-07-22 23:22:29 EDT
*** Bug 796776 has been marked as a duplicate of this bug. ***
Comment 2 John Ralls 2018-07-22 23:26:25 EDT
This is the same as bug 796734, but is the first report on Windows. You're obviously not going to be able to disable the IME as a workaround either.
Comment 3 Alex Mak 2018-07-23 01:28:47 EDT
(In reply to John Ralls from comment #2)
> This is the same as bug 796734, but is the first report on Windows. You're
> obviously not going to be able to disable the IME as a workaround either.

Yup, I am using Chinese IME, It is not very practical since I need to type Chinese all the time ...
Comment 4 John Ralls 2018-09-11 13:50:31 EDT
I fixed this for MacOS and I think that the way I did it will work for Windows too. Please test https://code.gnucash.org/builds/win32/maint/gnucash-3.2-2018-09-11-git-3.2-263-g48b29f5e9+.setup.exe.
Comment 5 Alex Mak 2018-09-13 01:46:21 EDT
(In reply to John Ralls from comment #4)
> I fixed this for MacOS and I think that the way I did it will work for
> Windows too. Please test
> https://code.gnucash.org/builds/win32/maint/gnucash-3.2-2018-09-11-git-3.2-
> 263-g48b29f5e9+.setup.exe.

Tested in windows, the problem is still here, Autofill only match with the first letter you type and cannot match the second letter.
Comment 6 John Ralls 2018-09-17 16:56:42 EDT
Created attachment 372977 [details]
Screenshot showing quickfill of chinese characters with selection.

I'm not able to reproduce this with https://code.gnucash.org/builds/win32/maint/gnucash-3.2-2018-09-17-git-3.2-276-g83b1b8adf+.setup.exe.

Are you typing in Roman letters or Chinese? If in Chinese, what roman letter sequence are you typing to produce the characters, at what point does the quickfill recognize and fill in, and is there any selection at that point?

For example, to create the attached illustration I typed faso3noshi4hanguo3 (utter nonsense, I'm sure, as I don't know any Chinese) in the first transaction. Quickfill recognized and provided the proposed completion after typing faso3noshi4. The numbers in parentheses are the selections from the pick list.
Comment 7 Alex Mak 2018-09-17 20:55:15 EDT
(In reply to John Ralls from comment #6)
> Created attachment 372977 [details]
> Screenshot showing quickfill of chinese characters with selection.
> 
> I'm not able to reproduce this with
> https://code.gnucash.org/builds/win32/maint/gnucash-3.2-2018-09-17-git-3.2-
> 276-g83b1b8adf+.setup.exe.
> 
> Are you typing in Roman letters or Chinese? If in Chinese, what roman letter
> sequence are you typing to produce the characters, at what point does the
> quickfill recognize and fill in, and is there any selection at that point?
> 
> For example, to create the attached illustration I typed faso3noshi4hanguo3
> (utter nonsense, I'm sure, as I don't know any Chinese) in the first
> transaction. Quickfill recognized and provided the proposed completion after
> typing faso3noshi4. The numbers in parentheses are the selections from the
> pick list.

Install the lastest nightly build, test procedure as below:
1. There are some existing transaction with description that begin with "2017" and "2018"
2. Open a new transaction , type the letter 2017
3. Autofill happened when I type the first letter '2' (see attachment)
4. when I type more letter '017' , the autofill stay the same and cannot best match with the "2017"
Comment 8 Alex Mak 2018-09-17 20:57:27 EDT
Created attachment 372978 [details]
Autofill cannot best match after the first letter
Comment 9 Alex Mak 2018-09-17 20:58:26 EDT
(In reply to Alex Mak from comment #7)
> (In reply to John Ralls from comment #6)
> > Created attachment 372977 [details]
> > Screenshot showing quickfill of chinese characters with selection.
> > 
> > I'm not able to reproduce this with
> > https://code.gnucash.org/builds/win32/maint/gnucash-3.2-2018-09-17-git-3.2-
> > 276-g83b1b8adf+.setup.exe.
> > 
> > Are you typing in Roman letters or Chinese? If in Chinese, what roman letter
> > sequence are you typing to produce the characters, at what point does the
> > quickfill recognize and fill in, and is there any selection at that point?
> > 
> > For example, to create the attached illustration I typed faso3noshi4hanguo3
> > (utter nonsense, I'm sure, as I don't know any Chinese) in the first
> > transaction. Quickfill recognized and provided the proposed completion after
> > typing faso3noshi4. The numbers in parentheses are the selections from the
> > pick list.
> 
> Install the lastest nightly build, test procedure as below:
> 1. There are some existing transaction with description that begin with
> "2017" and "2018"
> 2. Open a new transaction , type the letter 2017
> 3. Autofill happened when I type the first letter '2' (see attachment)
> 4. when I type more letter '017' , the autofill stay the same and cannot
> best match with the "2017"

Seem the autofill can only match with the first letter ...
Comment 10 Alex Mak 2018-09-17 21:13:52 EDT
(In reply to Alex Mak from comment #9)
> (In reply to Alex Mak from comment #7)
> > (In reply to John Ralls from comment #6)
> > > Created attachment 372977 [details]
> > > Screenshot showing quickfill of chinese characters with selection.
> > > 
> > > I'm not able to reproduce this with
> > > https://code.gnucash.org/builds/win32/maint/gnucash-3.2-2018-09-17-git-3.2-
> > > 276-g83b1b8adf+.setup.exe.
> > > 
> > > Are you typing in Roman letters or Chinese? If in Chinese, what roman letter
> > > sequence are you typing to produce the characters, at what point does the
> > > quickfill recognize and fill in, and is there any selection at that point?
> > > 
> > > For example, to create the attached illustration I typed faso3noshi4hanguo3
> > > (utter nonsense, I'm sure, as I don't know any Chinese) in the first
> > > transaction. Quickfill recognized and provided the proposed completion after
> > > typing faso3noshi4. The numbers in parentheses are the selections from the
> > > pick list.
> > 
> > Install the lastest nightly build, test procedure as below:
> > 1. There are some existing transaction with description that begin with
> > "2017" and "2018"
> > 2. Open a new transaction , type the letter 2017
> > 3. Autofill happened when I type the first letter '2' (see attachment)
> > 4. when I type more letter '017' , the autofill stay the same and cannot
> > best match with the "2017"
> 
> Seem the autofill can only match with the first letter ...

The suggested string should be refresh/update when i type the 2nd letter '0' , however, seem it cannot update dynamically with the typing.
Comment 11 John Ralls 2018-09-17 21:23:29 EDT
Hmm. It works correctly for me, but that's with pinyin/simplified, not traditional. I'll try again tomorrow with traditional.
Comment 12 Alex Mak 2018-09-17 21:28:23 EDT
(In reply to John Ralls from comment #11)
> Hmm. It works correctly for me, but that's with pinyin/simplified, not
> traditional. I'll try again tomorrow with traditional.

Yup, u r right. This is traditional chinese IME (Cangjie / Quick).
Comment 13 John Ralls 2018-09-18 16:56:48 EDT
The Chinese (Traditional Hong Kong SAR) IME does indeed show the problem.
Comment 14 Alex Mak 2018-09-18 21:38:13 EDT
Created attachment 372980 [details]
Pinyin (Chinese mode)
Comment 15 Alex Mak 2018-09-18 21:38:50 EDT
Created attachment 372981 [details]
Pinyin English mode
Comment 16 Alex Mak 2018-09-18 21:47:48 EDT
Some testing is done for different IME
1. English IME => Work
2. PinYin Chinese Input mode => Not Work (See attachment)
3. PinYin English Input mode => Work (See attachment)
4. Changjie / Quick Chinese Input Mode => Not Work
5. Changjie / Quick English Input Mode => Work 

So ... I guess , under the same IME say PinYin, the char code output for the same letter e.g. '2' are different for Chinese mode and English mode.

ASCII ? UTF-8 ? ... I don't know ...
Comment 17 John Ralls 2018-09-18 23:00:36 EDT
What I think is Pinyin Chinese mode--meaning that when I type syllables with Roman characters the IME window pops up to offer me Chinese characters--works for me, but what I suppose is Changjie, what M$ calls the Hong Kong IME, doesn't. I'm busy tomorrow but I'll explore some more on Thursday and try to figure out if the selection isn't getting set or if the IME is eating it the way the MacOS one did.
Comment 18 John Ralls 2018-09-20 13:38:04 EDT
A comment in bug 796859 led me to test the order of setting the IME and starting GnuCash. If I start the IME first then the IME loses the selection; if I have the English IME selected, start GnuCash, and then switch to either PinYin or Hong Kong the selection is retained. Can you try that and see if it makes a difference for you?
Comment 19 Alex Mak 2018-09-20 21:14:45 EDT
(In reply to John Ralls from comment #18)
> A comment in bug 796859 led me to test the order of setting the IME and
> starting GnuCash. If I start the IME first then the IME loses the selection;
> if I have the English IME selected, start GnuCash, and then switch to either
> PinYin or Hong Kong the selection is retained. Can you try that and see if
> it makes a difference for you?

Hi John

You r right! if the default IME is english. Autofill is working even changed to PinYin and Quick !!! 
This results is funny ...
Comment 20 John Ralls 2018-09-21 16:19:26 EDT
It may be partly https://gitlab.gnome.org/GNOME/gtk/issues/1350. The first response there suggests that moving away c:\Program Files (x86)\gnucash\lib\gtk-3.0\3.0.0\immodules.cache might actually work as another work-around. You might test that as well.
Comment 21 Alex Mak 2018-09-22 10:19:06 EDT
(In reply to John Ralls from comment #20)
> It may be partly https://gitlab.gnome.org/GNOME/gtk/issues/1350. The first
> response there suggests that moving away c:\Program Files
> (x86)\gnucash\lib\gtk-3.0\3.0.0\immodules.cache might actually work as
> another work-around. You might test that as well.

Cannot find this path and file under windows 10 ...
Comment 22 John Ralls 2018-09-23 12:55:48 EDT
Dang, you're right. So no Gtk IME involved in the bundled GnuCash. Interesting...
Comment 23 Alex Mak 2018-09-26 02:31:51 EDT
BTW , some off topic questions , I have sent a email to gnucash-user@gnucash.org for some questions about gnucash (Question as below). However, there is not feedback at all ... 

<<<
Hi Gnucash team

I would like to know how to change the order of the account list in the pull-down menu during transaction register ? Seem some of the account is not well ordered.

Regards
>>>

Can I know what is the right channel for such Gnucash Q & A ?
Comment 24 John Ralls 2018-09-26 09:37:31 EDT
gnucash-user is the correct channel; there's also our IRC channel, #gnucash on irc.gimp.net.

Your email with that question is in the list archives at https://lists.gnucash.org/pipermail/gnucash-user/2018-July/078210.html. You'll see that there are 5 other messages in the thread including two direct replies.
Comment 25 Alex Mak 2018-09-26 22:14:34 EDT
(In reply to John Ralls from comment #24)
> gnucash-user is the correct channel; there's also our IRC channel, #gnucash
> on irc.gimp.net.
> 
> Your email with that question is in the list archives at
> https://lists.gnucash.org/pipermail/gnucash-user/2018-July/078210.html.
> You'll see that there are 5 other messages in the thread including two
> direct replies.

Thanks a lot. I found find the replies at the link above. It is straight that there is not any acknowledge to my email if there are any replies in the thread...

Anyway, seem there is no way to change the sort order of the pull down menu (account) during transaction register, right?
Comment 26 John Ralls 2018-09-26 22:33:16 EDT
David Carlson had a suggestion in the email thread, but in general, no--as I answered in the email thread. This isn't the right place to discuss it.

And yes, replying to your email on the list is absolutely an acknowledgement.
Comment 27 John Ralls 2018-10-05 14:57:51 EDT
(In reply to John Ralls from comment #22)
> Dang, you're right. So no Gtk IME involved in the bundled GnuCash.
> Interesting...

Actually not correct. Mingw-w64 builds the immodules as statics so they're included in libgtk3.dll instead of being loadable modules, so there's no immodules.cache.

However, switching the input to English before launching GnuCash means that Gtk doesn't detect that it's supposed to use the input module and doesn't enable it, so has the same effect. (The Gtk developers think that's a bug and opened https://gitlab.gnome.org/GNOME/gtk/issues/1375).
Comment 28 John Ralls 2018-10-27 18:43:37 EDT
Alex, I think I've finally fixed this. Please test https://sourceforge.net/projects/gnucash/files/Development/gnucash-3.3-2018-10-27-git-3.3-49-g7280712c8%2B.setup.exe/download.
Comment 29 John Ralls 2018-10-28 20:04:31 EDT
Never mind, I didn't get the IM set correctly. It still doesn't work.

After a few more hours in the debugger I know why: None of the requisite code is getting called. The rest of this is for Geert to think about and to remind me what I discovered when I get back from travel in December:

Neither gnucash_sheet_key_press_event nor any of the gnucash_sheet imcontext callbacks are getting called when the Chinese IM. gnucash_sheet_insert_cb is because it operates off of a signal from GtkEntry.

gnucash_sheet and GtkEntry have separate im_contexts. With X11/Wayland and Quartz the GtkEntry one's callbacks are called, then the gnucash_sheet's callbacks. On Windows only the GtkEntry's im_context callbacks are called.

When imcontextime is active it appears to disable other key event handlers. That leaves us with nowhere to restore the selection after the im_context has changed it for the preedit.
Comment 30 Alex Mak 2018-10-28 21:30:13 EDT
(In reply to John Ralls from comment #29)
> Never mind, I didn't get the IM set correctly. It still doesn't work.
> 
> After a few more hours in the debugger I know why: None of the requisite
> code is getting called. The rest of this is for Geert to think about and to
> remind me what I discovered when I get back from travel in December:
> 
> Neither gnucash_sheet_key_press_event nor any of the gnucash_sheet imcontext
> callbacks are getting called when the Chinese IM. gnucash_sheet_insert_cb is
> because it operates off of a signal from GtkEntry.
> 
> gnucash_sheet and GtkEntry have separate im_contexts. With X11/Wayland and
> Quartz the GtkEntry one's callbacks are called, then the gnucash_sheet's
> callbacks. On Windows only the GtkEntry's im_context callbacks are called.
> 
> When imcontextime is active it appears to disable other key event handlers.
> That leaves us with nowhere to restore the selection after the im_context
> has changed it for the preedit.

Noted. Thank you for your great support and waiting for gnucash team 's good news.

Note You need to log in before you can comment on or make changes to this bug.