┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinviewcontainer.cpp
AgeCommit message (Collapse)Author
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
2020-04-18Move from the searchbox to the results with the down arrow keyShlomi Fish
Summary: Move from the searchbox to the search results listbox/view using the down arrow key in addition to the existing methods using the tab key, return key, or the mouse. Test Plan: use ctrl+f to search in a directory tree, press down arrow key to go to the results Reviewers: ngraham, #dolphin Reviewed By: ngraham, #dolphin Subscribers: meven, elvisangelaccio, ngraham, iasensio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D26362
2020-04-15Do not display full path in the title of the tabAntonio Prcela
Summary: Displays the full path only in the window title, not in the tab title. Screenshot for comparison: ( Dolphin on the right is without D28815 , Dolphin on left has both D28815 and this patch) {F8240079} Reviewers: #vdg, #dolphin, ngraham, meven Reviewed By: #vdg, #dolphin, ngraham, meven Subscribers: ngraham, elvisangelaccio, meven, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D28857
2020-04-14Display readable titlebar text while using search and full paths in titlebarAntonio Prcela
Summary: BUG: 406624 FIXED-IN: 20.08 Reviewers: #vdg, #dolphin, iasensio, elvisangelaccio, ngraham, meven Reviewed By: #vdg, #dolphin, ngraham, meven Subscribers: meven, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D28815
2020-01-20Use QDesktopServices to open urls not supported by dolphinMéven Car
Summary: This improves portability. QDesktopServices uses standard mimetype base resolution to find the app to use. BUG: 372642 FIXED-IN: 20.04 Test Plan: * Open http://google.com, opened default web browser * Open mms:// (on my test system opened vlc) Reviewers: #dolphin, elvisangelaccio, ngraham Reviewed By: #dolphin, elvisangelaccio, ngraham Subscribers: nicolasfella, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D26732
2020-01-11Hide tooltip instantly on filter changePiotr Henryk Dabrowski
Summary: Instantly hide tooltip shown over an element when filter bar changes. Currently the tooltip stays even when filtering causes the file under the mouse to change or disappears entirely. The tooltip also continues to cover much of the window - hiding the new filtering results from user. This is an enhancement to D22512 Test Plan: 1. place the mouse pointer over a file to show the tooltip 2. press "/" to activate filter bar 3. type in filter phrase Reviewers: #dolphin, elvisangelaccio, ngraham Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D26576
2019-11-09Remove unnecessary semicolons after Q_UNUSEDElvis Angelaccio
GIT_SILENT
2019-10-06Merge branch 'Applications/19.08'Elvis Angelaccio
2019-10-06Fix crash when lauching dolphin with a search schemeIsmael Asensio
Summary: Widget objects are initialized in `DolphinSearchBox::init()`, which is called on `QEvent::Polish`, so we must set it visible before calling `fromSearchUrl`. Test Plan: `dolphin --new-window baloosearch://` Reviewers: #dolphin, elvisangelaccio Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D24432
2019-10-03Update searchbox on URL changes (Fix D24369)Ismael Asensio
Summary: In D24369 I introduced a regression: Where now the searchbox is updated on url changes for search urls, it is not updated anymore for regular folders. The effect is that not-indexed folders can have the extra options enabled or vice-versa. This patch fixes it, moving back the updating logic to `setSearchModeEnable`. Test Plan: - Searchbox updates properly when changing between search urls and regular folders, either indexed or nor-indexed. Reviewers: #dolphin, elvisangelaccio Subscribers: kfm-devel, elvisangelaccio Tags: #dolphin Differential Revision: https://phabricator.kde.org/D24376
2019-10-03Update searchbox on URL changes (Fix D24369)Ismael Asensio
Summary: In D24369 I introduced a regression: Where now the searchbox is updated on url changes for search urls, it is not updated anymore for regular folders. The effect is that not-indexed folders can have the extra options enabled or vice-versa. This patch fixes it, moving back the updating logic to `setSearchModeEnable`. Test Plan: - Searchbox updates properly when changing between search urls and regular folders, either indexed or nor-indexed. Reviewers: #dolphin, elvisangelaccio Subscribers: kfm-devel, elvisangelaccio Tags: #dolphin Differential Revision: https://phabricator.kde.org/D24376
2019-10-02Merge branch 'Applications/19.08'Elvis Angelaccio
2019-10-02Update searchbar parameters on URL changeIsmael Asensio
Summary: Searchbar options (text and options) were only updated when toggling the search on, $ Main use case is when changing between stored search urls in Places panel. Test Plan: - Store two search urls in Places panel - Navigate between them - The searchbar text and parameters change accordingly BEFORE: {F7500811} AFTER: {F7500813} Reviewers: #dolphin, elvisangelaccio Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D24369
2019-09-15Fix wrong window titlesNazar Kalinowski
Summary: BUG: 389135 FIXED-IN: 19.11.80 Currently dolphin shows a folder's name instead of a "place" name if the current path has trailing slash and place's name doesn't, or vice versa. This patch fixes this behavior, so that dolphin always shows a "place" name. The QUrl::FullyEncoded string conversion is required because that's how the places model stores the places URLs in the XML bookmarks file. Test Plan: Test configuration: https://imgur.com/a/U4zBp8c Before (wrong window titles are in red): https://imgur.com/a/dB4xRwo After (all window titles are correct): https://imgur.com/a/W7virBn Reviewers: #dolphin, elvisangelaccio Subscribers: elvisangelaccio, ngraham, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D23706
2019-09-08GIT_SILENT: minor qstring optimizationLaurent Montel
2019-09-02Merge branch 'Applications/19.08'Elvis Angelaccio
2019-09-02Fix places text when the URL has a trailing slashElvis Angelaccio
Summary: QUrl::fileName() returns an empty string if the URL ends with a slash. Test Plan: 1. Run `dolphin /tmp` from command line 2. Right-click from viewport and click 'Add to Places' Reviewers: ngraham Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D23654
2019-09-02Merge branch 'Applications/19.08'Kai Uwe Broulik
2019-09-02Reset progress bar text when directory loading startsKai Uwe Broulik
Dolphin shows a different text for whether it is loading the directory or currently sorting its contents. However, when entering a folder that causes sort criteria to change (e.g. because of different view properties in that folder), the status bar text is changed to "Sorting..." while it is still actually loading the folder. When loading a directory starts, reset any status bar text to ensure "Loading..." is displayed in this case. Differential Revision: >https://phabricator.kde.org/D23459
2019-09-01[dolphin] Add an action to toggle the searchbarIsmael Asensio
Summary: Make search action toggle the searchbar instead of just launching it. The search action in dolphin did only bring up the search bar, but to close it again you had to go to the closing button on the same searchbar. This behavior in inconsistent with other dolphin actions which toggle panels or tools. BEFORE: {F7256652} AFTER: {F7256862} BUG: 344617 FIXED-IN: 19.12.0 Closes T8473 Depends on D23075 Test Plan: - Enable the search mode: the searchbar appears and the toolbar button gets checked - Press the search button again, and it goes back to normal mode. - The search button state is coherent with the searchbox - Coherence is kept when changing to a split view or different tab - Shorcut <Ctrl-F> does not close the searchbar, but moves the focus to it. Reviewers: #dolphin, ngraham, #vdg, elvisangelaccio Reviewed By: ngraham, #vdg Subscribers: ndavis, felixernst, elvisangelaccio, kfm-devel Tags: #dolphin Maniphest Tasks: T8473 Differential Revision: https://phabricator.kde.org/D23232
2019-06-23Add "What's This?" to nearly everything in the main windowFelix Ernst
Summary: This commit adds "What's This?" help to nearly everything in the Dolphin main window (panels, views, buttons, ...). It adds the "?" to the title bar so this help can easily be called. For links in those help texts to work the WhatsThisClickedEvents are handled in the main window class. This doesn't work for menus because events from them aren't forwarded to the main window for some reason so EventFilters are installed for the Control button menus. Modifying the "Help" menu of KXmlGui is deprecated so no EventFilter can be installed in the menubar. Therefore help texts without links are provided for the menubar. Test Plan: Check if the event handling might make any problems. Check for any big mistakes in the help messages. Reviewers: #dolphin, elvisangelaccio Subscribers: broulik, elvisangelaccio, yurchor, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D20471
2019-05-25When filter bar is focused, switch to view when tab key is pressedNate Graham
Summary: Various people have requested that the tab key move keyboard focus from the filter bar's text edit field to the main view. It already does this when the Enter and return keys are pressed, but apparently this is not very intuitive and people expect Tab to work too. This patch makes that behavior possible by moving the Lock button to the left of the text edit field, and re-arranging the code so that the filter bar is initialized first. This works because Qt assigns tab ordering by default according to the order of widget construction. So if we simply construct the main view right after the filter bar, then the tab ordering is set up this way automatically. BUG: 403379 BUG: 403356 FIXED-IN: 19.08.0 Test Plan: 1. Activate Filter bar 2. Hit Tab key 3. View has become focused 4. Play around in Dolphin for a while and notice no regressions or crashes Reviewers: #dolphin, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D21177
2019-03-18Bring back KActivities supportElvis Angelaccio
Summary: This code has been unused since the KF5 port. Reviewers: #dolphin, #plasma Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D18273
2019-02-27remove deprecated methodsLaurent Montel
2019-02-17Merge branch 'Applications/18.12'Nate Graham
2019-02-17Word-wrap KMessageWidget textNate Graham
Summary: Word-wrap KMessageWidget text to prevent the window from being widened when the text is very long. CCBUG: 404232 Only `CCBUG: ` because word wrap only works where QLabel detects a word boundary; it will not wrap a string with no spaces or other word boundaries (e.g. "aaaaaaaaaaaaaaaaaaaa...") Test Plan: - Create a new text file with a 300-character name that has spaces in it - In the KMessageWidget's error message, the file name is wrapped at the word boundaries Reviewers: #dolphin, #frameworks, cfeck, elvisangelaccio Reviewed By: #dolphin, cfeck, elvisangelaccio Subscribers: elvisangelaccio, cfeck, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D18968
2019-01-15Drop unused includesElvis Angelaccio
GIT_SILENT
2018-10-07Drop noisy debug outputElvis Angelaccio
This qCDebug() call shows up at every change of directory and doesn't really add any value.
2018-09-27Track search mode in variableKai Uwe Broulik
Rather than relying on a widget being visible which might not be the case for e.g. non-active tabs Differential Revision: https://phabricator.kde.org/D15774
2018-09-27Fix window / tab caption in search modeKai Uwe Broulik
A search URL is never local, so this part of the code was never reached, resulting in raw baloosearch or filenamesearch URLs showing up as window and tab title Differential Revision: https://phabricator.kde.org/D15772
2018-09-02Renames DolphinViewContainer::getCaption to captionDavid Hallas
Summary: This commit renames the DolphinViewContainer::getCaption to simply caption, this was a review comment that I failed to fix in a previous commit. Test Plan: None Reviewers: elvisangelaccio Reviewed By: elvisangelaccio Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D15114
2018-08-24Unify window and tab titleDavid Hallas
Summary: Previously the title of tabs was a prettyfied version of the URL. This is inconsistent with the title of the Window and in some cases for specials URLs kind of misleading. This commit generalizes the code from DolphinMainWindow so that both the DolphinMainWindow title and the tab title uses the same function for the title. This also means that the 'Show Full Path in Title Bar' also applies to the tab title, and also that searches changes the tab title. FEATURE: 387851 Test Plan: Open a new tab from the places panel and navigate around. Reviewers: #dolphin, ngraham, elvisangelaccio, markg Reviewed By: #dolphin, ngraham, markg Subscribers: markg, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D14442
2018-06-03Drop obsolete version checksElvis Angelaccio
We already depend on KF5 >= 5.43
2018-06-01Show a warning when running as the root userNathaniel Graham
Summary: Now that Dolphin can be run as the root user again, let's show a warning. Test Plan: When run with the root user account: {F5882057} Reviewers: #dolphin, markg, elvisangelaccio Reviewed By: markg, elvisangelaccio Subscribers: acooligan, anthonyfieroni, chinmoyr, kfm-devel, rikmills, emmanuelp, zzag, nicolasfella, elvisangelaccio, Fuchs, mmustac, markg Tags: #dolphin Differential Revision: https://phabricator.kde.org/D12732
2018-05-13Add missing i18n callMelanie Genz
The string was already part of dolphin but was not exposed for translation. BUG: 394194
2018-03-19Introduce singleton for KFilePlacesModelKai Uwe Broulik
There are various places where Dolphin created a new KFilePlacesModel which would then query all storage devices and do other expensive work. Differential Revision: https://phabricator.kde.org/D11283
2018-03-18Show "Empty Trash" button inside trash directoryRoman Inflianskas
Summary: Show "Empty Trash" button inside trash directory. FEATURE: 163306 Test Plan: {F5734949} Reviewers: ngraham, rkflx, markg, elvisangelaccio Reviewed By: ngraham, markg, elvisangelaccio Subscribers: markg, emateli, broulik, elvisangelaccio, rkflx, mmustac, ngraham, #dolphin Tags: #dolphin Differential Revision: https://phabricator.kde.org/D10804
2018-03-11Add Trash (empty, isEmpty, emptinessChanged)Roman Inflianskas
Summary: Add `Trash` class to handle all trash operations. Reviewers: elvisangelaccio, markg, ngraham Reviewed By: elvisangelaccio, markg, ngraham Subscribers: ngraham, markg, rkflx, elvisangelaccio, #dolphin Differential Revision: https://phabricator.kde.org/D11012
2018-03-04Remove unused #includeRoman Inflianskas
Summary: I used CLion inspection to hunt all unused #include Reviewers: #dolphin, elvisangelaccio, markg Reviewed By: #dolphin, elvisangelaccio, markg Subscribers: bcooksley, markg, elvisangelaccio, #dolphin Differential Revision: https://phabricator.kde.org/D10985
2017-12-03Change window title when searchingJulian Schraner
Summary: When you search for a file (e.g. "hello world") the window title of Dolphin will now change to "Search for [input]" instead of "baloosearch - /". BUG: 321575 Test Plan: - Disables it iself after search bar is hidden - Works with multiple word searches Reviewers: #dolphin, ngraham, elvisangelaccio Reviewed By: #dolphin, ngraham, elvisangelaccio Subscribers: anthonyfieroni, elvisangelaccio, rkflx, emmanuelp, ngraham, #dolphin Tags: #dolphin Differential Revision: https://phabricator.kde.org/D8273
2017-11-21Modernize: Use nullptr everywhereKevin Funk
2017-11-01Make Saved Search feature discoverableNathaniel Graham
Summary: FEATURE: 269332 Make Dolphin's Saved Search feature discoverable by adding a button inside the search field. The button only becomes enabled when there is a valid search term. When pushed, it saves the search to the Places panel, providing a visible-by-default way to do this to complement the existing implementation that is only visible in the context menu. Also harmonized the label text so that it's consistent no matter how you create a saved search (button or context menu) Test Plan: Tested in KDE Neon. Works great: {F5449508} Reviewers: #dolphin, broulik, dfaure, markg, emateli, elvisangelaccio Reviewed By: #dolphin, markg, emateli, elvisangelaccio Subscribers: anthonyfieroni, markg, emateli, elvisangelaccio, cfeck, #dolphin Tags: #dolphin Differential Revision: https://phabricator.kde.org/D8454
2017-09-21Select child folder when navigating to a parent folderGregor Mi
Whenever the dolphin view is initialized to show the contents of a new URL (e.g. "/home/x/test") it will be checked if the new URL is a parent of the previous displayed URL (e.g. "/home/x/test/documents/aaa"). If the check is successful, then the common child (in this example: "/home/x/test/documents/") folder item will be selected and scrolled into view. REVIEW: 123253 BUG: 377392 CCBUG: 335616
2017-07-27Fix drop menu position with urlnavigator dropsElvis Angelaccio
Commit 1e251d2f6a in kio broke drop menus when dropping on the URL navigator (menus show up in the DolphinView rather than the URL bar). This happens because in DolphinView::dropUrls() we set `this` as the widget passed to KJobWidgets::setWindow() (in DragAndDropHelper::dropUrls()). We need to replace `this` with the actual widget that received the QDropEvent and that can mapToGlobal() the relative pos of the drop event. Unfortunately this widget is not KUrlNavigator itself, but one of its KUrlNavigatorButton children (private class, not exported). So unfortunately we need a new API in KIO that exposes this child widget. Differential Revision: https://phabricator.kde.org/D6684
2017-03-12Revert "Make "show filter bar" a toggle action"Sergey Kalinichev
This reverts commit edf8e5737316204e4a96e5edf4cba4cdec1c71ef. See https://git.reviewboard.kde.org/r/129662 for discussion
2017-02-18Make "show filter bar" a toggle actionDon Nguyen
REVIEW: 129662
2017-02-18Restore the view state after the URL of the DolphinView has been changed,Emmanuel Pescosta
as stated in the documentation of KUrlNavigator::saveLocationState. The historyChanged signal of the KUrlNavigator is emitted before the urlChanged signal and so the view state restoring happens before the view URL has been changed. This makes it impossible to save and restore the selected URLs, because DolphinView::setUrl clears the list of selected items (which has been restored right before). This changes removes the history changed slot and restores the view state after the setUrl call.
2017-01-16In doubt use URL scheme for placeKai Uwe Broulik
If we neither have a filename nor a host, we might be in a foo:/ URL, use the scheme then. Differential Revision: https://phabricator.kde.org/D3935