author | mickeyl <mickeyl> | 2005-05-21 15:43:07 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-05-21 15:43:07 (UTC) |
commit | e570da2879fb3220a46f1a19bb797512fca144c6 (patch) (side-by-side diff) | |
tree | 9ba374f101078fb5ba2e77ad9ab3beefa0a05415 | |
parent | c5cb180e37514584fd0015d7713fe07c041f3815 (diff) | |
download | opie-e570da2879fb3220a46f1a19bb797512fca144c6.zip opie-e570da2879fb3220a46f1a19bb797512fca144c6.tar.gz opie-e570da2879fb3220a46f1a19bb797512fca144c6.tar.bz2 |
catch up with pcmcia changes
-rw-r--r-- | noncore/applets/pcmcia/pcmcia.cpp | 24 | ||||
-rw-r--r-- | noncore/settings/sysinfo/devicesinfo.cpp | 2 |
2 files changed, 18 insertions, 8 deletions
diff --git a/noncore/applets/pcmcia/pcmcia.cpp b/noncore/applets/pcmcia/pcmcia.cpp index 5183572..7f24371 100644 --- a/noncore/applets/pcmcia/pcmcia.cpp +++ b/noncore/applets/pcmcia/pcmcia.cpp @@ -114,3 +114,3 @@ void PcmciaManager::mousePressEvent( QMouseEvent* ) { - QPopupMenu * menu = new QPopupMenu( this ); + QPopupMenu* menu = new QPopupMenu( this ); QStringList cmd; @@ -125,3 +125,11 @@ void PcmciaManager::mousePressEvent( QMouseEvent* ) { - menu->insertItem( tr( "Eject card %1: %2" ).arg( i++ ).arg( it.currentKey() ), 1 ); + + QPopupMenu* submenu = new QPopupMenu( menu ); + submenu->insertItem( "Eject" ); + submenu->insertItem( "Insert" ); + submenu->insertItem( "Suspend" ); + submenu->insertItem( "Resume" ); + submenu->insertItem( "Configure" ); + + menu->insertItem( tr( "%1: %2" ).arg( i++ ).arg( it.current()->identity() ), submenu, 1 ); ++it; @@ -130,2 +138,3 @@ void PcmciaManager::mousePressEvent( QMouseEvent* ) + /* insert items depending on number of cards etc. @@ -137,3 +146,3 @@ void PcmciaManager::mousePressEvent( QMouseEvent* ) - + @@ -170,3 +179,3 @@ void PcmciaManager::cardMessage( const QCString & msg, const QByteArray & ) - if ( !OPcmciaSystem::instance()->count() ) return; + if ( !OPcmciaSystem::instance()->cardCount() ) return; @@ -180,5 +189,6 @@ void PcmciaManager::cardMessage( const QCString & msg, const QByteArray & ) bool newCard = true; - while ( it.current() && newCard ) + + while ( it.current() && !it.current()->isEmpty() && newCard ) { - QString name = it.currentKey(); + QString name = it.current()->identity(); for ( int i = 0; i < nCards; ++i ) @@ -197,3 +207,2 @@ void PcmciaManager::cardMessage( const QCString & msg, const QByteArray & ) } - QString newCardName = it.currentKey(); @@ -201,2 +210,3 @@ void PcmciaManager::cardMessage( const QCString & msg, const QByteArray & ) { + QString newCardName = it.current()->identity(); odebug << "pcmcia: new card detected" << oendl; diff --git a/noncore/settings/sysinfo/devicesinfo.cpp b/noncore/settings/sysinfo/devicesinfo.cpp index 945edea..4940286 100644 --- a/noncore/settings/sysinfo/devicesinfo.cpp +++ b/noncore/settings/sysinfo/devicesinfo.cpp @@ -210,3 +210,3 @@ void CardsCategory::populate() { - new CardDevice( this, (const char*) it.currentKey() ); + new CardDevice( this, it.current()->identity() ); ++it; |