Commit graph

6106 commits

Author SHA1 Message Date
Elvis Angelaccio 6bcdb62429 Merge branch 'release/19.12' 2019-11-17 18:54:40 +01:00
Elvis Angelaccio 77e705ef3c Fix dolphin homepage in the appstream metadata 2019-11-17 18:53:44 +01:00
Piotr Henryk Dabrowski 537dc7864a [Dolphin] Open Preferred Search Tool action
Summary:
Added "Open Preferred Search Tool" action to Tools menu.

It runs preferred (topmost) external search tool as configured in the "More Search Tools" menu.

By default Ctrl+Shift+F shortcut is assigned to this action.

FEATURE: 384798
FIXED-IN: 20.03.80

{F7134238}
{F7134240}
{F7134242}

Reviewers: #dolphin, ngraham, elvisangelaccio

Reviewed By: #dolphin, ngraham

Subscribers: pkloc, kfm-devel, kde-doc-english

Tags: #dolphin, #documentation

Differential Revision: https://phabricator.kde.org/D22594
2019-11-17 18:15:26 +01:00
Yuri Chornoivan 808339bff6 Use URLs with transport encryption 2019-11-16 18:53:28 +02:00
Ismael Asensio 0ba9e8bbc0 test(search): Add test case for baloo parsing model
Summary:
Adds a new test unit for the model which parses baloo search URLs
14/19 tests are set to `XFAIL` on current implementation, as they will be fixed in a final revision.

Supersedes D25135.

Depends on: D25257

Test Plan: `bin/dolphinquerytest`

Reviewers: elvisangelaccio, bruns, #dolphin

Reviewed By: elvisangelaccio, bruns, #dolphin

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D25258
2019-11-14 22:51:22 +01:00
Ismael Asensio adfc098aa7 fix(search): Allow to set empty type
Summary:
This small patch allows to set and empty `type` to the extended options, which will set the `Any Type` option (index 0).
It doesn't make any change in current code, since this case is not called, but it helps simplifying follow-up patches.

Test Plan:
No behavior changes with current code.
Calling `setFacetsType(QString())` actually sets the first option (`Any Type`)

Reviewers: elvisangelaccio, #dolphin

Reviewed By: elvisangelaccio, #dolphin

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D25255
2019-11-13 22:53:18 +01:00
Elvis Angelaccio fc5546d03b DolphinQuery: drop DOLPHIN_EXPORT
DOLPHIN_EXPORT is only used by classes in the `dolphinprivate` target,
while DolphinQuery is part of `dolphinstatic`.

This should fix the failing Windows build on the CI.
2019-11-13 22:41:48 +01:00
Ismael Asensio 8d92c8be7f refactor(search): De-couple baloo URL parsing logic from UI
Summary:
Extracts the logic that parses `baloosearch:` urls into a new model class. The parser logic itself is kept as is.
The search box UI is later updated using the model fields.

This refactor has been proposed by @bruns in the review of D24422, as it largely simplifies the unit tests and further expansion/improvements.

Test Plan:
No behavior changes.
Test case is added in the follow-up revision: D25258

Reviewers: #dolphin, elvisangelaccio, bruns

Reviewed By: #dolphin, elvisangelaccio, bruns

Subscribers: ngraham, bruns, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D25257
2019-11-13 22:21:07 +01:00
René Bertin 83dc0afe46 make link with LLVM
This patch fixes a link failure when building with the LLVM toolchain
which does not discover the dependency on or pull in the private dolphin
library when linking dolphin itself.

BUG: 410237
Differential Revision: https://phabricator.kde.org/D22802
2019-11-12 17:47:35 +01:00
Méven Car e2e43c9073 Allow dolphin to format DateTime at later stage than KBalooRolesProvider
Summary:
KFileItemListWidgetInformant::roleText expected imageDateTime value to be a QDateTime but KBalooRolesProvider formatted it to QString previously, preventing KFileItemListWidgetInformant::roleText to format properly the imageDateTime

BUG: 411173

Reviewers: #dolphin, ngraham, elvisangelaccio

Reviewed By: #dolphin, ngraham

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D25242
2019-11-12 13:50:18 +01:00
Méven Car 89a7b316d1 [Information Panel] Allows to refresh icon and metadata for urls such as trash:/
Summary: CCBUG: 392882

Test Plan:
1. Create a file
2. Remove it, so that it goes to the trash
3. Open trash
4. Empty trash

Before:
Information panel icon is still user-trash-full

After:
Information panel icon is changed to user-trash

Reviewers: ngraham, #dolphin, elvisangelaccio

Reviewed By: ngraham, #dolphin, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D23668
2019-11-12 08:20:58 +01:00
l10n daemon script 3984e607bb SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-11-11 09:42:43 +01:00
l10n daemon script b9a2df09fc SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-11-11 05:17:33 +01:00
David Faure 4c81a78bae Merge remote-tracking branch 'origin/release/19.12' 2019-11-10 14:19:57 +01:00
David Faure d8f9ca49d3 Port away from deprecated API in KWindowSystem >= 5.62 2019-11-10 14:19:17 +01:00
Albert Astals Cid fc6ea0e1d9 GIT_SILENT Upgrade KDE Applications version to 19.11.80. 2019-11-10 11:46:00 +01:00
Elvis Angelaccio fa9bd6bed5 Merge branch 'release/19.12' 2019-11-10 10:19:19 +01:00
Elvis Angelaccio 2e9f6a7abf PlacesItemModel: remove redundant set of properties
Summary:
The text, icon and url properties are already set in
`PlacesItem::setBookmark()`, so there is no need to set them here.

The `OnlyInApp` property is part of the KBookmark object that we are
going to set to the place item, so there is no need to set it here either.

Test Plan:
- Open both dolphin and the Plasma file dialog in some app
- Edit the text, url, icon and the "Only show when using this application" checkbox in some place item from the file dialog
- Check whether the place in dolphin keeps getting updated accordingly

Reviewers: #dolphin, meven, ngraham

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D25230
2019-11-10 10:03:25 +01:00
Albert Astals Cid ce081212eb GIT_SILENT Upgrade KDE Applications version to 20.03.70. 2019-11-10 01:12:45 +01:00
Elvis Angelaccio 16a3aea6a6 Remove unnecessary semicolons after Q_UNUSED
GIT_SILENT
2019-11-09 22:09:16 +01:00
Elvis Angelaccio 3512293b98 Fix clazy writing-to-temporary warning 2019-11-09 22:09:16 +01:00
Elvis Angelaccio 273fc202fd Fix clazy non-pod-global-static warning
This list of URLs is only used by cleanupBookmarks(), so there is no
need to make it global (which is what clazy complains about).

While at it, make it also a `const QVector`.
2019-11-09 22:09:16 +01:00
Elvis Angelaccio b2d4e3322a Fix clazy inefficient-qlist-soft warning 2019-11-09 22:09:16 +01:00
Méven Car 31bc909c3b [Status Bar] Remove file status Timer, add text update delay
Summary:
Currently when hovering over a file we have its name, mimetype type and size display in the status bar for 1 second, after which the status of the folder is displayed.

This patch removes this timer making the status bar behavior more predictable and user friendly.

Instead there is a 50ms delay between when the status bar gets new text to display (for instance mouse hovering or keyboard navigation) and when the status bar displayed text is updated. This is to avoid flickering.

FIXED-IN: 19.12
BUG: 399267

Reviewers: #dolphin, elvisangelaccio, ngraham

Reviewed By: #dolphin, elvisangelaccio, ngraham

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D25218
2019-11-09 22:00:35 +01:00
Ismael Asensio 7949aee2d2 Make the search box more compact
Summary:
Reduce the spacing between widgets and remove the content margins on the extended search options to have a more compact and space-saving layout.
Currently, some widgets are not even aligned.
This will be even more important if we remove the toggle button for 'More Options'.

CCBUG: 386754

Test Plan:
BEFORE: {F7681182}
AFTER: {F7681184}

Reviewers: elvisangelaccio, ngraham, #dolphin, #vdg

Reviewed By: elvisangelaccio, ngraham, #dolphin, #vdg

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D25028
2019-11-07 01:51:25 +01:00
Ismael Asensio 54bd267eb9 Get rid of search "More Options" toggle button
Summary:
With the new compact search filters (type/date/rating) it makes sense to show these options whenever available, and save some horizontal space on the main bar (specially for verbose languages).
These options will be hidden nevertheless if the search is non-indexed or Baloo is disabled.
For some nicer aesthetics D25029 should be also applied.

CCBUG: 386754

Test Plan:
Current: {F7681182}
After: {F7687380}
Along with D25029: {F7687385}

Reviewers: elvisangelaccio, ngraham, #dolphin, #vdg

