summaryrefslogtreecommitdiff
path: root/noncore/applets
authormickeyl <mickeyl>2005-06-17 13:47:42 (UTC)
committer mickeyl <mickeyl>2005-06-17 13:47:42 (UTC)
commitc36e39b5b1e450e64d4c38cb59e56048a2bec258 (patch) (unidiff)
tree0e796a165a2e4ce8e24b8b79f15bb58f4265a7bb /noncore/applets
parent0e11eb29a20ff6bff533a07ff604ed858237f82b (diff)
downloadopie-c36e39b5b1e450e64d4c38cb59e56048a2bec258.zip
opie-c36e39b5b1e450e64d4c38cb59e56048a2bec258.tar.gz
opie-c36e39b5b1e450e64d4c38cb59e56048a2bec258.tar.bz2
- disable DEBUG in opcmciasystem
- fix suspend/resume logic
Diffstat (limited to 'noncore/applets') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/applets/pcmcia/pcmcia.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/noncore/applets/pcmcia/pcmcia.cpp b/noncore/applets/pcmcia/pcmcia.cpp
index aea699f..99c1bc9 100644
--- a/noncore/applets/pcmcia/pcmcia.cpp
+++ b/noncore/applets/pcmcia/pcmcia.cpp
@@ -57,6 +57,7 @@ using namespace Opie::Ui;
57#include <unistd.h> 57#include <unistd.h>
58#include <stdlib.h> 58#include <stdlib.h>
59#include <string.h> 59#include <string.h>
60#include <errno.h>
60#include <fcntl.h> 61#include <fcntl.h>
61#if defined(_OS_LINUX_) || defined(Q_OS_LINUX) 62#if defined(_OS_LINUX_) || defined(Q_OS_LINUX)
62#include <sys/vfs.h> 63#include <sys/vfs.h>
@@ -136,8 +137,8 @@ void PcmciaManager::mousePressEvent( QMouseEvent* )
136 137
137 submenu->setItemEnabled( EJECT+i*100, !it.current()->isEmpty() ); 138 submenu->setItemEnabled( EJECT+i*100, !it.current()->isEmpty() );
138 submenu->setItemEnabled( INSERT+i*100, it.current()->isEmpty() ); 139 submenu->setItemEnabled( INSERT+i*100, it.current()->isEmpty() );
139 submenu->setItemEnabled( SUSPEND+i*100, !it.current()->isEmpty() && !it.current()->isSuspended() ); 140 submenu->setItemEnabled( SUSPEND+i*100, !it.current()->isEmpty() && it.current()->isSuspended() );
140 submenu->setItemEnabled( RESUME+i*100, !it.current()->isEmpty() && it.current()->isSuspended() ); 141 submenu->setItemEnabled( RESUME+i*100, !it.current()->isEmpty() && !it.current()->isSuspended() );
141 submenu->setItemEnabled( CONFIGURE+i*100, !it.current()->isEmpty() && !configuring ); 142 submenu->setItemEnabled( CONFIGURE+i*100, !it.current()->isEmpty() && !configuring );
142 143
143 connect( submenu, SIGNAL(activated(int)), this, SLOT(userCardAction(int)) ); 144 connect( submenu, SIGNAL(activated(int)), this, SLOT(userCardAction(int)) );
@@ -259,7 +260,7 @@ void PcmciaManager::execCommand( const QStringList &strList )
259 260
260void PcmciaManager::userCardAction( int action ) 261void PcmciaManager::userCardAction( int action )
261{ 262{
262 odebug << "user action requested. action = " << action << oendl; 263 odebug << "user action on socket " << action / 100 << " requested. action = " << action << oendl;
263 264
264 int socket = action / 100; 265 int socket = action / 100;
265 int what = action % 100; 266 int what = action % 100;
@@ -278,7 +279,7 @@ void PcmciaManager::userCardAction( int action )
278 279
279 if ( !success ) 280 if ( !success )
280 { 281 {
281 owarn << "couldn't perform user action" << oendl; 282 owarn << "couldn't perform user action (" << strerror( errno ) << ")" << oendl;
282 } 283 }
283 284
284} 285}