-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice.cpp | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -1,265 +1,266 @@ | |||
1 | 2005-??-??Opie 1.2.1 | 1 | 2005-??-??Opie 1.2.1 |
2 | 2 | ||
3 | Fixed Bugs | 3 | Fixed Bugs |
4 | ---------- | 4 | ---------- |
5 | * n.a.- scale O-Menu-Applets appropriately (mickeyl) | 5 | * n.a.- scale O-Menu-Applets appropriately (mickeyl) |
6 | * #1535- Missing line break and unnecessary location shown with Today-Calendar plugin (deller) | 6 | * #1535- Missing line break and unnecessary location shown with Today-Calendar plugin (deller) |
7 | * n.a.- always show volume and wireless applet popups inside visible screen (deller) | 7 | * n.a.- always show volume and wireless applet popups inside visible screen (deller) |
8 | * #1565- crash-fix in odevice.cpp while scanning the distribution table (deller) | ||
8 | 9 | ||
9 | 2005-03-25Opie 1.2.0 | 10 | 2005-03-25Opie 1.2.0 |
10 | 11 | ||
11 | Fixed Bugs | 12 | Fixed Bugs |
12 | ---------- | 13 | ---------- |
13 | * #1613 - AdvancedFM - scale toolbar icons appropriately (drw) | 14 | * #1613 - AdvancedFM - scale toolbar icons appropriately (drw) |
14 | * #1620 - OFileSelector - show the button on press and not on press on hold (alwin) | 15 | * #1620 - OFileSelector - show the button on press and not on press on hold (alwin) |
15 | * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke) | 16 | * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke) |
16 | * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw) | 17 | * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw) |
17 | * n.a. - make qpeglobal.h include qglobal.h (zecke) | 18 | * n.a. - make qpeglobal.h include qglobal.h (zecke) |
18 | 19 | ||
19 | 2005-03-20Opie 1.2.0-rc1 | 20 | 2005-03-20Opie 1.2.0-rc1 |
20 | 21 | ||
21 | 22 | ||
22 | New Features | 23 | New Features |
23 | ------------ | 24 | ------------ |
24 | * Launcher: Support a static background pixmap (mickeyl) | 25 | * Launcher: Support a static background pixmap (mickeyl) |
25 | * LauncherSettings: Choose whether to have a static background pixmap (mickeyl) | 26 | * LauncherSettings: Choose whether to have a static background pixmap (mickeyl) |
26 | * PackageManager supports the 'lists_dir' ipkg configuration option (drw) | 27 | * PackageManager supports the 'lists_dir' ipkg configuration option (drw) |
27 | * Added hi-res inline images for large resolution devices (drw) | 28 | * Added hi-res inline images for large resolution devices (drw) |
28 | * Improved launcher icons for consistency (ar) | 29 | * Improved launcher icons for consistency (ar) |
29 | * Datebook: Added plugin system to datebook so holidays and birthdays from contacts may displayed in datebook (alwin) | 30 | * Datebook: Added plugin system to datebook so holidays and birthdays from contacts may displayed in datebook (alwin) |
30 | 31 | ||
31 | Fixed Bugs | 32 | Fixed Bugs |
32 | ---------- | 33 | ---------- |
33 | * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers) | 34 | * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers) |
34 | * #1412 - Launcher Settings - fixed default settings for background in Edit tab dialog (drw) | 35 | * #1412 - Launcher Settings - fixed default settings for background in Edit tab dialog (drw) |
35 | * #1472 - Opie textedit now check for unsaved changes on ESC key (ljp) | 36 | * #1472 - Opie textedit now check for unsaved changes on ESC key (ljp) |
36 | * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke) | 37 | * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke) |
37 | * #1482 - Fix double '/' in paths (zecke) | 38 | * #1482 - Fix double '/' in paths (zecke) |
38 | * #1536 - Autosave of custom locations in opie backup (ar) | 39 | * #1536 - Autosave of custom locations in opie backup (ar) |
39 | * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke) | 40 | * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke) |
40 | * #1540 - Implemented deletion of DocLnks in opie-eye (zecke) | 41 | * #1540 - Implemented deletion of DocLnks in opie-eye (zecke) |
41 | * #1542 - Fixed Todo crash when priority < 1 or > 5 (drw) | 42 | * #1542 - Fixed Todo crash when priority < 1 or > 5 (drw) |
42 | * #1550 - Browse for alarm sound start in QPEDIR/sounds/ (zecke) | 43 | * #1550 - Browse for alarm sound start in QPEDIR/sounds/ (zecke) |
43 | * #1554 - Fixed Opie-Console name in .desktop file (mickeyl) | 44 | * #1554 - Fixed Opie-Console name in .desktop file (mickeyl) |
44 | * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke) | 45 | * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke) |
45 | * #1558 - Fixed opie-login breaking opie startup (mickeyl) | 46 | * #1558 - Fixed opie-login breaking opie startup (mickeyl) |
46 | * #1560 - Fixed Opie-Console picking up the wrong shell (bluelightning) | 47 | * #1560 - Fixed Opie-Console picking up the wrong shell (bluelightning) |
47 | * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar) | 48 | * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar) |
48 | * #1591 - Addressbook sortorder changed by clicking on column 0 (eilers) | 49 | * #1591 - Addressbook sortorder changed by clicking on column 0 (eilers) |
49 | * #1599 - Security - change recommendation for opie-multiauth to opie-securityplugin (gints) | 50 | * #1599 - Security - change recommendation for opie-multiauth to opie-securityplugin (gints) |
50 | * #1604 - Checkbook crashed on startup (drw) | 51 | * #1604 - Checkbook crashed on startup (drw) |
51 | * #1608 - Addressbook crashed after search, which may caused by not initialzed member variable (eilers) | 52 | * #1608 - Addressbook crashed after search, which may caused by not initialzed member variable (eilers) |
52 | * #1608 - QueryByExampe-Datediff on SQL database did not worked properly (eilers) | 53 | * #1608 - QueryByExampe-Datediff on SQL database did not worked properly (eilers) |
53 | * n.a. - Netsystemtime - fixed UI to prevent error dialog from displaying when it shouldn't, get rid of some compiler warnings (drw) | 54 | * n.a. - Netsystemtime - fixed UI to prevent error dialog from displaying when it shouldn't, get rid of some compiler warnings (drw) |
54 | * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw) | 55 | * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw) |
55 | * n.a. - PackageManager - fixed bug where lists_dir was not being honored at startup (drw) | 56 | * n.a. - PackageManager - fixed bug where lists_dir was not being honored at startup (drw) |
56 | * n.a. - PackageManager - provided default value for lists_dir when none is entered in configuration dialog (drw) | 57 | * n.a. - PackageManager - provided default value for lists_dir when none is entered in configuration dialog (drw) |
57 | * n.a. - OTabWidget - fixed scroll buttons, fix display position of tabs (drw) | 58 | * n.a. - OTabWidget - fixed scroll buttons, fix display position of tabs (drw) |
58 | * n.a. - AddressBook - fixed sorting by 'File As' name (drw) | 59 | * n.a. - AddressBook - fixed sorting by 'File As' name (drw) |
59 | * n.a. - AddressBook - fixed category handling for 'All' and 'Unfiled' (eilers) | 60 | * n.a. - AddressBook - fixed category handling for 'All' and 'Unfiled' (eilers) |
60 | * n.a. - AddressBook - fixed letter picker record selection and sort records afterwards (drw) | 61 | * n.a. - AddressBook - fixed letter picker record selection and sort records afterwards (drw) |
61 | 62 | ||
62 | Internal | 63 | Internal |
63 | -------- | 64 | -------- |
64 | * Worked around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl) | 65 | * Worked around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl) |
65 | * Killed the need for weak symbols in QtE (zecke) | 66 | * Killed the need for weak symbols in QtE (zecke) |
66 | * Added optional building libqpe without inline images (mickeyl) | 67 | * Added optional building libqpe without inline images (mickeyl) |
67 | * OColorButton - fixed so does not emit a colorSelected signal inside of resizeEvent (drw) | 68 | * OColorButton - fixed so does not emit a colorSelected signal inside of resizeEvent (drw) |
68 | 69 | ||
69 | 2005-02-03Opie 1.1.9 | 70 | 2005-02-03Opie 1.1.9 |
70 | 71 | ||
71 | New Features | 72 | New Features |
72 | ------------ | 73 | ------------ |
73 | * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl) | 74 | * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl) |
74 | * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl) | 75 | * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl) |
75 | * Usability enhancements in OpieIRC (skyhusker) | 76 | * Usability enhancements in OpieIRC (skyhusker) |
76 | 77 | ||
77 | Fixed Bugs | 78 | Fixed Bugs |
78 | ---------- | 79 | ---------- |
79 | * #1501 - Fixed bug in todo sql backend (eilers) | 80 | * #1501 - Fixed bug in todo sql backend (eilers) |
80 | * #1505 - Added more Swap sizes in memoryapplet (mickeyl) | 81 | * #1505 - Added more Swap sizes in memoryapplet (mickeyl) |
81 | * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke) | 82 | * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke) |
82 | * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke) | 83 | * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke) |
83 | * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl) | 84 | * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl) |
84 | * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl) | 85 | * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl) |
85 | * n.a. - Fixed numerous buglets in OpieIRC (skyhusker) | 86 | * n.a. - Fixed numerous buglets in OpieIRC (skyhusker) |
86 | 87 | ||
87 | Internal | 88 | Internal |
88 | -------- | 89 | -------- |
89 | * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl) | 90 | * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl) |
90 | * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl) | 91 | * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl) |
91 | * Made Opie compilable with Qt/Embedded 2.3.10 (ar) | 92 | * Made Opie compilable with Qt/Embedded 2.3.10 (ar) |
92 | * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl) | 93 | * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl) |
93 | * Build tree cleanups (mickeyl) | 94 | * Build tree cleanups (mickeyl) |
94 | 95 | ||
95 | 2004-11-26Opie 1.1.8 | 96 | 2004-11-26Opie 1.1.8 |
96 | 97 | ||
97 | New Features | 98 | New Features |
98 | ------------ | 99 | ------------ |
99 | * PackageManager supports installation of local ipkg files (drw) | 100 | * PackageManager supports installation of local ipkg files (drw) |
100 | * PackageManager supports linking of applications to root (drw) | 101 | * PackageManager supports linking of applications to root (drw) |
101 | * PackageManager supports src/gz feeds (drw,wimpie) | 102 | * PackageManager supports src/gz feeds (drw,wimpie) |
102 | * Added a syslog information tab to sysinfo (mickeyl) | 103 | * Added a syslog information tab to sysinfo (mickeyl) |
103 | * Added new, more consistent, PIM icons + a GIMP teplate (ar) | 104 | * Added new, more consistent, PIM icons + a GIMP teplate (ar) |
104 | 105 | ||
105 | Fixed Bugs | 106 | Fixed Bugs |
106 | ---------- | 107 | ---------- |
107 | * #1017 - Tetrix doesn't display correctly for high resolution screens (drw) | 108 | * #1017 - Tetrix doesn't display correctly for high resolution screens (drw) |
108 | * #1269 - VCards were imported into personal area if it was activated (eilers) | 109 | * #1269 - VCards were imported into personal area if it was activated (eilers) |
109 | * #1464 - Packagemanager dont set active filter after install a package (drw) | 110 | * #1464 - Packagemanager dont set active filter after install a package (drw) |
110 | * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers) | 111 | * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers) |
111 | * #1493 - Fixed one column layout bug of the launcher (hrw) | 112 | * #1493 - Fixed one column layout bug of the launcher (hrw) |
112 | * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw) | 113 | * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw) |
113 | * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw) | 114 | * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw) |
114 | * n.a. - Battery Applet - fix sizing of battery info popup (drw,mickeyl) | 115 | * n.a. - Battery Applet - fix sizing of battery info popup (drw,mickeyl) |
115 | 116 | ||
116 | Internal | 117 | Internal |
117 | -------- | 118 | -------- |
118 | * Moved libopie1 to unsupported (mickeyl) | 119 | * Moved libopie1 to unsupported (mickeyl) |
119 | * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers) | 120 | * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers) |
120 | * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers) | 121 | * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers) |
121 | 122 | ||
122 | 2004-11-14Opie 1.1.7 | 123 | 2004-11-14Opie 1.1.7 |
123 | 124 | ||
124 | New Features | 125 | New Features |
125 | ------------ | 126 | ------------ |
126 | * libOpieDB now uses SQLite V3 instead V2. Remember to upgrade your database files! (eilers) | 127 | * libOpieDB now uses SQLite V3 instead V2. Remember to upgrade your database files! (eilers) |
127 | * Backup now uses the busy indicator when backing up and restore (ar) | 128 | * Backup now uses the busy indicator when backing up and restore (ar) |
128 | * OpiePlayer2 gained adding of Directories to the playlist (zecke) | 129 | * OpiePlayer2 gained adding of Directories to the playlist (zecke) |
129 | * OpiePlayer2 better error handling (zecke) | 130 | * OpiePlayer2 better error handling (zecke) |
130 | * OpiePlayer2 progress indication while streaming (zecke) | 131 | * OpiePlayer2 progress indication while streaming (zecke) |
131 | * OpiePlayer2 ported to use libxine 1.0.0-rc6a (brad,zecke) | 132 | * OpiePlayer2 ported to use libxine 1.0.0-rc6a (brad,zecke) |
132 | * Ported brightnessapplet from Qtopia 1.7 (mickeyl) | 133 | * Ported brightnessapplet from Qtopia 1.7 (mickeyl) |
133 | * Opie-Eye got a Digital Camera File Backend (alwin,zecke) | 134 | * Opie-Eye got a Digital Camera File Backend (alwin,zecke) |
134 | * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke) | 135 | * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke) |
135 | * Opie-Console use Custom Font and Size in a Profile (harlekin) | 136 | * Opie-Console use Custom Font and Size in a Profile (harlekin) |
136 | * Opie-Console transparently log the Output and Input to a file (harlekin) | 137 | * Opie-Console transparently log the Output and Input to a file (harlekin) |
137 | * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem) | 138 | * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem) |
138 | * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem) | 139 | * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem) |
139 | * Opie-Security gained a 'test authentication' button (clem) | 140 | * Opie-Security gained a 'test authentication' button (clem) |
140 | * Opie-Eye got a more unique layout (menubar), a slideshow, user can setup some defaults | 141 | * Opie-Eye got a more unique layout (menubar), a slideshow, user can setup some defaults |
141 | * Opie-Mail improve the handling of POP mail boxes (alwin) | 142 | * Opie-Mail improve the handling of POP mail boxes (alwin) |
142 | * Both Opie-Eye and Opie-Mail were greatly improved due the hard work of Rajko Albrecht(alwin) | 143 | * Both Opie-Eye and Opie-Mail were greatly improved due the hard work of Rajko Albrecht(alwin) |
143 | * Opie IRC - backports of the 'NeIRC fork' (zecke) | 144 | * Opie IRC - backports of the 'NeIRC fork' (zecke) |
144 | 145 | ||
145 | Fixed Bugs | 146 | Fixed Bugs |
146 | ---------- | 147 | ---------- |
147 | * #501 - Pickboard is able to show 'Umlaute' (TT,zecke) | 148 | * #501 - Pickboard is able to show 'Umlaute' (TT,zecke) |
148 | * #608 - Make Opie usable for left handed users (zecke) | 149 | * #608 - Make Opie usable for left handed users (zecke) |
149 | * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke) | 150 | * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke) |
150 | * #1245 - Opie-Go 'paused' (zecke) | 151 | * #1245 - Opie-Go 'paused' (zecke) |
151 | * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke) | 152 | * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke) |
152 | * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke) | 153 | * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke) |
153 | * #1395 - Build VNC Backend with gcc3.4 | 154 | * #1395 - Build VNC Backend with gcc3.4 |
154 | * #1440 - The icon of opie-mobilemsg is missing (CoreDump) | 155 | * #1440 - The icon of opie-mobilemsg is missing (CoreDump) |
155 | * #1426 - Add missing opie-bartender Icon (CoreDump) | 156 | * #1426 - Add missing opie-bartender Icon (CoreDump) |
156 | * #1445 - Opie-Sheet Has No Icon (CoreDump) | 157 | * #1445 - Opie-Sheet Has No Icon (CoreDump) |
157 | * #1448 - Brightness Applet added (mickeyl) | 158 | * #1448 - Brightness Applet added (mickeyl) |
158 | * #1450 - ZSame didn't clear the bonus item after winning a game (zecke) | 159 | * #1450 - ZSame didn't clear the bonus item after winning a game (zecke) |
159 | * #1482 - Fix OFileSelector to be able to sort by size (zecke) | 160 | * #1482 - Fix OFileSelector to be able to sort by size (zecke) |
160 | * n.a. - Opie-mail: fixed some crasher, some layout-problems | 161 | * n.a. - Opie-mail: fixed some crasher, some layout-problems |
161 | * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke) | 162 | * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke) |
162 | * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke) | 163 | * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke) |
163 | * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem) | 164 | * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem) |
164 | * n.a. - Build system: Fix deps in several config.in (and fix scripts/deps.pl too) to stop breaking builds, especially with make -j highNumber (clem) | 165 | * n.a. - Build system: Fix deps in several config.in (and fix scripts/deps.pl too) to stop breaking builds, especially with make -j highNumber (clem) |
165 | * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl) | 166 | * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl) |
166 | 167 | ||
167 | Internal | 168 | Internal |
168 | -------- | 169 | -------- |
169 | * Opie-Qashmoney has been moved to unsupported (mickeyl) | 170 | * Opie-Qashmoney has been moved to unsupported (mickeyl) |
170 | * Opie-Ubrowser has been moved to unsupported (mickeyl) | 171 | * Opie-Ubrowser has been moved to unsupported (mickeyl) |
171 | 172 | ||
172 | 2004-09-17Opie 1.1.6 | 173 | 2004-09-17Opie 1.1.6 |
173 | 174 | ||
174 | New Features | 175 | New Features |
175 | ------------ | 176 | ------------ |
176 | * Fifteen gained configurable number of items (zecke) | 177 | * Fifteen gained configurable number of items (zecke) |
177 | * Fifteen can have custom background images (zecke) | 178 | * Fifteen can have custom background images (zecke) |
178 | * Added daemonizing capabilities to QWS Server [via Qt/Embedded] (mickeyl) | 179 | * Added daemonizing capabilities to QWS Server [via Qt/Embedded] (mickeyl) |
179 | * Integrated the new security framework into libopie2 (zecke,clem) | 180 | * Integrated the new security framework into libopie2 (zecke,clem) |
180 | * Converted the launcher to use the new security framework (zecke) | 181 | * Converted the launcher to use the new security framework (zecke) |
181 | * Backup can now handle custom locations for backup and restore (ar) | 182 | * Backup can now handle custom locations for backup and restore (ar) |
182 | * Implemented right-on-hold feedback (wimpie,zecke) | 183 | * Implemented right-on-hold feedback (wimpie,zecke) |
183 | * Lots of new features in opie-reader (tim,pohly) | 184 | * Lots of new features in opie-reader (tim,pohly) |
184 | * Build system cleanups (schurig) | 185 | * Build system cleanups (schurig) |
185 | 186 | ||
186 | Fixed Bugs | 187 | Fixed Bugs |
187 | -------- | 188 | -------- |
188 | * #1005 - Fixed backup to CompactFlash (ar) | 189 | * #1005 - Fixed backup to CompactFlash (ar) |
189 | * #1167 - Fixed Opie write crashing on more text than one page (ar) | 190 | * #1167 - Fixed Opie write crashing on more text than one page (ar) |
190 | * #1225 - Fixed repeated light flashing on Zaurus with keyz (mickeyl) | 191 | * #1225 - Fixed repeated light flashing on Zaurus with keyz (mickeyl) |
191 | * #1359 - Fixed bookmarks in Gutenbrowser (ljp) | 192 | * #1359 - Fixed bookmarks in Gutenbrowser (ljp) |
192 | * #1361 - Fixed auto upercase in Opie-Addressbook (eilers) | 193 | * #1361 - Fixed auto upercase in Opie-Addressbook (eilers) |
193 | * #1370 - Pimconverter now reacts on cancel key (eilers) | 194 | * #1370 - Pimconverter now reacts on cancel key (eilers) |
194 | * #1376 - Bring back the capslock/numlock display (zecke) | 195 | * #1376 - Bring back the capslock/numlock display (zecke) |
195 | * #1383 - Language settings now warns about losing open apps (Markus Litz) | 196 | * #1383 - Language settings now warns about losing open apps (Markus Litz) |
196 | * #1393 - Fixed line wrap issues in opie-console for the default profile (mickeyl) | 197 | * #1393 - Fixed line wrap issues in opie-console for the default profile (mickeyl) |
197 | * #1394 - Fixed oversized headline in opie-login (coredump) | 198 | * #1394 - Fixed oversized headline in opie-login (coredump) |
198 | * #1396 - Opie-console captures the escape key and vim is working (zecke) | 199 | * #1396 - Opie-console captures the escape key and vim is working (zecke) |
199 | * #1401 - Scrollbar is now only visible if necessary in DocTab (mickeyl) | 200 | * #1401 - Scrollbar is now only visible if necessary in DocTab (mickeyl) |
200 | 201 | ||
201 | 2004-07-06Opie 1.1.4 | 202 | 2004-07-06Opie 1.1.4 |
202 | 203 | ||
203 | New Features | 204 | New Features |
204 | ------------ | 205 | ------------ |
205 | * Added four themes courtesy Robert Griebl (http://www.softforge.de/zstyle) | 206 | * Added four themes courtesy Robert Griebl (http://www.softforge.de/zstyle) |
206 | * Added Conversion tool for pim-data (eilers) | 207 | * Added Conversion tool for pim-data (eilers) |
207 | * Introduced new OPimAccessFactory and OBackendFactory which simplyfies database access (eilers) | 208 | * Introduced new OPimAccessFactory and OBackendFactory which simplyfies database access (eilers) |
208 | * Modified the PIM API for providing generic use of OPimRecords (eilers) | 209 | * Modified the PIM API for providing generic use of OPimRecords (eilers) |
209 | * Clicking on the application symbol now iterates over the application's top level widgets if already raised (zecke) | 210 | * Clicking on the application symbol now iterates over the application's top level widgets if already raised (zecke) |
210 | 211 | ||
211 | Fixed Bugs | 212 | Fixed Bugs |
212 | -------- | 213 | -------- |
213 | * #1068 - Country Drop Down Box Off Screen | 214 | * #1068 - Country Drop Down Box Off Screen |
214 | * #1291 - Opie tinykate does not open .desktop files (ar) | 215 | * #1291 - Opie tinykate does not open .desktop files (ar) |
215 | * #1291 - Opie sheet not saving correctly (ar) | 216 | * #1291 - Opie sheet not saving correctly (ar) |
216 | * #1294 - Opie does not know about British Summer Time | 217 | * #1294 - Opie does not know about British Summer Time |
217 | * #1314 - Drawpad initialization (mickeyl) | 218 | * #1314 - Drawpad initialization (mickeyl) |
218 | * #1317 - Packagemanager crashes on hold-down or install (chicken) | 219 | * #1317 - Packagemanager crashes on hold-down or install (chicken) |
219 | * #1321 - Batteryapplet graphic glitch (harlekin) | 220 | * #1321 - Batteryapplet graphic glitch (harlekin) |
220 | * #1324 - ZSafe not starting up (mickeyl) | 221 | * #1324 - ZSafe not starting up (mickeyl) |
221 | * #1328 - Personal Home Address fields is trimmed to 1char (eilers) | 222 | * #1328 - Personal Home Address fields is trimmed to 1char (eilers) |
222 | * #1327 - Opie-mail ipk does not depend on libopiedb2 (chicken) | 223 | * #1327 - Opie-mail ipk does not depend on libopiedb2 (chicken) |
223 | * #1345 - Networksettingsplugin wlan plugin dependency on libpcap0 (mickeyl) | 224 | * #1345 - Networksettingsplugin wlan plugin dependency on libpcap0 (mickeyl) |
224 | * #1348 - Datebook dependency on libopiedb2 (chicken) | 225 | * #1348 - Datebook dependency on libopiedb2 (chicken) |
225 | * #1328 - Switched SQLDatabase and VCards char encoding from latin1 to unicode (eilers) | 226 | * #1328 - Switched SQLDatabase and VCards char encoding from latin1 to unicode (eilers) |
226 | 227 | ||
227 | 2004-04-25Opie 1.1.3 | 228 | 2004-04-25Opie 1.1.3 |
228 | 229 | ||
229 | * Introduced first implementation of SQL-Support using SQLite (eilers) | 230 | * Introduced first implementation of SQL-Support using SQLite (eilers) |
230 | * Added a new Gutenberg Project reader app - opie-gutenbrowser (ljp) | 231 | * Added a new Gutenberg Project reader app - opie-gutenbrowser (ljp) |
231 | * Added a real system graffiti character set (brad) | 232 | * Added a real system graffiti character set (brad) |
232 | * Added Generic Keyconfig Widget (zecke) | 233 | * Added Generic Keyconfig Widget (zecke) |
233 | * Improved Screenshotapplet and Drawpad integration. You can now open a screenshot in drawpad and take notes (zecke) | 234 | * Improved Screenshotapplet and Drawpad integration. You can now open a screenshot in drawpad and take notes (zecke) |
234 | * Added new Bible reader app - opie-dagger (drw) | 235 | * Added new Bible reader app - opie-dagger (drw) |
235 | * Added a new Image Viewer. Work is ongoing (zecke,alwin) | 236 | * Added a new Image Viewer. Work is ongoing (zecke,alwin) |
236 | * Added namespace usage in libopie2 and everywhere (zecke,alwin) | 237 | * Added namespace usage in libopie2 and everywhere (zecke,alwin) |
237 | * Enabled the possibility to pass command line arguments to applications (mickeyl) | 238 | * Enabled the possibility to pass command line arguments to applications (mickeyl) |
238 | * Added an about applet showing some credits and information about Opie (mickeyl) | 239 | * Added an about applet showing some credits and information about Opie (mickeyl) |
239 | * Added benchmarking functionality to sysinfo (mickeyl) | 240 | * Added benchmarking functionality to sysinfo (mickeyl) |
240 | * Added applet and configuration application for switching hardware keyboard layouts (alwin) | 241 | * Added applet and configuration application for switching hardware keyboard layouts (alwin) |
241 | * Ported applications from libopie1 to libopie2* (drw,ar,alwin) | 242 | * Ported applications from libopie1 to libopie2* (drw,ar,alwin) |
242 | * Imported fullscreen and font improvements from the Qkonsole fork to embeddedkonsole (waspe) | 243 | * Imported fullscreen and font improvements from the Qkonsole fork to embeddedkonsole (waspe) |
243 | * Clean-up of package information in control files (drw) | 244 | * Clean-up of package information in control files (drw) |
244 | * Repaired mediummount which was broken since integrating the quicklauncher (alwin) | 245 | * Repaired mediummount which was broken since integrating the quicklauncher (alwin) |
245 | * Improved big-screen support (zecke,ar) | 246 | * Improved big-screen support (zecke,ar) |
246 | * Improved multikeyboard support, added keyboard layout switching applet (mouse) | 247 | * Improved multikeyboard support, added keyboard layout switching applet (mouse) |
247 | * Added a new mail client based on libetpan (harlekin,alwin,jgf) | 248 | * Added a new mail client based on libetpan (harlekin,alwin,jgf) |
248 | * Added new package manager - opie-packagemanager (drw) | 249 | * Added new package manager - opie-packagemanager (drw) |
249 | * Improved light-n-power for C7x0 (mickeyl) | 250 | * Improved light-n-power for C7x0 (mickeyl) |
250 | * Added automatic rotation support for C7x0 (treke) | 251 | * Added automatic rotation support for C7x0 (treke) |
251 | * Split libopie1 up into a set of smaller - functionally grouped - libraries (mickeyl) | 252 | * Split libopie1 up into a set of smaller - functionally grouped - libraries (mickeyl) |
252 | * Added scanning the wireless network neighbourhood to networksettings (mickeyl) | 253 | * Added scanning the wireless network neighbourhood to networksettings (mickeyl) |
253 | 254 | ||
254 | 2003-11-29Opie 1.0.3 | 255 | 2003-11-29Opie 1.0.3 |
255 | 256 | ||
256 | * Released as Version 1.0.3 | 257 | * Released as Version 1.0.3 |
257 | * Improved i18n (various contributors) | 258 | * Improved i18n (various contributors) |
258 | * Reduced application startup time by integrating the TT quicklauncher (zecke,harlekin) | 259 | * Reduced application startup time by integrating the TT quicklauncher (zecke,harlekin) |
259 | * Made the Documents Tab optional (mickeyl) | 260 | * Made the Documents Tab optional (mickeyl) |
260 | * Integrated basic support for HP iPAQ 54xx and the Jornada 5xx (chicken) | 261 | * Integrated basic support for HP iPAQ 54xx and the Jornada 5xx (chicken) |
261 | 262 | ||
262 | 2003-08-04Opie 1.0.0 | 263 | 2003-08-04Opie 1.0.0 |
263 | 264 | ||
264 | * Released as Version 1.0.0 | 265 | * Released as Version 1.0.0 |
265 | * Including a PPP module for easy dial up (tille,harlekin,zecke) | 266 | * Including a PPP module for easy dial up (tille,harlekin,zecke) |
diff --git a/libopie2/opiecore/device/odevice.cpp b/libopie2/opiecore/device/odevice.cpp index af77ed1..fcdbf45 100644 --- a/libopie2/opiecore/device/odevice.cpp +++ b/libopie2/opiecore/device/odevice.cpp | |||
@@ -1,807 +1,807 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | Copyright (C) The Opie Team <opie-devel@handhelds.org> | 3 | Copyright (C) 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; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
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 | #include "odevice_beagle.h" | 30 | #include "odevice_beagle.h" |
31 | #include "odevice_ipaq.h" | 31 | #include "odevice_ipaq.h" |
32 | #include "odevice_jornada.h" | 32 | #include "odevice_jornada.h" |
33 | #include "odevice_ramses.h" | 33 | #include "odevice_ramses.h" |
34 | #include "odevice_simpad.h" | 34 | #include "odevice_simpad.h" |
35 | #include "odevice_yopy.h" | 35 | #include "odevice_yopy.h" |
36 | #include "odevice_zaurus.h" | 36 | #include "odevice_zaurus.h" |
37 | #include "odevice_genuineintel.h" | 37 | #include "odevice_genuineintel.h" |
38 | 38 | ||
39 | /* QT */ | 39 | /* QT */ |
40 | #include <qapplication.h> | 40 | #include <qapplication.h> |
41 | #include <qfile.h> | 41 | #include <qfile.h> |
42 | #include <qtextstream.h> | 42 | #include <qtextstream.h> |
43 | #include <qwindowsystem_qws.h> | 43 | #include <qwindowsystem_qws.h> |
44 | 44 | ||
45 | /* OPIE */ | 45 | /* OPIE */ |
46 | #include <qpe/config.h> | 46 | #include <qpe/config.h> |
47 | #include <qpe/resource.h> | 47 | #include <qpe/resource.h> |
48 | #include <qpe/sound.h> | 48 | #include <qpe/sound.h> |
49 | #include <qpe/qcopenvelope_qws.h> | 49 | #include <qpe/qcopenvelope_qws.h> |
50 | #include <qpe/sound.h> | 50 | #include <qpe/sound.h> |
51 | #include <opie2/okeyfilter.h> | 51 | #include <opie2/okeyfilter.h> |
52 | 52 | ||
53 | /* STD */ | 53 | /* STD */ |
54 | #include <fcntl.h> | 54 | #include <fcntl.h> |
55 | #include <math.h> | 55 | #include <math.h> |
56 | #include <stdlib.h> | 56 | #include <stdlib.h> |
57 | #include <signal.h> | 57 | #include <signal.h> |
58 | #include <sys/ioctl.h> | 58 | #include <sys/ioctl.h> |
59 | #include <sys/time.h> | 59 | #include <sys/time.h> |
60 | #include <unistd.h> | 60 | #include <unistd.h> |
61 | #ifndef QT_NO_SOUND | 61 | #ifndef QT_NO_SOUND |
62 | #include <linux/soundcard.h> | 62 | #include <linux/soundcard.h> |
63 | #endif | 63 | #endif |
64 | 64 | ||
65 | namespace Opie { | 65 | namespace Opie { |
66 | namespace Core { | 66 | namespace Core { |
67 | 67 | ||
68 | static const char* PATH_PROC_CPUINFO = "/proc/cpuinfo"; | 68 | static const char* PATH_PROC_CPUINFO = "/proc/cpuinfo"; |
69 | 69 | ||
70 | 70 | ||
71 | /* STATIC and common implementation */ | 71 | /* STATIC and common implementation */ |
72 | /* EXPORT */ ODistribution distributions[] = { | 72 | /* EXPORT */ ODistribution distributions[] = { |
73 | { System_Familiar, "FamiliarLinux", "/etc/familiar-version" }, | 73 | { System_Familiar, "FamiliarLinux", "/etc/familiar-version" }, |
74 | { System_OpenZaurus, "OpenZaurus", "/etc/oz_version" }, | 74 | { System_OpenZaurus, "OpenZaurus", "/etc/oz_version" }, |
75 | { System_OpenEmbedded, "OpenEmbedded", "/etc/oe-version" }, | 75 | { System_OpenEmbedded, "OpenEmbedded", "/etc/oe-version" }, |
76 | { System_Unknown, "Linux", "/etc/issue" }, | 76 | { System_Unknown, "Linux", "/etc/issue" }, |
77 | }; | 77 | }; |
78 | 78 | ||
79 | 79 | ||
80 | /* EXPORT */ bool isQWS(){ | 80 | /* EXPORT */ bool isQWS(){ |
81 | return qApp ? ( qApp->type() == QApplication::GuiServer ) : false; | 81 | return qApp ? ( qApp->type() == QApplication::GuiServer ) : false; |
82 | } | 82 | } |
83 | 83 | ||
84 | /* EXPORT */ QCString makeChannel ( const char *str ){ | 84 | /* EXPORT */ QCString makeChannel ( const char *str ){ |
85 | if ( str && !::strchr ( str, '/' )) | 85 | if ( str && !::strchr ( str, '/' )) |
86 | return QCString ( "QPE/Application/" ) + str; | 86 | return QCString ( "QPE/Application/" ) + str; |
87 | else | 87 | else |
88 | return str; | 88 | return str; |
89 | } | 89 | } |
90 | 90 | ||
91 | 91 | ||
92 | 92 | ||
93 | /* Now the default implementation of ODevice */ | 93 | /* Now the default implementation of ODevice */ |
94 | 94 | ||
95 | struct default_button default_buttons [] = { | 95 | struct default_button default_buttons [] = { |
96 | { Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), | 96 | { Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), |
97 | "devicebuttons/z_calendar", | 97 | "devicebuttons/z_calendar", |
98 | "datebook", "nextView()", | 98 | "datebook", "nextView()", |
99 | "today", "raise()" }, | 99 | "today", "raise()" }, |
100 | { Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), | 100 | { Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), |
101 | "devicebuttons/z_contact", | 101 | "devicebuttons/z_contact", |
102 | "addressbook", "raise()", | 102 | "addressbook", "raise()", |
103 | "addressbook", "beamBusinessCard()" }, | 103 | "addressbook", "beamBusinessCard()" }, |
104 | { Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), | 104 | { Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), |
105 | "devicebuttons/z_home", | 105 | "devicebuttons/z_home", |
106 | "QPE/Launcher", "home()", | 106 | "QPE/Launcher", "home()", |
107 | "buttonsettings", "raise()" }, | 107 | "buttonsettings", "raise()" }, |
108 | { Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), | 108 | { Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), |
109 | "devicebuttons/z_menu", | 109 | "devicebuttons/z_menu", |
110 | "QPE/TaskBar", "toggleMenu()", | 110 | "QPE/TaskBar", "toggleMenu()", |
111 | "QPE/TaskBar", "toggleStartMenu()" }, | 111 | "QPE/TaskBar", "toggleStartMenu()" }, |
112 | { Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), | 112 | { Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), |
113 | "devicebuttons/z_mail", | 113 | "devicebuttons/z_mail", |
114 | "opiemail", "raise()", | 114 | "opiemail", "raise()", |
115 | "opiemail", "newMail()" }, | 115 | "opiemail", "newMail()" }, |
116 | }; | 116 | }; |
117 | 117 | ||
118 | ODevice *ODevice::inst() | 118 | ODevice *ODevice::inst() |
119 | { | 119 | { |
120 | static ODevice *dev = 0; | 120 | static ODevice *dev = 0; |
121 | QString cpu_info; | 121 | QString cpu_info; |
122 | 122 | ||
123 | if ( !dev ) | 123 | if ( !dev ) |
124 | { | 124 | { |
125 | QFile f( PATH_PROC_CPUINFO ); | 125 | QFile f( PATH_PROC_CPUINFO ); |
126 | if ( f.open( IO_ReadOnly ) ) | 126 | if ( f.open( IO_ReadOnly ) ) |
127 | { | 127 | { |
128 | QTextStream s( &f ); | 128 | QTextStream s( &f ); |
129 | while ( !s.atEnd() ) | 129 | while ( !s.atEnd() ) |
130 | { | 130 | { |
131 | QString line; | 131 | QString line; |
132 | line = s.readLine(); | 132 | line = s.readLine(); |
133 | if ( line.startsWith( "Hardware" ) ) | 133 | if ( line.startsWith( "Hardware" ) ) |
134 | { | 134 | { |
135 | qDebug( "ODevice() - found '%s'", (const char*) line ); | 135 | qDebug( "ODevice() - found '%s'", (const char*) line ); |
136 | cpu_info = line; | 136 | cpu_info = line; |
137 | if ( line.contains( "sharp", false ) ) dev = new Internal::Zaurus(); | 137 | if ( line.contains( "sharp", false ) ) dev = new Internal::Zaurus(); |
138 | else if ( line.contains( "ipaq", false ) ) dev = new Internal::iPAQ(); | 138 | else if ( line.contains( "ipaq", false ) ) dev = new Internal::iPAQ(); |
139 | else if ( line.contains( "simpad", false ) ) dev = new Internal::SIMpad(); | 139 | else if ( line.contains( "simpad", false ) ) dev = new Internal::SIMpad(); |
140 | else if ( line.contains( "jornada", false ) ) dev = new Internal::Jornada(); | 140 | else if ( line.contains( "jornada", false ) ) dev = new Internal::Jornada(); |
141 | else if ( line.contains( "ramses", false ) ) dev = new Internal::Ramses(); | 141 | else if ( line.contains( "ramses", false ) ) dev = new Internal::Ramses(); |
142 | else if ( line.contains( "Tradesquare.NL", false ) ) dev = new Internal::Beagle(); | 142 | else if ( line.contains( "Tradesquare.NL", false ) ) dev = new Internal::Beagle(); |
143 | else qWarning( "ODevice() - unknown hardware - using default." ); | 143 | else qWarning( "ODevice() - unknown hardware - using default." ); |
144 | break; | 144 | break; |
145 | } else if ( line.startsWith( "vendor_id" ) ) { | 145 | } else if ( line.startsWith( "vendor_id" ) ) { |
146 | qDebug( "ODevice() - found '%s'", (const char*) line ); | 146 | qDebug( "ODevice() - found '%s'", (const char*) line ); |
147 | cpu_info = line; | 147 | cpu_info = line; |
148 | if( line.contains( "genuineintel", false ) ) { | 148 | if( line.contains( "genuineintel", false ) ) { |
149 | dev = new Internal::GenuineIntel(); | 149 | dev = new Internal::GenuineIntel(); |
150 | break; | 150 | break; |
151 | } | 151 | } |
152 | } | 152 | } |
153 | } | 153 | } |
154 | } | 154 | } |
155 | else | 155 | else |
156 | { | 156 | { |
157 | qWarning( "ODevice() - can't open '%s' - unknown hardware - using default.", PATH_PROC_CPUINFO ); | 157 | qWarning( "ODevice() - can't open '%s' - unknown hardware - using default.", PATH_PROC_CPUINFO ); |
158 | } | 158 | } |
159 | if ( !dev ) dev = new ODevice(); | 159 | if ( !dev ) dev = new ODevice(); |
160 | dev->init(cpu_info); | 160 | dev->init(cpu_info); |
161 | } | 161 | } |
162 | return dev; | 162 | return dev; |
163 | } | 163 | } |
164 | 164 | ||
165 | ODevice::ODevice() | 165 | ODevice::ODevice() |
166 | { | 166 | { |
167 | d = new ODeviceData; | 167 | d = new ODeviceData; |
168 | 168 | ||
169 | d->m_modelstr = "Unknown"; | 169 | d->m_modelstr = "Unknown"; |
170 | d->m_model = Model_Unknown; | 170 | d->m_model = Model_Unknown; |
171 | d->m_vendorstr = "Unknown"; | 171 | d->m_vendorstr = "Unknown"; |
172 | d->m_vendor = Vendor_Unknown; | 172 | d->m_vendor = Vendor_Unknown; |
173 | d->m_systemstr = "Unknown"; | 173 | d->m_systemstr = "Unknown"; |
174 | d->m_system = System_Unknown; | 174 | d->m_system = System_Unknown; |
175 | d->m_sysverstr = "0.0"; | 175 | d->m_sysverstr = "0.0"; |
176 | d->m_rotation = Rot0; | 176 | d->m_rotation = Rot0; |
177 | d->m_direction = CW; | 177 | d->m_direction = CW; |
178 | 178 | ||
179 | d->m_holdtime = 1000; // 1000ms | 179 | d->m_holdtime = 1000; // 1000ms |
180 | d->m_buttons = 0; | 180 | d->m_buttons = 0; |
181 | d->m_cpu_frequencies = new QStrList; | 181 | d->m_cpu_frequencies = new QStrList; |
182 | 182 | ||
183 | 183 | ||
184 | /* mixer */ | 184 | /* mixer */ |
185 | d->m_sound = d->m_vol = d->m_mixer = -1; | 185 | d->m_sound = d->m_vol = d->m_mixer = -1; |
186 | 186 | ||
187 | /* System QCopChannel created */ | 187 | /* System QCopChannel created */ |
188 | d->m_initializedButtonQcop = false; | 188 | d->m_initializedButtonQcop = false; |
189 | 189 | ||
190 | // New distribution detection code first checks for legacy distributions, | 190 | // New distribution detection code first checks for legacy distributions, |
191 | // identified by /etc/familiar-version or /etc/oz_version. | 191 | // identified by /etc/familiar-version or /etc/oz_version. |
192 | // Then check for OpenEmbedded and lastly, read /etc/issue | 192 | // Then check for OpenEmbedded and lastly, read /etc/issue |
193 | 193 | ||
194 | for ( unsigned int i = 0; i < sizeof distributions; ++i ) | 194 | for ( unsigned int i = 0; i < sizeof(distributions)/sizeof(ODistribution); ++i ) |
195 | { | 195 | { |
196 | if ( QFile::exists( distributions[i].sysvfile ) ) | 196 | if ( QFile::exists( distributions[i].sysvfile ) ) |
197 | { | 197 | { |
198 | d->m_systemstr = distributions[i].sysstr; | 198 | d->m_systemstr = distributions[i].sysstr; |
199 | d->m_system = distributions[i].system; | 199 | d->m_system = distributions[i].system; |
200 | d->m_sysverstr = "<Unknown>"; | 200 | d->m_sysverstr = "<Unknown>"; |
201 | QFile f( distributions[i].sysvfile ); | 201 | QFile f( distributions[i].sysvfile ); |
202 | if ( f.open( IO_ReadOnly ) ) | 202 | if ( f.open( IO_ReadOnly ) ) |
203 | { | 203 | { |
204 | QTextStream ts( &f ); | 204 | QTextStream ts( &f ); |
205 | d->m_sysverstr = ts.readLine().replace( QRegExp( "\\\\." ), "" ); | 205 | d->m_sysverstr = ts.readLine().replace( QRegExp( "\\\\." ), "" ); |
206 | } | 206 | } |
207 | break; | 207 | break; |
208 | } | 208 | } |
209 | } | 209 | } |
210 | } | 210 | } |
211 | 211 | ||
212 | void ODevice::systemMessage( const QCString &msg, const QByteArray & ) | 212 | void ODevice::systemMessage( const QCString &msg, const QByteArray & ) |
213 | { | 213 | { |
214 | if ( msg == "deviceButtonMappingChanged()" ) { | 214 | if ( msg == "deviceButtonMappingChanged()" ) { |
215 | reloadButtonMapping(); | 215 | reloadButtonMapping(); |
216 | } | 216 | } |
217 | } | 217 | } |
218 | 218 | ||
219 | void ODevice::init(const QString&) | 219 | void ODevice::init(const QString&) |
220 | { | 220 | { |
221 | } | 221 | } |
222 | 222 | ||
223 | /** | 223 | /** |
224 | * This method initialises the button mapping | 224 | * This method initialises the button mapping |
225 | */ | 225 | */ |
226 | void ODevice::initButtons() | 226 | void ODevice::initButtons() |
227 | { | 227 | { |
228 | if ( d->m_buttons ) | 228 | if ( d->m_buttons ) |
229 | return; | 229 | return; |
230 | 230 | ||
231 | qDebug ( "init Buttons" ); | 231 | qDebug ( "init Buttons" ); |
232 | d->m_buttons = new QValueList <ODeviceButton>; | 232 | d->m_buttons = new QValueList <ODeviceButton>; |
233 | for ( uint i = 0; i < ( sizeof( default_buttons ) / sizeof( default_button )); i++ ) { | 233 | for ( uint i = 0; i < ( sizeof( default_buttons ) / sizeof( default_button )); i++ ) { |
234 | default_button *db = default_buttons + i; | 234 | default_button *db = default_buttons + i; |
235 | ODeviceButton b; | 235 | ODeviceButton b; |
236 | b. setKeycode ( db->code ); | 236 | b. setKeycode ( db->code ); |
237 | b. setUserText ( QObject::tr ( "Button", db->utext )); | 237 | b. setUserText ( QObject::tr ( "Button", db->utext )); |
238 | b. setPixmap ( Resource::loadPixmap ( db->pix )); | 238 | b. setPixmap ( Resource::loadPixmap ( db->pix )); |
239 | b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( db->fpressedservice ), db->fpressedaction )); | 239 | b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( db->fpressedservice ), db->fpressedaction )); |
240 | b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( db->fheldservice ), db->fheldaction )); | 240 | b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( db->fheldservice ), db->fheldaction )); |
241 | d->m_buttons->append ( b ); | 241 | d->m_buttons->append ( b ); |
242 | } | 242 | } |
243 | 243 | ||
244 | reloadButtonMapping(); | 244 | reloadButtonMapping(); |
245 | } | 245 | } |
246 | 246 | ||
247 | ODevice::~ODevice() | 247 | ODevice::~ODevice() |
248 | { | 248 | { |
249 | // we leak m_devicebuttons and m_cpu_frequency | 249 | // we leak m_devicebuttons and m_cpu_frequency |
250 | // but it's a singleton and it is not so importantant | 250 | // but it's a singleton and it is not so importantant |
251 | // -zecke | 251 | // -zecke |
252 | delete d; | 252 | delete d; |
253 | } | 253 | } |
254 | 254 | ||
255 | /** | 255 | /** |
256 | * This method will try to suspend the device | 256 | * This method will try to suspend the device |
257 | * It only works if the user is the QWS Server and the apm application | 257 | * It only works if the user is the QWS Server and the apm application |
258 | * is installed. | 258 | * is installed. |
259 | * It tries to suspend and then waits some time cause some distributions | 259 | * It tries to suspend and then waits some time cause some distributions |
260 | * do have asynchronus apm implementations. | 260 | * do have asynchronus apm implementations. |
261 | * This method will either fail and return false or it'll suspend the | 261 | * This method will either fail and return false or it'll suspend the |
262 | * device and return once the device got woken up | 262 | * device and return once the device got woken up |
263 | * | 263 | * |
264 | * @return if the device got suspended | 264 | * @return if the device got suspended |
265 | */ | 265 | */ |
266 | bool ODevice::suspend() | 266 | bool ODevice::suspend() |
267 | { | 267 | { |
268 | return false; // default implementation == unknown device or qvfb | 268 | return false; // default implementation == unknown device or qvfb |
269 | } | 269 | } |
270 | 270 | ||
271 | /** | 271 | /** |
272 | * This sets the display on or off | 272 | * This sets the display on or off |
273 | */ | 273 | */ |
274 | bool ODevice::setDisplayStatus( bool on ) | 274 | bool ODevice::setDisplayStatus( bool on ) |
275 | { | 275 | { |
276 | qDebug( "ODevice::setDisplayStatus( %d ) - please override me.", on ); | 276 | qDebug( "ODevice::setDisplayStatus( %d ) - please override me.", on ); |
277 | return false; // don't do anything for unknown models | 277 | return false; // don't do anything for unknown models |
278 | } | 278 | } |
279 | 279 | ||
280 | /** | 280 | /** |
281 | * This sets the display brightness | 281 | * This sets the display brightness |
282 | * | 282 | * |
283 | * @param b The brightness to be set on a scale from 0 to 255 | 283 | * @param b The brightness to be set on a scale from 0 to 255 |
284 | * @return success or failure | 284 | * @return success or failure |
285 | */ | 285 | */ |
286 | bool ODevice::setDisplayBrightness( int b ) | 286 | bool ODevice::setDisplayBrightness( int b ) |
287 | { | 287 | { |
288 | qDebug( "ODevice::setDisplayBrightness( %d ) - please override me.", b ); | 288 | qDebug( "ODevice::setDisplayBrightness( %d ) - please override me.", b ); |
289 | return false; | 289 | return false; |
290 | } | 290 | } |
291 | 291 | ||
292 | /** | 292 | /** |
293 | * | 293 | * |
294 | * @returns the number of steppings on the brightness slider | 294 | * @returns the number of steppings on the brightness slider |
295 | * in the Light-'n-Power settings. Values smaller than zero and bigger | 295 | * in the Light-'n-Power settings. Values smaller than zero and bigger |
296 | * than 255 do not make sense. | 296 | * than 255 do not make sense. |
297 | * | 297 | * |
298 | * \sa QSlider::setLineStep | 298 | * \sa QSlider::setLineStep |
299 | * \sa QSlider::setPageStep | 299 | * \sa QSlider::setPageStep |
300 | */ | 300 | */ |
301 | int ODevice::displayBrightnessResolution() const | 301 | int ODevice::displayBrightnessResolution() const |
302 | { | 302 | { |
303 | qDebug( "ODevice::displayBrightnessResolution() - please override me." ); | 303 | qDebug( "ODevice::displayBrightnessResolution() - please override me." ); |
304 | return 16; | 304 | return 16; |
305 | } | 305 | } |
306 | 306 | ||
307 | /** | 307 | /** |
308 | * This sets the display contrast | 308 | * This sets the display contrast |
309 | * @param p The contrast to be set on a scale from 0 to 255 | 309 | * @param p The contrast to be set on a scale from 0 to 255 |
310 | * @returns success or failure | 310 | * @returns success or failure |
311 | */ | 311 | */ |
312 | bool ODevice::setDisplayContrast( int p ) | 312 | bool ODevice::setDisplayContrast( int p ) |
313 | { | 313 | { |
314 | qDebug( "ODevice::setDisplayContrast( %d ) - please override me.", p ); | 314 | qDebug( "ODevice::setDisplayContrast( %d ) - please override me.", p ); |
315 | return false; | 315 | return false; |
316 | } | 316 | } |
317 | 317 | ||
318 | /** | 318 | /** |
319 | * @returns the maximum value for the contrast settings slider | 319 | * @returns the maximum value for the contrast settings slider |
320 | * or 0 if the device doesn't support setting of a contrast | 320 | * or 0 if the device doesn't support setting of a contrast |
321 | */ | 321 | */ |
322 | int ODevice::displayContrastResolution() const | 322 | int ODevice::displayContrastResolution() const |
323 | { | 323 | { |
324 | qDebug( "ODevice::displayBrightnessResolution() - please override me." ); | 324 | qDebug( "ODevice::displayBrightnessResolution() - please override me." ); |
325 | return 0; | 325 | return 0; |
326 | } | 326 | } |
327 | 327 | ||
328 | /** | 328 | /** |
329 | * This returns the vendor as string | 329 | * This returns the vendor as string |
330 | * @return Vendor as QString | 330 | * @return Vendor as QString |
331 | */ | 331 | */ |
332 | QString ODevice::vendorString() const | 332 | QString ODevice::vendorString() const |
333 | { | 333 | { |
334 | return d->m_vendorstr; | 334 | return d->m_vendorstr; |
335 | } | 335 | } |
336 | 336 | ||
337 | /** | 337 | /** |
338 | * This returns the vendor as one of the values of OVendor | 338 | * This returns the vendor as one of the values of OVendor |
339 | * @return OVendor | 339 | * @return OVendor |
340 | */ | 340 | */ |
341 | OVendor ODevice::vendor() const | 341 | OVendor ODevice::vendor() const |
342 | { | 342 | { |
343 | return d->m_vendor; | 343 | return d->m_vendor; |
344 | } | 344 | } |
345 | 345 | ||
346 | /** | 346 | /** |
347 | * This returns the model as a string | 347 | * This returns the model as a string |
348 | * @return A string representing the model | 348 | * @return A string representing the model |
349 | */ | 349 | */ |
350 | QString ODevice::modelString() const | 350 | QString ODevice::modelString() const |
351 | { | 351 | { |
352 | return d->m_modelstr; | 352 | return d->m_modelstr; |
353 | } | 353 | } |
354 | 354 | ||
355 | /** | 355 | /** |
356 | * This does return the OModel used | 356 | * This does return the OModel used |
357 | */ | 357 | */ |
358 | OModel ODevice::model() const | 358 | OModel ODevice::model() const |
359 | { | 359 | { |
360 | return d->m_model; | 360 | return d->m_model; |
361 | } | 361 | } |
362 | 362 | ||
363 | /** | 363 | /** |
364 | * This does return the systen name | 364 | * This does return the systen name |
365 | */ | 365 | */ |
366 | QString ODevice::systemString() const | 366 | QString ODevice::systemString() const |
367 | { | 367 | { |
368 | return d->m_systemstr; | 368 | return d->m_systemstr; |
369 | } | 369 | } |
370 | 370 | ||
371 | /** | 371 | /** |
372 | * Return System as OSystem value | 372 | * Return System as OSystem value |
373 | */ | 373 | */ |
374 | OSystem ODevice::system() const | 374 | OSystem ODevice::system() const |
375 | { | 375 | { |
376 | return d->m_system; | 376 | return d->m_system; |
377 | } | 377 | } |
378 | 378 | ||
379 | /** | 379 | /** |
380 | * @return the version string of the base system | 380 | * @return the version string of the base system |
381 | */ | 381 | */ |
382 | QString ODevice::systemVersionString() const | 382 | QString ODevice::systemVersionString() const |
383 | { | 383 | { |
384 | return d->m_sysverstr; | 384 | return d->m_sysverstr; |
385 | } | 385 | } |
386 | 386 | ||
387 | /** | 387 | /** |
388 | * @return the current Transformation | 388 | * @return the current Transformation |
389 | */ | 389 | */ |
390 | Transformation ODevice::rotation() const | 390 | Transformation ODevice::rotation() const |
391 | { | 391 | { |
392 | return d->m_rotation; | 392 | return d->m_rotation; |
393 | } | 393 | } |
394 | 394 | ||
395 | /** | 395 | /** |
396 | * @return the current rotation direction | 396 | * @return the current rotation direction |
397 | */ | 397 | */ |
398 | ODirection ODevice::direction() const | 398 | ODirection ODevice::direction() const |
399 | { | 399 | { |
400 | return d->m_direction; | 400 | return d->m_direction; |
401 | } | 401 | } |
402 | 402 | ||
403 | /** | 403 | /** |
404 | * This plays an alarm sound | 404 | * This plays an alarm sound |
405 | */ | 405 | */ |
406 | void ODevice::playAlarmSound() | 406 | void ODevice::playAlarmSound() |
407 | { | 407 | { |
408 | #ifndef QT_NO_SOUND | 408 | #ifndef QT_NO_SOUND |
409 | static Sound snd ( "alarm" ); | 409 | static Sound snd ( "alarm" ); |
410 | 410 | ||
411 | if ( snd. isFinished()) | 411 | if ( snd. isFinished()) |
412 | snd. play(); | 412 | snd. play(); |
413 | #endif | 413 | #endif |
414 | } | 414 | } |
415 | 415 | ||
416 | /** | 416 | /** |
417 | * This plays a key sound | 417 | * This plays a key sound |
418 | */ | 418 | */ |
419 | void ODevice::playKeySound() | 419 | void ODevice::playKeySound() |
420 | { | 420 | { |
421 | #ifndef QT_NO_SOUND | 421 | #ifndef QT_NO_SOUND |
422 | static Sound snd ( "keysound" ); | 422 | static Sound snd ( "keysound" ); |
423 | 423 | ||
424 | if ( snd. isFinished()) | 424 | if ( snd. isFinished()) |
425 | snd. play(); | 425 | snd. play(); |
426 | #endif | 426 | #endif |
427 | } | 427 | } |
428 | 428 | ||
429 | /** | 429 | /** |
430 | * This plays a touch sound | 430 | * This plays a touch sound |
431 | */ | 431 | */ |
432 | void ODevice::playTouchSound() | 432 | void ODevice::playTouchSound() |
433 | { | 433 | { |
434 | #ifndef QT_NO_SOUND | 434 | #ifndef QT_NO_SOUND |
435 | static Sound snd ( "touchsound" ); | 435 | static Sound snd ( "touchsound" ); |
436 | 436 | ||
437 | if ( snd. isFinished()) | 437 | if ( snd. isFinished()) |
438 | snd. play(); | 438 | snd. play(); |
439 | #endif | 439 | #endif |
440 | } | 440 | } |
441 | 441 | ||
442 | /** | 442 | /** |
443 | * This method will return a list of leds | 443 | * This method will return a list of leds |
444 | * available on this device | 444 | * available on this device |
445 | * @return a list of LEDs. | 445 | * @return a list of LEDs. |
446 | */ | 446 | */ |
447 | QValueList <OLed> ODevice::ledList() const | 447 | QValueList <OLed> ODevice::ledList() const |
448 | { | 448 | { |
449 | return QValueList <OLed>(); | 449 | return QValueList <OLed>(); |
450 | } | 450 | } |
451 | 451 | ||
452 | /** | 452 | /** |
453 | * This does return the state of the LEDs | 453 | * This does return the state of the LEDs |
454 | */ | 454 | */ |
455 | QValueList <OLedState> ODevice::ledStateList ( OLed /*which*/ ) const | 455 | QValueList <OLedState> ODevice::ledStateList ( OLed /*which*/ ) const |
456 | { | 456 | { |
457 | return QValueList <OLedState>(); | 457 | return QValueList <OLedState>(); |
458 | } | 458 | } |
459 | 459 | ||
460 | /** | 460 | /** |
461 | * @return the state for a given OLed | 461 | * @return the state for a given OLed |
462 | */ | 462 | */ |
463 | OLedState ODevice::ledState ( OLed /*which*/ ) const | 463 | OLedState ODevice::ledState ( OLed /*which*/ ) const |
464 | { | 464 | { |
465 | return Led_Off; | 465 | return Led_Off; |
466 | } | 466 | } |
467 | 467 | ||
468 | /** | 468 | /** |
469 | * Set the state for a LED | 469 | * Set the state for a LED |
470 | * @param which Which OLed to use | 470 | * @param which Which OLed to use |
471 | * @param st The state to set | 471 | * @param st The state to set |
472 | * @return success or failure | 472 | * @return success or failure |
473 | */ | 473 | */ |
474 | bool ODevice::setLedState ( OLed which, OLedState st ) | 474 | bool ODevice::setLedState ( OLed which, OLedState st ) |
475 | { | 475 | { |
476 | Q_UNUSED( which ) | 476 | Q_UNUSED( which ) |
477 | Q_UNUSED( st ) | 477 | Q_UNUSED( st ) |
478 | return false; | 478 | return false; |
479 | } | 479 | } |
480 | 480 | ||
481 | /** | 481 | /** |
482 | * @return if the device has a light sensor | 482 | * @return if the device has a light sensor |
483 | */ | 483 | */ |
484 | bool ODevice::hasLightSensor() const | 484 | bool ODevice::hasLightSensor() const |
485 | { | 485 | { |
486 | return false; | 486 | return false; |
487 | } | 487 | } |
488 | 488 | ||
489 | /** | 489 | /** |
490 | * @return a value from the light sensor | 490 | * @return a value from the light sensor |
491 | */ | 491 | */ |
492 | int ODevice::readLightSensor() | 492 | int ODevice::readLightSensor() |
493 | { | 493 | { |
494 | return -1; | 494 | return -1; |
495 | } | 495 | } |
496 | 496 | ||
497 | /** | 497 | /** |
498 | * @return the light sensor resolution | 498 | * @return the light sensor resolution |
499 | */ | 499 | */ |
500 | int ODevice::lightSensorResolution() const | 500 | int ODevice::lightSensorResolution() const |
501 | { | 501 | { |
502 | return 0; | 502 | return 0; |
503 | } | 503 | } |
504 | 504 | ||
505 | /** | 505 | /** |
506 | * @return if the device has a hinge sensor | 506 | * @return if the device has a hinge sensor |
507 | */ | 507 | */ |
508 | bool ODevice::hasHingeSensor() const | 508 | bool ODevice::hasHingeSensor() const |
509 | { | 509 | { |
510 | return false; | 510 | return false; |
511 | } | 511 | } |
512 | 512 | ||
513 | /** | 513 | /** |
514 | * @return a value from the hinge sensor | 514 | * @return a value from the hinge sensor |
515 | */ | 515 | */ |
516 | OHingeStatus ODevice::readHingeSensor()const | 516 | OHingeStatus ODevice::readHingeSensor()const |
517 | { | 517 | { |
518 | return CASE_UNKNOWN; | 518 | return CASE_UNKNOWN; |
519 | } | 519 | } |
520 | 520 | ||
521 | /** | 521 | /** |
522 | * @return a list with CPU frequencies supported by the hardware | 522 | * @return a list with CPU frequencies supported by the hardware |
523 | */ | 523 | */ |
524 | const QStrList &ODevice::allowedCpuFrequencies() const | 524 | const QStrList &ODevice::allowedCpuFrequencies() const |
525 | { | 525 | { |
526 | return *d->m_cpu_frequencies; | 526 | return *d->m_cpu_frequencies; |
527 | } | 527 | } |
528 | 528 | ||
529 | 529 | ||
530 | /** | 530 | /** |
531 | * Set desired CPU frequency | 531 | * Set desired CPU frequency |
532 | * | 532 | * |
533 | * @param index index into d->m_cpu_frequencies of the frequency to be set | 533 | * @param index index into d->m_cpu_frequencies of the frequency to be set |
534 | */ | 534 | */ |
535 | bool ODevice::setCurrentCpuFrequency(uint index) | 535 | bool ODevice::setCurrentCpuFrequency(uint index) |
536 | { | 536 | { |
537 | if (index >= d->m_cpu_frequencies->count()) | 537 | if (index >= d->m_cpu_frequencies->count()) |
538 | return false; | 538 | return false; |
539 | 539 | ||
540 | char *freq = d->m_cpu_frequencies->at(index); | 540 | char *freq = d->m_cpu_frequencies->at(index); |
541 | qWarning("set freq to %s", freq); | 541 | qWarning("set freq to %s", freq); |
542 | 542 | ||
543 | int fd; | 543 | int fd; |
544 | 544 | ||
545 | if ((fd = ::open("/proc/sys/cpu/0/speed", O_WRONLY)) >= 0) { | 545 | if ((fd = ::open("/proc/sys/cpu/0/speed", O_WRONLY)) >= 0) { |
546 | char writeCommand[50]; | 546 | char writeCommand[50]; |
547 | const int count = sprintf(writeCommand, "%s\n", freq); | 547 | const int count = sprintf(writeCommand, "%s\n", freq); |
548 | int res = (::write(fd, writeCommand, count) != -1); | 548 | int res = (::write(fd, writeCommand, count) != -1); |
549 | ::close(fd); | 549 | ::close(fd); |
550 | return res; | 550 | return res; |
551 | } | 551 | } |
552 | 552 | ||
553 | return false; | 553 | return false; |
554 | } | 554 | } |
555 | 555 | ||
556 | 556 | ||
557 | /** | 557 | /** |
558 | * @return a list of hardware buttons | 558 | * @return a list of hardware buttons |
559 | */ | 559 | */ |
560 | const QValueList <ODeviceButton> &ODevice::buttons() | 560 | const QValueList <ODeviceButton> &ODevice::buttons() |
561 | { | 561 | { |
562 | initButtons(); | 562 | initButtons(); |
563 | 563 | ||
564 | return *d->m_buttons; | 564 | return *d->m_buttons; |
565 | } | 565 | } |
566 | 566 | ||
567 | /** | 567 | /** |
568 | * @return The amount of time that would count as a hold | 568 | * @return The amount of time that would count as a hold |
569 | */ | 569 | */ |
570 | uint ODevice::buttonHoldTime() const | 570 | uint ODevice::buttonHoldTime() const |
571 | { | 571 | { |
572 | return d->m_holdtime; | 572 | return d->m_holdtime; |
573 | } | 573 | } |
574 | 574 | ||
575 | /** | 575 | /** |
576 | * This method return a ODeviceButton for a key code | 576 | * This method return a ODeviceButton for a key code |
577 | * or 0 if no special hardware button is available for the device | 577 | * or 0 if no special hardware button is available for the device |
578 | * | 578 | * |
579 | * @return The devicebutton or 0l | 579 | * @return The devicebutton or 0l |
580 | * @see ODeviceButton | 580 | * @see ODeviceButton |
581 | */ | 581 | */ |
582 | const ODeviceButton *ODevice::buttonForKeycode ( ushort code ) | 582 | const ODeviceButton *ODevice::buttonForKeycode ( ushort code ) |
583 | { | 583 | { |
584 | initButtons(); | 584 | initButtons(); |
585 | 585 | ||
586 | for ( QValueListConstIterator<ODeviceButton> it = d->m_buttons->begin(); it != d->m_buttons->end(); ++it ) { | 586 | for ( QValueListConstIterator<ODeviceButton> it = d->m_buttons->begin(); it != d->m_buttons->end(); ++it ) { |
587 | if ( (*it).keycode() == code ) | 587 | if ( (*it).keycode() == code ) |
588 | return &(*it); | 588 | return &(*it); |
589 | } | 589 | } |
590 | return 0; | 590 | return 0; |
591 | } | 591 | } |
592 | 592 | ||
593 | void ODevice::reloadButtonMapping() | 593 | void ODevice::reloadButtonMapping() |
594 | { | 594 | { |
595 | if(!d->m_buttons) | 595 | if(!d->m_buttons) |
596 | initButtons(); | 596 | initButtons(); |
597 | 597 | ||
598 | if(!d->m_initializedButtonQcop) { | 598 | if(!d->m_initializedButtonQcop) { |
599 | QCopChannel *chan = new QCopChannel("QPE/System", this, "ODevice button channel"); | 599 | QCopChannel *chan = new QCopChannel("QPE/System", this, "ODevice button channel"); |
600 | connect(chan,SIGNAL(received(const QCString&,const QByteArray&)), | 600 | connect(chan,SIGNAL(received(const QCString&,const QByteArray&)), |
601 | this,SLOT(systemMessage(const QCString&,const QByteArray&))); | 601 | this,SLOT(systemMessage(const QCString&,const QByteArray&))); |
602 | d->m_initializedButtonQcop = true; | 602 | d->m_initializedButtonQcop = true; |
603 | } | 603 | } |
604 | 604 | ||
605 | Config cfg ( "ButtonSettings" ); | 605 | Config cfg ( "ButtonSettings" ); |
606 | 606 | ||
607 | for ( uint i = 0; i < d->m_buttons->count(); i++ ) { | 607 | for ( uint i = 0; i < d->m_buttons->count(); i++ ) { |
608 | ODeviceButton &b = ( *d->m_buttons ) [i]; | 608 | ODeviceButton &b = ( *d->m_buttons ) [i]; |
609 | QString group = "Button" + QString::number ( i ); | 609 | QString group = "Button" + QString::number ( i ); |
610 | 610 | ||
611 | QCString pch, hch; | 611 | QCString pch, hch; |
612 | QCString pm, hm; | 612 | QCString pm, hm; |
613 | QByteArray pdata, hdata; | 613 | QByteArray pdata, hdata; |
614 | 614 | ||
615 | if ( cfg. hasGroup ( group )) { | 615 | if ( cfg. hasGroup ( group )) { |
616 | cfg. setGroup ( group ); | 616 | cfg. setGroup ( group ); |
617 | pch = cfg. readEntry ( "PressedActionChannel" ). latin1(); | 617 | pch = cfg. readEntry ( "PressedActionChannel" ). latin1(); |
618 | pm = cfg. readEntry ( "PressedActionMessage" ). latin1(); | 618 | pm = cfg. readEntry ( "PressedActionMessage" ). latin1(); |
619 | // pdata = decodeBase64 ( buttonFile. readEntry ( "PressedActionArgs" )); | 619 | // pdata = decodeBase64 ( buttonFile. readEntry ( "PressedActionArgs" )); |
620 | 620 | ||
621 | hch = cfg. readEntry ( "HeldActionChannel" ). latin1(); | 621 | hch = cfg. readEntry ( "HeldActionChannel" ). latin1(); |
622 | hm = cfg. readEntry ( "HeldActionMessage" ). latin1(); | 622 | hm = cfg. readEntry ( "HeldActionMessage" ). latin1(); |
623 | // hdata = decodeBase64 ( buttonFile. readEntry ( "HeldActionArgs" )); | 623 | // hdata = decodeBase64 ( buttonFile. readEntry ( "HeldActionArgs" )); |
624 | } | 624 | } |
625 | 625 | ||
626 | b. setPressedAction ( OQCopMessage ( pch, pm, pdata )); | 626 | b. setPressedAction ( OQCopMessage ( pch, pm, pdata )); |
627 | b. setHeldAction ( OQCopMessage ( hch, hm, hdata )); | 627 | b. setHeldAction ( OQCopMessage ( hch, hm, hdata )); |
628 | } | 628 | } |
629 | } | 629 | } |
630 | 630 | ||
631 | void ODevice::remapPressedAction ( int button, const OQCopMessage &action ) | 631 | void ODevice::remapPressedAction ( int button, const OQCopMessage &action ) |
632 | { | 632 | { |
633 | initButtons(); | 633 | initButtons(); |
634 | 634 | ||
635 | QString mb_chan; | 635 | QString mb_chan; |
636 | 636 | ||
637 | if ( button >= (int) d->m_buttons->count()) | 637 | if ( button >= (int) d->m_buttons->count()) |
638 | return; | 638 | return; |
639 | 639 | ||
640 | ODeviceButton &b = ( *d->m_buttons ) [button]; | 640 | ODeviceButton &b = ( *d->m_buttons ) [button]; |
641 | b. setPressedAction ( action ); | 641 | b. setPressedAction ( action ); |
642 | 642 | ||
643 | mb_chan=b. pressedAction(). channel(); | 643 | mb_chan=b. pressedAction(). channel(); |
644 | 644 | ||
645 | Config buttonFile ( "ButtonSettings" ); | 645 | Config buttonFile ( "ButtonSettings" ); |
646 | buttonFile. setGroup ( "Button" + QString::number ( button )); | 646 | buttonFile. setGroup ( "Button" + QString::number ( button )); |
647 | buttonFile. writeEntry ( "PressedActionChannel", (const char*) mb_chan); | 647 | buttonFile. writeEntry ( "PressedActionChannel", (const char*) mb_chan); |
648 | buttonFile. writeEntry ( "PressedActionMessage", (const char*) b. pressedAction(). message()); | 648 | buttonFile. writeEntry ( "PressedActionMessage", (const char*) b. pressedAction(). message()); |
649 | 649 | ||
650 | // buttonFile. writeEntry ( "PressedActionArgs", encodeBase64 ( b. pressedAction(). data())); | 650 | // buttonFile. writeEntry ( "PressedActionArgs", encodeBase64 ( b. pressedAction(). data())); |
651 | 651 | ||
652 | QCopEnvelope ( "QPE/System", "deviceButtonMappingChanged()" ); | 652 | QCopEnvelope ( "QPE/System", "deviceButtonMappingChanged()" ); |
653 | } | 653 | } |
654 | 654 | ||
655 | void ODevice::remapHeldAction ( int button, const OQCopMessage &action ) | 655 | void ODevice::remapHeldAction ( int button, const OQCopMessage &action ) |
656 | { | 656 | { |
657 | initButtons(); | 657 | initButtons(); |
658 | 658 | ||
659 | if ( button >= (int) d->m_buttons->count()) | 659 | if ( button >= (int) d->m_buttons->count()) |
660 | return; | 660 | return; |
661 | 661 | ||
662 | ODeviceButton &b = ( *d->m_buttons ) [button]; | 662 | ODeviceButton &b = ( *d->m_buttons ) [button]; |
663 | b. setHeldAction ( action ); | 663 | b. setHeldAction ( action ); |
664 | 664 | ||
665 | Config buttonFile ( "ButtonSettings" ); | 665 | Config buttonFile ( "ButtonSettings" ); |
666 | buttonFile. setGroup ( "Button" + QString::number ( button )); | 666 | buttonFile. setGroup ( "Button" + QString::number ( button )); |
667 | buttonFile. writeEntry ( "HeldActionChannel", (const char *) b. heldAction(). channel()); | 667 | buttonFile. writeEntry ( "HeldActionChannel", (const char *) b. heldAction(). channel()); |
668 | buttonFile. writeEntry ( "HeldActionMessage", (const char *) b. heldAction(). message()); | 668 | buttonFile. writeEntry ( "HeldActionMessage", (const char *) b. heldAction(). message()); |
669 | 669 | ||
670 | // buttonFile. writeEntry ( "HeldActionArgs", decodeBase64 ( b. heldAction(). data())); | 670 | // buttonFile. writeEntry ( "HeldActionArgs", decodeBase64 ( b. heldAction(). data())); |
671 | 671 | ||
672 | QCopEnvelope ( "QPE/System", "deviceButtonMappingChanged()" ); | 672 | QCopEnvelope ( "QPE/System", "deviceButtonMappingChanged()" ); |
673 | } | 673 | } |
674 | 674 | ||
675 | /** | 675 | /** |
676 | * @internal | 676 | * @internal |
677 | */ | 677 | */ |
678 | void ODevice::virtual_hook(int, void* ){ | 678 | void ODevice::virtual_hook(int, void* ){ |
679 | 679 | ||
680 | } | 680 | } |
681 | 681 | ||
682 | /** | 682 | /** |
683 | * \brief Send a QCOP Message before suspending | 683 | * \brief Send a QCOP Message before suspending |
684 | * | 684 | * |
685 | * Sends a QCOP message to channel QPE/System | 685 | * Sends a QCOP message to channel QPE/System |
686 | * with the message "aboutToSuspend()" if this | 686 | * with the message "aboutToSuspend()" if this |
687 | * is the windowing server. | 687 | * is the windowing server. |
688 | * | 688 | * |
689 | * Call this in your custom \sa suspend() Method | 689 | * Call this in your custom \sa suspend() Method |
690 | * before going to suspend. | 690 | * before going to suspend. |
691 | * | 691 | * |
692 | */ | 692 | */ |
693 | void ODevice::sendSuspendmsg() | 693 | void ODevice::sendSuspendmsg() |
694 | { | 694 | { |
695 | if ( isQWS() ) | 695 | if ( isQWS() ) |
696 | return; | 696 | return; |
697 | 697 | ||
698 | QCopEnvelope ( "QPE/System", "aboutToSuspend()" ); | 698 | QCopEnvelope ( "QPE/System", "aboutToSuspend()" ); |
699 | } | 699 | } |
700 | 700 | ||
701 | /** | 701 | /** |
702 | * \brief Prepend the QWSServer::KeyboardFilter to the list of installed KeyFilters | 702 | * \brief Prepend the QWSServer::KeyboardFilter to the list of installed KeyFilters |
703 | * | 703 | * |
704 | * Prepend a QWSServer::KeyboardFilter to the List of Keyboard | 704 | * Prepend a QWSServer::KeyboardFilter to the List of Keyboard |
705 | * Filters. This function is the only way to prepend a KeyFilter. | 705 | * Filters. This function is the only way to prepend a KeyFilter. |
706 | * | 706 | * |
707 | * @param aFilter The KeyFilter to be prepended to the list of filters | 707 | * @param aFilter The KeyFilter to be prepended to the list of filters |
708 | * | 708 | * |
709 | * @see Opie::Core::OKeyFilter | 709 | * @see Opie::Core::OKeyFilter |
710 | * @see Opie::Core::OKeyFilter::inst() | 710 | * @see Opie::Core::OKeyFilter::inst() |
711 | */ | 711 | */ |
712 | void ODevice::addPreHandler(QWSServer::KeyboardFilter*aFilter) | 712 | void ODevice::addPreHandler(QWSServer::KeyboardFilter*aFilter) |
713 | { | 713 | { |
714 | Opie::Core::OKeyFilter::inst()->addPreHandler(aFilter); | 714 | Opie::Core::OKeyFilter::inst()->addPreHandler(aFilter); |
715 | } | 715 | } |
716 | 716 | ||
717 | /** | 717 | /** |
718 | * \brief Remove the QWSServer::KeyboardFilter in the param from the list | 718 | * \brief Remove the QWSServer::KeyboardFilter in the param from the list |
719 | * | 719 | * |
720 | * Remove the QWSServer::KeyboardFilter \par aFilter from the List | 720 | * Remove the QWSServer::KeyboardFilter \par aFilter from the List |
721 | * of Keyfilters. Call this when you delete the KeyFilter! | 721 | * of Keyfilters. Call this when you delete the KeyFilter! |
722 | * | 722 | * |
723 | * @param aFilter The filter to be removed from the Opie::Core::OKeyFilter | 723 | * @param aFilter The filter to be removed from the Opie::Core::OKeyFilter |
724 | * @see Opie::Core::ODevice::addPreHandler | 724 | * @see Opie::Core::ODevice::addPreHandler |
725 | */ | 725 | */ |
726 | void ODevice::remPreHandler(QWSServer::KeyboardFilter*aFilter) | 726 | void ODevice::remPreHandler(QWSServer::KeyboardFilter*aFilter) |
727 | { | 727 | { |
728 | Opie::Core::OKeyFilter::inst()->remPreHandler(aFilter); | 728 | Opie::Core::OKeyFilter::inst()->remPreHandler(aFilter); |
729 | } | 729 | } |
730 | 730 | ||
731 | 731 | ||
732 | /** | 732 | /** |
733 | * @internal | 733 | * @internal |
734 | * | 734 | * |
735 | * @see changeMixerForAlarm | 735 | * @see changeMixerForAlarm |
736 | */ | 736 | */ |
737 | void ODevice::playingStopped() { | 737 | void ODevice::playingStopped() { |
738 | if ( sender() ) | 738 | if ( sender() ) |
739 | const_cast<QObject*>(sender())->disconnect( this ); | 739 | const_cast<QObject*>(sender())->disconnect( this ); |
740 | 740 | ||
741 | #ifndef QT_NO_SOUND | 741 | #ifndef QT_NO_SOUND |
742 | if ( d->m_sound >= 0 ) { | 742 | if ( d->m_sound >= 0 ) { |
743 | ::ioctl ( d->m_sound, MIXER_WRITE( d->m_mixer ), &d->m_vol ); | 743 | ::ioctl ( d->m_sound, MIXER_WRITE( d->m_mixer ), &d->m_vol ); |
744 | ::close ( d->m_sound ); | 744 | ::close ( d->m_sound ); |
745 | } | 745 | } |
746 | #endif | 746 | #endif |
747 | } | 747 | } |
748 | 748 | ||
749 | 749 | ||
750 | /** | 750 | /** |
751 | * \brief Change the Volume for the Alarm and set it back after playing is finished | 751 | * \brief Change the Volume for the Alarm and set it back after playing is finished |
752 | * | 752 | * |
753 | * If you play an Alarm Sound you might want to change the Mixer to | 753 | * If you play an Alarm Sound you might want to change the Mixer to |
754 | * full volume and ignore the user setting. After it \sa Sound::isFinished | 754 | * full volume and ignore the user setting. After it \sa Sound::isFinished |
755 | * you would turn the volume back to the user preference. | 755 | * you would turn the volume back to the user preference. |
756 | * The problem is that we used to enter the event loop while waiting | 756 | * The problem is that we used to enter the event loop while waiting |
757 | * for the sound to be finished triggering all kind of reentrance | 757 | * for the sound to be finished triggering all kind of reentrance |
758 | * problems what a library shouldn't introduce. | 758 | * problems what a library shouldn't introduce. |
759 | * Instead of manually waiting for the sound to be finished use | 759 | * Instead of manually waiting for the sound to be finished use |
760 | * this Method and it will automatically restore the Mixer to | 760 | * this Method and it will automatically restore the Mixer to |
761 | * the user configuration after the sound finished playing. | 761 | * the user configuration after the sound finished playing. |
762 | * | 762 | * |
763 | * Note: The onwership of \param snd is not transfered and playing | 763 | * Note: The onwership of \param snd is not transfered and playing |
764 | * is not started in this method. If 'snd' gets deleted before | 764 | * is not started in this method. If 'snd' gets deleted before |
765 | * playing is finished the volume doesn't get set back to | 765 | * playing is finished the volume doesn't get set back to |
766 | * the user preference! | 766 | * the user preference! |
767 | * | 767 | * |
768 | * \code | 768 | * \code |
769 | * static Sound snd("alarm"); | 769 | * static Sound snd("alarm"); |
770 | * if(!snd.isFinished()) | 770 | * if(!snd.isFinished()) |
771 | * return; | 771 | * return; |
772 | * | 772 | * |
773 | * changeMixerForAlarm( my_channel, "/dev/mixer", &snd ); | 773 | * changeMixerForAlarm( my_channel, "/dev/mixer", &snd ); |
774 | * snd.play() | 774 | * snd.play() |
775 | * \endcode | 775 | * \endcode |
776 | * | 776 | * |
777 | * | 777 | * |
778 | * | 778 | * |
779 | * @param mixer The mixer number/channel to use | 779 | * @param mixer The mixer number/channel to use |
780 | * @param file The file name. If you convert from QString use QFile::encodeName | 780 | * @param file The file name. If you convert from QString use QFile::encodeName |
781 | * @param snd The sound to wait for finishing | 781 | * @param snd The sound to wait for finishing |
782 | * | 782 | * |
783 | */ | 783 | */ |
784 | void ODevice::changeMixerForAlarm( int mixer, const char* file, Sound *snd ) { | 784 | void ODevice::changeMixerForAlarm( int mixer, const char* file, Sound *snd ) { |
785 | #ifndef QT_NO_SOUND | 785 | #ifndef QT_NO_SOUND |
786 | if (( d->m_sound = ::open ( file, O_RDWR )) >= 0 ) { | 786 | if (( d->m_sound = ::open ( file, O_RDWR )) >= 0 ) { |
787 | if ( ::ioctl ( d->m_sound, MIXER_READ( mixer ), &d->m_vol ) >= 0 ) { | 787 | if ( ::ioctl ( d->m_sound, MIXER_READ( mixer ), &d->m_vol ) >= 0 ) { |
788 | Config cfg ( "qpe" ); | 788 | Config cfg ( "qpe" ); |
789 | cfg. setGroup ( "Volume" ); | 789 | cfg. setGroup ( "Volume" ); |
790 | 790 | ||
791 | int volalarm = cfg. readNumEntry ( "AlarmPercent", 50 ); | 791 | int volalarm = cfg. readNumEntry ( "AlarmPercent", 50 ); |
792 | if ( volalarm < 0 ) | 792 | if ( volalarm < 0 ) |
793 | volalarm = 0; | 793 | volalarm = 0; |
794 | else if ( volalarm > 100 ) | 794 | else if ( volalarm > 100 ) |
795 | volalarm = 100; | 795 | volalarm = 100; |
796 | volalarm |= ( volalarm << 8 ); | 796 | volalarm |= ( volalarm << 8 ); |
797 | 797 | ||
798 | if ( ::ioctl ( d->m_sound, MIXER_WRITE( mixer ), &volalarm ) >= 0 ) | 798 | if ( ::ioctl ( d->m_sound, MIXER_WRITE( mixer ), &volalarm ) >= 0 ) |
799 | register_qpe_sound_finished(snd, this, SLOT(playingStopped())); | 799 | register_qpe_sound_finished(snd, this, SLOT(playingStopped())); |
800 | } | 800 | } |
801 | d->m_mixer = mixer; | 801 | d->m_mixer = mixer; |
802 | } | 802 | } |
803 | #endif | 803 | #endif |
804 | } | 804 | } |
805 | 805 | ||
806 | } | 806 | } |
807 | } | 807 | } |