Commit graph

5631 commits

Author SHA1 Message Date
Simon Depiets
c148eff8ca Improve wording of split view/pane settings
Summary:
I found these strings very hard to understand then translate without looking into the code because the use of "view" refers to both "the split view" and "the left pane and the right pane of the split view".

This patch attempts to explicitly mention panes when needed.

Reviewers: #dolphin, angeloevertonjr, ngraham

Reviewed By: #dolphin, ngraham

Subscribers: ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19579
2019-03-06 10:46:54 +08:00
Alexander Stippich
7a57be9812 Use new display string function from KFileMetaData
Summary:
Delete all the custom formatting functions
and use the ones provided from KFileMetaData.

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: bcooksley, elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19105
2019-03-01 12:02:03 +01:00
Laurent Montel
4315e5c938 remove deprecated methods 2019-02-27 08:59:18 +01:00
Nate Graham
1c6240964b Give the "Sort by" menu an appropriate icon 2019-02-24 14:09:53 -07:00
David Hallas
d2783df310 Fixes memory leak of KItemListHeader
Summary:
Fixes memory leak of KItemListHeader
The KItemListHeader passed the listView parent object to the QObject
base class, but that pointer seems to always be nullptr causing the
KItemListHeader to not be memory managed by anything. Instead simple
use the listView as parent pointer.

Test Plan: This leak was found using Address Sanitizer

Reviewers: elvisangelaccio

Reviewed By: elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D14453
2019-02-24 18:22:55 +01:00
l10n daemon script
16edd9ccec GIT_SILENT made messages (after extraction) 2019-02-24 02:53:48 +01:00
l10n daemon script
33581c60c7 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-02-22 05:30:16 +01:00
David Hallas
c72fdaa773 Fix crash during shutdown
Summary:
Fix crash during shutdown. The root cause is that when Dolphin in stopped as
part of an activity, the KItemListViewAccessible destructor is called after
QApplication::exec has returned causing Qt to already having cleaned up the
QAccessibleInterface instances kept in KItemListViewAccessible. Instead of
storing the pointers to QAccessibleInterface we store the QAccessible::Id so
that we can use the QAccessible::deleteAccessibleInterface function for
deleting the instances.

BUG: 402784

Test Plan:
I wasn't able to reproduce the crash in the first place, but I have just
opened and closed Dolphin a few times and verified the the QAccessibleInterface
instances are correctly cleaned up.

Reviewers: #dolphin, elvisangelaccio, ngraham

Reviewed By: #dolphin, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19083
2019-02-18 08:58:11 +01:00
Nate Graham
6e88d7cef0 Merge branch 'Applications/18.12' 2019-02-17 14:07:49 -07:00
Nate Graham
cf2da56c5e Word-wrap KMessageWidget text
Summary:
Word-wrap KMessageWidget text to prevent the window from being widened
when the text is very long.

CCBUG: 404232

Only `CCBUG: ` because word wrap only works where QLabel detects a word boundary;
it will not wrap a string with no spaces or other word boundaries (e.g.
"aaaaaaaaaaaaaaaaaaaa...")

Test Plan:
- Create a new text file with a 300-character name that has spaces in it
- In the KMessageWidget's error message, the file name is wrapped at the word
boundaries

Reviewers: #dolphin, #frameworks, cfeck, elvisangelaccio

Reviewed By: #dolphin, cfeck, elvisangelaccio

Subscribers: elvisangelaccio, cfeck, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D18968
2019-02-17 14:07:28 -07:00
David Hallas
17af8ae0ad New tab should be placed after the current tab
Summary:
When opening a new using the context menu the new tab should be placed
after the currently open tab, not at the end of the tab list.

BUG: 403690

Test Plan:
Open multiple tabs and select a different tab than the last one.
Open a new tab using the context menu and see that it opens after the currently
selected tab.
Open a tab using Ctrl+T and see that it opens at the end.

Reviewers: #dolphin, ngraham, elvisangelaccio

Reviewed By: #dolphin, ngraham, elvisangelaccio

Subscribers: elvisangelaccio, ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D18945
2019-02-16 16:51:44 +01:00
Angelo Oliveira Jr
92368c1e4d Add option to choose which view to close
Summary:
This Diff make configurable which view will close when toggling off
the split view mode, if it's the active one or the inactive one.

