Review Request: Add support for automatically set url location bar to non-editable when focus out

Xuetian Weng wengxt at gmail.com
Mon Dec 17 16:06:35 GMT 2012



> On Dec. 17, 2012, 7:57 a.m., Mark Gaiser wrote:
> > dolphin/src/dolphinviewcontainer.h, lines 150-151
> > <http://git.reviewboard.kde.org/r/107748/diff/2/?file=99805#file99805line150>
> >
> >     I don't think you need to reimplement the eventFilter and register the event. Perhaps try the http://qt-project.org/doc/qt-4.8/qwidget.html#focusOutEvent way and see if that works.
> 
> Xuetian Weng wrote:
>     The problem is the widget we need to listen to is the KUrlComboBox inside KUrlNavigator, not KUrlNavigator itself (get by "editor()"), but there is no way to replace that widget, so focusOutEvent doesn't work here.
>     
>     Correct me if my understanding is wrong.
> 
> Mark Gaiser wrote:
>     I think your approach might be a bit to.. complicated for what is actually needed.
>     KUrlNavigator has the returnPressed signal: http://api.kde.org/4.x-api/kdelibs-apidocs/kfile/html/classKUrlNavigator.html and i think that one should be used (or the activated signal). Playing with custom events should rarely ever be needed as far as i know.
>     
>     KUrlNavigator::setUrlEditable is what sets the url to breadcrumb mode or edit mode. True = edit mode. False is breadcrumb mode. I'm sure you can do something with this information :)

I definitely see similar code in dolphin itself. Furthermore, it's not only related to keyboard, if you click and make it editable, and then regret, click some where else, it should be also come back to breadcrumb in my opinion. I fail to see how can I do that without using focusOutEvent.


- Xuetian


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


On Dec. 16, 2012, 1:29 p.m., Xuetian Weng wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107748/
> -----------------------------------------------------------
> 
> (Updated Dec. 16, 2012, 1:29 p.m.)
> 
> 
> Review request for Dolphin and Rodrigo Fernandes.
> 
> 
> Description
> -------
> 
> after edit the url the location bar always kept editable is very annoying. since crumb-bread location is much more useful for navigation.
> 
> BTW this is also the default behavior in Finder (Mac FM) AFAIK.
> 
> This patch add support to reset the location bar to non-editable when it's focus out, and also add an option to set it back to the old behavior.
> 
> 
> This addresses bug 157593.
>     http://bugs.kde.org/show_bug.cgi?id=157593
> 
> 
> Diffs
> -----
> 
>   dolphin/src/dolphinviewcontainer.h e2d1b18 
>   dolphin/src/dolphinviewcontainer.cpp c27550a 
> 
> Diff: http://git.reviewboard.kde.org/r/107748/diff/
> 
> 
> Testing
> -------
> 
> localily tested, no problem.
> 
> 
> Thanks,
> 
> Xuetian Weng
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20121217/3f715ed3/attachment.htm>


More information about the kfm-devel mailing list