Commit graph

7110 commits

Author SHA1 Message Date
nerdopolis turfwalker e1848a48bb Fix compile with Qt 6.7 2024-02-27 12:54:09 +00:00
Jin Liu 0eed595268 Fix: can't drop into remote dir
KFileItem::isDir() only works when it's created from listDir(),
or from a local QUrl. For a remote QUrl, isDir always returns
false, so we can't use that in supportsDropping().

As a workaround, now supportsDropping() always returns true in
remote dirs -- we don't check if a remote dir is writable when
dropping.
2024-02-27 10:13:21 +08:00
l10n daemon script 5698ad8ee3 GIT_SILENT made messages (after extraction) 2024-02-26 00:39:42 +00:00
l10n daemon script 13eef198b7 GIT_SILENT made messages (after extraction) 2024-02-24 00:39:10 +00:00
Felix Ernst 84447aab47 Resolve conflict between activateSoonAnimation and hoverSequenceAnimation
Prior to this commit, the activateSoonAnimation would not play for
folders using previews. That was because the hoverSequences of
folder previews would always take priority over the
activateSoonAnimation.

This commit prioritises the activateSoonAnimation for the quick
moments in which it is active.
2024-02-23 10:19:39 +00:00
Felix Ernst 94828aa307 Add drag-open animation
This commit adds an animation for folders that makes clear that
they will open or expand soon. This is the case when the option to
open folders during drag operations is enabled and a user drags an
item on top of a folder.

The animation goes like this:
- Replace the folder's icon with the "folder-open" icon
- Go back to the folder's original icon
- Replace the folder's icon with the "folder-open" icon once more
2024-02-23 10:19:39 +00:00
Felix Ernst 796332d63a Avoid searching for the knetattach service on startup
The installed services might change while Dolphin is running, so it is
better to only search when they are actually needed instead.

The very first time such a search happens (e.g. after updating the
system), is also somewhat slow, which could slow down the very first
Dolphin startup.

This commit might also produce a very slight general startup speed
improvement. However, the measured change is within the margin of
error.
2024-02-23 09:45:53 +00:00
Vlad Zahorodnii 19a59fad5f Fix a crash in DolphinSearchBox::hideEvent()
BUG: 481553
2024-02-21 10:13:46 +00:00
l10n daemon script bc34e50486 GIT_SILENT made messages (after extraction) 2024-02-19 00:39:32 +00:00
Felix Ernst 803a1b36db Add documentation 2024-02-18 15:14:58 +00:00
l10n daemon script 5e65de9386 GIT_SILENT made messages (after extraction) 2024-02-18 00:39:50 +00:00
Jin Liu c9c3531c0b Improve DnD handling in read-only dirs
1. Places panel and tabbar update drag status in read-only dir
2. Don't create drop job in readonly directories
2024-02-17 11:14:46 +00:00
Heiko Becker cda139ccab GIT_SILENT Update Appstream for new release
(cherry picked from commit 1228582f92)
2024-02-16 00:05:16 +01:00
l10n daemon script 1ff71d808c GIT_SILENT made messages (after extraction) 2024-02-14 00:40:04 +00:00
l10n daemon script 54eabafca9 GIT_SILENT made messages (after extraction) 2024-02-11 00:40:07 +00:00
l10n daemon script 4901cfb8e6 GIT_SILENT made messages (after extraction) 2024-02-10 00:41:11 +00:00
Heiko Becker 006163f1d3 GIT_SILENT Update Appstream for new release
(cherry picked from commit 2510ec245e)
2024-02-09 23:23:34 +01:00
l10n daemon script c854151a79 GIT_SILENT made messages (after extraction) 2024-02-09 00:40:17 +00:00
l10n daemon script f68e223db3 GIT_SILENT made messages (after extraction) 2024-02-06 00:40:02 +00:00
l10n daemon script 604d9c906b GIT_SILENT made messages (after extraction) 2024-02-05 00:39:53 +00:00
l10n daemon script bc6b1c0036 GIT_SILENT made messages (after extraction) 2024-02-04 00:39:44 +00:00
Timothée Ravier b0c2c487f0 org.kde.dolphin.appdata: Add developer_name
Fixes the following lint errors for Flathub:
```
{
    "errors": [
        "appstream-missing-developer-name"
    ]
}
```

