Commit graph

5615 commits

Author SHA1 Message Date
Thomas Surrel 6100f66ae2 Fix selection when navigating back, with size sorting.
Summary:
KItemListSelectionManager::itemsMoved (called when sorting by size)
was re-activating anchor selection regardless if we actually were
doing an anchored selection. This was leading to an incorrect
selection when navigating back.

BUG: 352296

Test Plan:
In any folder, sort by size then move to a subfolder. Navigate back
to the parent folder: only the parent folder should be selected.

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: elvisangelaccio, broulik, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D17042
2018-12-01 21:18:58 +01:00
Thomas Surrel b714604a67 Do not sort twice when changing role and order at the same time
Summary:
When using the list header to change the role and order, if one
changes the order to descending and then changes role, dolphin
also changes the order back to ascending. This results in sorting
the list of files twice in a row. This patch removes the first
(useless) sort.

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D17111
2018-12-01 21:07:29 +01:00
Laurent Montel d0cfe1e658 Use isEmpty here too 2018-11-30 07:13:53 +01:00
Laurent Montel f390818050 Use isEmpty() here 2018-11-30 06:58:22 +01:00
l10n daemon script 60e5c1bd8e GIT_SILENT made messages (after extraction) 2018-11-29 07:07:18 +01:00
l10n daemon script 84f4b1fe07 GIT_SILENT made messages (after extraction) 2018-11-29 02:46:54 +01:00
Elvis Angelaccio b5df5f4d95 [PlacesPanel] Port to KFilePlaceEditDialog
Summary:
This patch ports away from the old PlacesItemEditDialog copy,
which doesn't honour the "applicationLocal" checkbox.

KFilePlaceEditDialog was not exported by KIO, but it will be starting
from 5.53

BUG: 376619
FIXED-IN: 19.03.80

Test Plan:
* Create a new place ("Add Entry" from the panel context menu) and check the "only show in dolphin" checkbox
* Edit an existing (global) place and check the "only show in dolphin" checkbox

Reviewers: #dolphin

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D16824
2018-11-24 12:18:01 +01:00
Laurent Montel 2a96387f76 Avoid warning when translatedtext is null 2018-11-21 09:01:01 +01:00
l10n daemon script fa5f13af6c GIT_SILENT made messages (after extraction) 2018-11-21 07:17:05 +01:00
l10n daemon script cea66c1b96 GIT_SILENT made messages (after extraction) 2018-11-21 02:51:03 +01:00
l10n daemon script 20311c0a1e GIT_SILENT made messages (after extraction) 2018-11-20 07:09:58 +01:00
l10n daemon script 907f4390d5 GIT_SILENT made messages (after extraction) 2018-11-20 02:49:53 +01:00
Thomas Surrel 1340e98548 Show the Delete context menu entry even when disabled
Summary:
This is consistent with the HIG, and the 'Rename' entry in
the context menu already behaves like that.

Test Plan:
Right click on /home. The context menu should contained
the 'Delete' entry, but it should be disabled.

Reviewers: #dolphin, #vdg, ngraham

Reviewed By: #dolphin, #vdg, ngraham

Subscribers: ngraham, romangg, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D17012
2018-11-19 16:12:03 +01:00
Thomas Surrel 1f162f181c Merge remote-tracking branch 'origin/Applications/18.12' 2018-11-17 14:44:02 +01:00
Thomas Surrel e710a64311 Do not disconnect all StorageAccess signals when unmounting
Summary:
The problem is caused by the fact device interfaces returned by
Solid (e.g. item->device().as<Solid::StorageAccess>()) are not
full objects, but only references/pointers to a per-device-object,
i.e. requesting the same interface for a device will return the same
address every time.

If the interface is used used in multiple places, calling disconnect
on the interface address disconnects the signals for all users.

BUG: 400992

Test Plan:
In Dolphin, mount a local partition (e.g. a Windows partition)
then unmount it (right click on it in Places, then Unmount).
Try to access it again by clicking on it in Places, we should
get access to it correctly.

Reviewers: #dolphin, #frameworks, bruns, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D16857
2018-11-17 14:43:41 +01:00
Chris Rizzitello 76c4698870 Merge remote-tracking branch 'origin/Applications/18.12' 2018-11-17 08:39:38 -05:00
Chris Rizzitello c900f7d255 Improve Ux for the places panel's hidden items
Summary:
BUG: 400860
FIXED-IN: 18.12.0

Clean up the context menu for the places panel.
 - Change Text "Show All Entries" -> "Show Hidden Places"
 - Use State dependent icon (like hidden files)
 - Disable instead of hide if not places are hidden.
 - Toggle to unchecked if last item of group is unhidden.

Create a copy of this "Show Hidden Places" entry in the main dolphin menu View->Places.

Test Plan:
With Hidden Places
{F6398756}
{F6398759}
Context Menu:
{F6398762}
{F6398761}

Without Hidden Places.
{F6414694}
{F6414696}

Reviewers: #dolphin, #vdg, elvisangelaccio, ngraham

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

Subscribers: cfeck, elvisangelaccio, veqz, davidc, ngraham, kfm-devel

Tags: #dolphin

Maniphest Tasks: T8349

Differential Revision: https://phabricator.kde.org/D16767
2018-11-17 08:38:39 -05:00
Harald Sitter 06747d5e5b Merge branch 'Applications/18.12' 2018-11-17 12:25:21 +01:00
Harald Sitter a4cddf7517 move kcrash link to dolphin app (which is the effective user)
Summary:
to successfully use kcrash when linking with as-needed (which is a default
flag on many linux distros) one also needs to call KCrash::initialize.
this call happens in the app's main.cpp. as such the kcrash link target
on the dolphinprivate library doesn't do anything for dolphinprivate but
only kicks into action for dolphin itself.
to avoid confusion and make it clear that kcrash is only initialized in the
application scope the KF5::Crash link target is now on the application
target, not the library target.

(this makes no difference in the output, kcrash was still correctly linked
 via dolphinprivate; but only for kdeinit_dolphin, dolphinprivate did
 not get linked to it with as-needed)

Test Plan: builds; links as expected

Reviewers: elvisangelaccio, #dolphin

Reviewed By: elvisangelaccio, #dolphin

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D16896
2018-11-17 12:25:15 +01:00
l10n daemon script cee7266e10 GIT_SILENT made messages (after extraction) 2018-11-16 06:50:05 +01:00
l10n daemon script 9c3e7657f2 GIT_SILENT made messages (after extraction) 2018-11-16 03:37:49 +01:00
l10n daemon script 81233cbb0c GIT_SILENT made messages (after extraction) 2018-11-14 03:45:20 +01:00
l10n daemon script c3f1e35795 GIT_SILENT made messages (after extraction) 2018-11-13 03:48:54 +01:00
Elvis Angelaccio 20e11282b5 [PlacesItem] Add support for OnlyInApp metadata for bookmarks
This will allow to edit an existing place to make it application-local
or visible from all applications.

CCBUG: 376619
2018-11-11 19:02:54 +01:00
Elvis Angelaccio 140ccf1df8 [PlacesItemModel] Match KFilePlacesModel addPlaces() API
This will allow to create a place visible only from Dolphin, by passing
an `appName` to the KFilePlacesModel.

CCBUG: 376619
2018-11-11 19:02:54 +01:00
Elvis Angelaccio 23350914f6 Update copyright year in KAboutData
GIT_SILENT
2018-11-11 19:00:24 +01:00
Shubham Jangra b08cea86c9 Warn user before renaming the file/folder to start with a ' . '
Summary: For normal "casual" linux users, renaming the file/folder starting with dot may get irritating, they will be wondering their file is deleted.

Test Plan:
1. Make new file/folder.
2. Rename it to .foo
3. Question dialog appears.

Reviewers: elvisangelaccio, ngraham, pino

Reviewed By: elvisangelaccio, ngraham

Subscribers: cfeck, emateli, elvisangelaccio, pino, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15980
2018-11-08 14:18:59 +05:30
Albert Astals Cid 159eb6b4a6 Add donation url to appdata 2018-11-08 00:12:53 +01:00
l10n daemon script adad714ba5 GIT_SILENT made messages (after extraction) 2018-11-05 03:32:41 +01:00
Elvis Angelaccio e87771abec Update maintainership in KAboutData
As discussed on kfm-devel and agreed upon with Emmanuel.
2018-11-04 21:21:19 +01:00
l10n daemon script 89535ac82b GIT_SILENT made messages (after extraction) 2018-11-04 03:42:18 +01:00
Laurent Montel 7c9db51c1d Autogenerate debug file + install debug categories file 2018-11-02 13:23:10 +01:00
l10n daemon script 7cd22e7a88 GIT_SILENT made messages (after extraction) 2018-11-01 03:38:41 +01:00
l10n daemon script 3221a20ef7 GIT_SILENT made messages (after extraction) 2018-10-28 02:32:13 +01:00
Elvis Angelaccio f7c2bd3410 Merge branch 'Applications/18.08' 2018-10-27 18:04:05 +02:00
Elvis Angelaccio e26ee6455e Don't enable two-clicks renaming in single-click mode
Summary:
This was supposed to be part of commit 5454283008, but apparently we
didn't notice it was missing.

