]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/statusbarspaceinfo.cpp
The feature freeze is near: Add video support to the Information Panel. Phonon is...
[dolphin.git] / src / statusbarspaceinfo.cpp
index ba37a82a585feea13b994146b585c18a55dade26..c9173b8f9ef2feee26d18ca34c8ed2dbda5cbe7b 100644 (file)
@@ -56,6 +56,7 @@ void StatusBarSpaceInfo::showEvent(QShowEvent* event)
 {
     KCapacityBar::showEvent(event);
     if (!event->spontaneous()) {
+        refresh();
         m_timer->start(10000);
     }
 }
@@ -71,7 +72,7 @@ void StatusBarSpaceInfo::refresh()
     if (!isVisible()) {
         return;
     }
-    
+
     // KDiskFreeSpace is for local paths only
     if (!m_url.isLocalFile()) {
         setText(i18nc("@info:status", "Unknown size"));
@@ -80,7 +81,7 @@ void StatusBarSpaceInfo::refresh()
         return;
     }
 
-    KMountPoint::Ptr mp = KMountPoint::currentMountPoints().findByPath(m_url.path());
+    KMountPoint::Ptr mp = KMountPoint::currentMountPoints().findByPath(m_url.toLocalFile());
     if (!mp) {
         return;
     }
@@ -100,7 +101,7 @@ void StatusBarSpaceInfo::refresh()
     if (valuesChanged) {
         setText(i18nc("@info:status Free disk space", "%1 free",
                 KIO::convertSize(job.available())));
-        
+
         setUpdatesEnabled(false);
         m_kBSize = kBSize;
         setValue(kBSize > 0 ? (kBUsed * 100) / kBSize : 0);