summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2006-08-02 19:12:38 (UTC)
committer mickeyl <mickeyl>2006-08-02 19:12:38 (UTC)
commitcc2f5d3f3173be64d177ad827864b7da95343a1d (patch) (unidiff)
tree8c278fc6b108667e3fdc2b98d91dd5377756c95a
parent3e77cb64e7ca0d89656e6665c1007bff6b34d609 (diff)
downloadopie-cc2f5d3f3173be64d177ad827864b7da95343a1d.zip
opie-cc2f5d3f3173be64d177ad827864b7da95343a1d.tar.gz
opie-cc2f5d3f3173be64d177ad827864b7da95343a1d.tar.bz2
improve ipaq 2200, 4xxx, 4700 support. patches courtesy R.Wagner, E.Hovland, P.Sokolovsky. thanks guys
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--ChangeLog2
-rw-r--r--libopie2/opiecore/device/odevice.h1
-rw-r--r--libopie2/opiecore/device/odevice_ipaq.cpp47
3 files changed, 43 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index d0bbcb9..64bf7a3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,201 +1,201 @@
1 2006-??-??Opie 1.2.3 1 2006-??-??Opie 1.2.3
2 2
3 3
4 New Features 4 New Features
5 ------------ 5 ------------
6 6
7 Fixed Bugs 7 Fixed Bugs
8 ---------- 8 ----------
9 * n.a.- Improved iPAQ support in ODevice and low-level applets (Slavek Banko) 9 * n.a.- Improved iPAQ support in ODevice and low-level applets (S.Banko, R.Wagner, E.Hovland, P.Sokolovsky)
10 * n.a. - Improved platform support for the Motorola EZX platform (mickeyl) 10 * n.a. - Improved platform support for the Motorola EZX platform (mickeyl)
11 11
12 Internal 12 Internal
13 -------- 13 --------
14 14
15 2006-05-28Opie 1.2.2 15 2006-05-28Opie 1.2.2
16 16
17 17
18 New Features 18 New Features
19 ------------ 19 ------------
20 * Appearance: Added configuration options to set smallIconSize, bigIconSize, useBigPixmaps (hrw, drw) 20 * Appearance: Added configuration options to set smallIconSize, bigIconSize, useBigPixmaps (hrw, drw)
21 * Opie-Notes: Notes application based on NoteZ (hrw) 21 * Opie-Notes: Notes application based on NoteZ (hrw)
22 * Opie-PackageManager: Added two configuration options: "Force recursive", "Verbose fetch" (hrw) 22 * Opie-PackageManager: Added two configuration options: "Force recursive", "Verbose fetch" (hrw)
23 * Added platform support for HTC Universal (ljp) 23 * Added platform support for HTC Universal (ljp)
24 * Made Opie-Bluetooth subsystem actually usable (korovkin) 24 * Made Opie-Bluetooth subsystem actually usable (korovkin)
25 * Added platform support for the Motorola EZX platform (mickeyl) 25 * Added platform support for the Motorola EZX platform (mickeyl)
26 26
27 Fixed Bugs 27 Fixed Bugs
28 ---------- 28 ----------
29 * #1695 - Date selector use too small fontsize on VGA screen (hrw) 29 * #1695 - Date selector use too small fontsize on VGA screen (hrw)
30 * #1686 - opie-console lack UI setting for switching scrollbar (hrw) 30 * #1686 - opie-console lack UI setting for switching scrollbar (hrw)
31 * #1647 - Opie-console doesn't respect scroll-bar on left side (hrw) 31 * #1647 - Opie-console doesn't respect scroll-bar on left side (hrw)
32 * #1624 - Button settngs changes are applied only after restart (hrw) 32 * #1624 - Button settngs changes are applied only after restart (hrw)
33 * #1492 - Backup and Restore does not show list of backups to restore on start (hrw) 33 * #1492 - Backup and Restore does not show list of backups to restore on start (hrw)
34 * n.a. - remove hardcoded font size from wellenreiter (hrw) 34 * n.a. - remove hardcoded font size from wellenreiter (hrw)
35 * n.a. - added patch to build Qt/E 2.3.10 with gcc 4.x.x (hrw) 35 * n.a. - added patch to build Qt/E 2.3.10 with gcc 4.x.x (hrw)
36 * n.a. - make blue-pin UI resizable to looks good in any resolution (hrw) 36 * n.a. - make blue-pin UI resizable to looks good in any resolution (hrw)
37 * n.a. - fix a problem with vCard send to Sony Ericsson k600i (ar) 37 * n.a. - fix a problem with vCard send to Sony Ericsson k600i (ar)
38 * n.a. - add a patch to build Qt/E 2.3.10 on amd64 with gcc 4.x.x (ar) 38 * n.a. - add a patch to build Qt/E 2.3.10 on amd64 with gcc 4.x.x (ar)
39 * n.a. - Opie-console fallback to FixedFont settings from qpe.conf in config (hrw) 39 * n.a. - Opie-console fallback to FixedFont settings from qpe.conf in config (hrw)
40 * n.a. - Update version in About applet (hrw) 40 * n.a. - Update version in About applet (hrw)
41 * n.a. - add firstusage and background pictures for 480x640 devices (mickeyl) 41 * n.a. - add firstusage and background pictures for 480x640 devices (mickeyl)
42 * n.a. - many bluetooth fixes (korovkin) 42 * n.a. - many bluetooth fixes (korovkin)
43 43
44 Internal 44 Internal
45 -------- 45 --------
46 * libopiecore: /etc/oz_version renamed to /etc/openzaurus-version (hrw) 46 * libopiecore: /etc/oz_version renamed to /etc/openzaurus-version (hrw)
47 * libopiecore: SL6000 (tosa) now uses corgi-bl (Dirk Opfer) 47 * libopiecore: SL6000 (tosa) now uses corgi-bl (Dirk Opfer)
48 * library/version.h: introduce integer version code in OPIE_VERSION for conditional compilation 48 * library/version.h: introduce integer version code in OPIE_VERSION for conditional compilation
49 * g++ 4.1.1 fixes all around (no extra qualifiers allowed) (mickeyl) 49 * g++ 4.1.1 fixes all around (no extra qualifiers allowed) (mickeyl)
50 * update README (mickeyl) 50 * update README (mickeyl)
51 * remove libslcompat - it never worked and we don't support Sharp closed source anymore anyway (mickeyl) 51 * remove libslcompat - it never worked and we don't support Sharp closed source anymore anyway (mickeyl)
52 52
53 2005-09-11Opie 1.2.1 53 2005-09-11Opie 1.2.1
54 54
55 55
56 New Features 56 New Features
57 ------------ 57 ------------
58 * OpieStumbler: Scans WiFi networks using the wireless extension scanning (skyhusker) 58 * OpieStumbler: Scans WiFi networks using the wireless extension scanning (skyhusker)
59 * Opie-Reader: Support for document formats ArriereGo and Reb, add flite output (tim,pohly) 59 * Opie-Reader: Support for document formats ArriereGo and Reb, add flite output (tim,pohly)
60 * Opie-Networksettings: Add support for wlan-ng devices and improve WEP handling (Dirk Opfer) 60 * Opie-Networksettings: Add support for wlan-ng devices and improve WEP handling (Dirk Opfer)
61 * Wellenreiter: Remove Joining networks - use OpieStumbler for that (mickeyl) 61 * Wellenreiter: Remove Joining networks - use OpieStumbler for that (mickeyl)
62 * Opie-Mobilemsg has gone unsupported - it never really worked and there will be a replacement (mickeyl) 62 * Opie-Mobilemsg has gone unsupported - it never really worked and there will be a replacement (mickeyl)
63 * Opie-Tabmanager has gone unsupported - it barely works and there is not much of a use of it anyway (mickeyl) 63 * Opie-Tabmanager has gone unsupported - it barely works and there is not much of a use of it anyway (mickeyl)
64 * Checkbook: Added configuration option to use smaller font for checkbook transaction tab (hrw) 64 * Checkbook: Added configuration option to use smaller font for checkbook transaction tab (hrw)
65 * ZSafe: Made UI conform to Opie standards (drw) 65 * ZSafe: Made UI conform to Opie standards (drw)
66 * Today Addressbook plugin: Fixed configuration to show/not show birthdays, use checkboxes for selection (hrw) 66 * Today Addressbook plugin: Fixed configuration to show/not show birthdays, use checkboxes for selection (hrw)
67 * Opie-Console: Read initial fixed font configuration from qpe.conf (mickeyl) 67 * Opie-Console: Read initial fixed font configuration from qpe.conf (mickeyl)
68 * Opie-PcmciaApplet: Configure insert/resume actions and bind unsupported cards (mickeyl) 68 * Opie-PcmciaApplet: Configure insert/resume actions and bind unsupported cards (mickeyl)
69 * SysInfo: Remove CPU tab and add Devices tab instead (mickeyl) 69 * SysInfo: Remove CPU tab and add Devices tab instead (mickeyl)
70 * Opie-smb: Added Opie front end for Samba (ljp) 70 * Opie-smb: Added Opie front end for Samba (ljp)
71 * Opie-Bluetooth: Replace obex send implementation and patch libopieobex and the bluetoothapplet (Michael Haynie) 71 * Opie-Bluetooth: Replace obex send implementation and patch libopieobex and the bluetoothapplet (Michael Haynie)
72 * Opieplayer: rudimentary podcast support (ljp) 72 * Opieplayer: rudimentary podcast support (ljp)
73 73
74 Fixed Bugs 74 Fixed Bugs
75 ---------- 75 ----------
76 * #1377 - Suspend Powermanagement when switched to another VT (mickeyl) 76 * #1377 - Suspend Powermanagement when switched to another VT (mickeyl)
77 - We actually suspend the complete Opie now in that case. 77 - We actually suspend the complete Opie now in that case.
78 * #1384 - Battery status updated improperly when charging (skyhusker) 78 * #1384 - Battery status updated improperly when charging (skyhusker)
79 * #1476 - Wrong order of application entries in the O-menu (skyhusker) 79 * #1476 - Wrong order of application entries in the O-menu (skyhusker)
80 * #1514 - Remove usage of cardmon/pcmcia picture in applications. pcmcia is now an inline picture (mickeyl) 80 * #1514 - Remove usage of cardmon/pcmcia picture in applications. pcmcia is now an inline picture (mickeyl)
81 * #1535- Missing line break and unnecessary location shown with Today-Calendar plugin (deller) 81 * #1535- Missing line break and unnecessary location shown with Today-Calendar plugin (deller)
82 * #1543 - Time Settings: "predict" tab is displayed twice after reopen (hrw) 82 * #1543 - Time Settings: "predict" tab is displayed twice after reopen (hrw)
83 * #1546 - Battery applet popup is not always large enough to show jacket remaining info (skyhusker) 83 * #1546 - Battery applet popup is not always large enough to show jacket remaining info (skyhusker)
84 * #1557 - Light&Power-Settings don't store warning intervall and warning levels (skyhusker) 84 * #1557 - Light&Power-Settings don't store warning intervall and warning levels (skyhusker)
85 * #1565 - crash-fix in odevice.cpp while scanning the distribution table (deller) 85 * #1565 - crash-fix in odevice.cpp while scanning the distribution table (deller)
86 * #1614 - Make Opie-console start in $HOME instead of / (skyhusker) 86 * #1614 - Make Opie-console start in $HOME instead of / (skyhusker)
87 * #1635 - opie-today, datebook-plugin does not show notes (skyhusker) 87 * #1635 - opie-today, datebook-plugin does not show notes (skyhusker)
88 * #1665 - Opie-IRC displays the host prepended to the message when peer is using and ipv6 address (skyhusker) 88 * #1665 - Opie-IRC displays the host prepended to the message when peer is using and ipv6 address (skyhusker)
89 * #1666 - Opie-IRC does not allow to add !channels in config asautojoin ones (skyhusker) 89 * #1666 - Opie-IRC does not allow to add !channels in config asautojoin ones (skyhusker)
90 * #1667 - Opie-IRC does not show messages from !channel (skyhusker) 90 * #1667 - Opie-IRC does not show messages from !channel (skyhusker)
91 * #1679 - Security PIN plugin is QVGA sized (hrw) 91 * #1679 - Security PIN plugin is QVGA sized (hrw)
92 * #1682 - Properly resize tab control in OTabWidget (drw) 92 * #1682 - Properly resize tab control in OTabWidget (drw)
93 * n.a. - always show volume and wireless applet popups inside visible screen (deller) 93 * n.a. - always show volume and wireless applet popups inside visible screen (deller)
94 * n.a. - scale O-Menu-Applets appropriately (mickeyl) 94 * n.a. - scale O-Menu-Applets appropriately (mickeyl)
95 * n.a. - libopienet: fix bugs in wireless scanning and setting SSID (skyhusker) 95 * n.a. - libopienet: fix bugs in wireless scanning and setting SSID (skyhusker)
96 * n.a. - Wellenreiter: relax WE version matching test a bit (mickeyl) 96 * n.a. - Wellenreiter: relax WE version matching test a bit (mickeyl)
97 * n.a. - scale BluezApplet appropriately and use larger icons (mickeyl) 97 * n.a. - scale BluezApplet appropriately and use larger icons (mickeyl)
98 * n.a. - memoryapplet: fix crash in memoryapplet on kernels without swap support (seneca cunningham) 98 * n.a. - memoryapplet: fix crash in memoryapplet on kernels without swap support (seneca cunningham)
99 * n.a. - networksettings: ignore hostap control interfaces wifi* (mickeyl) 99 * n.a. - networksettings: ignore hostap control interfaces wifi* (mickeyl)
100 * n.a. - Today Addressbook plugin fix configuration to show/not show birthdays, use checkboxes for selection (hrw) 100 * n.a. - Today Addressbook plugin fix configuration to show/not show birthdays, use checkboxes for selection (hrw)
101 * n.a. - remove hardcoded font size from netsystemtime (hrw) 101 * n.a. - remove hardcoded font size from netsystemtime (hrw)
102 * n.a. - remove hardcoded font size from checkbook graphs (hrw) 102 * n.a. - remove hardcoded font size from checkbook graphs (hrw)
103 * n.a. - Dagger - fixes for Sword 1.5.8, morph tag x-refs, closing last tab crash (drw) 103 * n.a. - Dagger - fixes for Sword 1.5.8, morph tag x-refs, closing last tab crash (drw)
104 104
105 105
106 Internal 106 Internal
107 -------- 107 --------
108 * Make BluezApplet use OTaskbarApplet (mickeyl) 108 * Make BluezApplet use OTaskbarApplet (mickeyl)
109 * libopiecore: rewrite OFileNotification to use the Linux 2.6 inotify interface (mickeyl) 109 * libopiecore: rewrite OFileNotification to use the Linux 2.6 inotify interface (mickeyl)
110 * libopiecore: add ODirNotification - recursive directory notifications (mickeyl) 110 * libopiecore: add ODirNotification - recursive directory notifications (mickeyl)
111 * libopienet: Skip hostap control interfaces 'wifi' and improve robustness in ONetworkInterface (mickeyl) 111 * libopienet: Skip hostap control interfaces 'wifi' and improve robustness in ONetworkInterface (mickeyl)
112 * libopieui: Remove OVersatileView and OVersatileViewItem (mickeyl) 112 * libopieui: Remove OVersatileView and OVersatileViewItem (mickeyl)
113 * libopienet: Miscellaneous API cleanups (mickeyl) 113 * libopienet: Miscellaneous API cleanups (mickeyl)
114 * libopiecore: Add linux pcmcia system abstraction classes (mickeyl) 114 * libopiecore: Add linux pcmcia system abstraction classes (mickeyl)
115 * libopiecore: ODevice now knows the default gfx driver to use (mteira,mickeyl) 115 * libopiecore: ODevice now knows the default gfx driver to use (mteira,mickeyl)
116 * libopiecore: Add support for the Sharp SL-C3100 "Borzoi" (mickeyl) 116 * libopiecore: Add support for the Sharp SL-C3100 "Borzoi" (mickeyl)
117 * libopiecore: Add support for the new Linux Inputsystem Switches type [necessary for auto rotation in 2.6.13] (mickeyl) 117 * libopiecore: Add support for the new Linux Inputsystem Switches type [necessary for auto rotation in 2.6.13] (mickeyl)
118 * Remove assumptions about default gfx driver ("Transformed") all over the place (mteira,mickeyl) 118 * Remove assumptions about default gfx driver ("Transformed") all over the place (mteira,mickeyl)
119 * Fix / Optimize number of scanned directories (ljp) 119 * Fix / Optimize number of scanned directories (ljp)
120 * Use five point mouse calibration to make calibrated mouse drivers work on newer Zaurii (rp,mickeyl) 120 * Use five point mouse calibration to make calibrated mouse drivers work on newer Zaurii (rp,mickeyl)
121 121
122 2005-03-25Opie 1.2.0 122 2005-03-25Opie 1.2.0
123 123
124 Fixed Bugs 124 Fixed Bugs
125 ---------- 125 ----------
126 * #1613 - AdvancedFM - scale toolbar icons appropriately (drw) 126 * #1613 - AdvancedFM - scale toolbar icons appropriately (drw)
127 * #1620 - OFileSelector - show the button on press and not on press on hold (alwin) 127 * #1620 - OFileSelector - show the button on press and not on press on hold (alwin)
128 * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke) 128 * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke)
129 * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw) 129 * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw)
130 * n.a.- make qpeglobal.h include qglobal.h (zecke) 130 * n.a.- make qpeglobal.h include qglobal.h (zecke)
131 131
132 2005-03-20Opie 1.2.0-rc1 132 2005-03-20Opie 1.2.0-rc1
133 133
134 134
135 New Features 135 New Features
136 ------------ 136 ------------
137 * Launcher: Support a static background pixmap (mickeyl) 137 * Launcher: Support a static background pixmap (mickeyl)
138 * LauncherSettings: Choose whether to have a static background pixmap (mickeyl) 138 * LauncherSettings: Choose whether to have a static background pixmap (mickeyl)
139 * PackageManager supports the 'lists_dir' ipkg configuration option (drw) 139 * PackageManager supports the 'lists_dir' ipkg configuration option (drw)
140 * Added hi-res inline images for large resolution devices (drw) 140 * Added hi-res inline images for large resolution devices (drw)
141 * Improved launcher icons for consistency (ar) 141 * Improved launcher icons for consistency (ar)
142 * Datebook: Added plugin system to datebook so holidays and birthdays from contacts may displayed in datebook (alwin) 142 * Datebook: Added plugin system to datebook so holidays and birthdays from contacts may displayed in datebook (alwin)
143 143
144 Fixed Bugs 144 Fixed Bugs
145 ---------- 145 ----------
146 * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers) 146 * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers)
147 * #1412 - Launcher Settings - fixed default settings for background in Edit tab dialog (drw) 147 * #1412 - Launcher Settings - fixed default settings for background in Edit tab dialog (drw)
148 * #1472 - Opie textedit now check for unsaved changes on ESC key (ljp) 148 * #1472 - Opie textedit now check for unsaved changes on ESC key (ljp)
149 * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke) 149 * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke)
150 * #1482 - Fix double '/' in paths (zecke) 150 * #1482 - Fix double '/' in paths (zecke)
151 * #1536 - Autosave of custom locations in opie backup (ar) 151 * #1536 - Autosave of custom locations in opie backup (ar)
152 * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke) 152 * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke)
153 * #1540 - Implemented deletion of DocLnks in opie-eye (zecke) 153 * #1540 - Implemented deletion of DocLnks in opie-eye (zecke)
154 * #1542 - Fixed Todo crash when priority < 1 or > 5 (drw) 154 * #1542 - Fixed Todo crash when priority < 1 or > 5 (drw)
155 * #1550 - Browse for alarm sound start in QPEDIR/sounds/ (zecke) 155 * #1550 - Browse for alarm sound start in QPEDIR/sounds/ (zecke)
156 * #1554 - Fixed Opie-Console name in .desktop file (mickeyl) 156 * #1554 - Fixed Opie-Console name in .desktop file (mickeyl)
157 * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke) 157 * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke)
158 * #1558 - Fixed opie-login breaking opie startup (mickeyl) 158 * #1558 - Fixed opie-login breaking opie startup (mickeyl)
159 * #1560 - Fixed Opie-Console picking up the wrong shell (bluelightning) 159 * #1560 - Fixed Opie-Console picking up the wrong shell (bluelightning)
160 * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar) 160 * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar)
161 * #1591 - Addressbook sortorder changed by clicking on column 0 (eilers) 161 * #1591 - Addressbook sortorder changed by clicking on column 0 (eilers)
162 * #1599 - Security - change recommendation for opie-multiauth to opie-securityplugin (gints) 162 * #1599 - Security - change recommendation for opie-multiauth to opie-securityplugin (gints)
163 * #1604 - Checkbook crashed on startup (drw) 163 * #1604 - Checkbook crashed on startup (drw)
164 * #1608 - Addressbook crashed after search, which may caused by not initialzed member variable (eilers) 164 * #1608 - Addressbook crashed after search, which may caused by not initialzed member variable (eilers)
165 * #1608 - QueryByExampe-Datediff on SQL database did not worked properly (eilers) 165 * #1608 - QueryByExampe-Datediff on SQL database did not worked properly (eilers)
166 * n.a. - Netsystemtime - fixed UI to prevent error dialog from displaying when it shouldn't, get rid of some compiler warnings (drw) 166 * n.a. - Netsystemtime - fixed UI to prevent error dialog from displaying when it shouldn't, get rid of some compiler warnings (drw)
167 * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw) 167 * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw)
168 * n.a. - PackageManager - fixed bug where lists_dir was not being honored at startup (drw) 168 * n.a. - PackageManager - fixed bug where lists_dir was not being honored at startup (drw)
169 * n.a. - PackageManager - provided default value for lists_dir when none is entered in configuration dialog (drw) 169 * n.a. - PackageManager - provided default value for lists_dir when none is entered in configuration dialog (drw)
170 * n.a. - OTabWidget - fixed scroll buttons, fix display position of tabs (drw) 170 * n.a. - OTabWidget - fixed scroll buttons, fix display position of tabs (drw)
171 * n.a. - AddressBook - fixed sorting by 'File As' name (drw) 171 * n.a. - AddressBook - fixed sorting by 'File As' name (drw)
172 * n.a. - AddressBook - fixed category handling for 'All' and 'Unfiled' (eilers) 172 * n.a. - AddressBook - fixed category handling for 'All' and 'Unfiled' (eilers)
173 * n.a. - AddressBook - fixed letter picker record selection and sort records afterwards (drw) 173 * n.a. - AddressBook - fixed letter picker record selection and sort records afterwards (drw)
174 174
175 Internal 175 Internal
176 -------- 176 --------
177 * Worked around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl) 177 * Worked around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl)
178 * Killed the need for weak symbols in QtE (zecke) 178 * Killed the need for weak symbols in QtE (zecke)
179 * Added optional building libqpe without inline images (mickeyl) 179 * Added optional building libqpe without inline images (mickeyl)
180 * OColorButton - fixed so does not emit a colorSelected signal inside of resizeEvent (drw) 180 * OColorButton - fixed so does not emit a colorSelected signal inside of resizeEvent (drw)
181 181
182 2005-02-03Opie 1.1.9 182 2005-02-03Opie 1.1.9
183 183
184 New Features 184 New Features
185 ------------ 185 ------------
186 * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl) 186 * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl)
187 * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl) 187 * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl)
188 * Usability enhancements in OpieIRC (skyhusker) 188 * Usability enhancements in OpieIRC (skyhusker)
189 189
190 Fixed Bugs 190 Fixed Bugs
191 ---------- 191 ----------
192 * #1501 - Fixed bug in todo sql backend (eilers) 192 * #1501 - Fixed bug in todo sql backend (eilers)
193 * #1505 - Added more Swap sizes in memoryapplet (mickeyl) 193 * #1505 - Added more Swap sizes in memoryapplet (mickeyl)
194 * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke) 194 * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke)
195 * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke) 195 * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke)
196 * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl) 196 * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl)
197 * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl) 197 * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl)
198 * n.a. - Fixed numerous buglets in OpieIRC (skyhusker) 198 * n.a. - Fixed numerous buglets in OpieIRC (skyhusker)
199 199
200 Internal 200 Internal
201 -------- 201 --------
diff --git a/libopie2/opiecore/device/odevice.h b/libopie2/opiecore/device/odevice.h
index c2fa411..a8362cd 100644
--- a/libopie2/opiecore/device/odevice.h
+++ b/libopie2/opiecore/device/odevice.h
@@ -1,265 +1,266 @@
1/* 1/*
2                 This file is part of the Opie Project 2                 This file is part of the Opie Project
3              (C) 2002-2006 The Opie Team <opie-devel@handhelds.org> 3              (C) 2002-2006 The Opie Team <opie-devel@handhelds.org>
4 =. 4 =.
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.
21 :     =  ...= . :.=- 21 :     =  ...= . :.=-
22 -.   .:....=;==+<; You should have received a copy of the GNU 22 -.   .:....=;==+<; You should have received a copy of the GNU
23  -_. . .   )=.  = Library General Public License along with 23  -_. . .   )=.  = Library General Public License along with
24    --        :-=` this library; see the file COPYING.LIB. 24    --        :-=` this library; see the file COPYING.LIB.
25 If not, write to the Free Software Foundation, 25 If not, write to the Free Software Foundation,
26 Inc., 59 Temple Place - Suite 330, 26 Inc., 59 Temple Place - Suite 330,
27 Boston, MA 02111-1307, USA. 27 Boston, MA 02111-1307, USA.
28*/ 28*/
29 29
30#ifndef ODEVICE_H_ 30#ifndef ODEVICE_H_
31#define ODEVICE_H_ 31#define ODEVICE_H_
32 32
33/* OPIE */ 33/* OPIE */
34#include <opie2/odevicebutton.h> 34#include <opie2/odevicebutton.h>
35#include <qpe/qpeapplication.h> /* for Transformation enum.. */ 35#include <qpe/qpeapplication.h> /* for Transformation enum.. */
36 36
37/* QT */ 37/* QT */
38#include <qnamespace.h> 38#include <qnamespace.h>
39#include <qobject.h> 39#include <qobject.h>
40#include <qstring.h> 40#include <qstring.h>
41 41
42 42
43#include <qstrlist.h> 43#include <qstrlist.h>
44#include <qwindowsystem_qws.h> 44#include <qwindowsystem_qws.h>
45 45
46 46
47class Sound; 47class Sound;
48 48
49namespace Opie{ 49namespace Opie{
50namespace Core{ 50namespace Core{
51 51
52class ODeviceData; 52class ODeviceData;
53/** 53/**
54 * The available devices 54 * The available devices
55 */ 55 */
56enum OModel { 56enum OModel {
57 Model_Unknown, // = 0 57 Model_Unknown, // = 0
58 58
59 Model_Series_Mask = 0xffff0000, 59 Model_Series_Mask = 0xffff0000,
60 60
61 Model_iPAQ = ( 1 << 16 ), 61 Model_iPAQ = ( 1 << 16 ),
62 62
63 Model_iPAQ_All = ( Model_iPAQ | 0xffff ), 63 Model_iPAQ_All = ( Model_iPAQ | 0xffff ),
64 Model_iPAQ_H31xx = ( Model_iPAQ | 0x0001 ), 64 Model_iPAQ_H31xx = ( Model_iPAQ | 0x0001 ),
65 Model_iPAQ_H36xx = ( Model_iPAQ | 0x0002 ), 65 Model_iPAQ_H36xx = ( Model_iPAQ | 0x0002 ),
66 Model_iPAQ_H37xx = ( Model_iPAQ | 0x0003 ), 66 Model_iPAQ_H37xx = ( Model_iPAQ | 0x0003 ),
67 Model_iPAQ_H38xx = ( Model_iPAQ | 0x0004 ), 67 Model_iPAQ_H38xx = ( Model_iPAQ | 0x0004 ),
68 Model_iPAQ_H39xx = ( Model_iPAQ | 0x0005 ), 68 Model_iPAQ_H39xx = ( Model_iPAQ | 0x0005 ),
69 Model_iPAQ_H5xxx = ( Model_iPAQ | 0x0006 ), 69 Model_iPAQ_H5xxx = ( Model_iPAQ | 0x0006 ),
70 Model_iPAQ_H22xx = ( Model_iPAQ | 0x0007 ), 70 Model_iPAQ_H22xx = ( Model_iPAQ | 0x0007 ),
71 Model_iPAQ_H191x = ( Model_iPAQ | 0x0008 ), 71 Model_iPAQ_H191x = ( Model_iPAQ | 0x0008 ),
72 Model_iPAQ_H1940 = ( Model_iPAQ | 0x0009 ), 72 Model_iPAQ_H1940 = ( Model_iPAQ | 0x0009 ),
73 Model_iPAQ_HX4700 = ( Model_iPAQ | 0x000A ), 73 Model_iPAQ_HX4700 = ( Model_iPAQ | 0x000A ),
74 Model_iPAQ_H4xxx = ( Model_iPAQ | 0x000b ),
74 Model_Jornada = ( 6 << 16 ), 75 Model_Jornada = ( 6 << 16 ),
75 Model_Jornada_56x = ( Model_Jornada | 0x0001 ), 76 Model_Jornada_56x = ( Model_Jornada | 0x0001 ),
76 Model_Jornada_720 = ( Model_Jornada | 0x0002 ), 77 Model_Jornada_720 = ( Model_Jornada | 0x0002 ),
77 Model_Jornada_820 = ( Model_Jornada | 0x0003 ), 78 Model_Jornada_820 = ( Model_Jornada | 0x0003 ),
78 79
79 Model_Zaurus = ( 2 << 16 ), 80 Model_Zaurus = ( 2 << 16 ),
80 81
81 Model_Zaurus_SL5000 = ( Model_Zaurus | 0x0001 ), 82 Model_Zaurus_SL5000 = ( Model_Zaurus | 0x0001 ),
82 Model_Zaurus_SL5500 = ( Model_Zaurus | 0x0002 ), 83 Model_Zaurus_SL5500 = ( Model_Zaurus | 0x0002 ),
83 Model_Zaurus_SLA300 = ( Model_Zaurus | 0x0003 ), 84 Model_Zaurus_SLA300 = ( Model_Zaurus | 0x0003 ),
84 Model_Zaurus_SLB600 = ( Model_Zaurus | 0x0004 ), 85 Model_Zaurus_SLB600 = ( Model_Zaurus | 0x0004 ),
85 Model_Zaurus_SLC7x0 = ( Model_Zaurus | 0x0005 ), 86 Model_Zaurus_SLC7x0 = ( Model_Zaurus | 0x0005 ),
86 Model_Zaurus_SL6000 = ( Model_Zaurus | 0x0006 ), 87 Model_Zaurus_SL6000 = ( Model_Zaurus | 0x0006 ),
87 Model_Zaurus_SLC3000 = ( Model_Zaurus | 0x0007 ), 88 Model_Zaurus_SLC3000 = ( Model_Zaurus | 0x0007 ),
88 Model_Zaurus_SLC1000 = ( Model_Zaurus | 0x0008 ), 89 Model_Zaurus_SLC1000 = ( Model_Zaurus | 0x0008 ),
89 Model_Zaurus_SLC3100 = ( Model_Zaurus | 0x0009 ), 90 Model_Zaurus_SLC3100 = ( Model_Zaurus | 0x0009 ),
90 91
91 Model_SIMpad = ( 3 << 16 ), 92 Model_SIMpad = ( 3 << 16 ),
92 93
93 Model_SIMpad_All = ( Model_SIMpad | 0xffff ), 94 Model_SIMpad_All = ( Model_SIMpad | 0xffff ),
94 Model_SIMpad_CL4 = ( Model_SIMpad | 0x0001 ), 95 Model_SIMpad_CL4 = ( Model_SIMpad | 0x0001 ),
95 Model_SIMpad_SL4 = ( Model_SIMpad | 0x0002 ), 96 Model_SIMpad_SL4 = ( Model_SIMpad | 0x0002 ),
96 Model_SIMpad_SLC = ( Model_SIMpad | 0x0003 ), 97 Model_SIMpad_SLC = ( Model_SIMpad | 0x0003 ),
97 Model_SIMpad_TSinus = ( Model_SIMpad | 0x0004 ), 98 Model_SIMpad_TSinus = ( Model_SIMpad | 0x0004 ),
98 99
99 Model_Ramses = ( 4 << 16 ), 100 Model_Ramses = ( 4 << 16 ),
100 101
101 Model_Ramses_All = ( Model_Ramses | 0xffff ), 102 Model_Ramses_All = ( Model_Ramses | 0xffff ),
102 Model_Ramses_MNCI = ( Model_Ramses | 0x0001 ), 103 Model_Ramses_MNCI = ( Model_Ramses | 0x0001 ),
103 Model_Ramses_MNCIRX = ( Model_Ramses | 0x0002 ), 104 Model_Ramses_MNCIRX = ( Model_Ramses | 0x0002 ),
104 105
105 Model_Yopy = ( 5 << 16 ), 106 Model_Yopy = ( 5 << 16 ),
106 107
107 Model_Yopy_All = ( Model_Yopy | 0xffff ), 108 Model_Yopy_All = ( Model_Yopy | 0xffff ),
108 Model_Yopy_3000 = ( Model_Yopy | 0x0001 ), 109 Model_Yopy_3000 = ( Model_Yopy | 0x0001 ),
109 Model_Yopy_3500 = ( Model_Yopy | 0x0002 ), 110 Model_Yopy_3500 = ( Model_Yopy | 0x0002 ),
110 Model_Yopy_3700 = ( Model_Yopy | 0x0003 ), 111 Model_Yopy_3700 = ( Model_Yopy | 0x0003 ),
111 112
112 Model_Beagle = ( 6 << 16 ), 113 Model_Beagle = ( 6 << 16 ),
113 114
114 Model_Beagle_All = ( Model_Beagle | 0xffff ), 115 Model_Beagle_All = ( Model_Beagle | 0xffff ),
115 Model_Beagle_PA100 = ( Model_Beagle | 0x0001 ), 116 Model_Beagle_PA100 = ( Model_Beagle | 0x0001 ),
116 117
117 Model_GenuineIntel = ( 7 << 16 ), 118 Model_GenuineIntel = ( 7 << 16 ),
118 119
119 Model_MyPal = ( 8 << 16 ), 120 Model_MyPal = ( 8 << 16 ),
120 121
121 Model_MyPal_All = ( Model_MyPal | 0xffff ), 122 Model_MyPal_All = ( Model_MyPal | 0xffff ),
122 Model_MyPal_620 = ( Model_MyPal | 0x0001 ), 123 Model_MyPal_620 = ( Model_MyPal | 0x0001 ),
123 Model_MyPal_716 = ( Model_MyPal | 0x0002 ), 124 Model_MyPal_716 = ( Model_MyPal | 0x0002 ),
124 Model_MyPal_730 = ( Model_MyPal | 0x0003 ), 125 Model_MyPal_730 = ( Model_MyPal | 0x0003 ),
125 126
126 Model_HTC = ( 9 << 16 ), 127 Model_HTC = ( 9 << 16 ),
127 Model_HTC_All = ( Model_HTC | 0xffff ), 128 Model_HTC_All = ( Model_HTC | 0xffff ),
128 Model_HTC_Universal = ( Model_HTC | 0x0001 ), 129 Model_HTC_Universal = ( Model_HTC | 0x0001 ),
129 Model_HTC_Alpine = ( Model_HTC | 0x0002 ), 130 Model_HTC_Alpine = ( Model_HTC | 0x0002 ),
130 Model_HTC_Apache = ( Model_HTC | 0x0003 ), 131 Model_HTC_Apache = ( Model_HTC | 0x0003 ),
131 Model_HTC_Beetles = ( Model_HTC | 0x0004 ), 132 Model_HTC_Beetles = ( Model_HTC | 0x0004 ),
132 Model_HTC_Blueangel = ( Model_HTC | 0x0005 ), 133 Model_HTC_Blueangel = ( Model_HTC | 0x0005 ),
133 Model_HTC_Himalaya = ( Model_HTC | 0x0006 ), 134 Model_HTC_Himalaya = ( Model_HTC | 0x0006 ),
134 Model_HTC_Magician = ( Model_HTC | 0x0007 ), 135 Model_HTC_Magician = ( Model_HTC | 0x0007 ),
135 136
136 Model_Motorola = ( 9 << 17 ), 137 Model_Motorola = ( 9 << 17 ),
137 Model_Motorola_All = ( Model_Motorola | 0xffff ), 138 Model_Motorola_All = ( Model_Motorola | 0xffff ),
138 Model_Motorola_EZX = ( Model_Motorola | 0x0001 ), 139 Model_Motorola_EZX = ( Model_Motorola | 0x0001 ),
139 140
140}; 141};
141 142
142/** 143/**
143 * The vendor of the device 144 * The vendor of the device
144 */ 145 */
145enum OVendor { 146enum OVendor {
146 Vendor_Unknown, 147 Vendor_Unknown,
147 148
148 Vendor_HP, 149 Vendor_HP,
149 Vendor_Sharp, 150 Vendor_Sharp,
150 Vendor_SIEMENS, 151 Vendor_SIEMENS,
151 Vendor_MundN, 152 Vendor_MundN,
152 Vendor_GMate, 153 Vendor_GMate,
153 Vendor_MasterIA, 154 Vendor_MasterIA,
154 Vendor_GenuineIntel, 155 Vendor_GenuineIntel,
155 Vendor_Asus, 156 Vendor_Asus,
156 Vendor_HTC, 157 Vendor_HTC,
157 Vendor_Motorola, 158 Vendor_Motorola,
158}; 159};
159 160
160/** 161/**
161 * The System used 162 * The System used
162 */ 163 */
163enum OSystem { 164enum OSystem {
164 System_Unknown, 165 System_Unknown,
165 166
166 System_Familiar, 167 System_Familiar,
167 System_Zaurus, 168 System_Zaurus,
168 System_OpenZaurus, 169 System_OpenZaurus,
169 System_Linupy, 170 System_Linupy,
170 System_OpenEmbedded, 171 System_OpenEmbedded,
171 System_PC, 172 System_PC,
172 System_OpenEZX, 173 System_OpenEZX,
173 System_Angstrom, 174 System_Angstrom,
174}; 175};
175 176
176typedef struct { 177typedef struct {
177 OSystem system; 178 OSystem system;
178 char* sysstr; 179 char* sysstr;
179 char* sysvfile; 180 char* sysvfile;
180} ODistribution; 181} ODistribution;
181 182
182extern ODistribution distributions[]; 183extern ODistribution distributions[];
183 184
184 185
185enum OLedState { 186enum OLedState {
186 Led_Off, 187 Led_Off,
187 Led_On, 188 Led_On,
188 Led_BlinkSlow, 189 Led_BlinkSlow,
189 Led_BlinkFast 190 Led_BlinkFast
190}; 191};
191 192
192enum OLed { 193enum OLed {
193 Led_Mail, 194 Led_Mail,
194 Led_Power, 195 Led_Power,
195 Led_BlueTooth 196 Led_BlueTooth
196}; 197};
197 198
198enum OHardKey { 199enum OHardKey {
199 HardKey_Datebook = Qt::Key_F9, 200 HardKey_Datebook = Qt::Key_F9,
200 HardKey_Contacts = Qt::Key_F10, 201 HardKey_Contacts = Qt::Key_F10,
201 HardKey_Menu = Qt::Key_F11, 202 HardKey_Menu = Qt::Key_F11,
202 HardKey_Home = Qt::Key_F12, 203 HardKey_Home = Qt::Key_F12,
203 HardKey_Mail = Qt::Key_F13, 204 HardKey_Mail = Qt::Key_F13,
204 HardKey_Record = Qt::Key_F24, 205 HardKey_Record = Qt::Key_F24,
205 HardKey_Suspend = Qt::Key_F34, 206 HardKey_Suspend = Qt::Key_F34,
206 HardKey_Backlight = Qt::Key_F35, 207 HardKey_Backlight = Qt::Key_F35,
207 HardKey_Action = Qt::Key_F10, 208 HardKey_Action = Qt::Key_F10,
208 HardKey_OK = Qt::Key_F11, 209 HardKey_OK = Qt::Key_F11,
209 HardKey_End = Qt::Key_F12, 210 HardKey_End = Qt::Key_F12,
210}; 211};
211 212
212enum ODirection { 213enum ODirection {
213 CW = 0, 214 CW = 0,
214 CCW = 1, 215 CCW = 1,
215 Flip = 2, 216 Flip = 2,
216}; 217};
217 218
218enum OHingeStatus { 219enum OHingeStatus {
219 CASE_CLOSED = 3, 220 CASE_CLOSED = 3,
220 CASE_PORTRAIT = 2, 221 CASE_PORTRAIT = 2,
221 CASE_LANDSCAPE = 0, 222 CASE_LANDSCAPE = 0,
222 CASE_UNKNOWN = 1, 223 CASE_UNKNOWN = 1,
223}; 224};
224 225
225/* default button for qvfb or such 226/* default button for qvfb or such
226 * see odevice.cpp for details. 227 * see odevice.cpp for details.
227 * hint: manage a user defined button for qvfb? 228 * hint: manage a user defined button for qvfb?
228 * alwin 229 * alwin
229 */ 230 */
230struct default_button { 231struct default_button {
231 Qt::Key code; 232 Qt::Key code;
232 char *utext; 233 char *utext;
233 char *pix; 234 char *pix;
234 char *fpressedservice; 235 char *fpressedservice;
235 char *fpressedaction; 236 char *fpressedaction;
236 char *fheldservice; 237 char *fheldservice;
237 char *fheldaction; 238 char *fheldaction;
238}; 239};
239 240
240/** 241/**
241 * A singleton which gives informations about device specefic option 242 * A singleton which gives informations about device specefic option
242 * like the Hardware used, LEDs, the Base Distribution and 243 * like the Hardware used, LEDs, the Base Distribution and
243 * hardware key mappings. 244 * hardware key mappings.
244 * 245 *
245 * @short A small class for device specific options 246 * @short A small class for device specific options
246 * @see QObject 247 * @see QObject
247 * @author Robert Griebl 248 * @author Robert Griebl
248 * @version 1.0 249 * @version 1.0
249 */ 250 */
250class ODevice : public QObject 251class ODevice : public QObject
251{ 252{
252 Q_OBJECT 253 Q_OBJECT
253 254
254private: 255private:
255 /* disable copy */ 256 /* disable copy */
256 ODevice ( const ODevice & ); 257 ODevice ( const ODevice & );
257 258
258protected: 259protected:
259 ODevice(); 260 ODevice();
260 virtual void init(const QString&); 261 virtual void init(const QString&);
261 virtual void initButtons(); 262 virtual void initButtons();
262 static void sendSuspendmsg(); 263 static void sendSuspendmsg();
263 264
264 ODeviceData *d; 265 ODeviceData *d;
265 266
diff --git a/libopie2/opiecore/device/odevice_ipaq.cpp b/libopie2/opiecore/device/odevice_ipaq.cpp
index 63b60a7..00939bf 100644
--- a/libopie2/opiecore/device/odevice_ipaq.cpp
+++ b/libopie2/opiecore/device/odevice_ipaq.cpp
@@ -1,518 +1,553 @@
1/* 1/*
2                 This file is part of the Opie Project 2                 This file is part of the Opie Project
3 =. (C) 2002-2005 The Opie Team <opie-devel@handhelds.org> 3 =. (C) 2002-2005 The Opie Team <opie-devel@handhelds.org>
4 .=l. 4 .=l.
5           .>+-= 5           .>+-=
6 _;:,     .>    :=|. This program is free software; you can 6 _;:,     .>    :=|. This program is free software; you can
7.> <`_,   >  .   <= redistribute it and/or modify it under 7.> <`_,   >  .   <= redistribute it and/or modify it under
8:`=1 )Y*s>-.--   : the terms of the GNU Library General Public 8:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
9.="- .-=="i,     .._ License as published by the Free Software 9.="- .-=="i,     .._ License as published by the Free Software
10 - .   .-<_>     .<> Foundation; version 2 of the License. 10 - .   .-<_>     .<> Foundation; version 2 of the License.
11     ._= =}       : 11     ._= =}       :
12    .%`+i>       _;_. 12    .%`+i>       _;_.
13    .i_,=:_.      -<s. This program is distributed in the hope that 13    .i_,=:_.      -<s. This program is distributed in the hope that
14     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 14     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
15    : ..    .:,     . . . without even the implied warranty of 15    : ..    .:,     . . . without even the implied warranty of
16    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 16    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
17  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 17  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
18..}^=.=       =       ; Library General Public License for more 18..}^=.=       =       ; Library General Public License for more
19++=   -.     .`     .: details. 19++=   -.     .`     .: details.
20 :     =  ...= . :.=- 20 :     =  ...= . :.=-
21 -.   .:....=;==+<; You should have received a copy of the GNU 21 -.   .:....=;==+<; You should have received a copy of the GNU
22  -_. . .   )=.  = Library General Public License along with 22  -_. . .   )=.  = Library General Public License along with
23    --        :-=` this library; see the file COPYING.LIB. 23    --        :-=` this library; see the file COPYING.LIB.
24 If not, write to the Free Software Foundation, 24 If not, write to the Free Software Foundation,
25 Inc., 59 Temple Place - Suite 330, 25 Inc., 59 Temple Place - Suite 330,
26 Boston, MA 02111-1307, USA. 26 Boston, MA 02111-1307, USA.
27 27
28*/ 28*/
29 29
30#include "odevice_ipaq.h" 30#include "odevice_ipaq.h"
31 31
32/* QT */ 32/* QT */
33#include <qapplication.h> 33#include <qapplication.h>
34#include <qdir.h> 34#include <qdir.h>
35#include <qfile.h> 35#include <qfile.h>
36#include <qtextstream.h> 36#include <qtextstream.h>
37#include <qwindowsystem_qws.h> 37#include <qwindowsystem_qws.h>
38 38
39/* OPIE */ 39/* OPIE */
40#include <qpe/config.h> 40#include <qpe/config.h>
41#include <qpe/sound.h> 41#include <qpe/sound.h>
42#include <qpe/qcopenvelope_qws.h> 42#include <qpe/qcopenvelope_qws.h>
43 43
44#include <opie2/okeyfilter.h> 44#include <opie2/okeyfilter.h>
45#include <opie2/oresource.h> 45#include <opie2/oresource.h>
46 46
47/* STD */ 47/* STD */
48#include <fcntl.h> 48#include <fcntl.h>
49#include <math.h> 49#include <math.h>
50#include <stdlib.h> 50#include <stdlib.h>
51#include <signal.h> 51#include <signal.h>
52#include <sys/ioctl.h> 52#include <sys/ioctl.h>
53#include <sys/time.h> 53#include <sys/time.h>
54#include <unistd.h> 54#include <unistd.h>
55#ifndef QT_NO_SOUND 55#ifndef QT_NO_SOUND
56#include <linux/soundcard.h> 56#include <linux/soundcard.h>
57#endif 57#endif
58 58
59 59
60using namespace Opie::Core; 60using namespace Opie::Core;
61using namespace Opie::Core::Internal; 61using namespace Opie::Core::Internal;
62 62
63/* KERNEL */ 63/* KERNEL */
64#define OD_IOC(dir,type,number,size) (( dir << 30 ) | ( type << 8 ) | ( number ) | ( size << 16 )) 64#define OD_IOC(dir,type,number,size) (( dir << 30 ) | ( type << 8 ) | ( number ) | ( size << 16 ))
65 65
66#define OD_IO(type,number) OD_IOC(0,type,number,0) 66#define OD_IO(type,number) OD_IOC(0,type,number,0)
67#define OD_IOW(type,number,size) OD_IOC(1,type,number,sizeof(size)) 67#define OD_IOW(type,number,size) OD_IOC(1,type,number,sizeof(size))
68#define OD_IOR(type,number,size) OD_IOC(2,type,number,sizeof(size)) 68#define OD_IOR(type,number,size) OD_IOC(2,type,number,sizeof(size))
69#define OD_IORW(type,number,size) OD_IOC(3,type,number,sizeof(size)) 69#define OD_IORW(type,number,size) OD_IOC(3,type,number,sizeof(size))
70 70
71typedef struct { 71typedef struct {
72 unsigned char OffOnBlink; /* 0=off 1=on 2=Blink */ 72 unsigned char OffOnBlink; /* 0=off 1=on 2=Blink */
73 unsigned char TotalTime; /* Units of 5 seconds */ 73 unsigned char TotalTime; /* Units of 5 seconds */
74 unsigned char OnTime; /* units of 100m/s */ 74 unsigned char OnTime; /* units of 100m/s */
75 unsigned char OffTime; /* units of 100m/s */ 75 unsigned char OffTime; /* units of 100m/s */
76} LED_IN; 76} LED_IN;
77 77
78typedef struct { 78typedef struct {
79 unsigned char mode; 79 unsigned char mode;
80 unsigned char pwr; 80 unsigned char pwr;
81 unsigned char brightness; 81 unsigned char brightness;
82} FLITE_IN; 82} FLITE_IN;
83 83
84#define LED_ON OD_IOW( 'f', 5, LED_IN ) 84#define LED_ON OD_IOW( 'f', 5, LED_IN )
85#define FLITE_ON OD_IOW( 'f', 7, FLITE_IN ) 85#define FLITE_ON OD_IOW( 'f', 7, FLITE_IN )
86 86
87struct i_button ipaq_buttons [] = { 87struct i_button ipaq_buttons [] = {
88 { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx | Model_iPAQ_H191x, 88 { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx | Model_iPAQ_H191x | Model_iPAQ_H22xx | Model_iPAQ_HX4700 | Model_iPAQ_H4xxx,
89 Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), 89 Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"),
90 "devicebuttons/ipaq_calendar", 90 "devicebuttons/ipaq_calendar",
91 "datebook", "nextView()", 91 "datebook", "nextView()",
92 "today", "raise()" }, 92 "today", "raise()" },
93 { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx | Model_iPAQ_H191x, 93 { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx | Model_iPAQ_H191x | Model_iPAQ_H22xx | Model_iPAQ_HX4700 | Model_iPAQ_H4xxx,
94 Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), 94 Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"),
95 "devicebuttons/ipaq_contact", 95 "devicebuttons/ipaq_contact",
96 "addressbook", "raise()", 96 "addressbook", "raise()",
97 "addressbook", "beamBusinessCard()" }, 97 "addressbook", "beamBusinessCard()" },
98 { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx, 98 { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx,
99 Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), 99 Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"),
100 "devicebuttons/ipaq_menu", 100 "devicebuttons/ipaq_menu",
101 "QPE/TaskBar", "toggleMenu()", 101 "QPE/TaskBar", "toggleMenu()",
102 "QPE/TaskBar", "toggleStartMenu()" }, 102 "QPE/TaskBar", "toggleStartMenu()" },
103 { Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx, 103 { Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx,
104 Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), 104 Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"),
105 "devicebuttons/ipaq_mail", 105 "devicebuttons/ipaq_mail",
106 "opiemail", "raise()", 106 "opiemail", "raise()",
107 "opiemail", "newMail()" }, 107 "opiemail", "newMail()" },
108 { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx | Model_iPAQ_H191x, 108 { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx | Model_iPAQ_H191x | Model_iPAQ_H4xxx,
109 Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), 109 Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"),
110 "devicebuttons/ipaq_home", 110 "devicebuttons/ipaq_home",
111 "QPE/Launcher", "home()", 111 "QPE/Launcher", "home()",
112 "buttonsettings", "raise()" }, 112 "buttonsettings", "raise()" },
113 { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx, 113 { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx,
114 Qt::Key_F24, QT_TRANSLATE_NOOP("Button", "Record Button"), 114 Qt::Key_F24, QT_TRANSLATE_NOOP("Button", "Record Button"),
115 "devicebuttons/ipaq_record", 115 "devicebuttons/ipaq_record",
116 "QPE/VMemo", "toggleRecord()", 116 "QPE/VMemo", "toggleRecord()",
117 "sound", "raise()" }, 117 "sound", "raise()" },
118 118
119 { Model_iPAQ_H191x, 119 { Model_iPAQ_H191x | Model_iPAQ_H4xxx,
120 Qt::Key_F8, QT_TRANSLATE_NOOP("Button", "Mail Button"), 120 Qt::Key_F8, QT_TRANSLATE_NOOP("Button", "Mail Button"),
121 "devicebuttons/ipaq_mail", 121 "devicebuttons/ipaq_mail",
122 "opiemail", "raise()", 122 "opiemail", "raise()",
123 "opiemail", "newMail()" }, 123 "opiemail", "newMail()" },
124 { Model_iPAQ_H191x, 124 { Model_iPAQ_H191x | Model_iPAQ_H4xxx,
125 Qt::Key_F7, QT_TRANSLATE_NOOP("Button", "Record Button"), 125 Qt::Key_F7, QT_TRANSLATE_NOOP("Button", "Record Button"),
126 "devicebuttons/ipaq_record", 126 "devicebuttons/ipaq_record",
127 "QPE/VMemo", "toggleRecord()", 127 "QPE/VMemo", "toggleRecord()",
128 "sound", "raise()" }, 128 "sound", "raise()" },
129 129
130 //h2200 has different button mapping
131 { Model_iPAQ_H22xx,
132 Qt::Key_NumLock, QT_TRANSLATE_NOOP("Button", "Mail Button"),
133 "devicebuttons/ipaq_mail",
134 "opiemail", "raise()",
135 "opiemail", "newMail()" },
136 { Model_iPAQ_H22xx,
137 Qt::Key_ScrollLock, QT_TRANSLATE_NOOP("Button", "Menu Button"),
138 "devicebuttons/ipaq_menu",
139 "QPE/TaskBar", "toggleMenu()",
140 "QPE/TaskBar", "toggleStartMenu()" },
141 // and hx4700 has different button mapping still
142 { Model_iPAQ_HX4700,
143 Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Mail Button"),
144 "devicebuttons/ipaq_mail",
145 "opiemail", "raise()",
146 "opiemail", "newMail()" },
147 { Model_iPAQ_HX4700,
148 Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Record Button"),
149 "devicebuttons/ipaq_record",
150 "QPE/VMemo", "toggleRecord()",
151 "sound", "raise()" },
152 { Model_iPAQ_HX4700,
153 Qt::Key_Home, QT_TRANSLATE_NOOP("Button", "Home Button"),
154 "devicebuttons/ipaq_home",
155 "QPE/Launcher", "home()",
156 "buttonsettings", "raise()" },
157
130}; 158};
131 159
132void iPAQ::init(const QString& model) 160void iPAQ::init(const QString& model)
133{ 161{
134 d->m_vendorstr = "HP"; 162 d->m_vendorstr = "HP";
135 d->m_vendor = Vendor_HP; 163 d->m_vendor = Vendor_HP;
136 164
137 d->m_modelstr = model.mid(model.findRev('H')); 165 d->m_modelstr = model.mid(model.findRev('H'));
138 166
139 if ( d->m_modelstr == "H3100" ) 167 if ( d->m_modelstr == "H3100" )
140 d->m_model = Model_iPAQ_H31xx; 168 d->m_model = Model_iPAQ_H31xx;
141 else if ( d->m_modelstr == "H3600" ) 169 else if ( d->m_modelstr == "H3600" )
142 d->m_model = Model_iPAQ_H36xx; 170 d->m_model = Model_iPAQ_H36xx;
143 else if ( d->m_modelstr == "H3700" ) 171 else if ( d->m_modelstr == "H3700" )
144 d->m_model = Model_iPAQ_H37xx; 172 d->m_model = Model_iPAQ_H37xx;
145 else if ( d->m_modelstr == "H3800" ) 173 else if ( d->m_modelstr == "H3800" )
146 d->m_model = Model_iPAQ_H38xx; 174 d->m_model = Model_iPAQ_H38xx;
147 else if ( d->m_modelstr == "H3900" ) 175 else if ( d->m_modelstr == "H3900" )
148 d->m_model = Model_iPAQ_H39xx; 176 d->m_model = Model_iPAQ_H39xx;
149 else if ( d->m_modelstr == "H5400" ) 177 else if ( d->m_modelstr == "H5400" )
150 d->m_model = Model_iPAQ_H5xxx; 178 d->m_model = Model_iPAQ_H5xxx;
151 else if ( d->m_modelstr == "H2200" ) 179 else if ( d->m_modelstr == "H2200" )
152 d->m_model = Model_iPAQ_H22xx; 180 d->m_model = Model_iPAQ_H22xx;
153 else if ( d->m_modelstr == "H1910" ) 181 else if ( d->m_modelstr == "H1910" )
154 d->m_model = Model_iPAQ_H191x; 182 d->m_model = Model_iPAQ_H191x;
155 else if ( d->m_modelstr == "H1940" ) 183 else if ( d->m_modelstr == "H1940" )
156 d->m_model = Model_iPAQ_H1940; 184 d->m_model = Model_iPAQ_H1940;
157 else if ( d->m_modelstr == "HX4700" ) 185 else if ( d->m_modelstr == "HX4700" )
158 d->m_model = Model_iPAQ_HX4700; 186 d->m_model = Model_iPAQ_HX4700;
187 else if ( d->m_modelstr == "H4000" )
188 d->m_model = Model_iPAQ_H4xxx;
159 189
160 else 190 else
161 d->m_model = Model_Unknown; 191 d->m_model = Model_Unknown;
162 192
163 switch ( d->m_model ) { 193 switch ( d->m_model ) {
164 case Model_iPAQ_H31xx: 194 case Model_iPAQ_H31xx:
165 case Model_iPAQ_H38xx: 195 case Model_iPAQ_H38xx:
166 d->m_rotation = Rot90; 196 d->m_rotation = Rot90;
167 break; 197 break;
168 case Model_iPAQ_H5xxx: 198 case Model_iPAQ_H5xxx:
169 case Model_iPAQ_H22xx: 199 case Model_iPAQ_H22xx:
170 case Model_iPAQ_H191x: 200 case Model_iPAQ_H191x:
171 case Model_iPAQ_H1940: 201 case Model_iPAQ_H1940:
172 case Model_iPAQ_HX4700: 202 case Model_iPAQ_HX4700:
203 case Model_iPAQ_H4xxx:
173 d->m_rotation = Rot0; 204 d->m_rotation = Rot0;
174 break; 205 break;
175 case Model_iPAQ_H36xx: 206 case Model_iPAQ_H36xx:
176 case Model_iPAQ_H37xx: 207 case Model_iPAQ_H37xx:
177 case Model_iPAQ_H39xx: 208 case Model_iPAQ_H39xx:
178 default: 209 default:
179 d->m_rotation = Rot270; 210 d->m_rotation = Rot270;
180 break; 211 break;
181 212
182 } 213 }
183 214
184 m_leds [0] = m_leds [1] = Led_Off; 215 m_leds [0] = m_leds [1] = Led_Off;
185 216
186 m_power_timer = 0; 217 m_power_timer = 0;
187 218
188} 219}
189 220
190void iPAQ::initButtons() 221void iPAQ::initButtons()
191{ 222{
192 if ( d->m_buttons ) 223 if ( d->m_buttons )
193 return; 224 return;
194 225
195 if ( isQWS( ) ) { 226 if ( isQWS( ) ) {
196 addPreHandler(this); 227 addPreHandler(this);
197 } 228 }
198 229
199 d->m_buttons = new QValueList <ODeviceButton>; 230 d->m_buttons = new QValueList <ODeviceButton>;
200 231
201 for ( uint i = 0; i < ( sizeof( ipaq_buttons ) / sizeof( i_button )); i++ ) { 232 for ( uint i = 0; i < ( sizeof( ipaq_buttons ) / sizeof( i_button )); i++ ) {
202 i_button *ib = ipaq_buttons + i; 233 i_button *ib = ipaq_buttons + i;
203 ODeviceButton b; 234 ODeviceButton b;
204 235
205 if (( ib->model & d->m_model ) == d->m_model ) { 236 if (( ib->model & d->m_model ) == d->m_model ) {
206 b. setKeycode ( ib->code ); 237 b. setKeycode ( ib->code );
207 b. setUserText ( QObject::tr ( "Button", ib->utext )); 238 b. setUserText ( QObject::tr ( "Button", ib->utext ));
208 b. setPixmap ( OResource::loadPixmap ( ib->pix )); 239 b. setPixmap ( OResource::loadPixmap ( ib->pix ));
209 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib->fpressedservice ), ib->fpressedaction )); 240 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib->fpressedservice ), ib->fpressedaction ));
210 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib->fheldservice ), ib->fheldaction )); 241 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib->fheldservice ), ib->fheldaction ));
211 242
212 d->m_buttons->append ( b ); 243 d->m_buttons->append ( b );
213 } 244 }
214 } 245 }
215 reloadButtonMapping(); 246 reloadButtonMapping();
216} 247}
217 248
218QValueList <OLed> iPAQ::ledList() const 249QValueList <OLed> iPAQ::ledList() const
219{ 250{
220 QValueList <OLed> vl; 251 QValueList <OLed> vl;
221 vl << Led_Power; 252 vl << Led_Power;
222 253
223 if ( d->m_model == Model_iPAQ_H38xx ) 254 if ( d->m_model == Model_iPAQ_H38xx )
224 vl << Led_BlueTooth; 255 vl << Led_BlueTooth;
225 return vl; 256 return vl;
226} 257}
227 258
228QValueList <OLedState> iPAQ::ledStateList ( OLed l ) const 259QValueList <OLedState> iPAQ::ledStateList ( OLed l ) const
229{ 260{
230 QValueList <OLedState> vl; 261 QValueList <OLedState> vl;
231 262
232 if ( l == Led_Power ) 263 if ( l == Led_Power )
233 vl << Led_Off << Led_On << Led_BlinkSlow << Led_BlinkFast; 264 vl << Led_Off << Led_On << Led_BlinkSlow << Led_BlinkFast;
234 else if ( l == Led_BlueTooth && d->m_model == Model_iPAQ_H38xx ) 265 else if ( l == Led_BlueTooth && d->m_model == Model_iPAQ_H38xx )
235 vl << Led_Off; // << Led_On << ??? 266 vl << Led_Off; // << Led_On << ???
236 267
237 return vl; 268 return vl;
238} 269}
239 270
240OLedState iPAQ::ledState ( OLed l ) const 271OLedState iPAQ::ledState ( OLed l ) const
241{ 272{
242 switch ( l ) { 273 switch ( l ) {
243 case Led_Power: 274 case Led_Power:
244 return m_leds [0]; 275 return m_leds [0];
245 case Led_BlueTooth: 276 case Led_BlueTooth:
246 return m_leds [1]; 277 return m_leds [1];
247 default: 278 default:
248 return Led_Off; 279 return Led_Off;
249 } 280 }
250} 281}
251 282
252bool iPAQ::setLedState ( OLed l, OLedState st ) 283bool iPAQ::setLedState ( OLed l, OLedState st )
253{ 284{
254 static int fd = ::open ( "/dev/touchscreen/0", O_RDWR | O_NONBLOCK ); 285 static int fd = ::open ( "/dev/touchscreen/0", O_RDWR | O_NONBLOCK );
255 286
256 if ( l == Led_Power ) { 287 if ( l == Led_Power ) {
257 if ( fd >= 0 ) { 288 if ( fd >= 0 ) {
258 LED_IN leds; 289 LED_IN leds;
259 ::memset ( &leds, 0, sizeof( leds )); 290 ::memset ( &leds, 0, sizeof( leds ));
260 leds. TotalTime = 0; 291 leds. TotalTime = 0;
261 leds. OnTime = 0; 292 leds. OnTime = 0;
262 leds. OffTime = 1; 293 leds. OffTime = 1;
263 leds. OffOnBlink = 2; 294 leds. OffOnBlink = 2;
264 295
265 switch ( st ) { 296 switch ( st ) {
266 case Led_Off : leds. OffOnBlink = 0; break; 297 case Led_Off : leds. OffOnBlink = 0; break;
267 case Led_On : leds. OffOnBlink = 1; break; 298 case Led_On : leds. OffOnBlink = 1; break;
268 case Led_BlinkSlow: leds. OnTime = 10; leds. OffTime = 10; break; 299 case Led_BlinkSlow: leds. OnTime = 10; leds. OffTime = 10; break;
269 case Led_BlinkFast: leds. OnTime = 5; leds. OffTime = 5; break; 300 case Led_BlinkFast: leds. OnTime = 5; leds. OffTime = 5; break;
270 } 301 }
271 302
272 if ( ::ioctl ( fd, LED_ON, &leds ) >= 0 ) { 303 if ( ::ioctl ( fd, LED_ON, &leds ) >= 0 ) {
273 m_leds [0] = st; 304 m_leds [0] = st;
274 return true; 305 return true;
275 } 306 }
276 } 307 }
277 } 308 }
278 return false; 309 return false;
279} 310}
280 311
281 312
282bool iPAQ::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, bool autoRepeat ) 313bool iPAQ::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, bool autoRepeat )
283{ 314{
284 int newkeycode = keycode; 315 int newkeycode = keycode;
285 316
286 switch ( keycode ) { 317 switch ( keycode ) {
287 // H38xx/H39xx have no "Q" key anymore - this is now the Mail key 318 // H38xx/H39xx have no "Q" key anymore - this is now the Mail key
288 case HardKey_Menu: { 319 case HardKey_Menu: {
289 if (( d->m_model == Model_iPAQ_H38xx ) || 320 if (( d->m_model == Model_iPAQ_H38xx ) ||
290 ( d->m_model == Model_iPAQ_H39xx ) || 321 ( d->m_model == Model_iPAQ_H39xx ) ||
291 ( d->m_model == Model_iPAQ_H5xxx)) { 322 ( d->m_model == Model_iPAQ_H5xxx)) {
292 newkeycode = HardKey_Mail; 323 newkeycode = HardKey_Mail;
293 } 324 }
294 break; 325 break;
295 } 326 }
296 327
297 // Rotate cursor keys 180 or 270 328 // Rotate cursor keys 180 or 270
298 case Key_Left : 329 case Key_Left :
299 case Key_Right: 330 case Key_Right:
300 case Key_Up : 331 case Key_Up :
301 case Key_Down : { 332 case Key_Down : {
302 if (( d->m_model == Model_iPAQ_H31xx ) || 333 if (( d->m_model == Model_iPAQ_H31xx ) ||
303 ( d->m_model == Model_iPAQ_H38xx )) { 334 ( d->m_model == Model_iPAQ_H38xx )) {
304 newkeycode = Key_Left + ( keycode - Key_Left + 2 ) % 4; 335 newkeycode = Key_Left + ( keycode - Key_Left + 2 ) % 4;
305 } 336 }
306 // Rotate the cursor keys by 270 337 // Rotate the cursor keys by 270
307 // keycode - Key_Left = position of the button starting from left clockwise 338 // keycode - Key_Left = position of the button starting from left clockwise
308 // add the rotation to it and modolo. No we've the original offset 339 // add the rotation to it and modolo. No we've the original offset
309 // add the offset to the Key_Left key 340 // add the offset to the Key_Left key
310 if (( d->m_model == Model_iPAQ_H5xxx ) || 341 if (( d->m_model == Model_iPAQ_H5xxx ) ||
311 ( d->m_model == Model_iPAQ_H191x ) || 342 ( d->m_model == Model_iPAQ_H191x ) ||
343 ( d->m_model == Model_iPAQ_H4xxx ) ||
312 ( d->m_model == Model_iPAQ_H1940 )) 344 ( d->m_model == Model_iPAQ_H1940 ))
313 newkeycode = Key_Left + ( keycode - Key_Left + 3 ) % 4; 345 newkeycode = Key_Left + ( keycode - Key_Left + 3 ) % 4;
314 break; 346 break;
315 } 347 }
316 348
317 // map Power Button short/long press to F6 for h191x 349 // map Power Button short/long press to F6 for h191x
318 case Key_F6: 350 case Key_F6:
319 if ( d->m_model != Model_iPAQ_H191x ) 351 if ( d->m_model != Model_iPAQ_H191x && d->m_model != Model_iPAQ_H4xxx )
320 break; 352 break;
321 // map Power Button short/long press to F34/F35 353 // map Power Button short/long press to F34/F35
322 case Key_SysReq: { 354 case Key_SysReq: {
323 if ( isPress ) { 355 if ( isPress ) {
324 if ( m_power_timer ) 356 if ( m_power_timer )
325 killTimer ( m_power_timer ); 357 killTimer ( m_power_timer );
326 m_power_timer = startTimer ( 500 ); 358 m_power_timer = startTimer ( 500 );
327 } 359 }
328 else if ( m_power_timer ) { 360 else if ( m_power_timer ) {
329 killTimer ( m_power_timer ); 361 killTimer ( m_power_timer );
330 m_power_timer = 0; 362 m_power_timer = 0;
331 QWSServer::sendKeyEvent ( -1, HardKey_Suspend, 0, true, false ); 363 QWSServer::sendKeyEvent ( -1, HardKey_Suspend, 0, true, false );
332 QWSServer::sendKeyEvent ( -1, HardKey_Suspend, 0, false, false ); 364 QWSServer::sendKeyEvent ( -1, HardKey_Suspend, 0, false, false );
333 } 365 }
334 newkeycode = Key_unknown; 366 newkeycode = Key_unknown;
335 break; 367 break;
336 } 368 }
337 } 369 }
338 370
339 if ( newkeycode != keycode ) { 371 if ( newkeycode != keycode ) {
340 if ( newkeycode != Key_unknown ) 372 if ( newkeycode != Key_unknown )
341 QWSServer::sendKeyEvent ( -1, newkeycode, modifiers, isPress, autoRepeat ); 373 QWSServer::sendKeyEvent ( -1, newkeycode, modifiers, isPress, autoRepeat );
342 return true; 374 return true;
343 } 375 }
344 else 376 else
345 return false; 377 return false;
346} 378}
347 379
348void iPAQ::timerEvent ( QTimerEvent * ) 380void iPAQ::timerEvent ( QTimerEvent * )
349{ 381{
350 killTimer ( m_power_timer ); 382 killTimer ( m_power_timer );
351 m_power_timer = 0; 383 m_power_timer = 0;
352 QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, true, false ); 384 QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, true, false );
353 QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, false, false ); 385 QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, false, false );
354} 386}
355 387
356 388
357void iPAQ::playAlarmSound() 389void iPAQ::playAlarmSound()
358{ 390{
359#ifndef QT_NO_SOUND 391#ifndef QT_NO_SOUND
360 static Sound snd ( "alarm" ); 392 static Sound snd ( "alarm" );
361 if(!snd.isFinished()) 393 if(!snd.isFinished())
362 return; 394 return;
363 395
364 changeMixerForAlarm(0, "/dev/sound/mixer", &snd ); 396 changeMixerForAlarm(0, "/dev/sound/mixer", &snd );
365 snd. play(); 397 snd. play();
366#endif 398#endif
367} 399}
368 400
369bool iPAQ::setDisplayBrightness ( int bright ) 401bool iPAQ::setDisplayBrightness ( int bright )
370{ 402{
371 bool res = false; 403 bool res = false;
372 int fd; 404 int fd;
373 405
374 if ( bright > 255 ) 406 if ( bright > 255 )
375 bright = 255; 407 bright = 255;
376 if ( bright < 0 ) 408 if ( bright < 0 )
377 bright = 0; 409 bright = 0;
378 410
379 QString cmdline; 411 QString cmdline;
380 412
381 switch ( model()) { 413 switch ( model()) {
382 case Model_iPAQ_H191x: 414 case Model_iPAQ_H191x:
415 case Model_iPAQ_H4xxx:
383 { 416 {
384 QDir sysClass( "/sys/class/backlight/pxafb/" ); 417 QDir sysClass( "/sys/class/backlight/pxafb/" );
385 sysClass.setFilter(QDir::Dirs); 418 sysClass.setFilter(QDir::Dirs);
386 int fd; 419 int fd;
387 if ( sysClass.exists() ) { 420 if ( sysClass.exists() ) {
388 QString sysClassPath = sysClass.absFilePath( "/sys/class/backlight/pxafb/power" ); 421 QString sysClassPath = sysClass.absFilePath( "/sys/class/backlight/pxafb/power" );
389 fd = ::open( sysClassPath, O_WRONLY | O_NONBLOCK ); 422 fd = ::open( sysClassPath, O_WRONLY | O_NONBLOCK );
390 if ( fd ) { 423 if ( fd ) {
391 char buf[10]; 424 char buf[10];
392 buf[0] = bright ? 0 : 4; 425 buf[0] = bright ? 0 : 4;
393 buf[1] = '\0'; 426 buf[1] = '\0';
394 res = ( ::write( fd, &buf[0], 2 ) == 0 ); 427 res = ( ::write( fd, &buf[0], 2 ) == 0 );
395 ::close( fd ); 428 ::close( fd );
396 } 429 }
397 sysClassPath = sysClass.absFilePath( "/sys/class/backlight/pxafb/brightness" ); 430 sysClassPath = sysClass.absFilePath( "/sys/class/backlight/pxafb/brightness" );
398 fd = ::open( sysClassPath, O_WRONLY | O_NONBLOCK ); 431 fd = ::open( sysClassPath, O_WRONLY | O_NONBLOCK );
399 if ( fd ) { 432 if ( fd ) {
400 char buf[100]; 433 char buf[100];
401 int len = ::snprintf( &buf[0], sizeof buf, "%d", bright ); 434 int len = ::snprintf( &buf[0], sizeof buf, "%d", bright );
402 res = ( ::write( fd, &buf[0], len ) == 0 ); 435 res = ( ::write( fd, &buf[0], len ) == 0 );
403 ::close( fd ); 436 ::close( fd );
404 } 437 }
405 } 438 }
406 } 439 }
407 break; 440 break;
408 441
409 case Model_iPAQ_HX4700: 442 case Model_iPAQ_HX4700:
410 cmdline = QString::fromLatin1( "echo %1 > /sys/class/backlight/w100fb/brightness" ).arg( bright ); 443 cmdline = QString::fromLatin1( "echo %1 > /sys/class/backlight/w100fb/brightness" ).arg( bright );
411 // No Global::shellQuote as we gurantee it to be sane 444 // No Global::shellQuote as we gurantee it to be sane
412 res = ( ::system( QFile::encodeName(cmdline) ) == 0 ); 445 res = ( ::system( QFile::encodeName(cmdline) ) == 0 );
413 break; 446 break;
414 447
415 448
416 default: 449 default:
417 if (( fd = ::open ( "/dev/touchscreen/0", O_WRONLY )) >= 0 ) { 450 if (( fd = ::open ( "/dev/touchscreen/0", O_WRONLY )) >= 0 ) {
418 FLITE_IN bl; 451 FLITE_IN bl;
419 bl. mode = 1; 452 bl. mode = 1;
420 bl. pwr = bright ? 1 : 0; 453 bl. pwr = bright ? 1 : 0;
421 bl. brightness = ( bright * ( displayBrightnessResolution() - 1 ) + 127 ) / 255; 454 bl. brightness = ( bright * ( displayBrightnessResolution() - 1 ) + 127 ) / 255;
422 res = ( ::ioctl ( fd, FLITE_ON, &bl ) == 0 ); 455 res = ( ::ioctl ( fd, FLITE_ON, &bl ) == 0 );
423 ::close ( fd ); 456 ::close ( fd );
424 } 457 }
425 } 458 }
426 return res; 459 return res;
427} 460}
428 461
429int iPAQ::displayBrightnessResolution() const 462int iPAQ::displayBrightnessResolution() const
430{ 463{
431 switch ( model()) { 464 switch ( model()) {
432 case Model_iPAQ_H31xx: 465 case Model_iPAQ_H31xx:
433 case Model_iPAQ_H36xx: 466 case Model_iPAQ_H36xx:
434 case Model_iPAQ_H37xx: 467 case Model_iPAQ_H37xx:
435 return 128; // really 256, but >128 could damage the LCD 468 return 128; // really 256, but >128 could damage the LCD
436 469
437 case Model_iPAQ_H38xx: 470 case Model_iPAQ_H38xx:
438 case Model_iPAQ_H39xx: 471 case Model_iPAQ_H39xx:
439 return 64; 472 return 64;
440 case Model_iPAQ_H5xxx: 473 case Model_iPAQ_H5xxx:
441 case Model_iPAQ_HX4700: 474 case Model_iPAQ_HX4700:
475 case Model_iPAQ_H4xxx:
442 return 255; 476 return 255;
443 case Model_iPAQ_H191x: 477 case Model_iPAQ_H191x:
444 return 7; 478 return 7;
445 case Model_iPAQ_H1940: 479 case Model_iPAQ_H1940:
446 return 44; 480 return 44;
447 default: 481 default:
448 return 2; 482 return 2;
449 } 483 }
450} 484}
451 485
452bool iPAQ::setDisplayStatus ( bool on ) 486bool iPAQ::setDisplayStatus ( bool on )
453{ 487{
454 bool res = false; 488 bool res = false;
455 489
456 QString cmdline; 490 QString cmdline;
457 491
458 if ( model() == Model_iPAQ_H191x ) { 492 if ( model() == Model_iPAQ_H191x ) {
459 QDir sysClass( "/sys/class/lcd/pxafb/" ); 493 QDir sysClass( "/sys/class/lcd/pxafb/" );
460 sysClass.setFilter(QDir::Dirs); 494 sysClass.setFilter(QDir::Dirs);
461 if ( sysClass.exists() ) { 495 if ( sysClass.exists() ) {
462 QString sysClassPath = sysClass.absFilePath( "/sys/class/lcd/pxafb/power" ); 496 QString sysClassPath = sysClass.absFilePath( "/sys/class/lcd/pxafb/power" );
463 int fd = ::open( sysClassPath, O_WRONLY | O_NONBLOCK ); 497 int fd = ::open( sysClassPath, O_WRONLY | O_NONBLOCK );
464 if ( fd ) { 498 if ( fd ) {
465 char buf[10]; 499 char buf[10];
466 buf[0] = on ? 0 : 4; 500 buf[0] = on ? 0 : 4;
467 buf[1] = '\0'; 501 buf[1] = '\0';
468 res = ( ::write( fd, &buf[0], 2 ) == 0 ); 502 res = ( ::write( fd, &buf[0], 2 ) == 0 );
469 ::close( fd ); 503 ::close( fd );
470 } 504 }
471 } 505 }
472 return res; 506 return res;
473 } else { 507 } else {
474 return OAbstractMobileDevice::setDisplayStatus(on); 508 return OAbstractMobileDevice::setDisplayStatus(on);
475 } 509 }
476 510
477 res = ( ::system( QFile::encodeName(cmdline) ) == 0 ); 511 res = ( ::system( QFile::encodeName(cmdline) ) == 0 );
478 512
479 return res; 513 return res;
480} 514}
481 515
482bool iPAQ::hasLightSensor() const 516bool iPAQ::hasLightSensor() const
483{ 517{
484 switch (model()) { 518 switch (model()) {
485 case Model_iPAQ_H191x: 519 case Model_iPAQ_H191x:
520 case Model_iPAQ_H4xxx:
486 return false; 521 return false;
487 default: 522 default:
488 return true; 523 return true;
489 } 524 }
490} 525}
491 526
492int iPAQ::readLightSensor() 527int iPAQ::readLightSensor()
493{ 528{
494 int fd; 529 int fd;
495 int val = -1; 530 int val = -1;
496 531
497 if (( fd = ::open ( "/proc/hal/light_sensor", O_RDONLY )) >= 0 ) { 532 if (( fd = ::open ( "/proc/hal/light_sensor", O_RDONLY )) >= 0 ) {
498 char buffer [8]; 533 char buffer [8];
499 534
500 if ( ::read ( fd, buffer, 5 ) == 5 ) { 535 if ( ::read ( fd, buffer, 5 ) == 5 ) {
501 char *endptr; 536 char *endptr;
502 537
503 buffer [4] = 0; 538 buffer [4] = 0;
504 val = ::strtol ( buffer + 2, &endptr, 16 ); 539 val = ::strtol ( buffer + 2, &endptr, 16 );
505 540
506 if ( *endptr != 0 ) 541 if ( *endptr != 0 )
507 val = -1; 542 val = -1;
508 } 543 }
509 ::close ( fd ); 544 ::close ( fd );
510 } 545 }
511 546
512 return val; 547 return val;
513} 548}
514 549
515int iPAQ::lightSensorResolution() const 550int iPAQ::lightSensorResolution() const
516{ 551{
517 return 256; 552 return 256;
518} 553}