Commit graph

399 commits

Author SHA1 Message Date
Felix Ernst ad5d3367c7 Add an option to use an UrlNavigator in the toolbar instead
This commit adds a locationInToolbar KToggleAction to switch between
using a location bar to navigate or using a new custom QWidgetAction
in the toolbar.

A big portion of this MR is refactoring because until now the
UrlNavigator was tightly intertwined with the DolphinViewContainer.
With this MR an UrlNavigator for controlling a View can be freely
connected or disconnected with a single method call.

A DolphinUrlNavigator class is created in the process which contains all
Dolphin-specific UrlNavigator code which did previously reside in the
DolphinViewContainer class. Other application parts that belong to
UrlNavigator-management are also moved here.
2020-11-09 23:49:07 +01:00
Elvis Angelaccio 465e06138e Add support for KUserFeedback
This commit introduces KUserFeedback in dolphin with some basic data
sources and with a settings page to configure the telemetry values.

There are also a couple custom data sources as proof of concept: a bunch
of settings and the count of available network shares as listed by Solid.

The settings page is shown only if the user feedback framework is
enabled, but currently in Plasma we don't have a global kill switch to
disable it.

At the moment we never show an encouragement message. We need to connect
to the `Provider::showEncouragementMessage()` signal, but first we
should agree to a common way to show a non-annoying message to the users.
2020-11-05 18:31:28 +00:00
Alexander Lohnau 97415729c3 Compile with QT_NO_KEYWORDS 2020-10-23 18:23:06 +00:00
Alexander Lohnau a24327cd50 Compile without foreach 2020-10-23 18:23:06 +00:00
Steffen Hartleib d7b33b76a1 Improve Touch support
With this patch dolphin now supports the following touch gestures:

* Tap gesture to interact/open with directories, files and so on
* TapAndHold and release gesture for access to the context menu (main window, panel folder, places and information)
* TapAndHold and moving gesture for drag and drop action (main windows, panel folder and places)
* pinch gesture for zoom in main window
* kinetic scrolling (QScroller) for main window, panel folder, panel places, panel information, setting preview and service
* two fingers swipe gesture to left, right and up as shortcut to navigate back, forward and up
* two finger tap gesture to toggle item selection, similar to Ctrl and left mouse click

FEATURE: 385066
FIXED-IN: 20.11.80

 You are currently rebasing branch 'touch' on '85241a924'.
2020-09-13 18:53:32 +00:00
Alexander Lohnau c31b08cf61 Do not build KCMs on windows 2020-09-10 22:37:21 +00:00
Alexander Lohnau e8c4500459 Do not build KNS installer and KNS button on Windows 2020-08-31 16:57:03 +00:00
Alexander Lohnau be182ae30b Fix deprecated knsrc file location
This fixes the `kf.newstuff.core: Using a deprecated location for the knsrc file "servicemenu.knsrc"` warning.
2020-07-17 19:31:03 +02:00
Alexander Lohnau 3e1cb2c7fb Dolphin: Implement package kit for deb/rpm/pacman service packages
Summary: The deb/rpm/pacman packages are now installed/uninstalled using packagekit.

Test Plan: Try to install deb package from kde store (search for `jetbrains`). Then uninstall it.

Reviewers: #dolphin, ngraham, elvisangelaccio, meven

Reviewed By: #dolphin, ngraham, elvisangelaccio, meven

Subscribers: cblack, anthonyfieroni, asturmlechner, meven, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D29119
2020-05-05 17:26:13 +02:00
Alexander Saoutkin 5351db95c6 Sync terminal with KIOFuse mount when browing remote directories
Summary:
Adds the capability to sync the terminal with a KIOFuse mount if the URL is remote.
Partly based on the existence of another DBus currenly in review:
https://invent.kde.org/kde/kio-fuse/-/merge_requests/21

Syncing works in both "directions". Changing the URL to a remote URLin the
DolphinView will change the URL in the terminal to the KIOFuse local path equivalent.
Conversely changing the URL in the terminal to one that happens to be in a KIOFuse
mount will change the URL in the DolphinView to the remote URL equivalent.

Test Plan:
Manual testing (see video in comments).
1. Checking that changing directory in DolphinView from remote/local to local doesn't
cause any regressions.
2. Checking that changing directory in terminal from local to local (but not in
KIOFUse mount) doesn't cause any regressions.
3. Checking that changing directory in DolphinView from remote/local to remote
correctly changes URL in terminal to KIOFuse equivalent.
4. Checking that changing directory in terminal from local to KIOFuse path
correctly changes the URL in the DolphinView to the remote equivalent.
5. Checking the KIOFuse not being installed doesn't cause any regressions.
6. Changing directories very quickly does not cause any slowdown.

