This reverts commit c733b3aa97.
There are people who prefer the old behavior of session-restoring all
paths including the ones which are currently inaccessible. The idea is
that Dolphin is like a web browser; if a website is not currently
available, the browser tells you that instead of silently discarding the
URL and showing you the homepage. Doing this can be considered a form
of data loss.
In addition, the reason for the change was to prevent Dolphin from
showing invalid paths on launch for unmounted removable disks, but that
specific case was fixed separately by switching to ~ for any tabs/views
that were showing locations on a just-unmounted removable disk. So you
will never run into the problem if yo unmount a disk in Dolphin and then
close it.
Accordingly, let's revert the change because it causes more problems than
it resolves.
BUG: 439864
CCBUG: 427619
FIXED-IN: 21.08
With https://invent.kde.org/frameworks/kio/-/merge_requests/411 the
plugin instances can be reused during the lifetime of the
KFileItemActions object. This improves performance and also allows
the plugins to emit errors, even if they run async.
This commit fixes a bug which made it so an UrlNavigator that was
disconnected from a viewContainer would still indirectly control
the viewContainer because of a dubious connection created in
DolphinMainWindow.
Instead the internal UrlNavigator of the viewContainer is used
which is always connected to its own viewContainer.
This way the the supposedly disconnected primary UrlNavigator will
actually not affect the old disconnected viewContainer that is
currently being closed.
BUG: 437080
FIXED-IN: 21.08
To improve usability, the entries in the hamburger menu are
changed. Maybe the biggest fault of the previous menu contents were
that there were too many actions.
The new menu contents are composed of all the actions which are
necessary to use Dolphin and those which are very useful and should
be of interest for most users. Some menu contents change depending
on the state of the application. We can be more bold in only
showing what really seems necessary because this commit activates
the special sub-menu of KHamburgerMenu that helps users discover
all further features of Dolphin.
The hamburger menu is from now on also added to the context menus
in the view when both the menu bar and toolbar are hidden. This
allows users to hide both of them and still use all features of
Dolphin.
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.
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.
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
- 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
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.
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.
When session restore is populating the main window, it's unconditional;
you'll get whatever was there before. This can be a problem if any of
those things are now missing. For example, maybe you were browsing files
on a removable disk, then quit Dolphin, and finally removed the disk. The
next time you launch Dolphin again, it will try to show you the
view from the now-missing removable disk.
To prevent this, we now look at all the URLs in all of the view
containers that were created after session-restore has finished doing
its thing; if any of them are invalid local URLs, we change the URL to
the home folder instead to avoid showing the user a view with an invalid
location in it.
BUG: 427619
FIXED-IN: 20.12
Right now, when you unmount a device that any active view containers are
displaying, nothing in the view changes. As a result, it's possible to
try to navigate to files or folders in that view, which cannot be done
because the disk that the files or folders are located on has been
unmounted!
With this commit, we detect that case and switch the view containers
to show the home folder after the disk whose contents they are displaying
gets unmounted.
BUG: 158934
FIXED-IN: 20.12
StatJob::mostLocalUrl only works with ":local" protocols, adjust the code
accordingly.
Make the code async.
Remove activeContainerLocalPath() method as it isn't needed anymore.
Drive-by change: minimum required version of Qt should be 5.12 because
that's what KF >= 5.73 already requires.
In DolphinMainWindow, since KRun allows running executables by default, use
setRunExecutables(true) so as not to change the behaviour.
Remove the now redundant slotHandleUrlStatFinished, that whole StatJob
logic is now handled by OpenUrlJob.
Bump KF required version to 5.73, since that's where
OpenUrlJob::setShowOpenOrExecuteDialog was introduced.
Summary:
Remove all random updates of OpenPreferredSearchTool action, and
use KSycoca for updating it as discussed in https://phabricator.kde.org/D22594#663847
Enhancement for D29441 for bug #420911 caused by D22594.
The bug was fixed by D29442.
CCBUG: 420911
Test Plan:
```
$ cd ${KDE_INSTALL_DIR}/usr/share/applications
$ sudo mv org.kde.kfind.desktop org.kde.kfind.desktop_
$ kbuildsycoca5
$ sudo mv org.kde.kfind.desktop_ org.kde.kfind.desktop
$ kbuildsycoca5
```
Reviewers: broulik, elvisangelaccio, ngraham, #dolphin
Reviewed By: elvisangelaccio, #dolphin
Subscribers: anthonyfieroni, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D29568
Summary:
Add an action for focusing and de-focusing the Terminal Panel.
FEATURE: 185096
FIXED-IN 20.04.0
Test Plan:
- Hit {key Ctrl Shift F4} or click {nav Tools > Focus Terminal Panel} or {nav Control > Tools > Focus Terminal Panel}
- If the Terminal Panel was closed, it opens and gains focus
- If the Terminal Panel was open but unfocused, it gains focus
- If the Terminal Panel was open and focused, focus returns to the view
{F6630289, size=full}
Reviewers: #dolphin, elvisangelaccio, rominf
Reviewed By: #dolphin, elvisangelaccio, rominf
Subscribers: kfm-devel, elvisangelaccio, rkflx, ngraham, #dolphin
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D10959
Summary:
Adds navigation history to forward/back buttons in the toolbar. This
changes the forward/back buttons in the toolbar to use the
KToolBarPopupAction class which provides access to a drop down menu.
Test Plan:
Browse some folders
Click the back drop down menu and navigate somewhere
Click the forward drop down menu and navigate somewhere
FEATURE: 157819
FIXED-IN: 19.12.0
Reviewers: #dolphin, ngraham, elvisangelaccio, #vdg
Reviewed By: #dolphin, ngraham, elvisangelaccio, #vdg
Subscribers: felixernst, nerdopolist, mart, richardl, ognarb, david.fontanals, abetts, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D19311
Summary:
It's recommended that actions available in context menus be available in the main menu
as well for discoverability's sake. This patch does so for the "Add to Places" action.
The action is moved over to the main window, and accessed in the context menu via the
actionCollection it lives in.
BUG: 390757
FIXED-IN: 19.08.0
Test Plan:
- Action still works
- Action still appears in context menu when relevant
- Action in the File menu only becomes enabled when only a single directory is selected or nothing is selected
{F7143876}
{F7143877}
{F7143878}
{F7143879}
Reviewers: #dolphin, elvisangelaccio
Reviewed By: #dolphin, elvisangelaccio
Subscribers: elvisangelaccio, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D22149
Summary:
Make search action toggle the searchbar instead of just launching it.
The search action in dolphin did only bring up the search bar, but to close it again you had to go to the closing button on the same searchbar.
This behavior in inconsistent with other dolphin actions which toggle panels or tools.
BEFORE:
{F7256652}
AFTER:
{F7256862}
BUG: 344617
FIXED-IN: 19.12.0
Closes T8473
Depends on D23075
Test Plan:
- Enable the search mode: the searchbar appears and the toolbar button gets checked
- Press the search button again, and it goes back to normal mode.
- The search button state is coherent with the searchbox
- Coherence is kept when changing to a split view or different tab
- Shorcut <Ctrl-F> does not close the searchbar, but moves the focus to it.
Reviewers: #dolphin, ngraham, #vdg, elvisangelaccio
Reviewed By: ngraham, #vdg
Subscribers: ndavis, felixernst, elvisangelaccio, kfm-devel
Tags: #dolphin
Maniphest Tasks: T8473
Differential Revision: https://phabricator.kde.org/D23232
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
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
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
Summary:
New tabs should be placed after the currently active tab when using
middle click.
Test Plan:
Open new tab from the places panel using middle click, verify that the
Open new tab from the folders panel using middle click, verify that the
tab is opened after the current tab
Open new tab by middle clicking on the Back button, verify that the tab
is opened after the current tab
Open new tab by middle clicking on the Forward button, verify that the tab
is opened after the current tab
FEATURE: 403690
Reviewers: #dolphin, ngraham, elvisangelaccio
Reviewed By: #dolphin, ngraham, elvisangelaccio
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D19201
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
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
Summary:
BUG: 298467
Set the focus to the active view, after leaving the terminal panel.
This is a fork of the patch at https://git.reviewboard.kde.org/r/116118/ by @emmanuelp which should fix the issue with the original patch reported by Frank Reininghaus.
Test Plan: Works for me.
Reviewers: #dolphin, emmanuelp, ngraham
Reviewed By: #dolphin, ngraham
Subscribers: ngraham, emmanuelp
Differential Revision: https://phabricator.kde.org/D9955
When unmounting a removable media Dolphin checks if there are
some files open on the device before performing the unmount.
If the terminal window in dolphin is open and the to be unmounted path is open,
the unmount process will be blocked.
This patch sets the terminal window current path to the home directory upon unmount request
if the terminal directory is set to the mount path.
The unmount request could came from two sources:
The user could hit right click on the media in the dolphin's places panel and hit unmount.
The user could request an unmount from the indicator applet
This patch was originally written by Arjun AK for the kdelibs4 version
of Dolphin: https://git.reviewboard.kde.org/r/121613/
BUG: 158264
FIXED-IN: 17.11.80
Differential Revision: https://phabricator.kde.org/D7847