mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
adaptions to the cleaned up interface of KUrlNavigator
svn path=/trunk/KDE/kdebase/apps/; revision=651675
This commit is contained in:
parent
e00bcf4ee7
commit
714d08f17c
2 changed files with 4 additions and 6 deletions
|
@ -1351,11 +1351,12 @@ void DolphinMainWindow::setupDockWidgets()
|
||||||
|
|
||||||
void DolphinMainWindow::updateHistory()
|
void DolphinMainWindow::updateHistory()
|
||||||
{
|
{
|
||||||
int index = 0;
|
const KUrlNavigator* urlNavigator = m_activeView->urlNavigator();
|
||||||
|
const int index = urlNavigator->historyIndex();
|
||||||
|
|
||||||
QAction* backAction = actionCollection()->action("go_back");
|
QAction* backAction = actionCollection()->action("go_back");
|
||||||
if (backAction != 0) {
|
if (backAction != 0) {
|
||||||
backAction->setEnabled(index < m_activeView->urlNavigator()->historySize() - 1);
|
backAction->setEnabled(index < urlNavigator->historySize() - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
QAction* forwardAction = actionCollection()->action("go_forward");
|
QAction* forwardAction = actionCollection()->action("go_forward");
|
||||||
|
|
|
@ -100,7 +100,6 @@ DolphinView::DolphinView(DolphinMainWindow* mainWindow,
|
||||||
m_urlNavigator = new KUrlNavigator(new KFilePlacesModel(this), url, this);
|
m_urlNavigator = new KUrlNavigator(new KFilePlacesModel(this), url, this);
|
||||||
m_urlNavigator->setUrlEditable(DolphinSettings::instance().generalSettings()->editableUrl());
|
m_urlNavigator->setUrlEditable(DolphinSettings::instance().generalSettings()->editableUrl());
|
||||||
m_urlNavigator->setHomeUrl(DolphinSettings::instance().generalSettings()->homeUrl());
|
m_urlNavigator->setHomeUrl(DolphinSettings::instance().generalSettings()->homeUrl());
|
||||||
m_urlNavigator->setShowHiddenFiles(showHiddenFiles);
|
|
||||||
connect(m_urlNavigator, SIGNAL(urlChanged(const KUrl&)),
|
connect(m_urlNavigator, SIGNAL(urlChanged(const KUrl&)),
|
||||||
this, SLOT(loadDirectory(const KUrl&)));
|
this, SLOT(loadDirectory(const KUrl&)));
|
||||||
connect(m_urlNavigator, SIGNAL(urlsDropped(const KUrl::List&, const KUrl&)),
|
connect(m_urlNavigator, SIGNAL(urlsDropped(const KUrl::List&, const KUrl&)),
|
||||||
|
@ -108,7 +107,7 @@ DolphinView::DolphinView(DolphinMainWindow* mainWindow,
|
||||||
connect(m_urlNavigator, SIGNAL(activated()),
|
connect(m_urlNavigator, SIGNAL(activated()),
|
||||||
this, SLOT(requestActivation()));
|
this, SLOT(requestActivation()));
|
||||||
connect(this, SIGNAL(contentsMoved(int, int)),
|
connect(this, SIGNAL(contentsMoved(int, int)),
|
||||||
m_urlNavigator, SLOT(storeContentsPosition(int, int)));
|
m_urlNavigator, SLOT(savePosition(int, int)));
|
||||||
|
|
||||||
m_statusBar = new DolphinStatusBar(this);
|
m_statusBar = new DolphinStatusBar(this);
|
||||||
|
|
||||||
|
@ -246,8 +245,6 @@ void DolphinView::setShowHiddenFiles(bool show)
|
||||||
props.save();
|
props.save();
|
||||||
|
|
||||||
m_dirLister->setShowingDotFiles(show);
|
m_dirLister->setShowingDotFiles(show);
|
||||||
m_urlNavigator->setShowHiddenFiles(show);
|
|
||||||
|
|
||||||
emit showHiddenFilesChanged();
|
emit showHiddenFilesChanged();
|
||||||
|
|
||||||
reload();
|
reload();
|
||||||
|
|
Loading…
Reference in a new issue