Reviewed By: ngraham, #vdg

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D25057
2019-11-03 23:00:36 +01:00
l10n daemon script 5338054145 GIT_SILENT made messages (after extraction) 2019-10-30 02:32:30 +01:00
Nate Graham 686a03550f Replace old deleted nepomuk icon with baloo icon 2019-10-29 08:11:52 -06:00
Yuri Chornoivan 96ebcb03df Fix minor issues found by EBN 2019-10-28 16:33:08 +02:00
l10n daemon script e6dc4739c3 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-10-28 05:14:09 +01:00
l10n daemon script a516f46b44 GIT_SILENT made messages (after extraction) 2019-10-28 02:27:57 +01:00
Ismael Asensio 1c50de3b38 New design for extended search options
Summary:
Replace the arrays of radiobuttons in dolphin search box to more simple dropdown boxes.
This provides a leaner look, saving a lot user space on the main view and it is more consistent with the 'Search tools' in the most known sites (Google, DuckDuckGo, etc.)
There is room for improvement, as `QComboBox` doesn't match perfectly with the tool buttons used avobe, but I think it is an improvement over the current situation.

BEFORE:
{F7581883}

AFTER:
{F7580952}

Test Plan: Same behavior with different aesthetics

Reviewers: elvisangelaccio, #dolphin, #vdg

Subscribers: ndavis, ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D24602
2019-10-27 22:52:01 +01:00
David Hallas c3b914a7fa Unmounting busy device doesn't tell who is blocking
Summary: Unmounting a busy device from the places panel doesn't tell which applications have open files blocking the unmount.

Test Plan:
Mount a USB stick using Dolphin
Open a file from the USB stick
Unmount the USB stick using Dolphin
Observe the new error message.

FEATURE: 189302

Reviewers: #dolphin, elvisangelaccio, ngraham, broulik, meven

Reviewed By: #dolphin, elvisangelaccio, meven

Subscribers: meven, davidedmundson, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19989
2019-10-27 06:52:25 +01:00
Méven Car a5ce798f28 When the selection is deselected, restart the keyboard search from the beginning
Summary:
BUG: 411538
FIXED-IN: 19.12

Test Plan:
Open a directory with 3 files starting with the same letter.
1. Press this letter key twice
2. The second file is selected
3. Deselect the file with the mouse or using Esc
4. Wait 1 second
5. Press the same key again

Before:
The third file gets selected

After:
The first file get selected

ctest

Reviewers: #dolphin, elvisangelaccio, ngraham

Reviewed By: #dolphin, elvisangelaccio, ngraham

Subscribers: ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D23716
2019-10-26 12:53:34 +02:00
Alex Miranda d8c11a67bd Disable keyboard accelerators for the tabs widget
Summary:
Now that there are actions for switching to a specific tab with default
Alt + <number> shortcuts, automatically assigned keyboard accelerators
can result in ambiguous shortcuts when using specific tab names
containing numbers.

Not adding any accelerators for the tabs widget ensures the default
shortcuts work reliably regardless of tab names.

Test Plan:
- Verify there are no ambiguous shortcuts when browsing folders with
names containing only numbers
- Verify other keyboard accelerators still work (menu bar, context menu
and others)

Reviewers: #vdg, #dolphin, ngraham

Reviewed By: #vdg, ngraham

Subscribers: ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D24794
2019-10-21 21:39:30 +02:00
l10n daemon script 0a93454c1d GIT_SILENT made messages (after extraction) 2019-10-21 02:26:24 +02:00
Méven Car 56a38da57a Avoid emitting twice twice selectionChanged when keyboard changes the selection, fix slotChangeCurrentItem
Summary:
In KItemListController::slotChangeCurrentItem searchFromNextItem use was bugged :