A new checkbox was added to the Dolphin configuration window,
and defaults to the original behavior.

FEATURE: 312834
FIXED-IN: 19.03.80

Test Plan: {F6535432}

Reviewers: ngraham, #dolphin, elvisangelaccio

Reviewed By: ngraham, #dolphin

Subscribers: elvisangelaccio, cfeck, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D18040
2019-02-16 16:09:27 +01:00
l10n daemon script
36da6c7e32 GIT_SILENT made messages (after extraction) 2019-02-13 07:36:24 +01:00
l10n daemon script
037a394ec7 GIT_SILENT made messages (after extraction) 2019-02-13 02:57:24 +01:00
Kai Uwe Broulik
d5744305f6 Merge branch 'Applications/18.12' 2019-02-08 09:02:00 +01:00
Kai Uwe Broulik
585cc994e6 [DolphinView] Use correct color group
Use the inactive color group when the window is inactive and update when window state changes.

CCBUG: 404053

Differential Revision: https://phabricator.kde.org/D18811
2019-02-08 09:01:38 +01:00
Kai Uwe Broulik
9da33680ad Merge branch 'Applications/18.12' 2019-02-06 16:24:01 +01:00
Kai Uwe Broulik
bf44548ad1 Sort preview plugins case-insensitively
"eBook thumbnails" would show up all the way at the bottom otherwise

Test Plan: 18.12 branch It now shows where it should

Differential Revision: https://phabricator.kde.org/D18787
2019-02-06 16:23:19 +01:00
Kai Uwe Broulik
b2b913c844 Use more suitable default view mode for recent documents and Downloads folder
Sort them descending by date as well as:
* for Recent Documents: switch to details view
* for Downloads enable grouping and disable sorting folders first

Differential Revision: https://phabricator.kde.org/D18697
2019-02-04 09:12:35 +01:00
Elvis Angelaccio
fb4b4465f9 Merge branch 'Applications/18.12' 2019-02-02 21:37:06 +01:00
Anthony Fieroni
83912a6de8 Fix member initialization
Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>
2019-02-02 19:48:09 +02:00
Anthony Fieroni
ec29cfff20 [versioncontrolobserver] Update working directory on tab activation
Differential Revision: https://phabricator.kde.org/D18605

Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>
2019-02-02 19:38:37 +02:00
l10n daemon script
d728853027 GIT_SILENT made messages (after extraction) 2019-01-30 07:19:49 +01:00
Anthony Fieroni
9a9fbae988 [versioncontrolobserver] Do not use static plugin objects
Differential Revision: https://phabricator.kde.org/D17640

Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>
2019-01-29 20:28:07 +02:00
Nate Graham
b7ceb51b44 After opening and switching to a new tab, always focus the view
Summary:
When Dolphin opens a new tab and immediately switches to it, the URL navigator gets focus if it's editable. If it's not, the breadcrumbs bar gets keyboard focus, which is not very useful since it's not really intended for keyboard navigation.

This patch changes that behavior so that the view always gets focus, which seems more useful and more consistent.

BUG: 401899
FIXED-IN: 19.04.0

Test Plan:
1. Put the URL navigator into breadcrumbs mode
2. Open a new tab
3. Observe that the view gets keyboard focus
4. Put the URL navigator into editable mode
5. Open a new tab
6. Observe that the view still gets keyboard focus

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: emateli, elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D17635
2019-01-29 06:33:27 -07:00
Elvis Angelaccio
8bc93b564c Introduce HAVE_TERMINAL
Source code should check for features detected during configure-time,
rather than checking for a specific OS.

See also commit 87e8d0ba5f.
2019-01-28 22:38:21 +01:00
l10n daemon script
df3c2c1391 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-01-28 08:29:51 +01:00
l10n daemon script
52c019c9cb SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-01-28 05:21:42 +01:00
Nate Graham
2100a7a5c8 Ask for confirmation when Closing Dolphin windows with a terminal panel running a program
Summary:
Ask for confirmation when Closing Dolphin windows with a terminal panel running a program.

FEATURE: 304816
FIXED-IN: 19.04.0

Test Plan:
# Open terminal panel
# Run `watch ls`
# Close Dolphin
# Observe confirmation
# Disable confirmation
# Repeat, observe no confirmation
# Enable confirmation in the settings
# Repeat, observe a confirmation

