┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphiniconsview.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2007-10-26 17:36:16 +0000
committerPeter Penz <[email protected]>2007-10-26 17:36:16 +0000
commitf11c699fa203dd2cde0e85c63a6d186e3fa6a3de (patch)
tree1ef300c9ed2f6406dd4b1a893162a4e34fc8428a /src/dolphiniconsview.cpp
parent6c1153092ee766c2668ce125a72090da162ed4ab (diff)
due to the recent tagging freeze this commit contains several fixes in one:
* the filterbar now also filters directories (works also in the column-view :-)) * The "Additional Information" menu entry now also works for showing/hiding the columns of the details view. This also implies that the columns for the details view can now be adjusted per directory -> we have now a consistent behavior between the icons view and details view. Still open: the view properties dialog must be fixed * Don't show a "Nepomuk not available" error message when starting Dolphin and Nepomuk is not available. * Fix issue that the information panel blocked the application because of parsing the full meta data of a huge file. svn path=/trunk/KDE/kdebase/apps/; revision=729704
Diffstat (limited to 'src/dolphiniconsview.cpp')
-rw-r--r--src/dolphiniconsview.cpp33
1 files changed, 20 insertions, 13 deletions
diff --git a/src/dolphiniconsview.cpp b/src/dolphiniconsview.cpp
index 7b8fa869d..5107d5697 100644
--- a/src/dolphiniconsview.cpp
+++ b/src/dolphiniconsview.cpp
@@ -63,8 +63,8 @@ DolphinIconsView::DolphinIconsView(QWidget* parent, DolphinController* controlle
controller, SLOT(emitViewportEntered()));
connect(controller, SIGNAL(showPreviewChanged(bool)),
this, SLOT(slotShowPreviewChanged(bool)));
- connect(controller, SIGNAL(additionalInfoCountChanged(int)),
- this, SLOT(slotAdditionalInfoCountChanged(int)));
+ connect(controller->dolphinView(), SIGNAL(additionalInfoChanged(const KFileItemDelegate::InformationList&)),
+ this, SLOT(slotAdditionalInfoChanged(const KFileItemDelegate::InformationList&)));
connect(controller, SIGNAL(zoomIn()),
this, SLOT(zoomIn()));
connect(controller, SIGNAL(zoomOut()),
@@ -86,7 +86,7 @@ DolphinIconsView::DolphinIconsView(QWidget* parent, DolphinController* controlle
m_viewOptions.font = font;
setWordWrap(settings->numberOfTextlines() > 1);
- updateGridSize(controller->showPreview(), controller->additionalInfoCount());
+ updateGridSize(controller->showPreview(), 0);
if (settings->arrangement() == QListView::TopToBottom) {
setFlow(QListView::LeftToRight);
@@ -195,11 +195,15 @@ void DolphinIconsView::dropEvent(QDropEvent* event)
if (!selectionModel()->isSelected(indexAt(event->pos()))) {
const KUrl::List urls = KUrl::List::fromMimeData(event->mimeData());
if (!urls.isEmpty()) {
- m_controller->indicateDroppedUrls(urls,
- m_controller->url(),
- indexAt(event->pos()),
- event->source());
- event->acceptProposedAction();
+ const QModelIndex index = indexAt(event->pos());
+ if (index.isValid()) {
+ const KFileItem item = itemForIndex(index);
+ m_controller->indicateDroppedUrls(urls,
+ m_controller->url(),
+ item,
+ event->source());
+ event->acceptProposedAction();
+ }
}
}
@@ -244,12 +248,13 @@ void DolphinIconsView::slotEntered(const QModelIndex& index)
void DolphinIconsView::slotShowPreviewChanged(bool showPreview)
{
- updateGridSize(showPreview, m_controller->additionalInfoCount());
+ const int infoCount = m_controller->dolphinView()->additionalInfo().count();
+ updateGridSize(showPreview, infoCount);
}
-void DolphinIconsView::slotAdditionalInfoCountChanged(int count)
+void DolphinIconsView::slotAdditionalInfoChanged(const KFileItemDelegate::InformationList& info)
{
- updateGridSize(m_controller->showPreview(), count);
+ updateGridSize(m_controller->showPreview(), info.count());
}
void DolphinIconsView::zoomIn()
@@ -278,7 +283,8 @@ void DolphinIconsView::zoomIn()
settings->setItemWidth(settings->itemWidth() + diff);
settings->setItemHeight(settings->itemHeight() + diff);
- updateGridSize(showPreview, m_controller->additionalInfoCount());
+ const int infoCount = m_controller->dolphinView()->additionalInfo().count();
+ updateGridSize(showPreview, infoCount);
}
}
@@ -309,7 +315,8 @@ void DolphinIconsView::zoomOut()
settings->setItemWidth(settings->itemWidth() - diff);
settings->setItemHeight(settings->itemHeight() - diff);
- updateGridSize(showPreview, m_controller->additionalInfoCount());
+ const int infoCount = m_controller->dolphinView()->additionalInfo().count();
+ updateGridSize(showPreview, infoCount);
}
}