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, 6 insertions, 6 deletions
diff --git a/noncore/applets/pcmcia/pcmcia.cpp b/noncore/applets/pcmcia/pcmcia.cpp index 4fcc189..6c18e86 100644 --- a/noncore/applets/pcmcia/pcmcia.cpp +++ b/noncore/applets/pcmcia/pcmcia.cpp | |||
@@ -128,19 +128,19 @@ void PcmciaManager::mousePressEvent( QMouseEvent* ) | |||
128 | QPopupMenu* submenu = new QPopupMenu( menu ); | 128 | QPopupMenu* submenu = new QPopupMenu( menu ); |
129 | submenu->insertItem( "&Eject", EJECT+i*100 ); | 129 | submenu->insertItem( "&Eject", EJECT+i*100 ); |
130 | submenu->insertItem( "&Insert", INSERT+i*100 ); | 130 | submenu->insertItem( "&Insert", INSERT+i*100 ); |
131 | submenu->insertItem( "&Suspend", SUSPEND+i*100 ); | 131 | submenu->insertItem( "&Suspend", SUSPEND+i*100 ); |
132 | submenu->insertItem( "&Resume", RESUME+i*100 ); | 132 | submenu->insertItem( "&Resume", RESUME+i*100 ); |
133 | submenu->insertItem( "&Configure", CONFIGURE+i*100 ); | 133 | submenu->insertItem( "&Configure", CONFIGURE+i*100 ); |
134 | 134 | ||
135 | submenu->setItemEnabled( EJECT+i*100, !it.current()->isEmpty() ); | 135 | submenu->setItemEnabled( EJECT+i*100, !it.current()->isEmpty() ); |
136 | submenu->setItemEnabled( INSERT+i*100, it.current()->isEmpty() ); | 136 | submenu->setItemEnabled( INSERT+i*100, it.current()->isEmpty() ); |
137 | submenu->setItemEnabled( SUSPEND+i*100, !it.current()->isEmpty() && !it.current()->isSuspended() ); | 137 | submenu->setItemEnabled( SUSPEND+i*100, !it.current()->isEmpty() && !it.current()->isSuspended() ); |
138 | submenu->setItemEnabled( RESUME+i*100, !it.current()->isEmpty() && it.current()->isSuspended() ); | 138 | submenu->setItemEnabled( RESUME+i*100, !it.current()->isEmpty() && it.current()->isSuspended() ); |
139 | submenu->setItemEnabled( CONFIGURE+i*100, !it.current()->isEmpty() ); | 139 | submenu->setItemEnabled( CONFIGURE+i*100, !it.current()->isEmpty() ); |
140 | 140 | ||
141 | connect( submenu, SIGNAL(activated(int)), this, SLOT(userCardAction(int)) ); | 141 | connect( submenu, SIGNAL(activated(int)), this, SLOT(userCardAction(int)) ); |
142 | menu->insertItem( tr( "%1: %2" ).arg( i++ ).arg( it.current()->identity() ), submenu, 1 ); | 142 | menu->insertItem( tr( "%1: %2" ).arg( i++ ).arg( it.current()->identity() ), submenu, 1 ); |
143 | ++it; | 143 | ++it; |
144 | } | 144 | } |
145 | 145 | ||
146 | QPoint p = mapToGlobal( QPoint( 0, 0 ) ); | 146 | QPoint p = mapToGlobal( QPoint( 0, 0 ) ); |
@@ -167,13 +167,13 @@ void PcmciaManager::cardMessage( const QCString & msg, const QByteArray & ) | |||
167 | 167 | ||
168 | OPcmciaSystem* sys = OPcmciaSystem::instance(); | 168 | OPcmciaSystem* sys = OPcmciaSystem::instance(); |
169 | OPcmciaSystem::CardIterator it = sys->iterator(); | 169 | OPcmciaSystem::CardIterator it = sys->iterator(); |
170 | 170 | ||
171 | bool newCard = true; | 171 | bool newCard = true; |
172 | OPcmciaSocket* theCard = 0; | 172 | OPcmciaSocket* theCard = 0; |
173 | 173 | ||
174 | while ( it.current() && newCard ) | 174 | while ( it.current() && newCard ) |
175 | { | 175 | { |
176 | if ( it.current()->isEmpty() ) | 176 | if ( it.current()->isEmpty() ) |
177 | { | 177 | { |
178 | odebug << "skipping empty card in socket " << it.current()->number() << oendl; | 178 | odebug << "skipping empty card in socket " << it.current()->number() << oendl; |
179 | ++it; | 179 | ++it; |
@@ -231,13 +231,13 @@ void PcmciaManager::cardMessage( const QCString & msg, const QByteArray & ) | |||
231 | 231 | ||
232 | 232 | ||
233 | void PcmciaManager::paintEvent( QPaintEvent * ) | 233 | void PcmciaManager::paintEvent( QPaintEvent * ) |
234 | { | 234 | { |
235 | QPainter p( this ); | 235 | QPainter p( this ); |
236 | odebug << "sockets = " << OPcmciaSystem::instance()->count() << ", cards = " << OPcmciaSystem::instance()->cardCount() << oendl; | 236 | odebug << "sockets = " << OPcmciaSystem::instance()->count() << ", cards = " << OPcmciaSystem::instance()->cardCount() << oendl; |
237 | 237 | ||
238 | if ( OPcmciaSystem::instance()->cardCount() ) | 238 | if ( OPcmciaSystem::instance()->cardCount() ) |
239 | { | 239 | { |
240 | p.drawPixmap( 0, 0, pm ); | 240 | p.drawPixmap( 0, 0, pm ); |
241 | show(); | 241 | show(); |
242 | } | 242 | } |
243 | else | 243 | else |
@@ -255,16 +255,16 @@ void PcmciaManager::execCommand( const QStringList &strList ) | |||
255 | { | 255 | { |
256 | } | 256 | } |
257 | 257 | ||
258 | void PcmciaManager::userCardAction( int action ) | 258 | void PcmciaManager::userCardAction( int action ) |
259 | { | 259 | { |
260 | odebug << "user action requested. action = " << action << oendl; | 260 | odebug << "user action requested. action = " << action << oendl; |
261 | 261 | ||
262 | int socket = action / 100; | 262 | int socket = action / 100; |
263 | int what = action % 100; | 263 | int what = action % 100; |
264 | 264 | ||
265 | switch ( what ) | 265 | switch ( what ) |
266 | { | 266 | { |
267 | case CONFIGURE: configure( OPcmciaSystem::instance()->socket( socket ) ); break; | 267 | case CONFIGURE: configure( OPcmciaSystem::instance()->socket( socket ) ); break; |
268 | default: odebug << "not yet implemented"; | 268 | default: odebug << "not yet implemented"; |
269 | } | 269 | } |
270 | } | 270 | } |