Test Plan:
- Enable single-click mode from system settings
- Select a file in dolphin
- Long-click the selected file and make sure inline renaming doesn't start

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D16460
2018-10-27 16:58:33 +02:00
Fabian Vogt e13ffcb1a7 Adjust label in the settings page for changed preview behaviour
Summary: Requested by https://phabricator.kde.org/D15138#318904

Test Plan: Opened the preview settings, label text changed.

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: ngraham, markg, broulik, kfm-devel, elvisangelaccio

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15216
2018-10-27 16:45:36 +02:00
Alexander Saoutkin ac118ae1c2 Close Dolphin if last tab closed
Summary:
Allows closing of last tab via shortcut or menubar (File->Close Tab), which then results in closing dolphin.

FEATURE: 397101

Test Plan: [Manual] Check closing tab closes dolphin via shortcut and menubar.

Reviewers: #dolphin, ngraham, #vdg, elvisangelaccio

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

Subscribers: thsurrel, svenmauch, abetts, elvisangelaccio, ngraham, #dolphin, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15278
2018-10-27 11:24:49 +02:00
l10n daemon script 2278d9ed75 GIT_SILENT made messages (after extraction) 2018-10-27 03:38:41 +02:00
Yuri Chornoivan 09c6a4efd3 Add caption to the screenshot 2018-10-25 21:28:41 +03:00
Yuri Chornoivan fd1a078cc4 Fix minor typos 2018-10-25 21:23:44 +03:00
Elvis Angelaccio 642a427d03 [DolphinViewActionHandler] Rename createDirectory signal
Signals should be named after an event that happened.
2018-10-24 22:49:01 +02:00
Kai Uwe Broulik d575e1e884 Merge branch 'Applications/18.08' 2018-10-24 09:53:07 +02:00
Kai Uwe Broulik 502a5c86fe [KStandardItemListWidget] Pass icon state to overlay painter
Ensures the overlay is painted in the same icon state, especially the selected one so dark overlays turn white.

Differential Revision: https://phabricator.kde.org/D16307
2018-10-24 09:52:36 +02:00
Shubham Jangra b2e08712f2 Use QLatin1Char instead of QLatin1String 2018-10-18 23:18:29 +05:30
l10n daemon script 6aebe85af4 GIT_SILENT made messages (after extraction) 2018-10-18 03:39:45 +02:00
Thomas Surrel 3f41cd9c00 Add a 'Properties' entry in the Places panel context menu
Summary: BUG: 181880

Test Plan:
Right-click on a place or on a device in the Places panel now show a Properties entry.
Clicking on it will open its folder property.

Reviewers: #dolphin, #plasma, #vdg, ngraham, elvisangelaccio

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

Subscribers: anthonyfieroni, elvisangelaccio, cfeck, ngraham, abetts, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15929
2018-10-14 12:23:25 +02:00
Elvis Angelaccio ec3cf251b1 Revert "[PlacesItemModelTest] Make test fail on purpose"
This reverts commit dd8fce5594.

Got what I was looking for, from the CI logs.
2018-10-13 23:24:32 +02:00
Elvis Angelaccio dd8fce5594 [PlacesItemModelTest] Make test fail on purpose
Needed to check whether on the CI KDirWatch emits the `created` signal when we
refresh the places model.

Will be reverted soon.

GIT_SILENT
2018-10-13 22:26:36 +02:00
Elvis Angelaccio 277700425e [PlacesItemModelTest] Revert last two commits
Commit c527dc2172 proves that on the CI sometimes the `QAbstractItemModel::dataChanged`
signal is not being emitted at all (build #208 failed because the test timed out).

KFilePlacesModel emits `dataChanged()` in the `_k_reloadBookmarks()`
slot only when it's called after the KBookmarkManager emits the `changed()` signal.

And the `changed()` signal is emitted after KDirWatch emits the
`created` signal.

On the CI server kdirwatch is probably not reliable, which would explain
why the test randomly fails.
2018-10-13 22:06:32 +02:00
Elvis Angelaccio c527dc2172 [PlacesItemModelTest] Try to use an event loop instead of an hardcoded timeout
Increasing the timeout from 5 to 10 seconds didn't work.
Let's see if an eventloop does the job.
2018-10-13 12:09:32 +02:00
Elvis Angelaccio c9dd3478be [PlacesItemModelTest] Try to double test timeout
The randomly failing `testRefresh()` on the CI can be reproduced by
replacing the QTRY_COMPARE with a simple QCOMPARE.

So it seems the CI can be slow such that the default QTR_COMPARE
timeout of 5 seconds is not enough.

If a timeout of 10 seconds fixes this particular test case, we can use
this bigger timeout also in the other failing tests.
2018-10-13 11:18:46 +02:00
l10n daemon script 009cecfe88 GIT_SILENT made messages (after extraction) 2018-10-13 03:39:02 +02:00
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
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
Kai Uwe Broulik 289ef9fa49 Merge branch 'Applications/18.08' 2018-09-05 12:24:47 +02:00
Kai Uwe Broulik 1e7e4fad49 [KStandardItemListWidget] Round to icon size before applying scaling
Otherwise for 22px icons on high dpi we will request either the wrong icons or scale them needlessly.
Dolphin requests a pixmap of 22px, this is then multiplied by dpr resulting in 44 which isn't a valid icon size (only 32 or 48 are).
Moreover, we will also hit the path where it will scale the pixmap to a proper icon size resulting in blurry icons
(and a performance penalty).

Differential Revision: https://phabricator.kde.org/D15260
2018-09-05 12:24:10 +02:00
David Edmundson f3c92120aa Merge branch 'Applications/18.08' 2018-09-04 14:21:00 +02:00
David Edmundson 5f252da8b5 Correctly save behaviourOnLaunch
Summary:
We only wrote out a checkbox value if the checkbox was checked.
Unchecking it would not do anything.

BUG: 398022

Test Plan:
Read KRun's exepcted values
Unchecked config option
Reloaded dolphin
Checkbox remained off

Reviewers: #dolphin, ngraham, elvisangelaccio

Reviewed By: #dolphin, ngraham, elvisangelaccio

Subscribers: ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15147
2018-09-04 14:20:33 +02:00
Kai Uwe Broulik cc3eb7d757 Merge branch 'Applications/18.08' 2018-09-04 09:02:07 +02:00
Kai Uwe Broulik b734386cbc Don't use QIcon::Selected state for selected icon
This causes selected monochrome Breeze icons to turn white as this state is meant for when the icon is actually painted ontop of
e.g. a blue highlighted area in a menu
Since the advanced icon configuration (where you could choose a custom hint color and other effects) has been removed in Plasma 5.13
and more importantly the fact that Dolphin always tints the icon in the highlight color disregarding any custom icon effects settings
this is an acceptable change.

CHANGELOG: Fixed monochrome icons turning invisible when selected

BUG: 398014
FIXED-IN: 18.08.2

Differential Revision: https://phabricator.kde.org/D15255
2018-09-04 09:01:04 +02:00
David Hallas aaaaea8e28 Renames DolphinViewContainer::getCaption to caption
Summary:
This commit renames the DolphinViewContainer::getCaption to simply
caption, this was a review comment that I failed to fix in a previous
commit.

Test Plan: None

Reviewers: elvisangelaccio

Reviewed By: elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15114
2018-09-02 11:11:41 +02:00
David Hallas 5a9567730d Changes the tabName function to return the name of a specific tab
Summary:
Changes the tabName function to return the name of the passed in
DolphinTabPage. Previously it would return the name of the active tab,
which causes in-active tabs to get the wrong name.

Test Plan:
Open Dolphin
Right click a folder and select 'Open in new tab'
Notice that the new tab has the wrong title

BUG: 397910

Reviewers: #dolphin, ngraham, elvisangelaccio

Reviewed By: #dolphin, ngraham, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15112
2018-09-02 11:08:15 +02:00
Elvis Angelaccio a23acffd5e Add test case for open-in-new-tab title regression
Fix will be in D15112.

CCBUG: 397910
2018-09-02 10:55:51 +02:00
Yuri Chornoivan 50702506fa Fix minor EBN issues 2018-08-30 21:29:01 +03:00
Fabian Vogt 1d943518ad Consider all thumbnailers for the information panel and tooltips
Summary:
The text thumbnail is really useful in tooltips, but disabled by default in
KIO. Having just a larger version of the placeholder icon from the theme
doesn't make a lot of sense, so try the best to get a proper preview.
Same applies to the information panel, which would otherwise just
show the same icon.

Test Plan:
Got textfile previews in tooltips and in the information panel even if
disabled.

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

Reviewed By: #dolphin, broulik, ngraham

Subscribers: abetts, markg, kfm-devel, ngraham

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15138
2018-08-29 17:19:42 +02:00
David Hallas 44a21ea51a Unify window and tab title
Summary:
Previously the title of tabs was a prettyfied version of the URL.
This is inconsistent with the title of the Window and in some cases
for specials URLs kind of misleading. This commit generalizes the
code from DolphinMainWindow so that both the DolphinMainWindow title
and the tab title uses the same function for the title. This also
means that the 'Show Full Path in Title Bar' also applies to the
tab title, and also that searches changes the tab title.

FEATURE: 387851

Test Plan: Open a new tab from the places panel and navigate around.

Reviewers: #dolphin, ngraham, elvisangelaccio, markg

Reviewed By: #dolphin, ngraham, markg

Subscribers: markg, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D14442
2018-08-24 12:09:26 +02:00
Henrik Fehlauer 79c485a66d Restore settings label and prevent warning when Baloo is unavailable
Summary:
As discussed in D14814, 6674c9c387 removed the {nav Show tooltips}
checkbox in Dolphin's preferences when Baloo is unavailabe at compile
time and thus the tooltip would not be functional. The {nav Miscellaneous}
label in front of the checkbox was also removed, even though it relates
to all options in that group.

In addition, after 6674c9c387 running Dolphin without Baloo support
would print
  QWidget::insertAction: Attempt to insert null action
on startup.

Both issues can be fixed with more `#ifdefs`.

Test Plan:
After building with `-DCMAKE_DISABLE_FIND_PACKAGE_KF5Baloo=ON`, the
{nav Show tooltips} checkbox is removed, the {nav Miscellaneous} label
is still there, and there is no warning printed.

Reviewers: elvisangelaccio

Reviewed By: elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D14980
2018-08-22 23:49:17 +02:00
Elvis Angelaccio 6674c9c387 Port away from kdelibs4support
Summary:
It was only used as fallback when baloo was not found, but
`KFileMetaDataWidget` is useless without nepomuk.

The result of this patch is that the information panel and the tooltips
won't be available from platforms without baloo (instead of being
available but broken). The baloo dependency remains optional.

