Commit graph

5858 commits

Author SHA1 Message Date
Thomas Surrel
ddd746675c Disable unmount option for / or /home
Summary:
This removes the 'Unmount' context menu in the Places panel for discs
corresponding to / and /home.

It does not make much sense to offer an option that will always fail.

BUG: 399659

Reviewers: #dolphin, #vdg, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: sefaeyeoglu, elvisangelaccio, ngraham, broulik, bruns, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15989
2018-10-11 23:34:17 +02:00
Thomas Surrel
200e0d1f07 Update hidden state correctly
Summary:
When renaming a file from '.hidden' to 'not_hidden', the file
would still be displayed like a hidden file with a semi-transparent
icon and a grey text.

BUG: 399599

Reviewers: #dolphin, elvisangelaccio

Reviewed By: elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D16115
2018-10-10 23:05:44 +02:00
Elvis Angelaccio
96f7a25b3d [PlacesItemModelTest] Improve name of helper method
removePlaceAfter(index) is a bit misleading, because it seems we are
going to remove the place after index `index`.

This method is just scheduling the removal of the place instead.
The method name should be consistent with what it actually does.
2018-10-10 23:03:03 +02:00
Thomas Surrel
105fe62eeb Update hidden state correctly
Summary:
When renaming a file from '.hidden' to 'not_hidden', the file
would still be displayed like a hidden file with a semi-transparent
icon and a grey text.

BUG: 399599

Reviewers: #dolphin, elvisangelaccio

Reviewed By: elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D16115
2018-10-10 22:49:50 +02:00
Kai Uwe Broulik
4de45ee507 Add proper labels to Trash Emptied notification
It is not shown by default but when the user enables it, it should show something sensible.

Differential Revision: https://phabricator.kde.org/D15589
2018-10-10 16:25:49 +02:00
Alex Debus
d68d7b6226 Added missing icons to panel places items
Summary:
Screenshots of the changes:
| {F6310217} |{F6310218}

