summaryrefslogtreecommitdiffstats
path: root/kdesktop/kdiconview.cc
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-04-20 18:45:41 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-04-20 18:45:41 -0500
commit96d0c54e2e7939324f9403827f1546259d3d0e24 (patch)
treef8f619b45e9eee348811a46c8903b1776238f5d3 /kdesktop/kdiconview.cc
parente4ead57fdde94c8e56ec81a4534f89940b4d3c3c (diff)
downloadtdebase-96d0c54e2e7939324f9403827f1546259d3d0e24.tar.gz
tdebase-96d0c54e2e7939324f9403827f1546259d3d0e24.zip
Fix desktop refresh destroying media device information and menus
This resolves Bug 1450 Fix incorrect media device enable default setting in desktop control module
Diffstat (limited to 'kdesktop/kdiconview.cc')
-rw-r--r--kdesktop/kdiconview.cc16
1 files changed, 12 insertions, 4 deletions
diff --git a/kdesktop/kdiconview.cc b/kdesktop/kdiconview.cc
index cc2f0ba07..f5c38cde1 100644
--- a/kdesktop/kdiconview.cc
+++ b/kdesktop/kdiconview.cc
@@ -148,6 +148,7 @@ KDIconView::KDIconView( TQWidget *parent, const char* name )
m_eSortCriterion( NameCaseInsensitive ),
m_bSortDirectoriesFirst( true ),
m_itemsAlwaysFirst(),
+ m_enableMedia(false),
m_gotIconsArea(false),
m_needDesktopAlign(true),
m_paOutstandingOverlaysTimer( 0L )
@@ -397,7 +398,7 @@ void KDIconView::configureMedia()
}
}
m_mergeDirs.append(KURL("media:/"));
- m_dirLister->openURL(KURL("media:/"),true);
+ m_dirLister->openURL(KURL("media:/"), true);
}
else {
for (KURL::List::Iterator it2=m_mergeDirs.begin();it2!=m_mergeDirs.end();++it2) {
@@ -405,8 +406,10 @@ void KDIconView::configureMedia()
delete m_dirLister;
m_dirLister=0;
start();
-// m_mergeDirs.remove(it2);
-// m_dirLister->stop("media");
+ if (m_mergeDirs.contains(*it2)) {
+ m_mergeDirs.remove(*it2);
+ m_dirLister->stop("media");
+ }
return;
}
}
@@ -1307,10 +1310,15 @@ void KDIconView::refreshIcons()
for ( ; it ; it = it->nextItem() )
{
KFileIVI * fileIVI = static_cast<KFileIVI *>(it);
- fileIVI->item()->refresh();
+ if (!(fileIVI->item()->mimetype().startsWith("media/"))) {
+ fileIVI->item()->refresh();
+ }
fileIVI->refreshIcon( true );
makeFriendlyText( fileIVI );
}
+ if (m_enableMedia) {
+ m_dirLister->updateDirectory(KURL("media:/"));
+ }
}