Closes T8720

Test Plan:
Build dolphin with `cmake -DCMAKE_DISABLE_FIND_PACKAGE_KF5Baloo=ON ..` and
make sure it doesn't show tooltips or the information panel.

Reviewers: #dolphin, broulik, ngraham

Subscribers: kfm-devel

Tags: #dolphin

Maniphest Tasks: T8720

Differential Revision: https://phabricator.kde.org/D14814
2018-08-21 01:03:33 +02:00
Kai Uwe Broulik 9134951cb0 Read UDS entry times directly and pretty-print on-demand
This avoids creating a QDateTime object with all the timezone processing that comes with it since we're only
interested in the actual pretty date once we show the role to the user.

Differential Revision: https://phabricator.kde.org/D14880
2018-08-20 11:49:25 +02:00
Kai Uwe Broulik 523c95bed0 Merge branch 'Applications/18.08' 2018-08-16 16:28:58 +02:00
Kai Uwe Broulik f75b8a4287 Pretty-print "creationtime" role
It was forgotten and would show up as ISO date string instead of human-readable string.

Differential Revision: https://phabricator.kde.org/D14878
2018-08-16 16:27:55 +02:00
Jaime Torres Amate e03cbe2584 Make this test work again with new uds implementation
Summary:
With the new uds implementation, when some data is meant to replace an old one, it has to use replace() instead of insert() to avoid an assert of data already exists.
Use 3 different entries and only insert().

Test Plan:
before: crash in the uds assert
after: passes the test

Reviewers: #dolphin, #frameworks, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: bcooksley, bshah, nalvarez, cfeck, dfaure, aacid, ngraham, bruns, elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13813
2018-08-16 13:50:52 +02:00
Jaime Torres Amate adc5f6d3ac wrong name and email address
Summary: This reverts commit 2104d18a67.

Test Plan: revert-hammer

Reviewers:

Subscribers:
2018-08-16 13:48:03 +02:00
Travis CI Bot 2104d18a67 Make this test work again with new uds implementation
Summary:
With the new uds implementation, when some data is meant to replace an old one, it has to use replace() instead of insert() to avoid an assert of data already exists.
Use 3 different entries and only insert().

Test Plan:
before: crash in the uds assert
after: passes the test

Reviewers: #dolphin, #frameworks, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: dfaure, aacid, ngraham, bruns, elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13813
2018-08-16 13:06:06 +02:00
Nathaniel Graham 496ba56f42 Merge branch 'Applications/18.08' 2018-08-04 17:05:22 -06:00
Shubham Jangra 6e04f50081 Remove custom icon selection for trash
Summary: CCBUG:  391200

Test Plan:
1. Open Dolphin
2. Edit trash in places item
Result: No custom icon option available

Reviewers: ngraham, #dolphin, broulik, pino, elvisangelaccio, cfeck

Reviewed By: ngraham, #dolphin, elvisangelaccio, cfeck

Subscribers: rkflx, cfeck, elvisangelaccio, pino, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D14378
2018-08-04 17:02:51 -06:00
l10n daemon script 2ef67bf094 GIT_SILENT made messages (after extraction) 2018-07-30 06:00:47 +02:00
l10n daemon script cdb715eb42 GIT_SILENT made messages (after extraction) 2018-07-30 03:21:28 +02:00
Elvis Angelaccio 9be80423dc Drop redundant setAttribute for WA_DeleteOnClose
Every KMainWindow (which DolphinMainWindow inherits) already has this
attribute set.
2018-07-29 23:37:34 +02:00
Kai Uwe Broulik 6d011e9730 Compare UDS entry times directly instead of going through KFileItem
This avoids creating a QDateTime object with all the timezone processing that comes with it since we're only interested in the
relative order, not absolute precise date time values.

CHANGELOG: Sorting files by date is significantly faster now

Differential Revision: https://phabricator.kde.org/D14394
2018-07-26 10:17:36 +02:00
David Hallas 2cbf3cb11e Fixes small memory leak in DolphinContextMenu
Summary: When DolphinContextMenu::baseFileItem is called a KFileItem is allocated and stored in DolphinContextMenu::m_baseFileItem, which is of type KFileItem*, but the destructor failed to delete this.

Test Plan: This leak was found using Address Sanitizer

Reviewers: broulik, elvisangelaccio

Reviewed By: broulik, elvisangelaccio

Subscribers: ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D14178
2018-07-19 08:25:12 -06:00
Kai Uwe Broulik 80bc133da9 [KItemListSelectionToggle] Adjust painting icon for high dpi scaling
Instead of using KIconLoader which currently doesn't support high dpi scaling, use QIcon::fromTheme which can.

Differential Revision: https://phabricator.kde.org/D14222
2018-07-19 08:24:53 -06:00
David Hallas 4536e25ac9 Fixes memory leak in KItemListViewAccessible
Summary: The KItemListViewAccessible class has a list of QAccessibleInterface pointers in a member variable m_cells. The problem is that when new entries are created, the newly allocated pointer is not stored in the list, only a nullptr is store, this renders the cleanup code in the destructor useless. This patch simply stores the pointer in the list, causing the destructor to correctly free the memory.

Test Plan: I found this issue using address sanitizer. Simply building Dolphin with -fsanitize=address and opening a window caused the memory leak.

Reviewers: #dolphin, jtamate, elvisangelaccio

Reviewed By: #dolphin, jtamate, elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D14168
2018-07-18 23:20:19 +02:00
David Hallas 43ab5bdc5f Removes unused member variables
Summary: The InformationPanel::m_pendingPreview and ApplyViewPropsJob::m_currentItem member variables are not used and can therefore be removed.

Reviewers: broulik, elvisangelaccio

Reviewed By: broulik, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D14180
2018-07-18 23:20:08 +02:00
Nathaniel Graham 9d1a3abd35 Modernize View Properties window
Summary:
Like D12571, but for the {nav View Properties} Window. Also did a little bit of re-organization. This allows us to use a `QFormLayout` as the top-level layout and simplify the code a lot, including no longer using the now-unnecessary paradigm of putting a layout inside a `QWidget`, and ending the use of `QGridLayout` to make a fake and more complicated form-style layout.

Depends on D13749

Test Plan:
Window still resizes properly when the Additional Information content is shown or hidden.

Global view properties, additional information hidden:
{F6035943}

Global view properties, additional information shown:
{F6035945}

Per-folder view properties, additional information hidden:
{F6035869}

Per-folder view properties, additional information shown:
{F6035870}

Reviewers: #dolphin, elvisangelaccio, broulik, #vdg

Reviewed By: #dolphin, elvisangelaccio

Subscribers: abetts, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13768
2018-07-14 13:55:40 -06:00
Jaime Torres 23c5fce77f Speedup sort
Summary:
Uses a reference to the collator instead of copying and reinitializing it again and again. This is the reason for the speedup.

Changing the implementation from a Functor class to a Lambda removes some boilerplate code, but is not relevant for performance.

This requires a workaround for https://bugreports.qt.io/browse/QTBUG-69361
Just a single comparison to force the clean state of QCollator.

Test Plan:
Sorting in a directory with 82874 images:
[TIME] Sorting: 19883  (before)
[TIME] Sorting: 4198 (after)

kfileitemmodelbenchmark before: ..............   Passed   29.36 sec
kfileitemmodelbenchmark after:    ..............   Passed   20.39 sec

