author | harlekin <harlekin> | 2003-03-20 18:20:20 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-03-20 18:20:20 (UTC) |
commit | e8be90134f3d0d79abe55ed10897309a548376eb (patch) (unidiff) | |
tree | 0f66457ea3c2748bf4fc46d58e140d20a81f5a4e | |
parent | cbc495e56737838263e8f4470710e0a4338f5620 (diff) | |
download | opie-e8be90134f3d0d79abe55ed10897309a548376eb.zip opie-e8be90134f3d0d79abe55ed10897309a548376eb.tar.gz opie-e8be90134f3d0d79abe55ed10897309a548376eb.tar.bz2 |
added support for 39xx ipaq
-rw-r--r-- | noncore/net/opietooth/applet/bluezapplet.cpp | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/noncore/net/opietooth/applet/bluezapplet.cpp b/noncore/net/opietooth/applet/bluezapplet.cpp index f1618ae..39c15ab 100644 --- a/noncore/net/opietooth/applet/bluezapplet.cpp +++ b/noncore/net/opietooth/applet/bluezapplet.cpp | |||
@@ -34,8 +34,10 @@ | |||
34 | #include <qpe/qcopenvelope_qws.h> | 34 | #include <qpe/qcopenvelope_qws.h> |
35 | #include <qpe/resource.h> | 35 | #include <qpe/resource.h> |
36 | #include <qpe/config.h> | 36 | #include <qpe/config.h> |
37 | 37 | ||
38 | #include <opie/odevice.h> | ||
39 | |||
38 | #include <qpoint.h> | 40 | #include <qpoint.h> |
39 | #include <qpainter.h> | 41 | #include <qpainter.h> |
40 | #include <qlayout.h> | 42 | #include <qlayout.h> |
41 | #include <qframe.h> | 43 | #include <qframe.h> |
@@ -45,8 +47,10 @@ | |||
45 | #include <qpopupmenu.h> | 47 | #include <qpopupmenu.h> |
46 | 48 | ||
47 | #include <device.h> | 49 | #include <device.h> |
48 | 50 | ||
51 | using namespace Opie; | ||
52 | |||
49 | namespace OpieTooth { | 53 | namespace OpieTooth { |
50 | 54 | ||
51 | BluezApplet::BluezApplet( QWidget *parent, const char *name ) : QWidget( parent, name ) { | 55 | BluezApplet::BluezApplet( QWidget *parent, const char *name ) : QWidget( parent, name ) { |
52 | setFixedHeight( 18 ); | 56 | setFixedHeight( 18 ); |
@@ -80,12 +84,20 @@ namespace OpieTooth { | |||
80 | } | 84 | } |
81 | 85 | ||
82 | int BluezApplet::setBluezStatus(int c) { | 86 | int BluezApplet::setBluezStatus(int c) { |
83 | 87 | ||
84 | if (c == 1) { | 88 | if ( c == 1 ) { |
85 | btDevice = new Device("/dev/ttySB0", "bcsp", "230400" ); | 89 | switch ( ODevice::inst()->model() ) { |
90 | case Model_iPAQ_H39xx: | ||
91 | btDevice = new Device( "/dev/tts/1", "bcsp", "921600" ); | ||
92 | break; | ||
93 | |||
94 | default: | ||
95 | btDevice = new Device( "/dev/ttySB0", "bcsp", "230400" ); | ||
96 | break; | ||
97 | } | ||
86 | } else { | 98 | } else { |
87 | if (btDevice) { | 99 | if ( btDevice ) { |
88 | delete btDevice; | 100 | delete btDevice; |
89 | btDevice = 0; | 101 | btDevice = 0; |
90 | } | 102 | } |
91 | } | 103 | } |
@@ -116,10 +128,10 @@ namespace OpieTooth { | |||
116 | 128 | ||
117 | menu->insertItem( tr("Launch manager"), 2 ); | 129 | menu->insertItem( tr("Launch manager"), 2 ); |
118 | 130 | ||
119 | menu->insertSeparator(6); | 131 | menu->insertSeparator(6); |
120 | menu->insertItem( tr("Signal strength"), signal, 5); | 132 | //menu->insertItem( tr("Signal strength"), signal, 5); |
121 | menu->insertSeparator(8); | 133 | //menu->insertSeparator(8); |
122 | 134 | ||
123 | if (bluezDiscoveryActive) { | 135 | if (bluezDiscoveryActive) { |
124 | menu->insertItem( tr("Disable discovery"), 3 ); | 136 | menu->insertItem( tr("Disable discovery"), 3 ); |
125 | } else { | 137 | } else { |