summaryrefslogtreecommitdiff
path: root/core/applets/cardmon/cardmon.cpp
Unidiff
Diffstat (limited to 'core/applets/cardmon/cardmon.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/cardmon/cardmon.cpp26
1 files changed, 11 insertions, 15 deletions
diff --git a/core/applets/cardmon/cardmon.cpp b/core/applets/cardmon/cardmon.cpp
index 1ad8b55..3a6ad27 100644
--- a/core/applets/cardmon/cardmon.cpp
+++ b/core/applets/cardmon/cardmon.cpp
@@ -20,8 +20,11 @@
20 20
21/* OPIE */ 21/* OPIE */
22#include <opie2/odebug.h>
22#include <opie2/odevice.h> 23#include <opie2/odevice.h>
23#include <opie2/otaskbarapplet.h> 24#include <opie2/otaskbarapplet.h>
24#include <qpe/applnk.h> 25#include <qpe/applnk.h>
25#include <qpe/resource.h> 26#include <qpe/resource.h>
27using namespace Opie::Core;
28using namespace Opie::Ui;
26 29
27/* QT */ 30/* QT */
@@ -39,5 +42,4 @@
39#include <string.h> 42#include <string.h>
40#include <fcntl.h> 43#include <fcntl.h>
41
42#if defined(_OS_LINUX_) || defined(Q_OS_LINUX) 44#if defined(_OS_LINUX_) || defined(Q_OS_LINUX)
43#include <sys/vfs.h> 45#include <sys/vfs.h>
@@ -45,10 +47,4 @@
45#endif 47#endif
46 48
47using namespace Opie;
48
49using namespace Opie::Ui;
50using namespace Opie::Ui;
51using namespace Opie::Core;
52
53CardMonitor::CardMonitor( QWidget * parent ) : QWidget( parent ), 49CardMonitor::CardMonitor( QWidget * parent ) : QWidget( parent ),
54 pm( Resource::loadPixmap( "cardmon/pcmcia" ) ) 50 pm( Resource::loadPixmap( "cardmon/pcmcia" ) )
@@ -198,10 +194,10 @@ void CardMonitor::cardMessage( const QCString & msg, const QByteArray & )
198 if ( msg == "stabChanged()" ) 194 if ( msg == "stabChanged()" )
199 { 195 {
200 // qDebug("Pcmcia: stabchanged"); 196 // odebug << "Pcmcia: stabchanged" << oendl;
201 getStatusPcmcia(); 197 getStatusPcmcia();
202 } 198 }
203 else if ( msg == "mtabChanged()" ) 199 else if ( msg == "mtabChanged()" )
204 { 200 {
205 // qDebug("CARDMONAPPLET: mtabchanged"); 201 // odebug << "CARDMONAPPLET: mtabchanged" << oendl;
206 getStatusSd(); 202 getStatusSd();
207 } 203 }
@@ -211,5 +207,5 @@ bool CardMonitor::getStatusPcmcia( int showPopUp )
211{ 207{
212 208
213 bool cardWas0 = cardInPcmcia0;// remember last state 209 bool cardWas0 = cardInPcmcia0; // remember last state
214 bool cardWas1 = cardInPcmcia1; 210 bool cardWas1 = cardInPcmcia1;
215 211
@@ -332,5 +328,5 @@ bool CardMonitor::getStatusPcmcia( int showPopUp )
332 { 328 {
333 // no file found 329 // no file found
334 qDebug( "no file found" ); 330 odebug << "no file found" << oendl;
335 cardInPcmcia0 = FALSE; 331 cardInPcmcia0 = FALSE;
336 cardInPcmcia1 = FALSE; 332 cardInPcmcia1 = FALSE;
@@ -346,5 +342,5 @@ bool CardMonitor::getStatusSd( int showPopUp )
346{ 342{
347 343
348 bool cardWas = cardInSd;// remember last state 344 bool cardWas = cardInSd; // remember last state
349 cardInSd = FALSE; 345 cardInSd = FALSE;
350 346
@@ -358,5 +354,5 @@ bool CardMonitor::getStatusSd( int showPopUp )
358 { 354 {
359 QString fs = me->mnt_fsname; 355 QString fs = me->mnt_fsname;
360 //qDebug( fs ); 356 //odebug << fs << oendl;
361 if ( fs.left( 14 ) == "/dev/mmc/part1" || fs.left( 7 ) == "/dev/sd" 357 if ( fs.left( 14 ) == "/dev/mmc/part1" || fs.left( 7 ) == "/dev/sd"
362 || fs.left( 9 ) == "/dev/mmcd" ) 358 || fs.left( 9 ) == "/dev/mmcd" )
@@ -386,9 +382,9 @@ bool CardMonitor::getStatusSd( int showPopUp )
386 what = "off"; 382 what = "off";
387 } 383 }
388 //qDebug("TEXT: " + text ); 384 //odebug << "TEXT: " + text << oendl;
389#ifndef QT_NO_SOUND 385#ifndef QT_NO_SOUND
390 QSound::play( Resource::findSound( "cardmon/card" + what ) ); 386 QSound::play( Resource::findSound( "cardmon/card" + what ) );
391#endif 387#endif
392 popUp( text, "cardmon/ide" );// XX add SD pic 388 popUp( text, "cardmon/ide" ); // XX add SD pic
393 } 389 }
394#else 390#else