Reviewers: #dolphin, #frameworks, markg, elvisangelaccio, bruns

Reviewed By: #dolphin, markg, elvisangelaccio

Subscribers: elvisangelaccio, apol, bruns, markg, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13814
2018-07-14 19:37:48 +02:00
Jaime Torres ec89af6778 Revert to change the commit message.
Summary: This reverts commit 765cc968c9.

Test Plan: revert-hammer

Reviewers:

Subscribers:
2018-07-14 19:35:47 +02:00
Jaime Torres 765cc968c9 Speedup sort
Summary:
Use a lambda function to use only one QCollator initialized only once.

This requires a workaround for https://bugreports.qt.io/browse/QTBUG-69361
Just a single comparison to force the clean state of QCollator.

Test Plan:
Sorting in a directory with 82874 images:
[TIME] Sorting: 19883  (before)
[TIME] Sorting: 4198 (after)

kfileitemmodelbenchmark before: ..............   Passed   29.36 sec
kfileitemmodelbenchmark after:    ..............   Passed   20.39 sec

Reviewers: #dolphin, #frameworks, markg, elvisangelaccio, bruns

Reviewed By: #dolphin, markg, elvisangelaccio

Subscribers: elvisangelaccio, apol, bruns, markg, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13814
2018-07-13 18:55:42 +02:00
Kai Uwe Broulik 1ba972adf5 [KFileItemModelRolesUpdater] Fix preview scaling for frameless previews
Follow-up to D11319 for e.g. folder previews

Differential Revision: https://phabricator.kde.org/D14047
2018-07-11 15:43:16 +02:00
Kai Uwe Broulik ae3438eb08 [KStandardItemListWidget] Avoid needless image resizing
There be rounding errors when scaling pixmaps when keeping aspect ratio

Differential Revision: https://phabricator.kde.org/D11319
2018-07-11 15:41:58 +02:00
Friedrich W. H. Kossebau 64f7108d83 Mark PHONON_INCLUDES dirs as SYSTEM, so compiler omits them for warnings 2018-07-08 14:13:52 +02:00
Jaime Torres bd08aa09b2 A complete build does not fix the crashes I'm having.
I prefer to wait until QQCollator is thread safe or
someone discovers why this is happening now and not before.

Summary: This reverts commit 63825de82f.

Test Plan: revert-hammer

Reviewers:

Subscribers:
2018-07-07 15:16:22 +02:00
Jaime Torres 63825de82f Speedup sort
Summary:
Use a lambda function instead of a class.
This way the member QCollator is not copied and initialized several times.

Test Plan:
Sorting in a directory with 82874 images:
[TIME] Sorting: 19883  (before)
[TIME] Sorting: 4198 (after)

kfileitemmodelbenchmark before: ..............   Passed   29.36 sec
kfileitemmodelbenchmark after:    ..............   Passed   20.39 sec

Reviewers: #dolphin, #frameworks, markg, elvisangelaccio

Reviewed By: #dolphin, markg, elvisangelaccio

Subscribers: elvisangelaccio, apol, bruns, markg, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13814
2018-07-06 17:12:35 +02:00
Nathaniel Graham 02c94b228a Modernize Settings window
Summary: This patch modernizes the appearance of Dolphin's configuration window by following the KDE HIG as much as possible and following design cues from Plasma and System Settings.

Test Plan:
Tested all settings to make sure they still work; they do.

Startup page, before:
{F5825313}

Startup page, after:
{F5918574}

View page (Icons), before:
{F5825319}

View page (Icons) after:
{F5918575}

View page (Compact), before:
{F5825321}

View page (Compact) after:
{F5918700}

View page (Detailed), before:
{F5825323}

View page: (Detailed), after:
{F5918701}

Navigation page: no change

Trash page, before:
{F5858748}

Trash page, after:
{F5866656}
(Provided by {D12986})

General page (behavior), before:
{F5825316}

General page (behavior) after:
{F5918572}

General page (confirmations), before:
{F5866885}

General page (confirmations), after:
{F5918702}

General page (status bar): no change

Reviewers: #dolphin, #vdg, broulik, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: fabianr, cfeck, medhefgo, zzag, rkflx, kfm-devel, elvisangelaccio, abetts

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D12571
2018-07-05 21:24:49 -06:00
Friedrich W. H. Kossebau 85d7a8a2f6 Use more nullptr 2018-07-04 23:43:22 +02:00
Friedrich W. H. Kossebau cd4f42b33a Remove QT definitions duplicated from KDEFrameworkCompilerSettings or dead 2018-06-29 18:42:00 +02:00
Nathaniel Graham b488dc0126 Port from KComboBox to QComboBox
Summary: None of Dolphin's current usages of `KComboBox` use any of its additional features beyond `QComboBox`, so let's use `QComboBox` instead.

Test Plan: Tested all features that use comboboxes in Dolphin. No visual or functional changes or regressions.

Reviewers: #dolphin, elvisangelaccio, broulik

Reviewed By: #dolphin, elvisangelaccio

Subscribers: broulik, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13749
2018-06-27 14:29:48 -06:00
Elvis Angelaccio 280c974481 Use collapsible box to configure visible roles
Summary:
A modal dialog that opens another modal dialog is bad UX and should be
avoided whenever possible. These days we have `KCollapsibleGroupBox`
that can be used to show advanced settings without cluttering the
default layout.

This change removes the `AdditionalInfoDialog` and uses a collapsible
groupbox instead. The `Apply` buttons gets enabled whenever a role gets
checked or unchecked, consistently with the existing checkboxes.

Test Plan: Change visible roles in the view properties dialog.

Reviewers: #dolphin, #vdg

Reviewed By: #vdg

Subscribers: ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13569
2018-06-26 22:13:51 +02:00
Tomaz Canabrava 088e692007 don't use temporaries when uneeded
Summary:
Remove unused variable

Compiled, Run. Trash still there.

Use copy ellision

Remove uneeded code

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13680
2018-06-22 16:17:47 +02:00
Tomaz Canabrava 6b72c67b09 Use copy ellision 2018-06-22 15:30:11 +02:00
Tomaz Canabrava f5ce8d865b Remove unused variable
Compiled, Run. Trash still there.
2018-06-22 15:21:00 +02:00
Tomaz Canabrava e1ba299b29 don't use temporaries when uneeded 2018-06-22 15:20:38 +02:00
l10n daemon script 9b2a9704ee GIT_SILENT made messages (after extraction) 2018-06-22 03:17:51 +02:00
Nathaniel Graham d7d403379d Move General settings to the top
Summary: KDE apps generally (ha ha) have their {nav General} page at the top of the list, so it's the first thing the user sees when they open the {nav Settings} window, but Dolphin is an exception. It puts the {nav General} page //last!// This patch makes Dolphin consistent with other KDE apps by moving the {nav General} page up to the top.

Test Plan: {F5918590}

Reviewers: #dolphin, #kde_applications, elvisangelaccio, ltoscano

Reviewed By: elvisangelaccio, ltoscano

Subscribers: kde-doc-english, ltoscano, elvisangelaccio, kfm-devel

Tags: #dolphin, #documentation

Differential Revision: https://phabricator.kde.org/D13595
2018-06-19 16:55:23 -06:00
Laurent Montel 26e629a78e Do not duplicate work of KAboutData::setupCommandLine() 2018-06-19 08:57:39 +02:00
Elvis Angelaccio 32b8b19ba5 ViewPropertiesDialog: disable Apply button on startup
We call `markAsDirty(false)` at the end of `loadSettings()` but that's
not enough, because `m_isDirty` is initialized to false (as it should be).
This means `isDirtyChanged` is not emitted and the button is not disabled.

By disabling it explicitly, we make it consistent with the Apply button
in the settings dialog (which is also initially disabled).
2018-06-13 23:16:33 +02:00
Elvis Angelaccio 615838083d Merge branch 'Applications/18.04' 2018-06-13 21:42:41 +02:00
Elvis Angelaccio 9616edbb66 Fix loop of FocusIn events
Summary:
Commit 43da84eefc introduced the risk of entering an endless loop of
`FocusIn`/`FocusOut` events sent to two DolphinSearchBox instances when
opening a second tab (see D11871).

This happens because we deactivate the first tab when we open a new one, but
since the `setActive(true)` is delayed with a QTimer, both the old tab
and the new one become active and receive their own `FocusIn` event
(which starts the loop of focus in/out events).

To prevent this issue, we schedule the searchbox activation only if the
searchbox is not already active.

Test Plan:
- Search something in dolphin
- Open a new tab after the search ends
- Check that dolphin does not eat the CPU

Reviewers: #dolphin, anthonyfieroni

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13152
2018-06-13 21:39:22 +02:00
Kai Uwe Broulik d8cf33d563 Merge branch 'Applications/18.04' 2018-06-06 09:18:17 +02:00
Kai Uwe Broulik 2f6635f4e8 [KBalooRolesProvider] Support properties of type QStringList
QVariant::toString() unwraps a QStringList with a single string to a QString, however a list with multiple entries returns a null string.
Explicitly check for KFileMetaData property type and convert accordingly.

BUG: 395033
FIXED-IN: 18.04.3