Reviewers: #dolphin, fvogt, elvisangelaccio

Reviewed By: #dolphin, fvogt, elvisangelaccio

Subscribers: elvisangelaccio, fvogt, kfm-devel, ngraham

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D28290
2020-04-07 18:29:22 +01:00
Elvis Angelaccio 869b8d7e30 Switch to generated MainWindow dbus interface
Summary: This allows compile-time checks for the main window dbus methods.

Test Plan: Same test plan as in D21691, D21666 and D25510.

Reviewers: #dolphin

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D26214
2020-03-16 22:43:08 +01:00
Nate Graham 09e215be46 "Use newly-upstreamed rename dialog from KIO""
This reverts commit 41105103b0.

KIO's version was just bumped to 5.67, so this can land now without
breaking the CI.
2020-01-11 13:21:52 -07:00
Nate Graham 41105103b0 Revert "Use newly-upstreamed rename dialog from KIO"
This reverts commit bae6620f22.

Frameworks 5.67 doesn't exist yet; this needs to wait another month.
2020-01-06 14:34:36 -07:00
Nate Graham bae6620f22 Use newly-upstreamed rename dialog from KIO
Summary:
With the rename dialog upstreamed in D17595, we can use it from there.

This will require the KF5 dep to be bumped to 5.67, which should be feasible given that we're at the very beginning of a new Applications cycle.

Depends on D17595

Test Plan:
1. Dolphin Settings > uncheck "rename inline"
2. Rename one or more files. Observe that it still works

Tests still pass.

Reviewers: #dolphin, elvisangelaccio, meven

Reviewed By: elvisangelaccio, meven

Subscribers: meven, broulik, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D17597
2020-01-06 14:25:44 -07:00
Elvis Angelaccio 6bcdb62429 Merge branch 'release/19.12' 2019-11-17 18:54:40 +01:00
Ismael Asensio 8d92c8be7f refactor(search): De-couple baloo URL parsing logic from UI
Summary:
Extracts the logic that parses `baloosearch:` urls into a new model class. The parser logic itself is kept as is.
The search box UI is later updated using the model fields.

This refactor has been proposed by @bruns in the review of D24422, as it largely simplifies the unit tests and further expansion/improvements.

Test Plan:
No behavior changes.
Test case is added in the follow-up revision: D25258

Reviewers: #dolphin, elvisangelaccio, bruns

Reviewed By: #dolphin, elvisangelaccio, bruns

Subscribers: ngraham, bruns, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D25257
2019-11-13 22:21:07 +01:00
René Bertin 83dc0afe46 make link with LLVM
This patch fixes a link failure when building with the LLVM toolchain
which does not discover the dependency on or pull in the private dolphin
library when linking dolphin itself.

BUG: 410237
Differential Revision: https://phabricator.kde.org/D22802
2019-11-12 17:47:35 +01:00
David Hallas c3b914a7fa Unmounting busy device doesn't tell who is blocking
Summary: Unmounting a busy device from the places panel doesn't tell which applications have open files blocking the unmount.

Test Plan:
Mount a USB stick using Dolphin
Open a file from the USB stick
Unmount the USB stick using Dolphin
Observe the new error message.

FEATURE: 189302

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

Reviewed By: #dolphin, elvisangelaccio, meven

Subscribers: meven, davidedmundson, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19989
2019-10-27 06:52:25 +01:00
Alexander Potashev 1aaafe178c Rewrite servicemenu helper utility in C++
Summary:
     - Also support MIME type "application/x-compressed-tar".
     - Update tests in Ruby, remove SimpleCov.

BUG: 399229

Test Plan: Ruby tests passed

Reviewers: sitter, elvisangelaccio, ngraham

Reviewed By: elvisangelaccio

Subscribers: cfeck, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D21878
2019-07-15 01:39:15 +03: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
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
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
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
Stefan Brüns ecf1ae6d0b [InformationPanel] Use the new inline configuration mode
Summary:
The current external configuration dialog has some issues:

- its layout is suboptimal, as its initial size is typically to small
- it is quite disassociated with the actual widget it configures, properties
  have a different order, and the property names can be quite abstract
  without the corresponding value.

Doing the visibility selection inline typically avoids the sizing problem,
as the containing application (dolphin) is often vertically maximized.
The selection becomes more obvious, as the item order is kept,
and the values are shown.

Depends on D20524

CCBUG: 389571

