Apply Méven Car's suggestions

This commit is contained in:
Felix Ernst 2020-11-05 16:28:13 +01:00 committed by Elvis Angelaccio
parent a418d6229e
commit 4202383137
2 changed files with 12 additions and 12 deletions

View file

@ -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()
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()

View file

@ -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
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 {