diff options
author | Rolf Leggewie <oe-devel@rolf.leggewie.biz> | 2007-02-15 06:36:07 +0000 |
---|---|---|
committer | Rolf Leggewie <oe-devel@rolf.leggewie.biz> | 2007-02-15 06:36:07 +0000 |
commit | 154641298d7cb2c336bc6a5a38e51d9f7e14abc2 (patch) | |
tree | 98bc3958b1f6473ff24001701b608f0a86c556a8 /packages/opie-bluetoothapplet/files/sysconfig-bluetooth.patch | |
parent | d761c689e1a013a698f5b032cb95d516c7ba22da (diff) | |
parent | 1c4bf67a97a157e0d7cf5756f29f78bac1139a57 (diff) |
merge of '0c4f9a61dfdb0b3267c7794453ccf15dbc4e600c'
and 'd99679b234416670dd8c8e3c87704e7479b4a1e2'
Diffstat (limited to 'packages/opie-bluetoothapplet/files/sysconfig-bluetooth.patch')
-rw-r--r-- | packages/opie-bluetoothapplet/files/sysconfig-bluetooth.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/packages/opie-bluetoothapplet/files/sysconfig-bluetooth.patch b/packages/opie-bluetoothapplet/files/sysconfig-bluetooth.patch new file mode 100644 index 0000000000..83ee765b12 --- /dev/null +++ b/packages/opie-bluetoothapplet/files/sysconfig-bluetooth.patch @@ -0,0 +1,40 @@ +--- applet.org/bluezapplet.cpp.org 2007-02-11 16:48:06.000000000 +0000 ++++ applet/bluezapplet.cpp 2007-02-11 16:56:57.000000000 +0000 +@@ -52,6 +52,8 @@ + #include <qtimer.h> + #include <qpopupmenu.h> + #include <qmessagebox.h> ++#include <qfile.h> ++#include <qtextstream.h> + + /* STD */ + #include <device.h> +@@ -124,6 +126,28 @@ + int BluezApplet::setBluezStatus(int c, bool sync) { + + if ( c == 1 ) { ++ ++ QFile cfg("/etc/sysconfig/bluetooth"); ++ if(cfg.open(IO_ReadOnly)) { ++ QTextStream stream (&cfg); ++ QString streamIn = stream.read(); ++ QStringList list = QStringList::split("\n", streamIn); ++ cfg.close(); ++ if(list.grep("BLUETOOTH_PORT=").count() > 0 && ++ list.grep("BLUETOOTH_PROTOCOL=").count() > 0 && ++ list.grep("BLUETOOTH_SPEED=").count() > 0) { ++ btDevice = new Device( list.grep("BLUETOOTH_PORT=")[0]. ++ replace((QString)"BLUETOOTH_PORT=", ""), ++ list.grep("BLUETOOTH_PROTOCOL=")[0]. ++ replace((QString)"BLUETOOTH_PROTOCOL=", ""), ++ list.grep("BLUETOOTH_SPEED=")[0]. ++ replace((QString)"BLUETOOTH_SPEED=", "")); ++ return 0; ++ } ++ } ++ ++ // Device-specific stuff - should be removed ++ + switch ( ODevice::inst()->model() ) { + case Model_iPAQ_H39xx: + btDevice = new Device( "/dev/tts/1", "bcsp", "921600" ); |