summaryrefslogtreecommitdiff
path: root/noncore/settings/sysinfo/storage.cpp
Unidiff
Diffstat (limited to 'noncore/settings/sysinfo/storage.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/sysinfo/storage.cpp26
1 files changed, 18 insertions, 8 deletions
diff --git a/noncore/settings/sysinfo/storage.cpp b/noncore/settings/sysinfo/storage.cpp
index c33663e..5d6cd1b 100644
--- a/noncore/settings/sysinfo/storage.cpp
+++ b/noncore/settings/sysinfo/storage.cpp
@@ -22,2 +22,3 @@
22#include <qlayout.h> 22#include <qlayout.h>
23#include <qscrollview.h>
23#include <qtimer.h> 24#include <qtimer.h>
@@ -37,3 +38,11 @@ StorageInfo::StorageInfo( QWidget *parent, const char *name )
37{ 38{
38 vb = 0; 39 QVBoxLayout *tmpvb = new QVBoxLayout( this );
40 QScrollView *sv = new QScrollView( this );
41 tmpvb->addWidget( sv, 0, 0 );
42 sv->setResizePolicy( QScrollView::AutoOneFit );
43 sv->setFrameStyle( QFrame::NoFrame );
44 container = new QWidget( sv->viewport() );
45 sv->addChild( container );
46 vb = 0x0;
47
39 disks.setAutoDelete(TRUE); 48 disks.setAutoDelete(TRUE);
@@ -86,6 +95,5 @@ void StorageInfo::updateMounts()
86 QString fs = me->mnt_fsname; 95 QString fs = me->mnt_fsname;
87 qDebug(fs+" "+(QString)me->mnt_type);
88 if ( fs.left(7)=="/dev/hd" || fs.left(7)=="/dev/sd" 96 if ( fs.left(7)=="/dev/hd" || fs.left(7)=="/dev/sd"
89 || fs.left(8)=="/dev/mtd" || fs.left(9) == "/dev/mmcd" 97 || fs.left(8)=="/dev/mtd" || fs.left(9) == "/dev/mmcd"
90 || fs.left(9) == "/dev/root" || fs.left(5) == "/ramfs") { 98 || fs.left(9) == "/dev/root" || fs.left(5) == "/ramfs" || fs.left(5) == "tmpfs" ) {
91 n++; 99 n++;
@@ -108,3 +116,3 @@ void StorageInfo::updateMounts()
108 delete vb; 116 delete vb;
109 vb = new QVBoxLayout( this, n > 3 ? 1 : 5 ); 117 vb = new QVBoxLayout( container/*, n > 3 ? 1 : 5*/ );
110 bool frst=TRUE; 118 bool frst=TRUE;
@@ -117,3 +125,3 @@ void StorageInfo::updateMounts()
117 if ( !frst ) { 125 if ( !frst ) {
118 QFrame *f = new QFrame( this ); 126 QFrame *f = new QFrame( container );
119 vb->addWidget(f); 127 vb->addWidget(f);
@@ -124,3 +132,2 @@ void StorageInfo::updateMounts()
124 QString humanname=*it; 132 QString humanname=*it;
125// qDebug(humanname);
126 if ( isCF(humanname) ) 133 if ( isCF(humanname) )
@@ -143,2 +150,4 @@ void StorageInfo::updateMounts()
143 humanname = tr( "Int. Storage " ); 150 humanname = tr( "Int. Storage " );
151 else if ( humanname.left(5) == "tmpfs" )
152 humanname = tr( "RAM disk" );
144 // etc. 153 // etc.
@@ -149,3 +158,3 @@ void StorageInfo::updateMounts()
149 158
150 MountInfo* mi = new MountInfo( *fsit, humanname, this ); 159 MountInfo* mi = new MountInfo( *fsit, humanname, container );
151 vb->addWidget(mi); 160 vb->addWidget(mi);
@@ -165,2 +174,4 @@ void StorageInfo::updateMounts()
165 QWhatsThis::add( mi, tr( "This graph represents how much memory is currently used of the built-in memory (i.e. Flash memory) on this handheld device." ) ); 174 QWhatsThis::add( mi, tr( "This graph represents how much memory is currently used of the built-in memory (i.e. Flash memory) on this handheld device." ) );
175 else if ( tempstr == tr( "RA" ) )
176 QWhatsThis::add( mi, tr( "This graph represents how much memory is currently used of the temporary RAM disk." ) );
166 } 177 }
@@ -179,3 +190,2 @@ MountInfo::MountInfo( const QString &path, const QString &ttl, QWidget *parent,
179{ 190{
180 qDebug("new path is "+path);
181 fs = new FileSystem( path ); 191 fs = new FileSystem( path );