summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2005-01-15 23:01:55 (UTC)
committer mickeyl <mickeyl>2005-01-15 23:01:55 (UTC)
commit490b0398b7e11f1485b902a6d9b99b9152be2492 (patch) (side-by-side diff)
tree8db1a44b807c5eab120cc23d5450440cd5ea59ca
parent9cdc5a15a6eaae0ddb782c5bd98210dc462c4621 (diff)
downloadopie-490b0398b7e11f1485b902a6d9b99b9152be2492.zip
opie-490b0398b7e11f1485b902a6d9b99b9152be2492.tar.gz
opie-490b0398b7e11f1485b902a6d9b99b9152be2492.tar.bz2
remove tmpfs entry which confuses users and show mountpoints. patches courtesy hrw
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sysinfo/storage.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/noncore/settings/sysinfo/storage.cpp b/noncore/settings/sysinfo/storage.cpp
index fc583e3..9f70fc5 100644
--- a/noncore/settings/sysinfo/storage.cpp
+++ b/noncore/settings/sysinfo/storage.cpp
@@ -61,48 +61,53 @@ FileSysInfo::FileSysInfo( QWidget *parent, const char *name )
void FileSysInfo::timerEvent(QTimerEvent*)
{
updateMounts();
}
void FileSysInfo::updateMounts()
{
storage->update();
if ( rebuildDisks )
{
disks.clear();
lines.clear();
delete vb;
vb = new QVBoxLayout( container/*, n > 3 ? 1 : 5*/ );
bool frst=TRUE;
FileSystem *fs;
for ( QListIterator<FileSystem> it(storage->fileSystems()); it.current(); ++it )
{
fs = it.current();
+ if(fs->disk().left(5) == "tmpfs")
+ {
+ continue;
+ }
+
if ( !frst )
{
QFrame *f = new QFrame( container );
vb->addWidget(f);
f->setFrameStyle( QFrame::HLine | QFrame::Sunken );
lines.append(f);
f->show();
}
frst = FALSE;
MountInfo *mi = new MountInfo( fs, container );
vb->addWidget( mi );
disks.insert( fs->path(), mi );
mi->show();
QString tempstr = fs->name().left( 2 );
if ( tempstr == tr( "CF" ) )
QWhatsThis::add( mi, tr( "This graph represents how much memory is currently used on this Compact Flash memory card." ) );
else if ( tempstr == tr( "Ha" ) )
QWhatsThis::add( mi, tr( "This graph represents how much storage is currently used on this hard drive." ) );
else if ( tempstr == tr( "SD" ) )
QWhatsThis::add( mi, tr( "This graph represents how much memory is currently used on this Secure Digital memory card." ) );
else if ( tempstr == tr( "SC" ) )
QWhatsThis::add( mi, tr( "This graph represents how much storage is currently used on this hard drive." ) );
else if ( tempstr == tr( "In" ) )
@@ -114,49 +119,49 @@ void FileSysInfo::updateMounts()
}
else
{
for (QDictIterator<MountInfo> i(disks); i.current(); ++i)
i.current()->updateData();
}
rebuildDisks = FALSE;
}
void FileSysInfo::disksChanged()
{
rebuildDisks = TRUE;
}
MountInfo::MountInfo( FileSystem *filesys, QWidget *parent, const char *name )
: QWidget( parent, name )
{
QVBoxLayout *vb = new QVBoxLayout( this, 3 );
totalSize = new QLabel( this );
vb->addWidget( totalSize );
fs = filesys;
- title = fs->name();
+ title = fs->name() + "\t (" + fs->path() + ')';
data = new GraphData();
graph = new BarGraph( this );
graph->setFrameStyle( QFrame::Panel | QFrame::Sunken );
vb->addWidget( graph, 1 );
graph->setData( data );
legend = new GraphLegend( this );
legend->setOrientation(Horizontal);
vb->addWidget( legend );
legend->setData( data );
updateData();
}
MountInfo::~MountInfo()
{
delete data;
}
void MountInfo::updateData()
{
long mult = fs->blockSize() / 1024;
long div = 1024 / fs->blockSize();