Differential Revision: https://phabricator.kde.org/D13349
2018-06-06 09:17:07 +02:00
Elvis Angelaccio e308985de4 Fix scrolling to renamed file when using the rename dialog
Summary:
The `RenameDialog::slotResult()` slot is currently never called because
the dialog is deleted first, due to the usage of the `WA_DeleteOnClose`
attribute. This breaks the scroll-to-renamed-file feature when the
inline renaming is disabled.

Instead of deleting the dialog on close, we can use `deleteLater()` when
we are sure the dialog has actually finished its job, which is when the
KIO move job emits the `result` signal.

Test Plan:
- Disable inline renaming
- Rename a file so that it goes out of the view
- Check whether the view scrolls to the renamed file.

Reviewers: #dolphin, emateli

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13304
2018-06-05 22:07:45 +02:00
l10n daemon script a8bd6f4b1f 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"
2018-06-05 05:34:15 +02:00
Elvis Angelaccio 3c6ecfa246 Merge branch 'Applications/18.04' 2018-06-03 13:21:31 +02:00
Elvis Angelaccio 588abbf1b6 Fix crash in PlacesItem::setUrl()
Connections to lambda slots without context/receiver argument can lead
to crashes, because if the receiver is deleted Qt won't delete the connection
as it normally would when the receiver is specified.

This patch moves the slot from the lambda in PlacesItem (which is not a QObject)
to PlacesItemSignalHandler. This fixes the `dolphinmainwindowtest` crash
we currently have on master, and should also fix bug #394507 which has
the very same stacktrace.

BUG: 394507
FIXED-IN: 18.04.2
2018-06-03 13:08:51 +02:00
Elvis Angelaccio c1a594a886 Drop obsolete version checks
We already depend on KF5 >= 5.43
2018-06-03 11:32:19 +02:00
Elvis Angelaccio 2e6798088b Enable test mode in dolphinmainwindowtest
We don't want to use the user configuration files when creating a test
instance of DolphinMainWindow.
2018-06-03 11:24:20 +02:00
Nerdopolis Turfwalker 97801e2cdb Add 'Sort By' and 'View Mode' into Dolphin file context menus
Summary: This adds the 'Sort By' and 'View Mode'  options into the context menu of Dolphin within the file browser. I keep looking for these option (especially sort by) in the Context Menu, and keep forgetting to go to the menu. It also makes the order of "View Mode" and "Sort By" options consistent in the control menu

Test Plan: Made sure that the options appeared when right clicking on an empty space.

Reviewers: #dolphin, ngraham, elvisangelaccio

Reviewed By: #dolphin, ngraham, elvisangelaccio

Subscribers: question, markg, elvisangelaccio, mmustac, rkflx, ngraham, kfm-devel, #dolphin

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D12911
2018-06-02 16:39:42 +02:00
Nathaniel Graham 621cd24acf Show a warning when running as the root user
Summary: Now that Dolphin can be run as the root user again, let's show a warning.

Test Plan:
When run with the root user account:
{F5882057}

Reviewers: #dolphin, markg, elvisangelaccio

Reviewed By: markg, elvisangelaccio

Subscribers: acooligan, anthonyfieroni, chinmoyr, kfm-devel, rikmills, emmanuelp, zzag, nicolasfella, elvisangelaccio, Fuchs, mmustac, markg

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D12732
2018-06-01 21:19:35 -06:00
Nathaniel Graham 316e476b37 Fix the test that broke after recent changes to the default Places items
Test Plan: `ctest`; all tests pass.

Reviewers: #dolphin, markg

Reviewed By: markg

Subscribers: renatoo, kfm-devel, elvisangelaccio, markg

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D12464
2018-05-31 22:33:31 -06:00
Nathaniel Graham 40453cb627 Re-allow running Dolphin as the root user (but still not using sudo)
Summary:
Prohibiting the use of Dolphin as the actual root user (not using `sudo` or `kdesu`) breaks legitimate use cases for using the root user. An example is Kali, a distro that logs in as the root user by default as a deliberate design choice.

In such an environment, there is no additional security vulnerability beyond what you're already potentially exposing yourself to. So, let's re-enable it.

BUG: 387974
FIXED-IN: 18.08.0

Test Plan:
- Log in as normal user and run `sudo dolphin`: you get an error message.
- Log in as normal user and run `kdesu dolphin`: you get an error message.
- Log in as the root user and run dolphin normally: it works.

Reviewers: markg, elvisangelaccio, #dolphin

Reviewed By: markg

Subscribers: chinmoyr, cfeck, elvisangelaccio, mmustac, Fuchs, markg, graesslin, nicolasfella, zzag, kfm-devel, emmanuelp

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D12795
2018-05-31 12:18:18 -06:00
Kai Uwe Broulik 05d5792ac3 Properly sort int roles
Use integer comparison for word count, line count, track, and release year.

BUG: 394355

Differential Revision: https://phabricator.kde.org/D12948
2018-05-22 13:34:14 +02:00
Elvis Angelaccio 099da00df6 part: fix name of 'Select All' action
This should have been part of commit ec12391a1b.
2018-05-20 23:32:24 +02:00
Elvis Angelaccio eb116a741e Bring back 'New Window' action in viewport context menu
This fixes a regression introduced by ec12391a1b.

We don't use anymore the custom `new_window` action, but we use the
standard `file_new` action instead.
2018-05-20 23:24:43 +02:00
Alexander Miller 8e6f4eecd3
Make target_link_libraries for kdeinit_dolphin PRIVATE
Summary:
There is no need to add all of kdeinit_dolphin's
dependencies (including the static archive) when
linking dolphin; kdemain is the only needed symbol.
Mark the link libraries PRIVATE to simplify the
link command for dolphin.

Reviewers: #dolphin, elvisangelaccio

Reviewed By: elvisangelaccio

Subscribers: asturmlechner, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D12931
2018-05-18 22:44:57 +02:00
Alexander Miller b607091c39
Remove main.cpp from dolphinstatic_SRCS
Summary:
The file main.cpp is already in dolphin_SRCS and doesn't
belong in dolphinstatic_SRCS.

Normally the duplicate object is simply ignored, but with
link time optimization (LTO), linking dolphin can fail.
Apparently, the compiler tries to inline inline kdemain()
in this case. That is undesirable anyway and it ultimately
fails because the DBusInterface definition is not available:

