author | harlekin <harlekin> | 2002-08-30 15:18:25 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-08-30 15:18:25 (UTC) |
commit | 2e1362616524463697dfe2693178a698ccc713ec (patch) (unidiff) | |
tree | fd7d05256716b33de05705451105336dfcc29571 | |
parent | a4ad4c4ec7227d7ac0e62da71972f35672a6692f (diff) | |
download | opie-2e1362616524463697dfe2693178a698ccc713ec.zip opie-2e1362616524463697dfe2693178a698ccc713ec.tar.gz opie-2e1362616524463697dfe2693178a698ccc713ec.tar.bz2 |
some more debug stuff out
-rw-r--r-- | core/applets/cardmon/cardmon.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/applets/cardmon/cardmon.cpp b/core/applets/cardmon/cardmon.cpp index 367ef3b..583f2da 100644 --- a/core/applets/cardmon/cardmon.cpp +++ b/core/applets/cardmon/cardmon.cpp | |||
@@ -261,46 +261,46 @@ bool CardMonitor::getStatusPcmcia( int showPopUp ) { | |||
261 | 261 | ||
262 | bool CardMonitor::getStatusSd( int showPopUp ) { | 262 | bool CardMonitor::getStatusSd( int showPopUp ) { |
263 | 263 | ||
264 | bool cardWas = cardInSd; // remember last state | 264 | bool cardWas = cardInSd; // remember last state |
265 | 265 | ||
266 | #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) | 266 | #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) |
267 | struct mntent *me; | 267 | struct mntent *me; |
268 | FILE *mntfp = setmntent( "/etc/mtab", "r" ); | 268 | FILE *mntfp = setmntent( "/etc/mtab", "r" ); |
269 | 269 | ||
270 | if ( mntfp ) { | 270 | if ( mntfp ) { |
271 | while ( ( me = getmntent( mntfp ) ) != 0 ) { | 271 | while ( ( me = getmntent( mntfp ) ) != 0 ) { |
272 | QString fs = me->mnt_fsname; | 272 | QString fs = me->mnt_fsname; |
273 | qDebug( fs ); | 273 | //qDebug( fs ); |
274 | if ( fs.left( 14 ) == "/dev/mmc/part1" || fs.left( 7 ) == "/dev/sd" || fs.left( 9 ) == "/dev/mmcd" ) { | 274 | if ( fs.left( 14 ) == "/dev/mmc/part1" || fs.left( 7 ) == "/dev/sd" || fs.left( 9 ) == "/dev/mmcd" ) { |
275 | cardInSd = TRUE; | 275 | cardInSd = TRUE; |
276 | show(); | 276 | show(); |
277 | } else { | 277 | } else { |
278 | cardInSd = FALSE; | 278 | cardInSd = FALSE; |
279 | } | 279 | } |
280 | } | 280 | } |
281 | endmntent( mntfp ); | 281 | endmntent( mntfp ); |
282 | } | 282 | } |
283 | 283 | ||
284 | if( !showPopUp && cardWas != cardInSd ) { | 284 | if( !showPopUp && cardWas != cardInSd ) { |
285 | QString text = QString::null; | 285 | QString text = QString::null; |
286 | QString what = QString::null; | 286 | QString what = QString::null; |
287 | if( cardInSd ) { | 287 | if( cardInSd ) { |
288 | text += "SD Inserted"; | 288 | text += "SD Inserted"; |
289 | what = "on"; | 289 | what = "on"; |
290 | } else { | 290 | } else { |
291 | text += "SD Removed"; | 291 | text += "SD Removed"; |
292 | what = "off"; | 292 | what = "off"; |
293 | } | 293 | } |
294 | qDebug("TEXT: " + text ); | 294 | //qDebug("TEXT: " + text ); |
295 | QSound::play( Resource::findSound( "cardmon/card" + what ) ); | 295 | QSound::play( Resource::findSound( "cardmon/card" + what ) ); |
296 | popUp( text, "cardmon/ide" ); // XX add SD pic | 296 | popUp( text, "cardmon/ide" ); // XX add SD pic |
297 | } | 297 | } |
298 | #else | 298 | #else |
299 | #error "Not on Linux" | 299 | #error "Not on Linux" |
300 | #endif | 300 | #endif |
301 | return ( ( cardWas == cardInSd) ? FALSE : TRUE ); | 301 | return ( ( cardWas == cardInSd) ? FALSE : TRUE ); |
302 | } | 302 | } |
303 | 303 | ||
304 | void CardMonitor::paintEvent( QPaintEvent * ) { | 304 | void CardMonitor::paintEvent( QPaintEvent * ) { |
305 | 305 | ||
306 | QPainter p( this ); | 306 | QPainter p( this ); |