summaryrefslogtreecommitdiff
path: root/noncore/applets/memoryapplet/swapfile.cpp
authormickeyl <mickeyl>2005-01-29 09:35:52 (UTC)
committer mickeyl <mickeyl>2005-01-29 09:35:52 (UTC)
commitd4cf8c6020c46e5dc97b75f3a9781ddc15416b3a (patch) (unidiff)
treec17be6e75e277c3fa0378f352f45766f75031cdb /noncore/applets/memoryapplet/swapfile.cpp
parentf85af28663814f3262f5ecfcd20a4b4f67c23067 (diff)
downloadopie-d4cf8c6020c46e5dc97b75f3a9781ddc15416b3a.zip
opie-d4cf8c6020c46e5dc97b75f3a9781ddc15416b3a.tar.gz
opie-d4cf8c6020c46e5dc97b75f3a9781ddc15416b3a.tar.bz2
fix 1505 and suck sysinfo files into the tree instead of cross referencing
eventually we may find that graph and load are of universal usage, then they should appear in some kind of library
Diffstat (limited to 'noncore/applets/memoryapplet/swapfile.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/applets/memoryapplet/swapfile.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/noncore/applets/memoryapplet/swapfile.cpp b/noncore/applets/memoryapplet/swapfile.cpp
index 96010c8..4609c13 100644
--- a/noncore/applets/memoryapplet/swapfile.cpp
+++ b/noncore/applets/memoryapplet/swapfile.cpp
@@ -90,7 +90,7 @@ Swapfile::Swapfile( QWidget *parent, const char *name, WFlags f )
90 QHBox *hb3 = new QHBox(box1); 90 QHBox *hb3 = new QHBox(box1);
91 hb3->setSpacing(5); 91 hb3->setSpacing(5);
92 swapSize = new QComboBox(hb3); 92 swapSize = new QComboBox(hb3);
93 swapSize->insertStringList(QStringList::split(",", tr("2 Mb,4 Mb,6 Mb,8 Mb"))); 93 swapSize->insertStringList(QStringList::split(",", tr("2 Mb,4 Mb,6 Mb,8 Mb,16 Mb,32 Mb,64 Mb")));
94 94
95 mkswapProgress = new QProgressBar(3, hb3); 95 mkswapProgress = new QProgressBar(3, hb3);
96 mkswapProgress->setCenterIndicator(true); 96 mkswapProgress->setCenterIndicator(true);
@@ -343,6 +343,13 @@ void Swapfile::makeswapfile()
343 break; 343 break;
344 case 3: rc=exec(QString("dd if=/dev/zero of=%1 bs=1k count=8192").arg(swapPath1->text())); 344 case 3: rc=exec(QString("dd if=/dev/zero of=%1 bs=1k count=8192").arg(swapPath1->text()));
345 break; 345 break;
346 case 4: rc=exec(QString("dd if=/dev/zero of=%1 bs=1k count=16384").arg(swapPath1->text()));
347 break;
348 case 5: rc=exec(QString("dd if=/dev/zero of=%1 bs=1k count=32768").arg(swapPath1->text()));
349 break;
350 case 6: rc=exec(QString("dd if=/dev/zero of=%1 bs=1k count=65536").arg(swapPath1->text()));
351 break;
352
346 } 353 }
347 if (rc != 0) { 354 if (rc != 0) {
348 setStatusMessage(tr("Failed to create swapfile."), true); 355 setStatusMessage(tr("Failed to create swapfile."), true);
@@ -431,6 +438,12 @@ void Swapfile::status()
431 break; 438 break;
432 case 8: swapSize->setCurrentItem(3); 439 case 8: swapSize->setCurrentItem(3);
433 break; 440 break;
441 case 16: swapSize->setCurrentItem(4);
442 break;
443 case 32: swapSize->setCurrentItem(5);
444 break;
445 case 64: swapSize->setCurrentItem(6);
446 break;
434 } 447 }
435 448
436 449