author | chicken <chicken> | 2004-02-25 11:18:56 (UTC) |
---|---|---|
committer | chicken <chicken> | 2004-02-25 11:18:56 (UTC) |
commit | 50aef52b265bc8c8e5e5c6a871affe94142d74fb (patch) (side-by-side diff) | |
tree | e8dc208cfc4c57a30e81fb0311717405a7d83c68 | |
parent | 96ba6fcf27c785282c3fe05557df8b384df06852 (diff) | |
download | opie-50aef52b265bc8c8e5e5c6a871affe94142d74fb.zip opie-50aef52b265bc8c8e5e5c6a871affe94142d74fb.tar.gz opie-50aef52b265bc8c8e5e5c6a871affe94142d74fb.tar.bz2 |
correct h5xxx support, patch by bedboi
-rw-r--r-- | noncore/net/opietooth/applet/bluezapplet.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/noncore/net/opietooth/applet/bluezapplet.cpp b/noncore/net/opietooth/applet/bluezapplet.cpp index 39c15ab..b76b397 100644 --- a/noncore/net/opietooth/applet/bluezapplet.cpp +++ b/noncore/net/opietooth/applet/bluezapplet.cpp @@ -46,96 +46,100 @@ #include <qtimer.h> #include <qpopupmenu.h> #include <device.h> using namespace Opie; namespace OpieTooth { BluezApplet::BluezApplet( QWidget *parent, const char *name ) : QWidget( parent, name ) { setFixedHeight( 18 ); setFixedWidth( 14 ); bluezOnPixmap = Resource::loadPixmap( "bluetoothapplet/bluezon" ); bluezOffPixmap = Resource::loadPixmap( "bluetoothapplet/bluezoff" ); // bluezDiscoveryOnPixmap = Resource::loadPixmap( "bluetoothapplet/magglass" ); startTimer(4000); btDevice = 0; bluezactive = false; bluezDiscoveryActive = false; } BluezApplet::~BluezApplet() { if ( btDevice ) { delete btDevice; } } bool BluezApplet::checkBluezStatus() { if (btDevice) { if (btDevice->isLoaded() ) { return true; } else { return false; } } else { return false; } } int BluezApplet::setBluezStatus(int c) { if ( c == 1 ) { switch ( ODevice::inst()->model() ) { case Model_iPAQ_H39xx: btDevice = new Device( "/dev/tts/1", "bcsp", "921600" ); break; + case Model_iPAQ_H5xxx: + btDevice = new Device( "/dev/tts/1", "any", "921600" ); + break; + default: btDevice = new Device( "/dev/ttySB0", "bcsp", "230400" ); break; } } else { if ( btDevice ) { delete btDevice; btDevice = 0; } } return 0; } int BluezApplet::checkBluezDiscoveryStatus() { } int BluezApplet::setBluezDiscoveryStatus(int d) { } void BluezApplet::mousePressEvent( QMouseEvent *) { QPopupMenu *menu = new QPopupMenu(); QPopupMenu *signal = new QPopupMenu(); int ret=0; /* Refresh active state */ timerEvent( 0 ); if (bluezactive) { menu->insertItem( tr("Disable Bluetooth"), 0 ); } else { menu->insertItem( tr("Enable Bluetooth"), 1 ); } menu->insertItem( tr("Launch manager"), 2 ); menu->insertSeparator(6); //menu->insertItem( tr("Signal strength"), signal, 5); //menu->insertSeparator(8); if (bluezDiscoveryActive) { menu->insertItem( tr("Disable discovery"), 3 ); } else { menu->insertItem( tr("Enable discovery"), 4 ); } |