summaryrefslogtreecommitdiff
authorsandman <sandman>2002-09-30 21:10:57 (UTC)
committer sandman <sandman>2002-09-30 21:10:57 (UTC)
commitf02403852366623aef6f53258b237e467a25e597 (patch) (unidiff)
tree091ae74adbb8aad80d2055e775cb65e3c377ae87
parentf49ad5cf3bdc1d1c06be4615a649b6be6f179b83 (diff)
downloadopie-f02403852366623aef6f53258b237e467a25e597.zip
opie-f02403852366623aef6f53258b237e467a25e597.tar.gz
opie-f02403852366623aef6f53258b237e467a25e597.tar.bz2
small change to work with the new ODevice API
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/cardmon/cardmon.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/applets/cardmon/cardmon.cpp b/core/applets/cardmon/cardmon.cpp
index 583f2da..c0a936f 100644
--- a/core/applets/cardmon/cardmon.cpp
+++ b/core/applets/cardmon/cardmon.cpp
@@ -37,16 +37,18 @@
37#include <fcntl.h> 37#include <fcntl.h>
38#include <qsound.h> 38#include <qsound.h>
39 39
40#if defined(_OS_LINUX_) || defined(Q_OS_LINUX) 40#if defined(_OS_LINUX_) || defined(Q_OS_LINUX)
41#include <sys/vfs.h> 41#include <sys/vfs.h>
42#include <mntent.h> 42#include <mntent.h>
43#endif 43#endif
44 44
45using namespace Opie;
46
45CardMonitor::CardMonitor( QWidget *parent ) : QWidget( parent ), 47CardMonitor::CardMonitor( QWidget *parent ) : QWidget( parent ),
46 pm( Resource::loadPixmap( "cardmon/pcmcia" ) ) { 48 pm( Resource::loadPixmap( "cardmon/pcmcia" ) ) {
47 49
48 QCopChannel* pcmciaChannel = new QCopChannel( "QPE/Card", this ); 50 QCopChannel* pcmciaChannel = new QCopChannel( "QPE/Card", this );
49 connect( pcmciaChannel, SIGNAL( received( const QCString &, const QByteArray &) ), 51 connect( pcmciaChannel, SIGNAL( received( const QCString &, const QByteArray &) ),
50 this, SLOT( cardMessage( const QCString &, const QByteArray &) ) ); 52 this, SLOT( cardMessage( const QCString &, const QByteArray &) ) );
51 53
52 QCopChannel* sdChannel = new QCopChannel( "QPE/Card", this ); 54 QCopChannel* sdChannel = new QCopChannel( "QPE/Card", this );
@@ -123,17 +125,17 @@ void CardMonitor::mousePressEvent( QMouseEvent * ) {
123 if ( opt == 1 ) { 125 if ( opt == 1 ) {
124 cmd = "/sbin/cardctl eject 0"; 126 cmd = "/sbin/cardctl eject 0";
125 err = system( ( const char * ) cmd ); 127 err = system( ( const char * ) cmd );
126 if ( ( err == 127 ) || ( err < 0 ) ) { 128 if ( ( err == 127 ) || ( err < 0 ) ) {
127 qDebug( "Could not execute `/sbin/cardctl eject 0'! err=%d", err ); 129 qDebug( "Could not execute `/sbin/cardctl eject 0'! err=%d", err );
128 popUp( tr( "CF/PCMCIA card eject failed!" ) ); 130 popUp( tr( "CF/PCMCIA card eject failed!" ) );
129 } 131 }
130 } else if ( opt == 0 ) { 132 } else if ( opt == 0 ) {
131 if ( ODevice::inst()->system() == OSYSTEM_Familiar ) { 133 if ( ODevice::inst()->system() == System_Familiar ) {
132 cmd = "umount /dev/mmc/part1"; 134 cmd = "umount /dev/mmc/part1";
133 err = system( ( const char *) cmd ); 135 err = system( ( const char *) cmd );
134 if ( ( err != 0 ) ) { 136 if ( ( err != 0 ) ) {
135 popUp( tr("SD/MMC card eject failed!") ); 137 popUp( tr("SD/MMC card eject failed!") );
136 } 138 }
137 } else { 139 } else {
138 cmd = "/etc/sdcontrol compeject"; 140 cmd = "/etc/sdcontrol compeject";
139 err = system( ( const char *) cmd ); 141 err = system( ( const char *) cmd );