.../ccHEv6cl.ltrans0.ltrans.o: In function `DBusInterface::~DBusInterface()':
<artificial>:(.text+0x2583): undefined reference to `vtable for DBusInterface'
.../ccHEv6cl.ltrans0.ltrans.o: In function `DBusInterface::~DBusInterface()':
<artificial>:(.text+0x5aa3): undefined reference to `vtable for DBusInterface'
.../ccHEv6cl.ltrans0.ltrans.o: In function `kdemain':
<artificial>:(.text+0x7686): undefined reference to `DBusInterface::DBusInterface()'
<artificial>:(.text+0x7b64): undefined reference to `vtable for DBusInterface'
collect2: error: ld returned 1 exit status

See also <https://bugs.gentoo.org/655710>.

Reviewers: #dolphin, elvisangelaccio

Reviewed By: elvisangelaccio

Subscribers: elvisangelaccio, asturmlechner, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D12929
2018-05-18 22:43:58 +02:00
Nathaniel Graham 56e8e77e68 Re-add "Open With" items to context menu for files in search view 2018-05-14 16:51:11 -06:00
Antonio Larrosa 720e1a2a3d Remove duplicated entry
Summary:
This gave a warning when running the script, and the value was
overwritten a few lines below, so just remove the unused value.

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D12845
2018-05-14 09:08:46 +02:00
Elvis Angelaccio 6e05c6365e Merge branch 'Applications/18.04' 2018-05-13 13:28:00 +02:00
Melanie Genz 2e1cc199c3 Add missing i18n call
The string was already part of dolphin but was not exposed for
translation.

BUG: 394194
2018-05-13 13:25:18 +02:00
Elvis Angelaccio 2912894d4f Fix broken build without baloo-widgets master
D11245 introduced a dependency on baloo-widgets master, but
baloo-widgets is only an optional dependency.
2018-05-12 20:54:01 +02:00
l10n daemon script ac9e3f9295 GIT_SILENT made messages (after extraction) 2018-05-11 06:27:59 +02:00
l10n daemon script 1c9d91b217 GIT_SILENT made messages (after extraction) 2018-05-11 03:37:42 +02:00
Nathaniel Graham e133c4557e Disable all the 'create new' items when in the Trash
Summary:
Disable all the items in the 'create new' menu when the active view is in the trash,
because they're not useful and don't even work. We don't disable the entire menu
because it's useful to be able to see what specific things are disabled.

This can be reverted once T8234 is implemented.

BUG: 332463
FIXED-IN: 18.08.0

Test Plan:
- Enter the trash with and without a split view; the 'create new' menu items are all disabled
- Be looking at something other than the trash with and without a split view; the 'create new' menu items are all enabled
- Toggle between split views (one in the trash, one elsewhere); menu is correct for both cases

Out of the trash:
{F5837042}

In the trash:
{F5837043}

Reviewers: #dolphin, broulik, elvisangelaccio, markg

Reviewed By: #dolphin, elvisangelaccio, markg

Subscribers: markg, elvisangelaccio

Differential Revision: https://phabricator.kde.org/D12731
2018-05-07 14:55:14 -06:00
l10n daemon script 94ba6a0978 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"
2018-04-30 07:09:04 +02:00
l10n daemon script c270f47136 GIT_SILENT made messages (after extraction) 2018-04-30 06:08:03 +02:00
l10n daemon script 90e1cc9c03 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"
2018-04-30 05:25:52 +02:00
l10n daemon script ded82601ef GIT_SILENT made messages (after extraction) 2018-04-30 03:29:21 +02:00
Antonio Rojas 05d389c56e Merge branch 'Applications/18.04' 2018-04-29 19:41:29 +02:00
Antonio Rojas 0c05b992c0 Don't filter out duplicated entries from places panel
This can lead to crashes and is inconsistent with the KIO file picker dialog, which shows duplicated entries.
BUG: 393528

Differential Revision: https://phabricator.kde.org/D12558
2018-04-29 19:39:15 +02:00
Elvis Angelaccio 974b2499c4 Use QGuiApplication::applicationDisplayName()
Same result with less code.
2018-04-29 17:13:18 +02:00
Elvis Angelaccio b9d6a97711 Bundle dolphinui.rc also in dolphinmainwindowtest
Otherwise the test executable will not be able to find the .rc file
while creating a DolphinMainWindow instance.

We also need to force the component name to `dolphin`, otherwise kxmlgui
will default to the name of the binary (which in this case would be
dolphinmainwindowtest rather than dolphin).
2018-04-29 17:07:18 +02:00
Elvis Angelaccio 362244ccbe DolphinTabPage: deactivate secondary view after closing split view
We deactivate the previously active view container whenever we change the active
split view, but we never do the same when we close the split view.

Long term we should probably even delete the secondary view after
closing the split view, because it will never be used again and the
pointer will be overwritten the next time the user opens the split view.
2018-04-25 13:42:18 +02:00
Elvis Angelaccio 9ec8135974 Merge branch 'Applications/18.04' 2018-04-25 12:50:12 +02:00
Robert Jennings 78c8b36dd8 Update window title after closing split view
Summary:

In dolphintabpage.cpp:

Through the connections set up in createViewContainer(), m_primaryViewContainer->setActive(true), at line 98,
ends up triggering slotViewActivated().

Because m_primaryViewActive is true, oldActiveView is not set to the view needed in this particular situation.
Both oldActiveView and newActiveView end up pointing to the same view and the connections are not set up.

BUG: 385111
FIXED-IN: 18.04.1

Test Plan:
1. Open split view
2. Make left panel active
3. Close split view
4. Navigate to various directories

Window title now updates to show current directory

Also tried with multiple tabs/combinations

Reviewers: #dolphin, ngraham

Reviewed By: #dolphin, ngraham

Subscribers: elvisangelaccio, ngraham

Differential Revision: https://phabricator.kde.org/D12446
2018-04-25 12:37:28 +02:00
Elvis Angelaccio 74c2d4ea2d Add failing test case for bug #385111
Will be fixed by D12446.

CCBUG: 385111
2018-04-25 12:34:02 +02:00
Nathaniel Graham b9143a55a7 Move "Open" actions to the top of the context menu for files
Summary:
This patch moves the "Open", "Open With", and "Open in" items to the top of the context menu to reap the following benefits:
- Move the "Open" and "Open With" items closer to the top since they're commonly used items, and right now they're buried in the middle of the menu
- Group related functionality
- Consistency with other common platforms (macOS Finder and Windows Explorer both have these items at the top of the context menu)

For folders, the "Open With" entries are moved higher, but not all the way to the top, since the "open in New tab/folder" entries are more useful.

Test Plan:
Tested all menu items in the context menu for files, folders, and links; all still work.

Context menu for single file:
{F5806809}

Context menu for multiple files:
{F5806810}

Context menu for single folder:
{F5806811}

Context menu for multiple folders:
{F5806812}

Context menu for symlink to folder:
{F5806815}

Reviewers: #dolphin, #vdg, elvisangelaccio, abetts

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

Subscribers: markg, abetts, elvisangelaccio

Differential Revision: https://phabricator.kde.org/D11884
2018-04-22 09:40:50 -06:00
Nathaniel Graham e8d8a8c35b Merge branch 'Applications/18.04' 2018-04-19 19:01:01 -06:00
Nathaniel Graham e15d9f266b Fix inconsistent preview spacing and icon wiggly-ness when toggling previews in Icon mode
Summary:
Dolphin had some code to change the grid spacing when previews were toggled, in an attempt to optimize the view for 3:2 landscape photos. This was problematic for many reasons:
- Conceptually, it was a bad idea to optimize the view for one specific use case. Previews are useful for more than just landscape photos, and this optimization would be inapplicable to any other set of files.
- Folders entirely full of images commonly have some portrait-orientation images included too, so even if the goal were appropriate, it was a bad idea to optimize for only having landscape images.
- For small sizes and medium icons (< 96px), the preview grid size was virtually identical to the non-preview grid size, so it had essentially no effect, and only made the icons wiggle strangely when previews were toggled.
- For large large sizes (>= 96px), all it did was unnecessarily increase the horizontal grid spacing, actually //reducing// usability for browsing through folders of images.

Therefore, let's just remove this code.

BUG: 393306
FIXED-IN: 18.04.1

Test Plan:
- Go to {nav Settings > View Modes > Icons} and make the icon size and preview size identical for 64px
- Toggle previews on and off
- Change both sizes to 112x
- Toggle previews on and off

In both cases, the grid spacing does not change and the icons do not wiggle strangely. The only visual change is that previews turn on or off.

Dolphin still works fine for viewing  3:2 landscape photos. 80px icons:
{F5813467}

192px icons:
{F5813465}

In fact, it's vastly //improved// for the >=96px use case since the grid spacing is no longer excessively wide

Reviewers: #dolphin, hein

Reviewed By: hein

Subscribers: broulik

Differential Revision: https://phabricator.kde.org/D12362
2018-04-19 14:52:25 -06:00
Roman Inflianskas ec12391a1b Convert hard coded shortcuts to standard keys
Test Plan: Check all changed shortcuts on all platforms.

Reviewers: #dolphin, rizzitello, elvisangelaccio

Reviewed By: #dolphin, rizzitello, elvisangelaccio

Subscribers: anthonyfieroni, ngraham, elvisangelaccio, rizzitello, #dolphin

Differential Revision: https://phabricator.kde.org/D11048
2018-04-13 21:33:18 +03:00
Antonio Rojas a4f16761fc Merge branch 'Applications/18.04' 2018-04-12 22:50:55 +02:00
Antonio Rojas ed5102a5fd Fix untranslated places panel entries
Load the places panel entries strings from the kio5 catalog, where they live now

BUG: 392822
Differential Revision: https://phabricator.kde.org/D12119
2018-04-12 22:49:05 +02:00
Michael Heidelbach 7d463ddd04 infopanel: Add choice of date display formats
Summary:
Let user choose date display format via checkbox in context menu

[[ https://phabricator.kde.org/file/info/PHID-FILE-5xjr7tvypj3jaczjtzrz | Example ]]

Depends on D11242

FEATURE: 392352

Test Plan: visual inspection

Reviewers: #dolphin, markg, ngraham

Reviewed By: markg, ngraham

Subscribers: broulik, markg, ngraham

Tags: #dolphin, #kde_applications

Differential Revision: https://phabricator.kde.org/D11245
2018-04-11 13:14:59 +02:00
Nathaniel Graham 9536d1170a Select and scroll to the file for "Open path" and "Open Path in New Window" operations
Summary:
After performing a search and using  the "Open path" or "Open Path in New Window"  present in the context menu, make sure the file is selected and visible in the resulting view.

Cannot implement the same fix for "Open Path in New Tab" because of a limitation in how the contents of inactive tabs are rendered; will need to fix that separately in another patch.

BUG: 377510

Test Plan: Search for an item, and choose {nav Open Path} or {nav Open path in new window}

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: elvisangelaccio, broulik

Differential Revision: https://phabricator.kde.org/D11703
2018-04-09 17:02:09 -06:00
Nathaniel Graham b12a7b0f24 Add more tab access functions
Summary: These new functions to access the next and previous tabs are not used by anything yet, but it is envisioned that they would be useful for a variety of purposes--such as the "open path in new tab" feature from D11703

Test Plan: Dolphin still compiled and runs; new code is not actually used anywhere

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Differential Revision: https://phabricator.kde.org/D12039
2018-04-09 17:00:47 -06:00
Fabian Kosmale 3a028d9db0 use the same bound check as setCurrentItem when setting m_currentItem manually
Summary:
This patch basically adds the check that would normally be done to the
itemInserted method, which seems to be good idea in general.
However, the fact that this is needed there might be an indicator of a logic bug
in the function – though, as I'm not familiar with the code base I cannot judge
this.

Test Plan:
Without this patch, dolphin when started from a terminal prints the following
warning (number can be different):
qt.accessibility.core: Cannot create accessible child interface for object:  PlacesView(0x563e863e35c0)  index:  10
After applying the patch, the warning doesn't appear anymore. Dolphin still
works still as it did before.

Reviewers: elvisangelaccio, #dolphin

Reviewed By: elvisangelaccio

Subscribers: #dolphin

Differential Revision: https://phabricator.kde.org/D11990
2018-04-08 11:44:26 +02:00
Elvis Angelaccio 5413025f0b Merge branch 'Applications/18.04' 2018-04-05 23:29:29 +02:00
Elvis Angelaccio e9192259f6 Improve QDialogButtonBox::Yes override text
Summary:
We are asking the users whether they are sure they want to quit.

But the "Quit" button can be ambiguous (am I quitting dolphin or just
this dialog?). If we use a "Quit Dolphin" button instead, that clearly
shows what will happen after triggering the action.

Test Plan: Close dolphin while multiple tabs are open.

Reviewers: #dolphin

Differential Revision: https://phabricator.kde.org/D11892
2018-04-05 23:28:58 +02:00
Elvis Angelaccio 30349ef1bd [RenameDialog] Fix crash when renaming single items
Summary:
`m_spinBox` is initialized only when renaming multiple items.

This commit restores the single-item rename logic which was wrongly
removed by commit c5eb4e3116.

BUG: 392743
FIXED-IN: 18.03.90

Test Plan: Disable inline renaming and try to rename single or multiple items (and also to undo the jobs).

Subscribers: #dolphin

Differential Revision: https://phabricator.kde.org/D11972
2018-04-05 23:15:50 +02:00
Nathaniel Graham 993c47f309 Show folder previews for items that have a Places Panel entry
Summary:
informationpanelcontent.cpp currently has an explicit check for whether or not a URL has a Places panel entry, and if it does, no folder preview is generated. It's not clear why this is done, but it was reported as a bug: https://bugs.kde.org/show_bug.cgi?id=392621. Removing the logic fixes the bug.

BUG: 392621
FIXED-IN: 18.08.0

Test Plan:
Before:
{F5782793}

After:
{F5782794}

Detailed test procedure:
- Open the Information Panel
- Turn on previews
- Put some pictures in ~/Pictures
- Hover over it and see that the Information Panel shows a preview of its contents
- Add ~/Pictures to the Places panel
- Hover over it again and see that previews are no longer displayed
- Apply the patch and restart Dolphin
- Hover over it once more and see that there are now previews, yay!

Reviewers: #dolphin, markg, elvisangelaccio

Reviewed By: markg, elvisangelaccio

Subscribers: markg, broulik

Differential Revision: https://phabricator.kde.org/D11894
2018-04-03 16:39:32 -06:00
Antonio Rojas eab70b2ac4 Merge branch 'Applications/18.04' 2018-04-03 22:50:29 +02:00
Antonio Rojas 386a862de4 Initialize m_konsolePartMissingMessage
Otherwise it just crashes when trying to open the terminal panel

BUG: 392660
Differential Revision: https://phabricator.kde.org/D11904
2018-04-03 22:48:25 +02:00
l10n daemon script f4e2593aa7 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"
2018-04-03 07:12:29 +02:00
l10n daemon script aee551e80b 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"
2018-04-03 05:25:54 +02:00
Julian Schraner 1441fefc07 Split Image Size into Width/Height
Summary:
This patch splits the single property "Image Size" into "Width" and "Height", providing more fine-tuned control for power users.

FEATURE: 374559

Test Plan:
- Sorting works correctly
- No real change, only exposed differently

Reviewers: #dolphin, elvisangelaccio, ngraham

Reviewed By: #dolphin, elvisangelaccio, ngraham

Subscribers: ngraham, elvisangelaccio

Differential Revision: https://phabricator.kde.org/D11816
2018-04-01 11:27:44 -06:00
Elvis Angelaccio 6f3b0e3d00 Fix detaching 2018-04-01 12:30:41 +02:00
Elvis Angelaccio 763933977b Use QHash rather than QMap
As recommended by the clazy qmap-with-pointer-key check.
2018-04-01 12:14:34 +02:00
Elvis Angelaccio d0503ae8e0 Use rightRef() instead of right()
As recommended by the clazy qstring-ref check.
2018-04-01 12:08:23 +02:00
Scott Harvey e0f7fe87bd Fix alignment of icons in Places panel and Compact view mode
Summary:
Adjust calculation of icon pixmap Y value; now based off center of text label bounding rectangle. Previously, icons appeared top-aligned when text size was larger than icon size.

Centering is done by obtaining the center point of the text frame (`m_textRect.center().y()`) and setting the top `Y` point of the icon to one-half of the scaled icon height (`m_scaled_PixmapSize.height()`)  Division is done by `2.0`, to ensure calculations are done with floating-point math, in keeping with `QPointF`, which returns floating-point values.

Also includes an adjustment named `midlineShift` (contributed by @zzag), which takes into account the font's midline in respect to the center of the text frame. Certain fonts (i.e. Noto Sans) can have a slightly offset midline, resulting in imperfect alignment of the icon. This small adjustment resolves that potential issue.

See before and after screenshots.
{F5764918}
Before, showing misalignment (with and without debugging wireframes)

{F5764920}
After, showing correction

BUG: 390771

Test Plan:
-- Compile Dolphin with patch
-- Increase system font size by several points (i.e. 15pt)
-- Check that Places panel icons remain centered with the text label
-- Select Compact View mode
-- Adjust icon size slider to minimum
-- Ensure that icons also remain centered in file listing
-- Check several combinations of icon size & font size to ensure centering is consistent

Reviewers: #dolphin, ngraham, cfeck, elvisangelaccio

Reviewed By: #dolphin, ngraham, elvisangelaccio

Subscribers: zzag, elvisangelaccio, #dolphin

Differential Revision: https://phabricator.kde.org/D11650
2018-03-29 16:29:51 -06:00
Elvis Angelaccio eed695710d Merge branch 'Applications/18.04' 2018-03-29 22:33:37 +02:00
Elvis Angelaccio 8d1cc850de Fix enum-compare-switch clang warnings
We were comparing a value of type `KStandardItemListView::ItemLayout`
with values of type `KStandardItemListWidget::Layout`.
2018-03-29 22:29:56 +02:00
Kai Uwe Broulik 40f9cfd519 [KItemListView] Check if KItemListStyleOption actually changed before emitting a change
This avoids work being done when it doesn't need to be.
For instance, the preview generator waits for everything to have settled using a 200ms timer before generating a preview.
This timer fired also in response to onStyleOptionChanged and needlessly delayed preview generation when navigating between folders
despite the style option (e.g. icon size, view mode) not having changed.

Differential Revision: https://phabricator.kde.org/D11481
2018-03-29 09:21:17 +02:00
Kai Uwe Broulik 1859d6455d [DolphinContextMenu] Fix excluding ourself from Open With menu
The desktop file name changed to org.kde.dolphin a long time ago. To avoid this breaking again, just use qApp->desktopFileName()

BUG: 391997

Differential Revision: https://phabricator.kde.org/D11540
2018-03-24 11:24:24 +01:00
Nathaniel Graham 49e0315584 Merge branch 'Applications/18.04' 2018-03-22 06:52:46 -06:00
Nathaniel Graham f728d72864 Fix missing entries in context menu for links
Summary: https://cgit.kde.org/dolphin.git/commit/?id=86f4fcb8cd574f6d886627fc5e01c9edfc84e977 introduced a regression: the context menu for links no longer shows various items that were gated behind being a directory. However, a link can be both a link and a directory, from KIO's perspective. This patch resolves the issue.

Test Plan:
- Context menus for files, folders, and file links are unchanged.
- The missing context menu items for folder links have returned: {F5761809}

I should have tested that patch better, and for that I apologize and offer to fix this regression here. I will endeavor to up my reviewing game.

Reviewers: rominf, michaelh, #dolphin, rkflx

Reviewed By: rominf, rkflx

Subscribers: rkflx

Differential Revision: https://phabricator.kde.org/D11562
2018-03-22 06:52:11 -06:00
Kai Uwe Broulik b2ff54be3b [DolphinContextMenu] Fix excluding ourself from Open With menu
The desktop file name changed to org.kde.dolphin a long time ago. To avoid this breaking again, just use qApp->desktopFileName()

BUG: 391997

Differential Revision: https://phabricator.kde.org/D11540
2018-03-21 15:53:59 +01:00
David Faure 1da0983c42 Fix compilation with -DQT_NO_URL_CAST_FROM_STRING 2018-03-21 15:30:51 +01:00
Kai Uwe Broulik 7cee23157f Introduce singleton for KFilePlacesModel
There are various places where Dolphin created a new KFilePlacesModel which would then query all storage devices and do other expensive work.

Differential Revision: https://phabricator.kde.org/D11283
2018-03-19 09:57:24 +01:00
Roman Inflianskas 6f05c66cc0 Add "Show Target" into symlink context menu and file menu
Summary:
Add "Show Target" into symlink context menu and file menu

FEATURE: 215069

Reviewers: ngraham, elvisangelaccio

Reviewed By: ngraham, elvisangelaccio

Subscribers: rkflx, ngraham, elvisangelaccio, markg, #dolphin

Differential Revision: https://phabricator.kde.org/D10990
2018-03-18 15:08:36 +03:00
Roman Inflianskas eb68fae15c Show "Empty Trash" button inside trash directory
Summary:
Show "Empty Trash" button inside trash directory.

FEATURE: 163306

Test Plan: {F5734949}

Reviewers: ngraham, rkflx, markg, elvisangelaccio

Reviewed By: ngraham, markg, elvisangelaccio

Subscribers: markg, emateli, broulik, elvisangelaccio, rkflx, mmustac, ngraham, #dolphin

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D10804
2018-03-18 13:46:06 +03:00
Roman Inflianskas 86f4fcb8cd Add "Open symlink destination folder" into symlink's context menu
Summary:
This is not complete. I'm wondering about "Open symlink destination folder in new tab/window".

Feature wants also "Copy symlink destination". I dislike this, because then it's good to have "Cut symlink destination" and that's too much.

FEATURE: 215069

Reviewers: #dolphin, ngraham

Reviewed By: #dolphin, ngraham

Subscribers: rkflx, ngraham, elvisangelaccio, markg, #dolphin

Differential Revision: https://phabricator.kde.org/D10990
2018-03-14 22:02:30 +03:00
l10n daemon script 6ab76d791c 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"
2018-03-13 05:14:09 +01:00
Roman Inflianskas 68a924af05 Show a message if Konsole part is not installed
Summary:
Show a message if Konsole part is not installed

BUG: 371822
FIXED-IN: 18.04.0

{F5749731}

Reviewers: ngraham, progwolff, elvisangelaccio

Reviewed By: ngraham, progwolff, elvisangelaccio

Subscribers: rkflx, ngraham, elvisangelaccio, broulik, progwolff, #dolphin

Differential Revision: https://phabricator.kde.org/D11118
2018-03-11 20:41:54 +03:00
Roman Inflianskas c0797e8ade Update trash icon after restore operation
Summary:
After restoring all the files from the trash, the trash icon remain 'full'. This patch fixes this.

BUG: 252483

Reviewers: elvisangelaccio

Reviewed By: elvisangelaccio

Subscribers: elvisangelaccio, #dolphin

Differential Revision: https://phabricator.kde.org/D11216
2018-03-11 19:47:31 +03:00
Elvis Angelaccio 69239fdf41 Removed unused variables spotted by clazy 2018-03-11 17:14:07 +01:00
Elvis Angelaccio 4aff36d148 Add missing this parameter
Forgot to mention it while reviewing D11012.
2018-03-11 17:07:20 +01:00
Roman Inflianskas f16fbcba4e Add Trash (empty, isEmpty, emptinessChanged)
Summary: Add `Trash` class to handle all trash operations.

Reviewers: elvisangelaccio, markg, ngraham

Reviewed By: elvisangelaccio, markg, ngraham

Subscribers: ngraham, markg, rkflx, elvisangelaccio, #dolphin

Differential Revision: https://phabricator.kde.org/D11012
2018-03-11 17:32:33 +03:00
Roman Inflianskas 0c9343d614 Fix some compile warnings
Reviewers: markg, elvisangelaccio

Reviewed By: markg, elvisangelaccio

Subscribers: chehrlic, rkflx, elvisangelaccio, #dolphin

Differential Revision: https://phabricator.kde.org/D10995
2018-03-10 18:07:47 +03:00
Kai Uwe Broulik 8c1455f96f Fix build without Baloo
That include IS used
2018-03-07 08:55:04 +01:00
Elvis Angelaccio 2523442d4d Revert "Fix some compile warnings"
This reverts commit 533f050855.

D10995 has not been approved.
2018-03-05 21:56:15 +01:00
Roman Inflianskas 48b58f830a Remove unused #include
Summary: I used CLion inspection to hunt all unused #include

Reviewers: #dolphin, elvisangelaccio, markg

Reviewed By: #dolphin, elvisangelaccio, markg

Subscribers: bcooksley, markg, elvisangelaccio, #dolphin

Differential Revision: https://phabricator.kde.org/D10985
2018-03-04 21:00:47 +03:00
Roman Inflianskas 533f050855 Fix some compile warnings
Reviewers: #dolphin, markg

Reviewed By: markg

Subscribers: elvisangelaccio, #dolphin

Differential Revision: https://phabricator.kde.org/D10995
2018-03-04 10:27:31 +03:00
Roman Inflianskas 848abc5922 Remove unused #include
Summary: I used CLion inspection to hunt all unused #include

Reviewers: #dolphin, elvisangelaccio, markg

Reviewed By: #dolphin, elvisangelaccio, markg

Subscribers: markg, elvisangelaccio, #dolphin

Differential Revision: https://phabricator.kde.org/D10985
2018-03-03 17:08:01 +03:00
Roman Inflianskas 32bd8efc7f Modernize the syntax of shortcuts
Reviewers: #dolphin, markg

Reviewed By: markg

Subscribers: markg, elvisangelaccio, #dolphin

Differential Revision: https://phabricator.kde.org/D10986
2018-03-03 16:44:29 +03:00
Roman Inflianskas 436ad965e9 Add an option to confirm trash emptying into settings
Summary:
Add an option to confirm trash emptying into settings.

BUG: 340572

Reviewers: #dolphin, ngraham, markg

Reviewed By: #dolphin, ngraham, markg

Subscribers: markg, ngraham, rkflx, #dolphin

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D10968
2018-03-03 08:46:55 +03:00
Roman Inflianskas bf0d259ae5 Add default shortcut "/" for opening filter panel
Summary:
Add default shortcut "/" for opening filter panel.

FEATURE: 156381

Reviewers: #dolphin, ngraham

Reviewed By: #dolphin, ngraham

Subscribers: ngraham, #dolphin

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D10961
2018-03-03 08:38:03 +03:00
l10n daemon script e46421bfee 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"
2018-03-03 05:23:49 +01:00
Nathaniel Graham b95cc59091 Also use standard keyboard shortcut for "show/hide hidden files"
Summary:
Use Ctrl+H as another keyboard shortcut to show and hide hidden files, as it is already the standard used in other GTK-based Linux file managers (Nautilus, Nemo, Caja, Thunar, Pantheon Files). This doesn't replace any existing shortcuts, so existing KDE users' muscle memory is retained.

FEATURE: 390527
FIXED-IN: KDE Applications 17.12.3

Test Plan:
- Ctrl+H now shows and hides hidden files
- Alt+. still works to do the same
- F8 still works to do the same
- Toolbar button still changes state appropriately when any of the three shortcuts are used

Reviewers: #dolphin, elvisangelaccio

Reviewed By: elvisangelaccio

Subscribers: emateli, elvisangelaccio

Differential Revision: https://phabricator.kde.org/D10558
2018-02-18 15:02:07 -07:00
Kai Uwe Broulik ae67f99195 [Information Panel] Adjust painting icons for high dpi scaling
Instead of creating our own KIconLoader (which takes ~5ms here) just use QIcon::fromTheme which already does everything right.

BUG: 390488

Differential Revision: https://phabricator.kde.org/D10532
2018-02-15 13:37:08 +01:00
Marjio Mustac 9a7569a82a Add icons to Edit menu
Summary:
Since Breeze offers such a great palette of action icons I thought we should make use of them which make things also more consistent with other applications.

Before:
{F5711158}

After:
{F5711159}

Test Plan:
Show menubar
Icons are shown in Edit menu

Reviewers: #dolphin, ngraham

Reviewed By: #dolphin, ngraham

Subscribers: ngraham

Differential Revision: https://phabricator.kde.org/D10503
2018-02-14 07:43:38 -07:00
Elvis Angelaccio 5f57256a2f Merge branch 'Applications/17.12' 2018-02-13 23:20:49 +01:00
Robert Hoffmann a618383df3 Fix resetting "View Modes" preferences to defaults
Summary:
Removed call to settings.readConfig() in ViewSettingsTab::loadSettings(),
because it overwrites default settings with user settings even if called
from ViewSettingsTab::restoreDefaultSettings().

Test Plan:
Settings -> Configure Dolphin -> View Modes:
Choose "Custom Font", "Choose...": other font settings than preselected;
alter "Icon Size" slider positions;
click OK; OK;
note modified text font next to icons, icon sizes

Settings -> Configure Dolphin -> View Modes:
Click "Defaults"
check "Font" is reset to "System Font";
check "Icon Size" slider positions are reset to default positions;
click OK
check text font next to icons, icon sizes are reset to defaults

Subscribers: ltoscano, ngraham, elvisangelaccio, michaelh, #dolphin

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D10190
2018-02-13 23:12:44 +01:00
Elvis Angelaccio e136d8cfeb Fix Windows build
kill() is not available on Windows. Now that we build TerminalPanel
everywhere (see 87e8d0ba), we need to #ifdef this call.
2018-02-11 23:01:17 +01:00