summaryrefslogtreecommitdiff
path: root/noncore/applets/memoryapplet/swapfile.cpp
Unidiff
Diffstat (limited to 'noncore/applets/memoryapplet/swapfile.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/applets/memoryapplet/swapfile.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/noncore/applets/memoryapplet/swapfile.cpp b/noncore/applets/memoryapplet/swapfile.cpp
index 9416db3..a71078f 100644
--- a/noncore/applets/memoryapplet/swapfile.cpp
+++ b/noncore/applets/memoryapplet/swapfile.cpp
@@ -19,8 +19,14 @@
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "swapfile.h" 21#include "swapfile.h"
22 22
23/* OPIE */
24#include <opie2/odebug.h>
25#include <qpe/resource.h>
26using namespace Opie::Core;
27
28/* QT */
23#include <qfile.h> 29#include <qfile.h>
24#include <qtextstream.h> 30#include <qtextstream.h>
25#include <qlabel.h> 31#include <qlabel.h>
26#include <qtimer.h> 32#include <qtimer.h>
@@ -33,15 +39,14 @@
33#include <qcombobox.h> 39#include <qcombobox.h>
34#include <qvgroupbox.h> 40#include <qvgroupbox.h>
35#include <qhbox.h> 41#include <qhbox.h>
36#include <qmessagebox.h> 42#include <qmessagebox.h>
43#include <qcopchannel_qws.h>
44
45/* STD */
37#include <stdio.h> 46#include <stdio.h>
38#include <stdlib.h> 47#include <stdlib.h>
39#include <string.h> 48#include <string.h>
40
41#include <qcopchannel_qws.h>
42#include <qpe/resource.h>
43
44#include <unistd.h> 49#include <unistd.h>
45#include <fcntl.h> 50#include <fcntl.h>
46#include <sys/vfs.h> 51#include <sys/vfs.h>
47#include <mntent.h> 52#include <mntent.h>
@@ -53,13 +58,13 @@ Swapfile::Swapfile( QWidget *parent, const char *name, WFlags f )
53{ 58{
54 // are we running as root? 59 // are we running as root?
55 isRoot = geteuid() == 0; 60 isRoot = geteuid() == 0;
56 61
57 QVBoxLayout* vb = new QVBoxLayout(this, 5); 62 QVBoxLayout* vb = new QVBoxLayout(this, 5);
58 63
59 QHButtonGroup* cfsdRBG = new QHButtonGroup(tr("Swapfile location"), this); 64 QHButtonGroup* cfsdRBG = new QHButtonGroup(tr("Swapfile location"), this);
60 cfsdRBG->setRadioButtonExclusive(true); 65 cfsdRBG->setRadioButtonExclusive(true);
61 vb->addWidget(cfsdRBG); 66 vb->addWidget(cfsdRBG);
62 67
63 ramRB = new QRadioButton(tr("RAM"), cfsdRBG); 68 ramRB = new QRadioButton(tr("RAM"), cfsdRBG);
64 cfRB = new QRadioButton(tr("CF Card"), cfsdRBG); 69 cfRB = new QRadioButton(tr("CF Card"), cfsdRBG);
65 sdRB = new QRadioButton(tr("SD Card"), cfsdRBG); 70 sdRB = new QRadioButton(tr("SD Card"), cfsdRBG);
@@ -74,9 +79,9 @@ Swapfile::Swapfile( QWidget *parent, const char *name, WFlags f )
74 QPushButton* swapOff = new QPushButton(tr(" Off "), hb1); 79 QPushButton* swapOff = new QPushButton(tr(" Off "), hb1);
75 vb->addWidget(hb1); 80 vb->addWidget(hb1);
76 81
77 QVGroupBox* box1 = new QVGroupBox(tr("Manage Swapfile"), this); 82 QVGroupBox* box1 = new QVGroupBox(tr("Manage Swapfile"), this);
78 vb->addWidget(box1); 83 vb->addWidget(box1);
79 84
80 QHBox *hb2 = new QHBox(box1); 85 QHBox *hb2 = new QHBox(box1);
81 hb2->setSpacing(5); 86 hb2->setSpacing(5);
82 QPushButton* mkSwap = new QPushButton(tr("Generate"), hb2); 87 QPushButton* mkSwap = new QPushButton(tr("Generate"), hb2);
@@ -212,9 +217,9 @@ void Swapfile::getStatusPcmcia()
212 } 217 }
213 } 218 }
214 } else { 219 } else {
215 // no file found 220 // no file found
216 qDebug("no file found"); 221 odebug << "no file found" << oendl;
217 cardInPcmcia0 = FALSE; 222 cardInPcmcia0 = FALSE;
218 cardInPcmcia1 = FALSE; 223 cardInPcmcia1 = FALSE;
219 } 224 }
220 Swapfile::cfsdchecked(); 225 Swapfile::cfsdchecked();