mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-17 15:31:20 +00:00
Abort updateWindowTitle and activeViewChanged if not changed.
Summary: - Prevent activeViewChanged from updating the window if the view is the same view (happens at least once when starting up) - Stop updateWindowTitle from updating the title if its not changed. Reviewers: #dolphin, elvisangelaccio, broulik Reviewed By: #dolphin, elvisangelaccio, broulik Subscribers: anthonyfieroni, broulik, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D17882
This commit is contained in:
parent
d23b842a14
commit
784734ca16
|
@ -1008,7 +1008,10 @@ void DolphinMainWindow::tabCountChanged(int count)
|
||||||
|
|
||||||
void DolphinMainWindow::updateWindowTitle()
|
void DolphinMainWindow::updateWindowTitle()
|
||||||
{
|
{
|
||||||
setWindowTitle(m_activeViewContainer->caption());
|
const QString newTitle = m_activeViewContainer->caption();
|
||||||
|
if (windowTitle() != newTitle) {
|
||||||
|
setWindowTitle(newTitle);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DolphinMainWindow::slotStorageTearDownFromPlacesRequested(const QString& mountPath)
|
void DolphinMainWindow::slotStorageTearDownFromPlacesRequested(const QString& mountPath)
|
||||||
|
|
|
@ -320,7 +320,10 @@ void DolphinTabPage::slotViewActivated()
|
||||||
|
|
||||||
const DolphinView* newActiveView = activeViewContainer()->view();
|
const DolphinView* newActiveView = activeViewContainer()->view();
|
||||||
|
|
||||||
if (newActiveView != oldActiveView) {
|
if (newActiveView == oldActiveView) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
disconnect(oldActiveView, &DolphinView::urlChanged,
|
disconnect(oldActiveView, &DolphinView::urlChanged,
|
||||||
this, &DolphinTabPage::activeViewUrlChanged);
|
this, &DolphinTabPage::activeViewUrlChanged);
|
||||||
disconnect(oldActiveView, &DolphinView::redirection,
|
disconnect(oldActiveView, &DolphinView::redirection,
|
||||||
|
@ -329,8 +332,6 @@ void DolphinTabPage::slotViewActivated()
|
||||||
this, &DolphinTabPage::activeViewUrlChanged);
|
this, &DolphinTabPage::activeViewUrlChanged);
|
||||||
connect(newActiveView, &DolphinView::redirection,
|
connect(newActiveView, &DolphinView::redirection,
|
||||||
this, &DolphinTabPage::slotViewUrlRedirection);
|
this, &DolphinTabPage::slotViewUrlRedirection);
|
||||||
}
|
|
||||||
|
|
||||||
emit activeViewChanged(activeViewContainer());
|
emit activeViewChanged(activeViewContainer());
|
||||||
emit activeViewUrlChanged(activeViewContainer()->url());
|
emit activeViewUrlChanged(activeViewContainer()->url());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue