From ad5d3367c7fef4c3c11188a768f21a2ee2b3c025 Mon Sep 17 00:00:00 2001 From: Felix Ernst Date: Sun, 14 Jun 2020 16:20:02 +0200 Subject: Add an option to use an UrlNavigator in the toolbar instead 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. --- src/dolphinmainwindow.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/dolphinmainwindow.h') diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index a56215fa7..529319e2a 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -68,9 +68,14 @@ public: DolphinViewContainer* activeViewContainer() const; /** - * Returns view container for all tabs + * Returns view containers for all tabs + * @param includeInactive When true all view containers available in + * this window are returned. When false the + * view containers of split views that are not + * currently active are ignored. + * Default is true. */ - QVector viewContainers() const; + QVector viewContainers(bool includeInactive = true) const; /** * Opens each directory in \p dirs in a separate tab. If \a splitView is set, @@ -305,6 +310,12 @@ private slots: void showFilterBar(); + /** + * Toggle between either using an UrlNavigator in the toolbar or the + * ones in the location bar for navigating. + */ + void toggleLocationInToolbar(); + /** * Toggles between edit and browse mode of the navigation bar. */ -- cgit v1.3