From c36e39b5b1e450e64d4c38cb59e56048a2bec258 Mon Sep 17 00:00:00 2001 From: mickeyl Date: Fri, 17 Jun 2005 13:47:42 +0000 Subject: - disable DEBUG in opcmciasystem - fix suspend/resume logic --- (limited to 'noncore/applets') 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; #include #include #include +#include #include #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) #include @@ -136,8 +137,8 @@ void PcmciaManager::mousePressEvent( QMouseEvent* ) submenu->setItemEnabled( EJECT+i*100, !it.current()->isEmpty() ); submenu->setItemEnabled( INSERT+i*100, it.current()->isEmpty() ); - submenu->setItemEnabled( SUSPEND+i*100, !it.current()->isEmpty() && !it.current()->isSuspended() ); - submenu->setItemEnabled( RESUME+i*100, !it.current()->isEmpty() && it.current()->isSuspended() ); + submenu->setItemEnabled( SUSPEND+i*100, !it.current()->isEmpty() && it.current()->isSuspended() ); + submenu->setItemEnabled( RESUME+i*100, !it.current()->isEmpty() && !it.current()->isSuspended() ); submenu->setItemEnabled( CONFIGURE+i*100, !it.current()->isEmpty() && !configuring ); connect( submenu, SIGNAL(activated(int)), this, SLOT(userCardAction(int)) ); @@ -259,7 +260,7 @@ void PcmciaManager::execCommand( const QStringList &strList ) void PcmciaManager::userCardAction( int action ) { - odebug << "user action requested. action = " << action << oendl; + odebug << "user action on socket " << action / 100 << " requested. action = " << action << oendl; int socket = action / 100; int what = action % 100; @@ -278,7 +279,7 @@ void PcmciaManager::userCardAction( int action ) if ( !success ) { - owarn << "couldn't perform user action" << oendl; + owarn << "couldn't perform user action (" << strerror( errno ) << ")" << oendl; } } -- cgit v0.9.0.2