On Wed, May 21, 2008 at 12:02:14AM +0200, Justus Winter wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hey everyone :)
Hi there!
attached is a patch that transforms dillos find in page dialog box into a firefox style toolbar.
Nice! Committed with some changes. See below.
There are some issues that I cannot put my finger on... see the comments in the event handler. Maybe there's some magic about fltks event model that I did not fully understand... then again it might be fltks fault. Anyway, I'd be happy for some hints.
Ok, the comment says:
/* BUG: this is acting funny * * 1. figure out why the first EscapeKey is only * sent to the input widget if it is focused at the time * 2. ctrl-f ; type foo ; select foo and type bar ; press esc * => foo is inserted into the input box */
Fixed both in the committed version. FLTK2 sends the event to handle() and its return value tells whether the event was handled or not. Here, the input widget was handling the event (and making the selection empty) so there was no need to propagate the event upwards, but when the selected text was already empty (second time) there was nothing to do and the event was propagated upwards. The patch was the same as for the location bar. A custom input widget that handles keys in a slightly different way that the native Input widget. In this case (MyInput) we don't handle the escape key and let FLTK pass it upwards, and thus get the desired effect.
Jorge, could you update your coding conventions with respect to c++ specific language features?
Oh yes. I need to find some time though. I've been giving priority to pending patches. The coding conventions, are clearly out of date. At least the C++ part. In this regard we're currently following dw2's style. Can you write a few rules down and send them to me to update the page. The idea is not to be pedantic on style issues, but to define a common style that we can adhere to. -- Cheers Jorge.-