Commit graph

696 commits

Author SHA1 Message Date
Nate Graham 78c7429a35 Add placeholder text for empty views
Throughout our QML-based software, we now display placeholder text for
empty views so that the user knows that the view is actually empty, and
it's not that the software is just broken.

This commit introduces the same thing for Dolphin's main view.

BUG: 429248
BUG: 426354
FIXED-IN: 21.04
2020-11-28 19:06:28 +00:00
Alexander Lohnau 3b74e4a3ab Remove unneeded version check 2020-11-22 08:42:18 +01:00
Elvis Angelaccio b03607b20b Add missing kconfig_version.h include
This should have been part of edced8460b.
2020-11-17 22:54:22 +01:00
Nate Graham e636bae43e Correct indentation and whitespace in prior commit 2020-11-17 09:40:05 -07:00
Domenico Panella edced8460b Allow folder creation on desktop via F10 shortcut 2020-11-17 16:18:54 +00:00
Méven Car c7d4c37534 Compute text width taking into account the zoom level
This makes the icon view less crowded.
2020-11-03 10:03:45 +00:00
Elvis Angelaccio 6496721110 Port away from deprecated QWheelEvent::delta()
QWheelEvent::angleDelta() returns a QPoint instead of int, so we need to
use its y() value to get the number of steps.
2020-11-01 23:42:46 +01:00
David Faure 97fbcf3ab5 Port from QStandardPaths::DataLocation to QStandardPaths::AppDataLocation
They are the same on Linux (but DataLocation is deprecated). On Windows this enables the use of the roaming path.

NO_CHANGELOG
2020-10-31 14:31:22 +01:00
Alexander Lohnau 97415729c3 Compile with QT_NO_KEYWORDS 2020-10-23 18:23:06 +00:00
Alexander Lohnau a24327cd50 Compile without foreach 2020-10-23 18:23:06 +00:00
Laurent Montel 40cc911319 Remove not implmemented method 2020-10-17 18:05:17 +02:00
Elvis Angelaccio de69336178 Port to non-deprecated QLabel::pixmap()
Quoting from:
714409b23c

```
The QLabel changes to the pixmap/picture getters provide the following
migration path:

QPixmap *ppix = l->pixmap(); // up to 5.15, warns in 5.15
QPixmap pval = l->pixmap(Qt::ReturnByValue); // new in 5.15, works in 6
QPixmap pixmap = l->pixmap(); // from Qt 6 on
```

Since we can't require 5.15 yet in dolphin, the port is done only when
building with Qt >= 5.15
2020-10-15 01:22:00 +02:00
Elvis Angelaccio a403df91b7 Port to non-deprecated QString::split() variant
This requires Qt 5.14, which we now depend on.
2020-10-15 01:22:00 +02:00
Elvis Angelaccio 3bf2922e33 Port away from QList::toSet()
The QSet range constructor requires Qt 5.14.

In `DolphinView::slotHeaderContextMenuRequested()` the conversion from
QList to QSet was pointless, so we just use a QList now.
2020-10-15 01:22:00 +02:00
l10n daemon script 06d629ec6e 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"
2020-09-23 06:39:00 +02:00
Nate Graham 15928112ce Make "Show hidden files" action follow HIG
The action is a toggle action, for which the HIG prescribes that the
text should describe the action's checked state, and neither the text
nor the icon should change when the action is checked. Other toggle
actions in Dolphin follow these rules, but this one does not.

This commit makes the action follow those rules.
2020-09-22 20:22:43 +00:00
Ayushmaan jangid bb85b6267a Fix unused variable warning 2020-09-18 17:21:37 +00:00
l10n daemon script 1d47e96913 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"
2020-09-14 06:15:19 +02:00
Steffen Hartleib d7b33b76a1 Improve Touch support
With this patch dolphin now supports the following touch gestures:

* Tap gesture to interact/open with directories, files and so on
* TapAndHold and release gesture for access to the context menu (main window, panel folder, places and information)
* TapAndHold and moving gesture for drag and drop action (main windows, panel folder and places)
* pinch gesture for zoom in main window
* kinetic scrolling (QScroller) for main window, panel folder, panel places, panel information, setting preview and service
* two fingers swipe gesture to left, right and up as shortcut to navigate back, forward and up
* two finger tap gesture to toggle item selection, similar to Ctrl and left mouse click

