return;
}
- if (items.count() == 1) {
+ if (items.count() == 1 && GeneralSettings::renameInline()) {
const int index = m_model->index(items.first());
m_view->editRole(index, "text");
} else {
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);
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());
void DolphinView::slotRoleEditingFinished(int index, const QByteArray& role, const QVariant& value)
{
+ if (index < 0 || index >= m_model->count()) {
+ return;
+ }
+
if (role == "text") {
const KFileItem oldItem = m_model->fileItem(index);
const QString newName = value.toString();