See: https://github.com/flathub/org.kde.dolphin/pull/207
See: https://github.com/flathub-infra/flatpak-builder-lint/issues/274
See: https://freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-developer
See: https://freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-developer_name
2024-02-02 19:00:50 +01:00
Carl Schwan 6bd103b322 Fix flatpak
Update with the state of the manifest on github and install icons at the
correct location
2024-02-02 10:26:48 +00:00
Felix Ernst a4efbfbfa6 Fix focus chain
Prior to this commit pressing Tab repeatedly would bring the focus to
the end of the status bar but not further.

This commit makes sure the tab focus doesn't get stuck on the invisible tab
bar by explicitly removing the DolphinTabBar from the focus chain while it
is hidden. I don't understand why pressing Tab doesn't do anything for
the invisible tab bar, but removing an invisible and currently useless
widget from the focus chain seems sensible in any case.

Improve the accessibility autotest to prevent regressions concerning this.
2024-02-01 12:20:10 +01:00
Felix Ernst 65ba5a58c0 Speed up autoSaveSession test
Normally, the session is only saved after a few seconds. The autotest
waits for that to happen. This commit reduces the time until the session
is saved to a fraction of a seconds which means that the autotest will
complete faster.
2024-02-01 10:43:53 +00:00
Felix Ernst 2ec56f0915 Add test cases for right-to-left keyboard navigation
This commit reuses our test cases for keyboard navigation to
also test the right-to-left layout direction under various conditions.

There is also a small change to make the error output more
human-readable.
2024-01-30 16:08:16 +00:00
Felix Ernst 03de142a79 Improve arrow key navigation for right-to-left languages
While using right-to-left languages most of Dolphin is mirrored.
However, the logic of what happens when the arrow keys are pressed to
move between items in the main view was never adapted to account for
that. Basically nothing works as expected because of this. It's more
like dealing with a psychopath who misinterprets every command you give:
Left is right, right is left, up is most of the time right but sometimes
not, down is most the time left but sometimes not.

This commit fixes and adapts the logic if a right-to-left layout is used.
This fully fixes icon view mode and improves compact view mode, though
compact view mode still has more issues which aren't addressed here.

This work for the benefit of the minority that use right-to-left
languages both in Europe and the world is sponsored by NLnet and the
European Commission which I think is beautfiul.

BUG: 453933
2024-01-30 16:08:16 +00:00
Felix Ernst e817c3246c Slightly refactor count resorting
The bug fix 8f043b2958 introduced a
secondary code path to trigger a resort of items. However, the previous
way to trigger it only required a small bug fix to work and gives us a
couple of optimisations for free. This commit removes the secondary code
path and fixes the primary one.

CCBUG: 473999
2024-01-23 11:13:00 +00:00
Felix Ernst 65eefdce67 Avoid sorting too frequently
d98037745f changed the time from 500 ms to
50 ms. This commit changes it to 100 ms.

Information relevant for sorting might change repeatedly. Prior to this
commit here we would resort within 50 ms of sorting being requested. If a
lot of resorts would be requested in a short time frame, this could lead
to the item order changing within the view up to 20 times a second which
would lead to a lot of unnecessary movement and make it impossible to
read even file names during the repeated sorting.

100 ms is half as bad in that regard. Bigger values might be even better
    but it is a trade-off.
2024-01-22 13:45:01 +00:00
Yifan Zhu acc5e739ce dolphintabbar: only open tab on double left click
A new tab should be opened only if the double click comes from the left
button.