Reviewers: #dolphin, #baloo, #frameworks, ngraham, astippich, #vdg, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: elvisangelaccio, meven, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D20525
2019-04-23 12:36:14 +02:00
Nate Graham b303e3c93a Re-implement Meta-E global launch shortcut using KGlobalAccel
Summary:
FEATURE: 405302
FIXED-IN: 19.08.0

Test Plan:
1. Apply patch
2. Reboot (didn't work until I rebooted or logged out and back in again)
3. Hit {key Meta E}
4. Dolphin Launches

Reviewers: #dolphin, elvisangelaccio, davidedmundson

Reviewed By: #dolphin, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D20229
2019-04-06 11:40:54 -06:00
Elvis Angelaccio 5b463d82fe Bring back KActivities support
Summary: This code has been unused since the KF5 port.

Reviewers: #dolphin, #plasma

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D18273
2019-03-18 21:18:04 +01: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
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
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
Laurent Montel 7c9db51c1d Autogenerate debug file + install debug categories file 2018-11-02 13:23:10 +01: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
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
Friedrich W. H. Kossebau cd4f42b33a Remove QT definitions duplicated from KDEFrameworkCompilerSettings or dead 2018-06-29 18:42:00 +02: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
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
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 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
Elvis Angelaccio 87e8d0ba5f Build TerminalPanel also on Windows
Summary:
terminalpanel.cpp *should* compile on Windows, so there is no reason to
remove it from the build and use tons of #ifdefs in dolphinmainwindow.

We still keep the terminal panel disabled on Windows
(i.e. the two remaining #ifndef Q_OS_WIN in dolphinmainwindow),
because it is probably not functional.

But at least we won't break the Windows CI every time
someone touches the terminal panel code (see e.g. 2e942237c9).

Test Plan: Builds on Linux, someone on Windows should test this patch if possible.

Reviewers: #dolphin, #craft

Differential Revision: https://phabricator.kde.org/D10006
2018-02-10 19:40:15 +01:00
Elvis Angelaccio ecbab34510 Fix all krazy #include warnings
- "include own header first line"
- "put config.h in angle brackets line"
- "do not include QtModule/QtClass line"

`QElapsedTimer` was implicitly included by
kfileitemmodelsortalgorithm.h, now we need to explicitly include it in
kfileitemmodel.cpp.

We also need to explicitly link to `Qt5::Concurrent`, otherwise we
cannot `#include <QtConcurrentRun>`.
2018-02-04 11:38:50 +01:00
Kai Uwe Broulik 1018848416 Support middle clicking of Back/Forward/Up/Home toolbar buttons
This opens the resulting page in a new tab.

BUG: 358649

Differential Revision: https://phabricator.kde.org/D7390
2017-08-24 15:45:28 +02:00
David Faure cf273cd8a9 Bundle the XMLGUI files into qrc resources.
This is a step towards being able to run applications uninstalled,
and it simplifies deployment on non-linux.
2017-07-25 11:39:57 +02:00
Elvis Angelaccio 4216c7e6ba Move non-exported code to a static library
This allows us to speed up the compilation because we don't need to
build twice the source files we use in the unit tests.

Test Plan: Builds, dolphin works and tests pass.

Reviewers: emmanuelp, dfaure

Differential Revision: https://phabricator.kde.org/D5935
2017-05-27 10:23:47 +02:00
Elvis Angelaccio d75b1de7bf Rename FileMetaDataToolTip to DolphinFileMetaDataWidget
Since commit 230fe13d1f this class is not a "tooltip" anymore, but just a
simple widget. Rename it to avoid future confusion.

Reviewers: emmanuelp

Differential Revision: https://phabricator.kde.org/D4451
2017-02-09 19:36:11 +01:00
Elvis Angelaccio 62b7f9228a Drop no longer used dependency
KWindowSystem is no longer used since commit 230fe13d1f.
It was only pulled for `KWindowEffects::enableBlurBehind()`, which is
now in plasma-integration (triggered by KToolTipWidget).
2017-02-06 00:07:58 +01:00
R.J.V. Bertin b6e76f006d Add application icon for Mac and MS Windows.
Uses the Oxygen theme because it fits in better with prevailent icons
on those platforms.
2016-11-22 18:15:42 +01:00
Andrius da Costa Ribas c6d4cae263 Fix exports and linkage, remove sources from tests which are already being linked.
REVIEW: 127709
2016-04-22 14:30:32 -03:00
Andreas Cord-Landwehr 3c09528f3c Enable KCrash crash handler. 2015-11-14 22:37:40 +01:00
Matthias Klumpp 2a18f45025 Name AppStream metainfo file like the .desktop file 2015-09-07 17:20:35 +02:00