The two branches of `if (searchFromNextItem)` both looked for the next keyboard with indexForKeyboardSearch(text, currentIndex (the first one with just a +1 modulo).
But when searchFromNextItem is false, we are supposed to start to look for the next indexKeyboard from the start of the list `0`, not from the `currentIndex`

Reviewers: elvisangelaccio, #dolphin

Reviewed By: elvisangelaccio, #dolphin

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D24505
2019-10-20 16:05:19 +02:00
Alex Miranda e3f1d50b73 Fix a bug where "Add to Places" remains disabled
Summary:
Fix a bug where "Add to Places" doesn't get re-enabled in the context
and file menus when nothing is selected after previously selecting a
single file that is not a directory or multiple files.

Test Plan: Verify the action remains enabled when appropiate

Reviewers: #dolphin, elvisangelaccio, meven

Reviewed By: meven

Subscribers: meven, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D24690
2019-10-20 12:03:10 +02:00
Ismael Asensio c540b4eef1 [dolphin/search] Reset search options when needed
Summary:
Adds a method to reset the options in `facetsWidget` in two cases: when disabled and before parsing a new search URL.
Otherwise, controls for a parameter (ex. `rating`) which are not found in the new URL would stay on the old positions, instead of the default "any".
See D24422

Test Plan: Controls on `facetsWidget` go back to the default in such two cases.

Reviewers: #dolphin, elvisangelaccio, meven, ngraham

Reviewed By: ngraham

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D24450
2019-10-20 11:51:59 +02:00
Ismael Asensio 167d5184ed [dolphin/search] Fix search behavior when selecting "Your Files"
Summary:
Fix the search box forgetting the location where the user was previously searching into.

To do a search on "All Files" instead of setting the `m_searchPath` to `$HOME`, it checks the button state, so the "From Here" location is not lost.
As an added benefit, selecting "Your Files" when in a non-indexed folder will use the baloo search instead of a fully non-indexed search from $HOME.

This issue is the last remaining one of the series started with D24422, with the purpose of fixing the searchbox parsing and update.

Test Plan:
- Toggle between "From Here/Your Files" and navigate between locations
- The search box remembers the location and keeps a coherent state

{F7575402}

Reviewers: #dolphin, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D24577
2019-10-20 11:43:32 +02:00
Christoph Cullmann 0caab3c0a2 properly enable hi-dpi support 2019-10-13 18:33:53 +02:00
Ismael Asensio c144701c28 Hide search extra options when not available
Summary:
Hide the search extra options when they are not available, because the current location is not indexed or Baloo is not enabled.
The button is disabled and shows a tooltip to provide feedback of why it's not available.
Depends on D24478

{F7531893}

CCBUG: 396898
FEATURE: 318580
FEATURE: 408680
FIXED-IN: 19.11.80

Test Plan:
 - `Ctrl-F` on a non-indexed location
 - `balooctl disable` and `Ctrl-F` on an indexed location

On both cases the extra options are not shown, the button is disabled and the reason is shown in the tooltip
The user selection is remembered between indexed locations.

Reviewers: #dolphin, elvisangelaccio, meven, ngraham

Reviewed By: meven

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D24446
2019-10-13 17:22:28 +02:00
Alex Miranda e04ec8601f Add actions for switching to a specific tab
Summary:
Add actions to switch to each of the first 9 tabs and another action to
switch to the last tab.

This feature makes it much easier to quickly switch between tabs just
like you normally would be able to when using a web browser or other
applications.

Reviewers: #vdg, #dolphin, ngraham, elvisangelaccio

Reviewed By: #vdg, #dolphin, ngraham

Subscribers: meven, ngraham, elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D24353
2019-10-13 16:41:00 +02:00
Méven Car e7de986202 Refactoring: add shouldClearSearchIfInputTimeReached to KItemListKeyboardSearchManager 2019-10-10 09:28:25 +02:00
Méven Car beba31d34b Update documentation mentionning Recent places group 2019-10-09 09:35:46 +02:00
Ismael Asensio df9ca5b0c2 [dolphin/search] Add method isIndexEnabled()
Summary: Extracts the logic for checking if the current path is indexed to its own method.

Test Plan: No behavior changes

Reviewers: elvisangelaccio, ngraham, meven

Reviewed By: ngraham, meven

Subscribers: meven, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D24478
2019-10-08 21:42:11 +02:00
Ismael Asensio e30357343b [dolphin/search] Avoid unnecesary reloads on setSearchPath
Summary:
Check in `setSearchPath()` if the `url` passed is already the `searchPath`
This was causing an effect where reloading the same search URL results on buttons `From Here/Everywhere` toggling.
See D24422

Test Plan:
On your home folder press `Ctrl-F` several times
Buttons `From Here/Everywhere` should now not toggle each time

Reviewers: #dolphin, elvisangelaccio, meven, ngraham

Reviewed By: #dolphin, ngraham

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D24449
2019-10-07 21:50:59 +02:00
Ismael Asensio 304ab14e08 [dolphin/search] Add missing parsing for type 'Folder'
Summary:
Add missing parsing for type 'Folder'
See D24422

Test Plan:
dolphin --new-window 'baloosearch:?json=%7B%22type%22:[%22Folder%22]%7D'
- `Folders` is selected in search options

Reviewers: #dolphin, elvisangelaccio, meven, ngraham

Reviewed By: #dolphin, ngraham

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D24448
2019-10-07 21:44:34 +02:00
Elvis Angelaccio fcf2d98447 Merge branch 'Applications/19.08' 2019-10-06 11:51:34 +02:00
Ismael Asensio 31fd775f36 Fix crash when lauching dolphin with a search scheme
Summary: Widget objects are initialized in `DolphinSearchBox::init()`, which is called on `QEvent::Polish`, so we must set it visible before calling `fromSearchUrl`.

Test Plan: `dolphin --new-window baloosearch://`

Reviewers: #dolphin, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D24432
2019-10-06 11:34:30 +02:00