<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/104473/">http://git.reviewboard.kde.org/r/104473/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On April 3rd, 2012, 11:38 p.m., <b>Eike Hein</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="http://git.reviewboard.kde.org/r/104473/diff/1/?file=55489#file55489line602" style="color: black; font-weight: bold; text-decoration: underline;">src/viewer/chatwindow.cpp</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">bool ChatWindow::eventFilter(QObject* watched, QEvent* e)</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">602</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="kt">void</span> <span class="n">ChatWindow</span><span class="o">::</span><span class="n">focusInputBox</span><span class="p">()</span></pre></td>
</tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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?</pre>
</blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">> 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</pre>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On April 3rd, 2012, 11:38 p.m., <b>Eike Hein</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="http://git.reviewboard.kde.org/r/104473/diff/1/?file=55491#file55491line159" style="color: black; font-weight: bold; text-decoration: underline;">src/viewer/ircinput.cpp</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">void IRCInput::updateAppearance()</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">159</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">if</span> <span class="p">(</span><span class="n">Preferences</span><span class="o">::</span><span class="n">self</span><span class="p">()</span><span class="o">-></span><span class="n">disableInputOnUnfocus</span><span class="p">())</span></pre></td>
</tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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.</pre>
</blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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.</pre>
<br />
<p>- Mailson</p>
<br />
<p>On April 3rd, 2012, 12:57 a.m., Mailson Menezes wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Konversation and Eike Hein.</div>
<div>By Mailson Menezes.</div>
<p style="color: grey;"><i>Updated April 3, 2012, 12:57 a.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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).</pre>
</td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="https://bugs.kde.org/show_bug.cgi?id=296820">296820</a>
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>src/config/generalbehavior_configui.ui <span style="color: grey">(a42a97636a5a08cc3bc93e2b08ee01cd51158e4a)</span></li>
<li>src/config/konversation.kcfg <span style="color: grey">(76872fa554fabe4095c004f8ab3bf5191d85289c)</span></li>
<li>src/viewer/chatwindow.h <span style="color: grey">(a371bee52f8ccea44fb2d9c1125721d77d8b0ef8)</span></li>
<li>src/viewer/chatwindow.cpp <span style="color: grey">(74419d0fcbb1d6c9b9b3a303566b88997f0535d6)</span></li>
<li>src/viewer/ircinput.h <span style="color: grey">(1511a1fb594cb3f2137ba3f6118d2c47d73f7dd7)</span></li>
<li>src/viewer/ircinput.cpp <span style="color: grey">(c399e4e72af292448bf124e6d16c003ebedd07ee)</span></li>
<li>src/viewer/viewcontainer.cpp <span style="color: grey">(f7e4e00c0a90adf5f19610f25ab117b3ce350c85)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/104473/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>