For unknown reasons, when I implemented this feature, I turned off
progress notifications. I don't think this makes any sense, and we just
got a bug report about it.
Accordingly, this patches turns on progress notifications.
BUG: 422335
FIXED-IN: 20.04.2
`m_propriorityQueue` and `m_queue` are used as FIFO queues, so we need
to use `takeFirst()` instead of `takeLast()` when removing elements
from the queue.
While at it, add a comment so that we will remember these are FIFO
queues.
When the font height is more than the zoom slider height, use the former
to set the fixed height of the free space widget on the status bar.
Otherwise the text is cut-off.
This works with Breeze, Oxygen and Fusion styles.
While the documention says to port to QFontMetrics::horizontalAdvance(),
what we actually need is not the horizontal advance, but the width of
the text. So we need to port to QFontMetrics::boundingRect().width().
Quoting from https://kdepepo.wordpress.com/2019/08/05/about-deprecation-of-qfontmetricswidth/:
"Since it was not clear from the confusingly named function QFontMetrics::width()
that it actually returned the horizontal advance, instead of the bounding width,
this method is now obsolete.
You must port to either QFontMetrics::horizontalAdvance() or QFontMetrics::boundingRect().width().
Please make sure you are aware of the difference, and do not port
blindly. I am pretty sure that in most cases
QFontMetrics::boundingRect() is what you want, unless you are writing
custom text shaping/layouting code. Using the wrong function can cause
clipped text or text that suddenly wraps to the next line despite
calculating the width that it needs."
While this reduces test-coverage in cases where the user doesn't have
Ruby or the testing gem installed, it at least allows us to get
through configure and build without disabling **all** testing.
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
DolphinView doesn't know anything about split views and it shouldn't.
Rename these new methods to what they actually do (just copy or move to a
given QUrl).
Summary:
Close buttons for windows, tabs, and pretty much everything else in KDE are on the right,
not the left. This patch makes Dolphin's search and filter bars follow that.
BUG: 421372
FIXED-IN: 20.08.0
Test Plan: {F8314176}
Reviewers: abetts, #dolphin, #vdg, elvisangelaccio, GB_2
Reviewed By: #dolphin, #vdg, elvisangelaccio, GB_2
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D29693
Summary:
Plugins can now do out of version control actions (D29041), so we need them to inform of their state.
This change connects every plugin signal to Dolphin on plugin instantiation.
Test Plan:
1. Try SVN Update of inaccessible repository: see SVN error message shows up.
2. Try pull inaccessible git repository: see GIT error message shows up.
3. Try SVN Commit: see SVN message.
Reviewers: #dolphin, meven, elvisangelaccio
Reviewed By: #dolphin, meven
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D29488
Summary:
Just some little things :-)
- Refactor foreach
- Fix minor formatting issues
- Use auto keyword where appropiate
Test Plan: Compiles
Reviewers: #dolphin, ngraham, elvisangelaccio
Reviewed By: #dolphin, elvisangelaccio
Subscribers: elvisangelaccio, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D29560
Summary:
Port QRegExp::exactMatch() with QRegularExpression::anchoredPattern().
Port QRegExp::Wildcard with QRegularExpression::wildcardToRegularExpression().
Note that QRegularExpression::wildcardToRegularExpression() returns an anchored
pattern.
Test Plan:
Using the filter bar in dolphin works as before.
All unit tests pass, except:
- kfileitemmodeltest (which is unrelated AFAICS); it fails on master too
- placesitemmodeltest, which fails on master too
Reviewers: #dolphin, elvisangelaccio, meven
Reviewed By: #dolphin, elvisangelaccio
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D26215
I don't see why this is necessary and causes a blocking(!) StatJob every single time the window is focussed,
worse, ends up in an infinite loop when the window loses focus on an auth prompt.
CCBUG: 420911
Differential Revision: https://phabricator.kde.org/D29441
Summary:
Previously, when a single item was selected and dragged, the
name would become unreadable when the text colour matched the
background colour it was dragged onto.
This is now fixed by not deselecting the item (and hence keeping
the highlighting around the text) before creating the pixmap for
dragging.
BUG: 405266
Test Plan: Tested with Breeze and Breeze Dark.
Reviewers: #dolphin, elvisangelaccio, meven
Reviewed By: #dolphin, elvisangelaccio, meven
Subscribers: meven, elvisangelaccio, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D29378
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
This method is called a billion times and spawns a blocking(!) StatJob.
KFind can search local URLs, too, so I don't see why this is necessary.
Either way, I'd rather have a non-KDE search tool broken than the app.
Ideally, I'd like this entire thing redone to use an async StatJob, if any.
Fwiw the KMoreTools in the free space bar doesn't use a local URL either.
BUG: 420911
FIXED-IN: 20.04.1
Differential Revision: https://phabricator.kde.org/D29442
Summary:
Dolphin crashes if no Konsole is installed and user clicks menu action "Defocus Terminal Panel".
This fix is pretty straight forward.
Steps to reproduce:
1. Run Dolphin without Konsole available.
2. Press F4 to open console window.
3. Click in service menu "Focus Terminal Panel".
4. Click in service menu "Defocus Terminal Panel". Observe the crash.
Test Plan:
1. Run Dolphin without Konsole available.
2. Press F4 to open console window.
3. Click in service menu "Focus Teminal Panel".
4. Click in service menu "Defocus Terminal Panel".
5. Click in service menu "Focus Terminal Panel".
6. Press F4 to close console window.
Reviewers: #dolphin, meven, elvisangelaccio, ngraham
Reviewed By: #dolphin, meven, elvisangelaccio, ngraham
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D29345
Summary:
Dolphin crashes if no Konsole is installed and user clicks menu action "Defocus Terminal Panel".
This fix is pretty straight forward.
Steps to reproduce:
1. Run Dolphin without Konsole available.
2. Press F4 to open console window.
3. Click in service menu "Focus Terminal Panel".
4. Click in service menu "Defocus Terminal Panel". Observe the crash.
Test Plan:
1. Run Dolphin without Konsole available.
2. Press F4 to open console window.
3. Click in service menu "Focus Teminal Panel".
4. Click in service menu "Defocus Terminal Panel".
5. Click in service menu "Focus Terminal Panel".
6. Press F4 to close console window.
Reviewers: #dolphin, meven, elvisangelaccio, ngraham
Reviewed By: #dolphin, meven, elvisangelaccio, ngraham
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D29345
Summary: Replace the list m_selectedUrls with a simplified list, instead of concatenating the simplified list to the current one.
Reviewers: dfaure, meven
Reviewed By: dfaure
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D29399
Summary:
Allow to compute the recursive size of directories to fill the details view size column.
A setting allow to set a limit to the recursive level, allowing the user to have some power over the setting.
When sorting by size and the feature is on, we get progressive ordering as the directory size are gathered.
KDirectoryContentsCounter uses a cache internally to keep results so that it can display directory size faster, but counts the dir size of directories each time it is asked to count the size a directory nevertheless and when the size has changed, it is updated.
KDirectoryContentsCounter uses one worker per instance only, meaning one process per view makes the disk spin.
FIXED-IN: 20.08
BUG: 190580
BUG: 158090
Test Plan:
With some recursion allowed:
{F8267580}
Without any recursion allowed (default):
{F8267581}
Reviewers: elvisangelaccio, ngraham, #dolphin
Reviewed By: elvisangelaccio, ngraham, #dolphin
Subscribers: feverfew, anthonyfieroni, iasensio, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D25335
Summary:
In general the issue with installers/uninstallers for the dolphin plugin is
that a lot of the scripts are intended to be run manually in a terminal.
For instance if a script uses `sudo make install` the user can't type in the password.
With this patch scripts that are executed without arg variants are
executed in konsole (if available).
Test Plan:
Tests still pass. Try to install the "Jetbrains Dolphin Plugin" tar.gz file from the kde store.
If you have the required dependencies etc. the konsole window should close.
If the install script fails (type in wrong admin password a couple of times) you
should have a shell opened.
Reviewers: #dolphin, ngraham, nicolasfella, elvisangelaccio, meven
Reviewed By: #dolphin, elvisangelaccio
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D29089
Summary:
You can now filter the list of installed services.
This is especially useful if you install additional service menus
from the kde store, because one instalaton can add a lot of services.
For instance the ReImage plugin.
Test Plan:
Compiles, search for a service menu.
Only services matching the query will show up.
Reviewers: ngraham, elvisangelaccio, meven
Reviewed By: meven
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D29375
Summary:
Folders previews can be long to generate.
This can be noticeable by the user.
This diff displays folder icons after a 100ms timer.
BUG: 420340
FIXED-IN: 20.08
Test Plan:
rm -r ~/.cache/thumbnails/
In dolphin open trash
Click on download (or any directory with a long to generate preview).
Reviewers: #dolphin, ngraham
Reviewed By: #dolphin, ngraham
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D29204
Summary: This commit changes VCS-plugin interface in order to provide actions for unversioned items (for example clone or checkout repository), updates to dolphin-plugins comes in the separate commit D29042.
Reviewers: #dolphin, meven, elvisangelaccio
Reviewed By: #dolphin, meven, elvisangelaccio
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D29041
DolphinSearchBox::init() can generate a terminal warning depending on
the user's search history:
QFileInfo::absolutePath: Constructed with empty filename
The warning can seem to appear randomly if you don't use the search
feature often, because of its dependency on previous search activity.
Prevent this warning by adding a simple check if the current
m_searchPath is valid or not. This check has no effect on the value
returned by DolphinSearchBox::isIndexingEnabled() and is in line with
the fact that m_searchPath == QUrl() indicates that no search path has
been set.
Differential Revision: https://phabricator.kde.org/D29194
Summary:
All modern web browsers offer a function to show tabs from last time when a browser starts, and many apps today
restore their prior state when they're launched. This patch implements thatfunctionality as an option and turns it on by default.
The settings window is accordingly adjusted to be clear about what applies when:
{F7681752}
FEATURE: 413564
FIXED-IN: 20.08.0
Depends on D25106
Depends on D25219
Test Plan:
With the new setting turned off:
- No behavioral changes at all
With the new setting turned on:
- When launched from the GUI or CLI without any URLs, dolphin restores session
- When rebooting with Dolphin open, it restores session normally after the system comes back (i.e. no behavioral change here)
- When launched with URLs, Dolphin window is opened showing those URLs instead of restoring session
- When Dolphin is already running and a new window is opened, that new window shows a single tab with the same URL as was visible in the previously-open Dolphin instance (i.e. no behavioral change here)
- "Open Containing folder" functionality in other apps works regardless of whether or not Dolphin is running
Reviewers: #dolphin, #vdg, feverfew, meven, elvisangelaccio, ndavis
Reviewed By: #dolphin, #vdg, feverfew, elvisangelaccio, ndavis
Subscribers: davidedmundson, ndavis, intika, feverfew, kfm-devel, ngraham, broulik, #dolphin
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D11382
Summary: BUG: 420512
Test Plan:
Select on hove over a video file
Type Ctrl + F
Type some test + enter
Reviewers: ngraham, #dolphin, elvisangelaccio
Reviewed By: ngraham, #dolphin
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D29158
Summary: Similar to D29158
Test Plan:
Select a video file
Type CTRL + F and some text
Hit ALt + left or previous button
Before:
The video controls are not visible for selected video file
After:
Video controls are visible again.
Reviewers: ngraham, elvisangelaccio, #dolphin
Reviewed By: ngraham, #dolphin
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D29160
Summary:
Now scripts starting with `uninstall` are being executed.
Addtionally the `runInstallerScriptOnce` method has been renamed, because it is used to run the install/uninstall scripts.
Same for `runInstallerScript`.
Depends on D28801
Test Plan: Compile, run tests. Try to uninstall a dolphin service which has a uninstall.sh script.
Reviewers: #dolphin, ngraham, nicolasfella, elvisangelaccio
Reviewed By: #dolphin, elvisangelaccio
Subscribers: cfeck, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D28836
Summary:
Make icons match the preview size.
It prevents a user that had a wide information panel,
seeing a size difference between a preview and an icon despite they can look similar (i.e folder preview).
Test Plan:
Before:
{F8248373, size=full}
After:
{F8248370, size=full}
Reviewers: #dolphin, ngraham, elvisangelaccio
Reviewed By: #dolphin, ngraham, elvisangelaccio
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D29002
Summary:
Note that we lose the F8 shortcut since the KStandardShortcut added in XXXX can only
accommodate toew default shortcuts, and I thought Ctrl+H and Alt+. were the more important
ones. Hopefully that's not too high a price to pay.
Depends on D28802
Test Plan:
- Apply D28802 to kconfig
- Apply this patch to Dolphin, compile, and launch Dolphin
- Hit Ctrl+H or Alt+. and see that hidden files are shown or hidden as approproiate
Reviewers: #dolphin, dfaure, elvisangelaccio
Reviewed By: #dolphin, elvisangelaccio
Subscribers: elvisangelaccio, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D28804
Summary: Needed after D28901 to ensure we get the UDS_RECURSIVE_SIZE out of the stat calls.
Test Plan: Trash size is visible in status bar and information panel again.
Reviewers: ngraham, dfaure, #dolphin
Reviewed By: dfaure
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D28950
Summary:
Move from the searchbox to the search results listbox/view using the
down arrow key in addition to the existing methods using the tab key,
return key, or the mouse.
Test Plan:
use ctrl+f to search in a directory tree, press down arrow key
to go to the results
Reviewers: ngraham, #dolphin
Reviewed By: ngraham, #dolphin
Subscribers: meven, elvisangelaccio, ngraham, iasensio, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D26362
Summary:
I chose CommandLauncherJob rather than ApplicationLauncherJob
because that would require either looking up org.kde.kfind.desktop
(with a risk of failure) or duplicating the icon name...
Test Plan:
commented out the if() block of the slot, to make sure we end
up launching kfind with this code. Then konqueror /, and Ctrl+F.
Reviewers: broulik
Reviewed By: broulik
Differential Revision: https://phabricator.kde.org/D28810
Summary:
This patch contains some smaller formatting/coding style changes
to avoid unrelated changes in other patches.
- Use {} instead of QStringList{} consistently
- Use parehthesese in `UncompressCommand({})` consistently
- Use `QStringList name = {}` instead of `auto name = QStringList{}`
- Add one qAsConst, remove qAsConst if value is already const
Test Plan: Compile, install and run tests
Reviewers: #dolphin, ngraham, nicolasfella
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D28801
Summary:
Displays the full path only in the window title, not in the tab title.
Screenshot for comparison: ( Dolphin on the right is without D28815 , Dolphin on left has both D28815 and this patch)
{F8240079}
Reviewers: #vdg, #dolphin, ngraham, meven
Reviewed By: #vdg, #dolphin, ngraham, meven
Subscribers: ngraham, elvisangelaccio, meven, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D28857
Summary:
When you are inside the services store and you choose to install a deb/rpm package
they open in the default application (mostlikely a package installer utility like discover).
PS: I have written some ideas/questions, maybe you can comment on them :-) ?
Test Plan:
Tests still pass, try out what was described in the summary.
A product which has a deb/rpm package is for example: `Jetbrains Dolphin Plugin`
Reviewers: #dolphin, elvisangelaccio, ngraham, aspotashev
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D28795
QCollator (especially with Qt 5.14 and ICU 65.1) is very unhappy with
threads.
To avoid having to lock and unlock the mutex everywhere (and ensure it
is unlocked before calling other things that might lock it, etc.), we do
it as locally as possible. Even if for some reason Qt and ICU make
QCollator threadsafe in the future locking here should have minimal
impact.
BUG: 419585
Differential Revision: https://phabricator.kde.org/D28659
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
Summary:
In the "no extension" case, we weren't separating out the path and the original filename,
breaking the feature for languages where the word "copy" would be at the beginning of the
filename, not after it (e.g. "copia de foo" in Spanish, and similar in other romance
languages). This patch fixes that by separating the original path and filename in the no
extension case as is done for the other case, which should solve the issue.
BUG: 419070
FIXED-IN: 20.04.0
Test Plan:
No changes in English; should fix the issue in Spanish once new translations are done
(see https://bugs.kde.org/show_bug.cgi?id=419070 for details)
Reviewers: #dolphin, elvisangelaccio, arojas, meven, pino, #localization
Reviewed By: #dolphin, elvisangelaccio
Subscribers: aacid, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D28227
Summary:
Needs to wait until we can depend on 5.65
See D25660 for context
Reviewers: #dolphin, elvisangelaccio
Reviewed By: #dolphin, elvisangelaccio
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D25665
Summary: Because we use KIO::DropJob to determine the dropAction, so changing this one does not change anything else except the default cursor from the copy icon to the closed-hand one.
Test Plan: Drag files without holding any modifier key and see the cursor.
Reviewers: #dolphin, ngraham
Reviewed By: #dolphin, ngraham
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D28370
Summary:
While dragging, the user could want to change the modifier, so we should call event->acceptProposedAction() to do update the dragCursor.
FIXED-IN: 20.04.0
Test Plan: While dragging files, change modifiers between Ctrl/Shift/Alt... and move the mouse at least 1px to see the cursor changes.
Reviewers: #dolphin, meven, ngraham, davidedmundson, elvisangelaccio
Reviewed By: #dolphin, elvisangelaccio
Subscribers: elvisangelaccio, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D28017
Summary: This should have been part of commit 405dd624fb
Test Plan: Duplicate item and make sure it gets selected.
Reviewers: ngraham
Reviewed By: ngraham
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D28084
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
Summary:
`dolphin --daemon` does not have the `/dolphin/Dolphin_1` dbus path,
because it doesn't have any DolphinMainWindow.
Instead of working around this issue (as we did in D21666 and D25510),
just exclude these processes from the list of dbus instances checked by
`Dolphin::attachToExistingInstance()`.
CCBUG: 408244
Test Plan: Same test plan as in D21666 and D25510
Reviewers: #dolphin
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D26213
Summary: Adds a Duplicate feature to Dolphin, showing up as a menu item in the File menu that appears when one or more items are selected and the directory is writable. Duplicated items receive the names of the original files with " copy" appended before the file extension, if any.
Test Plan:
{F5201386} {F5201393}
Test cases:
- Try to duplicate when nothing is selected: **PASS**: menu item is grayed out
- Try to duplicate anything on a read-only local volume: **PASS**: menu item is grayed out
- Try to duplicate anything on a read-only samba share: **PASS**: menu item is grayed out
- Duplicate single local file on R/W volume: **PASS**: item is duplicated and named correctly
- Duplicate multiple local files on R/W volume: **PASS**: 3 items are duplicated, named correctly, and selected
- Duplicate single local directory on R/W volume: **PASS**: item is duplicated and named correctly, but a rename operation is not initiated
- Duplicate multiple local directories on R/W volume: **PASS**: 3 items are duplicated, named correctly, and selected
- Duplicate single file on R/W samba share: **PASS**: item is duplicated and correctly
- Duplicate multiple files on R/W samba share: **PASS**: 3 items are duplicated, named correctly, and selected
- Duplicate single directory on R/W samba share: **PASS**: item is duplicated and named correctly
- Duplicate multiple directory on R/W samba share: **PASS**: 3 items are duplicated, named correctly, and selected
- Try to undo a successful duplication: **PASS**: operation is undone
This is my first attempt at a big change like this and I'm sure it's full of issues. I will accept any and all suggestions for improvement. :)
Reviewers: #dolphin, #kde_applications, elvisangelaccio, dfaure, broulik, davidedmundson
Subscribers: kfm-devel, meven, markg, fazevedo, cfeck, #dolphin
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D8208
Summary:
In DolphinTabWidget::openFiles it assumes openDirectories will open new tabs, so it
only marks the URL selection for the newly opened tabs. This assumption is incorrect
as Dolphin might reuse tabs when the folder is already open.
Even then, markUrlsAsSelected does nothing when the folder is already opened.
The selection seems to only be used when the folder finishes loading, calls made after
that only change a variable without updating the actual selection.
A call to DolphinView::updateViewState() is required to restore the intended behaviour, so long as DolphinView::clearSelection() has been called on the relevant tab, otherwise updateViewState() is a no-op.
BUG: 417230
FIXED-IN: 19.12.3
Test Plan:
1. In any application that has an "open containing folder" select that option
2. and then do the same for another file in the same folder
Reviewers: broulik
Reviewed By: broulik
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D27389
Summary:
BUG: 415698
FIXED-IN: 20.04
On each VCS plugin creation corresponding file name is saved (cached) so when we search which VCS plugin is appropriate for current directory we don't need to call KVersionControlPlugin::fileName() again.
Reviewers: #dolphin, meven, elvisangelaccio, ngraham
Reviewed By: #dolphin, meven, ngraham
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D26962
Summary:
I've seem various complaints from users about the fact that the {nav Create New...} menu
item in the viewport context menu is now below {nav Open With} item. All the other
changes to menus seem to have been well-received but this one has garnered criticism.
Looking through D23757 and D11884, I can't actually see that this was intentional, so
it might even be a bug.
Either way, this patch restores the old position of the {nav Create New} menu items at
the top of the Viewport context menu.
BUG: 417640
FIXED-IN: 20.04.0
Test Plan: {F8093605}
Reviewers: #vdg, #dolphin, elvisangelaccio, ndavis
Reviewed By: #vdg, ndavis
Subscribers: asturmlechner, markuss, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D27267
Summary:
Since Dolphin's default behaviour became opening in new tabs rather than in new windows
(a very positive change, in my opinion), I always find myself accidentally opening folders
in new windows from the context menu. This is because in most browsers with tab workflow
(e.g. Firefox, Chromium, Falkon) the top context menu action is opening in a new tab, and
my muscle memory plays a bad trick :) I'm aware of middle-clicking, but I find it
inconvenient with my touchpad.
I suspect I'm probably not alone in that, so I think it makes sense to swap these actions
in Dolphin to match widely used apps.
Test Plan:
Open Dolphin, right click folders in the main view and in the Places panel, ensure the
actions are indeed swapped
Reviewers: #vdg, ndavis, #dolphin, ngraham
Reviewed By: #vdg, ndavis, #dolphin, ngraham
Subscribers: ngraham, ndavis, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D27318
Summary:
Add natural sorting and case-insensitive sorting, for all role-types
that benefit from.
BUG: 406296
FIXED-IN: 19.12.2
Test Plan:
Sort by any role type specified in `isRoleValueNatural()`
Before: Sorting is always case sensitive
After: Sorting according to 'Sorting mode' in configuration.
Reviewers: #dolphin, nicolasfella, meven, elvisangelaccio, ngraham
Reviewed By: #dolphin, meven, elvisangelaccio, ngraham
Subscribers: cfeck, meven, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D25741
Summary:
Change drop indicator color form highlight to text.
This makes more visible, when indicator is adjacent to a highlight
item, of a list.
BUG: 415010
Test Plan:
Before vs After
{F7974679}
Reviewers: #dolphin, #vdg, elvisangelaccio, ngraham
Reviewed By: #dolphin, #vdg, ngraham
Subscribers: meven, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D26936
Summary:
Fixes multiple VCS plugin beginRetrival()/endRetrival()/itemVersion() calls on single directory update.
When VCS pluging finished gathering directory information VersionControlObserver::slotThreadFinished() calls KFileItemModel::setData() on each entry with appropriate item VCS information.
This in turn emits KFileItemModel::itemsChanged() which is connected with VersionControlObserver::delayedDirectoryVerification() which is starting to gather VCS directory information again.
This commits breaks the vicious circle.
BUG: 415698
FIXED-IN: 20.04.0
Reviewers: #dolphin, meven, ngraham, elvisangelaccio
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D26721
Summary:
This improves portability.
QDesktopServices uses standard mimetype base resolution to find the app to use.
BUG: 372642
FIXED-IN: 20.04
Test Plan:
* Open http://google.com, opened default web browser
* Open mms:// (on my test system opened vlc)
Reviewers: #dolphin, elvisangelaccio, ngraham
Reviewed By: #dolphin, elvisangelaccio, ngraham
Subscribers: nicolasfella, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D26732
Summary:
Tags containing blank spaces were not handled properly in the search widget.
Now we enclose them in quotes and strip the quotes before setting them to the widget.
{F7854247}
Test Plan:
No artifacts when searching tags containing spaces
Added test cases to `bin/dolphinquerytest`
Reviewers: #dolphin, elvisangelaccio, ngraham, meven
Reviewed By: #dolphin, elvisangelaccio, ngraham
Subscribers: meven, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D26369
Summary:
I originally implemented this to show "Add <current folder> to Places" to make the menu
item more clear when invoked from the file menu or the viewport context menu because I
thought it wasn't totally clear that the action would be referring to the folder for the
visible view.
However I think in retrospect that this was a mistake. No other items in the file menu
or the viewport context menu name the current folder like this, so clearly there wasn't
a problem. And then the item's text doesn't match the text for other items.
Thie patch removes that behavior and makes the name match the style of all the other menu
item text.
BUG: 416064
FIXED-IN: 20.04.0
Reviewers: #dolphin, #vdg, meven
Reviewed By: #dolphin, meven
Subscribers: elvisangelaccio, meven, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D26590
Summary:
Remove the explicit copy constructor of `KItemListStyleOption`, since it does not
add any logic to what the implicit copy constructor does, but triggers a compiler
warning if we don't overload `operator=` too.
Test Plan:
Compiles without `-Wdeprecated-copy` warning
No behavior changes
Reviewers: elvisangelaccio, #dolphin
Reviewed By: elvisangelaccio, #dolphin
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D26585
Summary: KDirWatch only works correctly with canonical paths, i.e. symbolic links resolved.
Test Plan:
1. Create dirs:
$ mkdir test1
$ mkdir test1/subdir
$ ln -s test1 test2
2. Start dolphin, navigate to test2/subdir, then in terminal:
$ echo test > test2/subdir/test
Without the patch, test2/subdir/test won't be shown automatically, only after reload (F5).
With the patch applied, test2/subdir/test will be shown automatically.
3. Restart dolphin, navigate to test2/subdir, then in terminal:
$ echo test >> test2/subdir/test
Without the patch, the increased size of test2/subdir/test won't be shown automatically,
only after reload (F5). With the patch applied, it will be shown automatically.
4. Restart dolphin, navigate to test2/subdir, then in terminal:
$ rm test2/subdir/test
Without the patch, test2/subdir/test stays visible, will only disappear after reload (F5).
With the patch applied, it will disappear automatically.
Reviewers: dfaure, #dolphin, elvisangelaccio
Reviewed By: dfaure, #dolphin, elvisangelaccio
Subscribers: ngraham, elvisangelaccio, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D25732
Summary:
Instantly hide tooltip shown over an element when filter bar changes.
Currently the tooltip stays even when filtering causes the file under the mouse to change or disappears entirely.
The tooltip also continues to cover much of the window - hiding the new filtering results from user.
This is an enhancement to D22512
Test Plan:
1. place the mouse pointer over a file to show the tooltip
2. press "/" to activate filter bar
3. type in filter phrase
Reviewers: #dolphin, elvisangelaccio, ngraham
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D26576
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
Summary:
Keeps the `Tags` menu open while selecting and deselecting tags in the
search panel, saving many mouse clicks for multiple tags.
It cannot be done natively on `QMenu` (https://bugreports.qt.io/browse/QTBUG-6635)
but it is a one-liner and I haven't seen any bad behavior so far.
Test Plan:
{F7853717}
- `Tags` menu does not close when selecting/deselecting tags
- Tag search is consistent
- Clicking anywhere else will close the menu
Reviewers: #dolphin, elvisangelaccio, ngraham, #vdg
Reviewed By: #dolphin, elvisangelaccio, #vdg
Subscribers: #vdg, broulik, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D26343
Summary:
Small refactor patch to clean-up some logic on setter and getter:
- Search terms are previously splitted and set separately, so no need
for extra splitting and `foreach` loop
- Return search terms on a `QStringList` rather than join first
Depends on: D26029
Test Plan: No behavior changes
Reviewers: #dolphin, elvisangelaccio
Reviewed By: #dolphin, elvisangelaccio
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D26150
Summary:
Small refactor patch to rename method names, from `ratingTerm` to `searchTerm`,
since its scope has grown bigger.
Test Plan: No behavior changes
Reviewers: #dolphin, elvisangelaccio
Reviewed By: #dolphin, elvisangelaccio
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D26029
Summary:
Dolphin currently scrolls by the height of three items at a time per "step" when
using a scroll wheel. Because item height is highly variable, this leads to scroll
speed being inconsistent between views, and generally far too fast when using
icon view with icons larger than 22px size.
This patch makes the size of the scroll step based on the text label rather than the
icon size just like D25683, ensuring that the scroll speed does not vary and become
super fast when using large icons in particular.
It also reverts 90beb4a5e3, which is no longer needed.
BUG: 386379
FIXED-IN: 19.12.1
Test Plan:
Use a mouse with a scroll wheel and scroll in Dolphin item views with list view,
details view, icon view, etc, using different item sizes. Speed should be
consistent in all views now, and also feel consistent with other KDE apps.
Also try with multiple scale factors to make sure the behavior does not change.
No change with high-resolution two-finger touchpad scrolling.
Reviewers: #dolphin, elvisangelaccio
Reviewed By: #dolphin, elvisangelaccio
Subscribers: ahiemstra, lots0logs, anthonyfieroni, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D19190
Summary:
Currently, the search url parsing does not detect if the search is based on Content or Filename, and it just keeps the last selection which can be inconsistent with the actual search.
This patch add such detection, and since an advanced user can combine filename and content search (using the keyword `filename:`), now the parsing detects both items and handles the four possible cases:
| Content | Filename | Search text | Search type |
|---|---|------------------------|------------------|
| T | T | abc filename:"xyz" | Content |
| T | F | abc | Content |
| F | T | xyz | Filename |
| F | F | | do not set |
Depends on: D25260
Test Plan: `bin/dolphinquerytest`: Added new test cases for searches with content text and/or filename
Reviewers: elvisangelaccio, bruns, #dolphin
Reviewed By: elvisangelaccio, #dolphin
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D25416
Summary:
Adds a tag selector in the extended filters of the search box.
Selected tag or tags are added to the search query along with the other filters (type, date, rating).
FEATURE: 412564
CCBUG: 356062
Test Plan:
- Menu shows the user tags
- Picking any tag/s filters the search to that specific tag/s
{F7727909}
Reviewers: elvisangelaccio, ngraham, #dolphin, #vdg
Reviewed By: elvisangelaccio, ngraham, #dolphin, #vdg
Subscribers: kfm-devel
Tags: #dolphin
Maniphest Tasks: T9094
Differential Revision: https://phabricator.kde.org/D25130
Summary:
Generally "Properties" refers to information about a selected file. However Dolphin also
uses the word "Properties" in the phrase "View Properties", which refers to the display
style of the view. Since "properties" is a fairly esoteric and technical term to most
users, it would probably be wise to avoid using it in multiple contexts.
Accordingly, this patch changes "view properties" to "view display style".
Test Plan: Look at the settings window, hamburger menu, view menu, and docbook
Reviewers: #vdg, #dolphin, ndavis, elvisangelaccio
Reviewed By: #vdg, #dolphin, ndavis, elvisangelaccio
Subscribers: ndavis, kfm-devel, kde-doc-english
Tags: #dolphin, #documentation
Differential Revision: https://phabricator.kde.org/D25987
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:
Fix the parsing of Baloo query `searchString` to represent its parameters properly
in the search box:
# Baloo terms (`rating`, `modified`) are added to the user search text: {F7575590}
# Extra quotes are added to the search text: https://bugs.kde.org/show_bug.cgi?id=412952
This revision supersedes D24422, by making the fixes on the new dolphin query model,
instead of directly on the UI.
BUG: 412952
FIXED IN: 19.11.90
Test Plan:
- `bin/dolphinquerytest` passes without `XFAIL`s
- Dolphin search box is not garbled by search terms or quotes
Reviewers: elvisangelaccio, bruns, ngraham, #dolphin
Reviewed By: elvisangelaccio
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D25260
Summary:
QtDBus caches known interfaces when passing a non-empty interface name
to the QDbusInterface constructor. This is an issue when calling the
FileManager1 methods more than once, because `preferred` could be a
valid interface from the cache, but it would later fail to call the
`openFiles`/`openDirectories` methods on the main window.
By passing an empty interface name, we prevent QtDBus from using the
cache so that we always get an invalid interface when calling the
FileManager1 methods on a daemonized dolphin process (that doesn't have
the Dolphin_1 dbus object).
BUG: 414402
FIXED-IN: 19.12.0
Test Plan:
1. dolphin --daemon
2. qdbus org.freedesktop.FileManager1 /org/freedesktop/FileManager1 ShowFolders "/tmp" ""
3. Close the dolphin window that was just opened.
4. Start a normal dolphin process
5. qdbus org.freedesktop.FileManager1 /org/freedesktop/FileManager1 ShowFolders "/tmp" ""
6. Close again the dolphin window
7. qdbus org.freedesktop.FileManager1 /org/freedesktop/FileManager1 ShowFolders "/tmp" ""
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D25510
Summary: The code appears to do nothing.
Test Plan: builds, bookmarkmenu still works
Reviewers: #dolphin, meven, elvisangelaccio
Reviewed By: #dolphin, meven, elvisangelaccio
Subscribers: meven, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D25347
9cd042a86c removed the text from the Control button without setting an
accessibleName property, which is a regression for screen-reader users.
This breaks the 19.12 string freeze, but since it's the same string we
were translating before 9cd042a86c, hopefully it's not going to be too
much of a burden for translators.
CCBUG: 414271
CCMAIL: kde-i18n-doc@kde.org
Summary:
This makes Dolphin use the "Dropdown List & Automatic" completion mode by default when editing the URL bar.
Given the context of someone typing file paths, I can't see why one wouldn't want to use this feature, unless they don't like how it looks.
Reviewers: #vdg, #dolphin, ngraham, elvisangelaccio
Reviewed By: #vdg, #dolphin, ngraham, elvisangelaccio
Subscribers: ngraham, elvisangelaccio, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D25391
Summary:
Adds a new test unit for the model which parses baloo search URLs
14/19 tests are set to `XFAIL` on current implementation, as they will be fixed in a final revision.
Supersedes D25135.
Depends on: D25257
Test Plan: `bin/dolphinquerytest`
Reviewers: elvisangelaccio, bruns, #dolphin
Reviewed By: elvisangelaccio, bruns, #dolphin
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D25258
Summary:
This small patch allows to set and empty `type` to the extended options, which will set the `Any Type` option (index 0).
It doesn't make any change in current code, since this case is not called, but it helps simplifying follow-up patches.
Test Plan:
No behavior changes with current code.
Calling `setFacetsType(QString())` actually sets the first option (`Any Type`)
Reviewers: elvisangelaccio, #dolphin
Reviewed By: elvisangelaccio, #dolphin
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D25255
DOLPHIN_EXPORT is only used by classes in the `dolphinprivate` target,
while DolphinQuery is part of `dolphinstatic`.
This should fix the failing Windows build on the CI.
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
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
Summary:
KFileItemListWidgetInformant::roleText expected imageDateTime value to be a QDateTime but KBalooRolesProvider formatted it to QString previously, preventing KFileItemListWidgetInformant::roleText to format properly the imageDateTime
BUG: 411173
Reviewers: #dolphin, ngraham, elvisangelaccio
Reviewed By: #dolphin, ngraham
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D25242
Summary: CCBUG: 392882
Test Plan:
1. Create a file
2. Remove it, so that it goes to the trash
3. Open trash
4. Empty trash
Before:
Information panel icon is still user-trash-full
After:
Information panel icon is changed to user-trash
Reviewers: ngraham, #dolphin, elvisangelaccio
Reviewed By: ngraham, #dolphin, elvisangelaccio
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D23668
Summary:
The text, icon and url properties are already set in
`PlacesItem::setBookmark()`, so there is no need to set them here.
The `OnlyInApp` property is part of the KBookmark object that we are
going to set to the place item, so there is no need to set it here either.
Test Plan:
- Open both dolphin and the Plasma file dialog in some app
- Edit the text, url, icon and the "Only show when using this application" checkbox in some place item from the file dialog
- Check whether the place in dolphin keeps getting updated accordingly
Reviewers: #dolphin, meven, ngraham
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D25230
This list of URLs is only used by cleanupBookmarks(), so there is no
need to make it global (which is what clazy complains about).
While at it, make it also a `const QVector`.
Summary:
Currently when hovering over a file we have its name, mimetype type and size display in the status bar for 1 second, after which the status of the folder is displayed.
This patch removes this timer making the status bar behavior more predictable and user friendly.
Instead there is a 50ms delay between when the status bar gets new text to display (for instance mouse hovering or keyboard navigation) and when the status bar displayed text is updated. This is to avoid flickering.
FIXED-IN: 19.12
BUG: 399267
Reviewers: #dolphin, elvisangelaccio, ngraham
Reviewed By: #dolphin, elvisangelaccio, ngraham
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D25218
Summary:
Reduce the spacing between widgets and remove the content margins on the extended search options to have a more compact and space-saving layout.
Currently, some widgets are not even aligned.
This will be even more important if we remove the toggle button for 'More Options'.
CCBUG: 386754
Test Plan:
BEFORE: {F7681182}
AFTER: {F7681184}
Reviewers: elvisangelaccio, ngraham, #dolphin, #vdg
Reviewed By: elvisangelaccio, ngraham, #dolphin, #vdg
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D25028
Summary:
With the new compact search filters (type/date/rating) it makes sense to show these options whenever available, and save some horizontal space on the main bar (specially for verbose languages).
These options will be hidden nevertheless if the search is non-indexed or Baloo is disabled.
For some nicer aesthetics D25029 should be also applied.
CCBUG: 386754
Test Plan:
Current: {F7681182}
After: {F7687380}
Along with D25029: {F7687385}
Reviewers: elvisangelaccio, ngraham, #dolphin, #vdg
Reviewed By: ngraham, #vdg
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D25057
Summary:
Replace the arrays of radiobuttons in dolphin search box to more simple dropdown boxes.
This provides a leaner look, saving a lot user space on the main view and it is more consistent with the 'Search tools' in the most known sites (Google, DuckDuckGo, etc.)
There is room for improvement, as `QComboBox` doesn't match perfectly with the tool buttons used avobe, but I think it is an improvement over the current situation.
BEFORE:
{F7581883}
AFTER:
{F7580952}
Test Plan: Same behavior with different aesthetics
Reviewers: elvisangelaccio, #dolphin, #vdg
Subscribers: ndavis, ngraham, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D24602
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
Summary:
BUG: 411538
FIXED-IN: 19.12
Test Plan:
Open a directory with 3 files starting with the same letter.
1. Press this letter key twice
2. The second file is selected
3. Deselect the file with the mouse or using Esc
4. Wait 1 second
5. Press the same key again
Before:
The third file gets selected
After:
The first file get selected
ctest
Reviewers: #dolphin, elvisangelaccio, ngraham
Reviewed By: #dolphin, elvisangelaccio, ngraham
Subscribers: ngraham, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D23716
Summary:
Now that there are actions for switching to a specific tab with default
Alt + <number> shortcuts, automatically assigned keyboard accelerators
can result in ambiguous shortcuts when using specific tab names
containing numbers.
Not adding any accelerators for the tabs widget ensures the default
shortcuts work reliably regardless of tab names.
Test Plan:
- Verify there are no ambiguous shortcuts when browsing folders with
names containing only numbers
- Verify other keyboard accelerators still work (menu bar, context menu
and others)
Reviewers: #vdg, #dolphin, ngraham
Reviewed By: #vdg, ngraham
Subscribers: ngraham, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D24794
Summary:
In KItemListController::slotChangeCurrentItem searchFromNextItem use was bugged :
The two branches of `if (searchFromNextItem)` both looked for the next keyboard with indexForKeyboardSearch(text, currentIndex (the first one with just a +1 modulo).
But when searchFromNextItem is false, we are supposed to start to look for the next indexKeyboard from the start of the list `0`, not from the `currentIndex`
Reviewers: elvisangelaccio, #dolphin
Reviewed By: elvisangelaccio, #dolphin
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D24505
Summary:
Fix a bug where "Add to Places" doesn't get re-enabled in the context
and file menus when nothing is selected after previously selecting a
single file that is not a directory or multiple files.
Test Plan: Verify the action remains enabled when appropiate
Reviewers: #dolphin, elvisangelaccio, meven
Reviewed By: meven
Subscribers: meven, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D24690
Summary:
Adds a method to reset the options in `facetsWidget` in two cases: when disabled and before parsing a new search URL.
Otherwise, controls for a parameter (ex. `rating`) which are not found in the new URL would stay on the old positions, instead of the default "any".
See D24422
Test Plan: Controls on `facetsWidget` go back to the default in such two cases.
Reviewers: #dolphin, elvisangelaccio, meven, ngraham
Reviewed By: ngraham
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D24450
Summary:
Fix the search box forgetting the location where the user was previously searching into.
To do a search on "All Files" instead of setting the `m_searchPath` to `$HOME`, it checks the button state, so the "From Here" location is not lost.
As an added benefit, selecting "Your Files" when in a non-indexed folder will use the baloo search instead of a fully non-indexed search from $HOME.
This issue is the last remaining one of the series started with D24422, with the purpose of fixing the searchbox parsing and update.
Test Plan:
- Toggle between "From Here/Your Files" and navigate between locations
- The search box remembers the location and keeps a coherent state
{F7575402}
Reviewers: #dolphin, elvisangelaccio
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D24577
Summary:
Hide the search extra options when they are not available, because the current location is not indexed or Baloo is not enabled.
The button is disabled and shows a tooltip to provide feedback of why it's not available.
Depends on D24478
{F7531893}
CCBUG: 396898
FEATURE: 318580
FEATURE: 408680
FIXED-IN: 19.11.80
Test Plan:
- `Ctrl-F` on a non-indexed location
- `balooctl disable` and `Ctrl-F` on an indexed location
On both cases the extra options are not shown, the button is disabled and the reason is shown in the tooltip
The user selection is remembered between indexed locations.
Reviewers: #dolphin, elvisangelaccio, meven, ngraham
Reviewed By: meven
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D24446
Summary:
Add actions to switch to each of the first 9 tabs and another action to
switch to the last tab.
This feature makes it much easier to quickly switch between tabs just
like you normally would be able to when using a web browser or other
applications.
Reviewers: #vdg, #dolphin, ngraham, elvisangelaccio
Reviewed By: #vdg, #dolphin, ngraham
Subscribers: meven, ngraham, elvisangelaccio, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D24353
Summary: Extracts the logic for checking if the current path is indexed to its own method.
Test Plan: No behavior changes
Reviewers: elvisangelaccio, ngraham, meven
Reviewed By: ngraham, meven
Subscribers: meven, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D24478
Summary:
Check in `setSearchPath()` if the `url` passed is already the `searchPath`
This was causing an effect where reloading the same search URL results on buttons `From Here/Everywhere` toggling.
See D24422
Test Plan:
On your home folder press `Ctrl-F` several times
Buttons `From Here/Everywhere` should now not toggle each time
Reviewers: #dolphin, elvisangelaccio, meven, ngraham
Reviewed By: #dolphin, ngraham
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D24449
Summary: Widget objects are initialized in `DolphinSearchBox::init()`, which is called on `QEvent::Polish`, so we must set it visible before calling `fromSearchUrl`.
Test Plan: `dolphin --new-window baloosearch://`
Reviewers: #dolphin, elvisangelaccio
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D24432
Summary:
Adapt tests corresponding to changes in D7446
The placesitemmodeltest were not run due to KIO_VERSION not existing
Test Plan: LANG="en" ctest
Reviewers: #dolphin, elvisangelaccio
Reviewed By: #dolphin, elvisangelaccio
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D23557
Summary:
In D24369 I introduced a regression: Where now the searchbox is updated on url changes for search urls, it is not updated anymore for regular folders. The effect is that not-indexed folders can have the extra options enabled or vice-versa. This patch fixes it, moving back the updating logic to `setSearchModeEnable`.
Test Plan: - Searchbox updates properly when changing between search urls and regular folders, either indexed or nor-indexed.
Reviewers: #dolphin, elvisangelaccio
Subscribers: kfm-devel, elvisangelaccio
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D24376
Summary:
In D24369 I introduced a regression: Where now the searchbox is updated on url changes for search urls, it is not updated anymore for regular folders. The effect is that not-indexed folders can have the extra options enabled or vice-versa. This patch fixes it, moving back the updating logic to `setSearchModeEnable`.
Test Plan: - Searchbox updates properly when changing between search urls and regular folders, either indexed or nor-indexed.
Reviewers: #dolphin, elvisangelaccio
Subscribers: kfm-devel, elvisangelaccio
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D24376
Summary:
The commit eec49bc38f cased a warning to
be emitted when starting Dolphin:
KXMLGUIFactoryPrivate::saveDefaultActionProperties(): Shortcut for action "go_forward" "&Forward" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.
The fix is to call
actionCollection()->setDefaultShortcuts(m_forwardAction, m_forwardAction->shortcuts());
so that the default shortcuts are setup.
Reviewers: elvisangelaccio
Reviewed By: elvisangelaccio
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D24342
Summary:
Searchbar options (text and options) were only updated when toggling the search on, $
Main use case is when changing between stored search urls in Places panel.
Test Plan:
- Store two search urls in Places panel
- Navigate between them
- The searchbar text and parameters change accordingly
BEFORE:
{F7500811}
AFTER:
{F7500813}
Reviewers: #dolphin, elvisangelaccio
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D24369
Summary:
Right now the script execution setting is a checkbox, capable only of handling boolean
input. This is not appropriate because there are actually three options available.
Accordingly, this patch replaces the checkbox with a combobox (to save space compared
to radio buttons) that clearly exposes all three options.
BUG: 371837
FIXED-IN: 19.12.0
Test Plan:
{F7440559}
- All three options do what they say they'll do
- All options get saved properly
- The combobox displays the correct option when the window is loaded
- The {nav Defaults} button resets it to "always ask" as expected
Reviewers: elvisangelaccio, #dolphin, #vdg
Reviewed By: elvisangelaccio, #dolphin
Subscribers: kfm-devel
Tags: #dolphin
Maniphest Tasks: T9932
Differential Revision: https://phabricator.kde.org/D24247
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:
Adds the capability to view animated images on the preview in the information panel.
This was a request from a user back in 2009 (https://bugs.kde.org/show_bug.cgi?id=182257), but I think nowadays with stickers/memes and what not, it's even more useful.
It keeps the size default transition of the preview viewer before starting the animation, so that the visual integration is smoother.
{F7289110}
FEATURE: 182257
FIXED-IN: 19.11.80
Test Plan: Open the information panel and hover over some animated images (gif/webp/mng)
Reviewers: #dolphin, #vdg, ngraham, elvisangelaccio
Reviewed By: #vdg, ngraham
Subscribers: pino, fuksitter, meven, broulik, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D23538
I noticed that depending on the configured icon size it would spend a significant amount of time in KPixmapModifier::scale.
I don't see a point in requesting a fixed icon size and then scale it down manually as opposed to having the KIconLoader do the scaling for us.
Especially for SVGs it could then even serve us a properly rendered SVG for this size rather than a scaled down pixmap version.
Differential Revision: https://phabricator.kde.org/D22116
Summary:
BUG: 389135
FIXED-IN: 19.11.80
Currently dolphin shows a folder's name instead of a "place" name if the current path has trailing slash and place's name doesn't, or vice versa.
This patch fixes this behavior, so that dolphin always shows a "place" name.
The QUrl::FullyEncoded string conversion is required because that's how
the places model stores the places URLs in the XML bookmarks file.
Test Plan:
Test configuration: https://imgur.com/a/U4zBp8c
Before (wrong window titles are in red): https://imgur.com/a/dB4xRwo
After (all window titles are correct): https://imgur.com/a/W7virBn
Reviewers: #dolphin, elvisangelaccio
Subscribers: elvisangelaccio, ngraham, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D23706
Summary:
Dolphin's hamburger and context menus have grown organically over time,
becoming a bit messy and somewhat visually overwhelming. This makes them
harder to parse and more intimidating to use.
This patch cleans up the hamburger menu and viewport and single-folder context
menus to group items more logically, and remove items that aren't actually relevant
to the context.
The hamburger menu part of the patch is fairly significant, and draws from the
principle of only showing actions with a global scope that are not already accessible
from another visible method (e.g. via the default toolbar). In the end, it manages to be
shorter than the current hamburger menu with expose actions that are more relevant.
A visible method to display context-specific actions should be explored separately
(see https://bugs.kde.org/show_bug.cgi?id=411500).
Depends on D23945
Test Plan:
Before, hamburger menu: {F7334178}
After, hamburger menu: {F7350958}
Before, viewport: {F7324802}
After, viewport: {F7330109}
Before, one folder selected: {F7324798}
After, one folder selected: {F7341163}
No change for the context menus shown when selecting a single item, multiple items, or multiple folders
Reviewers: #vdg, #dolphin, meven, elvisangelaccio, GB_2
Reviewed By: #vdg, #dolphin, meven, elvisangelaccio, GB_2
Subscribers: GB_2, mmustac, elvisangelaccio, meven, ndavis, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D23757
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