After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 537807 - Hitting enter several times in Dictionary before the result shows up shows results several times
Hitting enter several times in Dictionary before the result shows up shows re...
Status: RESOLVED FIXED
Product: gnome-dictionary
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-dictionary-maint
gnome-dictionary-maint
Depends on:
Blocks:
 
 
Reported: 2008-06-11 15:00 UTC by Pedro Villavicencio
Modified: 2014-12-17 22:35 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Fix emission of lookup-start signal (4.72 KB, patch)
2014-11-30 12:35 UTC, Juan R. Garcia Blanco
accepted-commit_now Details | Review

Description Pedro Villavicencio 2008-06-11 15:00:52 UTC
this report has been filed here:

https://bugs.edge.launchpad.net/ubuntu/+source/gnome-utils/+bug/239159

"Open gnome-dictionary.
Type a word, "lol"
Hit enter 3 times in rapid succession before the result is loaded.

The results will show up 3 times in the window. In general, hitting enter n times causes the results to show n times."

Thanks,
Comment 1 Juan R. Garcia Blanco 2014-11-27 19:11:34 UTC
I have reproduced this one in 3.14.2. The title appears only once, but the definitions appear repeatedly. I will give this a try.
Comment 2 Juan R. Garcia Blanco 2014-11-30 12:35:10 UTC
Created attachment 291821 [details] [review]
Fix emission of lookup-start signal
Comment 3 Juan R. Garcia Blanco 2014-11-30 12:42:21 UTC
Although this bugs refers only to the DEFINE command, the same behavior is observed for SHOW DB, SHOW STRAT, and MATCH commands.

After thinking about it, I concluded that the best solution is to modify the time when lookup-start is emitted. For the DEFINE command, the lookup-start signal is emitted after getting response from the server; I think that moment is not really when the lookup actually starts from a client point of view (and from a server point of view neither, since at that point definitions have been already found). There is a time interval that starts with the user commanding the lookup and finishes with the server responding to the DEFINE command in which more commands can be pushed to the command queue; in this time interval, the CLIENT command is always issued, and also the connection may be established.

Now, the lookup-start signal is emitted when these commands start executing, i.e. right before the connection with the server is checked. Unfortunately, this means that lookup-start is synchronous with respect to the corresponding entry point in GdictContext. I think however this is the best option and it seems consistent to me.
Comment 4 Michael Catanzaro 2014-12-17 19:23:20 UTC
Review of attachment 291821 [details] [review]:

Sorry for the delay. Seems fine.
Comment 5 Juan R. Garcia Blanco 2014-12-17 21:39:06 UTC
Thank you very much. Committed. Could someone close the bug report?
Comment 6 Michael Catanzaro 2014-12-17 22:35:00 UTC
(In reply to comment #5)
> Thank you very much. Committed. Could someone close the bug report?

Whoops. You'll be able to do this yourself from now on.