┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphintabpage.cpp
AgeCommit message (Collapse)Author
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-04Update my eMail to the KDE-provided oneFelix Ernst
GIT_SILENT NO_CHANGELOG
2023-04-23Add DolphinTabPage::inactiveViewContainer()Eugene Popov
2023-02-05Add clang-format and format code as in FrameworksSerg Podtynnyi
2023-01-16Replace qswap with std::swapWillyanto Willyanto
Fixes obsolete function 'qSwap' called. It is recommended to use 'std::swap' instead. (CWE-477)
2022-09-26Remove unused includesLaurent Montel
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
2021-08-30[Split view] Reset splitter position on double clickEugene Popov
This commit makes Dolphin to reset the position of the Split View splitter on double-click. BUG: 206525 FIXED-IN: 21.12
2021-04-24Remove code for dolphin < 4.14 tab restoreAlexander Lohnau
The old config keys haven't been written for since KDE 4 times and has been internally marked as deprecated.
2021-01-06Fix location bar being wrongly aligned on first startupFelix Ernst
When starting Dolphin the very first time, the spacing in front of the location bar is wrong. This commit fixes this by completely updating all cached geometry every time adjustSpacing() is called. Because this happens once on a timer 100 ms after every url change, it will happen once shortly after the window is shown. At that point all geometry is where it should be and spacing calculation works as expected. The ViewContainer geometry retrieval is refactored into a small nested helper class in DolphinNavigatorsWidgetAction by the name ViewGeometriesHelper. Previously the logic of that class was divided between DolphinTabPage and DolphinNavigatorsWidgetAction. BUG: 429447 FIXED-IN: 21.04.0
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-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-09Adress the third round of Angelaccio's review commentsFelix Ernst
Additionally remove some redundant code concerning UrlNavigator visuals.
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-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-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.
2019-11-09Remove unnecessary semicolons after Q_UNUSEDElvis Angelaccio
GIT_SILENT
2019-02-27remove deprecated methodsLaurent Montel
2019-02-16Add option to choose which view to closeAngelo Oliveira Jr
Summary: This Diff make configurable which view will close when toggling off the split view mode, if it's the active one or the inactive one. A new checkbox was added to the Dolphin configuration window, and defaults to the original behavior. FEATURE: 312834 FIXED-IN: 19.03.80 Test Plan: {F6535432} Reviewers: ngraham, #dolphin, elvisangelaccio Reviewed By: ngraham, #dolphin Subscribers: elvisangelaccio, cfeck, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D18040
2019-01-16Abort updateWindowTitle and activeViewChanged if not changed.Chris Rizzitello
Summary: - Prevent activeViewChanged from updating the window if the view is the same view (happens at least once when starting up) - Stop updateWindowTitle from updating the title if its not changed. Reviewers: #dolphin, elvisangelaccio, broulik Reviewed By: #dolphin, elvisangelaccio, broulik Subscribers: anthonyfieroni, broulik, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D17882
2019-01-05Fix title update when changing active split viewElvis Angelaccio
Summary: The DolphinTabPage::activeViewUrlChanged signal triggers the title update in DolphinMainWindow, which sets the new title from the `m_activeViewContainer` instance. This means we need to notify the main window that the active view changed before telling it that the current url changed. BUG: 402641 FIXED-IN: 18.12.1 Reviewers: #dolphin, rizzitello, ngraham Reviewed By: #dolphin, rizzitello, ngraham Subscribers: rizzitello, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D17881
2018-04-25DolphinTabPage: deactivate secondary view after closing split viewElvis Angelaccio
We deactivate the previously active view container whenever we change the active split view, but we never do the same when we close the split view. Long term we should probably even delete the secondary view after closing the split view, because it will never be used again and the pointer will be overwritten the next time the user opens the split view.
2018-04-25Update window title after closing split viewRobert Jennings
Summary: In dolphintabpage.cpp: Through the connections set up in createViewContainer(), m_primaryViewContainer->setActive(true), at line 98, ends up triggering slotViewActivated(). Because m_primaryViewActive is true, oldActiveView is not set to the view needed in this particular situation. Both oldActiveView and newActiveView end up pointing to the same view and the connections are not set up. BUG: 385111 FIXED-IN: 18.04.1 Test Plan: 1. Open split view 2. Make left panel active 3. Close split view 4. Navigate to various directories Window title now updates to show current directory Also tried with multiple tabs/combinations Reviewers: #dolphin, ngraham Reviewed By: #dolphin, ngraham Subscribers: elvisangelaccio, ngraham Differential Revision: https://phabricator.kde.org/D12446
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-05-22Correct searchbox, split view transitions between tabsAnthony Fieroni
Differential Revision: https://phabricator.kde.org/D5864 BUG: 379135 BUG: 380032 FIXED-IN: 17.04.2 Signed-off-by: Anthony Fieroni <[email protected]>
2017-02-13fixed argarnav dhamija
2017-01-29Made more changesarnav dhamija
2016-11-02Changed default arg for the setSplitViewEnabledarnav dhamija
2016-09-27Changed shortcut, but need to fix async conditionsarnav dhamija
2016-09-26Added the GUI button for quick stashingarnav dhamija
2016-09-04Use tab for switching active splitMartin T. H. Sandsmark
REVIEW: 128564 REVIEW: 110970 BUGS: 171743
2016-03-16[CLAZY] Fixed all level 1 and level 2 warnings with small exceptionsArtur Puzio
REVIEW: 126771
2014-10-21port Dolphin from KUrl to QUrlLukáš Tinkl
REVIEW: 120688
2014-10-21port Konqueror from KUrl to QUrlLukáš Tinkl
REVIEW: 120650
2014-10-18Fix includesMontel Laurent
2014-08-20Save the view states in addition to the view urls and splitter state in ↵Emmanuel Pescosta
DolphinTabPage. Also added version numbers to view and tab state. REVIEW: 119792
2014-08-13React on the redirection signal from DolphinView to properly update the tab ↵Emmanuel Pescosta
and window titles. REVIEW: 119697 BUG: 305721
2014-08-12Merge branch 'KDE/4.14'Frank Reininghaus
2014-08-12Fix crash when restoring a session stored with Dolphin 4.13 or earlierFrank Reininghaus
Since DolphinTabPage::saveState() and DolphinTabPage::restoreState(const QByteArray& state) save and restore the state of each tab in a different format than DolphinMainWindow did before the refactoring, we can run into problems: the first time a user logs into a session that has Dolphin 4.14, Dolphin might read session data that does not contain the QByteArray that DolphinTabPage wants to read the data from. In restoreState, isSplitViewEnabled will thus have the value false, and no secondary view will be created. Later on, m_primaryViewActive will also be set to false, but the else branch of the following "if (m_primaryViewActive)" then tries to activate the secondary view, which does not exist -> we get a crash. The easiest solution is to not restore the tab state if no session data in the new format is found. BUG: 338187 REVIEW: 119718 FIXED-IN: 4.14.0
2014-08-10Implemented DolphinTabWidget class to encapsulate the tab handling from ↵Emmanuel Pescosta
DolphinMainWindow. REVIEW: 119115
2014-07-16Fix regression concerning the "Places" selector in the location barFrank Reininghaus
This commit ensures that the selector is visible in all location bars if and only if the Places Panel is hidden. It fixes a regression caused by commit 6a98d83312ff2b14ab878e1427bbace3b683eacc. BUG: 337389 FIXED-IN: 4.14.0 REVIEW: 119238
2014-07-04Implemented DolphinTabPage class to encapsulate the split view handling from ↵Emmanuel Pescosta
DolphinMainWindow. The signal activeViewUrlChanged in DolphinTabPage is currently unused, but we need it later when we implement the tab widget and tab bar. DolphinTabPage has saveState/restoreState which are using a QByteArray instead of the KConfigGroup to be more generic. REVIEW: 118964