Diffstat (limited to 'noncore/applets/pcmcia/pcmcia.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/applets/pcmcia/pcmcia.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/noncore/applets/pcmcia/pcmcia.cpp b/noncore/applets/pcmcia/pcmcia.cpp index af23f58..c6386cb 100644 --- a/noncore/applets/pcmcia/pcmcia.cpp +++ b/noncore/applets/pcmcia/pcmcia.cpp @@ -77,5 +77,5 @@ PcmciaManager::PcmciaManager( QWidget * parent ) : QWidget( parent ), popupMenu( setFixedWidth ( AppLnk::smallIconSize() ); setFixedHeight ( AppLnk::smallIconSize() ); - pm = Opie::Core::OResource::loadPixmap( "pcmcia/pcmcia", Opie::Core::OResource::SmallIcon ); + pm = Opie::Core::OResource::loadPixmap( "pcmcia", Opie::Core::OResource::SmallIcon ); configuring = false; @@ -164,9 +164,13 @@ void PcmciaManager::mousePressEvent( QMouseEvent* ) submenu->insertItem( "&Configure", CONFIGURE+i*100 ); - 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( CONFIGURE+i*100, !it.current()->isEmpty() && !configuring ); + bool isSuspended = it.current()->isSuspended(); + bool isEmpty = it.current()->isEmpty(); + + submenu->setItemEnabled( EJECT+i*100, !isEmpty ); + submenu->setItemEnabled( INSERT+i*100, isEmpty ); + submenu->setItemEnabled( SUSPEND+i*100, !isEmpty && !isSuspended ); + submenu->setItemEnabled( RESUME+i*100, !isEmpty && isSuspended ); + submenu->setItemEnabled( RESET+i*100, !isEmpty && !isSuspended ); + submenu->setItemEnabled( CONFIGURE+i*100, !isEmpty && !configuring ); connect( submenu, SIGNAL(activated(int)), this, SLOT(userCardAction(int)) ); @@ -214,5 +218,5 @@ void PcmciaManager::cardMessage( const QCString & msg, const QByteArray & ) { theCard = it.current(); - QString cardName = theCard->productIdentity().join( " " ).stripWhiteSpace(); + QString cardName = theCard->productIdentity(); for ( int i = 0; i < nCards; ++i ) { @@ -235,5 +239,5 @@ void PcmciaManager::cardMessage( const QCString & msg, const QByteArray & ) { odebug << "pcmcia: unconfigured card detected" << oendl; - QString newCardName = theCard->productIdentity().join( " " ).stripWhiteSpace(); + QString newCardName = theCard->productIdentity(); int result = QMessageBox::information( qApp->desktop(), tr( "PCMCIA/CF Subsystem" ), @@ -262,5 +266,5 @@ void PcmciaManager::cardMessage( const QCString & msg, const QByteArray & ) QString entryCard = QString( "card \"%1\"" ).arg( newCardName ); QString entryVersion( " version " ); - for ( QStringList::Iterator it = theCard->productIdentity().begin(); it != theCard->productIdentity().end(); ++it ) + for ( QStringList::Iterator it = theCard->productIdentityVector().begin(); it != theCard->productIdentityVector().end(); ++it ) { entryVersion += QString( "\"%1\", " ).arg( *it ); |