Changeset View
Changeset View
Standalone View
Standalone View
src/dolphinmainwindow.cpp
Show First 20 Lines • Show All 615 Lines • ▼ Show 20 Line(s) | 613 | { | |||
---|---|---|---|---|---|
616 | QAction* action = actionCollection()->action(QStringLiteral("editable_location")); | 616 | QAction* action = actionCollection()->action(QStringLiteral("editable_location")); | ||
617 | KUrlNavigator* urlNavigator = m_activeViewContainer->urlNavigator(); | 617 | KUrlNavigator* urlNavigator = m_activeViewContainer->urlNavigator(); | ||
618 | urlNavigator->setUrlEditable(action->isChecked()); | 618 | urlNavigator->setUrlEditable(action->isChecked()); | ||
619 | } | 619 | } | ||
620 | 620 | | |||
621 | void DolphinMainWindow::replaceLocation() | 621 | void DolphinMainWindow::replaceLocation() | ||
622 | { | 622 | { | ||
623 | KUrlNavigator* navigator = m_activeViewContainer->urlNavigator(); | 623 | KUrlNavigator* navigator = m_activeViewContainer->urlNavigator(); | ||
624 | QLineEdit* lineEdit = navigator->editor()->lineEdit(); | ||||
625 | | ||||
626 | // If the text field currently has focus and everything is selected, | ||||
627 | // pressing the keyboard shortcut returns the whole thing to breadcrumb mode | ||||
628 | if (navigator->isUrlEditable() | ||||
629 | && lineEdit->hasFocus() | ||||
630 | && lineEdit->selectedText() == lineEdit->text() ) { | ||||
631 | navigator->setUrlEditable(false); | ||||
632 | } else { | ||||
624 | navigator->setUrlEditable(true); | 633 | navigator->setUrlEditable(true); | ||
625 | navigator->setFocus(); | 634 | navigator->setFocus(); | ||
626 | | ||||
627 | // select the whole text of the combo box editor | | |||
628 | QLineEdit* lineEdit = navigator->editor()->lineEdit(); // krazy:exclude=qclasses | | |||
629 | lineEdit->selectAll(); | 635 | lineEdit->selectAll(); | ||
630 | } | 636 | } | ||
637 | } | ||||
631 | 638 | | |||
632 | void DolphinMainWindow::togglePanelLockState() | 639 | void DolphinMainWindow::togglePanelLockState() | ||
633 | { | 640 | { | ||
634 | const bool newLockState = !GeneralSettings::lockPanels(); | 641 | const bool newLockState = !GeneralSettings::lockPanels(); | ||
635 | foreach (QObject* child, children()) { | 642 | foreach (QObject* child, children()) { | ||
636 | DolphinDockWidget* dock = qobject_cast<DolphinDockWidget*>(child); | 643 | DolphinDockWidget* dock = qobject_cast<DolphinDockWidget*>(child); | ||
637 | if (dock) { | 644 | if (dock) { | ||
638 | dock->setLocked(newLockState); | 645 | dock->setLocked(newLockState); | ||
▲ Show 20 Lines • Show All 971 Lines • Show Last 20 Lines |