const DolphinView* view = controller->dolphinView();
connect(view, SIGNAL(showPreviewChanged()),
this, SLOT(slotShowPreviewChanged()));
- connect(view, SIGNAL(additionalInfoChanged(const KFileItemDelegate::InformationList&)),
- this, SLOT(slotAdditionalInfoChanged(const KFileItemDelegate::InformationList&)));
+ connect(view, SIGNAL(additionalInfoChanged()),
+ this, SLOT(slotAdditionalInfoChanged()));
connect(this, SIGNAL(entered(const QModelIndex&)),
this, SLOT(slotEntered(const QModelIndex&)));
const KFileItem item = itemForIndex(index);
if (!item.isNull() && item.isDir()) {
m_dropRect = visualRect(index);
+ } else {
+ m_dropRect.setSize(QSize()); // set as invalid
}
}
+ if (event->mimeData()->hasUrls()) {
+ // accept url drops, independently from the destination item
+ event->acceptProposedAction();
+ }
+
setDirtyRegion(m_dropRect);
}
// TODO: remove this code when the issue #160611 is solved in Qt 4.4
if (m_dragging) {
const QBrush& brush = viewOptions().palette.brush(QPalette::Normal, QPalette::Highlight);
- DragAndDropHelper::drawHoverIndication(viewport(), m_dropRect, brush);
+ DragAndDropHelper::drawHoverIndication(this, m_dropRect, brush);
}
}
updateGridSize(view->showPreview(), additionalInfoCount());
}
-void DolphinIconsView::slotAdditionalInfoChanged(const KFileItemDelegate::InformationList& info)
+void DolphinIconsView::slotAdditionalInfoChanged()
{
- const IconsModeSettings* settings = DolphinSettings::instance().iconsModeSettings();
- if (!settings->showAdditionalInfo()) {
- return;
- }
-
- const bool showPreview = m_controller->dolphinView()->showPreview();
- updateGridSize(showPreview, info.count());
+ const DolphinView* view = m_controller->dolphinView();
+ const bool showPreview = view->showPreview();
+ updateGridSize(showPreview, view->additionalInfo().count());
}
void DolphinIconsView::zoomIn()
int DolphinIconsView::additionalInfoCount() const
{
const DolphinView* view = m_controller->dolphinView();
- const IconsModeSettings* settings = DolphinSettings::instance().iconsModeSettings();
- return settings->showAdditionalInfo() ? view->additionalInfo().count() : 0;
+ return view->additionalInfo().count();
}
#include "dolphiniconsview.moc"