BUG: 480098
FIXED-IN: 24.02
2024-01-21 08:18:38 +00:00
Méven Car 52559a3a01 rolesupdater: set isExpandable to false when dir is empty
Signed-off-by: Méven Car <meven@kde.org>
2024-01-20 11:33:31 +01:00
Loren Burkholder 438131a3d3 Fix memory leak 2024-01-18 23:29:23 +00:00
Loren Burkholder 5d6bdce2d6 Resize the split button when the menu is removed 2024-01-18 23:29:23 +00:00
Loren Burkholder 084cf94a31 Remove the menu from the split button when splitscreen is closed 2024-01-18 23:29:23 +00:00
Loren Burkholder aaa95d5278 Remove popout action from toolbar when split screen is closed
It's pointless to show the popout action when splitscreen is closed,
so we'll remove it as a child of the splitscreen action whenever the
screen is not split.
2024-01-18 23:29:23 +00:00
Joshua Goins 830dd0148a Use a separate menu action for split view action
Now that it's a KMenuAction, it becomes impossible to trigger the root
action when it's in a menu. To work around this, we create a new action
that mirrors the state of the original. It also takes the default
shortcut.
2024-01-18 23:29:23 +00:00
Loren Burkholder 31fc08fe7f Move popout action into split action dropdown 2024-01-18 23:29:23 +00:00
Loren Burkholder 20dafcb101 Follow the setting for which view to close 2024-01-18 23:29:23 +00:00
Loren Burkholder d4df55c6bf Always update the split view button 2024-01-18 23:29:23 +00:00
Loren Burkholder 2c564cc1f9 Use better description for pop out action 2024-01-18 23:29:23 +00:00
Loren Burkholder f7e2c51198 Allow popping out a split view
If you have a split view open, you can now pop the active half out into a new window by clicking the "Pop out" button in the toolbar or by activating "View > Pop out".

BUG: 270604
2024-01-18 23:29:23 +00:00
l10n daemon script 18cd42837f 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"
2024-01-17 01:13:46 +00:00
l10n daemon script 3a25f7628c GIT_SILENT made messages (after extraction) 2024-01-17 00:39:27 +00:00
Jin Liu c984badee3 Fix: "empty folder" placeholder text eating mouse events
BUG: 441070
2024-01-16 12:37:45 +00:00
Stefano Crocco 0d01cb09c9 Never emit the fileMiddleClickActivated signal if isTabsForFilesEnabled is true
Commit d27ee07d makes it impossible for applications embedding Dolphin part (for example, Konqueror) to react to middle mouse click on a file. If I understand correctly (I'm not familiar with Dolphin code) the `fileMiddleClickActivated` signal is connected with a slot in `DolphinViewContainer`, which is only used by Dolphin itself and not by `DolphinPart`. The result is that middle clicking on a file (except archives) from a Dolphin part has no effect.

To avoid this situation, I removed the check for `!archiveProtocolIsEmpty()` in the `else if` condition. This way, if `isTabsForFilesEnabled()` is `true`, which should be true if and only if the view is inside a `DolphinPart`, the `activeTabRequested` or `tabRequested` signal will be emitted, allowing the embedding application to respond however it wants. When the view is inside the Dolphin application, instead, `isTabsForFilesEnabled()` will always be `false`, so the new behavior will be used.
2024-01-14 09:36:32 +00:00
Amol Godbole 0d2aa8a1be DolphinMainWindowTest: Add unit test for autosave session feature
Adds a simple test to check if session is autosaved when a new tab is
opened.
2024-01-14 08:34:58 +00:00
Amol Godbole 5a8bd47296 DolphinView: Use SingleShot and Queued Connections
A minor refactor where Qt::SingleShotConnection has been utilized.
Also, signal delay using QTimer has been replaced with a
Qt::QueuedConnection.
2024-01-14 08:34:58 +00:00
Amol Godbole c035e95e1d DolphinMainWindow: autosave session
Currently, the session is saved only when the app quits normally. Save
the session after a fixed time interval from the last state change i.e.
anytime the url is changed, or a tab is opened or closed, or the active
view is changed.

BUG: 425627
2024-01-14 08:34:58 +00:00
Méven Car 9691afbc50 Add setting also hide application/x-trash files when hiding hidden files
BUG: 475805
2024-01-13 09:07:33 +00:00
Eugene Popov c8dffc433c Always automatically choose a new file name while duplicating
Since now when duplicating items we automatically generate a name for the new item, we can do the same if an item with that name already exists.

BUG: 475410
2024-01-13 08:28:52 +00:00