X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/67f58d5082cbab3a1a4a83926e77ade299ec07ea..894232ebda5b2cf155a4f4e5bf1287eb700faa18:/src/dolphinmainwindow.cpp diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 3eb9b7608..355bc6fd4 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -376,6 +376,13 @@ void DolphinMainWindow::changeUrl(const KUrl& url) } } +void DolphinMainWindow::slotTerminalDirectoryChanged(const KUrl& url) +{ + m_activeViewContainer->setAutoGrabFocus(false); + changeUrl(url); + m_activeViewContainer->setAutoGrabFocus(true); +} + void DolphinMainWindow::slotEditableStateChanged(bool editable) { KToggleAction* editableLocationAction = @@ -1424,6 +1431,11 @@ void DolphinMainWindow::slotControlButtonDeleted() m_updateToolBarTimer->start(); } +void DolphinMainWindow::slotPanelErrorMessage(const QString& error) +{ + activeViewContainer()->showMessage(error, DolphinViewContainer::Error); +} + void DolphinMainWindow::setActiveViewContainer(DolphinViewContainer* viewContainer) { Q_ASSERT(viewContainer); @@ -1700,6 +1712,8 @@ void DolphinMainWindow::setupDockWidgets() this, SLOT(changeUrl(KUrl))); connect(foldersPanel, SIGNAL(folderMiddleClicked(KUrl)), this, SLOT(openNewActivatedTab(KUrl))); + connect(foldersPanel, SIGNAL(errorMessage(QString)), + this, SLOT(slotPanelErrorMessage(QString))); // Setup "Terminal" #ifndef Q_OS_WIN @@ -1712,6 +1726,7 @@ void DolphinMainWindow::setupDockWidgets() terminalDock->setWidget(terminalPanel); connect(terminalPanel, SIGNAL(hideTerminalPanel()), terminalDock, SLOT(hide())); + connect(terminalPanel, SIGNAL(changeUrl(KUrl)), this, SLOT(slotTerminalDirectoryChanged(KUrl))); connect(terminalDock, SIGNAL(visibilityChanged(bool)), terminalPanel, SLOT(dockVisibilityChanged())); @@ -1738,14 +1753,7 @@ void DolphinMainWindow::setupDockWidgets() placesDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); PlacesPanel* placesPanel = new PlacesPanel(placesDock); - QAction* separator = new QAction(placesPanel); - separator->setSeparator(true); - QList placesActions; - placesActions.append(separator); - placesActions.append(lockLayoutAction); - //placesPanel->addActions(placesActions); - //placesPanel->setModel(DolphinPlacesModel::instance()); - //placesPanel->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + placesPanel->setCustomContextMenuActions(QList() << lockLayoutAction); placesDock->setWidget(placesPanel); QAction* placesAction = placesDock->toggleViewAction(); @@ -1756,6 +1764,8 @@ void DolphinMainWindow::setupDockWidgets() this, SLOT(changeUrl(KUrl))); connect(placesPanel, SIGNAL(placeMiddleClicked(KUrl)), this, SLOT(openNewActivatedTab(KUrl))); + connect(placesPanel, SIGNAL(errorMessage(QString)), + this, SLOT(slotPanelErrorMessage(QString))); connect(this, SIGNAL(urlChanged(KUrl)), placesPanel, SLOT(setUrl(KUrl))); connect(placesDock, SIGNAL(visibilityChanged(bool)),