┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinviewcontainer.cpp
AgeCommit message (Collapse)Author
2023-09-04Restore the URL when DolphinSearchBox is clearedAmol Godbole
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
2023-08-28Clean obsolete ifdefs since dolphin requires KF 5.101+Méven Car
2023-08-24Special case file opening with middle click for executable scriptsMéven Car
Since the first action would launch the script, we can use the first application associated to open the file.
2023-08-23On middle-click, open file with the second application for the file mimeMéven Car
FEATURE: 390631
2023-07-05Add explicit moc includes to sources for moc-covered headersFriedrich W. H. Kossebau
* 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
2023-06-29Use ellipsis everywhere instead of three dotsTem PQD
Better for screen readers etc.
2023-06-28Move focus from hiding selection mode bars to viewFelix Ernst
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
2023-06-13Settings Add ViewModes > Content displayMéven Car
This does not move the settings location in files though. baby step for https://invent.kde.org/system/dolphin/-/issues/36
2023-02-25Save a in-thread stat call each time the context menu is displayedMéven Car
2023-02-05Add clang-format and format code as in FrameworksSerg Podtynnyi
2023-01-25Clear filter bar on clicking current folder in placesSerg Podtynnyi
Reset the filter bar when user clicks on the current folder in places list, also rename slot function to be more clear. BUG: 259382
2022-11-29Exit the deleted directory when it is removedMéven Car
If current directory is a local file, try to find nearest dir ancestor and open it. Display warning to the user.
2022-10-11Remove unused includesLaurent Montel
2022-10-11port to KIO::createDefaultJobUiDelegateLaurent Montel
2022-09-26Add missing include (needed for building qt6)Laurent Montel
2022-09-26Remove unused includesLaurent Montel
2022-08-14Address Nate's UX feedback: Episode 2Felix Ernst
- Make Esc leave selection mode and have it only clear selection when already outside selection mode. - Let translators know that the "More" overflow button should only have a short text on it. - Fix a crash that happened when any code tried to exit selection mode even though selection mode had never been enabled to begin with.
2022-08-14Improve naming consistency and leave mode on EscapeFelix Ernst
2022-08-14Better separation of classesFelix Ernst
Make obvious when actions trigger selection mode.
2022-08-14Keep working towards a reviewable stateFelix Ernst
- Various code improvements - Smoother animations - The bottom bar in General Mode only becomes visible if items are currently selected - Removed the selection mode action from the default toolbar since it can already be toggled in various ways - More documentation - Some cleaning
2022-08-14Add Selection ModeFelix Ernst
The selection mode action is a checkable toggle action named "Select Files and Folders" which has "Space" as the default shortcut. In selection mode a bottom bar with contextual actions is shown. These should mostly mirror the actions which are available through the right-click context menu aka DolphinContextMenu. Resizing of the window might make a overflow button appear in the bottom selection mode bar. This commit makes press and hold in the view activate selection mode. This behaviour is not triggered if the press and hold is used to either start a rubberband selection or a drag operation within a short time. The length of the short timeframe is defined by a QStyleHint. This is currently not implemented in touch because I can't test it. Mix the selection mode bars' background colors using a nice combination of colors from the current color scheme BUG: 427202
2022-06-15Use cmakedefine01Ahmad Samir
This way we get a build time warning if the var isn't defined at all, e.g. a missing check_include_files() CMake call.
2022-02-04Merge branch 'release/21.12'Nicolas Fella
2022-02-04Fix opening FTP files in their preferred appNicolas Fella
When passing an URL like ftp://foo/bar.txt OpenUrlJob opens it in the default handler for ftp urls, not the one for txt files, which would be more appropriate here By passing along the mimetype we can change that behavior to what we want BUG: 443253
2021-12-17Enable Ctrl/Shift-Click to open folder in a new tab/windowAlessio Bonfiglio
and more
2021-12-08Show OpenUrlJob errors as inline messageKai Uwe Broulik
Avoids an ugly message box when opening a file fails or is forbidden.
2021-12-02[Location Bar] Add the ability to show hidden folders in the subdirectories ↵Eugene Popov
popup
2021-12-01Port away from deprecated KFileItemActions::runPreferredApplications overloadAlexander Lohnau
2021-11-13Fix updating window and tab titlesEugene Popov
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.
2021-11-02Remove duplicate include from .h/.cppLaurent Montel
2021-07-04Fix regex porting regressionElvis Angelaccio
QAbstractItemModel::match() under the hood uses QRegExp::exactMatch(), so with QRegularExpression we need to use anchoredPattern() on the pattern. Regression spotted by a failing dolphinmainwindowtest.
2021-07-04Port away from deprecated enumElvis Angelaccio
We already require Qt 5.15
2021-04-17PlacesPanel: activating a place does not select its previously selected childrenMéven Car
BUG: 421347
2021-02-08Avoid KJob::exec() in DolphinViewFelix Ernst
This commit replaces an error-prone usage of KIO::StatJob::exec() in DolphinView with the recommended KIO::StatJob::start(). The containing method DolphinView::statusBarText() is changed to be a method without return value: requestStatusBarText() The new status bar text is instead returned through a new setStatusBarText() signal that will be emitted asynchronously if necessary. The calling code that deals with status bar text is refactored to correctly work despite the new asynchronicity. The helper method calculateItemCount() is moved into requestStatusBarText() and some other code from requestStatusBarText() is moved into a new helper method emitStatusBarText(). The documentation of KIO::KJob::exec() explains why it should be avoided. A reproducible crash is the reason for this commit.
2020-12-16Use setShowOpenOrExecuteDialog(true) with OpenUrlJobAhmad Samir
It makes more sense for a file manager to always ask the user: - whether to execute binaries - whether to open an executable script as text or execute it The openOrExecute dialog from KIOWidgets has a "don't ask again" checkbox, and that setting is also accessible from Dolphin's settings dialog. See the discussion at https://bugs.kde.org/show_bug.cgi?id=429839#c10
2020-12-15Fix access url navigator while creating new tab in filename search viewAnthony Fieroni
BUG: 429628 BUG: 430434 Signed-off-by: Anthony Fieroni <[email protected]>
2020-11-24Allow the openURLJob to run executablesNate Graham
Otherwise, excecutable files like AppImages won't be allowed to launch even if they are correctly marked as executable. BUG: 429603 FIXED-IN: 20.12
2020-11-21Select last visited folder when going up/backFelix Ernst
This commit fixes a regression introduced by ad5d3367c7fef4c3c11188a768f21a2ee2b3c025. A lot of connections were changed there and at least one of them was wrong. The connections can be separated into GUI connections and internal ones. This commit makes it so the GUI stuff is connected to m_urlNavigatorConnected and everything else to m_urlNavigator. BUG: 429097
2020-11-09Adress the third round of Angelaccio's review commentsFelix Ernst
Additionally remove some redundant code concerning UrlNavigator visuals.
2020-11-09Adress most of the second round of Angelaccio's review commentsFelix Ernst
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.
2020-11-09Make UrlNavigators in the toolbar the only optionFelix Ernst
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
2020-11-09Add the UrlNavigator to the toolbar automatically if neededFelix Ernst
This commit adds the DolphinUrlNavigatorWidgetAction::addToToolbarAndSave() method which changes the users toolbar configuration to contain an Url Navigator. This way the user doesn't need to do anything manually. Aside from that a bunch of minor fixes like renaming and reordering
2020-11-09Adress the first round of Angelaccio's review commentsFelix Ernst
- Split the viewContainers(bool includeInActive) into two methods without parameters - Prevent users from accidently hiding all Url Navigators by preventing the dangerous action and then displaying a helpful message instead Unrelated to review comments: Remove a useless line of code
2020-11-09Add an option to use an UrlNavigator in the toolbar insteadFelix Ernst
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.
2020-10-23Compile with QT_NO_KEYWORDSAlexander Lohnau
2020-10-23If include is define in .h remove it if it's defined in .cpp too (scripted)Laurent Montel
2020-10-05When an invalid protocol is used, reset the navigator location to the ↵Jan Paul Batrina
previous url BUG: 413478
2020-08-25Output of licensedigger + manual cleanup afterwards.Elvis Angelaccio
Unfortunately licensedigger does not strip the trailing * characters. While at it, use a common style for all source files.
2020-08-18Port KRun to OpenUrlJobAhmad Samir
In DolphinMainWindow, since KRun allows running executables by default, use setRunExecutables(true) so as not to change the behaviour. Remove the now redundant slotHandleUrlStatFinished, that whole StatJob logic is now handled by OpenUrlJob. Bump KF required version to 5.73, since that's where OpenUrlJob::setShowOpenOrExecuteDialog was introduced.
2020-05-04[Details mode] Allow to fill the column size of directories with actual sizeMéven Car
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