Abdelrazak Younes wrote:
rgheck wrote:
Abdelrazak Younes wrote:
> [EMAIL PROTECTED] wrote:
>> Author: rgheck Date: Thu Apr 24 20:30:31 2008 New Revision: 24495
>>
>>
>> URL: http://www.lyx.org/trac/changeset/24495 Log: Fix part of bug
>> 4775. We need to search here only when the user requests it, and
>> not try to do "search as you go". This is too slow, even on fast
>> machines, if you have more than a handful of entries.
>
> You are most certainly right but many people do not use big biblio
> so maybe a checkbox "search as you type"?
>
We can do that. The biggest question is where to put the checkbox.
Things are kind of crowded. Note, by the way, that Enter also works
there. I had to do quite a lot to get it to work---it kept activating
OK---but it does work now, and it also works in the Available box,
where it activates Add. (You have Ctrl-Enter to insert and close.)
OK, I can live with this as long as I am not forced to use the mouse
to insert a Citation.
No, I wouldn't do that to you. ;-) The Qt "default button" business is
kind of annoying here, though. If you have a default button, you can't
see to trap Enter without using an EventFilter. In particular, the
keyPressEvent doesn't ever seem to appear. That's what makes this messy.
I've got a more or less working "Search as You Type" checkbox at home.
I'll commit later. One question: We want to cache this setting, so it
will be restored when a new dialog is open. But the only way I see to do
this---there is other stuff like it there---is to use a static variable,
since the dialog is destroyed and re-created each time. But if we use a
static variable, it will affect all GuiCitation instances, even across
windows. That's not terrible, but it is less than ideal. Is there a way
around this?
rh