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.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/applets/memoryapplet/swapfile.cpp b/noncore/applets/memoryapplet/swapfile.cpp
index 04da8bb..9416db3 100644
--- a/noncore/applets/memoryapplet/swapfile.cpp
+++ b/noncore/applets/memoryapplet/swapfile.cpp
@@ -89,51 +89,51 @@ Swapfile::Swapfile( QWidget *parent, const char *name, WFlags f )
89 89
90 mkswapProgress = new QProgressBar(3, hb3); 90 mkswapProgress = new QProgressBar(3, hb3);
91 mkswapProgress->setCenterIndicator(true); 91 mkswapProgress->setCenterIndicator(true);
92 92
93 QHBox *hb4 = new QHBox(this); 93 QHBox *hb4 = new QHBox(this);
94 hb4->setSpacing(5); 94 hb4->setSpacing(5);
95 95
96 swapStatusIcon = new QLabel(hb4); 96 swapStatusIcon = new QLabel(hb4);
97 swapStatus = new QLabel(tr(""), hb4); 97 swapStatus = new QLabel(tr(""), hb4);
98 hb4->setStretchFactor(swapStatus, 99); 98 hb4->setStretchFactor(swapStatus, 99);
99 vb->addWidget(hb4); 99 vb->addWidget(hb4);
100 100
101 connect(swapOn, SIGNAL(clicked()), this, SLOT(swapon())); 101 connect(swapOn, SIGNAL(clicked()), this, SLOT(swapon()));
102 connect(swapOff, SIGNAL(clicked()), this, SLOT(swapoff())); 102 connect(swapOff, SIGNAL(clicked()), this, SLOT(swapoff()));
103 connect(cfRB, SIGNAL(clicked()), this, SLOT(cfsdchecked())); 103 connect(cfRB, SIGNAL(clicked()), this, SLOT(cfsdchecked()));
104 connect(sdRB, SIGNAL(clicked()), this, SLOT(cfsdchecked())); 104 connect(sdRB, SIGNAL(clicked()), this, SLOT(cfsdchecked()));
105 connect(ramRB, SIGNAL(clicked()), this, SLOT(cfsdchecked())); 105 connect(ramRB, SIGNAL(clicked()), this, SLOT(cfsdchecked()));
106 connect(mkSwap, SIGNAL(clicked()), this, SLOT(makeswapfile())); 106 connect(mkSwap, SIGNAL(clicked()), this, SLOT(makeswapfile()));
107 connect(rmSwap, SIGNAL(clicked()), this, SLOT(removeswapfile())); 107 connect(rmSwap, SIGNAL(clicked()), this, SLOT(removeswapfile()));
108 108
109 cfRB->setEnabled(FALSE); 109 cfRB->setEnabled(FALSE);
110 sdRB->setEnabled(FALSE); 110 sdRB->setEnabled(FALSE);
111 111
112 QCopChannel *pcmciaChannel = new QCopChannel("QPE/Card", this); 112 QCopChannel *pcmciaChannel = new QCopChannel("QPE/Card", this);
113 connect(pcmciaChannel, SIGNAL(received(const QCString &, const QByteArray &)), this, SLOT(cardnotify(const QCString &, const QByteArray &))); 113 connect(pcmciaChannel, SIGNAL(received(const QCString&,const QByteArray&)), this, SLOT(cardnotify(const QCString&,const QByteArray&)));
114 QCopChannel *sdChannel = new QCopChannel("QPE/Card", this); 114 QCopChannel *sdChannel = new QCopChannel("QPE/Card", this);
115 connect(sdChannel, SIGNAL(received(const QCString &, const QByteArray &)), this, SLOT(cardnotify(const QCString &, const QByteArray &))); 115 connect(sdChannel, SIGNAL(received(const QCString&,const QByteArray&)), this, SLOT(cardnotify(const QCString&,const QByteArray&)));
116 116
117 cardInPcmcia0 = FALSE; 117 cardInPcmcia0 = FALSE;
118 cardInPcmcia1 = FALSE; 118 cardInPcmcia1 = FALSE;
119 cardInSd = FALSE; 119 cardInSd = FALSE;
120 120
121 Swapfile::status(); 121 Swapfile::status();
122 Swapfile::getStatusPcmcia(); 122 Swapfile::getStatusPcmcia();
123 Swapfile::getStatusSd(); 123 Swapfile::getStatusSd();
124} 124}
125 125
126int Swapfile::exec(const QString& arg) 126int Swapfile::exec(const QString& arg)
127{ 127{
128 return system((!isRoot ? "sudo " : "") + arg); 128 return system((!isRoot ? "sudo " : "") + arg);
129} 129}
130 130
131 131
132Swapfile::~Swapfile() 132Swapfile::~Swapfile()
133{ 133{
134} 134}
135 135
136void Swapfile::cardnotify(const QCString & msg, const QByteArray &) 136void Swapfile::cardnotify(const QCString & msg, const QByteArray &)
137{ 137{
138 if (msg == "stabChanged()") 138 if (msg == "stabChanged()")
139 { 139 {