Nate Graham [Tue, 17 Nov 2020 23:15:57 +0000 (16:15 -0700)]
Add placeholder text for empty views
Throughout our QML-based software, we now display placeholder text for
empty views so that the user knows that the view is actually empty, and
it's not that the software is just broken.
This commit introduces the same thing for Dolphin's main view.
Derek Christ [Thu, 15 Oct 2020 21:11:17 +0000 (23:11 +0200)]
Fix delete action switching via 'Shift' when sub-context-menu is open
Switching the 'Move to Trash' action to 'Delete' using the shift key
does not work when the mouse hovers a submenu. This fix resolves the
issue by using an event filter instead of the key event functions.
Alexander Lohnau [Sun, 22 Nov 2020 21:19:21 +0000 (22:19 +0100)]
Move repetitive contextmenu related logic in one place
This makes a bit easier to handle the stuff.
Also we don't need the `addVersionControlPluginActions` utility method
and we can put it in the new utility method instead.
Felix Ernst [Fri, 20 Nov 2020 15:17:08 +0000 (16:17 +0100)]
Select last visited folder when going up/back
This commit fixes a regression introduced by ad5d3367c7fef4c3c11188a768f21a2ee2b3c025. A lot of connections were
changed there and at least one of them was wrong. The connections can
be separated into GUI connections and internal ones. This commit makes
it so the GUI stuff is connected to m_urlNavigatorConnected and
everything else to m_urlNavigator.
Felix Ernst [Thu, 19 Nov 2020 21:22:27 +0000 (21:22 +0000)]
Allow having the UrlNavigators below the tab bar
This commit restores the possibility to have the UrlNavigators below
the tab bar. This will happen automatically whenever the UrlNavigator
is removed from the toolbar.
It is also now again possible to have the toolbar on the side. This
option is disabled while the toolbar contains the UrlNavigators.
This commit makes no changes to the new default which is having the
UrlNavigators in the toolbar but makes sure that upgrading users won't
be affected.
Henri Chain [Wed, 21 Oct 2020 10:20:56 +0000 (10:20 +0000)]
D-Bus activation systemd service
Correctly scopes dolphin in systemd service `app-org.kde.dolphin.service` when dbus-activated (while still working if systemd is not present), as per https://systemd.io/DESKTOP_ENVIRONMENTS/
uses new ECM modules:
- https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/5 to simplify the systemd service templating + install
- https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/17 to generate the dbus service file automatically
Nate Graham [Tue, 17 Nov 2020 19:13:30 +0000 (12:13 -0700)]
Separate Delete/Move To Trash menu items in context menu
Right now these actions are in a visual group with "Rename" and "Add to
Places" which is silly as those actions have no logical connection
whatsoever to deletion.
This commits moves those items into the section above, putting them in a
more logical place and leaving the Delete/Move To Trash item in its own
section.
Alexander Lohnau [Thu, 12 Nov 2020 09:01:08 +0000 (10:01 +0100)]
Fix qrc icon
Apparently the icon was not null, because the mimetype was known.
But there was no icon associated with it and we got an
icon which is not null, but has a null pixmap.
Felix Ernst [Thu, 5 Nov 2020 22:30:07 +0000 (23:30 +0100)]
Adress most of the second round of Angelaccio's review comments
This commit applies most suggestions which were made on the MR.
Most notably the DolphinUrlNavigator class is split up which leads to
the creation of a DolphinUrlNavigatorsController class.
Additionally some minor coding style and const correctness changes are
included.
The error value of cached integers is changed from -1 to INT_MIN
because situations could come up in which -1 would be a valid value.
Felix Ernst [Wed, 28 Oct 2020 16:52:29 +0000 (17:52 +0100)]
Fix a crash and extract unrelated changes
The secondary UrlNavigator is now created when and only when:
- split view mode is activated for the active tab
OR
- switching to a tab that has split view already enabled.
This fixes a crash that occurs when the setting to always start in
split view mode is enabled.
An animation for activating split view is also removed from this and
moved into a separate MR. Another unrelated name change left over from
a previous commit (viewContainers() -> activeViewContainers()) is
dropped.
Felix Ernst [Sun, 20 Sep 2020 16:53:59 +0000 (18:53 +0200)]
Make UrlNavigators in the toolbar the only option
The UrlNavigators will be automatically added to the toolbar. The Sort By
action is removed from the default toolbar to make space.
Remove all options to have UrlNavigators outside the toolbar and remove
those code paths.
Make it so the new NavigatorsWidgetAction contains two UrlNavigators when
in split view mode. Spacing was also added to align these UrlNavigators
with the ViewContainers when enough space is available.
Force the toolbar to be either at the top or bottom of the window.
Set a sane sizeHint for DolphinUrlNavigator. It would be better to do this
in KUrlNavigator in the future.
This commit also contains a changes which should be moved to a separate
merge requests before this gets merged:
- Add an expansion animation when split view is enabled by the user
Felix Ernst [Thu, 27 Aug 2020 16:55:18 +0000 (18:55 +0200)]
Add the UrlNavigator to the toolbar automatically if needed
This commit adds the DolphinUrlNavigatorWidgetAction::addToToolbarAndSave()
method which changes the users toolbar configuration to contain an
Url Navigator. This way the user doesn't need to do anything manually.
Aside from that a bunch of minor fixes like renaming and reordering
Felix Ernst [Wed, 12 Aug 2020 18:45:17 +0000 (20:45 +0200)]
Adress the first round of Angelaccio's review comments
- Split the viewContainers(bool includeInActive) into two methods
without parameters
- Prevent users from accidently hiding all Url Navigators by
preventing the dangerous action and then displaying a helpful
message instead
Unrelated to review comments: Remove a useless line of code
Felix Ernst [Sun, 14 Jun 2020 14:20:02 +0000 (16:20 +0200)]
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.
Elvis Angelaccio [Tue, 18 Aug 2020 21:47:53 +0000 (23:47 +0200)]
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.
Chris Holland [Thu, 1 Aug 2019 01:46:53 +0000 (21:46 -0400)]
Only check if place url is mount point once during polish event.
The capacity bars will no longer update when capacity changes. It only
checks the size on init.
Updating during polish event is only a temporarily solution just to
draft code flow for seperating logic from painting. Eventually this
logic update should be in a worker thread detached from blocking the
rendering thread that blocks launching the dolphin window.
Chris Holland [Mon, 20 May 2019 17:47:48 +0000 (13:47 -0400)]
Draw 2 Rectangles below mount points to represent a disk capacity bar
Draws overtop text that's goes below the baseline like a 'j'. It's
fairly difficult to add extra space below the text as the places view
is a "details" view, so the text is vertically centered in the
widget's "row" as you'd desire it to in the main file view.
We can make the widget 8px taller, adding 4px above and below so
there's adequate room for the capacitybar, but that wastes 4px for
each mount point.
Ideally we'd use the "compact" view, which displays the text/size in a
column beside the icon. However the compact view was not designed to
take up the entire width of the viewport. It's also designed to
overflow with a horizontal scrollbar.
Méven Car [Sat, 31 Oct 2020 11:40:57 +0000 (12:40 +0100)]
FolderPanel: prevents scanning directory tree recursively
KFileItemListView contents are periodically scanned by KFileItemModelRolesUpdater.
It uses then KDirectoryContentsCounter to scan directories to determine their size possibly recursively.
Introduce a scanDirectories setting to disable directory scanning by KFileItemModelRolesUpdater.
Lothar Paltins [Tue, 27 Oct 2020 14:54:03 +0000 (15:54 +0100)]
Fix wrong parameter in function call
In KDirectoryContentsCounterWorker::CountResult, the first parameter in
the call of walkDir was wrong. It should be path without conversion,
because the conversion is done in the called function.