Commit graph

5809 commits

Author SHA1 Message Date
Nicolas Fella
95270333dc Use more human-readable sort order descriptions
Summary:
Anecdotal evidence shows that ascending/descending regularly takes people longer to process than necessary. This patch implements more human-friendly sort order descriptions, in particular:

A-Z/Z-A for text
Newest first/oldest-first for time
Lowest first/highest first for rating
smallest first/largest first for sizes

If there is no string for a particular role defined it will fall back to Ascending/Descending.

I'm aware that not every language uses A-Z. In this case the translator can pick any string that represents the concept of text sorting

Test Plan: Sort view in various ways

Reviewers: #dolphin, #vdg, ngraham

Reviewed By: #dolphin, #vdg, ngraham

Subscribers: ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D22006
2019-07-04 18:35:24 +02:00
Yuri Chornoivan
cd2078cef4 Add docs about the new 'Open new folders in tabs' option 2019-06-26 10:48:17 +03:00
Kai Uwe Broulik
5d83ceeb33 Fix crash without baloo 2019-06-25 15:26:59 +02:00
Yuri Chornoivan
8a942bb3d3 Fix minor typos 2019-06-24 08:40:39 +03:00
Felix Ernst
bd788a3ff4 Add "What's This?" to nearly everything in the main window
Summary:
This commit adds "What's This?" help to nearly everything in the
Dolphin main window (panels, views, buttons, ...). It adds the "?"
to the title bar so this help can easily be called.

For links in those help texts to work the WhatsThisClickedEvents are
handled in the main window class. This doesn't work for menus because
events from them aren't forwarded to the main window for some
reason so EventFilters are installed for the Control button menus.

Modifying the "Help" menu of KXmlGui is deprecated so no EventFilter
can be installed in the menubar. Therefore help texts without links
are provided for the menubar.

Test Plan:
Check if the event handling might make any problems.
Check for any big mistakes in the help messages.

Reviewers: #dolphin, elvisangelaccio

Subscribers: broulik, elvisangelaccio, yurchor, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D20471
2019-06-23 21:19:49 +02:00
Méven Car
e6c1b97d67 Allow dolphin to auto-play previewed media file, click on preview to play/pause videos or audio
Summary:
It is based on D19844.

I did my best to avoid glitches hence the amount of code touched.

Retry after @pekkah D7539
Moved the setting to the information panel context menu, no more timer

Settings screenshot :
{F6700220}

This would mach the same feature in the open/save dialog (although not equivalent)
{F6696456}

FEATURE: 378613
FIXED-IN: 19.08.0
GUI: New information panel context menu option

Test Plan:
Without auto play
  - in dolphin with the information panel opened, and the auto media play feature is disabled (right on the information panel)
  - hover over media files
  - the behavior is the same as before the patch

With auto play
  - in dolphin with the information panel opened, and the auto media play feature is enabled
  - hover over media files
  - media is played automatically
  - hover over another media file, the new media is previewed

Use audio or video file as media.

Reviewers: #dolphin, elvisangelaccio, ngraham

Reviewed By: #dolphin, elvisangelaccio, ngraham

Subscribers: ngraham, broulik, kfm-devel, pekkah

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19782
2019-06-23 16:38:09 +02:00
Méven Car
cdad6a513e Fix tests relating to the removal of the Root Place in D15739
Summary: See D15739

Test Plan: ctest

Reviewers: elvisangelaccio, ngraham

Reviewed By: elvisangelaccio, ngraham

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D21789
2019-06-23 16:09:53 +02:00
Alexander Saoutkin
2647dc47d4 Adding option to open externally called folder in a new tab
Summary:
Adds an option to open externally called folder in a new tab.

By default this option is enabled

Test Plan:
If option selected:
1. All valid arguments passed to Dolphin should be opened in tabs of an instance(s) (if it exists). Duplicate tabs just change activation to current tab.

If option not selected:
1. All calls to Dolphin result in a new instance being opened

This option does not require Dolphin to be restarted to take effect.

Reviewers: #dolphin, elvisangelaccio, ngraham

Reviewed By: #dolphin, ngraham

Subscribers: broulik, ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D21736
2019-06-23 13:27:25 +02:00
Nate Graham
0a06b1764c Improve README documentation
Summary:
Previously, README contained nothing but a link to userbase. A separate HACKING.md
file had non-technical developer documentation, but nothing technical to guide
people in the right direction.

This patch consolidates all information in the README file and adds technical
information about how to develop Dolphin.

BUG: 408967

Test Plan: Just read it :)

Reviewers: #documentation, #dolphin, yurchor

Reviewed By: #documentation, yurchor