FEATURE: 385066
FIXED-IN: 20.11.80

 You are currently rebasing branch 'touch' on '85241a924'.
2020-09-13 18:53:32 +00:00
l10n daemon script 98acc7f193 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"
2020-09-10 06:35:50 +02:00
l10n daemon script a1d5d75bea 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"
2020-09-03 06:10:45 +02:00
Nikita Churaev 7c2559dd0b Text style fixes 2020-08-26 03:37:31 +03:00
Elvis Angelaccio 954e8c4790 Output of licensedigger + manual cleanup afterwards.
Unfortunately licensedigger does not strip the trailing * characters.
While at it, use a common style for all source files.
2020-08-25 17:07:38 +00:00
Yann Holme-Nielsen 86e3b82efb ## Summary
* Adds a "Copy location" item, after the "Copy" Context item and Edit Menu, which will attempt to copy the path of the fist item into clipboard.

## Reasoning
Most File Managers have this option through one or another way.
Also using the default Copy option often results in different behaviour depending on the target software, Konsole will take the path. Other Programs will use the URI. Which ultimately could lead to non optimal User Experience.

## Notes
* Should the target file **not** be on a local hard drive, this fallback to using the remote URL, feedback is wanted on that matter.

FEATURE: 407004
2020-06-29 22:27:33 +00:00
l10n daemon script aea6128fe6 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"
2020-06-18 05:48:38 +02:00
l10n daemon script 9c43e3de7d 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"
2020-06-17 14:16:01 +02:00
l10n daemon script 799c532d23 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"
2020-06-13 05:34:06 +02:00
Gastón Haro 0f0d14d4c2 Provide ability to configure size cut-off for local file previews
Summary:
FileWidgets read from kdeglobals the property "MaximumSize" under "PreviewSettings" to decide if a preview will be generated for that file.
There is no current GUI to change that file size limit. On the other hand Dolphin ignores it.

This patch aims to fix that by adding new configuration options to Dolphin. That is a new spinbox in Dolphin settings under General -> Previews tab.

Test Plan:
1 - Set up a local folder with 2 jpg images of less and more than 1 MB respectively.
2 - Go to Dolphin Preferences. General -> Previews and check "JPEG Images" from
    the list. And set "Skip previews for files above:" to 1MB.
3 - Navigate to the afore mentioned folder. Only the image of size less than 1 MB should
    show a preview.

BUG: 331240

Reviewers: ngraham, #dolphin, meven, elvisangelaccio

Reviewed By: ngraham, #dolphin, meven, elvisangelaccio

Subscribers: cfeck, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D28402
2020-06-09 11:05:55 -06:00
Nate Graham f987a1c404 Merge branch 'release/20.04' 2020-06-03 11:51:01 -06:00
Nate Graham 70b3f61e1e Show progress when duplicating items
For unknown reasons, when I implemented this feature, I turned off
progress notifications. I don't think this makes any sense, and we just
got a bug report about it.

Accordingly, this patches turns on progress notifications.

BUG: 422335
FIXED-IN: 20.04.2
2020-06-01 09:58:25 -06:00
Méven Car 770d083182 Prevents warnings
Warnings such as :
kf5.kio.core: Invalid URL: QUrl("")

It happened for instance with recentlyused:/ ioslave
2020-05-31 21:19:09 +00:00
Méven Car 8aa7cde289 Prevents showing StatJob Progress info
BUG: 422121
Was introduced in ac234a9c55
2020-05-30 15:01:56 +02:00
Elvis Angelaccio a3052c3942 DolphinView: rename new methods to copy/move urls
DolphinView doesn't know anything about split views and it shouldn't.
Rename these new methods to what they actually do (just copy or move to a
given QUrl).
2020-05-19 00:30:47 +02:00
Nikolai Krasheninnikov 9b7fc506aa Added VCS plugins signals connections for outOfVersionControl() actions.
Summary:
Plugins can now do out of version control actions (D29041), so we need them to inform of their state.
This change connects every plugin signal to Dolphin on plugin instantiation.

Test Plan:
1. Try SVN Update of inaccessible repository: see SVN error message shows up.
2. Try pull inaccessible git repository: see GIT error message shows up.
3. Try SVN Commit: see SVN message.

Reviewers: #dolphin, meven, elvisangelaccio

