Bug 297140 - Shortcut to switch focus to file/folder view after using filter bar
Summary: Shortcut to switch focus to file/folder view after using filter bar
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: bars: filter (show other bugs)
Version: 2.0
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-30 20:39 UTC by Jens Rutschmann
Modified: 2013-02-19 21:44 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.11.0


Attachments
Patch for suggestion in comment #1 (715 bytes, patch)
2012-08-10 12:49 UTC, Jens Rutschmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Rutschmann 2012-03-30 20:39:05 UTC
I often use the filter bar to find a child folder inside a folder with many other items.

To do this I press CTRL+I and enter some characters of the child folder I'm looking for.
Once it is displayed (perhaps together with a few other items) I need to use the mouse to click it.
It would be much more comfortable if there was a shortcut to place the keyboard focus back in the items, then choose the item using the arrow keys, press return to enter the folder and then again CTRL+I to search for another item in the child directory.

Of course there is the option to use TAB or SHIFT+TAB, but it needs to be pressed several times (3 times here), so this is a bit cumbersome.
Comment 1 Jens Rutschmann 2012-08-10 11:00:23 UTC
Can't we simply switch focus back to the file/folder view when pressing the return key ?
Filtering itself is done on the fly when entering some characters, so pressing return could 'confirm' the filter results and switch the focus back.

I think this would improve keyboard-only usage of the filter bar greatly.
Comment 2 Jens Rutschmann 2012-08-10 12:49:18 UTC
Created attachment 73089 [details]
Patch for suggestion in comment #1

The attached patch returns focus back to the file/folder view when pressing return in the filter bar.
I don't know if this is the perfect way to do this as I'm not really an experienced C++ programmer, but it works :-)
Comment 3 Jekyll Wu 2012-08-23 17:08:16 UTC
It is better to use reviewboard.kde.org for submitting patch. Patches attached in bugzilla are easily to b flood by many other messages and forgotton.
Comment 4 Jeroen van Meeuwen (Kolab Systems) 2012-08-24 16:22:27 UTC
Resetting assignee to default as per bug #305719
Comment 5 Jens Rutschmann 2012-09-30 11:48:58 UTC
(In reply to comment #3)
> It is better to use reviewboard.kde.org for submitting patch. Patches
> attached in bugzilla are easily to b flood by many other messages and
> forgotton.

Hi,
I signed up to git.reviewboard.kde.org and tried to submit the patch, but reviewboard insists on telling me that my patch file is no diff :-(
Even after I renamed it to .diff ...
Comment 6 Frank Reininghaus 2012-09-30 12:22:41 UTC
Thanks for the report and the patch! I was not aware of this report at all - I am only notified about all new comments to existing bug reports since the assignee change on August 24.

I have no idea why ReviewBoard doesn't like your patch :-(

Anyway, I think that the idea to focus the view when Return is pressed in the filter bar is nice :-)

Some notes on the implementation:

1. We should not only test for the "Return" key, but also for "Enter". These are considered mostly equivalent by users, so we should treat them equally.

2. The cleaner solution (even though it requires more code) would be to use signals and slots to tell the DolphinViewContainer to change the focus. Look how the Escape key is handled - maybe we could do something similar here and add a new signal "focusViewRequest" which is connected to a new slot in the view container that focuses the view.
Comment 7 Jens Rutschmann 2013-02-18 23:26:25 UTC
(In reply to comment #6)

I finally found some time and adapted the patch to your suggestions. You may find it here: https://git.reviewboard.kde.org/r/109020/
Comment 8 Frank Reininghaus 2013-02-19 21:44:59 UTC
Git commit 2f0114730d1f5c3dfaee833300168b8e16b068f2 by Frank Reininghaus, on behalf of Jens Rutschmann.
Committed on 19/02/2013 at 22:42.
Pushed by freininghaus into branch 'master'.

Return the focus from the filter bar to the view if Enter is pressed
FIXED-IN: 4.11.0
REVIEW: 109020

M  +8    -0    dolphin/src/dolphinviewcontainer.cpp
M  +5    -0    dolphin/src/dolphinviewcontainer.h
M  +12   -1    dolphin/src/filterbar/filterbar.cpp
M  +5    -0    dolphin/src/filterbar/filterbar.h

http://commits.kde.org/kde-baseapps/2f0114730d1f5c3dfaee833300168b8e16b068f2