]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Merge branch 'Applications/18.12'
authorNate Graham <nate@kde.org>
Wed, 19 Dec 2018 05:04:46 +0000 (22:04 -0700)
committerNate Graham <nate@kde.org>
Wed, 19 Dec 2018 05:04:46 +0000 (22:04 -0700)
1  2 
src/dolphinmainwindow.cpp

index 98920c00128d215ee5a700ca675048ce03c46af6,cd4800b7dc491ba34c54057dc89f2e345ed23ac7..dcf22e455fc0c72d793c92b698fb4a6e4dc7b1a1
@@@ -551,7 -551,7 +551,7 @@@ void DolphinMainWindow::selectAll(
      // URL instead of all items of the view
  
      KUrlNavigator* urlNavigator = m_activeViewContainer->urlNavigator();
 -    QLineEdit* lineEdit = urlNavigator->editor()->lineEdit(); // krazy:exclude=qclasses
 +    QLineEdit* lineEdit = urlNavigator->editor()->lineEdit();
      const bool selectUrl = urlNavigator->isUrlEditable() &&
                             lineEdit->hasFocus();
      if (selectUrl) {
@@@ -621,19 -621,12 +621,19 @@@ void DolphinMainWindow::toggleEditLocat
  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();  // krazy:exclude=qclasses
 -    lineEdit->selectAll();
 +    QLineEdit* lineEdit = navigator->editor()->lineEdit();
 +
 +    // 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()
@@@ -1044,6 -1037,7 +1044,7 @@@ void DolphinMainWindow::setupActions(
  
      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")));