Reviewed By: #dolphin, meven

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D29488
2020-05-15 23:09:05 +03:00
Antonio Prcela a291c59990 Allow to copy or move selection to the other split view
Summary:
FEATURE: 276167

Default keyboard shortcuts set to `SHIFT+F5` for `copy`, `SHIFT+F6` for `move`

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

Reviewed By: #dolphin, elvisangelaccio, ngraham, meven, dfaure

Subscribers: yurchor, kde-doc-english, dfaure, meven, kfm-devel

Tags: #dolphin, #documentation

Differential Revision: https://phabricator.kde.org/D29006
2020-05-14 16:20:14 -06:00
Elvis Angelaccio 42148dd356 DolphinView: rename cutSelectedItems to cutSelectedItemsToClipboard
For consistency with d1a70c0b62.
2020-05-11 22:54:08 +02:00
Elvis Angelaccio d1a70c0b62 DolphinView: rename copySelectedItems to copySelectedItemsToClipboard
This makes it explicit that this is just a copy to clipboard, so that
we can use the name for an actual KIO::copy().
2020-05-11 19:31:29 +02:00
Ahmad Samir e3c03e466e Port QRegExp to QRegularExpression
Summary:
Port QRegExp::exactMatch() with QRegularExpression::anchoredPattern().
Port QRegExp::Wildcard with QRegularExpression::wildcardToRegularExpression().
Note that QRegularExpression::wildcardToRegularExpression() returns an anchored
pattern.

Test Plan:
Using the filter bar in dolphin works as before.

All unit tests pass, except:
- kfileitemmodeltest (which is unrelated AFAICS); it fails on master too
- placesitemmodeltest, which fails on master too

Reviewers: #dolphin, elvisangelaccio, meven

Reviewed By: #dolphin, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D26215
2020-05-06 11:37:38 +02:00
Antonio Prcela ddcca5fb91 Replace the list with the simplified list, instead of concatenate.
Summary: Replace the list m_selectedUrls with a simplified list, instead of concatenating the simplified list to the current one.

Reviewers: dfaure, meven

Reviewed By: dfaure

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D29399
2020-05-04 08:00:07 -06:00
Nikolai Krasheninnikov 67a5ec53ef For VCS-plugin interface added pure virtual function outOfVersionControlActions()
Summary: This commit changes VCS-plugin interface in order to provide actions for unversioned items (for example clone or checkout repository), updates to dolphin-plugins comes in the separate commit D29042.

Reviewers: #dolphin, meven, elvisangelaccio

Reviewed By: #dolphin, meven, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D29041
2020-04-30 16:56:24 +03:00
Nate Graham bb48d4f171 Use new "Show/Hide Hidden Files" standard shortcut
Summary:
Note that we lose the F8 shortcut since the KStandardShortcut added in XXXX can only
accommodate toew default shortcuts, and I thought Ctrl+H and Alt+. were the more important
ones. Hopefully that's not too high a price to pay.

Depends on D28802

Test Plan:
- Apply D28802 to kconfig
- Apply this patch to Dolphin, compile, and launch Dolphin
- Hit Ctrl+H or Alt+. and see that hidden files are shown or hidden as approproiate

Reviewers: #dolphin, dfaure, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D28804
2020-04-20 15:41:25 -06:00
Méven Car b274b6145b Allow statusbar and information panel to stat with KIO::StatRecursiveSize
Summary: Needed after D28901 to ensure we get the UDS_RECURSIVE_SIZE out of the stat calls.

Test Plan: Trash size is visible in status bar and information panel again.

Reviewers: ngraham, dfaure, #dolphin

Reviewed By: dfaure

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D28950
2020-04-18 19:16:52 +02:00
Méven Car ac234a9c55 Allow to display UDS_RECURSIVE_SIZE in status bar
Summary: Useful for trash:/ in particular

Test Plan: {F8233980}

Reviewers: #dolphin, dfaure, elvisangelaccio, ngraham

Reviewed By: #dolphin, ngraham

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D28794
2020-04-14 07:42:39 +02:00
Nate Graham 9b82b08fb1 Use same logic for "no extension" case with Duplicate feature
Summary:
In the "no extension" case, we weren't separating out the path and the original filename,
breaking the feature for languages where the word "copy" would be at the beginning of the
filename, not after it (e.g. "copia de foo" in Spanish, and similar in other romance
languages). This patch fixes that by separating the original path and filename in the no
extension case as is done for the other case, which should solve the issue.

