Diffstat (limited to 'noncore/applets/pcmcia/pcmcia.cpp') (more/less context) (show 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( | |||
77 | setFixedWidth ( AppLnk::smallIconSize() ); | 77 | setFixedWidth ( AppLnk::smallIconSize() ); |
78 | setFixedHeight ( AppLnk::smallIconSize() ); | 78 | setFixedHeight ( AppLnk::smallIconSize() ); |
79 | pm = Opie::Core::OResource::loadPixmap( "pcmcia/pcmcia", Opie::Core::OResource::SmallIcon ); | 79 | pm = Opie::Core::OResource::loadPixmap( "pcmcia", Opie::Core::OResource::SmallIcon ); |
80 | configuring = false; | 80 | configuring = false; |
81 | 81 | ||
@@ -164,9 +164,13 @@ void PcmciaManager::mousePressEvent( QMouseEvent* ) | |||
164 | submenu->insertItem( "&Configure", CONFIGURE+i*100 ); | 164 | submenu->insertItem( "&Configure", CONFIGURE+i*100 ); |
165 | 165 | ||
166 | submenu->setItemEnabled( EJECT+i*100, !it.current()->isEmpty() ); | 166 | bool isSuspended = it.current()->isSuspended(); |
167 | submenu->setItemEnabled( INSERT+i*100, it.current()->isEmpty() ); | 167 | bool isEmpty = it.current()->isEmpty(); |
168 | submenu->setItemEnabled( SUSPEND+i*100, !it.current()->isEmpty() && it.current()->isSuspended() ); | 168 | |
169 | submenu->setItemEnabled( RESUME+i*100, !it.current()->isEmpty() && !it.current()->isSuspended() ); | 169 | submenu->setItemEnabled( EJECT+i*100, !isEmpty ); |
170 | submenu->setItemEnabled( CONFIGURE+i*100, !it.current()->isEmpty() && !configuring ); | 170 | submenu->setItemEnabled( INSERT+i*100, isEmpty ); |
171 | submenu->setItemEnabled( SUSPEND+i*100, !isEmpty && !isSuspended ); | ||
172 | submenu->setItemEnabled( RESUME+i*100, !isEmpty && isSuspended ); | ||
173 | submenu->setItemEnabled( RESET+i*100, !isEmpty && !isSuspended ); | ||
174 | submenu->setItemEnabled( CONFIGURE+i*100, !isEmpty && !configuring ); | ||
171 | 175 | ||
172 | connect( submenu, SIGNAL(activated(int)), this, SLOT(userCardAction(int)) ); | 176 | connect( submenu, SIGNAL(activated(int)), this, SLOT(userCardAction(int)) ); |
@@ -214,5 +218,5 @@ void PcmciaManager::cardMessage( const QCString & msg, const QByteArray & ) | |||
214 | { | 218 | { |
215 | theCard = it.current(); | 219 | theCard = it.current(); |
216 | QString cardName = theCard->productIdentity().join( " " ).stripWhiteSpace(); | 220 | QString cardName = theCard->productIdentity(); |
217 | for ( int i = 0; i < nCards; ++i ) | 221 | for ( int i = 0; i < nCards; ++i ) |
218 | { | 222 | { |
@@ -235,5 +239,5 @@ void PcmciaManager::cardMessage( const QCString & msg, const QByteArray & ) | |||
235 | { | 239 | { |
236 | odebug << "pcmcia: unconfigured card detected" << oendl; | 240 | odebug << "pcmcia: unconfigured card detected" << oendl; |
237 | QString newCardName = theCard->productIdentity().join( " " ).stripWhiteSpace(); | 241 | QString newCardName = theCard->productIdentity(); |
238 | int result = QMessageBox::information( qApp->desktop(), | 242 | int result = QMessageBox::information( qApp->desktop(), |
239 | tr( "PCMCIA/CF Subsystem" ), | 243 | tr( "PCMCIA/CF Subsystem" ), |
@@ -262,5 +266,5 @@ void PcmciaManager::cardMessage( const QCString & msg, const QByteArray & ) | |||
262 | QString entryCard = QString( "card \"%1\"" ).arg( newCardName ); | 266 | QString entryCard = QString( "card \"%1\"" ).arg( newCardName ); |
263 | QString entryVersion( " version " ); | 267 | QString entryVersion( " version " ); |
264 | for ( QStringList::Iterator it = theCard->productIdentity().begin(); it != theCard->productIdentity().end(); ++it ) | 268 | for ( QStringList::Iterator it = theCard->productIdentityVector().begin(); it != theCard->productIdentityVector().end(); ++it ) |
265 | { | 269 | { |
266 | entryVersion += QString( "\"%1\", " ).arg( *it ); | 270 | entryVersion += QString( "\"%1\", " ).arg( *it ); |