https://bugs.kde.org/show_bug.cgi?id=359233

Henrik Fehlauer <rk...@lab12.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|                            |https://commits.kde.org/kio
                   |                            |/e3af26bbb1e7dd32a7bb48c615
                   |                            |d352416066e238
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #19 from Henrik Fehlauer <rk...@lab12.net> ---
Git commit e3af26bbb1e7dd32a7bb48c615d352416066e238 by Henrik Fehlauer, on
behalf of Simone Gaiarin.
Committed on 14/02/2018 at 17:19.
Pushed by rkflx into branch 'master'.

Improve usability of "Open With" dialog by adding option to filter the
application tree

Summary:

The current "open with" dialog implementation does not follow the KDE principle
"Simple by default, powerful when needed" for the following reasons:
- The current primary goal of the lineedit is to type in a command. Indeed when
start typing a drop-down list with command auto-completion appears.

Usability problems:
- The mentioned drop-down list covers the application tree
- It's not possible to search in the application tree, so to find a software it
is necessary to guess the category every time

My patch changes the behavior as follow:

Simple by default:
- The primary goal of the lineedit is to be a search box that allows to filter
the applications in the tree
- The command auto-completion is disabled by default

Powerful when needed
- The command autocompletion can be turned on by advanced users by selecting
the preferred autocompletion mode in the right click context menu of the
lineedit (this behavior is quite hidden, and I guess most of the normal users
don't even know it's possible (I didn't know it until I dig into the code))

Implementation details:
- The application tree filtering is achieved using a subclass of
QSortFilterProxyModel
- When 3 characters are typed in the search box all the tree is expanded (there
should be few matching entries at this point)
- When the 3rd character is deleted all the tree is collapsed
- In order to be able to filter, it's necessary to fetch all the tree nodes
when the model is created, and not on demand as it was before. This is achieved
by adding a fetchAll method. Maybe there is a more elegant way.

I've tested the implementation, but I'm pretty sure I haven't covered all the
possible cases, so a careful testing is necessary.

Relevant discussions:
https://forum.kde.org/viewtopic.php?f=285&t=131014

Test Plan:
Tests done:

With and without some text in the line edit:
- Double click on category opens it
- Double click on entry launches the software
- Remember program association for mime works
- Run in terminal works
- Keep open terminal works

Reviewers: dfaure, #frameworks, #vdg, ngraham, rkflx

Reviewed By: dfaure, ngraham, rkflx

Subscribers: rkflx, romangg, fabianr, abetts, ngraham, alexeymin, #frameworks

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D8056

M  +138  -24   src/widgets/kopenwithdialog.cpp
M  +2    -0    src/widgets/kopenwithdialog.h
M  +16   -1    src/widgets/kopenwithdialog_p.h

https://commits.kde.org/kio/e3af26bbb1e7dd32a7bb48c615d352416066e238

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to