X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/2fcd3dd7887264b909ca2f8530f8b33ac76cf2be..f23e9496f303995557b744c03178f5dbd9b35016:/src/dolphinmainwindow.cpp diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 3b5f493ca..a379f31b0 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -42,7 +42,6 @@ #include "statusbar/dolphinstatusbar.h" #include "views/dolphinviewactionhandler.h" #include "views/dolphinremoteencoding.h" -#include "views/draganddrophelper.h" #include "views/viewproperties.h" #ifndef Q_OS_WIN @@ -161,8 +160,8 @@ DolphinMainWindow::DolphinMainWindow() : this, SLOT(showCommand(CommandType))); connect(DolphinSettings::instance().placesModel(), SIGNAL(errorMessage(const QString&)), this, SLOT(showErrorMessage(const QString&))); - connect(&DragAndDropHelper::instance(), SIGNAL(errorMessage(const QString&)), - this, SLOT(showErrorMessage(const QString&))); + //connect(&DragAndDropHelper::instance(), SIGNAL(errorMessage(const QString&)), + // this, SLOT(showErrorMessage(const QString&))); const DolphinSettings& settings = DolphinSettings::instance(); @@ -725,14 +724,14 @@ void DolphinMainWindow::readProperties(const KConfigGroup& group) void DolphinMainWindow::updateNewMenu() { - m_newFileMenu->setViewShowsHiddenFiles(activeViewContainer()->view()->showHiddenFiles()); + m_newFileMenu->setViewShowsHiddenFiles(activeViewContainer()->view()->hiddenFilesShown()); m_newFileMenu->checkUpToDate(); m_newFileMenu->setPopupFiles(activeViewContainer()->url()); } void DolphinMainWindow::createDirectory() { - m_newFileMenu->setViewShowsHiddenFiles(activeViewContainer()->view()->showHiddenFiles()); + m_newFileMenu->setViewShowsHiddenFiles(activeViewContainer()->view()->hiddenFilesShown()); m_newFileMenu->setPopupFiles(activeViewContainer()->url()); m_newFileMenu->createDirectory(); } @@ -1313,7 +1312,8 @@ void DolphinMainWindow::tabDropEvent(int tab, QDropEvent* event) if (!urls.isEmpty() && tab != -1) { const ViewTab& viewTab = m_viewTab[tab]; const KUrl destPath = viewTab.isPrimaryViewActive ? viewTab.primaryView->url() : viewTab.secondaryView->url(); - DragAndDropHelper::instance().dropUrls(KFileItem(), destPath, event, m_tabBar); + Q_UNUSED(destPath); + //DragAndDropHelper::instance().dropUrls(KFileItem(), destPath, event, m_tabBar); } } @@ -1479,6 +1479,8 @@ void DolphinMainWindow::updateToolBarMenu() connect(menu, SIGNAL(aboutToHide()), helpMenu, SLOT(deleteLater())); helpMenu->addAction(ac->action(KStandardAction::name(KStandardAction::HelpContents))); helpMenu->addAction(ac->action(KStandardAction::name(KStandardAction::WhatsThis))); + helpMenu->addAction(ac->action(KStandardAction::name(KStandardAction::ReportBug))); + helpMenu->addAction(ac->action(KStandardAction::name(KStandardAction::SwitchApplicationLanguage))); helpMenu->addAction(ac->action(KStandardAction::name(KStandardAction::AboutApp))); helpMenu->addAction(ac->action(KStandardAction::name(KStandardAction::AboutKDE))); menu->addMenu(helpMenu); @@ -1801,7 +1803,7 @@ void DolphinMainWindow::setupDockWidgets() connect(terminalPanel, SIGNAL(hideTerminalPanel()), terminalDock, SLOT(hide())); connect(terminalDock, SIGNAL(visibilityChanged(bool)), - terminalPanel, SLOT(visibilityChanged(bool))); + terminalPanel, SLOT(dockVisibilityChanged())); QAction* terminalAction = terminalDock->toggleViewAction(); terminalAction->setShortcut(Qt::Key_F4); @@ -2176,7 +2178,7 @@ void DolphinMainWindow::createSecondaryView(int tabIndex) const int newWidth = (m_viewTab[tabIndex].primaryView->width() - splitter->handleWidth()) / 2; const DolphinView* view = m_viewTab[tabIndex].primaryView->view(); - m_viewTab[tabIndex].secondaryView = createViewContainer(view->rootUrl(), 0); + m_viewTab[tabIndex].secondaryView = createViewContainer(view->url(), 0); splitter->addWidget(m_viewTab[tabIndex].secondaryView); splitter->setSizes(QList() << newWidth << newWidth); connectViewSignals(m_viewTab[tabIndex].secondaryView); @@ -2267,20 +2269,18 @@ void ToolBarMenu::showEvent(QShowEvent* event) // Assure that the menu is not shown outside the screen boundaries and // that it does not overlap with the parent button. const QRect screen = QApplication::desktop()->screenGeometry(QCursor::pos()); - if (pos.x() < 0) { - pos.rx() = 0; - } else if (pos.x() + width() >= screen.width()) { - pos.rx() = screen.width() - width(); + if (pos.x() < screen.x()) { + pos.rx() = screen.x(); + } else if (pos.x() + width() > screen.x() + screen.width()) { + pos.rx() = screen.x() + screen.width() - width(); } - if (pos.y() < 0) { - pos.ry() = 0; - } else if (pos.y() + height() >= screen.height()) { + if (pos.y() < screen.y()) { + pos.ry() = screen.y(); + } else if (pos.y() + height() > screen.y() + screen.height()) { pos.ry() = button->mapToGlobal(QPoint(0, 0)).y() - height(); } - pos += screen.topLeft(); - move(pos); }