summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--ChangeLog14
-rw-r--r--libopie2/opiecore/device/odevice.h1
-rw-r--r--libopie2/opiecore/device/odevice_zaurus.cpp16
-rw-r--r--libopie2/opiecore/device/odevice_zaurus.h2
4 files changed, 22 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index aa546ba..cc3f1a5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,77 +5,77 @@
5 ------------ 5 ------------
6 * OpieStumbler: Scans WiFi networks using the wireless extension scanning (skyhusker) 6 * OpieStumbler: Scans WiFi networks using the wireless extension scanning (skyhusker)
7 * Opie-Reader: Support for document formats ArriereGo and Reb, add flite output (tim,pohly) 7 * Opie-Reader: Support for document formats ArriereGo and Reb, add flite output (tim,pohly)
8 * Opie-Networksettings: Add support for wlan-ng devices and improve WEP handling (Dirk Opfer) 8 * Opie-Networksettings: Add support for wlan-ng devices and improve WEP handling (Dirk Opfer)
9 * Wellenreiter: Remove Joining networks - use OpieStumbler for that (mickeyl) 9 * Wellenreiter: Remove Joining networks - use OpieStumbler for that (mickeyl)
10 * Opie-Mobilemsg has gone unsupported - it never really worked and there will be a replacement (mickeyl) 10 * Opie-Mobilemsg has gone unsupported - it never really worked and there will be a replacement (mickeyl)
11 * Opie-Tabmanager has gone unsupported - it barely works and there is not much of a use of it anyway (mickeyl) 11 * Opie-Tabmanager has gone unsupported - it barely works and there is not much of a use of it anyway (mickeyl)
12 * Checkbook: Added configuration option to use smaller font for checkbook transaction tab (hrw) 12 * Checkbook: Added configuration option to use smaller font for checkbook transaction tab (hrw)
13 * ZSafe: Made UI conform to Opie standards (drw) 13 * ZSafe: Made UI conform to Opie standards (drw)
14 * Today Addressbook plugin: Fixed configuration to show/not show birthdays, use checkboxes for selection (hrw) 14 * Today Addressbook plugin: Fixed configuration to show/not show birthdays, use checkboxes for selection (hrw)
15 * Opie-Console: Read initial fixed font configuration from qpe.conf (mickeyl) 15 * Opie-Console: Read initial fixed font configuration from qpe.conf (mickeyl)
16 * Opie-PcmciaApplet: Configure insert/resume actions and bind unsupported cards (mickeyl) 16 * Opie-PcmciaApplet: Configure insert/resume actions and bind unsupported cards (mickeyl)
17 * SysInfo: Remove CPU tab and add Devices tab instead (mickeyl) 17 * SysInfo: Remove CPU tab and add Devices tab instead (mickeyl)
18 * Opie-smb: Added Opie front end for Samba (ljp) 18 * Opie-smb: Added Opie front end for Samba (ljp)
19 * Opie-Bluetooth: Replace obex send implementation and patch libopieobex and the bluetoothapplet (Michael Haynie) 19 * Opie-Bluetooth: Replace obex send implementation and patch libopieobex and the bluetoothapplet (Michael Haynie)
20 20
21
22 Fixed Bugs 21 Fixed Bugs
23 ---------- 22 ----------
24 * #1377 - Suspend Powermanagement when switched to another VT (mickeyl) 23 * #1377 - Suspend Powermanagement when switched to another VT (mickeyl)
25 - We actually suspend the complete Opie now in that case. 24 - We actually suspend the complete Opie now in that case.
26 * #1384 - Battery status updated improperly when charging (skyhusker) 25 * #1384 - Battery status updated improperly when charging (skyhusker)
27 * #1476 - Wrong order of application entries in the O-menu (skyhusker) 26 * #1476 - Wrong order of application entries in the O-menu (skyhusker)
28 * #1514 - Remove usage of cardmon/pcmcia picture in applications. pcmcia is now an inline picture (mickeyl) 27 * #1514 - Remove usage of cardmon/pcmcia picture in applications. pcmcia is now an inline picture (mickeyl)
29 * #1535- Missing line break and unnecessary location shown with Today-Calendar plugin (deller) 28 * #1535- Missing line break and unnecessary location shown with Today-Calendar plugin (deller)
30 * #1543 - Time Settings: "predict" tab is displayed twice after reopen (hrw) 29 * #1543 - Time Settings: "predict" tab is displayed twice after reopen (hrw)
31 * #1546 - Battery applet popup is not always large enough to show jacket remaining info (skyhusker) 30 * #1546 - Battery applet popup is not always large enough to show jacket remaining info (skyhusker)
32 * #1557 - Light&Power-Settings don't store warning intervall and warning levels (skyhusker) 31 * #1557 - Light&Power-Settings don't store warning intervall and warning levels (skyhusker)
33 * #1565 - crash-fix in odevice.cpp while scanning the distribution table (deller) 32 * #1565 - crash-fix in odevice.cpp while scanning the distribution table (deller)
34 * #1614 - Make Opie-console start in $HOME instead of / (skyhusker) 33 * #1614 - Make Opie-console start in $HOME instead of / (skyhusker)
35 * #1635 - opie-today, datebook-plugin does not show notes (skyhusker) 34 * #1635 - opie-today, datebook-plugin does not show notes (skyhusker)
36 * #1665 - Opie-IRC displays the host prepended to the message when peer is using and ipv6 address (skyhusker) 35 * #1665 - Opie-IRC displays the host prepended to the message when peer is using and ipv6 address (skyhusker)
37 * #1666 - Opie-IRC does not allow to add !channels in config asautojoin ones (skyhusker) 36 * #1666 - Opie-IRC does not allow to add !channels in config asautojoin ones (skyhusker)
38 * #1667 - Opie-IRC does not show messages from !channel (skyhusker) 37 * #1667 - Opie-IRC does not show messages from !channel (skyhusker)
39 * #1679 - Security PIN plugin is QVGA sized (hrw) 38 * #1679 - Security PIN plugin is QVGA sized (hrw)
40 * #1682 - Properly resize tab control in OTabWidget (drw) 39 * #1682 - Properly resize tab control in OTabWidget (drw)
41 * n.a.- always show volume and wireless applet popups inside visible screen (deller) 40 * n.a. - always show volume and wireless applet popups inside visible screen (deller)
42 * n.a. - scale O-Menu-Applets appropriately (mickeyl) 41 * n.a. - scale O-Menu-Applets appropriately (mickeyl)
43 * n.a.- libopienet: fix bugs in wireless scanning and setting SSID (skyhusker) 42 * n.a. - libopienet: fix bugs in wireless scanning and setting SSID (skyhusker)
44 * n.a.- Wellenreiter: relax WE version matching test a bit (mickeyl) 43 * n.a. - Wellenreiter: relax WE version matching test a bit (mickeyl)
45 * n.a.- scale BluezApplet appropriately and use larger icons (mickeyl) 44 * n.a. - scale BluezApplet appropriately and use larger icons (mickeyl)
46 * n.a.- memoryapplet: fix crash in memoryapplet on kernels without swap support (seneca cunningham) 45 * n.a. - memoryapplet: fix crash in memoryapplet on kernels without swap support (seneca cunningham)
47 * n.a. - networksettings: ignore hostap control interfaces wifi* (mickeyl) 46 * n.a. - networksettings: ignore hostap control interfaces wifi* (mickeyl)
48 * n.a. - Today Addressbook plugin fix configuration to show/not show birthdays, use checkboxes for selection (hrw) 47 * n.a. - Today Addressbook plugin fix configuration to show/not show birthdays, use checkboxes for selection (hrw)
49 * n.a. - remove hardcoded font size from netsystemtime (hrw) 48 * n.a. - remove hardcoded font size from netsystemtime (hrw)
50 * n.a. - remove hardcoded font size from checkbook graphs (hrw) 49 * n.a. - remove hardcoded font size from checkbook graphs (hrw)
51 * n.a. - Dagger - fixes for Sword 1.5.8, morph tag x-refs, closing last tab crash (drw) 50 * n.a. - Dagger - fixes for Sword 1.5.8, morph tag x-refs, closing last tab crash (drw)
52 51
53 52
54 Internal 53 Internal
55 -------- 54 --------
56 * Make BluezApplet use OTaskbarApplet (mickeyl) 55 * Make BluezApplet use OTaskbarApplet (mickeyl)
57 * libopiecore: rewrite OFileNotification to use the Linux 2.6 inotify interface (mickeyl) 56 * libopiecore: rewrite OFileNotification to use the Linux 2.6 inotify interface (mickeyl)
58 * libopiecore: add ODirNotification - recursive directory notifications (mickeyl) 57 * libopiecore: add ODirNotification - recursive directory notifications (mickeyl)
59 * libopienet: Skip hostap control interfaces 'wifi' and improve robustness in ONetworkInterface (mickeyl) 58 * libopienet: Skip hostap control interfaces 'wifi' and improve robustness in ONetworkInterface (mickeyl)
60 * libopieui: Remove OVersatileView and OVersatileViewItem (mickeyl) 59 * libopieui: Remove OVersatileView and OVersatileViewItem (mickeyl)
61 * libopienet: Miscellaneous API cleanups (mickeyl) 60 * libopienet: Miscellaneous API cleanups (mickeyl)
62 * libopiecore: Add linux pcmcia system abstraction classes (mickeyl) 61 * libopiecore: Add linux pcmcia system abstraction classes (mickeyl)
63 * libopiecore: ODevice now knows the default gfx driver to use (mteira,mickeyl) 62 * libopiecore: ODevice now knows the default gfx driver to use (mteira,mickeyl)
63 * libopiecore: Add support for the Sharp SL-C3100 "Borzoi" (mickeyl)
64 * Remove assumptions about default gfx driver ("Transformed") all over the place (mteira,mickeyl) 64 * Remove assumptions about default gfx driver ("Transformed") all over the place (mteira,mickeyl)
65 * fix / optimize number of scanned directories. (ljp) 65 * Fix / Optimize number of scanned directories (ljp)
66 66
67 2005-03-25Opie 1.2.0 67 2005-03-25Opie 1.2.0
68 68
69 Fixed Bugs 69 Fixed Bugs
70 ---------- 70 ----------
71 * #1613 - AdvancedFM - scale toolbar icons appropriately (drw) 71 * #1613 - AdvancedFM - scale toolbar icons appropriately (drw)
72 * #1620 - OFileSelector - show the button on press and not on press on hold (alwin) 72 * #1620 - OFileSelector - show the button on press and not on press on hold (alwin)
73 * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke) 73 * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke)
74 * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw) 74 * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw)
75 * n.a.- make qpeglobal.h include qglobal.h (zecke) 75 * n.a.- make qpeglobal.h include qglobal.h (zecke)
76 76
77 2005-03-20Opie 1.2.0-rc1 77 2005-03-20Opie 1.2.0-rc1
78 78
79 79
80 New Features 80 New Features
81 ------------ 81 ------------
diff --git a/libopie2/opiecore/device/odevice.h b/libopie2/opiecore/device/odevice.h
index 76cf97d..0eed1c9 100644
--- a/libopie2/opiecore/device/odevice.h
+++ b/libopie2/opiecore/device/odevice.h
@@ -71,32 +71,33 @@ enum OModel {
71 Model_iPAQ_H191x = ( Model_iPAQ | 0x0008 ), 71 Model_iPAQ_H191x = ( Model_iPAQ | 0x0008 ),
72 72
73 Model_Jornada = ( 6 << 16 ), 73 Model_Jornada = ( 6 << 16 ),
74 Model_Jornada_56x = ( Model_Jornada | 0x0001 ), 74 Model_Jornada_56x = ( Model_Jornada | 0x0001 ),
75 Model_Jornada_720 = ( Model_Jornada | 0x0002 ), 75 Model_Jornada_720 = ( Model_Jornada | 0x0002 ),
76 76
77 Model_Zaurus = ( 2 << 16 ), 77 Model_Zaurus = ( 2 << 16 ),
78 78
79 Model_Zaurus_SL5000 = ( Model_Zaurus | 0x0001 ), 79 Model_Zaurus_SL5000 = ( Model_Zaurus | 0x0001 ),
80 Model_Zaurus_SL5500 = ( Model_Zaurus | 0x0002 ), 80 Model_Zaurus_SL5500 = ( Model_Zaurus | 0x0002 ),
81 Model_Zaurus_SLA300 = ( Model_Zaurus | 0x0003 ), 81 Model_Zaurus_SLA300 = ( Model_Zaurus | 0x0003 ),
82 Model_Zaurus_SLB600 = ( Model_Zaurus | 0x0004 ), 82 Model_Zaurus_SLB600 = ( Model_Zaurus | 0x0004 ),
83 Model_Zaurus_SLC7x0 = ( Model_Zaurus | 0x0005 ), 83 Model_Zaurus_SLC7x0 = ( Model_Zaurus | 0x0005 ),
84 Model_Zaurus_SL6000 = ( Model_Zaurus | 0x0006 ), 84 Model_Zaurus_SL6000 = ( Model_Zaurus | 0x0006 ),
85 Model_Zaurus_SLC3000 = ( Model_Zaurus | 0x0007 ), 85 Model_Zaurus_SLC3000 = ( Model_Zaurus | 0x0007 ),
86 Model_Zaurus_SLC1000 = ( Model_Zaurus | 0x0008 ), 86 Model_Zaurus_SLC1000 = ( Model_Zaurus | 0x0008 ),
87 Model_Zaurus_SLC3100 = ( Model_Zaurus | 0x0009 ),
87 88
88 Model_SIMpad = ( 3 << 16 ), 89 Model_SIMpad = ( 3 << 16 ),
89 90
90 Model_SIMpad_All = ( Model_SIMpad | 0xffff ), 91 Model_SIMpad_All = ( Model_SIMpad | 0xffff ),
91 Model_SIMpad_CL4 = ( Model_SIMpad | 0x0001 ), 92 Model_SIMpad_CL4 = ( Model_SIMpad | 0x0001 ),
92 Model_SIMpad_SL4 = ( Model_SIMpad | 0x0002 ), 93 Model_SIMpad_SL4 = ( Model_SIMpad | 0x0002 ),
93 Model_SIMpad_SLC = ( Model_SIMpad | 0x0003 ), 94 Model_SIMpad_SLC = ( Model_SIMpad | 0x0003 ),
94 Model_SIMpad_TSinus = ( Model_SIMpad | 0x0004 ), 95 Model_SIMpad_TSinus = ( Model_SIMpad | 0x0004 ),
95 96
96 Model_Ramses = ( 4 << 16 ), 97 Model_Ramses = ( 4 << 16 ),
97 98
98 Model_Ramses_All = ( Model_Ramses | 0xffff ), 99 Model_Ramses_All = ( Model_Ramses | 0xffff ),
99 Model_Ramses_MNCI = ( Model_Ramses | 0x0001 ), 100 Model_Ramses_MNCI = ( Model_Ramses | 0x0001 ),
100 Model_Ramses_MNCIRX = ( Model_Ramses | 0x0002 ), 101 Model_Ramses_MNCIRX = ( Model_Ramses | 0x0002 ),
101 102
102 Model_Yopy = ( 5 << 16 ), 103 Model_Yopy = ( 5 << 16 ),
diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp
index b7f3104..4a80a7e 100644
--- a/libopie2/opiecore/device/odevice_zaurus.cpp
+++ b/libopie2/opiecore/device/odevice_zaurus.cpp
@@ -1,20 +1,20 @@
1/* 1/*
2                 This file is part of the Opie Project 2                 This file is part of the Opie Project
3              Copyright (C) 2002-2005 The Opie Team <opie-devel@handhelds.org> 3              Copyright (C) 2002-2005 The Opie Team <opie-devel@handhelds.org>
4 =. 4 =. Copyright (C) 2002-2005 Michael 'Mickey' Lauer <mickey@Vanille.de>
5 .=l. 5 .=l.
6           .>+-= 6           .>+-=
7 _;:,     .>    :=|. This program is free software; you can 7 _;:,     .>    :=|. This program is free software; you can
8.> <`_,   >  .   <= redistribute it and/or modify it under 8.> <`_,   >  .   <= redistribute it and/or modify it under
9:`=1 )Y*s>-.--   : the terms of the GNU Library General Public 9:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
10.="- .-=="i,     .._ License as published by the Free Software 10.="- .-=="i,     .._ License as published by the Free Software
11 - .   .-<_>     .<> Foundation; version 2 of the License. 11 - .   .-<_>     .<> Foundation; version 2 of the License.
12     ._= =}       : 12     ._= =}       :
13    .%`+i>       _;_. 13    .%`+i>       _;_.
14    .i_,=:_.      -<s. This program is distributed in the hope that 14    .i_,=:_.      -<s. This program is distributed in the hope that
15     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 15     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
16    : ..    .:,     . . . without even the implied warranty of 16    : ..    .:,     . . . without even the implied warranty of
17    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 17    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
18  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 18  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
19..}^=.=       =       ; Library General Public License for more 19..}^=.=       =       ; Library General Public License for more
20++=   -.     .`     .: details. 20++=   -.     .`     .: details.
@@ -211,58 +211,62 @@ void Zaurus::init(const QString& cpu_info)
211 d->m_modelstr = "Zaurus SL-C760 or SL-C860"; 211 d->m_modelstr = "Zaurus SL-C760 or SL-C860";
212 } else if ( model == "SHARP Poodle" ) { 212 } else if ( model == "SHARP Poodle" ) {
213 d->m_model = Model_Zaurus_SLB600; 213 d->m_model = Model_Zaurus_SLB600;
214 d->m_modelstr = "Zaurus SL-B500 or SL-5600"; 214 d->m_modelstr = "Zaurus SL-B500 or SL-5600";
215 } else if ( model == "Sharp-Collie" || model == "Collie" ) { 215 } else if ( model == "Sharp-Collie" || model == "Collie" ) {
216 d->m_model = Model_Zaurus_SL5500; 216 d->m_model = Model_Zaurus_SL5500;
217 d->m_modelstr = "Zaurus SL-5500 or SL-5000d"; 217 d->m_modelstr = "Zaurus SL-5500 or SL-5000d";
218 } else if ( model == "SHARP Tosa" ) { 218 } else if ( model == "SHARP Tosa" ) {
219 d->m_model = Model_Zaurus_SL6000; 219 d->m_model = Model_Zaurus_SL6000;
220 d->m_modelstr = "Zaurus SL-6000"; 220 d->m_modelstr = "Zaurus SL-6000";
221 } else if ( model == "SHARP Spitz" ) { 221 } else if ( model == "SHARP Spitz" ) {
222 d->m_model = Model_Zaurus_SLC3000; 222 d->m_model = Model_Zaurus_SLC3000;
223 d->m_modelstr = "Zaurus SL-C3000"; 223 d->m_modelstr = "Zaurus SL-C3000";
224 } else if ( model == "SHARP Akita" ) { 224 } else if ( model == "SHARP Akita" ) {
225 d->m_model = Model_Zaurus_SLC1000; 225 d->m_model = Model_Zaurus_SLC1000;
226 d->m_modelstr = "Zaurus SL-C1000"; 226 d->m_modelstr = "Zaurus SL-C1000";
227 } else if ( model == "SHARP Borzoi" ) {
228 d->m_model = Model_Zaurus_SLC3100;
229 d->m_modelstr = "Zaurus SL-C3100";
227 } else { 230 } else {
228 d->m_model = Model_Zaurus_SL5500; 231 d->m_model = Model_Zaurus_SL5500;
229 d->m_modelstr = "Unknown Zaurus"; 232 d->m_modelstr = "Unknown Zaurus";
230 } 233 }
231 234
232 // set path to backlight device in kernel 2.6 235 // set path to backlight device in kernel 2.6
233 switch ( d->m_model ) 236 switch ( d->m_model )
234 { 237 {
235 case Model_Zaurus_SLB600: // fallthrough 238 case Model_Zaurus_SLB600: // fallthrough
236 case Model_Zaurus_SL5500: 239 case Model_Zaurus_SL5500:
237 m_backlightdev = "/sys/class/backlight/locomo-backlight/"; 240 m_backlightdev = "/sys/class/backlight/locomo-backlight/";
238 break; 241 break;
239 case Model_Zaurus_SL6000: 242 case Model_Zaurus_SL6000:
240 m_backlightdev = "/sys/class/backlight/tosa-bl/"; 243 m_backlightdev = "/sys/class/backlight/tosa-bl/";
241 break; 244 break;
242 default: 245 default:
243 m_backlightdev = "/sys/class/backlight/corgi-bl/"; 246 m_backlightdev = "/sys/class/backlight/corgi-bl/";
244 } 247 }
245 248
246 // set initial rotation 249 // set initial rotation
247 switch( d->m_model ) 250 switch( d->m_model )
248 { 251 {
249 case Model_Zaurus_SL6000: // fallthrough 252 case Model_Zaurus_SL6000: // fallthrough
250 case Model_Zaurus_SLA300: 253 case Model_Zaurus_SLA300:
251 d->m_rotation = Rot0; 254 d->m_rotation = Rot0;
252 break; 255 break;
256 case Model_Zaurus_SLC3100: // fallthrough
253 case Model_Zaurus_SLC3000: // fallthrough 257 case Model_Zaurus_SLC3000: // fallthrough
254 case Model_Zaurus_SLC1000: // fallthrough 258 case Model_Zaurus_SLC1000: // fallthrough
255 case Model_Zaurus_SLC7x0: 259 case Model_Zaurus_SLC7x0:
256 d->m_rotation = rotation(); 260 d->m_rotation = rotation();
257 d->m_direction = direction(); 261 d->m_direction = direction();
258 break; 262 break;
259 case Model_Zaurus_SLB600: // fallthrough 263 case Model_Zaurus_SLB600: // fallthrough
260 case Model_Zaurus_SL5000: // fallthrough 264 case Model_Zaurus_SL5000: // fallthrough
261 case Model_Zaurus_SL5500: // fallthrough 265 case Model_Zaurus_SL5500: // fallthrough
262 default: 266 default:
263 d->m_rotation = Rot270; 267 d->m_rotation = Rot270;
264 } 268 }
265 269
266 // set default qte driver 270 // set default qte driver
267 switch( d->m_model ) 271 switch( d->m_model )
268 { 272 {
@@ -283,32 +287,33 @@ void Zaurus::init(const QString& cpu_info)
283 287
284void Zaurus::initButtons() 288void Zaurus::initButtons()
285{ 289{
286 if ( d->m_buttons ) 290 if ( d->m_buttons )
287 return; 291 return;
288 292
289 d->m_buttons = new QValueList <ODeviceButton>; 293 d->m_buttons = new QValueList <ODeviceButton>;
290 294
291 struct z_button * pz_buttons; 295 struct z_button * pz_buttons;
292 int buttoncount; 296 int buttoncount;
293 switch ( d->m_model ) 297 switch ( d->m_model )
294 { 298 {
295 case Model_Zaurus_SL6000: 299 case Model_Zaurus_SL6000:
296 pz_buttons = z_buttons_6000; 300 pz_buttons = z_buttons_6000;
297 buttoncount = ARRAY_SIZE(z_buttons_6000); 301 buttoncount = ARRAY_SIZE(z_buttons_6000);
298 break; 302 break;
303 case Model_Zaurus_SLC3100: // fallthrough
299 case Model_Zaurus_SLC3000: // fallthrough 304 case Model_Zaurus_SLC3000: // fallthrough
300 case Model_Zaurus_SLC1000: // fallthrough 305 case Model_Zaurus_SLC1000: // fallthrough
301 case Model_Zaurus_SLC7x0: 306 case Model_Zaurus_SLC7x0:
302 if ( isQWS( ) ) { 307 if ( isQWS( ) ) {
303 addPreHandler(this); // hinge-sensor-handler 308 addPreHandler(this); // hinge-sensor-handler
304 } 309 }
305 pz_buttons = z_buttons_c700; 310 pz_buttons = z_buttons_c700;
306 buttoncount = ARRAY_SIZE(z_buttons_c700); 311 buttoncount = ARRAY_SIZE(z_buttons_c700);
307 break; 312 break;
308 default: 313 default:
309 pz_buttons = z_buttons; 314 pz_buttons = z_buttons;
310 buttoncount = ARRAY_SIZE(z_buttons); 315 buttoncount = ARRAY_SIZE(z_buttons);
311 break; 316 break;
312 } 317 }
313 318
314 for ( int i = 0; i < buttoncount; i++ ) { 319 for ( int i = 0; i < buttoncount; i++ ) {
@@ -536,32 +541,33 @@ bool Zaurus::setDisplayStatus( bool on )
536 char buf[10]; 541 char buf[10];
537 buf[0] = on ? FB_BLANK_UNBLANK : FB_BLANK_POWERDOWN; 542 buf[0] = on ? FB_BLANK_UNBLANK : FB_BLANK_POWERDOWN;
538 buf[1] = '\0'; 543 buf[1] = '\0';
539 res = ( ::write( fd, &buf[0], 2 ) == 0 ); 544 res = ( ::write( fd, &buf[0], 2 ) == 0 );
540 ::close( fd ); 545 ::close( fd );
541 } 546 }
542 } 547 }
543 return res; 548 return res;
544} 549}
545 550
546Transformation Zaurus::rotation() const 551Transformation Zaurus::rotation() const
547{ 552{
548 qDebug( "Zaurus::rotation()" ); 553 qDebug( "Zaurus::rotation()" );
549 Transformation rot; 554 Transformation rot;
550 555
551 switch ( d->m_model ) { 556 switch ( d->m_model ) {
557 case Model_Zaurus_SLC3100: // fallthrough
552 case Model_Zaurus_SLC3000: // fallthrough 558 case Model_Zaurus_SLC3000: // fallthrough
553 case Model_Zaurus_SLC1000: 559 case Model_Zaurus_SLC1000:
554 { 560 {
555 OHingeStatus hs = readHingeSensor(); 561 OHingeStatus hs = readHingeSensor();
556 qDebug( "Zaurus::rotation() - hinge sensor = %d", (int) hs ); 562 qDebug( "Zaurus::rotation() - hinge sensor = %d", (int) hs );
557 if ( hs == CASE_PORTRAIT ) rot = Rot0; 563 if ( hs == CASE_PORTRAIT ) rot = Rot0;
558 else if ( hs == CASE_UNKNOWN ) rot = Rot270; 564 else if ( hs == CASE_UNKNOWN ) rot = Rot270;
559 else rot = Rot270; 565 else rot = Rot270;
560 } 566 }
561 break; 567 break;
562 568
563 // SLC7x0 needs a special case here, because we were able to set the W100 569 // SLC7x0 needs a special case here, because we were able to set the W100
564 // hardware default rotation on kernel 2.6 to Rot0 570 // hardware default rotation on kernel 2.6 to Rot0
565 case Model_Zaurus_SLC7x0: 571 case Model_Zaurus_SLC7x0:
566 { 572 {
567 OHingeStatus hs = readHingeSensor(); 573 OHingeStatus hs = readHingeSensor();
@@ -585,56 +591,60 @@ Transformation Zaurus::rotation() const
585 case Model_Zaurus_SLB600: 591 case Model_Zaurus_SLB600:
586 case Model_Zaurus_SLA300: 592 case Model_Zaurus_SLA300:
587 case Model_Zaurus_SL5500: 593 case Model_Zaurus_SL5500:
588 case Model_Zaurus_SL5000: 594 case Model_Zaurus_SL5000:
589 default: 595 default:
590 rot = d->m_rotation; 596 rot = d->m_rotation;
591 break; 597 break;
592 } 598 }
593 599
594 return rot; 600 return rot;
595} 601}
596ODirection Zaurus::direction() const 602ODirection Zaurus::direction() const
597{ 603{
598 ODirection dir; 604 ODirection dir;
599 605
600 switch ( d->m_model ) { 606 switch ( d->m_model ) {
607 case Model_Zaurus_SLC3100: // fallthrough
601 case Model_Zaurus_SLC3000: // fallthrough 608 case Model_Zaurus_SLC3000: // fallthrough
602 case Model_Zaurus_SLC1000: // fallthrough 609 case Model_Zaurus_SLC1000: // fallthrough
603 case Model_Zaurus_SLC7x0: { 610 case Model_Zaurus_SLC7x0: {
604 OHingeStatus hs = readHingeSensor(); 611 OHingeStatus hs = readHingeSensor();
605 if ( hs == CASE_PORTRAIT ) dir = CCW; 612 if ( hs == CASE_PORTRAIT ) dir = CCW;
606 else if ( hs == CASE_UNKNOWN ) dir = CCW; 613 else if ( hs == CASE_UNKNOWN ) dir = CCW;
607 else dir = CW; 614 else dir = CW;
608 } 615 }
609 break; 616 break;
610 case Model_Zaurus_SL6000: 617 case Model_Zaurus_SL6000:
611 case Model_Zaurus_SLA300: 618 case Model_Zaurus_SLA300:
612 case Model_Zaurus_SLB600: 619 case Model_Zaurus_SLB600:
613 case Model_Zaurus_SL5500: 620 case Model_Zaurus_SL5500:
614 case Model_Zaurus_SL5000: 621 case Model_Zaurus_SL5000:
615 default: dir = d->m_direction; 622 default: dir = d->m_direction;
616 break; 623 break;
617 } 624 }
618 return dir; 625 return dir;
619 626
620} 627}
621 628
622bool Zaurus::hasHingeSensor() const 629bool Zaurus::hasHingeSensor() const
623{ 630{
624 return d->m_model == Model_Zaurus_SLC7x0 || d->m_model == Model_Zaurus_SLC3000 || d->m_model == Model_Zaurus_SLC1000; 631 return d->m_model == Model_Zaurus_SLC7x0 ||
632 d->m_model == Model_Zaurus_SLC3100 ||
633 d->m_model == Model_Zaurus_SLC3000 ||
634 d->m_model == Model_Zaurus_SLC1000;
625} 635}
626 636
627OHingeStatus Zaurus::readHingeSensor() const 637OHingeStatus Zaurus::readHingeSensor() const
628{ 638{
629 if (m_embedix) 639 if (m_embedix)
630 { 640 {
631 int handle = ::open("/dev/apm_bios", O_RDWR|O_NONBLOCK); 641 int handle = ::open("/dev/apm_bios", O_RDWR|O_NONBLOCK);
632 if (handle == -1) 642 if (handle == -1)
633 { 643 {
634 qWarning("Zaurus::readHingeSensor() - failed (%s)", "unknown reason" ); //FIXME: use strerror 644 qWarning("Zaurus::readHingeSensor() - failed (%s)", "unknown reason" ); //FIXME: use strerror
635 return CASE_UNKNOWN; 645 return CASE_UNKNOWN;
636 } 646 }
637 else 647 else
638 { 648 {
639 int retval = ::ioctl(handle, SHARP_IOCTL_GET_ROTATION); 649 int retval = ::ioctl(handle, SHARP_IOCTL_GET_ROTATION);
640 ::close (handle); 650 ::close (handle);
@@ -658,33 +668,33 @@ OHingeStatus Zaurus::readHingeSensor() const
658 else if ( keyboard && keyboard->isHeld( OInputDevice::Key_KP1 ) ) return CASE_PORTRAIT; 668 else if ( keyboard && keyboard->isHeld( OInputDevice::Key_KP1 ) ) return CASE_PORTRAIT;
659 else if ( keyboard && keyboard->isHeld( OInputDevice::Key_KP2 ) ) return CASE_CLOSED; 669 else if ( keyboard && keyboard->isHeld( OInputDevice::Key_KP2 ) ) return CASE_CLOSED;
660 qWarning("Zaurus::readHingeSensor() - couldn't compute hinge status!" ); 670 qWarning("Zaurus::readHingeSensor() - couldn't compute hinge status!" );
661 return CASE_UNKNOWN; 671 return CASE_UNKNOWN;
662 } 672 }
663} 673}
664 674
665/* 675/*
666 * Take code from iPAQ device. 676 * Take code from iPAQ device.
667 * That way we switch the cursor directions depending on status of hinge sensor, eg. hardware direction. 677 * That way we switch the cursor directions depending on status of hinge sensor, eg. hardware direction.
668 * I hope that is ok - Alwin 678 * I hope that is ok - Alwin
669 */ 679 */
670bool Zaurus::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, bool autoRepeat ) 680bool Zaurus::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, bool autoRepeat )
671{ 681{
672 int newkeycode = keycode; 682 int newkeycode = keycode;
673 683
674 if (d->m_model != Model_Zaurus_SLC7x0 && d->m_model != Model_Zaurus_SLC3000 && d->m_model != Model_Zaurus_SLC1000) return false; 684 if ( !hasHingeSensor() ) return false;
675 685
676 /* map cursor keys depending on the hinge status */ 686 /* map cursor keys depending on the hinge status */
677 switch ( keycode ) { 687 switch ( keycode ) {
678 // Rotate cursor keys 688 // Rotate cursor keys
679 case Key_Left : 689 case Key_Left :
680 case Key_Right: 690 case Key_Right:
681 case Key_Up : 691 case Key_Up :
682 case Key_Down : 692 case Key_Down :
683 { 693 {
684 if (rotation()==Rot90) { 694 if (rotation()==Rot90) {
685 newkeycode = Key_Left + ( keycode - Key_Left + 3 ) % 4; 695 newkeycode = Key_Left + ( keycode - Key_Left + 3 ) % 4;
686 } 696 }
687 } 697 }
688 break; 698 break;
689 699
690 } 700 }
diff --git a/libopie2/opiecore/device/odevice_zaurus.h b/libopie2/opiecore/device/odevice_zaurus.h
index 4314aff..677e29f 100644
--- a/libopie2/opiecore/device/odevice_zaurus.h
+++ b/libopie2/opiecore/device/odevice_zaurus.h
@@ -1,20 +1,20 @@
1/* 1/*
2                 This file is part of the Opie Project 2                 This file is part of the Opie Project
3              Copyright (C) 2002-2005 The Opie Team <opie-devel@handhelds.org> 3              Copyright (C) 2002-2005 The Opie Team <opie-devel@handhelds.org>
4 =. 4 =. Copyright (C) 2002-2005 Michael 'Mickey' Lauer <mickey@Vanille.de>
5 .=l. 5 .=l.
6           .>+-= 6           .>+-=
7 _;:,     .>    :=|. This program is free software; you can 7 _;:,     .>    :=|. This program is free software; you can
8.> <`_,   >  .   <= redistribute it and/or modify it under 8.> <`_,   >  .   <= redistribute it and/or modify it under
9:`=1 )Y*s>-.--   : the terms of the GNU Library General Public 9:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
10.="- .-=="i,     .._ License as published by the Free Software 10.="- .-=="i,     .._ License as published by the Free Software
11 - .   .-<_>     .<> Foundation; version 2 of the License. 11 - .   .-<_>     .<> Foundation; version 2 of the License.
12     ._= =}       : 12     ._= =}       :
13    .%`+i>       _;_. 13    .%`+i>       _;_.
14    .i_,=:_.      -<s. This program is distributed in the hope that 14    .i_,=:_.      -<s. This program is distributed in the hope that
15     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 15     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
16    : ..    .:,     . . . without even the implied warranty of 16    : ..    .:,     . . . without even the implied warranty of
17    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 17    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
18  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 18  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
19..}^=.=       =       ; Library General Public License for more 19..}^=.=       =       ; Library General Public License for more
20++=   -.     .`     .: details. 20++=   -.     .`     .: details.