Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
System
Dolphin
Commits
42023831
Commit
42023831
authored
Nov 05, 2020
by
Felix Ernst
🇺🇦
Committed by
Elvis Angelaccio
Nov 09, 2020
Browse files
Apply Méven Car's suggestions
parent
a418d622
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/dolphinmainwindow.cpp
View file @
42023831
...
...
@@ -143,9 +143,6 @@ DolphinMainWindow::DolphinMainWindow() :
setAcceptDrops
(
true
);
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
);
m_tabWidget
=
new
DolphinTabWidget
(
navigatorsWidgetAction
,
this
);
m_tabWidget
->
setObjectName
(
"tabWidget"
);
...
...
@@ -915,17 +912,17 @@ void DolphinMainWindow::goBack()
void
DolphinMainWindow
::
goForward
()
{
m_activeViewContainer
->
urlNavigator
()
->
goForward
();
m_activeViewContainer
->
urlNavigator
InternalWithHistory
()
->
goForward
();
}
void
DolphinMainWindow
::
goUp
()
{
m_activeViewContainer
->
urlNavigator
()
->
goUp
();
m_activeViewContainer
->
urlNavigator
InternalWithHistory
()
->
goUp
();
}
void
DolphinMainWindow
::
goHome
()
{
m_activeViewContainer
->
urlNavigator
()
->
goHome
();
m_activeViewContainer
->
urlNavigator
InternalWithHistory
()
->
goHome
();
}
void
DolphinMainWindow
::
goBackInNewTab
()
...
...
src/dolphinnavigatorswidgetaction.cpp
View file @
42023831
...
...
@@ -27,7 +27,10 @@ DolphinNavigatorsWidgetAction::DolphinNavigatorsWidgetAction(QWidget *parent) :
m_globalXOfSecondary
{
-
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
);
setDefaultWidget
(
m_splitter
.
get
());
...
...
@@ -55,7 +58,7 @@ bool DolphinNavigatorsWidgetAction::addToToolbarAndSave(KXmlGuiWindow *mainWindo
QDomElement
urlNavigatorElement
=
domDocument
.
createElement
(
QStringLiteral
(
"Action"
));
urlNavigatorElement
.
setAttribute
(
QStringLiteral
(
"name"
),
QStringLiteral
(
"url_navigators"
));
QDomNode
position
=
toolbar
.
la
stChildElement
(
QStringLiteral
(
"Spacer"
));
QDomNode
position
=
toolbar
.
fir
stChildElement
(
QStringLiteral
(
"Spacer"
));
if
(
position
.
isNull
())
{
toolbar
.
appendChild
(
urlNavigatorElement
);
}
else
{
...
...
@@ -193,10 +196,10 @@ QWidget *DolphinNavigatorsWidgetAction::createNavigatorWidget(Side side) const
layout
->
addWidget
(
emptyTrashButton
);
connect
(
urlNavigator
,
&
KUrlNavigator
::
urlChanged
,
[
this
]()
{
// We have to wait for DolphinUrlNavigator::sizeHint() to update which
// happens a little bit later than when urlChanged is emitted.
this
->
m_adjustSpacingTimer
->
start
();
});
// We have to wait for DolphinUrlNavigator::sizeHint() to update which
// happens a little bit later than when urlChanged is emitted.
this
->
m_adjustSpacingTimer
->
start
();
});
auto
trailingSpacing
=
new
QWidget
{
navigatorWidget
};
layout
->
addWidget
(
trailingSpacing
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment