Diffstat (limited to 'noncore/applets/pcmcia/pcmcia.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/applets/pcmcia/pcmcia.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/noncore/applets/pcmcia/pcmcia.cpp b/noncore/applets/pcmcia/pcmcia.cpp index 6c18e86..fac7065 100644 --- a/noncore/applets/pcmcia/pcmcia.cpp +++ b/noncore/applets/pcmcia/pcmcia.cpp @@ -75,4 +75,5 @@ PcmciaManager::PcmciaManager( QWidget * parent ) : QWidget( parent ) setFixedHeight ( AppLnk::smallIconSize() ); pm = Opie::Core::OResource::loadPixmap( "cardmon/pcmcia", Opie::Core::OResource::SmallIcon ); + configuring = false; } @@ -111,5 +112,5 @@ void PcmciaManager::popupTimeout() } -enum { EJECT, INSERT, SUSPEND, RESUME, CONFIGURE }; +enum { EJECT, INSERT, SUSPEND, RESUME, RESET, CONFIGURE }; void PcmciaManager::mousePressEvent( QMouseEvent* ) @@ -131,4 +132,5 @@ void PcmciaManager::mousePressEvent( QMouseEvent* ) submenu->insertItem( "&Suspend", SUSPEND+i*100 ); submenu->insertItem( "&Resume", RESUME+i*100 ); + submenu->insertItem( "Rese&t", RESET+i*100 ); submenu->insertItem( "&Configure", CONFIGURE+i*100 ); @@ -137,5 +139,5 @@ void PcmciaManager::mousePressEvent( QMouseEvent* ) 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() ); + submenu->setItemEnabled( CONFIGURE+i*100, !it.current()->isEmpty() && !configuring ); connect( submenu, SIGNAL(activated(int)), this, SLOT(userCardAction(int)) ); @@ -272,6 +274,8 @@ void PcmciaManager::userCardAction( int action ) void PcmciaManager::configure( OPcmciaSocket* card ) { - ConfigDialog dialog( card->identity(), qApp->desktop() ); - int configresult = dialog.exec(); + configuring = true; + ConfigDialog dialog( card, qApp->desktop() ); + int configresult = QPEApplication::execDialog( &dialog, false ); + configuring = false; odebug << "pcmcia: configresult = " << configresult << oendl; } |