author | mickeyl <mickeyl> | 2005-06-17 13:29:56 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-06-17 13:29:56 (UTC) |
commit | 0e11eb29a20ff6bff533a07ff604ed858237f82b (patch) (side-by-side diff) | |
tree | bd1ef20d6771064973297bfea7b0bffc2271ab87 /noncore/applets/pcmcia/pcmcia.cpp | |
parent | 8af66795130275b1337f8ae06d249649ac273d0d (diff) | |
download | opie-0e11eb29a20ff6bff533a07ff604ed858237f82b.zip opie-0e11eb29a20ff6bff533a07ff604ed858237f82b.tar.gz opie-0e11eb29a20ff6bff533a07ff604ed858237f82b.tar.bz2 |
make reset, eject, suspend, resume, insert work
Diffstat (limited to 'noncore/applets/pcmcia/pcmcia.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/applets/pcmcia/pcmcia.cpp | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/noncore/applets/pcmcia/pcmcia.cpp b/noncore/applets/pcmcia/pcmcia.cpp index fac7065..aea699f 100644 --- a/noncore/applets/pcmcia/pcmcia.cpp +++ b/noncore/applets/pcmcia/pcmcia.cpp @@ -185,4 +185,4 @@ void PcmciaManager::cardMessage( const QCString & msg, const QByteArray & ) { - OPcmciaSocket* theCard = it.current(); - QString cardName = theCard->identity(); + theCard = it.current(); + QString cardName = theCard->productIdentity().join( " " ); for ( int i = 0; i < nCards; ++i ) @@ -206,3 +206,3 @@ void PcmciaManager::cardMessage( const QCString & msg, const QByteArray & ) cfg.setGroup( QString( "Card_%1" ).arg( nCards ) ); - cfg.writeEntry( "name", theCard->identity() ); + cfg.writeEntry( "name", theCard->productIdentity().join( " " ) ); cfg.writeEntry( "insert", "suspend" ); @@ -214,3 +214,3 @@ void PcmciaManager::cardMessage( const QCString & msg, const QByteArray & ) tr( "PCMCIA/CF Subsystem" ), - tr( "You have inserted a new card:\n%1\nDo you want to configure?" ).arg( theCard->identity() ), + tr( "You have inserted a new card:\n%1\nDo you want to configure?" ).arg( theCard->productIdentity().join( " " ) ), tr( "Yes" ), tr( "No" ), 0, 0, 1 ); @@ -223,3 +223,3 @@ void PcmciaManager::cardMessage( const QCString & msg, const QByteArray & ) { - odebug << "pcmcia: user doesn't want to configure " << theCard->identity() << " now." << oendl; + odebug << "pcmcia: user doesn't want to configure " << theCard->productIdentity().join( " " ) << " now." << oendl; } @@ -265,2 +265,3 @@ void PcmciaManager::userCardAction( int action ) int what = action % 100; + bool success = false; @@ -268,5 +269,16 @@ void PcmciaManager::userCardAction( int action ) { - case CONFIGURE: configure( OPcmciaSystem::instance()->socket( socket ) ); break; - default: odebug << "not yet implemented"; + case CONFIGURE: configure( OPcmciaSystem::instance()->socket( socket ) ); success = true; break; + case EJECT: success = OPcmciaSystem::instance()->socket( socket )->eject(); break; + case INSERT: success = OPcmciaSystem::instance()->socket( socket )->insert(); break; + case SUSPEND: success = OPcmciaSystem::instance()->socket( socket )->suspend(); break; + case RESUME: success = OPcmciaSystem::instance()->socket( socket )->resume(); break; + case RESET: success = OPcmciaSystem::instance()->socket( socket )->reset(); break; + default: odebug << "not yet implemented" << oendl; } + + if ( !success ) + { + owarn << "couldn't perform user action" << oendl; + } + } |