Subscribers: yurchor, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D22025
2019-06-23 12:57:45 +02:00
Alexander Saoutkin
d2506ffa63 Open new instance of Dolphin if no URLs are given
Summary:
BUG: 408387
BUG: 408244
FIXED-IN: 19.08.0

Currently Dolphin only opens a new instance of itself in the following two scenarios:
1. No other Dolphin instances ( D21666 deals with not matching daemonized instances) are currently running.
2. A new instance is explicitly asked for via:  `dolphin --new-window`

A third scenario is needed to fix this bug:
3. If no URLs are passed in as arguments then open a new instance.

This patch adds this third scenario.

Test Plan:
STEPS TO REPRODUCE
1. Open Dolphin
2. Right-click on Dolphin's Task Manager Entry and click "Start New Instance"
3. A new instance is created.

As my system stuff is not built on master I am unable to replicate the bug (and can't confirm whether this fixes it), hence I'll rely on @ngraham to confirm whether this patch fixes the issue.

Reviewers: ngraham, elvisangelaccio

Reviewed By: ngraham, elvisangelaccio

Subscribers: elvisangelaccio, ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D21691
2019-06-22 15:47:00 +02:00
Elvis Angelaccio
ff81ed60cf Fix ECM version comparison
CCMAIL: montel@kde.org
2019-06-16 12:02:42 +02:00
Laurent Montel
c337bfeeea Install in new logging directory when we use kf5 5.59.0 2019-06-13 07:07:35 +02:00
l10n daemon script
9f65f1de47 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-06-11 05:13:47 +02:00
Elvis Angelaccio
7df5fc8edb Do not match daemonized dolphin instances
Summary:
`dolphin --daemon` does not have the `/dolphin/Dolphin_1` dbus path,
because it doesn't have any DolphinMainWindow.

Checking if the QDBusInterface is valid is not enough, we also need to look for dbus errors.

BUG: 408244

Test Plan:
1. Make sure there is a `dolphin --deamon` process around.
2. Start another dolphin process.

Reviewers: broulik, ngraham, feverfew

Reviewed By: feverfew

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D21666
2019-06-10 22:13:12 +02:00
Elvis Angelaccio
d886cf3c85 Fix container detaching 2019-06-08 13:11:47 +02:00
Nate Graham
1bcd478422 Make Bookmarks item work properly as a toolbar item
- Make its menu open on click, not click-and-hold
- Give it a proper icon

BUG: 408346
FIXED-IN: 19.08.0
2019-06-07 09:52:40 -06:00
Kai Uwe Broulik
10d8a57315 [DolphinContextMenu] Restore check for whether place already exists
Now that we have a places singleton it adds no real overhead.

Differential Revision: https://phabricator.kde.org/D21600
2019-06-07 10:37:19 +02:00
Tranter Madi
038565b62f Scroll when pressing PageUp/PageDown
Summary:
Add `PageUp/PageDown` to the `navigationPressed` variable.
Remove the `m_view->firstVisibleIndex()` and `m_view->lastVisibleIndex()` tests because sometimes it does not work correctly.

BUG: 407118

Test Plan:
Press PageUp/PageDOwn: it scrolls
Press Up/DOwn: it always scrolls

Reviewers: #dolphin, Zren, cfeck, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D21573
2019-06-05 16:40:54 +07:00
Kai Uwe Broulik
0bc919bd47 Merge branch 'Applications/19.04' 2019-06-04 08:59:02 +02:00
Kai Uwe Broulik
c43165a1c4 [Places Panel] Pass iconName to KFilePlaceEditDialog
Ensures that editing an entry with a custom icon doesn't have its icon discarded.

Differential Revision: https://phabricator.kde.org/D21558
2019-06-04 08:58:28 +02:00
Thomas Posch
853a95b6d5 Tighter match own service when trying to find suitable window to open path in.
Summary:
Current implementation matches org.kde.dolphin-.*PID while trying to exclude itself from the list of running instances.
With this fix applied only org.kde.dolphin-PID is matched.

Test Plan: Open dolphin twice. Observe only one window.

Reviewers: feverfew, #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D21547
2019-06-03 21:52:40 +02:00
Christoph Feck
73e6d074e6 GIT_SILENT Upgrade KDE Applications version to 19.04.2. 2019-05-31 12:26:13 +02:00
Alexander Saoutkin
27e3907a3d Open externally called files/directories in new tabs
Summary:
FEATURE: 183429
FIXED-IN: 19.08.0
GUI: new cli argument --new-window

Externally called files/directories are opened in a a new tab of an instance of Dolphin that already exists. If any of the given URIs are already open in a tab, then those tabs are activated instead of a new tab being opened.  If there is no instance then the files/directories are opened in a new window. The newly opened file/directory has its tab activated, and consequently, the window is also activated.

When the user clicks "Open In New Window" or "Detach Tab", the files/directories are opened in a new window.

Test Plan:
[Manual]
Before testing, set the default file manager in system settings as the newly built Dolphin executable.
One must also include the new dolphin executable in the $PATH, otherwise some functions will attempt to open the system dolphin instead of the new one.

Furthermore, running two different versions of Dolphin (in particular, where one does not have this patch included) can result in bugs appearing, in particular, new tabs not opening as old instances will not recognise the DBus commands sent to it. However, I see no reason why a user will have two different versions of Dolphin (apart from people like us :D).

Open directories with the help of auxillary programs (i.e. a browser). The files/directories should appear in a new window if an instance does not exist. If an existence already exists, then a new tab should be opened and activated in that instance and the window activated.
Use QDBusViewer to open folders/items by calling the ShowFolders/ShowItems methods in org.freedesktop.FileManager1 of the Dolphin instance.
When a user chooses to "Open In New Window"/"Detach Tab" then the files/directories should be opened in a new window.

Reviewers: #dolphin, elvisangelaccio

Subscribers: zzag, dfaure, fvogt, fikrim, magar, fbg13, davidedmundson, kwin, ngraham, elvisangelaccio, anthonyfieroni, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D16648
2019-05-30 22:40:08 +02:00
Alexander Stippich
36b61838a2 handle maps with multiple or single entries from Baloo
Summary:
Handle maps which may contain multiple entries with the same key.
Bumps frameworks to 5.58. Equivalent to D20739.

Reviewers: #dolphin, elvisangelaccio, bruns

Reviewed By: #dolphin, elvisangelaccio, bruns

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D21157
2019-05-30 11:18:41 +02:00
Nate Graham
c22df71df2 When filter bar is focused, switch to view when tab key is pressed
Summary:
Various people have requested that the tab key move keyboard focus from the filter bar's
text edit field to the main view. It already does this when the Enter and return keys
are pressed, but apparently this is not very intuitive and people expect Tab to work too.

This patch makes that behavior possible by moving the Lock button to the left of the
text edit field, and re-arranging the code so that the filter bar is initialized first.
This works because Qt assigns tab ordering by default according to the order of widget
construction. So if we simply construct the main view right after the filter bar, then
the tab ordering is set up this way automatically.

BUG: 403379
BUG: 403356
FIXED-IN: 19.08.0

Test Plan:
1. Activate Filter bar
2. Hit Tab key
3. View has become focused
4. Play around in Dolphin for a while and notice no regressions or crashes

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D21177
2019-05-25 21:32:29 -06:00
l10n daemon script
8477fc7877 GIT_SILENT made messages (after extraction) 2019-05-24 02:40:13 +02:00
l10n daemon script
13258e00c5 GIT_SILENT made messages (after extraction) 2019-05-23 07:22:07 +02:00
l10n daemon script
22f78c474a 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-05-22 05:14:39 +02:00
Andrew Crouthamel
1b985d1ef4 Add Documents shortcut detection
Summary:
This adds support for Documents detection when included as a default
as implemented in D16852. This is a work-in-progress and currently
does not succeed.

Assistance is welcome.

Test Plan: Run ctest within the dolphin build directory.

Reviewers: #dolphin

Subscribers: elvisangelaccio, kfm-devel, ngraham

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D16967
2019-05-20 16:59:35 -06:00
Nate Graham
2907a34bb5 Merge branch 'Applications/19.04' 2019-05-20 07:15:05 -06:00
Nate Graham
d863dd9ad4 Elide tab titles left so key information at the end of the string doesn't get cut off
Summary:
Tab Titles currently elide right. Generally the more useful information is at the right
side of the string--even more so when full paths are being used.

BUG: 406569
FIXED-IN: 19.04.2

Test Plan:
- No change when tab titles don't get elided
- When tabs show the full path and titles are elided, they're now useful: {F6782447}
- When tabs don't show the full path and are elided, they're elided on the other side which seems maybe a tiny bit better, but at least no worse: {F6782448}

Reviewers: #dolphin, #vdg, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: ndavis, elvisangelaccio, kneckermcknacksack, filipf, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D20689
2019-05-20 07:14:49 -06:00
l10n daemon script
f3e966e0ed GIT_SILENT made messages (after extraction) 2019-05-15 07:56:38 +02:00
l10n daemon script
35e92fdec5 GIT_SILENT made messages (after extraction) 2019-05-15 02:39:28 +02:00
David Hallas
78540e4921 Summary: Fixes crash when hiding devices
Summary:
Fixes crash when hiding devices. The crash is caused by
KStandardItem::setDataValue which calls the
KStandardItemModel::onItemChanged function, and that function will
delete the KStandardItem if the data value being set is the hidden
attribute being set to true. To fix this KStandardItem now derives
QObject so that we can use deleteLater.

Test Plan:
Right click a device in the places panel and select hide
Right click the places panel and select show hidden
Right click the hidden device and select show
Right click the same device and select hide

BUG: 403064

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D21050
2019-05-13 16:58:21 +02:00
David Hallas
2fac50f5f5 Add Bookmark Handling
Summary:
Add Bookmark Handling. Adds complete bookmark support as provided by
other KDE applications like Konsole and Konqueror. This allows you to
bookmark individual folders, create bookmark folders and open them.

Test Plan:
Go -> Bookmark -> Add Bookmark
Go -> Bookmark -> [Open the bookmark you selected]

FEATURE: 171366

Reviewers: #dolphin, elvisangelaccio, ngraham

Reviewed By: #dolphin, elvisangelaccio, ngraham

Subscribers: ognarb, meven, loh.tar, cfeck, hein, kfm-devel

Tags: #dolphin

Maniphest Tasks: T5408

Differential Revision: https://phabricator.kde.org/D19926
2019-05-13 16:37:15 +02:00
Elvis Angelaccio
0035b041d2 Fix stale comment
GIT_SILENT
2019-05-12 18:18:36 +02:00
Elvis Angelaccio
863112002c Fix indentation
GIT_SILENT
2019-05-12 13:12:01 +02:00
Chinmoy Ranjan Pradhan
d7555d8e11 [Inline Rename] Move cursor to correct position on pressing Home and End
Summary:
When pressing home or end key on a wrapped file name the cursor should move to beginning or end of the whole file name
instead of the last line (which is the default behaviour of any textedit widget).

BUG: 363179

Reviewers: #dolphin, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D21031
2019-05-12 16:33:14 +05:30
Alexander Potashev
7bc3b748b3 services/test: Fix test
Reviewers: #dolphin, elvisangelaccio, sitter

Reviewed By: sitter

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D21022
2019-05-08 15:26:09 +03:00
Elvis Angelaccio
9d11e5d4b4 Get rid of ugly static_cast usages in connect() calls 2019-05-05 17:53:29 +02:00
Elvis Angelaccio
957a6f4f31 [PlacesItemModelTest] Rename variable
This variable is not the expected size of the groups list, but it's the
expected index of the 'Remote' group in the model.
2019-05-05 17:53:29 +02:00
Alexander Potashev
afbef7d894 Fix formatting in CMakeLists.txt
Reviewers: elvisangelaccio

Reviewed By: elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D21021
2019-05-05 18:14:47 +03:00
Elvis Angelaccio
8989e52088 Merge branch 'Applications/19.04' 2019-05-05 17:02:59 +02:00
Elvis Angelaccio
d41d3be348 [PlacesItemModelTest] Ignore user tag places
Instead of listing the user tags (as tried in D21017), the test should not have
access to the user's baloo DB in the first place.

To do so, we use a QTemporaryDir as $HOME for the test process and for
its ioslave children (by setting KDE_FORK_SLAVES=yes).

While at it, drop the no-op removeTestUserData() function.
2019-05-05 16:52:16 +02:00
Elvis Angelaccio
f3a86bf29e Merge branch 'Applications/19.04' 2019-05-05 16:02:46 +02:00
Elvis Angelaccio
33a0d17ea8 Try again to fix PlacesItemModelTest::testDefaultViewProperties()
Commit bff373d598 was not enough because the model takes into
account the global view properties setting (in PlacesItemModel::initializeDefaultViewProperties()).

This means we need to disable the setting before init() runs.
2019-05-05 15:54:12 +02:00
Arfrever Frehtes Taifersar Arahesis
4f232fb82f Fix create_symlink path to DESTDIR instead of root file system
Test Plan: Builds fine again in a sandbox, with the symlink properly installed.

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: davidedmundson, elvisangelaccio, kfm-devel, ngraham

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D21011
2019-05-04 13:45:16 +02:00
Elvis Angelaccio
292cbefb3d Fix wrong apidox
There is no KStandardItemView class in dolphin. This apidox has been
wrong since the beginning (see commit ae4d11d918).

GIT_SILENT
2019-05-04 13:35:42 +02:00
Elvis Angelaccio
1b15962c92 Merge branch 'Applications/19.04' 2019-05-04 11:59:56 +02:00
Elvis Angelaccio
9f1b6eb3f4 Fix dolphin cannot be added as favourite in GNOME
The StartupWMClass entry is needed because gnome-shell gets confused by
the mismatch between the desktop file basename ('org.kde.dolphin') and
the WM_CLASS window property ('dolphin').

BUG: 407198
FIXED-IN: 19.04.1
2019-05-04 11:53:22 +02:00