void DolphinMainWindow::replaceLocation()
{
KUrlNavigator* navigator = m_activeViewContainer->urlNavigator();
- navigator->setUrlEditable(true);
- navigator->setFocus();
-
- // select the whole text of the combo box editor
QLineEdit* lineEdit = navigator->editor()->lineEdit();
- lineEdit->selectAll();
+
+ // If the text field currently has focus and everything is selected,
+ // pressing the keyboard shortcut returns the whole thing to breadcrumb mode
+ if (navigator->isUrlEditable()
+ && lineEdit->hasFocus()
+ && lineEdit->selectedText() == lineEdit->text() ) {
+ navigator->setUrlEditable(false);
+ } else {
+ navigator->setUrlEditable(true);
+ navigator->setFocus();
+ lineEdit->selectAll();
+ }
}
void DolphinMainWindow::togglePanelLockState()
QAction* newWindow = KStandardAction::openNew(this, &DolphinMainWindow::openNewMainWindow, actionCollection());
newWindow->setText(i18nc("@action:inmenu File", "New &Window"));
+ newWindow->setIcon(QIcon::fromTheme(QStringLiteral("window-new")));
QAction* newTab = actionCollection()->addAction(QStringLiteral("new_tab"));
newTab->setIcon(QIcon::fromTheme(QStringLiteral("tab-new")));