As an unintended side-effect of d9a18b04ea
items would no longer be selected in icon view mode when the selection
rectangle intersected with the item's icon. This commit fixes this.
The status bar context menu was hard-coded to always appear at the
cursor position. However, context menus can also be triggered by
keyboard, for example with the Menu key, in which case it makes no
sense to show the context menu at whatever random position the
mouse cursor currently is.
Instead invoke the context menu in the middle of the status bar
when it is opened by keyboard.
An item, on being scrolled to, is always located at the nearest edge of
the view. This is not always convenient. Allow specifying where the item
should be positioned with respect to the view in scrollToItem().
BUG: 423884
Since https://commits.kde.org/kconfig/782e43f8076e5f4a10111a6b4d2cc6b1741c9798
Ctrl+Shift+N is the standard shortcut for creating a new folder
which leads to a shortcut conflict when this key combination is
invoked in Dolphin.
"New Tab" already has the more popular shortcut Ctrl+T assigned to
it, so Ctrl+Shift+N can simply be removed.
The signal writeStateChanged() was not working because it is not connected
to slotWriteStateChanged() slots when the active view changes. Replace the
signal with direct calls to the slots.
Also, do not delay openRequest signal in DolphinSearchBox::slotSearchTextChanged.
It's no longer required.
BUG: 440366
This is to make sure that all items that can be tabbed to and their
accessible children have the main window somewhere in their
ancestry/ancestor tree.
Before this commit, KItemListViewAccessible would always return
nullptr as its parent. This meant that accessibility software would
have to guess to which window/hierarchy the KItemListView belongs
to. Guessing shouldn't be necessary here.
This commit makes sure that the KItemListView always returns a
sensible parent in the accessible hierarchy. It does so by
explicitly setting the accessible parent for every KItemListView
after construction in the DolphinView contructor. Since
KItemListView now always knows about its accessible parent, the
accessibleInterfaceFactory can always ask the KItemListView for
that information when constructing the QAccessibleInterfaces.
Fixes https://invent.kde.org/system/dolphin/-/issues/47.
The search box was being automatically closed whenever the URL is changed.
Keep the search box open if no search text had been entered when the URL
was changed.
BUG: 474951
This is now not needed anymore since `PlacesItemModel::cleanupBookmarks` (now removed) from https://phabricator.kde.org/D9333 has run for on users systems.
Otherwise, when QObject cleanup, which runs after our destructor,
destroys the terminalPart, it would call back into us
when we're already half-destroyed.
This trips an assert in Qt "Called object is not of the correct
type (class destructor may have already run)"
This action is shown only if a single folder is selected. The action
opens the selected folder in the inactive split view (and opens the
split view if necessary).
FEATURE: 465500
When view modes are changed, the scrollbars are not reset. This can
cause the scroll area to be moved out of view after changing the view
mode, making the view unusable. This commit resets the scrollbars.
BUG: 393152
Commits d3839617 and 3bf471e0 introduced a few changes to requiredWidth calculation.
This commit makes the calculation of requiredWidth consistent across KItemListView.
Currently, the URL navigator is not updated when the search box is cleared. This MR restores the URL, by closing and reopening the box.
The call for emitting closeRequest() on pressing Esc has been replaced with emitCloseRequest(). The wait duration before starting a search has been reduced to 500ms to increase responsiveness.
Also, the bugfix for BUG: 423328 is slightly incorrect and causes the search term to not be displayed when opening a saved search for the first time. As a better solution for this bug, DolphinSearchBox::setText() now updates the text only if the text has changed.
BUG: 473775
The KCoreDirLister object is modified before KCoreDirListerCache::deleteDir()
returns because the signal currentDirectoryRemoved() is emitted.
This prevents removal of the deleted lister from dirData.listersCurrentlyHolding
in KCoreDirListerCache::forgetDirs() when the tab is closed, which causes the
crash described in the bug. Hence, the signal currentDirectoryRemoved()
is delayed to ensure this does not occur.
BUG: 473377
Regressed in 489b56b68b
Simplify implementation by sharing making class ViewSettingsPage implement SettingsPageBase sharing implementation with other tabs in viewsettingspage
Documentation for `QGraphicsWidget::palette` says:
> When a widget's palette changes, it resolves its entries against its
> parent widget, or if it doesn't have a parent widget, it resolves against the scene.
So I don't see why we would need to do that ourselves.
More importantly, though, it seems in Qt 6 the palette isn't updated in time,
so when changing color schemes, Dolphin picks the old color instead of the new one,
leading to illegible font when e.g. switching between Breeze Light and Dark.
It includes a move of the settings in the Navigation and Startup sections to the Interface (formerly Behavior) section.
It also includes a new tab in the View (formerly View Mode) section, called General where some settings regarding Display style, Browsing and Miscellaneous settings
The Interface section has new tabs named Folders & Tabs and Status & Location bars respectively where most of the Startup and Navigation settings moved.
The `dolphin/kcms/kcm_dolphinnavigation` kcm is removed.
There is no limit to the width of tabs with the tab bar of the main window. If the directory name is too long, tabs can take up a lot of space and can lead to inconsistent tab widths.
To alleviate this, set a maximum tab bar text width of 40 characters for each folder.
BUG: 420870
musl does not support fts. There is however a standalone package that
can be used, but it must be linked against. This commit adds a check
that makes sure to link to the external library if it is required.
Ctrl + scroll wheel zoom was not working as designed after Dolphin is launched. Initialize m_controlWheelAccumulatedDelta in DolphinView's constructor.
BUG: 469354
QT_MAJOR_VERSION is undefined, the proper thing is QT_VERSION_MAJOR
This causes the plugin query to not find any plugins
Since we only target KF6 we might as well hardcode that
* speeds up incremental builds as changes to a header will not always
need the full mocs_compilation.cpp for all the target's headers rebuild,
while having a moc file sourced into a source file only adds minor
extra costs, due to small own code and the used headers usually
already covered by the source file, being for the same class/struct
* seems to not slow down clean builds, due to empty mocs_compilation.cpp
resulting in those quickly processed, while the minor extra cost of the
sourced moc files does not outweigh that in summary.
Measured times actually improved by some percent points.
(ideally CMake would just skip empty mocs_compilation.cpp & its object
file one day)
* enables compiler to see all methods of a class in same compilation unit
to do some sanity checks
* potentially more inlining in general, due to more in the compilation unit
* allows to keep using more forward declarations in the header, as with the
moc code being sourced into the cpp file there definitions can be ensured
and often are already for the needs of the normal class methods
When a user exits selection mode for example by clicking the "Exit
Selection Mode" button, the bar is closed but the focus doesn't return
to the view which would be expected. This commit actively moves the
focus to the view in such a scenario.
BUG: 469621
Two user visible changes:
* we can see the dir size changing as it is updated.
* This makes the file counting a lot more reactive, when changing directories for instance.
`KDirectoryContentsCounterWorker::walkDir` is not recursive anymore.
The cache is now shared and only a single thread is used to count size recursively.
This commit is the result of a three-way diff that
combines my own initial patch with related changes from
Felix Ernst's MR !545 and further suggestions by Méven Car.
Fixes DolphinMainWindowTest::testNewFileMenuEnabled().
Tests are now passing again for my build.
"Create New" was broken by commit c64059bd which switched to the
new, non-deprecated KNewFileMenu constructor (kio commit 89bc6bad)
that doesn't add itself to the passed KActionCollection parameter.
After the switch, hamburger menu and context menu was still working
as intended but the menu bar was missing the "Create New" menu.
This commit adds the addAction("new_menu") call to the File menu
setup that would have previously been called by the deprecated
KNewFileMenu constructor. The corresponding test can now find
the QObject for the menu's named action again, verifying its
existence and enabled-ness like it did before.
The DolphinNewFileMenu constructor's unused actionCollection
parameter serves no use anymore except to confuse people.
We replace it with a single QAction* parameter, createDirAction,
which gets passed to setNewFolderShortcutAction().
2 out of 3 constructor call sites have access to this action,
while the remaining call site in dolphinmainwindow.cpp must wait
until after it has been initialized by DolphinViewActionHandler.
In this case, setNewFolderShortcutAction() is still called manually
at a later time.