[Konversation-devel] Review Request: Option to disable input box when it looses focus
Mailson Menezes
mailson at gmail.com
Thu Apr 5 04:56:47 UTC 2012
> On April 3, 2012, 11:38 p.m., Eike Hein wrote:
> > src/viewer/ircinput.cpp, line 159
> > <http://git.reviewboard.kde.org/r/104473/diff/1/?file=55491#file55491line159>
> >
> > What's the purpose of this block exactly? It will run every time visual settings are changed.
> >
> > Also, it could be written more concisely by just handing the getter to the setter.
I did it so the input box would be enabled/disabled immediately after the user has applied the changes on configurations dialog.
Without that, if the user starts using this option, all the input boxes will still be enabled (the focusOut event haven't occurred yet).
And you're right about handing the getter to the setter. I should have done that.
> On April 3, 2012, 11:38 p.m., Eike Hein wrote:
> > src/viewer/chatwindow.cpp, line 602
> > <http://git.reviewboard.kde.org/r/104473/diff/1/?file=55489#file55489line602>
> >
> > I'd like to avoid this additional method and reuse the existing adjustFocus() mechanism, if possible. Perhaps you could somehow use the focus reason to differentiate and filter the focus events selectively in IrcInput?
> >
> > Though it may not be possible to get FocusIn events for a disabled widget ... anyway, it would be good to rule out first given the chance to simplify the code. Could you research?
> I'd like to avoid this additional method and reuse the existing adjustFocus() mechanism, if possible.
The problem is that are events (not related to pressing the ESC key) that also calls adjustFocus (e.g. changing tabs). That's why I created an additional method.
> Though it may not be possible to get FocusIn events for a disabled widget
yep. disabled widgets can't receive focus.
> Perhaps you could somehow use the focus reason to differentiate and filter the focus events selectively in IrcInput?
I'll try that and see if it's possible
- Mailson
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104473/#review12148
-----------------------------------------------------------
On April 3, 2012, 12:57 a.m., Mailson Menezes wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/104473/
> -----------------------------------------------------------
>
> (Updated April 3, 2012, 12:57 a.m.)
>
>
> Review request for Konversation and Eike Hein.
>
>
> Description
> -------
>
> This patch is to add an option which will disable the input box whenever it looses focus. It's good to people who are supposed to type on a different window but it's accidentally typing in Konversation.
> To reactivate the input the user can simply click in there or press the "Focus Input Box" shortcut (defaults to Esc).
>
>
> This addresses bug 296820.
> https://bugs.kde.org/show_bug.cgi?id=296820
>
>
> Diffs
> -----
>
> src/config/generalbehavior_configui.ui a42a97636a5a08cc3bc93e2b08ee01cd51158e4a
> src/config/konversation.kcfg 76872fa554fabe4095c004f8ab3bf5191d85289c
> src/viewer/chatwindow.h a371bee52f8ccea44fb2d9c1125721d77d8b0ef8
> src/viewer/chatwindow.cpp 74419d0fcbb1d6c9b9b3a303566b88997f0535d6
> src/viewer/ircinput.h 1511a1fb594cb3f2137ba3f6118d2c47d73f7dd7
> src/viewer/ircinput.cpp c399e4e72af292448bf124e6d16c003ebedd07ee
> src/viewer/viewcontainer.cpp f7e4e00c0a90adf5f19610f25ab117b3ce350c85
>
> Diff: http://git.reviewboard.kde.org/r/104473/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Mailson Menezes
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konversation-devel/attachments/20120405/bc0151a9/attachment.html>
More information about the Konversation-devel
mailing list