Review Request: Focus goes to location bar when opening link in new tab in foreground

Dawit Alemayehu adawit at kde.org
Mon Aug 20 03:22:34 BST 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/105984/
-----------------------------------------------------------

(Updated Aug. 20, 2012, 2:22 a.m.)


Review request for KDE Base Apps and David Faure.


Changes
-------

This version of the patch simply defers the focus change to the location bar for a new blank tab by 500 ms. That way we give the part enough time to emit its started() signal which will put KonqView in loading state. We can then use KonqView's isLoading() function to determine whether or not we should or should not change the focus to the location bar. If the KonqView is loading we will not. Otherwise, we will assume the user created an empty tab. 

Not entirely sure the use of timers is such a great idea. However, this patch most definitely resolves both bugs #304933 and #304865. It also fixes the same issue which crops up during session restore (from a crash or a system shutdown). All the aforementioned issues are caused by the simple fact that a newly created window/tab can originally have a blank url and our check relies on the URL being blank to change the focus to the location bar far too soon.


NOTE: I also went ahead and removed the redundant calls to emitActivePartChanged() in KonqViewManager::showTab function calls. That call is unnecessary because the call to KonqFrameTabs::setCurrentIndex right above it will call eventually end up calling the same function.


Description
-------

The attached patch address the bug reported in #304933. Right now if Konqueror is configured to open new tabs in the foreground, i.e. the "Open tabs in the background" option is unchecked, then the keyboard focus is put on the location bar instead of the view.


This addresses bugs 304865 and 304933.
    http://bugs.kde.org/show_bug.cgi?id=304865
    http://bugs.kde.org/show_bug.cgi?id=304933


Diffs (updated)
-----

  konqueror/src/konqframe.h 60aa4d0 
  konqueror/src/konqframe.cpp 10ed7cd 
  konqueror/src/konqviewmanager.cpp 5352eeb 

Diff: http://git.reviewboard.kde.org/r/105984/diff/


Testing
-------


Thanks,

Dawit Alemayehu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20120820/ed032a3f/attachment.htm>


More information about the kde-core-devel mailing list