Reviewers: #dolphin, markg, elvisangelaccio, rominf

Reviewed By: #dolphin, elvisangelaccio

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

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D10960
2019-01-19 08:15:11 -07:00
Chris Rizzitello
784734ca16 Abort updateWindowTitle and activeViewChanged if not changed.
Summary:
 - Prevent activeViewChanged from updating the window if the view is the same view (happens at least once when starting up)
 - Stop updateWindowTitle from updating the title if its not changed.

Reviewers: #dolphin, elvisangelaccio, broulik

Reviewed By: #dolphin, elvisangelaccio, broulik

Subscribers: anthonyfieroni, broulik, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D17882
2019-01-16 17:34:26 -05:00
Elvis Angelaccio
f8196b8cf3 Drop unused includes
GIT_SILENT
2019-01-15 18:50:33 +01:00
Elvis Angelaccio
ae906710ba Drop unused config-X11.h.cmake
Unused since de84f223d4
2019-01-15 18:30:16 +01:00
Elvis Angelaccio
67e7f8132f Fix include style
GIT_SILENT
2019-01-15 18:11:09 +01:00
Laurent Montel
e5ebb31e54 Consti'fy 2019-01-11 07:03:26 +01:00
Alexander Stippich
d099123841 Merge branch 'Applications/18.12' 2019-01-07 21:56:40 +01:00
Alexander Stippich
8f051a391d fix display of image orientation
Summary:
The name of the orientation property
for baloo/kfilemetadata was false, leading to
an always empty image orientation field.

Test Plan:
Look at an image in Dolphin details view
which has the exiv orientation tag set. Orientation
column is not empty.

Reviewers: #dolphin, ngraham

Reviewed By: #dolphin, ngraham

Subscribers: ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D18008
2019-01-07 21:53:01 +01:00
l10n daemon script
5d9ad8d24f SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-01-06 08:35:14 +01:00
l10n daemon script
1873e2f08f SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-01-06 05:25:48 +01:00
Elvis Angelaccio
504db3f702 Fix title update when changing active split view
Summary:
The DolphinTabPage::activeViewUrlChanged signal triggers the title
update in DolphinMainWindow, which sets the new title from the
`m_activeViewContainer` instance.

This means we need to notify the main window that the active view
changed before telling it that the current url changed.

BUG: 402641
FIXED-IN: 18.12.1

Reviewers: #dolphin, rizzitello, ngraham

Reviewed By: #dolphin, rizzitello, ngraham

Subscribers: rizzitello, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D17881
2019-01-05 17:29:34 +01:00
Friedrich W. H. Kossebau
89158c6b3d Merge branch 'Applications/18.12' 2019-01-04 22:23:49 +01:00
Friedrich W. H. Kossebau
1cde03cdfe Use https over http for homepage url 2019-01-04 22:22:07 +01:00
Elvis Angelaccio
f0e66d3465 Add failing test case for bug #402641
CCBUG: 402641
2018-12-31 00:21:25 +01:00
l10n daemon script
15f1963842 GIT_SILENT made messages (after extraction) 2018-12-28 02:42:41 +01:00
l10n daemon script
e843b88c73 GIT_SILENT made messages (after extraction) 2018-12-26 02:48:09 +01:00
l10n daemon script
129cd66595 GIT_SILENT made messages (after extraction) 2018-12-24 02:46:19 +01:00
l10n daemon script
6de7aae20a GIT_SILENT made messages (after extraction) 2018-12-23 06:55:00 +01:00
l10n daemon script
371ae20398 GIT_SILENT made messages (after extraction) 2018-12-21 02:51:21 +01:00
Nate Graham
1af2241243 Merge branch 'Applications/18.12' 2018-12-18 22:04:46 -07:00
Nate Graham
f6549f08ea Use correct icon for the "New Window" menu item 2018-12-18 22:03:16 -07:00
l10n daemon script
024951ed0d GIT_SILENT made messages (after extraction) 2018-12-19 02:49:13 +01:00
Elvis Angelaccio
9581a27328 Make RenameDialog modal again.
Summary:
The rename dialog used to be modal, but commit
828ba8902c changed the behavior without
really explaining why.

