| Age | Commit message (Collapse) | Author |
|
This MR adds options to keep tab bar always visible and to remove the close button from tabs.
MR !269 cannot be reopened because the branch it is based on is no longer accessible. Per @meven direction, I am opening this new MR.
Note: Defaults to current defaults.
{width=734 height=597}
{width=762 height=580}
Criticisms of previous MR:
* Options should take effect immediately when users apply new settings, rather than requiring restart.
* Done.
* Concern about potential maintenance burden.
* I've been maintaining some version of this patch for ~4-5 years, available via [aur/dolphin-tabopts](https://aur.archlinux.org/packages/dolphin-tabopts) and Chaotic AUR. During that time, only two major rebases were needed. First was what appeared to be automated linting and reformatting. Second was when the preferences system was reorganized.
Had the patch been integrated in the code base prior to those refactors, the first would have required zero maintainer intervention (assuming automated reformatting). The second would have required minimal effort beyond what was needed for the refactor itself.
Every defect I've noticed during that time were also present in the unpatched package.
* There is no demand or desire for this feature.
* Equivalent settings are available in various apps across operating systems and desktop environments, including several KDE apps, such as akregator, kate, konsole (confirmed in 25.12.1).
* The first merge request in this repo !1 was to implement always showing the tab bar.
* Some users have found, created an account, and commented at the previous MR to ask that it be reconsidered.
* Arch opt-in pkgstats shows non-zero count for aur/dolphin-tabopts since early 2023. Max 15 in early 2025. Current 5.
* Chaotic AUR download metrics is 41 (rolling 30-day count).
* Unproductive "discussion" not worth further comment.
|
|
Use loop index 'i' instead of function parameter 'index' for setTabToolTip.
Previously all tooltips would be set on the newly inserted tab instead of
their respective tabs.
|
|
When last viewed tab was in split mode, closing current tab did not activate it properly. In that case focus was lost and there was no possibility to get it again even on mouse click.
|
|
|
|
BUG: 508864
|
|
This commit fixes a segfault accidentally introduced in a previous
commit.
|
|
When a session is being restored, DolphinTabPage::setSplitViewEnabled()
is called for each tab. That function assumes the tab page's
m_navigatorsWidget is a valid pointer, which is true only for an active
tab. That causes a segmentation fault when Dolphin is launched from the
command line with more than two URLs and the --split flag.
This commit fixes this bug by connecting the
DolphinNavigatorsWidgetAction to each tab page before calling
restoreState() in DolphinTabWidget::readProperties().
BUG: 462046
|
|
co-authored by: Felix Ernst
|
|
|
|
|
|
|
|
BUG: 197009
|
|
BUG: 197009
|
|
**Open Path**
When user clicks on "Open Path" after searching for an item,
user expects the view to show the item immediately.
We wait for the KItemListSmoothScroller to be done with its animation before the
scrollbar sizes are being changed.
**Open Path in New Tab**
When user selects "Open Path in New Tab", we open a new tab to the folder where the file is, then select and set the file current. We need to get the correct tab when opening one, so it has been added as a return value.
BUG:495613
|
|
This commit brings the main view of Dolphin into a usable state
accessibility-wise. Users of screen readers should have a way better
experience while browsing files and folders and navigating along the
file system hierarchy.
This commit fixes most of the remaining already-identified
accessibility issues listed in
https://invent.kde.org/teams/accessibility/collaboration/-/issues/28,
but not all. Namely, these should now be fixed:
1. Orca should read the element type in dolphin (file, folder, device,
link to folder, link to file)
2. Orca should read complete label in icon and compact view mode,
currently it only speaks the name, but there could be additional
information like the number of elements or the file size.
3. Orca is not able to announce Selecting / Unselecting files in
Dolphin. It also never announces how many items are selected in total.
(Announcing the total selection can be done by reading out the view
element or by pressing the Tab key to get to the status bar with the
relevant information.)
4. Dolphin opens on the home directory, but Orca doesn't tell you so.
Consider enclosing the area in a frame/panel which updates its
accessible name each time you modify the current path by entering or
leaving a directory.
5. I don't know what the folder presentation widget is, but it should
be presented as a grid view. Currently, we have a terrible experience
because the entire row of folders is read at once, with no indication
that we can move left and right with the arrows to go between the
elements of a row. When I found that out, however, I discovered that
when you're on the last icon of the first row and press right arrow,
you get to the first icon of the next row, but that's not announced,
instead, the whole row is announced at once
6. Orca should announce the current elements instead of "layered pane"
when the Folder / File view gets the focus in dolphin
7. Orca reads only name in Table View only of Dolphin
8. Items are sometimes confusingly announced as "collapsed" in contexts
in which there is no concept of collapsing/expanding e.g. in icon view
mode.
A lot of code was moved around and renamed. The three accessibility
classes, which all used to be in the same file, are moved into separate
files.
*Acknowledgement*
Thanks to Christian Hempfling and bgt lover for testing as well as
originally identifying a lot of the pain points being addressed here.
This work is part of a my project funded through the NGI0 Entrust Fund,
a fund established by NLnet with financial support from the European
Commission's Next Generation Internet programme, under the aegis of DG
Communications Networks, Content and Technology.
https://kde.org/announcements/2024_ngi_openletter/
|
|
This reverts commit dc149ec5e52f52c514cf362603d05ba8eea506b8.
This prevents a crash. One issue identified is that the commit that
I am reverting here accesses a QDropEvent at a moment in time in
which it might have already been deleted. We cannot check if it
exists by that time because we do not control its lifetime and it
is not a QObject.
|
|
NO_CHANGELOG
|
|
When dragging onto tabs/Places from a remote URL, we don't process
the QDropEvent immediately, but start a StatJob and process the
event when it finishes.
Also, the result of the StatJob is cached for 30 seconds, to avoid
starting duplicate jobs.
|
|
1. Places panel and tabbar update drag status in read-only dir
2. Don't create drop job in readonly directories
|
|
Currently, the session is saved only when the app quits normally. Save
the session after a fixed time interval from the last state change i.e.
anytime the url is changed, or a tab is opened or closed, or the active
view is changed.
BUG: 425627
|
|
BUG: 469316
|
|
The tab bar was being hidden manually. Instead, set the tabBarAutoHide
property to true.
BUG: 476742
|
|
|
|
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
|
|
|
|
* 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
|
|
|
|
|
|
Currently, copying the selected items between panels is performed by the active panel, which is wrong, because the inactive panel cannot select the copied items after the operation is completed (as it happens when drag'n'dropping or copying using keyboard shortcuts).
|
|
|
|
When the tab is a split view, use the name of both views rather than only the active view.
|
|
Based on code review feedback by Andrey Butirsky.
|
|
This commit introduces the private getter
DolphinTabWidget::viewContainerAt(ViewIndex)
and another private method
DolphinTabWidget::activateViewContainerAt(ViewIndex).
Both methods return nullptr if there is no valid
DolphinViewContainer at the specified ViewIndex.
|
|
Before this commit, even items that are distant children of
currently open views were considered selectable. This lead to the
bug that items meant to be highlighted through DBus would not be
highlighted if any ancestor of the item was open in any view.
This was fixed by only considering items in view if they can be
seen by scrolling. Main difficulty here was to make this also work
for the details view mode which allows expanding.
To implement this cleanly, some refactoring seemed necessary
because the logic to determine if an item is already in view
was previously intertwined with the logic to identify already open
directories.
This commit also contains the following refactorings aiming to
make the code more readable:
- A magic value (-1) is replaced using std::optional.
- A boolean trap is removed.
- A QPair is replaced by a struct with named variables.
- More and improved documentation
|
|
|
|
|
|
Fix PVS-Studio issue "warning: V648 Priority of the '&&' operation is higher than that of the '||' operation.".
Fix clangd issue.
|
|
even if directory of the file to be created is not the top-most opened in
TreeView
BUG: 440663
|
|
Without this, KIO::highlightInFileManager() will open additional tab
even if file to be highlighted is already present in current view
|
|
This MR fixes an issue where the window and tab titles don't properly handle creating/deleting/renaming items in the places bar, as well as switching to the Search mode.
|
|
KIO::iconForUrl relies on filename to find the icon for remote files.
Appending / at the end of the filename allows it to interpret it as
a folder.
This causes inconsistent tab icons.
To reproduce:
Open in a tab a url on a smb or sftp folder, i.e sftp:/my-server/photos
Before:
Icon is a cloud.
After:
Icon is a folder
Previously a folder icon could be presented if the tab was first opened
with a url with a trailing /
|
|
The old config keys haven't been written for since KDE 4 times
and has been internally marked as deprecated.
|
|
This can cause a crash when called with a single url and split view, or
when the last URL is not shown, because the iterator gets mutated in
the loop, so we need to make sure it hasn't gone out of bounds. This
check was erroneously removed in 175538020824355115cd98637ce83ecc53badd44
and needs to be brought back.
|
|
If Dolphin would be asked to open a location that is already open, don't
open it again in a new tab; instead switch to that view. Supports tabs
and split view.
BUG: 434911
FIXED-IN: 21.04
|
|
Signed-off-by: Anthony Fieroni <[email protected]>
|
|
Additionally remove some redundant code concerning UrlNavigator visuals.
|
|
This commit applies most suggestions which were made on the MR.
Most notably the DolphinUrlNavigator class is split up which leads to
the creation of a DolphinUrlNavigatorsController class.
Additionally some minor coding style and const correctness changes are
included.
The error value of cached integers is changed from -1 to INT_MIN
because situations could come up in which -1 would be a valid value.
|
|
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
|
|
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.
|