BUG: 419070
FIXED-IN: 20.04.0

Test Plan:
No changes in English; should fix the issue in Spanish once new translations are done
(see https://bugs.kde.org/show_bug.cgi?id=419070 for details)

Reviewers: #dolphin, elvisangelaccio, arojas, meven, pino, #localization

Reviewed By: #dolphin, elvisangelaccio

Subscribers: aacid, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D28227
2020-04-05 16:48:51 -06:00
Elvis Angelaccio b6e13f9d57 Select new duplicated items
Summary: This should have been part of commit 405dd624fb

Test Plan: Duplicate item and make sure it gets selected.

Reviewers: ngraham

Reviewed By: ngraham

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D28084
2020-03-17 22:58:58 +01:00
Nathaniel Graham 405dd624fb Add Duplicate feature
Summary: Adds a Duplicate feature to Dolphin, showing up as a menu item in the File menu that appears when one or more items are selected and the directory is writable. Duplicated items receive the names of the original files with " copy" appended before the file extension, if any.

Test Plan:

{F5201386} {F5201393}

Test cases:

- Try to duplicate when nothing is selected: **PASS**: menu item is grayed out
- Try to duplicate anything on a read-only local volume: **PASS**:  menu item is grayed out
- Try to duplicate anything on a read-only samba share: **PASS**: menu item is grayed out
- Duplicate single local file on R/W volume: **PASS**: item is duplicated and named correctly
- Duplicate multiple local files on R/W volume: **PASS**: 3 items are duplicated, named correctly, and selected
- Duplicate single local directory on  R/W volume: **PASS**: item is duplicated and named correctly, but a rename operation is not initiated
- Duplicate multiple local directories on R/W volume: **PASS**: 3 items are duplicated, named correctly, and selected
- Duplicate single file on R/W samba share: **PASS**: item is duplicated and correctly
- Duplicate multiple files on R/W samba share: **PASS**: 3 items are duplicated, named correctly, and selected
- Duplicate single directory on R/W samba share: **PASS**: item is duplicated and named correctly
- Duplicate multiple directory on R/W samba share: **PASS**: 3 items are duplicated, named correctly, and selected
- Try to undo a successful duplication: **PASS**: operation is undone

This is my first attempt at a big change like this and I'm sure it's full of issues. I will accept any and all suggestions for improvement. :)

Reviewers: #dolphin, #kde_applications, elvisangelaccio, dfaure, broulik, davidedmundson

Subscribers: kfm-devel, meven, markg, fazevedo, cfeck, #dolphin

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D8208
2020-03-15 13:13:08 -06:00
Alexander Saoutkin 7a2885853a Merge branch 'release/19.12' 2020-03-01 17:22:46 +00:00
Alexander Saoutkin fef7eebc6e Fix files not being highlighted if directory of file is already open
Summary:
In DolphinTabWidget::openFiles it assumes openDirectories will open new tabs, so it
only marks the URL selection for the newly opened tabs. This assumption is incorrect
 as Dolphin might reuse tabs when the folder is already open.

Even then, markUrlsAsSelected does nothing when the folder is already opened.
The selection seems to only be used when the folder finishes loading, calls made after
that only change a variable without updating the actual selection.

A call to DolphinView::updateViewState() is required to restore the intended behaviour, so long as DolphinView::clearSelection() has been called on the relevant tab, otherwise updateViewState() is a no-op.

BUG: 417230
FIXED-IN: 19.12.3

Test Plan:
1. In any application that has an "open containing folder" select that option
2. and then do the same for another file in the same folder

Reviewers: broulik

Reviewed By: broulik

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D27389
2020-03-01 17:17:20 +00:00
Nikolai Krasheninnikov d0cbcf9718 Fixes multiple KVersionControlPlugin::fileName() calls on entering or updating directory.
Summary:
BUG: 415698
FIXED-IN: 20.04

On each VCS plugin creation corresponding file name is saved (cached) so when we search which VCS plugin is appropriate for current directory we don't need to call KVersionControlPlugin::fileName() again.

Reviewers: #dolphin, meven, elvisangelaccio, ngraham

Reviewed By: #dolphin, meven, ngraham

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D26962
2020-02-18 14:55:24 -07:00
l10n daemon script 2c29c7ed28 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"
2020-02-06 05:34:55 +01:00