Commit 42023831 authored by Felix Ernst's avatar Felix Ernst Committed by Elvis Angelaccio
Browse files

Apply Méven Car's suggestions

parent a418d622
...@@ -143,9 +143,6 @@ DolphinMainWindow::DolphinMainWindow() : ...@@ -143,9 +143,6 @@ DolphinMainWindow::DolphinMainWindow() :
setAcceptDrops(true); setAcceptDrops(true);
auto *navigatorsWidgetAction = new DolphinNavigatorsWidgetAction(this); auto *navigatorsWidgetAction = new DolphinNavigatorsWidgetAction(this);
navigatorsWidgetAction->setText(i18nc(
"@action:inmenu When split view is enabled there are two otherwise one.",
"Url Navigator(s)"));
actionCollection()->addAction(QStringLiteral("url_navigators"), navigatorsWidgetAction); actionCollection()->addAction(QStringLiteral("url_navigators"), navigatorsWidgetAction);
m_tabWidget = new DolphinTabWidget(navigatorsWidgetAction, this); m_tabWidget = new DolphinTabWidget(navigatorsWidgetAction, this);
m_tabWidget->setObjectName("tabWidget"); m_tabWidget->setObjectName("tabWidget");
...@@ -915,17 +912,17 @@ void DolphinMainWindow::goBack() ...@@ -915,17 +912,17 @@ void DolphinMainWindow::goBack()
void DolphinMainWindow::goForward() void DolphinMainWindow::goForward()
{ {
m_activeViewContainer->urlNavigator()->goForward(); m_activeViewContainer->urlNavigatorInternalWithHistory()->goForward();
} }
void DolphinMainWindow::goUp() void DolphinMainWindow::goUp()
{ {
m_activeViewContainer->urlNavigator()->goUp(); m_activeViewContainer->urlNavigatorInternalWithHistory()->goUp();
} }
void DolphinMainWindow::goHome() void DolphinMainWindow::goHome()
{ {
m_activeViewContainer->urlNavigator()->goHome(); m_activeViewContainer->urlNavigatorInternalWithHistory()->goHome();
} }
void DolphinMainWindow::goBackInNewTab() void DolphinMainWindow::goBackInNewTab()
......
...@@ -27,7 +27,10 @@ DolphinNavigatorsWidgetAction::DolphinNavigatorsWidgetAction(QWidget *parent) : ...@@ -27,7 +27,10 @@ DolphinNavigatorsWidgetAction::DolphinNavigatorsWidgetAction(QWidget *parent) :
m_globalXOfSecondary{-1}, m_globalXOfSecondary{-1},
m_widthOfSecondary{-1} m_widthOfSecondary{-1}
{ {
setText(i18nc("@action:inmenu", "Url navigator")); setText(i18nc(
"@action:inmenu When split view is enabled there are two otherwise one.",
"Url Navigator(s)"));
setIcon(QIcon::fromTheme(QStringLiteral("dialog-scripts")));
m_splitter->setChildrenCollapsible(false); m_splitter->setChildrenCollapsible(false);
setDefaultWidget(m_splitter.get()); setDefaultWidget(m_splitter.get());
...@@ -55,7 +58,7 @@ bool DolphinNavigatorsWidgetAction::addToToolbarAndSave(KXmlGuiWindow *mainWindo ...@@ -55,7 +58,7 @@ bool DolphinNavigatorsWidgetAction::addToToolbarAndSave(KXmlGuiWindow *mainWindo
QDomElement urlNavigatorElement = domDocument.createElement(QStringLiteral("Action")); QDomElement urlNavigatorElement = domDocument.createElement(QStringLiteral("Action"));
urlNavigatorElement.setAttribute(QStringLiteral("name"), QStringLiteral("url_navigators")); urlNavigatorElement.setAttribute(QStringLiteral("name"), QStringLiteral("url_navigators"));
QDomNode position = toolbar.lastChildElement(QStringLiteral("Spacer")); QDomNode position = toolbar.firstChildElement(QStringLiteral("Spacer"));
if (position.isNull()) { if (position.isNull()) {
toolbar.appendChild(urlNavigatorElement); toolbar.appendChild(urlNavigatorElement);
} else { } else {
...@@ -193,10 +196,10 @@ QWidget *DolphinNavigatorsWidgetAction::createNavigatorWidget(Side side) const ...@@ -193,10 +196,10 @@ QWidget *DolphinNavigatorsWidgetAction::createNavigatorWidget(Side side) const
layout->addWidget(emptyTrashButton); layout->addWidget(emptyTrashButton);
connect(urlNavigator, &KUrlNavigator::urlChanged, [this]() { connect(urlNavigator, &KUrlNavigator::urlChanged, [this]() {
// We have to wait for DolphinUrlNavigator::sizeHint() to update which // We have to wait for DolphinUrlNavigator::sizeHint() to update which
// happens a little bit later than when urlChanged is emitted. // happens a little bit later than when urlChanged is emitted.
this->m_adjustSpacingTimer->start(); this->m_adjustSpacingTimer->start();
}); });
auto trailingSpacing = new QWidget{navigatorWidget}; auto trailingSpacing = new QWidget{navigatorWidget};
layout->addWidget(trailingSpacing); layout->addWidget(trailingSpacing);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment