Summary:
Follow-up of D23655 where we didn't have time to polish the code:
- add a couple of variables to make the code more clear.
- remove the `get` prefix which we usually don't use in Qt code.
- make the function private since it's very tied to implementation.
- add a new isUrlOpen public method as wrapper.
Reviewers: feverfew
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D23860
Summary:
When you select the same sort order that's already selected, the currently-checked
sort order description (the human-readable ascending/descending items) gets unchecked
in `slotSortTriggered()` yet the ascending/descending items items only get checked in
`slotSortOrderChanged()`. Because the order hasn't gotten changed, neither one gets
checked again.
This patch fixes the problem by not unchecking them in the first place.
BUG: 411223
FIXED-IN: 19.08.2
Test Plan:
1. Right-click > Sort By > Click the currently-selected sort order
2. Right-click > Sort By > See that the item for the current ascending/descending setting has not been changed
Reviewers: elvisangelaccio, #dolphin
Reviewed By: elvisangelaccio, #dolphin
Subscribers: broulik, meven, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D23412
Summary: The old icon was a color icon, which does not match the style of other toolbar/menu buttons
Test Plan: {F7321334, size=full}{F7321319}
Reviewers: #dolphin, #vdg, ngraham
Reviewed By: #dolphin, #vdg, ngraham
Subscribers: ngraham, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D23740
In D22149, a request was made to remove a variable assignment ("action",
on line 389 in src/dolphincontextmenu.cpp. However the change went too
far, and it actually removed the exec() call, not just the assignment
which should have stayed.
This resulted in the context menu not being shown at all.
Adding back exec(m_pos) at least allows for the context menu to show.
CCMAIL: nate@kde.org
Summary:
Fixing bug where urls in secondary view containers would not be considered
for the open new folders in tabs feature.
Test Plan: Manual testing. Testing for no regressions. Testing that URL is found if in secondary view container
Reviewers: elvisangelaccio
Reviewed By: elvisangelaccio
Subscribers: kfm-devel, ngraham
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D23655
Summary:
Currently the DBus service is created before the MainWindow DBus object is
created. This can cause hangs if another service makes calls to a a method
in an object that's not been initialised, when the service is already published.
This patch defers the creation of the service until all DBus objects are
created.
Test Plan:
Tested in KDevelop. Have "open new folders in tabs" feature enabled.
Open several folders with Dolphin at once. Before this patch
there would be noticeable hanging. With this patch all tabs instantly open with
no hanging.
Reviewers: elvisangelaccio, ngraham
Reviewed By: elvisangelaccio
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D23672
Summary: QUrl::fileName() returns an empty string if the URL ends with a slash.
Test Plan:
1. Run `dolphin /tmp` from command line
2. Right-click from viewport and click 'Add to Places'
Reviewers: ngraham
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D23654
Calling KIO::iconNameForUrl will determine mime type of the file potentially blocking.
Don't needless do it when the tab bar isn't visible.
Differential Revision: https://phabricator.kde.org/D23295
Dolphin shows a different text for whether it is loading the directory or currently sorting its contents.
However, when entering a folder that causes sort criteria to change (e.g. because of different view properties in that folder),
the status bar text is changed to "Sorting..." while it is still actually loading the folder.
When loading a directory starts, reset any status bar text to ensure "Loading..." is displayed in this case.
Differential Revision: >https://phabricator.kde.org/D23459
Summary:
Stop is not as useful as paused plus it makes the button coherent with the click to play/pause feature.
CCBUG: 364957
Test Plan: {F7305382}
Reviewers: #dolphin, elvisangelaccio, ngraham
Reviewed By: #dolphin, ngraham
Subscribers: ngraham, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D23648
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:
Current behavior of dolphin in sorting of files with textual columns (e.g. tags) is to show files without this particular textual column (e.g. without tags) first.
This patch changes this behavior so that dolphin shows the files with some value before the files without any value for chosen sorting method.
BUG: 410538
Test Plan:
Sorting by name (isn't affected by the patch): https://i.imgur.com/eqbYwyZ.png
Sorting by textual column ("tags" in this particular example),
old version (non-tagged files and folders come first): https://i.imgur.com/5KLLujU.png
patched version (tagged files and folders come first): https://i.imgur.com/oUAeZ2z.png
Reviewers: #dolphin, #vdg, ngraham
Reviewed By: #dolphin, #vdg, ngraham
Subscribers: elvisangelaccio, ngraham, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D23482
Test Plan:
In dolphin, click on a video or audio preview in the information panel.
The video or audio preview starts
Reviewers: elvisangelaccio, #dolphin, ngraham
Reviewed By: elvisangelaccio, #dolphin, ngraham
Subscribers: alexde, anthonyfieroni, ngraham, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D22183
Entering a folder will have Dolphin determine whether it can store the view properties in a .directory file within the folder or
in a generic config location.
It does so by checking for permissions on the file and parent dir causing various stat calls that potentially block on a slow mount.
Also, the config reading thereafter can be very slow.
Moreover, network shares are typically shared between users, so one user's view properties shouldn't affect or be overwritten
by this Dolphin instance.
It doesn't resolve symlinks but is surely an improvement over the status quo.
Differential Revision: https://phabricator.kde.org/D23458
"Local" URLs can also be slow.
This might jeopardize loading large local directories where a resorting could take place but imho it's better than leaving the user
wondering when files will finally show up. However, it takes some time for KDirLister to initially signal items having been added,
and only then our 2 second timer starts.
Also, stop the timer when loading has completed.
Differential Revision: https://phabricator.kde.org/D23460
Summary:
BUG: 411193
FIXED-IN: 19.08.1
Test Plan:
Reproduce steps as given in bug report. Observe the exected result.
Used qdbusviewer and ShowFolders method to observe that no regressions occured
in the "open new folders in tabs" feature.
Reviewers: elvisangelaccio, ngraham
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D23445
Summary:
{F7205836}
Use a default toolbar layout that looks better and makes more sense for new users.
Test Plan: Open Dolphin (with the default toolbar)
Reviewers: #dolphin, #vdg, ngraham, GB_2, elvisangelaccio
Reviewed By: #dolphin, #vdg, ngraham, GB_2
Subscribers: iasensio, filipf, meven, elvisangelaccio, felixernst, GB_2, ndavis, ngraham, kfm-devel, #vdg, #dolphin
Tags: #dolphin, #vdg
Differential Revision: https://phabricator.kde.org/D23075
Summary:
This ensures that the filename extension is always visible, and also is just a
nicer way to elide file and folder names in general.
BUG: 404955
FIXED-IN: 19.12.0
Test Plan:
Details view: {F6648784}
Icons view with limited label height: {F6648785}
Reviewers: #dolphin, #vdg, elvisangelaccio, GB_2
Reviewed By: #dolphin, #vdg, elvisangelaccio, GB_2
Subscribers: GB_2, ndavis, rooty, elvisangelaccio, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D19471
Summary:
After leaving terminal with Ctrl-D or exit commands the input focus isn't set back to the folder view.
The problem appears, because `TerminalPanel::isHiddenInVisibleWindow` returns not what it supposed to return,
since when the terminal process exits, `m_terminal` is set to nullptr.
I moved unwanted checks from it inside `TerminalPanel::dockVisibilityChanged`
This change also exposes a crash in `DolphinMainWindow::slotTerminalPanelVisibilityChanged()`,
which was previously working only by luck.
Now we check whether `m_activeViewContainer` is not null before using it.
BUG: 407979
FIXED-IN: 19.11.80
Test Plan:
1. Open Dolphin
2. Press F4 to open the terminal panel
3. Type exit<Enter> or press Ctrl-D
4. Check current focus widget
Reviewers: #dolphin
Subscribers: ngraham, elvisangelaccio, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D22420
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.
This should have been part of commit 7df5fc8edb. Not sure how I missed it.
BUG: 408244
FIXED-IN: 19.08.0
Test Plan:
1. Make sure the new "Open new folders in tabs" setting is enabled.
2. Run `dolphin --deamon` and make sure is the only dolphin process around.
3. Call the `org.freedesktop.FileManager1.ShowFolders` method from QDbusViewer.
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D23087
`VERSION_GREATER_EQUAL` was introduced in cmake 3.7, but the specified
minimum version is 3.0.
So use `NOT VERSION_LESS` instead to still support older cmake versions
too.
Differential Revision: https://phabricator.kde.org/D22984
Summary:
Instantly hide tooltip shown over an element when a key is pressed.
Currently, when pressing an alphanum key to select a different file,
the tooltip continues to cover much of the window - often hiding that newly selected file from view.
Reviewers: #dolphin, ngraham, elvisangelaccio
Reviewed By: #dolphin, elvisangelaccio
Subscribers: broulik, elvisangelaccio, kfm-devel, pdabrowski
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D22512