]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinmainwindow.cpp
Change default Dolphin toolbar layout
[dolphin.git] / src / dolphinmainwindow.cpp
index 1eed8c8264e780b713ceddc338a20ce37b5db556..bdf5dbac5298ce4b8acbf7264312a2bb543b4036 100644 (file)
@@ -751,7 +751,7 @@ void DolphinMainWindow::togglePanelLockState()
 
 void DolphinMainWindow::slotTerminalPanelVisibilityChanged()
 {
-    if (m_terminalPanel->isHiddenInVisibleWindow()) {
+    if (m_terminalPanel->isHiddenInVisibleWindow() && m_activeViewContainer) {
         m_activeViewContainer->view()->setFocus();
     }
 }
@@ -1156,6 +1156,7 @@ void DolphinMainWindow::setupActions()
 
     QAction* newWindow = KStandardAction::openNew(this, &DolphinMainWindow::openNewMainWindow, actionCollection());
     newWindow->setText(i18nc("@action:inmenu File", "New &Window"));
+    newWindow->setToolTip(i18nc("@info", "Open a new Dolphin window"));
     newWindow->setWhatsThis(xi18nc("@info:whatsthis", "This opens a new "
         "window just like this one with the current location and view."
         "<nl/>You can drag and drop items between windows."));
@@ -1471,6 +1472,7 @@ void DolphinMainWindow::setupDockWidgets()
     const QString panelWhatsThis = xi18nc("@info:whatsthis", "<para>To show or "
         "hide panels like this go to <interface>Control|Panels</interface> "
         "or <interface>View|Panels</interface>.</para>");
+#ifdef HAVE_BALOO
     actionCollection()->action(QStringLiteral("show_information_panel"))
         ->setWhatsThis(xi18nc("@info:whatsthis", "<para> This toggles the "
         "<emphasis>information</emphasis> panel at the right side of the "
@@ -1478,6 +1480,7 @@ void DolphinMainWindow::setupDockWidgets()
         "about the items your mouse is hovering over or about the selected "
         "items. Otherwise it informs you about the currently viewed folder.<nl/>"
         "For single items a preview of their contents is provided.</para>"));
+#endif
     infoDock->setWhatsThis(xi18nc("@info:whatsthis", "<para>This panel "
         "provides in-depth information about the items your mouse is "
         "hovering over or about the selected items. Otherwise it informs "
@@ -1725,10 +1728,9 @@ void DolphinMainWindow::createControlButton()
 
     m_controlButton = new QToolButton(this);
     m_controlButton->setIcon(QIcon::fromTheme(QStringLiteral("application-menu")));
-    m_controlButton->setText(i18nc("@action", "Control"));
+    m_controlButton->setToolTip(i18nc("@action", "Show menu"));
     m_controlButton->setAttribute(Qt::WidgetAttribute::WA_CustomWhatsThis);
     m_controlButton->setPopupMode(QToolButton::InstantPopup);
-    m_controlButton->setToolButtonStyle(toolBar()->toolButtonStyle());
 
     QMenu* controlMenu = new QMenu(m_controlButton);
     connect(controlMenu, &QMenu::aboutToShow, this, &DolphinMainWindow::updateControlMenu);
@@ -1739,8 +1741,6 @@ void DolphinMainWindow::createControlButton()
     toolBar()->addWidget(m_controlButton);
     connect(toolBar(), &KToolBar::iconSizeChanged,
             m_controlButton, &QToolButton::setIconSize);
-    connect(toolBar(), &KToolBar::toolButtonStyleChanged,
-            m_controlButton, &QToolButton::setToolButtonStyle);
 
     // The added widgets are owned by the toolbar and may get deleted when e.g. the toolbar
     // gets edited. In this case we must add them again. The adding is done asynchronously by