┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinmainwindow.cpp
AgeCommit message (Collapse)Author
2021-12-02Tweaked showFilterBar tooltip text for accuracyPaul Brown
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-10-20Utilize KXMLGUI API to store state config in separate fileAlexander Lohnau
CCBUG: 397602
2021-09-28Merge branch 'release/21.08'Nate Graham
2021-09-28Fix closing a secondary viewContainer on startup settings changeEugene Popov
Apply split view settings only when changing the corresponding option. BUG: 426221 FIXED-IN: 21.08.2
2021-09-22Don't force icon for preferred search tool action if one is manually configuredNicolas Fella
The code reads the icon from the relevant application and uses that for the action When the user has configured one manually in the toolbar settings that is overridden To avoid this only change the icon if it is the default one (search) BUG: 442815 (cherry picked from commit d3f427a6da1b117c85b1080bf198ae4758d00e8e)
2021-09-22Don't force icon for preferred search tool action if one is manually configuredNicolas Fella
The code reads the icon from the relevant application and uses that for the action When the user has configured one manually in the toolbar settings that is overridden To avoid this only change the icon if it is the default one (search) BUG: 442815
2021-08-31Port to KTerminalLauncherJobNate Graham
Dolphin still uses KToolInvocation::invokeTerminal() which is deprecated and requires KInit. However Dolphin was ported away from requiring it in other ways, so it is now possible to have Dolphin running but not KInit, which breaks the "Open in Terminal" functionality. Using KTerminalLauncherJob fixes this. It was introduced in Frameworks 5.83, so the CMake dependency version is accordingly increased. BUG: 441072 FIXED-IN: 21.12
2021-08-10Avoid crash on start when help actions are restricted through the Kiosk systemAlexander Volkov
KHelpMenu may not create some actions, so check for nullptr before setting "What's this?" text. (cherry picked from commit 0ac57fbe90d580a514c3bac4cefaa9ed87f178f9)
2021-08-10Avoid crash on start when help actions are restricted through the Kiosk systemAlexander Volkov
KHelpMenu may not create some actions, so check for nullptr before setting "What's this?" text.
2021-08-02Merge branch 'release/21.08'Nate Graham
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-19Clean up KF API older than 5.82Ahmad Samir
GIT_SILENT
2021-07-10Avoid crashing on startup if DBus isn't runningAlex Richardson
I am trying to run Dolphin on a minimal FreeBSD CHERI-RISC-V QEMU instance and I haven't got DBus running. Without this change, I get crashes because QDBusConnection::sessionBus().interface() returns NULL if DBus isn't running.
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