X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/fa255857a05f1408fe1e1df8bc7c377a3058f655..509464cce954f7fc4b00a9dafc2bc6355eb99ec6:/src/views/dolphinview.cpp diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index b5dba04ad..05849729f 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -753,6 +753,20 @@ void DolphinView::hideEvent(QHideEvent* event) QWidget::hideEvent(event); } +bool DolphinView::event(QEvent* event) +{ + /* See Bug 297355 + * Dolphin leaves file preview tooltips open even when is not visible. + * + * Hide tool-tip when Dolphin loses focus. + */ + if (event->type() == QEvent::WindowDeactivate) { + hideToolTip(); + } + + return QWidget::event(event); +} + void DolphinView::activate() { setActive(true); @@ -778,6 +792,14 @@ void DolphinView::slotItemsActivated(const QSet& indexes) items.append(m_model->fileItem(index)); } + if (items.count() > 5) { + QString question = QString("Are you sure you want to open %1 items?").arg(items.count()); + const int answer = KMessageBox::warningYesNo(this, question); + if (answer != KMessageBox::Yes) { + return; + } + } + foreach (const KFileItem& item, items) { if (item.isDir()) { emit tabRequested(item.url());