summaryrefslogtreecommitdiffstats
path: root/konqueror/iconview
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-04-15 03:03:58 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-04-15 03:03:58 -0500
commit41c013e06c430febb6a5353286573c968ca01440 (patch)
tree0fee1f29c1dc2ac11009aeef169cf9376303d22a /konqueror/iconview
parent9e4aad6b3bc3c1b4781a3c1cef6968640d4f6e67 (diff)
downloadtdebase-41c013e06c430febb6a5353286573c968ca01440.tar.gz
tdebase-41c013e06c430febb6a5353286573c968ca01440.zip
Fix a number of issues with the media tdeioslave
This relates to Bug 1450 Add media disk space overlay and enable by default
Diffstat (limited to 'konqueror/iconview')
-rw-r--r--konqueror/iconview/konq_iconview.cc37
1 files changed, 25 insertions, 12 deletions
diff --git a/konqueror/iconview/konq_iconview.cc b/konqueror/iconview/konq_iconview.cc
index 1ac7b2eb5..eadd0efcb 100644
--- a/konqueror/iconview/konq_iconview.cc
+++ b/konqueror/iconview/konq_iconview.cc
@@ -910,8 +910,9 @@ void KonqKfmIconView::slotCompleted()
{
// Stop the "refresh if busy too long" timer because a viewport
// update is coming.
- if ( m_pTimeoutRefreshTimer && m_pTimeoutRefreshTimer->isActive() )
+ if ( m_pTimeoutRefreshTimer && m_pTimeoutRefreshTimer->isActive() ) {
m_pTimeoutRefreshTimer->stop();
+ }
// If updates to the viewport are still blocked (so slotNewItems() has
// not been called), a viewport repaint is forced.
@@ -938,23 +939,25 @@ void KonqKfmIconView::slotCompleted()
extension()->urlArgs().yOffset );
}
- if ( m_pEnsureVisible ){
+ if ( m_pEnsureVisible ) {
m_pIconView->ensureItemVisible( m_pEnsureVisible );
m_pEnsureVisible = 0;
}
m_bUpdateContentsPosAfterListing = false;
- if ( !m_pIconView->firstItem() )
+ if ( !m_pIconView->firstItem() ) {
resetCount();
+ }
slotOnViewport();
// slotRenderingFinished will do it
m_bNeedEmitCompleted = true;
- if (m_pProps->isShowingPreview())
+ if (m_pProps->isShowingPreview()) {
m_mimeTypeResolver->start( 0 ); // We need the mimetypes asap
+ }
else
{
slotRenderingFinished(); // emit completed, we don't want the wheel...
@@ -972,8 +975,9 @@ void KonqKfmIconView::slotNewItems( const KFileItemList& entries )
{
// Stop the autorefresh timer since data to display has arrived and will
// be drawn in moments
- if ( m_pTimeoutRefreshTimer && m_pTimeoutRefreshTimer->isActive() )
+ if ( m_pTimeoutRefreshTimer && m_pTimeoutRefreshTimer->isActive() ) {
m_pTimeoutRefreshTimer->stop();
+ }
// We need to disable graphics updates on the iconview when
// inserting items, or else a blank paint operation will be
// performed on the top-left corner for each inserted item!
@@ -1003,7 +1007,7 @@ void KonqKfmIconView::slotNewItems( const KFileItemList& entries )
if ( fileItem->isDir() && m_pProps->isShowingDirectoryOverlays() ) {
showDirectoryOverlay(item);
}
- if ( fileItem->mimetype().startsWith("media/") && m_pProps->isShowingFreeSpaceOverlays() ) {
+ if ( fileItem->mimetype().startsWith("media/") && fileItem->mimetype().contains("_mounted") && m_pProps->isShowingFreeSpaceOverlays() ) {
showFreeSpaceOverlay(item);
}
@@ -1028,8 +1032,9 @@ void KonqKfmIconView::slotNewItems( const KFileItemList& entries )
item->setKey( key );
//kdDebug() << "KonqKfmIconView::slotNewItems " << (*it)->url().url() << " " << (*it)->mimeTypePtr()->name() << " mimetypeknown:" << (*it)->isMimeTypeKnown() << endl;
- if ( !(*it)->isMimeTypeKnown() )
+ if ( !(*it)->isMimeTypeKnown() ) {
m_mimeTypeResolver->m_lstPendingMimeIconItems.append( item );
+ }
m_itemDict.insert( *it, item );
}
@@ -1037,8 +1042,9 @@ void KonqKfmIconView::slotNewItems( const KFileItemList& entries )
m_pIconView->setUpdatesEnabled( true );
// Locking the viewport has filtered out blanking and now, since we
// have some items to draw, we can restore updating.
- if ( !m_pIconView->viewport()->isUpdatesEnabled() )
+ if ( !m_pIconView->viewport()->isUpdatesEnabled() ) {
m_pIconView->viewport()->setUpdatesEnabled( true );
+ }
KonqDirPart::newItems( entries );
}
@@ -1195,13 +1201,19 @@ void KonqKfmIconView::slotRefreshItems( const KFileItemList& entries )
bNeedPreviewJob = true;
ivi->invalidateThumbnail();
}
- else
+ else {
ivi->refreshIcon( true );
+ }
ivi->setText( rit.current()->text() );
- if ( rit.current()->isMimeTypeKnown() )
+ if ( rit.current()->isMimeTypeKnown() ) {
ivi->setMouseOverAnimation( rit.current()->iconName() );
- if ( !bNeedRepaint && oldSize != ivi->pixmap()->size() )
+ }
+ if ( !bNeedRepaint && oldSize != ivi->pixmap()->size() ) {
bNeedRepaint = true;
+ }
+ if ( (*rit)->mimetype().startsWith("media/") && (*rit)->mimetype().contains("_mounted") && m_pProps->isShowingFreeSpaceOverlays() ) {
+ showFreeSpaceOverlay(ivi);
+ }
}
}
@@ -1212,8 +1224,9 @@ void KonqKfmIconView::slotRefreshItems( const KFileItemList& entries )
else
{
// In case we replace a big icon with a small one, need to repaint.
- if ( bNeedRepaint )
+ if ( bNeedRepaint ) {
m_pIconView->updateContents();
+ }
}
}