summaryrefslogtreecommitdiff
authorsandman <sandman>2002-09-30 21:10:57 (UTC)
committer sandman <sandman>2002-09-30 21:10:57 (UTC)
commitf02403852366623aef6f53258b237e467a25e597 (patch) (side-by-side diff)
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
@@ -33,24 +33,26 @@
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <qsound.h>
#if defined(_OS_LINUX_) || defined(Q_OS_LINUX)
#include <sys/vfs.h>
#include <mntent.h>
#endif
+using namespace Opie;
+
CardMonitor::CardMonitor( QWidget *parent ) : QWidget( parent ),
pm( Resource::loadPixmap( "cardmon/pcmcia" ) ) {
QCopChannel* pcmciaChannel = new QCopChannel( "QPE/Card", this );
connect( pcmciaChannel, SIGNAL( received( const QCString &, const QByteArray &) ),
this, SLOT( cardMessage( const QCString &, const QByteArray &) ) );
QCopChannel* sdChannel = new QCopChannel( "QPE/Card", this );
connect( sdChannel, SIGNAL( received( const QCString &, const QByteArray &) ),
this, SLOT( cardMessage( const QCString &, const QByteArray &) ) );
cardInPcmcia0 = FALSE;
@@ -119,25 +121,25 @@ void CardMonitor::mousePressEvent( QMouseEvent * ) {
int opt = menu->exec( QPoint (
p. x ( ) + ( width ( ) / 2 ) - ( s. width ( ) / 2 ),
p. y ( ) - s. height ( ) ), 0);
if ( opt == 1 ) {
cmd = "/sbin/cardctl eject 0";
err = system( ( const char * ) cmd );
if ( ( err == 127 ) || ( err < 0 ) ) {
qDebug( "Could not execute `/sbin/cardctl eject 0'! err=%d", err );
popUp( tr( "CF/PCMCIA card eject failed!" ) );
}
} else if ( opt == 0 ) {
- if ( ODevice::inst()->system() == OSYSTEM_Familiar ) {
+ if ( ODevice::inst()->system() == System_Familiar ) {
cmd = "umount /dev/mmc/part1";
err = system( ( const char *) cmd );
if ( ( err != 0 ) ) {
popUp( tr("SD/MMC card eject failed!") );
}
} else {
cmd = "/etc/sdcontrol compeject";
err = system( ( const char *) cmd );
if ( ( err != 0 ) ) {
qDebug( "Could not execute `/etc/sdcontrol comeject'! err=%d", err );
popUp( tr("SD/MMC card eject failed!") );
}