This contribution was motivated by a comment on [[ https://pointieststick.wordpress.com/2018/10/06/this-week-in-usability-productivity-part-39/comment-page-1/#comment-2108 |  Nate's blog]].

Reviewers: #vdg, ngraham

Reviewed By: #vdg, ngraham

Subscribers: ngraham, acrouthamel, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D16019
2018-10-09 15:25:32 -06:00
Alex Debus
488d850f7e Added missing QStringLiteral to Dolphin code
Summary:
Changed
```
QIcon::fromTheme("icon")
```

to

```
QIcon::fromTheme(QStringLiteral("edit-entry"))
```

as [[ https://phabricator.kde.org/D16019#339284 | discussed here ]].

Reviewers: ngraham, #dolphin, elvisangelaccio

Reviewed By: ngraham, #dolphin, elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D16050
2018-10-09 15:17:41 -06:00
Nathaniel Graham
7f223f93df Add "Create New" menu to "Control" button
Summary: Right now, the "Create New" menu's functionality is not visible with Dolphin's default layout that has a {nav Control} button instead of a menubar. This patch adds that functionality to the {nav Control} button's menu so that it's actually discoverable for regular users.

Test Plan:
{F6304893}

All menu items work.

Reviewers: #dolphin, broulik, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: acrouthamel, anthonyfieroni, elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15609
2018-10-09 15:09:44 -06:00
Elvis Angelaccio
8a932cb837 [PlacesItemModelTest] Try harder to not hardcode indexes
This test is still randomly failing on the CI (only on master though).
Let's see if this fixes it for good.
2018-10-09 22:58:38 +02:00
Kai Uwe Broulik
c69ecab9b7 [MountPointObserverCache] Update mounts less frequently
Even on fastest disks, filling up the disk in 10 seconds is unlikely.
Moreover, Plasma's "low disk" warning only polls every minute as well and Dolphin doesn't warn you about the fact that it's full.
Reduces needless wake ups of disks and network.

CCBUG: 398612

Differential Revision: https://phabricator.kde.org/D15507
2018-10-09 13:37:10 +02:00
Elvis Angelaccio
092d08f5e8 Fix implicit-fallthrough gcc warning
GIT_SILENT
2018-10-07 23:07:32 +02:00
Elvis Angelaccio
2871364f66 Drop noisy debug output
This qCDebug() call shows up at every change of directory and doesn't
really add any value.
2018-10-07 21:46:46 +02:00
Elvis Angelaccio
949da1fb31 [DolphinMainWindowTest] Attempt to fix testOpenInNewTabTile() on the CI
Both icon `name()`s are empty on the CI, which probably doesn't have
icons or something. This should hopefully fix it.
2018-10-07 21:37:35 +02:00
Elvis Angelaccio
54ae7f2488 [DolphinMainWindowTest] Add some debug output
testOpenInNewTabTitle() is currently failing on the CI, this should help
investigate why.
2018-10-07 21:19:12 +02:00
Elvis Angelaccio
4c40ad45ef Fix another stale comment
PlacesItemModel::updateBookmarks() is gone since commit da6f8fe086.
2018-10-07 20:03:41 +02:00
Elvis Angelaccio
7904ae417a Merge branch 'Applications/18.08' 2018-10-07 19:53:08 +02:00
Elvis Angelaccio
e2f93a2829 [PlacesItemModelTest] More index-related fixes
Again, we cannot assume the Desktop and Downloads places are always
around.
2018-10-07 19:41:54 +02:00
Elvis Angelaccio
4a56d21fb1 [PlacesItemModel] Fix testSystemItems() 2018-10-07 19:28:56 +02:00
Elvis Angelaccio
e99827293b [PlacesItemModelTest] Fix testHideItem() 2018-10-07 18:01:00 +02:00
Elvis Angelaccio
26d02ecbdb [PlacesItemModelTest] Fix testTearDownDevice() 2018-10-07 17:49:36 +02:00
Elvis Angelaccio
0abba76eea [PlacesItemModelTest] Fix testDeletePlace()
If the Desktop or Downloads folder is missing, using 5 as index would be
wrong.
2018-10-07 17:41:54 +02:00
Elvis Angelaccio
9204f3272b [PlacesItemModelTest] Fix testGroups() test case
The test was also assuming that the Desktop and Downloads folders are
always available, which isn't the case.
2018-10-07 17:26:28 +02:00
Elvis Angelaccio
92157f6d7d Follow-up of commit 9760f9607d
Also drop the hardcoded model count all over the place.
2018-10-07 17:07:56 +02:00
Elvis Angelaccio
9760f9607d [PlacesItemModelTest] Check whether Desktop and Download folders exist
KFilePlacesModel creates the Desktop and Downloads bookmarks only if
their folder exists.

This should hopefully fix the failing test on the CI (actual count = 15,
expected count = 17), since the CI runs in docker and probably doesn't
have those two folders by default.
2018-10-07 16:50:27 +02:00
Elvis Angelaccio
5e8b892a51 Fix disabling of DolphinNewFileMenu
Summary:
Commit e133c4557e doesn't work because the actions in the
KNewFileMenu are added only when we show the context menu for the first
time.

Fixes the failing test cases in D16005.

Test Plan: Run `dolphinmainwindowtest` and open the context menu in different places (Home, Root, Trash, `bluetooth:/`, etc.)

Reviewers: #dolphin

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D16006
2018-10-07 15:43:34 +02:00
Elvis Angelaccio
dec7016c0d Add test cases for enabled status of DolphinNewFileMenu
Summary:
Root and Trash test cases are currently failing because of
commit e133c4557e.

Reviewers: #dolphin

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D16005
2018-10-07 15:43:34 +02:00
Thomas Surrel
467df92fb9 Add 'Mount' option to context menu of unmounted device in Places
Summary:
This is only a proposal but:
1/ it the sysmetric of the Unmount entry in the context menu of mounted devices
2/ I have to admit it took me a very long time to discover (by accident) that you can just (left-)click on a unmounted device to get it mounted automatically. I might not be the only feeling that you should be able to mount a device from the context menu ...

Twin of D15988 in Kio while dolphin is not based on the kio code for Places.

{F6306516}

Reviewers: #dolphin, #vdg, ngraham, elvisangelaccio

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

Subscribers: ngraham, acrouthamel, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15974
2018-10-07 15:31:49 +02:00
Elvis Angelaccio
3b5c5543aa Fix stale comment
GIT_SILENT
2018-10-07 13:33:26 +02:00
Jaime Torres Amate
b610ce5913 Merge remote-tracking branch 'origin/Applications/18.08'
merge https://phabricator.kde.org/D15371
2018-10-06 10:32:29 +02:00
Jaime Torres Amate
5d180c5bb2 Don't assign twice the same key to the action New Tab
Second try:
added Qt::CTRL + Qt::Key_T and Qt::CTRL + Qt::SHIFT + Qt::Key_N
as QKeySequence::AddTab is only Qt::CTRL + Qt::SHIFT + Qt::Key_N
under plasma.
2018-10-06 09:59:10 +02:00
Elvis Angelaccio
7c8a9906a2 [PlacesItemModel] Update apidox
Should have been part of da6f8fe086 (the grouping feature has
been moved upstream to KIO).
2018-10-04 23:03:23 +02:00
Elvis Angelaccio
4ccf2bbfd9 [PlacesItemModel] Drop unused forward declaration
No longer needed since da6f8fe086.

GIT_SILENT
2018-10-04 22:57:43 +02:00
Elvis Angelaccio
50f23e8b11 [PlacesItemModel] Drop dead code
m_bookmarkedItems is long gone (since commit da6f8fe086).
Porting `showModelState()` to the new KFilePlacesModel source model is
not worth it, since this was just a debugging function and most of the
logic has been moved upstream anyway (see T7040).
2018-10-04 22:52:51 +02:00
Thomas Surrel
b663abc6c7 Change icon for the 'Edit...' context menu entry in Places panel
Summary:
The current icon is used for displaying the Properties context menu
in other places in dolphin. Change to edit-entry.

Test Plan: Right-click on a place in the Places panel.

Reviewers: #dolphin, #vdg, ngraham

Reviewed By: #dolphin, #vdg, ngraham

Subscribers: broulik, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15938
2018-10-04 11:52:36 -06:00
Andreas Krutzler
30bf49d5d1 Merge branch 'Applications/18.08' 2018-10-03 20:10:04 +02:00
Andreas Krutzler
ddfc86ab8c Fix that dragging a file can trigger inline rename.
Summary:
Inline renaming is aborted as soon as an item is dragged. Previously, ’m_dragging' was used to determine if an item was being dragged. However, inline renaming is triggered after a certain amount of
time, during which time the user may have stopped dragging items.

BUG: 398375
FIXED-IN: 18.08.2

Test Plan: When dragging an selected item, inline renaming should never be started, regardless of where you drag it (Places panel, other split-view window, out of the Dolphin window, ...).

Reviewers: wbauer, elvisangelaccio, #dolphin, ngraham

Reviewed By: wbauer, elvisangelaccio, #dolphin, ngraham

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15904
2018-10-03 20:08:09 +02:00
Christoph Feck
3f682ad3a7 GIT_SILENT Upgrade KDE Applications version to 18.08.2. 2018-10-03 19:00:48 +02:00
Kai Uwe Broulik
be077d3a0c Track search mode in variable
Rather than relying on a widget being visible which might not be the case for e.g. non-active tabs

Differential Revision: https://phabricator.kde.org/D15774
2018-09-27 12:57:18 +02:00
Kai Uwe Broulik
0483b8a77f Fix window / tab caption in search mode
A search URL is never local, so this part of the code was never reached, resulting in raw baloosearch or filenamesearch URLs
showing up as window and tab title

Differential Revision: https://phabricator.kde.org/D15772
2018-09-27 12:56:09 +02:00
Kai Uwe Broulik
a9d10a5c0b [Places Panel] Cleanup includes
Some leftovers from when Dolphin managed the places entirely on its own

Differential Revision: https://phabricator.kde.org/D15636
2018-09-24 08:38:03 +02:00
Kai Uwe Broulik
391006130e Update disk space info on refresh
When explicitly refreshing the view (e.g. F5) also refresh disk space info.
This would also allow us to raise the refresh interval somewhat.

CCBUG: 398612

Differential Revision: https://phabricator.kde.org/D15508
2018-09-19 10:20:14 +02:00
Kai Uwe Broulik
7ec783e749 [ViewProperties] Check part of home first before doing file system stuff
There's no point in creating a QFileInfo instance and checking for file properties if we're not going to do anything with it
when not inside home.

Differential Revision: https://phabricator.kde.org/D15237
2018-09-17 16:02:50 +02:00
David Edmundson
cb6c71ae1b Keep org.freedesktop.FileManager1 registered across processes
Summary:
Currently if someone starts 2 dolphins, the second cannot register
org.freedesktop.FileManager1 meaning and when the first dolphin quits,
no-one has it registered.

It doesn't cause a huge problem right now as we just dbus-activate a new one if
needed, but it means the behaviour is a bit inconsistent and
non-optimal.

DBus has a system to queue names, meaning that as long as any dolphin is
running this name is owned by one of the processes.

Also this patch registers the service after the object which is
technically safer.

Test Plan:
Ran d-feet
Opened 2 dolphins, closed the first
Service was still registered and the PID of the owning process changed.

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15539
2018-09-17 12:04:00 +02:00
Kai Uwe Broulik
b98948ae1e Revert "[KFileItemModelRolesUpdater] Avoid duplicate indexes to resolve"
Sometimes causes the first thumbnail to not be loaded :/

This reverts commit 033eb6b3a3.
2018-09-11 11:53:56 +02:00
Kai Uwe Broulik
033eb6b3a3 [KFileItemModelRolesUpdater] Avoid duplicate indexes to resolve
This avoids requesting a thumbnail twice for certain files, typically the first or last one in a folder.

Differential Revision: https://phabricator.kde.org/D15404
2018-09-11 09:55:30 +02:00
Jaime Torres Amate
9991eb0f5e Don't assign twice the same key to the action New Tab
Summary:
QKeySequence::AddTab = Qt::CTRL + Qt::Key_T.
Leaving only the first avoids the warning window "There are two actions (New Tab, New Tab) that want to use the same shortcut (Ctrl+T)"

BUG: 398324

Test Plan:
su - test
unset KDE_FULL_SESSION
dolphin
After: No more the warning window.

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15371
2018-09-10 16:47:31 +02:00
Kai Uwe Broulik
92a4b5bb62 Merge branch 'Applications/18.08' 2018-09-10 10:23:25 +02:00
Kai Uwe Broulik
c5ce845e83 Do use QIcon::Selected for non-icon view
Fixes a regression introduced by not using the selected state.
The views other than icon view actually do have a proper highlighted background.

Differential Revision: https://phabricator.kde.org/D15387
2018-09-10 10:22:58 +02:00
Nathaniel Graham
cf0052c296 Make thumbnail frame-and-shadow drawing criteria match those of the file dialog
Summary:
KIO's file dialog already has logic to avoid drawing frames around images detected as likely to be icons, which is improved with D15071. Since Dolphin doesn't use KIO for any of this (boo) we have to pull it over here too; this patch brings the same feature to Dolphin, as well as the feature to disable frames and shadows for all thumbnails at very small sizes, which improves clarity.

With this patch, Dolphin's frame drawing behavior becomes consistent with that of the file dialog (as of D15071).

BUG: 295526
FIXED-IN: 18.12.0

Test Plan:
Icons no longer have frames:
{F6214279}

Images without transparency still have frames:
{F6214280}

Nicer presentation for folders with mixed image types (images without transparency get frames; images without it don't):
{F6214278}

At small sizes, thumbnail clarity is improved by omitting the frame and shadow. Before:
{F6214296}

After:
{F6214294}

Reviewers: #dolphin, broulik, elvisangelaccio

Reviewed By: #dolphin, broulik, elvisangelaccio

Subscribers: markg, anthonyfieroni, elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15069
2018-09-06 22:47:02 +02:00
Kai Uwe Broulik
8f10b5540c [DolphinContextMenu] Use the view's already existing root KFileItem
Saves creating a new KFileItem from scratch which stats the file.
Only when the root item isn't available (as can happen when you're currently looking at an non-existing directory)
will it create a new KFileItem

Differential Revision: https://phabricator.kde.org/D15266
2018-09-05 12:25:39 +02:00