┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinmainwindow.cpp
AgeCommit message (Collapse)Author
2021-07-28Revert "Don't session-restore invalid paths"Nate Graham
This reverts commit c733b3aa9787a618a0ce5bb03b3fc731f5663b21. There are people who prefer the old behavior of session-restoring all paths including the ones which are currently inaccessible. The idea is that Dolphin is like a web browser; if a website is not currently available, the browser tells you that instead of silently discarding the URL and showing you the homepage. Doing this can be considered a form of data loss. In addition, the reason for the change was to prevent Dolphin from showing invalid paths on launch for unmounted removable disks, but that specific case was fixed separately by switching to ~ for any tabs/views that were showing locations on a just-unmounted removable disk. So you will never run into the problem if yo unmount a disk in Dolphin and then close it. Accordingly, let's revert the change because it causes more problems than it resolves. BUG: 439864 CCBUG: 427619 FIXED-IN: 21.08
2021-07-04Reuse KFileItemActions instance during lifetime of dolphinAlexander Lohnau
With https://invent.kde.org/frameworks/kio/-/merge_requests/411 the plugin instances can be reused during the lifetime of the KFileItemActions object. This improves performance and also allows the plugins to emit errors, even if they run async.
2021-07-04Port to new KActionMenu popup mode APIDavid Hurka
Use KActionMenu and KToolBarPopupAction::setPopupMode() methods instead of setDelayed() and setStickyMenu(). Are available since KF 5.77 and KF 5.78 respectively, which is already required by Dolphin.
2021-06-22Merge branch 'release/21.04'Felix Ernst
2021-06-08Add "Sort By" to the hamburger menuFelix Ernst
People seem to use the "Sort By" menu often enough that it should be available through the hamburger menu. Before this change one could only sort the view through the right- click context menu, using the details view mode or by using the actions from the menu bar.
2021-05-31Fix crash on Wayland when closing the mainwindow while another dialog is openElvis Angelaccio
For some reason on Wayland `QClipboad::dataChanged` can be emitted after the main window gets deleted. In particular this happens when closing the main window while another dialog is open. Since we are closing the window, we can just disconnect this signal and prevent this crash from ever happening.
2021-05-18Use more appropriate icon for "Create New" actionNate Graham
Right now this action is using the "document-new" icon, which depicts creating a new file. This is inaccurate, as the menu provides options for creating more than just files: it has one option to create folders and three for creating different types of links. In fact, depending on the set of installed software, there may not be any options to create new documents at all! To fix this, the icon would need to be made either more specific or more generic. There is no such icon that depicts being able to create a folder, a document, or a link; such a thing is too specific to be able to represent with a small icon. So our only real option is to use a more generic icon. This commit does that.
2021-05-17Fix primary view changing folder for the closing animationFelix Ernst
This commit fixes a bug which made it so an UrlNavigator that was disconnected from a viewContainer would still indirectly control the viewContainer because of a dubious connection created in DolphinMainWindow. Instead the internal UrlNavigator of the viewContainer is used which is always connected to its own viewContainer. This way the the supposedly disconnected primary UrlNavigator will actually not affect the old disconnected viewContainer that is currently being closed. BUG: 437080 FIXED-IN: 21.08
2021-05-13Re-arrange the contents of the hamburger menuFelix Ernst
To improve usability, the entries in the hamburger menu are changed. Maybe the biggest fault of the previous menu contents were that there were too many actions. The new menu contents are composed of all the actions which are necessary to use Dolphin and those which are very useful and should be of interest for most users. Some menu contents change depending on the state of the application. We can be more bold in only showing what really seems necessary because this commit activates the special sub-menu of KHamburgerMenu that helps users discover all further features of Dolphin. The hamburger menu is from now on also added to the context menus in the view when both the menu bar and toolbar are hidden. This allows users to hide both of them and still use all features of Dolphin.
2021-05-05Set initial size corectlyNate Graham
The resize() that we do to set the initial size is working around a bug in frameworks that is going to be fixed soon. See https://invent.kde.org/frameworks/kxmlgui/-/merge_requests/53.
2021-04-29Replace custom hamburger/control menu with KHamburgerMenuFelix Ernst
2021-04-24InformationPanel: Allow to refresh the panel when its displayed content changesMéven Car
BUG: 430095 BUG: 412902 FIXED-IN: 21.08
2021-04-19Increase default window sizeNate Graham
The current default window size of 750x500 is quite small on today's screens, and results in an initial user experience of a very cramped app window. The very first action that I see from new users interacting with Dolphin is to make the window bigger. So let's do it for them by making the default window size a bit bigger ourselves.
2021-04-17PlacesPanel: activating a place does not select its previously selected childrenMéven Car
BUG: 421347
2021-02-10Port away from deprecated KToolInvocation::invokeTerminalNicolas Fella
2021-01-25Merge branch 'release/20.12'Nate Graham
2021-01-25don't crash when building without balooHarald Sitter
show_information_panel is only created when building with baloo. only access it when built with baloo, otherwise always report the panel as off. this fixes a nullptr deref because action() would return a nullptr since show_information_panel isn't a thing in all build configurations (full disclosure: I can't reproduce the crash, nor did I build without baloo) BUG: 431730
2021-01-10Open new tab placement optionAnthony Fieroni
Signed-off-by: Anthony Fieroni <[email protected]>
2021-01-02Animate split view mode togglingFelix Ernst
Have the secondary ViewContainer slide into/out of view when split view mode is switched on or off by the user. This should help users understand what split view mode is about. Without the animation it might seem like the only thing the button does is creating a weird vertical line in the middle of the view or something. With the animation it should be clear that the second view is a separate entity that was added. The closing animation will help users understand which of the ViewContainers was just closed.
2020-12-30use 'compass' instead of 'bookmarks' icon in Show Places Panel buttonPiotr Henryk Dabrowski
'bookmark' icon is already used for Bookmarks Menu
2020-12-28Share actions with main window to avoid duplicating icon name and textDuong Do Minh Chau
2020-12-28Use a faster way to determine kio-stash isn't installedEike Hein
Summary: Dolphin needs to figure out whether or not kio-stash is installed to set the enabled state of a UI action. When KProtocolInfo::isKnownProtocol can't find a protocol it gets worried its protocol cache might be out of date, so it rebuilds it (doing plenty of disk I/O) and looks again. kio-stash is currently not yet installed on many systems, so this means most Dolphin startups out there. This patch switches to using QDBusConnectionInterface::isServiceRegistered instead to determine whether the stash notifier daemon is running, which should be faster than doing disk I/O. Reviewers: davidedmundson, elvisangelaccio, shortstheory Subscribers: emmanuelp, alexeymin, ngraham, #dolphin Differential Revision: https://phabricator.kde.org/D9094
2020-12-16Merge branch 'release/20.12'Ahmad Samir
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-11Do not create instance of GeneralSettings just to access static membersAlexander Lohnau
2020-12-09operator+/- is disabled for QFlags in qt6Laurent Montel
2020-12-05Add missing constElvis Angelaccio
2020-12-02Toolbar: move and rename filter to edit menu above SearchMéven Car
This is to expose more filter. Also rename "Show Filter Bar" to simply "Filter", keep "Show Filter Bar" as tooltip Adds a toggle filter bar action.
2020-11-20Merge branch 'release/20.12'Nate Graham
2020-11-19Allow having the UrlNavigators below the tab barFelix Ernst
This commit restores the possibility to have the UrlNavigators below the tab bar. This will happen automatically whenever the UrlNavigator is removed from the toolbar. It is also now again possible to have the toolbar on the side. This option is disabled while the toolbar contains the UrlNavigators. This commit makes no changes to the new default which is having the UrlNavigators in the toolbar but makes sure that upgrading users won't be affected.
2020-11-18Different icon to launch Konsole terminalAlexander Lohnau
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-09Apply Méven Car's suggestionsFelix Ernst
2020-11-09Fix a crash and extract unrelated changesFelix Ernst
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.
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-09trailing whitespacesFelix Ernst
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-11-05Add support for KUserFeedbackElvis Angelaccio
This commit introduces KUserFeedback in dolphin with some basic data sources and with a settings page to configure the telemetry values. There are also a couple custom data sources as proof of concept: a bunch of settings and the count of available network shares as listed by Solid. The settings page is shown only if the user feedback framework is enabled, but currently in Plasma we don't have a global kill switch to disable it. At the moment we never show an encouragement message. We need to connect to the `Provider::showEncouragementMessage()` signal, but first we should agree to a common way to show a non-annoying message to the users.
2020-10-23Compile with QT_NO_KEYWORDSAlexander Lohnau
2020-10-23Compile without foreachAlexander Lohnau
2020-10-23Don't session-restore invalid pathsNate Graham
When session restore is populating the main window, it's unconditional; you'll get whatever was there before. This can be a problem if any of those things are now missing. For example, maybe you were browsing files on a removable disk, then quit Dolphin, and finally removed the disk. The next time you launch Dolphin again, it will try to show you the view from the now-missing removable disk. To prevent this, we now look at all the URLs in all of the view containers that were created after session-restore has finished doing its thing; if any of them are invalid local URLs, we change the URL to the home folder instead to avoid showing the user a view with an invalid location in it. BUG: 427619 FIXED-IN: 20.12
2020-10-23Show home folder if needed after unmounting mounted diskNate Graham
Right now, when you unmount a device that any active view containers are displaying, nothing in the view changes. As a result, it's possible to try to navigate to files or folders in that view, which cannot be done because the disk that the files or folders are located on has been unmounted! With this commit, we detect that case and switch the view containers to show the home folder after the disk whose contents they are displaying gets unmounted. BUG: 158934 FIXED-IN: 20.12
2020-10-23Fix DolphinMainWindow::viewContainers() to take into account split viewsNate Graham
The function was previously assuming that each tab view has exactly one view container, which is not necessarily accurate; some could have a split view open.
2020-10-23If include is define in .h remove it if it's defined in .cpp too (scripted)Laurent Montel
2020-10-05Merge branch 'release/20.08' into masterNate Graham
2020-10-03Don't warn when closing multiple tabs if restoring window stateNate Graham
When we're using the "restore window state" feature, there's no need to warn when closing multiple tabs, because they're saved and you can just re-open the window.
2020-09-20Check protocol Class before creating a StatJobAhmad Samir
StatJob::mostLocalUrl only works with ":local" protocols, adjust the code accordingly. Make the code async. Remove activeContainerLocalPath() method as it isn't needed anymore. Drive-by change: minimum required version of Qt should be 5.12 because that's what KF >= 5.73 already requires.
2020-09-13Improve Touch supportSteffen Hartleib
With this patch dolphin now supports the following touch gestures: * Tap gesture to interact/open with directories, files and so on * TapAndHold and release gesture for access to the context menu (main window, panel folder, places and information) * TapAndHold and moving gesture for drag and drop action (main windows, panel folder and places) * pinch gesture for zoom in main window * kinetic scrolling (QScroller) for main window, panel folder, panel places, panel information, setting preview and service * two fingers swipe gesture to left, right and up as shortcut to navigate back, forward and up * two finger tap gesture to toggle item selection, similar to Ctrl and left mouse click FEATURE: 385066 FIXED-IN: 20.11.80 You are currently rebasing branch 'touch' on '85241a924'.