Test Plan: disable inline renaming and rename something.

Reviewers: #vdg, ngraham

Reviewed By: #vdg, ngraham

Subscribers: ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D17621
2018-12-17 22:52:25 +01:00
Nate Graham
34ebf8e0e8 Return editable URL navigator to breadcrumb mode if it has focus and everything is selected and when Ctrl+L is pressed
Summary:
This patch makes an editable location bar return to breadcrumb mode when {key Ctrl L} is pressed, but only if the location bar currently has focus and everything is selected. Otherwise, it will simply return focus to it as before.

This provides a slightly easier way to make the location bar return to breadcrumbs mode

Test Plan:
- Compile and deploy and make the location bar be breadcrumbs
- Hit {key Ctrl L} twice in a row -> location field turns to being in breadcrumb mode. Focus is correctly returned to the main view.
- Hit {key Ctrl L}, move focus elsewhere, then hit {key Ctrl L} again -> Location bar is editable and focused with everything selected.
- Hit {key Ctrl L}, deselect some of the text, then hit {key Ctrl L} again -> Location bar selects everything.

Reviewers: #dolphin, elvisangelaccio, dhaumann

Reviewed By: elvisangelaccio, dhaumann

Subscribers: elvisangelaccio, dhaumann, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D16980
2018-12-16 13:57:19 -07:00
Elvis Angelaccio
2050fe1781 Drop old krazy comments
The `qclasses` check should no longer be an issue after the KF5 port.

GIT_SILENT
2018-12-16 13:57:51 +01:00
l10n daemon script
05437365e7 GIT_SILENT made messages (after extraction) 2018-12-12 07:47:04 +01:00
Shubham Jangra
ca25af6d38 Add an icon for "restore" action
Summary:
Before:
{F6469103}

After:
{F6469104}

Test Plan:
1. Go to Trash

2. Right click any item.

Reviewers: ngraham

Reviewed By: ngraham

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D17490
2018-12-10 23:56:52 +05:30
Shubham Jangra
b3d054380c Revert back 2018-12-10 23:42:11 +05:30
Shubham Jangra
55db38d5ec Add an icon for "restore" action
Summary:
Before:
{F6469103}

After:
{F6469104}

Test Plan:
1. Go to Trash

2. Right click any item.

Reviewers: ngraham

Reviewed By: ngraham

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D17490
2018-12-10 23:28:45 +05:30
Shubham Jangra
48a4b7abea Remove unused parameter warning 2018-12-07 22:28:29 +05:30
Nate Graham
743207179f [context menu] Restore separator above 'Properties' that went missing 2018-12-06 14:10:58 -07:00
Elvis Angelaccio
f7a824b70d Merge branch 'Applications/18.12' 2018-12-04 22:04:41 +01:00
Anton Kreuzkamp
037d2c9984 KItemListWidget: Use initStyleOption
Instead of using QStyleOption::initFrom, let's use
QGraphicsWidget::initStyleOption, which is made for exactly the purpose
of KItemListWidget. This is especially important since, according to the
docs of QGraphicsItem::paint "The widget argument is optional. [...]
For cached painting, widget is always 0.". Even though currently no code
in dolphin does cached painting, for the sake of modularity one should
not rely on widget to be non-null. Using QStyleOption::initFrom does
assume that, though.

In fact, GammaRay asks the items to do cached painting when attaching it
to the application, causing it to crash.
2018-12-03 15:15:56 +01:00
Elvis Angelaccio
ca5581944b [PlacesPanel] Fix unused variable warning 2018-12-02 14:48:01 +01:00
Elvis Angelaccio
3ee24ac287 [KItemListController] Make event-handling functions private
There is no reason why these event-handling custom functions should be
public, so make them private instead.
2018-12-02 14:42:41 +01:00
Elvis Angelaccio
6938a73fe5 [KItemListController] Drop virtual keywords
We are never overriding these functions, so there is no reason to declare
them virtual.
2018-12-02 14:08:55 +01:00
Elvis Angelaccio
7af0e23186 [KItemListController] Drop unused functions 2018-12-02 14:08:55 +01:00
Thomas Surrel
e62ae08d30 Merge remote-tracking branch 'origin/Applications/18.12' 2018-12-01 21:20:01 +01:00
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