summaryrefslogtreecommitdiff
path: root/noncore/applets/memoryapplet/swapfile.cpp
Side-by-side diff
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
@@ -92,3 +92,3 @@ Swapfile::Swapfile( QWidget *parent, const char *name, WFlags f )
swapSize = new QComboBox(hb3);
- swapSize->insertStringList(QStringList::split(",", tr("2 Mb,4 Mb,6 Mb,8 Mb")));
+ swapSize->insertStringList(QStringList::split(",", tr("2 Mb,4 Mb,6 Mb,8 Mb,16 Mb,32 Mb,64 Mb")));
@@ -345,2 +345,9 @@ void Swapfile::makeswapfile()
break;
+ case 4: rc=exec(QString("dd if=/dev/zero of=%1 bs=1k count=16384").arg(swapPath1->text()));
+ break;
+ case 5: rc=exec(QString("dd if=/dev/zero of=%1 bs=1k count=32768").arg(swapPath1->text()));
+ break;
+ case 6: rc=exec(QString("dd if=/dev/zero of=%1 bs=1k count=65536").arg(swapPath1->text()));
+ break;
+
}
@@ -433,2 +440,8 @@ void Swapfile::status()
break;
+ case 16: swapSize->setCurrentItem(4);
+ break;
+ case 32: swapSize->setCurrentItem(5);
+ break;
+ case 64: swapSize->setCurrentItem(6);
+ break;
}