summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--ChangeLog2
-rw-r--r--core/launcher/launcher.cpp8
-rw-r--r--core/launcher/launcherview.cpp28
-rw-r--r--core/launcher/launcherview.h3
-rw-r--r--core/settings/launcher/tabssettings.cpp13
-rw-r--r--core/settings/launcher/tabssettings.h2
6 files changed, 43 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index fe763a5..8ac976d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,221 +1,223 @@
1 2005-??-??Opie 1.2.0 1 2005-??-??Opie 1.2.0
2 2
3 New Features 3 New Features
4 ------------ 4 ------------
5 * Launcher: Support a static background pixmap (mickeyl)
6 * LauncherSettings: Choose whether to have a static background pixmap (mickeyl)
5 7
6 Fixed Bugs 8 Fixed Bugs
7 ---------- 9 ----------
8 * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers) 10 * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers)
9 * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke) 11 * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke)
10 * #1482 - Fix double '/' in paths (zecke) 12 * #1482 - Fix double '/' in paths (zecke)
11 * #1536 - Autosave of custom locations in opie backup (ar) 13 * #1536 - Autosave of custom locations in opie backup (ar)
12 * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke) 14 * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke)
13 * #1540 - Implemented deletion of DocLnks in opie-eye (zecke) 15 * #1540 - Implemented deletion of DocLnks in opie-eye (zecke)
14 * #1542 - Fix Todo crash when priority < 1 or > 5 (drw) 16 * #1542 - Fix Todo crash when priority < 1 or > 5 (drw)
15 * #1554 - Fixed Opie-Console name in .desktop file (mickeyl) 17 * #1554 - Fixed Opie-Console name in .desktop file (mickeyl)
16 * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke) 18 * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke)
17 * #1558 - Fixed opie-login breaking opie startup (mickeyl) 19 * #1558 - Fixed opie-login breaking opie startup (mickeyl)
18 * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw) 20 * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw)
19 21
20 Internal 22 Internal
21 -------- 23 --------
22 * Work around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl) 24 * Work around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl)
23 * Killed the need for weak symbols in QtE (zecke) 25 * Killed the need for weak symbols in QtE (zecke)
24 26
25 2005-02-03Opie 1.1.9 27 2005-02-03Opie 1.1.9
26 28
27 New Features 29 New Features
28 ------------ 30 ------------
29 * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl) 31 * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl)
30 * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl) 32 * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl)
31 * Usability enhancements in OpieIRC (skyhusker) 33 * Usability enhancements in OpieIRC (skyhusker)
32 34
33 Fixed Bugs 35 Fixed Bugs
34 ---------- 36 ----------
35 * #1501 - Fixed bug in todo sql backend (eilers) 37 * #1501 - Fixed bug in todo sql backend (eilers)
36 * #1505 - Added more Swap sizes in memoryapplet (mickeyl) 38 * #1505 - Added more Swap sizes in memoryapplet (mickeyl)
37 * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke) 39 * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke)
38 * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke) 40 * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke)
39 * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl) 41 * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl)
40 * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl) 42 * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl)
41 * n.a. - Fixed numerous buglets in OpieIRC (skyhusker) 43 * n.a. - Fixed numerous buglets in OpieIRC (skyhusker)
42 44
43 Internal 45 Internal
44 -------- 46 --------
45 * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl) 47 * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl)
46 * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl) 48 * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl)
47 * Made Opie compilable with Qt/Embedded 2.3.10 (ar) 49 * Made Opie compilable with Qt/Embedded 2.3.10 (ar)
48 * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl) 50 * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl)
49 * Build tree cleanups (mickeyl) 51 * Build tree cleanups (mickeyl)
50 52
51 2004-11-26Opie 1.1.8 53 2004-11-26Opie 1.1.8
52 54
53 New Features 55 New Features
54 ------------ 56 ------------
55 * PackageManager supports installation of local ipkg files (drw) 57 * PackageManager supports installation of local ipkg files (drw)
56 * PackageManager supports linking of applications to root (drw) 58 * PackageManager supports linking of applications to root (drw)
57 * PackageManager supports src/gz feeds (drw,wimpie) 59 * PackageManager supports src/gz feeds (drw,wimpie)
58 * Added a syslog information tab to sysinfo (mickeyl) 60 * Added a syslog information tab to sysinfo (mickeyl)
59 * Added new, more consistent, PIM icons + a GIMP teplate (ar) 61 * Added new, more consistent, PIM icons + a GIMP teplate (ar)
60 62
61 Fixed Bugs 63 Fixed Bugs
62 ---------- 64 ----------
63 * #1017 - Tetrix doesn't display correctly for high resolution screens (drw) 65 * #1017 - Tetrix doesn't display correctly for high resolution screens (drw)
64 * #1269 - VCards were imported into personal area if it was activated (eilers) 66 * #1269 - VCards were imported into personal area if it was activated (eilers)
65 * #1464 - Packagemanager dont set active filter after install a package (drw) 67 * #1464 - Packagemanager dont set active filter after install a package (drw)
66 * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers) 68 * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers)
67 * #1493 - Fixed one column layout bug of the launcher (hrw) 69 * #1493 - Fixed one column layout bug of the launcher (hrw)
68 * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw) 70 * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw)
69 * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw) 71 * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw)
70 * n.a. - Battery Applet - fix sizing of battery info popup (drw,mickeyl) 72 * n.a. - Battery Applet - fix sizing of battery info popup (drw,mickeyl)
71 73
72 Internal 74 Internal
73 -------- 75 --------
74 * Moved libopie1 to unsupported (mickeyl) 76 * Moved libopie1 to unsupported (mickeyl)
75 * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers) 77 * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers)
76 * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers) 78 * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers)
77 79
78 2004-11-14Opie 1.1.7 80 2004-11-14Opie 1.1.7
79 81
80 New Features 82 New Features
81 ------------ 83 ------------
82 * libOpieDB now uses SQLite V3 instead V2. Remember to upgrade your database files! (eilers) 84 * libOpieDB now uses SQLite V3 instead V2. Remember to upgrade your database files! (eilers)
83 * Backup now uses the busy indicator when backing up and restore (ar) 85 * Backup now uses the busy indicator when backing up and restore (ar)
84 * OpiePlayer2 gained adding of Directories to the playlist (zecke) 86 * OpiePlayer2 gained adding of Directories to the playlist (zecke)
85 * OpiePlayer2 better error handling (zecke) 87 * OpiePlayer2 better error handling (zecke)
86 * OpiePlayer2 progress indication while streaming (zecke) 88 * OpiePlayer2 progress indication while streaming (zecke)
87 * OpiePlayer2 ported to use libxine 1.0.0-rc6a (brad,zecke) 89 * OpiePlayer2 ported to use libxine 1.0.0-rc6a (brad,zecke)
88 * Ported brightnessapplet from Qtopia 1.7 (mickeyl) 90 * Ported brightnessapplet from Qtopia 1.7 (mickeyl)
89 * Opie-Eye got a Digital Camera File Backend (alwin,zecke) 91 * Opie-Eye got a Digital Camera File Backend (alwin,zecke)
90 * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke) 92 * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke)
91 * Opie-Console use Custom Font and Size in a Profile (harlekin) 93 * Opie-Console use Custom Font and Size in a Profile (harlekin)
92 * Opie-Console transparently log the Output and Input to a file (harlekin) 94 * Opie-Console transparently log the Output and Input to a file (harlekin)
93 * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem) 95 * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem)
94 * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem) 96 * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem)
95 * Opie-Security gained a 'test authentication' button (clem) 97 * Opie-Security gained a 'test authentication' button (clem)
96 * Opie-Eye got a more unique layout (menubar), a slideshow, user can setup some defaults 98 * Opie-Eye got a more unique layout (menubar), a slideshow, user can setup some defaults
97 * Opie-Mail improve the handling of POP mail boxes (alwin) 99 * Opie-Mail improve the handling of POP mail boxes (alwin)
98 * Both Opie-Eye and Opie-Mail were greatly improved due the hard work of Rajko Albrecht(alwin) 100 * Both Opie-Eye and Opie-Mail were greatly improved due the hard work of Rajko Albrecht(alwin)
99 * Opie IRC - backports of the 'NeIRC fork' (zecke) 101 * Opie IRC - backports of the 'NeIRC fork' (zecke)
100 102
101 Fixed Bugs 103 Fixed Bugs
102 ---------- 104 ----------
103 * #501 - Pickboard is able to show 'Umlaute' (TT,zecke) 105 * #501 - Pickboard is able to show 'Umlaute' (TT,zecke)
104 * #608 - Make Opie usable for left handed users (zecke) 106 * #608 - Make Opie usable for left handed users (zecke)
105 * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke) 107 * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke)
106 * #1245 - Opie-Go 'paused' (zecke) 108 * #1245 - Opie-Go 'paused' (zecke)
107 * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke) 109 * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke)
108 * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke) 110 * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke)
109 * #1395 - Build VNC Backend with gcc3.4 111 * #1395 - Build VNC Backend with gcc3.4
110 * #1440 - The icon of opie-mobilemsg is missing (CoreDump) 112 * #1440 - The icon of opie-mobilemsg is missing (CoreDump)
111 * #1426 - Add missing opie-bartender Icon (CoreDump) 113 * #1426 - Add missing opie-bartender Icon (CoreDump)
112 * #1445 - Opie-Sheet Has No Icon (CoreDump) 114 * #1445 - Opie-Sheet Has No Icon (CoreDump)
113 * #1448 - Brightness Applet added (mickeyl) 115 * #1448 - Brightness Applet added (mickeyl)
114 * #1450 - ZSame didn't clear the bonus item after winning a game (zecke) 116 * #1450 - ZSame didn't clear the bonus item after winning a game (zecke)
115 * #1482 - Fix OFileSelector to be able to sort by size (zecke) 117 * #1482 - Fix OFileSelector to be able to sort by size (zecke)
116 * n.a. - Opie-mail: fixed some crasher, some layout-problems 118 * n.a. - Opie-mail: fixed some crasher, some layout-problems
117 * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke) 119 * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke)
118 * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke) 120 * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke)
119 * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem) 121 * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem)
120 * 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) 122 * 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)
121 * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl) 123 * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl)
122 124
123 Internal 125 Internal
124 -------- 126 --------
125 * Opie-Qashmoney has been moved to unsupported (mickeyl) 127 * Opie-Qashmoney has been moved to unsupported (mickeyl)
126 * Opie-Ubrowser has been moved to unsupported (mickeyl) 128 * Opie-Ubrowser has been moved to unsupported (mickeyl)
127 129
128 2004-09-17Opie 1.1.6 130 2004-09-17Opie 1.1.6
129 131
130 New Features 132 New Features
131 ------------ 133 ------------
132 * Fifteen gained configurable number of items (zecke) 134 * Fifteen gained configurable number of items (zecke)
133 * Fifteen can have custom background images (zecke) 135 * Fifteen can have custom background images (zecke)
134 * Added daemonizing capabilities to QWS Server [via Qt/Embedded] (mickeyl) 136 * Added daemonizing capabilities to QWS Server [via Qt/Embedded] (mickeyl)
135 * Integrated the new security framework into libopie2 (zecke,clem) 137 * Integrated the new security framework into libopie2 (zecke,clem)
136 * Converted the launcher to use the new security framework (zecke) 138 * Converted the launcher to use the new security framework (zecke)
137 * Backup can now handle custom locations for backup and restore (ar) 139 * Backup can now handle custom locations for backup and restore (ar)
138 * Implemented right-on-hold feedback (wimpie,zecke) 140 * Implemented right-on-hold feedback (wimpie,zecke)
139 * Lots of new features in opie-reader (tim,pohly) 141 * Lots of new features in opie-reader (tim,pohly)
140 * Build system cleanups (schurig) 142 * Build system cleanups (schurig)
141 143
142 Fixed Bugs 144 Fixed Bugs
143 -------- 145 --------
144 * #1005 - Fixed backup to CompactFlash (ar) 146 * #1005 - Fixed backup to CompactFlash (ar)
145 * #1167 - Fixed Opie write crashing on more text than one page (ar) 147 * #1167 - Fixed Opie write crashing on more text than one page (ar)
146 * #1225 - Fixed repeated light flashing on Zaurus with keyz (mickeyl) 148 * #1225 - Fixed repeated light flashing on Zaurus with keyz (mickeyl)
147 * #1359 - Fixed bookmarks in Gutenbrowser (ljp) 149 * #1359 - Fixed bookmarks in Gutenbrowser (ljp)
148 * #1361 - Fixed auto upercase in Opie-Addressbook (eilers) 150 * #1361 - Fixed auto upercase in Opie-Addressbook (eilers)
149 * #1370 - Pimconverter now reacts on cancel key (eilers) 151 * #1370 - Pimconverter now reacts on cancel key (eilers)
150 * #1376 - Bring back the capslock/numlock display (zecke) 152 * #1376 - Bring back the capslock/numlock display (zecke)
151 * #1383 - Language settings now warns about losing open apps (Markus Litz) 153 * #1383 - Language settings now warns about losing open apps (Markus Litz)
152 * #1393 - Fixed line wrap issues in opie-console for the default profile (mickeyl) 154 * #1393 - Fixed line wrap issues in opie-console for the default profile (mickeyl)
153 * #1394 - Fixed oversized headline in opie-login (coredump) 155 * #1394 - Fixed oversized headline in opie-login (coredump)
154 * #1396 - Opie-console captures the escape key and vim is working (zecke) 156 * #1396 - Opie-console captures the escape key and vim is working (zecke)
155 * #1401 - Scrollbar is now only visible if necessary in DocTab (mickeyl) 157 * #1401 - Scrollbar is now only visible if necessary in DocTab (mickeyl)
156 158
157 2004-07-06Opie 1.1.4 159 2004-07-06Opie 1.1.4
158 160
159 New Features 161 New Features
160 ------------ 162 ------------
161 * Added four themes courtesy Robert Griebl (http://www.softforge.de/zstyle) 163 * Added four themes courtesy Robert Griebl (http://www.softforge.de/zstyle)
162 * Added Conversion tool for pim-data (eilers) 164 * Added Conversion tool for pim-data (eilers)
163 * Introduced new OPimAccessFactory and OBackendFactory which simplyfies database access (eilers) 165 * Introduced new OPimAccessFactory and OBackendFactory which simplyfies database access (eilers)
164 * Modified the PIM API for providing generic use of OPimRecords (eilers) 166 * Modified the PIM API for providing generic use of OPimRecords (eilers)
165 * Clicking on the application symbol now iterates over the application's top level widgets if already raised (zecke) 167 * Clicking on the application symbol now iterates over the application's top level widgets if already raised (zecke)
166 168
167 Fixed Bugs 169 Fixed Bugs
168 -------- 170 --------
169 * #1068 - Country Drop Down Box Off Screen 171 * #1068 - Country Drop Down Box Off Screen
170 * #1291 - Opie tinykate does not open .desktop files (ar) 172 * #1291 - Opie tinykate does not open .desktop files (ar)
171 * #1291 - Opie sheet not saving correctly (ar) 173 * #1291 - Opie sheet not saving correctly (ar)
172 * #1294 - Opie does not know about British Summer Time 174 * #1294 - Opie does not know about British Summer Time
173 * #1314 - Drawpad initialization (mickeyl) 175 * #1314 - Drawpad initialization (mickeyl)
174 * #1317 - Packagemanager crashes on hold-down or install (chicken) 176 * #1317 - Packagemanager crashes on hold-down or install (chicken)
175 * #1321 - Batteryapplet graphic glitch (harlekin) 177 * #1321 - Batteryapplet graphic glitch (harlekin)
176 * #1324 - ZSafe not starting up (mickeyl) 178 * #1324 - ZSafe not starting up (mickeyl)
177 * #1328 - Personal Home Address fields is trimmed to 1char (eilers) 179 * #1328 - Personal Home Address fields is trimmed to 1char (eilers)
178 * #1327 - Opie-mail ipk does not depend on libopiedb2 (chicken) 180 * #1327 - Opie-mail ipk does not depend on libopiedb2 (chicken)
179 * #1345 - Networksettingsplugin wlan plugin dependency on libpcap0 (mickeyl) 181 * #1345 - Networksettingsplugin wlan plugin dependency on libpcap0 (mickeyl)
180 * #1348 - Datebook dependency on libopiedb2 (chicken) 182 * #1348 - Datebook dependency on libopiedb2 (chicken)
181 * #1328 - Switched SQLDatabase and VCards char encoding from latin1 to unicode (eilers) 183 * #1328 - Switched SQLDatabase and VCards char encoding from latin1 to unicode (eilers)
182 184
183 2004-04-25Opie 1.1.3 185 2004-04-25Opie 1.1.3
184 186
185 * Introduced first implementation of SQL-Support using SQLite (eilers) 187 * Introduced first implementation of SQL-Support using SQLite (eilers)
186 * Added a new Gutenberg Project reader app - opie-gutenbrowser (ljp) 188 * Added a new Gutenberg Project reader app - opie-gutenbrowser (ljp)
187 * Added a real system graffiti character set (brad) 189 * Added a real system graffiti character set (brad)
188 * Added Generic Keyconfig Widget (zecke) 190 * Added Generic Keyconfig Widget (zecke)
189 * Improved Screenshotapplet and Drawpad integration. You can now open a screenshot in drawpad and take notes (zecke) 191 * Improved Screenshotapplet and Drawpad integration. You can now open a screenshot in drawpad and take notes (zecke)
190 * Added new Bible reader app - opie-dagger (drw) 192 * Added new Bible reader app - opie-dagger (drw)
191 * Added a new Image Viewer. Work is ongoing (zecke,alwin) 193 * Added a new Image Viewer. Work is ongoing (zecke,alwin)
192 * Added namespace usage in libopie2 and everywhere (zecke,alwin) 194 * Added namespace usage in libopie2 and everywhere (zecke,alwin)
193 * Enabled the possibility to pass command line arguments to applications (mickeyl) 195 * Enabled the possibility to pass command line arguments to applications (mickeyl)
194 * Added an about applet showing some credits and information about Opie (mickeyl) 196 * Added an about applet showing some credits and information about Opie (mickeyl)
195 * Added benchmarking functionality to sysinfo (mickeyl) 197 * Added benchmarking functionality to sysinfo (mickeyl)
196 * Added applet and configuration application for switching hardware keyboard layouts (alwin) 198 * Added applet and configuration application for switching hardware keyboard layouts (alwin)
197 * Ported applications from libopie1 to libopie2* (drw,ar,alwin) 199 * Ported applications from libopie1 to libopie2* (drw,ar,alwin)
198 * Imported fullscreen and font improvements from the Qkonsole fork to embeddedkonsole (waspe) 200 * Imported fullscreen and font improvements from the Qkonsole fork to embeddedkonsole (waspe)
199 * Clean-up of package information in control files (drw) 201 * Clean-up of package information in control files (drw)
200 * Repaired mediummount which was broken since integrating the quicklauncher (alwin) 202 * Repaired mediummount which was broken since integrating the quicklauncher (alwin)
201 * Improved big-screen support (zecke,ar) 203 * Improved big-screen support (zecke,ar)
202 * Improved multikeyboard support, added keyboard layout switching applet (mouse) 204 * Improved multikeyboard support, added keyboard layout switching applet (mouse)
203 * Added a new mail client based on libetpan (harlekin,alwin,jgf) 205 * Added a new mail client based on libetpan (harlekin,alwin,jgf)
204 * Added new package manager - opie-packagemanager (drw) 206 * Added new package manager - opie-packagemanager (drw)
205 * Improved light-n-power for C7x0 (mickeyl) 207 * Improved light-n-power for C7x0 (mickeyl)
206 * Added automatic rotation support for C7x0 (treke) 208 * Added automatic rotation support for C7x0 (treke)
207 * Split libopie1 up into a set of smaller - functionally grouped - libraries (mickeyl) 209 * Split libopie1 up into a set of smaller - functionally grouped - libraries (mickeyl)
208 * Added scanning the wireless network neighbourhood to networksettings (mickeyl) 210 * Added scanning the wireless network neighbourhood to networksettings (mickeyl)
209 211
210 2003-11-29Opie 1.0.3 212 2003-11-29Opie 1.0.3
211 213
212 * Released as Version 1.0.3 214 * Released as Version 1.0.3
213 * Improved i18n (various contributors) 215 * Improved i18n (various contributors)
214 * Reduced application startup time by integrating the TT quicklauncher (zecke,harlekin) 216 * Reduced application startup time by integrating the TT quicklauncher (zecke,harlekin)
215 * Made the Documents Tab optional (mickeyl) 217 * Made the Documents Tab optional (mickeyl)
216 * Integrated basic support for HP iPAQ 54xx and the Jornada 5xx (chicken) 218 * Integrated basic support for HP iPAQ 54xx and the Jornada 5xx (chicken)
217 219
218 2003-08-04Opie 1.0.0 220 2003-08-04Opie 1.0.0
219 221
220 * Released as Version 1.0.0 222 * Released as Version 1.0.0
221 * Including a PPP module for easy dial up (tille,harlekin,zecke) 223 * Including a PPP module for easy dial up (tille,harlekin,zecke)
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp
index 4255b44..4ec5f4c 100644
--- a/core/launcher/launcher.cpp
+++ b/core/launcher/launcher.cpp
@@ -203,512 +203,520 @@ void LauncherTabWidget::deleteView( const QString& id )
203 LauncherTab *t = categoryBar->launcherTab(id); 203 LauncherTab *t = categoryBar->launcherTab(id);
204 if ( t ) { 204 if ( t ) {
205 stack->removeWidget( t->view ); 205 stack->removeWidget( t->view );
206 delete t->view; 206 delete t->view;
207 categoryBar->removeTab( t ); 207 categoryBar->removeTab( t );
208 } 208 }
209} 209}
210 210
211LauncherView* LauncherTabWidget::newView( const QString& id, const QPixmap& pm, const QString& label ) 211LauncherView* LauncherTabWidget::newView( const QString& id, const QPixmap& pm, const QString& label )
212{ 212{
213 LauncherView* view = new LauncherView( stack ); 213 LauncherView* view = new LauncherView( stack );
214 connect( view, SIGNAL(clicked(const AppLnk*)), 214 connect( view, SIGNAL(clicked(const AppLnk*)),
215 this, SIGNAL(clicked(const AppLnk*))); 215 this, SIGNAL(clicked(const AppLnk*)));
216 connect( view, SIGNAL(rightPressed(AppLnk*)), 216 connect( view, SIGNAL(rightPressed(AppLnk*)),
217 this, SIGNAL(rightPressed(AppLnk*))); 217 this, SIGNAL(rightPressed(AppLnk*)));
218 218
219 219
220 int n = categoryBar->count(); 220 int n = categoryBar->count();
221 221
222 stack->addWidget( view, n ); 222 stack->addWidget( view, n );
223 223
224 LauncherTab *tab = new LauncherTab( id, view, pm, label ); 224 LauncherTab *tab = new LauncherTab( id, view, pm, label );
225 categoryBar->insertTab( tab, n-1 ); 225 categoryBar->insertTab( tab, n-1 );
226 if ( id == "Documents" ) { 226 if ( id == "Documents" ) {
227 docview = view; 227 docview = view;
228 m_DocumentTabId = n; 228 m_DocumentTabId = n;
229 } 229 }
230 230
231 odebug << "inserting " << id << " at " << n-1 << "" << oendl; 231 odebug << "inserting " << id << " at " << n-1 << "" << oendl;
232 232
233 Config cfg("Launcher"); 233 Config cfg("Launcher");
234 setTabAppearance( tab, cfg ); 234 setTabAppearance( tab, cfg );
235 235
236 cfg.setGroup( "GUI" ); 236 cfg.setGroup( "GUI" );
237 view->setBusyIndicatorType( cfg.readEntry( "BusyType", QString::null ) ); 237 view->setBusyIndicatorType( cfg.readEntry( "BusyType", QString::null ) );
238 238
239 return view; 239 return view;
240} 240}
241 241
242LauncherView *LauncherTabWidget::view( const QString &id ) 242LauncherView *LauncherTabWidget::view( const QString &id )
243{ 243{
244 LauncherTab *t = categoryBar->launcherTab(id); 244 LauncherTab *t = categoryBar->launcherTab(id);
245 if ( !t ) 245 if ( !t )
246 return 0; 246 return 0;
247 return t->view; 247 return t->view;
248} 248}
249 249
250LauncherView *LauncherTabWidget::docView() 250LauncherView *LauncherTabWidget::docView()
251{ 251{
252 return docview; 252 return docview;
253} 253}
254 254
255void LauncherTabWidget::setLoadingWidgetEnabled( bool v ) 255void LauncherTabWidget::setLoadingWidgetEnabled( bool v )
256{ 256{
257 if ( v != docLoadingWidgetEnabled && docLoadingWidget ) { 257 if ( v != docLoadingWidgetEnabled && docLoadingWidget ) {
258 docLoadingWidgetEnabled = v; 258 docLoadingWidgetEnabled = v;
259 raiseTabWidget(); 259 raiseTabWidget();
260 } 260 }
261} 261}
262 262
263void LauncherTabWidget::setLoadingProgress( int percent ) 263void LauncherTabWidget::setLoadingProgress( int percent )
264{ 264{
265 docLoadingWidgetProgress->setProgress( (percent / 4) * 4 ); 265 docLoadingWidgetProgress->setProgress( (percent / 4) * 4 );
266} 266}
267 267
268// ### this function could more to LauncherView 268// ### this function could more to LauncherView
269void LauncherTabWidget::setTabViewAppearance( LauncherView *v, Config &cfg ) 269void LauncherTabWidget::setTabViewAppearance( LauncherView *v, Config &cfg )
270{ 270{
271 // View 271 // View
272 QString view = cfg.readEntry( "View", "Icon" ); 272 QString view = cfg.readEntry( "View", "Icon" );
273 if ( view == "List" ) // No tr 273 if ( view == "List" ) // No tr
274 v->setViewMode( LauncherView::List ); 274 v->setViewMode( LauncherView::List );
275 QString bgType = cfg.readEntry( "BackgroundType", "Image" ); 275 QString bgType = cfg.readEntry( "BackgroundType", "Image" );
276 if ( bgType == "Image" ) { // No tr 276 if ( bgType == "Image" ) { // No tr
277 QString pm = cfg.readEntry( "BackgroundImage", "launcher/opie-background" ); 277 QString pm = cfg.readEntry( "BackgroundImage", "launcher/opie-background" );
278 v->setBackgroundType( LauncherView::Image, pm ); 278 v->setBackgroundType( LauncherView::Image, pm );
279 } else if ( bgType == "SolidColor" ) { 279 } else if ( bgType == "SolidColor" ) {
280 QString c = cfg.readEntry( "BackgroundColor" ); 280 QString c = cfg.readEntry( "BackgroundColor" );
281 v->setBackgroundType( LauncherView::SolidColor, c ); 281 v->setBackgroundType( LauncherView::SolidColor, c );
282 } else { 282 } else {
283 v->setBackgroundType( LauncherView::Ruled, QString::null ); 283 v->setBackgroundType( LauncherView::Ruled, QString::null );
284 } 284 }
285 QString textCol = cfg.readEntry( "TextColor" ); 285 QString textCol = cfg.readEntry( "TextColor" );
286 if ( textCol.isEmpty() ) 286 if ( textCol.isEmpty() )
287 v->setTextColor( QColor() ); 287 v->setTextColor( QColor() );
288 else 288 else
289 v->setTextColor( QColor(textCol) ); 289 v->setTextColor( QColor(textCol) );
290// bool customFont = cfg.readBoolEntry( "CustomFont", FALSE ); 290// bool customFont = cfg.readBoolEntry( "CustomFont", FALSE );
291 291
292 v->setColNumber( cfg.readNumEntry( "Columns", 0 ) ); 292 v->setColNumber( cfg.readNumEntry( "Columns", 0 ) );
293 293
294 QStringList font = cfg.readListEntry( "Font", ',' ); 294 QStringList font = cfg.readListEntry( "Font", ',' );
295 if ( font.count() == 4 ) 295 if ( font.count() == 4 )
296 v->setViewFont( QFont(font[0], font[1].toInt(), font[2].toInt(), font[3].toInt()!=0) ); 296 v->setViewFont( QFont(font[0], font[1].toInt(), font[2].toInt(), font[3].toInt()!=0) );
297 297
298 // ### FIXME TabColor TabTextColor 298 // ### FIXME TabColor TabTextColor
299 299
300} 300}
301 301
302// ### Could move to LauncherTab 302// ### Could move to LauncherTab
303void LauncherTabWidget::setTabAppearance( LauncherTab *tab, Config &cfg ) 303void LauncherTabWidget::setTabAppearance( LauncherTab *tab, Config &cfg )
304{ 304{
305 cfg.setGroup( QString( "Tab %1" ).arg(tab->type) ); // No tr 305 cfg.setGroup( QString( "Tab %1" ).arg(tab->type) ); // No tr
306 306
307 setTabViewAppearance( tab->view, cfg ); 307 setTabViewAppearance( tab->view, cfg );
308 308
309 // Tabs 309 // Tabs
310 QString tabCol = cfg.readEntry( "TabColor" ); 310 QString tabCol = cfg.readEntry( "TabColor" );
311 if ( tabCol.isEmpty() ) 311 if ( tabCol.isEmpty() )
312 tab->bgColor = QColor(); 312 tab->bgColor = QColor();
313 else 313 else
314 tab->bgColor = QColor(tabCol); 314 tab->bgColor = QColor(tabCol);
315 QString tabTextCol = cfg.readEntry( "TabTextColor" ); 315 QString tabTextCol = cfg.readEntry( "TabTextColor" );
316 if ( tabTextCol.isEmpty() ) 316 if ( tabTextCol.isEmpty() )
317 tab->fgColor = QColor(); 317 tab->fgColor = QColor();
318 else 318 else
319 tab->fgColor = QColor(tabTextCol); 319 tab->fgColor = QColor(tabTextCol);
320} 320}
321 321
322void LauncherTabWidget::paletteChange( const QPalette &p ) 322void LauncherTabWidget::paletteChange( const QPalette &p )
323{ 323{
324 QVBox::paletteChange( p ); 324 QVBox::paletteChange( p );
325 QPalette pal = palette(); 325 QPalette pal = palette();
326 pal.setColor( QColorGroup::Light, pal.color(QPalette::Active,QColorGroup::Shadow) ); 326 pal.setColor( QColorGroup::Light, pal.color(QPalette::Active,QColorGroup::Shadow) );
327 pal.setColor( QColorGroup::Background, pal.active().background().light(110) ); 327 pal.setColor( QColorGroup::Background, pal.active().background().light(110) );
328 categoryBar->setPalette( pal ); 328 categoryBar->setPalette( pal );
329 categoryBar->update(); 329 categoryBar->update();
330} 330}
331 331
332void LauncherTabWidget::styleChange( QStyle & ) 332void LauncherTabWidget::styleChange( QStyle & )
333{ 333{
334 QTimer::singleShot( 0, this, SLOT(setProgressStyle()) ); 334 QTimer::singleShot( 0, this, SLOT(setProgressStyle()) );
335} 335}
336 336
337void LauncherTabWidget::setProgressStyle() 337void LauncherTabWidget::setProgressStyle()
338{ 338{
339 if (docLoadingWidgetProgress) { 339 if (docLoadingWidgetProgress) {
340 docLoadingWidgetProgress->setFrameShape( QProgressBar::Box ); 340 docLoadingWidgetProgress->setFrameShape( QProgressBar::Box );
341 docLoadingWidgetProgress->setFrameShadow( QProgressBar::Plain ); 341 docLoadingWidgetProgress->setFrameShadow( QProgressBar::Plain );
342 docLoadingWidgetProgress->setMargin( 1 ); 342 docLoadingWidgetProgress->setMargin( 1 );
343 docLoadingWidgetProgress->setLineWidth( 1 ); 343 docLoadingWidgetProgress->setLineWidth( 1 );
344 } 344 }
345} 345}
346 346
347/* 347/*
348 * FIXME 348 * FIXME
349 * The following NULL check is triggered by inserting, then removing a tab on the fly 349 * The following NULL check is triggered by inserting, then removing a tab on the fly
350 * as you would if you had removable media (which I do). Without this check 350 * as you would if you had removable media (which I do). Without this check
351 * the first app launched after a tab removal causes qpe to Segfault. 351 * the first app launched after a tab removal causes qpe to Segfault.
352 * This obviously has a more sinister cause, but this works around it with no 352 * This obviously has a more sinister cause, but this works around it with no
353 * obvious adverse effects. Please FIXME 353 * obvious adverse effects. Please FIXME
354 * bkc - 17/6/2004 354 * bkc - 17/6/2004
355 * 355 *
356 */ 356 */
357 357
358void LauncherTabWidget::setBusy(bool on) 358void LauncherTabWidget::setBusy(bool on)
359{ 359{
360 if ( on ) 360 if ( on )
361 currentView()->setBusy(TRUE); 361 currentView()->setBusy(TRUE);
362 else { 362 else {
363 for ( int i = 0; i < categoryBar->count(); i++ ) { 363 for ( int i = 0; i < categoryBar->count(); i++ ) {
364 if (categoryBar->tab(i)) { 364 if (categoryBar->tab(i)) {
365 LauncherView *view = ((LauncherTab *)categoryBar->tab(i))->view; 365 LauncherView *view = ((LauncherTab *)categoryBar->tab(i))->view;
366 view->setBusy( FALSE ); 366 view->setBusy( FALSE );
367 } else { 367 } else {
368 odebug << "Averting Disaster with tab " << i << " == NULL! " << oendl; 368 odebug << "Averting Disaster with tab " << i << " == NULL! " << oendl;
369 } 369 }
370 } 370 }
371 } 371 }
372} 372}
373 373
374void LauncherTabWidget::setBusyIndicatorType( const QString& str ) { 374void LauncherTabWidget::setBusyIndicatorType( const QString& str ) {
375 for (int i = 0; i < categoryBar->count(); i++ ) { 375 for (int i = 0; i < categoryBar->count(); i++ ) {
376 LauncherView* view = static_cast<LauncherTab*>( categoryBar->tab(i) )->view; 376 LauncherView* view = static_cast<LauncherTab*>( categoryBar->tab(i) )->view;
377 view->setBusyIndicatorType( str ); 377 view->setBusyIndicatorType( str );
378 } 378 }
379} 379}
380 380
381LauncherView *LauncherTabWidget::currentView(void) 381LauncherView *LauncherTabWidget::currentView(void)
382{ 382{
383 return (LauncherView*)stack->visibleWidget(); 383 return (LauncherView*)stack->visibleWidget();
384} 384}
385 385
386 386
387 387
388void LauncherTabWidget::launcherMessage( const QCString &msg, const QByteArray &data) 388void LauncherTabWidget::launcherMessage( const QCString &msg, const QByteArray &data)
389{ 389{
390 QDataStream stream( data, IO_ReadOnly ); 390 QDataStream stream( data, IO_ReadOnly );
391 if ( msg == "setTabView(QString,int)" ) { 391 if ( msg == "setTabView(QString,int)" ) {
392 QString id; 392 QString id;
393 stream >> id; 393 stream >> id;
394 int mode; 394 int mode;
395 stream >> mode; 395 stream >> mode;
396 if ( view(id) ) 396 if ( view(id) )
397 view(id)->setViewMode( (LauncherView::ViewMode)mode ); 397 view(id)->setViewMode( (LauncherView::ViewMode)mode );
398 } else if ( msg == "setTabBackground(QString,int,QString)" ) { 398 } else if ( msg == "setTabBackground(QString,int,QString)" ) {
399 QString id; 399 QString id;
400 stream >> id; 400 stream >> id;
401 int mode; 401 int mode;
402 stream >> mode; 402 stream >> mode;
403 QString pixmapOrColor; 403 QString pixmapOrColor;
404 stream >> pixmapOrColor; 404 stream >> pixmapOrColor;
405 if ( view(id) ) 405 if ( view(id) )
406 view(id)->setBackgroundType( (LauncherView::BackgroundType)mode, pixmapOrColor ); 406 view(id)->setBackgroundType( (LauncherView::BackgroundType)mode, pixmapOrColor );
407 if ( id == "Documents" ) 407 if ( id == "Documents" )
408 docLoadingWidget->setBackgroundType( (LauncherView::BackgroundType)mode, pixmapOrColor ); 408 docLoadingWidget->setBackgroundType( (LauncherView::BackgroundType)mode, pixmapOrColor );
409 } else if ( msg == "setTextColor(QString,QString)" ) { 409 } else if ( msg == "setTextColor(QString,QString)" ) {
410 QString id; 410 QString id;
411 stream >> id; 411 stream >> id;
412 QString color; 412 QString color;
413 stream >> color; 413 stream >> color;
414 if ( view(id) ) 414 if ( view(id) )
415 view(id)->setTextColor( QColor(color) ); 415 view(id)->setTextColor( QColor(color) );
416 if ( id == "Documents" ) 416 if ( id == "Documents" )
417 docLoadingWidget->setTextColor( QColor(color) ); 417 docLoadingWidget->setTextColor( QColor(color) );
418 } else if ( msg == "setIconColumns(QString,int)" ) { 418 } else if ( msg == "setIconColumns(QString,int)" ) {
419 QString id; 419 QString id;
420 stream >> id; 420 stream >> id;
421 int number; 421 int number;
422 stream >> number; 422 stream >> number;
423 if ( view(id ) ) 423 if ( view(id ) )
424 view(id)->setColNumber( number ); 424 view(id)->setColNumber( number );
425 } else if ( msg == "setFont(QString,QString,int,int,int)" ) { 425 } else if ( msg == "setFont(QString,QString,int,int,int)" ) {
426 QString id; 426 QString id;
427 stream >> id; 427 stream >> id;
428 QString fam; 428 QString fam;
429 stream >> fam; 429 stream >> fam;
430 int size; 430 int size;
431 stream >> size; 431 stream >> size;
432 int weight; 432 int weight;
433 stream >> weight; 433 stream >> weight;
434 int italic; 434 int italic;
435 stream >> italic; 435 stream >> italic;
436 if ( view(id) ) { 436 if ( view(id) ) {
437 if ( !fam.isEmpty() ) { 437 if ( !fam.isEmpty() ) {
438 view(id)->setViewFont( QFont(fam, size, weight, italic!=0) ); 438 view(id)->setViewFont( QFont(fam, size, weight, italic!=0) );
439 odebug << "setFont: " << fam << ", " << size << ", " << weight << ", " << italic << "" << oendl; 439 odebug << "setFont: " << fam << ", " << size << ", " << weight << ", " << italic << "" << oendl;
440 } else { 440 } else {
441 view(id)->clearViewFont(); 441 view(id)->clearViewFont();
442 } 442 }
443 } 443 }
444 }else if ( msg == "setBusyIndicatorType(QString)" ) { 444 }else if ( msg == "setBusyIndicatorType(QString)" ) {
445 QString type; 445 QString type;
446 stream >> type; 446 stream >> type;
447 setBusyIndicatorType( type ); 447 setBusyIndicatorType( type );
448 }else if ( msg == "home()" ) { 448 }else if ( msg == "home()" ) {
449 if ( isVisibleWindow( static_cast<QWidget*>(parent())->winId() ) ) { 449 if ( isVisibleWindow( static_cast<QWidget*>(parent())->winId() ) ) {
450 if (categoryBar) 450 if (categoryBar)
451 categoryBar->nextTab(); 451 categoryBar->nextTab();
452 }else { 452 }else {
453 static_cast<QWidget*>(parent())->raise(); 453 static_cast<QWidget*>(parent())->raise();
454 } 454 }
455 } else if (msg=="doctabEnabled(int)") { 455 } else if (msg=="doctabEnabled(int)") {
456 int id; stream >> id; 456 int id; stream >> id;
457 odebug << "Doctab enabled " << id << oendl; 457 odebug << "Doctab enabled " << id << oendl;
458 reCheckDoctab(id); 458 reCheckDoctab(id);
459 } else if ( msg == "setStaticBackground(bool)" ) {
460 int set; stream >> set;
461 odebug << "setStaticBackground " << set << oendl;
462 for (int i = 0; i < categoryBar->count(); i++ )
463 {
464 LauncherView* view = static_cast<LauncherTab*>( categoryBar->tab(i) )->view;
465 view->iconView()->setStaticBackgroundPicture( set );
466 }
459 } 467 }
460} 468}
461 469
462void LauncherTabWidget::reCheckDoctab(int how) 470void LauncherTabWidget::reCheckDoctab(int how)
463{ 471{
464 if ((bool)how == docTabEnabled) { 472 if ((bool)how == docTabEnabled) {
465 /* nothing to do */ 473 /* nothing to do */
466 return; 474 return;
467 } 475 }
468 if (docLoadingWidget) { 476 if (docLoadingWidget) {
469 stack->removeWidget(docLoadingWidget); 477 stack->removeWidget(docLoadingWidget);
470 delete docLoadingWidget; 478 delete docLoadingWidget;
471 docLoadingWidget = 0; 479 docLoadingWidget = 0;
472 } 480 }
473 createDocLoadingWidget(); 481 createDocLoadingWidget();
474 { 482 {
475 QCopEnvelope( "QPE/System", "reforceDocuments()" ); 483 QCopEnvelope( "QPE/System", "reforceDocuments()" );
476 odebug << "Sending doc rescan" << oendl; 484 odebug << "Sending doc rescan" << oendl;
477 } 485 }
478} 486}
479 487
480//--------------------------------------------------------------------------- 488//---------------------------------------------------------------------------
481 489
482Launcher::Launcher() 490Launcher::Launcher()
483 : QMainWindow( 0, "PDA User Interface", QWidget::WStyle_Customize | QWidget::WGroupLeader ) 491 : QMainWindow( 0, "PDA User Interface", QWidget::WStyle_Customize | QWidget::WGroupLeader )
484{ 492{
485 tabs = 0; 493 tabs = 0;
486 tb = 0; 494 tb = 0;
487 Config cfg( "Launcher" ); 495 Config cfg( "Launcher" );
488 cfg.setGroup( "DocTab" ); 496 cfg.setGroup( "DocTab" );
489 docTabEnabled = cfg.readBoolEntry( "Enable", true ); 497 docTabEnabled = cfg.readBoolEntry( "Enable", true );
490} 498}
491 499
492void Launcher::createGUI() 500void Launcher::createGUI()
493{ 501{
494 setCaption( tr("Launcher") ); 502 setCaption( tr("Launcher") );
495 503
496 // we have a pretty good idea how big we'll be 504 // we have a pretty good idea how big we'll be
497 setGeometry( 0, 0, qApp->desktop()->width(), qApp->desktop()->height() ); 505 setGeometry( 0, 0, qApp->desktop()->width(), qApp->desktop()->height() );
498 506
499 tb = new TaskBar; 507 tb = new TaskBar;
500 tabs = new LauncherTabWidget( this ); 508 tabs = new LauncherTabWidget( this );
501 setCentralWidget( tabs ); 509 setCentralWidget( tabs );
502 510
503 ServerInterface::dockWidget( tb, ServerInterface::Bottom ); 511 ServerInterface::dockWidget( tb, ServerInterface::Bottom );
504 tb->show(); 512 tb->show();
505 513
506 qApp->installEventFilter( this ); 514 qApp->installEventFilter( this );
507 515
508 connect( tb, SIGNAL(tabSelected(const QString&)), 516 connect( tb, SIGNAL(tabSelected(const QString&)),
509 this, SLOT(showTab(const QString&)) ); 517 this, SLOT(showTab(const QString&)) );
510 connect( tabs, SIGNAL(selected(const QString&)), 518 connect( tabs, SIGNAL(selected(const QString&)),
511 this, SLOT(viewSelected(const QString&)) ); 519 this, SLOT(viewSelected(const QString&)) );
512 connect( tabs, SIGNAL(clicked(const AppLnk*)), 520 connect( tabs, SIGNAL(clicked(const AppLnk*)),
513 this, SLOT(select(const AppLnk*))); 521 this, SLOT(select(const AppLnk*)));
514 connect( tabs, SIGNAL(rightPressed(AppLnk*)), 522 connect( tabs, SIGNAL(rightPressed(AppLnk*)),
515 this, SLOT(properties(AppLnk*))); 523 this, SLOT(properties(AppLnk*)));
516 524
517#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 525#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
518 QCopChannel* sysChannel = new QCopChannel( "QPE/System", this ); 526 QCopChannel* sysChannel = new QCopChannel( "QPE/System", this );
519 connect( sysChannel, SIGNAL(received(const QCString&,const QByteArray&)), 527 connect( sysChannel, SIGNAL(received(const QCString&,const QByteArray&)),
520 this, SLOT(systemMessage(const QCString&,const QByteArray&)) ); 528 this, SLOT(systemMessage(const QCString&,const QByteArray&)) );
521#endif 529#endif
522 530
523 // all documents 531 // all documents
524 QImage img( Resource::loadImage( "DocsIcon" ) ); 532 QImage img( Resource::loadImage( "DocsIcon" ) );
525 QPixmap pm; 533 QPixmap pm;
526 pm = img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ); 534 pm = img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() );
527 // It could add this itself if it handles docs 535 // It could add this itself if it handles docs
528 536
529 tabs->newView("Documents", pm, tr("Documents") )->setToolsEnabled( TRUE ); 537 tabs->newView("Documents", pm, tr("Documents") )->setToolsEnabled( TRUE );
530 538
531 QTimer::singleShot( 0, tabs, SLOT( initLayout() ) ); 539 QTimer::singleShot( 0, tabs, SLOT( initLayout() ) );
532 qApp->setMainWidget( this ); 540 qApp->setMainWidget( this );
533 QTimer::singleShot( 500, this, SLOT( makeVisible() ) ); 541 QTimer::singleShot( 500, this, SLOT( makeVisible() ) );
534} 542}
535 543
536Launcher::~Launcher() 544Launcher::~Launcher()
537{ 545{
538 if ( tb ) 546 if ( tb )
539 destroyGUI(); 547 destroyGUI();
540} 548}
541 549
542 bool Launcher::requiresDocuments() const 550 bool Launcher::requiresDocuments() const
543 { 551 {
544 Config cfg( "Launcher" ); 552 Config cfg( "Launcher" );
545 cfg.setGroup( "DocTab" ); 553 cfg.setGroup( "DocTab" );
546 return cfg.readBoolEntry( "Enable", true ); 554 return cfg.readBoolEntry( "Enable", true );
547} 555}
548 556
549void Launcher::makeVisible() 557void Launcher::makeVisible()
550{ 558{
551 showMaximized(); 559 showMaximized();
552} 560}
553 561
554void Launcher::destroyGUI() 562void Launcher::destroyGUI()
555{ 563{
556 delete tb; 564 delete tb;
557 tb = 0; 565 tb = 0;
558 delete tabs; 566 delete tabs;
559 tabs =0; 567 tabs =0;
560} 568}
561 569
562bool Launcher::eventFilter( QObject*, QEvent *ev ) 570bool Launcher::eventFilter( QObject*, QEvent *ev )
563{ 571{
564#ifdef QT_QWS_CUSTOM 572#ifdef QT_QWS_CUSTOM
565 if ( ev->type() == QEvent::KeyPress ) { 573 if ( ev->type() == QEvent::KeyPress ) {
566 QKeyEvent *ke = (QKeyEvent *)ev; 574 QKeyEvent *ke = (QKeyEvent *)ev;
567 if ( ke->key() == Qt::Key_F11 ) { // menu key 575 if ( ke->key() == Qt::Key_F11 ) { // menu key
568 QWidget *active = qApp->activeWindow(); 576 QWidget *active = qApp->activeWindow();
569 if ( active && active->isPopup() ) 577 if ( active && active->isPopup() )
570 active->close(); 578 active->close();
571 else { 579 else {
572 Global::terminateBuiltin("calibrate"); // No tr 580 Global::terminateBuiltin("calibrate"); // No tr
573 tb->launchStartMenu(); 581 tb->launchStartMenu();
574 } 582 }
575 return TRUE; 583 return TRUE;
576 } 584 }
577 } 585 }
578#else 586#else
579 Q_UNUSED(ev); 587 Q_UNUSED(ev);
580#endif 588#endif
581 return FALSE; 589 return FALSE;
582} 590}
583 591
584static bool isVisibleWindow(int wid) 592static bool isVisibleWindow(int wid)
585{ 593{
586#ifdef Q_WS_QWS 594#ifdef Q_WS_QWS
587 const QList<QWSWindow> &list = qwsServer->clientWindows(); 595 const QList<QWSWindow> &list = qwsServer->clientWindows();
588 QWSWindow* w; 596 QWSWindow* w;
589 for (QListIterator<QWSWindow> it(list); (w=it.current()); ++it) { 597 for (QListIterator<QWSWindow> it(list); (w=it.current()); ++it) {
590 if ( w->winId() == wid ) 598 if ( w->winId() == wid )
591 return !w->isFullyObscured(); 599 return !w->isFullyObscured();
592 } 600 }
593#endif 601#endif
594 return FALSE; 602 return FALSE;
595} 603}
596 604
597void Launcher::viewSelected(const QString& s) 605void Launcher::viewSelected(const QString& s)
598{ 606{
599 setCaption( s + tr(" - Launcher") ); 607 setCaption( s + tr(" - Launcher") );
600} 608}
601 609
602void Launcher::showTab(const QString& id) 610void Launcher::showTab(const QString& id)
603{ 611{
604 tabs->categoryBar->showTab(id); 612 tabs->categoryBar->showTab(id);
605 raise(); 613 raise();
606} 614}
607 615
608void Launcher::select( const AppLnk *appLnk ) 616void Launcher::select( const AppLnk *appLnk )
609{ 617{
610 if ( appLnk->type() == "Folder" ) { // No tr 618 if ( appLnk->type() == "Folder" ) { // No tr
611 // Not supported: flat is simpler for the user 619 // Not supported: flat is simpler for the user
612 } else { 620 } else {
613 if ( appLnk->exec().isNull() ) { 621 if ( appLnk->exec().isNull() ) {
614 int i = QMessageBox::information(this,tr("No application"), 622 int i = QMessageBox::information(this,tr("No application"),
615 tr("<p>No application is defined for this document." 623 tr("<p>No application is defined for this document."
616 "<p>Type is %1.").arg(appLnk->type()), tr("OK"), tr("View as text"), 0, 0, 1); 624 "<p>Type is %1.").arg(appLnk->type()), tr("OK"), tr("View as text"), 0, 0, 1);
617 625
618 /* ### Fixme */ 626 /* ### Fixme */
619 if ( i == 1 ) 627 if ( i == 1 )
620 Global::execute("textedit",appLnk->file()); 628 Global::execute("textedit",appLnk->file());
621 629
622 return; 630 return;
623 } 631 }
624 tabs->setBusy(TRUE); 632 tabs->setBusy(TRUE);
625 emit executing( appLnk ); 633 emit executing( appLnk );
626 appLnk->execute(); 634 appLnk->execute();
627 } 635 }
628} 636}
629 637
630void Launcher::properties( AppLnk *appLnk ) 638void Launcher::properties( AppLnk *appLnk )
631{ 639{
632 if ( appLnk->type() == "Folder" ) { // No tr 640 if ( appLnk->type() == "Folder" ) { // No tr
633 // Not supported: flat is simpler for the user 641 // Not supported: flat is simpler for the user
634 } else { 642 } else {
635/* ### libqtopia FIXME also moving docLnks... */ 643/* ### libqtopia FIXME also moving docLnks... */
636 LnkProperties prop(appLnk,0 ); 644 LnkProperties prop(appLnk,0 );
637 645
638 if (QPEApplication::execDialog( &prop )==QDialog::Accepted && tabs->currentView()==tabs->docView()) { 646 if (QPEApplication::execDialog( &prop )==QDialog::Accepted && tabs->currentView()==tabs->docView()) {
639 } 647 }
640 } 648 }
641} 649}
642 650
643void Launcher::storageChanged( const QList<FileSystem> & ) 651void Launcher::storageChanged( const QList<FileSystem> & )
644{ 652{
645 // ### update combo boxes if we had a combo box for the storage type 653 // ### update combo boxes if we had a combo box for the storage type
646} 654}
647 655
648void Launcher::systemMessage( const QCString &msg, const QByteArray &data) 656void Launcher::systemMessage( const QCString &msg, const QByteArray &data)
649{ 657{
650 QDataStream stream( data, IO_ReadOnly ); 658 QDataStream stream( data, IO_ReadOnly );
651 if ( msg == "busy()" ) { 659 if ( msg == "busy()" ) {
652 tb->startWait(); 660 tb->startWait();
653 } else if ( msg == "notBusy(QString)" ) { 661 } else if ( msg == "notBusy(QString)" ) {
654 QString app; 662 QString app;
655 stream >> app; 663 stream >> app;
656 tabs->setBusy(FALSE); 664 tabs->setBusy(FALSE);
657 tb->stopWait(app); 665 tb->stopWait(app);
658 } else if (msg == "applyStyle()") { 666 } else if (msg == "applyStyle()") {
659 tabs->currentView()->relayout(); 667 tabs->currentView()->relayout();
660 } 668 }
661} 669}
662 670
663// These are the update functions from the server 671// These are the update functions from the server
664void Launcher::typeAdded( const QString& type, const QString& name, 672void Launcher::typeAdded( const QString& type, const QString& name,
665 const QPixmap& pixmap, const QPixmap& ) 673 const QPixmap& pixmap, const QPixmap& )
666{ 674{
667 tabs->newView( type, pixmap, name ); 675 tabs->newView( type, pixmap, name );
668 ids.append( type ); 676 ids.append( type );
669 /* this will be called in applicationScanningProgress with value 100! */ 677 /* this will be called in applicationScanningProgress with value 100! */
670// tb->refreshStartMenu(); 678// tb->refreshStartMenu();
671 679
672 static bool first = TRUE; 680 static bool first = TRUE;
673 if ( first ) { 681 if ( first ) {
674 first = FALSE; 682 first = FALSE;
675 tabs->categoryBar->showTab(type); 683 tabs->categoryBar->showTab(type);
676 } 684 }
677 685
678 tabs->view( type )->setUpdatesEnabled( FALSE ); 686 tabs->view( type )->setUpdatesEnabled( FALSE );
679 tabs->view( type )->setSortEnabled( FALSE ); 687 tabs->view( type )->setSortEnabled( FALSE );
680} 688}
681 689
682void Launcher::typeRemoved( const QString& type ) 690void Launcher::typeRemoved( const QString& type )
683{ 691{
684 tabs->view( type )->removeAllItems(); 692 tabs->view( type )->removeAllItems();
685 tabs->deleteView( type ); 693 tabs->deleteView( type );
686 ids.remove( type ); 694 ids.remove( type );
687 /* this will be called in applicationScanningProgress with value 100! */ 695 /* this will be called in applicationScanningProgress with value 100! */
688// tb->refreshStartMenu(); 696// tb->refreshStartMenu();
689} 697}
690 698
691void Launcher::applicationAdded( const QString& type, const AppLnk& app ) 699void Launcher::applicationAdded( const QString& type, const AppLnk& app )
692{ 700{
693 if ( app.type() == "Separator" ) // No tr 701 if ( app.type() == "Separator" ) // No tr
694 return; 702 return;
695 703
696 LauncherView *view = tabs->view( type ); 704 LauncherView *view = tabs->view( type );
697 if ( view ) 705 if ( view )
698 view->addItem( new AppLnk( app ), FALSE ); 706 view->addItem( new AppLnk( app ), FALSE );
699 else 707 else
700 owarn << "addAppLnk: No view for type " << type.latin1() << ". Can't add app " 708 owarn << "addAppLnk: No view for type " << type.latin1() << ". Can't add app "
701 << app.name().latin1() << "!", 709 << app.name().latin1() << "!",
702 710
703 MimeType::registerApp( app ); 711 MimeType::registerApp( app );
704} 712}
705 713
706void Launcher::applicationRemoved( const QString& type, const AppLnk& app ) 714void Launcher::applicationRemoved( const QString& type, const AppLnk& app )
707{ 715{
708 LauncherView *view = tabs->view( type ); 716 LauncherView *view = tabs->view( type );
709 if ( view ) 717 if ( view )
710 view->removeLink( app.linkFile() ); 718 view->removeLink( app.linkFile() );
711 else 719 else
712 owarn << "removeAppLnk: No view for " << type << "!" << oendl; 720 owarn << "removeAppLnk: No view for " << type << "!" << oendl;
713} 721}
714 722
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp
index e7229ee..a4c7561 100644
--- a/core/launcher/launcherview.cpp
+++ b/core/launcher/launcherview.cpp
@@ -41,594 +41,604 @@ using namespace Opie::Core;
41 41
42// These define how the busy icon is animated and highlighted 42// These define how the busy icon is animated and highlighted
43#define BRIGHTEN_BUSY_ICON 43#define BRIGHTEN_BUSY_ICON
44//#define ALPHA_FADE_BUSY_ICON 44//#define ALPHA_FADE_BUSY_ICON
45//#define USE_ANIMATED_BUSY_ICON_OVERLAY 45//#define USE_ANIMATED_BUSY_ICON_OVERLAY
46#define BOUNCE_BUSY_ICON 46#define BOUNCE_BUSY_ICON
47 47
48typedef QMap<QString,QPixmap>::Iterator pixiter; 48typedef QMap<QString,QPixmap>::Iterator pixiter;
49 49
50class BgPixmap 50class BgPixmap
51{ 51{
52public: 52public:
53 BgPixmap( const QPixmap &p ) : pm(p), ref(1) {} 53 BgPixmap( const QPixmap &p ) : pm(p), ref(1) {}
54 QPixmap pm; 54 QPixmap pm;
55 int ref; 55 int ref;
56}; 56};
57 57
58 58
59static QMap<QString,BgPixmap*> *bgCache = 0; 59static QMap<QString,BgPixmap*> *bgCache = 0;
60 60
61static void cleanup_cache() 61static void cleanup_cache()
62{ 62{
63 QMap<QString,BgPixmap*>::Iterator it = bgCache->begin(); 63 QMap<QString,BgPixmap*>::Iterator it = bgCache->begin();
64 while ( it != bgCache->end() ) { 64 while ( it != bgCache->end() ) {
65 QMap<QString,BgPixmap*>::Iterator curr = it; 65 QMap<QString,BgPixmap*>::Iterator curr = it;
66 ++it; 66 ++it;
67 delete (*curr); 67 delete (*curr);
68 bgCache->remove( curr ); 68 bgCache->remove( curr );
69 } 69 }
70 delete bgCache; 70 delete bgCache;
71 bgCache = 0; 71 bgCache = 0;
72} 72}
73 73
74 74
75class LauncherItem : public QIconViewItem 75class LauncherItem : public QIconViewItem
76{ 76{
77public: 77public:
78 enum iconstate_t { 78 enum iconstate_t {
79 BASE_ICON, 79 BASE_ICON,
80 WAITING_ICON, 80 WAITING_ICON,
81 EYE_ICON 81 EYE_ICON
82 }; 82 };
83 83
84 LauncherItem( QIconView *parent, AppLnk* applnk, bool bigIcon=TRUE ); 84 LauncherItem( QIconView *parent, AppLnk* applnk, bool bigIcon=TRUE );
85 ~LauncherItem(); 85 ~LauncherItem();
86 86
87 AppLnk *appLnk() const { return app; } 87 AppLnk *appLnk() const { return app; }
88 AppLnk *takeAppLnk() { AppLnk* r=app; app=0; return r; } 88 AppLnk *takeAppLnk() { AppLnk* r=app; app=0; return r; }
89 89
90 void animateIcon(); 90 void animateIcon();
91 void resetIcon(); 91 void resetIcon();
92 bool isEyeImage()const{return m_EyeImage;} 92 bool isEyeImage()const{return m_EyeImage;}
93 93
94 virtual int compare ( QIconViewItem * i ) const; 94 virtual int compare ( QIconViewItem * i ) const;
95 void paintItem( QPainter *p, const QColorGroup &cg ); 95 void paintItem( QPainter *p, const QColorGroup &cg );
96 96
97 void setBusyIndicatorType ( BusyIndicatorType t ) { busyType = t; } 97 void setBusyIndicatorType ( BusyIndicatorType t ) { busyType = t; }
98 void setEyePixmap(const QPixmap&aIcon); 98 void setEyePixmap(const QPixmap&aIcon);
99 virtual QPixmap*pixmap()const; 99 virtual QPixmap*pixmap()const;
100 100
101protected: 101protected:
102 bool isBigIcon; 102 bool isBigIcon;
103 int iteration; 103 int iteration;
104 AppLnk* app; 104 AppLnk* app;
105 105
106private: 106private:
107 void paintAnimatedIcon( QPainter *p ); 107 void paintAnimatedIcon( QPainter *p );
108 BusyIndicatorType busyType; 108 BusyIndicatorType busyType;
109 int psize; 109 int psize;
110 bool m_EyeImage; 110 bool m_EyeImage;
111 iconstate_t m_EyeImageSet; 111 iconstate_t m_EyeImageSet;
112}; 112};
113 113
114LauncherItem::LauncherItem( QIconView *parent, AppLnk *applnk, bool bigIcon ) 114LauncherItem::LauncherItem( QIconView *parent, AppLnk *applnk, bool bigIcon )
115 : QIconViewItem( parent, applnk->name(), 115 : QIconViewItem( parent, applnk->name(),
116 bigIcon ? applnk->bigPixmap() :applnk->pixmap() ), 116 bigIcon ? applnk->bigPixmap() :applnk->pixmap() ),
117 isBigIcon( bigIcon ), 117 isBigIcon( bigIcon ),
118 iteration(0), 118 iteration(0),
119 app(applnk), // Takes ownership 119 app(applnk), // Takes ownership
120 psize( (bigIcon ? applnk->bigPixmap().width() :applnk->pixmap().width() ) ), 120 psize( (bigIcon ? applnk->bigPixmap().width() :applnk->pixmap().width() ) ),
121 m_EyeImage(false), 121 m_EyeImage(false),
122 m_EyeImageSet(BASE_ICON) 122 m_EyeImageSet(BASE_ICON)
123{ 123{
124 if (applnk->type().lower().startsWith("image/") && applnk->exec().contains("opie-eye",false)) { 124 if (applnk->type().lower().startsWith("image/") && applnk->exec().contains("opie-eye",false)) {
125 m_EyeImage = true; 125 m_EyeImage = true;
126 QMap<QString,QPixmap>::Iterator it = LauncherIconView::sm_EyeCache->find(applnk->file()); 126 QMap<QString,QPixmap>::Iterator it = LauncherIconView::sm_EyeCache->find(applnk->file());
127 if (it != LauncherIconView::sm_EyeCache->end()) { 127 if (it != LauncherIconView::sm_EyeCache->end()) {
128 m_EyeImageSet = EYE_ICON; 128 m_EyeImageSet = EYE_ICON;
129 setPixmap(*it); 129 setPixmap(*it);
130 } 130 }
131 } 131 }
132} 132}
133 133
134LauncherItem::~LauncherItem() 134LauncherItem::~LauncherItem()
135{ 135{
136 LauncherIconView* liv = (LauncherIconView*)iconView(); 136 LauncherIconView* liv = (LauncherIconView*)iconView();
137 if ( liv->busyItem() == this ) 137 if ( liv->busyItem() == this )
138 liv->setBusy(FALSE); 138 liv->setBusy(FALSE);
139 delete app; 139 delete app;
140} 140}
141 141
142QPixmap*LauncherItem::pixmap()const 142QPixmap*LauncherItem::pixmap()const
143{ 143{
144 if (m_EyeImage && m_EyeImageSet == BASE_ICON) { 144 if (m_EyeImage && m_EyeImageSet == BASE_ICON) {
145 LauncherIconView* liv = (LauncherIconView*)iconView(); 145 LauncherIconView* liv = (LauncherIconView*)iconView();
146 liv->requestEyePix(this); 146 liv->requestEyePix(this);
147 } 147 }
148 return QIconViewItem::pixmap(); 148 return QIconViewItem::pixmap();
149} 149}
150 150
151int LauncherItem::compare ( QIconViewItem * i ) const 151int LauncherItem::compare ( QIconViewItem * i ) const
152{ 152{
153 LauncherIconView* view = (LauncherIconView*)iconView(); 153 LauncherIconView* view = (LauncherIconView*)iconView();
154 return view->compare(app,((LauncherItem *)i)->appLnk()); 154 return view->compare(app,((LauncherItem *)i)->appLnk());
155} 155}
156 156
157void LauncherItem::paintItem( QPainter *p, const QColorGroup &cg ) 157void LauncherItem::paintItem( QPainter *p, const QColorGroup &cg )
158{ 158{
159 LauncherIconView* liv = (LauncherIconView*)iconView(); 159 LauncherIconView* liv = (LauncherIconView*)iconView();
160 QBrush oldBrush( liv->itemTextBackground() ); 160 QBrush oldBrush( liv->itemTextBackground() );
161 QColorGroup mycg( cg ); 161 QColorGroup mycg( cg );
162 if ( liv->currentItem() == this ) { 162 if ( liv->currentItem() == this ) {
163 liv->setItemTextBackground( cg.brush( QColorGroup::Highlight ) ); 163 liv->setItemTextBackground( cg.brush( QColorGroup::Highlight ) );
164 mycg.setColor( QColorGroup::Text, cg.color( QColorGroup::HighlightedText ) ); 164 mycg.setColor( QColorGroup::Text, cg.color( QColorGroup::HighlightedText ) );
165 } 165 }
166 166
167 QIconViewItem::paintItem(p,mycg); 167 QIconViewItem::paintItem(p,mycg);
168 168
169 // Paint animation overlay 169 // Paint animation overlay
170 if ( liv->busyItem() == this ) 170 if ( liv->busyItem() == this )
171 paintAnimatedIcon(p); 171 paintAnimatedIcon(p);
172 172
173 if ( liv->currentItem() == this ) 173 if ( liv->currentItem() == this )
174 liv->setItemTextBackground( oldBrush ); 174 liv->setItemTextBackground( oldBrush );
175} 175}
176 176
177void LauncherItem::paintAnimatedIcon( QPainter *p ) 177void LauncherItem::paintAnimatedIcon( QPainter *p )
178{ 178{
179 LauncherIconView* liv = (LauncherIconView*)iconView(); 179 LauncherIconView* liv = (LauncherIconView*)iconView();
180 int pic = iteration % 16; 180 int pic = iteration % 16;
181 int w = pixmap()->width(), h = pixmap()->height(); 181 int w = pixmap()->width(), h = pixmap()->height();
182 QPixmap dblBuf( w, h + 4 ); 182 QPixmap dblBuf( w, h + 4 );
183 QPainter p2( &dblBuf ); 183 QPainter p2( &dblBuf );
184 int x1, y1; 184 int x1, y1;
185 if ( liv->itemTextPos() == QIconView::Bottom ) { 185 if ( liv->itemTextPos() == QIconView::Bottom ) {
186 x1 = x() + (width() - w) / 2 - liv->contentsX(); 186 x1 = x() + (width() - w) / 2 - liv->contentsX();
187 y1 = y() - liv->contentsY(); 187 y1 = y() - liv->contentsY();
188 } else { 188 } else {
189 x1 = x() - liv->contentsX(); 189 x1 = x() - liv->contentsX();
190 y1 = y() + (height() - h) / 2 - liv->contentsY(); 190 y1 = y() + (height() - h) / 2 - liv->contentsY();
191 } 191 }
192 y1 -= 2; 192 y1 -= 2;
193 p2.translate(-x1,-y1); 193 p2.translate(-x1,-y1);
194 liv->drawBackground( &p2, QRect(x1,y1,w,h+4) ); 194 liv->drawBackground( &p2, QRect(x1,y1,w,h+4) );
195 int bounceY = 2; 195 int bounceY = 2;
196#ifdef BOUNCE_BUSY_ICON 196#ifdef BOUNCE_BUSY_ICON
197 if ( busyType == BIT_Animated ) { 197 if ( busyType == BIT_Animated ) {
198 bounceY = 4 - ((iteration+2)%8); 198 bounceY = 4 - ((iteration+2)%8);
199 bounceY = bounceY < 0 ? -bounceY : bounceY; 199 bounceY = bounceY < 0 ? -bounceY : bounceY;
200 } 200 }
201#endif 201#endif
202 p2.drawPixmap( x1, y1 + bounceY, *pixmap() ); 202 p2.drawPixmap( x1, y1 + bounceY, *pixmap() );
203#ifdef USE_ANIMATED_BUSY_ICON_OVERLAY 203#ifdef USE_ANIMATED_BUSY_ICON_OVERLAY
204 p2.drawPixmap( x1, y1 + bounceY, liv->busyPixmap(), w * pic, 0, w, h ); 204 p2.drawPixmap( x1, y1 + bounceY, liv->busyPixmap(), w * pic, 0, w, h );
205#else 205#else
206 Q_UNUSED( pic ) 206 Q_UNUSED( pic )
207#endif 207#endif
208 p->drawPixmap( x1, y1, dblBuf ); 208 p->drawPixmap( x1, y1, dblBuf );
209} 209}
210 210
211void LauncherItem::animateIcon() 211void LauncherItem::animateIcon()
212{ 212{
213 LauncherIconView* liv = (LauncherIconView*)iconView(); 213 LauncherIconView* liv = (LauncherIconView*)iconView();
214 214
215 if ( liv->busyItem() != this || !app ) 215 if ( liv->busyItem() != this || !app )
216 return; 216 return;
217 217
218 // Highlight the icon 218 // Highlight the icon
219 if ( iteration == 0 ) { 219 if ( iteration == 0 ) {
220 QPixmap src; 220 QPixmap src;
221 pixiter it; 221 pixiter it;
222 if (isEyeImage() && (it=LauncherIconView::sm_EyeCache->find(appLnk()->file()))!=LauncherIconView::sm_EyeCache->end()) { 222 if (isEyeImage() && (it=LauncherIconView::sm_EyeCache->find(appLnk()->file()))!=LauncherIconView::sm_EyeCache->end()) {
223 src = (*it); 223 src = (*it);
224 } else { 224 } else {
225 src = ((isBigIcon ? app->bigPixmap() : app->pixmap())); 225 src = ((isBigIcon ? app->bigPixmap() : app->pixmap()));
226 } 226 }
227 QImage img = src.convertToImage(); 227 QImage img = src.convertToImage();
228 QRgb *rgb; 228 QRgb *rgb;
229 int count; 229 int count;
230 if ( img.depth() == 32 ) { 230 if ( img.depth() == 32 ) {
231 rgb = (QRgb*)img.bits(); 231 rgb = (QRgb*)img.bits();
232 count = img.bytesPerLine()/sizeof(QRgb)*img.height(); 232 count = img.bytesPerLine()/sizeof(QRgb)*img.height();
233 } else { 233 } else {
234 rgb = img.colorTable(); 234 rgb = img.colorTable();
235 count = img.numColors(); 235 count = img.numColors();
236 } 236 }
237 for ( int r = 0; r < count; r++, rgb++ ) { 237 for ( int r = 0; r < count; r++, rgb++ ) {
238#if defined(BRIGHTEN_BUSY_ICON) 238#if defined(BRIGHTEN_BUSY_ICON)
239 QColor c(*rgb); 239 QColor c(*rgb);
240 int h, s, v; 240 int h, s, v;
241 c.hsv(&h,&s,&v); 241 c.hsv(&h,&s,&v);
242 c.setHsv(h,QMAX(s-24,0),QMIN(v+48,255)); 242 c.setHsv(h,QMAX(s-24,0),QMIN(v+48,255));
243 *rgb = qRgba(c.red(),c.green(),c.blue(),qAlpha(*rgb)); 243 *rgb = qRgba(c.red(),c.green(),c.blue(),qAlpha(*rgb));
244#elif defined(ALPHA_FADE_BUSY_ICON) 244#elif defined(ALPHA_FADE_BUSY_ICON)
245 *rgb = qRgba(qRed(*rgb),qGreen(*rgb),qBlue(*rgb),qAlpha(*rgb)/2); 245 *rgb = qRgba(qRed(*rgb),qGreen(*rgb),qBlue(*rgb),qAlpha(*rgb)/2);
246#endif 246#endif
247 } 247 }
248 src.convertFromImage( img ); 248 src.convertFromImage( img );
249 setPixmap( src ); 249 setPixmap( src );
250 } 250 }
251 251
252 iteration++; 252 iteration++;
253 253
254 // Paint animation overlay 254 // Paint animation overlay
255 QPainter p( liv->viewport() ); 255 QPainter p( liv->viewport() );
256 paintAnimatedIcon( &p ); 256 paintAnimatedIcon( &p );
257} 257}
258 258
259void LauncherItem::resetIcon() 259void LauncherItem::resetIcon()
260{ 260{
261 iteration = 0; 261 iteration = 0;
262 if (isEyeImage()) { 262 if (isEyeImage()) {
263 QMap<QString,QPixmap>::Iterator it = LauncherIconView::sm_EyeCache->find(appLnk()->file()); 263 QMap<QString,QPixmap>::Iterator it = LauncherIconView::sm_EyeCache->find(appLnk()->file());
264 if (it != LauncherIconView::sm_EyeCache->end()) { 264 if (it != LauncherIconView::sm_EyeCache->end()) {
265 setPixmap(*it); 265 setPixmap(*it);
266 return; 266 return;
267 } 267 }
268 } 268 }
269 setPixmap(isBigIcon ? app->bigPixmap() : app->pixmap()); 269 setPixmap(isBigIcon ? app->bigPixmap() : app->pixmap());
270} 270}
271 271
272void LauncherItem::setEyePixmap(const QPixmap&aIcon) 272void LauncherItem::setEyePixmap(const QPixmap&aIcon)
273{ 273{
274 if (!isEyeImage()) return; 274 if (!isEyeImage()) return;
275 setPixmap(aIcon); 275 setPixmap(aIcon);
276 m_EyeImageSet = EYE_ICON; 276 m_EyeImageSet = EYE_ICON;
277} 277}
278 278
279//=========================================================================== 279//===========================================================================
280// Implemantation of LauncherIconview start 280// Implemantation of LauncherIconview start
281//=========================================================================== 281//===========================================================================
282 282
283QMap<QString,QPixmap>* LauncherIconView::sm_EyeCache=0; 283QMap<QString,QPixmap>* LauncherIconView::sm_EyeCache=0;
284 284
285LauncherIconView::LauncherIconView( QWidget* parent, const char* name ) 285LauncherIconView::LauncherIconView( QWidget* parent, const char* name )
286 : QIconView(parent,name),tf(""),cf(0),bsy(0),busyTimer(0),bigIcns(TRUE),bgColor(white),numColumns(0) 286 : QIconView(parent,name),tf(""),cf(0),bsy(0),busyTimer(0),bigIcns(TRUE),bgColor(white),numColumns(0)
287{ 287{
288 m_EyeCallBack = 0; 288 m_EyeCallBack = 0;
289 if (!sm_EyeCache) sm_EyeCache = new QMap<QString,QPixmap>(); 289 if (!sm_EyeCache) sm_EyeCache = new QMap<QString,QPixmap>();
290 sortmeth = Name; 290 sortmeth = Name;
291 hidden.setAutoDelete(TRUE); 291 hidden.setAutoDelete(TRUE);
292 ike = FALSE; 292 ike = FALSE;
293 calculateGrid( Bottom ); 293 calculateGrid( Bottom );
294 connect(&m_eyeTimer,SIGNAL(timeout()),this,SLOT(stopEyeTimer())); 294 connect(&m_eyeTimer,SIGNAL(timeout()),this,SLOT(stopEyeTimer()));
295 Config config( "Launcher" ); 295 Config config( "Launcher" );
296 config.setGroup( "GUI" ); 296 config.setGroup( "GUI" );
297 staticBackground = config.readEntry( "StaticBackground", false ); 297 setStaticBackgroundPicture( config.readBoolEntry( "StaticBackground", true ) );
298 if ( staticBackground )
299 {
300 setStaticBackground( true );
301 verticalScrollBar()->setTracking( false );
302 }
303} 298}
304 299
305LauncherIconView::~LauncherIconView() 300LauncherIconView::~LauncherIconView()
306{ 301{
307 odebug << "LauncherIconView::~LauncherIconView()" << oendl; 302 odebug << "LauncherIconView::~LauncherIconView()" << oendl;
308#if 0 // debuggery 303#if 0 // debuggery
309 QListIterator<AppLnk> it(hidden); 304 QListIterator<AppLnk> it(hidden);
310 AppLnk* l; 305 AppLnk* l;
311 while ((l=it.current())) { 306 while ((l=it.current())) {
312 ++it; 307 ++it;
313 //odebug << "" << l << ": hidden (should remove)" << oendl; 308 //odebug << "" << l << ": hidden (should remove)" << oendl;
314 } 309 }
315#endif 310#endif
316} 311}
317 312
313void LauncherIconView::setStaticBackgroundPicture( bool enable )
314{
315 staticBackground = enable;
316 if ( staticBackground )
317 {
318 setStaticBackground( true );
319 verticalScrollBar()->setTracking( false );
320 }
321 else
322 {
323 setStaticBackground( false );
324 verticalScrollBar()->setTracking( true );
325 }
326}
327
318int LauncherIconView::compare(const AppLnk* a, const AppLnk* b) 328int LauncherIconView::compare(const AppLnk* a, const AppLnk* b)
319{ 329{
320 switch (sortmeth) { 330 switch (sortmeth) {
321 case Name: 331 case Name:
322 return a->name().lower().compare(b->name().lower()); 332 return a->name().lower().compare(b->name().lower());
323 case Date: { 333 case Date: {
324 QFileInfo fa(a->linkFileKnown() ? a->linkFile() : a->file()); 334 QFileInfo fa(a->linkFileKnown() ? a->linkFile() : a->file());
325 QFileInfo fb(b->linkFileKnown() ? b->linkFile() : b->file()); 335 QFileInfo fb(b->linkFileKnown() ? b->linkFile() : b->file());
326 return fa.lastModified().secsTo(fb.lastModified()); 336 return fa.lastModified().secsTo(fb.lastModified());
327 } 337 }
328 case Type: 338 case Type:
329 return a->type().compare(b->type()); 339 return a->type().compare(b->type());
330 } 340 }
331 return 0; 341 return 0;
332} 342}
333 343
334void LauncherIconView::setSortMethod( SortMethod m ) 344void LauncherIconView::setSortMethod( SortMethod m )
335{ 345{
336 if ( sortmeth != m ) { 346 if ( sortmeth != m ) {
337 sortmeth = m; 347 sortmeth = m;
338 sort(); 348 sort();
339 } 349 }
340} 350}
341 351
342void LauncherIconView::setCategoryFilter( int catfilter, bool resort ) 352void LauncherIconView::setCategoryFilter( int catfilter, bool resort )
343{ 353{
344 if ( catfilter == -2 ) 354 if ( catfilter == -2 )
345 cf = 0; 355 cf = 0;
346 else 356 else
347 cf = catfilter; 357 cf = catfilter;
348 hideOrShowItems(resort); 358 hideOrShowItems(resort);
349} 359}
350 360
351void LauncherIconView::setTypeFilter(const QString& typefilter, bool resort) 361void LauncherIconView::setTypeFilter(const QString& typefilter, bool resort)
352{ 362{
353 tf = QRegExp(typefilter,FALSE,TRUE); 363 tf = QRegExp(typefilter,FALSE,TRUE);
354 hideOrShowItems(resort); 364 hideOrShowItems(resort);
355} 365}
356 366
357void LauncherIconView::setItemTextPos( ItemTextPos pos ) 367void LauncherIconView::setItemTextPos( ItemTextPos pos )
358{ 368{
359 calculateGrid( pos ); 369 calculateGrid( pos );
360 QIconView::setItemTextPos( pos ); 370 QIconView::setItemTextPos( pos );
361} 371}
362 372
363void LauncherIconView::drawBackground( QPainter *p, const QRect &r ) 373void LauncherIconView::drawBackground( QPainter *p, const QRect &r )
364{ 374{
365 if ( bgPixmap.isNull() ) 375 if ( bgPixmap.isNull() )
366 { 376 {
367 p->fillRect( r, bgColor ); 377 p->fillRect( r, bgColor );
368 } 378 }
369 else 379 else
370 { 380 {
371 if ( staticBackground ) 381 if ( staticBackground )
372 { 382 {
373 p->drawPixmap( r.x(), r.y(), bgPixmap, r.x(), r.y(), r.width(), r.height() ); 383 p->drawTiledPixmap( r, bgPixmap, QPoint( r.x() % bgPixmap.width(), r.y() % bgPixmap.height() ) );
374 } 384 }
375 else 385 else
376 { 386 {
377 p->drawTiledPixmap( r, bgPixmap, QPoint( (r.x() + contentsX()) % bgPixmap.width(), 387 p->drawTiledPixmap( r, bgPixmap, QPoint( (r.x() + contentsX()) % bgPixmap.width(),
378 (r.y() + contentsY()) % bgPixmap.height() ) ); 388 (r.y() + contentsY()) % bgPixmap.height() ) );
379 } 389 }
380 } 390 }
381} 391}
382 392
383void LauncherIconView::addCatsAndMimes(AppLnk* app) 393void LauncherIconView::addCatsAndMimes(AppLnk* app)
384{ 394{
385 // QStringList c = app->categories(); 395 // QStringList c = app->categories();
386 // for (QStringList::ConstIterator cit=c.begin(); cit!=c.end(); ++cit) { 396 // for (QStringList::ConstIterator cit=c.begin(); cit!=c.end(); ++cit) {
387 // cats.replace(*cit,(void*)1); 397 // cats.replace(*cit,(void*)1);
388 // } 398 // }
389 QString maj=app->type(); 399 QString maj=app->type();
390 int sl=maj.find('/'); 400 int sl=maj.find('/');
391 if (sl>=0) { 401 if (sl>=0) {
392 QString k; 402 QString k;
393 k = maj.left(12) == "application/" ? maj : maj.left(sl); 403 k = maj.left(12) == "application/" ? maj : maj.left(sl);
394 mimes.replace(k,(void*)1); 404 mimes.replace(k,(void*)1);
395 } 405 }
396} 406}
397 407
398void LauncherIconView::setBusy(bool on) 408void LauncherIconView::setBusy(bool on)
399{ 409{
400#ifdef USE_ANIMATED_BUSY_ICON_OVERLAY 410#ifdef USE_ANIMATED_BUSY_ICON_OVERLAY
401 if ( busyPix.isNull() ) { 411 if ( busyPix.isNull() ) {
402 int size = ( bigIcns ) ? AppLnk::bigIconSize() : AppLnk::smallIconSize(); 412 int size = ( bigIcns ) ? AppLnk::bigIconSize() : AppLnk::smallIconSize();
403 busyPix.convertFromImage( Resource::loadImage( "busy" ).smoothScale( size * 16, size ) ); 413 busyPix.convertFromImage( Resource::loadImage( "busy" ).smoothScale( size * 16, size ) );
404 } 414 }
405#endif 415#endif
406 416
407 if ( on ) { 417 if ( on ) {
408 busyTimer = startTimer( 100 ); 418 busyTimer = startTimer( 100 );
409 } else { 419 } else {
410 if ( busyTimer ) { 420 if ( busyTimer ) {
411 killTimer( busyTimer ); 421 killTimer( busyTimer );
412 busyTimer = 0; 422 busyTimer = 0;
413 } 423 }
414 } 424 }
415 425
416 LauncherItem *c = on ? (LauncherItem*)currentItem() : 0; 426 LauncherItem *c = on ? (LauncherItem*)currentItem() : 0;
417 427
418 if ( bsy != c ) { 428 if ( bsy != c ) {
419 LauncherItem *oldBusy = bsy; 429 LauncherItem *oldBusy = bsy;
420 bsy = c; 430 bsy = c;
421 if ( oldBusy ) { 431 if ( oldBusy ) {
422 oldBusy->resetIcon(); 432 oldBusy->resetIcon();
423 } 433 }
424 if ( bsy ) { 434 if ( bsy ) {
425 bsy->setBusyIndicatorType( busyType ) ; 435 bsy->setBusyIndicatorType( busyType ) ;
426 bsy->animateIcon(); 436 bsy->animateIcon();
427 } 437 }
428 } 438 }
429} 439}
430 440
431void LauncherIconView::clear() 441void LauncherIconView::clear()
432{ 442{
433 mimes.clear(); 443 mimes.clear();
434 cats.clear(); 444 cats.clear();
435 QIconView::clear(); 445 QIconView::clear();
436 hidden.clear(); 446 hidden.clear();
437} 447}
438 448
439QStringList LauncherIconView::mimeTypes() const 449QStringList LauncherIconView::mimeTypes() const
440{ 450{
441 QStringList r; 451 QStringList r;
442 QDictIterator<void> it(mimes); 452 QDictIterator<void> it(mimes);
443 while (it.current()) { 453 while (it.current()) {
444 r.append(it.currentKey()); 454 r.append(it.currentKey());
445 ++it; 455 ++it;
446 } 456 }
447 r.sort(); 457 r.sort();
448 return r; 458 return r;
449} 459}
450 460
451LauncherItem*LauncherIconView::findDocItem(const QString&fname) 461LauncherItem*LauncherIconView::findDocItem(const QString&fname)
452{ 462{
453 LauncherItem* item = (LauncherItem*)firstItem(); 463 LauncherItem* item = (LauncherItem*)firstItem();
454 while (item) { 464 while (item) {
455 if (item->appLnk()->file()==fname) { 465 if (item->appLnk()->file()==fname) {
456 break; 466 break;
457 } 467 }
458 item = (LauncherItem*)item->nextItem(); 468 item = (LauncherItem*)item->nextItem();
459 } 469 }
460 return item; 470 return item;
461} 471}
462 472
463void LauncherIconView::setEyePixmap(const QPixmap&aPixmap,const QString&aFile,int width) 473void LauncherIconView::setEyePixmap(const QPixmap&aPixmap,const QString&aFile,int width)
464{ 474{
465 int s = ( bigIcns ) ? AppLnk::bigIconSize() : AppLnk::smallIconSize(); 475 int s = ( bigIcns ) ? AppLnk::bigIconSize() : AppLnk::smallIconSize();
466 if (s!=width) return; 476 if (s!=width) return;
467 LauncherItem*item = findDocItem(aFile); 477 LauncherItem*item = findDocItem(aFile);
468 if (!item||!item->isEyeImage()) return; 478 if (!item||!item->isEyeImage()) return;
469 (*sm_EyeCache)[aFile]=aPixmap; 479 (*sm_EyeCache)[aFile]=aPixmap;
470 item->setEyePixmap(aPixmap); 480 item->setEyePixmap(aPixmap);
471} 481}
472 482
473void LauncherIconView::checkCallback() 483void LauncherIconView::checkCallback()
474{ 484{
475 if (!m_EyeCallBack) { 485 if (!m_EyeCallBack) {
476 m_EyeCallBack = new LauncherThumbReceiver(); 486 m_EyeCallBack = new LauncherThumbReceiver();
477 connect(m_EyeCallBack,SIGNAL(sig_Thumbnail(const QPixmap&,const QString&,int)), 487 connect(m_EyeCallBack,SIGNAL(sig_Thumbnail(const QPixmap&,const QString&,int)),
478 this,SLOT(setEyePixmap(const QPixmap&,const QString&,int))); 488 this,SLOT(setEyePixmap(const QPixmap&,const QString&,int)));
479 } 489 }
480 m_eyeTimer.changeInterval(600000); 490 m_eyeTimer.changeInterval(600000);
481} 491}
482 492
483void LauncherIconView::addCheckItem(AppLnk* app) 493void LauncherIconView::addCheckItem(AppLnk* app)
484{ 494{
485 LauncherItem*item = new LauncherItem( this, app, bigIcns ); 495 LauncherItem*item = new LauncherItem( this, app, bigIcns );
486 if (item->isEyeImage()) { 496 if (item->isEyeImage()) {
487 checkCallback(); 497 checkCallback();
488 } 498 }
489} 499}
490 500
491void LauncherIconView::requestEyePix(const LauncherItem*item) 501void LauncherIconView::requestEyePix(const LauncherItem*item)
492{ 502{
493 if (!item) return; 503 if (!item) return;
494 if (item->isEyeImage()) { 504 if (item->isEyeImage()) {
495 checkCallback(); 505 checkCallback();
496 int s = ( bigIcns ) ? AppLnk::bigIconSize() : AppLnk::smallIconSize(); 506 int s = ( bigIcns ) ? AppLnk::bigIconSize() : AppLnk::smallIconSize();
497 m_EyeCallBack->requestThumb(item->appLnk()->file(),s,s); 507 m_EyeCallBack->requestThumb(item->appLnk()->file(),s,s);
498 } 508 }
499} 509}
500 510
501void LauncherIconView::stopEyeTimer() 511void LauncherIconView::stopEyeTimer()
502{ 512{
503 if (m_EyeCallBack) { 513 if (m_EyeCallBack) {
504 disconnect(m_EyeCallBack,SIGNAL(sig_Thumbnail(const QPixmap&,const QString&,int)), 514 disconnect(m_EyeCallBack,SIGNAL(sig_Thumbnail(const QPixmap&,const QString&,int)),
505 this,SLOT(setEyePixmap(const QPixmap&,const QString&,int))); 515 this,SLOT(setEyePixmap(const QPixmap&,const QString&,int)));
506 delete m_EyeCallBack; 516 delete m_EyeCallBack;
507 m_EyeCallBack=0; 517 m_EyeCallBack=0;
508 } 518 }
509 m_eyeTimer.stop(); 519 m_eyeTimer.stop();
510} 520}
511 521
512void LauncherIconView::updateCategoriesAndMimeTypes() 522void LauncherIconView::updateCategoriesAndMimeTypes()
513{ 523{
514 mimes.clear(); 524 mimes.clear();
515 cats.clear(); 525 cats.clear();
516 LauncherItem* item = (LauncherItem*)firstItem(); 526 LauncherItem* item = (LauncherItem*)firstItem();
517 while (item) { 527 while (item) {
518 addCatsAndMimes(item->appLnk()); 528 addCatsAndMimes(item->appLnk());
519 item = (LauncherItem*)item->nextItem(); 529 item = (LauncherItem*)item->nextItem();
520 } 530 }
521 QListIterator<AppLnk> it(hidden); 531 QListIterator<AppLnk> it(hidden);
522 AppLnk* l; 532 AppLnk* l;
523 while ((l=it.current())) { 533 while ((l=it.current())) {
524 addCatsAndMimes(l); 534 addCatsAndMimes(l);
525 ++it; 535 ++it;
526 } 536 }
527} 537}
528 538
529void LauncherIconView::hideOrShowItems(bool resort) 539void LauncherIconView::hideOrShowItems(bool resort)
530{ 540{
531 viewport()->setUpdatesEnabled( FALSE ); 541 viewport()->setUpdatesEnabled( FALSE );
532 hidden.setAutoDelete(FALSE); 542 hidden.setAutoDelete(FALSE);
533 QList<AppLnk> links=hidden; 543 QList<AppLnk> links=hidden;
534 hidden.clear(); 544 hidden.clear();
535 hidden.setAutoDelete(TRUE); 545 hidden.setAutoDelete(TRUE);
536 LauncherItem* item = (LauncherItem*)firstItem(); 546 LauncherItem* item = (LauncherItem*)firstItem();
537 while (item) { 547 while (item) {
538 links.append(item->takeAppLnk()); 548 links.append(item->takeAppLnk());
539 item = (LauncherItem*)item->nextItem(); 549 item = (LauncherItem*)item->nextItem();
540 } 550 }
541 clear(); 551 clear();
542 QListIterator<AppLnk> it(links); 552 QListIterator<AppLnk> it(links);
543 AppLnk* l; 553 AppLnk* l;
544 while ((l=it.current())) { 554 while ((l=it.current())) {
545 addItem(l,FALSE); 555 addItem(l,FALSE);
546 ++it; 556 ++it;
547 } 557 }
548 if ( resort && !autoArrange() ) 558 if ( resort && !autoArrange() )
549 sort(); 559 sort();
550 viewport()->setUpdatesEnabled( TRUE ); 560 viewport()->setUpdatesEnabled( TRUE );
551} 561}
552 562
553bool LauncherIconView::removeLink(const QString& linkfile,bool removeCache) 563bool LauncherIconView::removeLink(const QString& linkfile,bool removeCache)
554{ 564{
555 LauncherItem* item = (LauncherItem*)firstItem(); 565 LauncherItem* item = (LauncherItem*)firstItem();
556 AppLnk* l; 566 AppLnk* l;
557 bool did = FALSE; 567 bool did = FALSE;
558 DocLnk dl(linkfile); 568 DocLnk dl(linkfile);
559 while (item) { 569 while (item) {
560 l = item->appLnk(); 570 l = item->appLnk();
561 LauncherItem *nextItem = (LauncherItem *)item->nextItem(); 571 LauncherItem *nextItem = (LauncherItem *)item->nextItem();
562 if ( l->linkFileKnown() && l->linkFile() == linkfile || l->fileKnown() && 572 if ( l->linkFileKnown() && l->linkFile() == linkfile || l->fileKnown() &&
563 ( l->file() == linkfile || dl.isValid() && dl.file() == l->file() ) ) { 573 ( l->file() == linkfile || dl.isValid() && dl.file() == l->file() ) ) {
564 if (removeCache) sm_EyeCache->remove(l->file()); 574 if (removeCache) sm_EyeCache->remove(l->file());
565 delete item; 575 delete item;
566 did = TRUE; 576 did = TRUE;
567 } 577 }
568 item = nextItem; 578 item = nextItem;
569 } 579 }
570 QListIterator<AppLnk> it(hidden); 580 QListIterator<AppLnk> it(hidden);
571 while ((l=it.current())) { 581 while ((l=it.current())) {
572 ++it; 582 ++it;
573 if ( l->linkFileKnown() && l->linkFile() == linkfile 583 if ( l->linkFileKnown() && l->linkFile() == linkfile
574 || l->file() == linkfile 584 || l->file() == linkfile
575 || dl.isValid() && dl.file() == l->file() ) { 585 || dl.isValid() && dl.file() == l->file() ) {
576 hidden.removeRef(l); 586 hidden.removeRef(l);
577 did = TRUE; 587 did = TRUE;
578 } 588 }
579 } 589 }
580 return did; 590 return did;
581} 591}
582 592
583void LauncherIconView::addItem(AppLnk* app, bool resort) 593void LauncherIconView::addItem(AppLnk* app, bool resort)
584{ 594{
585 addCatsAndMimes(app); 595 addCatsAndMimes(app);
586 if ( (tf.isEmpty() || tf.match(app->type()) >= 0) 596 if ( (tf.isEmpty() || tf.match(app->type()) >= 0)
587 && (cf == 0 || app->categories().contains(cf) 597 && (cf == 0 || app->categories().contains(cf)
588 || cf == -1 && app->categories().count() == 0 ) ) { 598 || cf == -1 && app->categories().count() == 0 ) ) {
589 addCheckItem(app); 599 addCheckItem(app);
590 } else { 600 } else {
591 hidden.append(app); 601 hidden.append(app);
592 } 602 }
593 if ( resort ){ 603 if ( resort ){
594 sort(); 604 sort();
595 } 605 }
596} 606}
597 607
598void LauncherIconView::changeItem(const AppLnk&old,AppLnk*nlink) 608void LauncherIconView::changeItem(const AppLnk&old,AppLnk*nlink)
599{ 609{
600 QString oldfile = old.file(); 610 QString oldfile = old.file();
601 QString newfile = nlink->file(); 611 QString newfile = nlink->file();
602 612
603 if (newfile != oldfile) { 613 if (newfile != oldfile) {
604 QMap<QString,QPixmap>::Iterator it = sm_EyeCache->find(oldfile); 614 QMap<QString,QPixmap>::Iterator it = sm_EyeCache->find(oldfile);
605 if (it != sm_EyeCache->end()) { 615 if (it != sm_EyeCache->end()) {
606 (*sm_EyeCache)[newfile]=(*it); 616 (*sm_EyeCache)[newfile]=(*it);
607 } 617 }
608 removeLink(old.linkFile()); 618 removeLink(old.linkFile());
609 } else { 619 } else {
610 removeLink(old.linkFile(),false); 620 removeLink(old.linkFile(),false);
611 } 621 }
612 addItem(nlink,false); 622 addItem(nlink,false);
613} 623}
614 624
615void LauncherIconView::timerEvent( QTimerEvent *te ) 625void LauncherIconView::timerEvent( QTimerEvent *te )
616{ 626{
617 if ( te->timerId() == busyTimer ) { 627 if ( te->timerId() == busyTimer ) {
618 if ( bsy ) 628 if ( bsy )
619 bsy->animateIcon(); 629 bsy->animateIcon();
620 } else { 630 } else {
621 QIconView::timerEvent( te ); 631 QIconView::timerEvent( te );
622 } 632 }
623} 633}
624 634
625void LauncherIconView::setBigIcons( bool bi ) 635void LauncherIconView::setBigIcons( bool bi )
626{ 636{
627 sm_EyeCache->clear(); 637 sm_EyeCache->clear();
628 bigIcns = bi; 638 bigIcns = bi;
629#ifdef USE_ANIMATED_BUSY_ICON_OVERLAY 639#ifdef USE_ANIMATED_BUSY_ICON_OVERLAY
630 busyPix.resize(0,0); 640 busyPix.resize(0,0);
631#endif 641#endif
632} 642}
633 643
634QIconViewItem* LauncherIconView::busyItem() const 644QIconViewItem* LauncherIconView::busyItem() const
diff --git a/core/launcher/launcherview.h b/core/launcher/launcherview.h
index 97b1dea..6a2d197 100644
--- a/core/launcher/launcherview.h
+++ b/core/launcher/launcherview.h
@@ -1,254 +1,255 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of the Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#ifndef LAUNCHERVIEW_H 20#ifndef LAUNCHERVIEW_H
21#define LAUNCHERVIEW_H 21#define LAUNCHERVIEW_H
22 22
23#include <qtopia/storage.h> 23#include <qtopia/storage.h>
24#include <qtopia/applnk.h> 24#include <qtopia/applnk.h>
25 25
26#include <qvbox.h> 26#include <qvbox.h>
27#include <qiconview.h> 27#include <qiconview.h>
28#include <qtimer.h> 28#include <qtimer.h>
29#include <qmap.h> 29#include <qmap.h>
30 30
31class CategorySelect; 31class CategorySelect;
32class LauncherIconView; 32class LauncherIconView;
33class LauncherItem; 33class LauncherItem;
34class QIconViewItem; 34class QIconViewItem;
35class QLabel; 35class QLabel;
36class QWidgetStack; 36class QWidgetStack;
37class MenuButton; 37class MenuButton;
38class QComboBox; 38class QComboBox;
39 39
40enum BusyIndicatorType { 40enum BusyIndicatorType {
41 BIT_Normal = 0, 41 BIT_Normal = 0,
42 BIT_Animated 42 BIT_Animated
43}; 43};
44 44
45class LauncherView : public QVBox 45class LauncherView : public QVBox
46{ 46{
47 Q_OBJECT 47 Q_OBJECT
48 48
49public: 49public:
50 LauncherView( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 50 LauncherView( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
51 ~LauncherView(); 51 ~LauncherView();
52 52
53 void hideIcons(); 53 void hideIcons();
54 54
55 bool removeLink(const QString& linkfile); 55 bool removeLink(const QString& linkfile);
56 void addItem(AppLnk* app, bool resort=TRUE); 56 void addItem(AppLnk* app, bool resort=TRUE);
57 void changeItem(const AppLnk&old,AppLnk*nlink); 57 void changeItem(const AppLnk&old,AppLnk*nlink);
58 58
59 void removeAllItems(); 59 void removeAllItems();
60 void setSortEnabled(bool); 60 void setSortEnabled(bool);
61 void setUpdatesEnabled(bool); 61 void setUpdatesEnabled(bool);
62 void sort(); 62 void sort();
63 63
64 void setToolsEnabled(bool); 64 void setToolsEnabled(bool);
65 void updateTools(); 65 void updateTools();
66 66
67 void setBusy(bool); 67 void setBusy(bool);
68 void setBusyIndicatorType( const QString& ); 68 void setBusyIndicatorType( const QString& );
69 69
70 enum ViewMode { Icon, List }; 70 enum ViewMode { Icon, List };
71 void setViewMode( ViewMode m ); 71 void setViewMode( ViewMode m );
72 ViewMode viewMode() const { return vmode; } 72 ViewMode viewMode() const { return vmode; }
73 73
74 enum BackgroundType { Ruled, SolidColor, Image }; 74 enum BackgroundType { Ruled, SolidColor, Image };
75 void setBackgroundType( BackgroundType t, const QString & ); 75 void setBackgroundType( BackgroundType t, const QString & );
76 BackgroundType backgroundType() const { return bgType; } 76 BackgroundType backgroundType() const { return bgType; }
77 77
78 void setTextColor( const QColor & ); 78 void setTextColor( const QColor & );
79 QColor textColor() const { return textCol; } 79 QColor textColor() const { return textCol; }
80 80
81 void setViewFont( const QFont & ); 81 void setViewFont( const QFont & );
82 void clearViewFont(); 82 void clearViewFont();
83 83
84 void setColNumber( int ); 84 void setColNumber( int );
85
86 void relayout(void); 85 void relayout(void);
86 LauncherIconView* iconView() { return icons; };
87 87
88signals: 88signals:
89 void clicked( const AppLnk * ); 89 void clicked( const AppLnk * );
90 void rightPressed( AppLnk * ); 90 void rightPressed( AppLnk * );
91 91
92protected slots: 92protected slots:
93 void selectionChanged(); 93 void selectionChanged();
94 void returnPressed( QIconViewItem *item ); 94 void returnPressed( QIconViewItem *item );
95 void itemClicked( int, QIconViewItem * ); 95 void itemClicked( int, QIconViewItem * );
96 void itemPressed( int, QIconViewItem * ); 96 void itemPressed( int, QIconViewItem * );
97 void sortBy(int); 97 void sortBy(int);
98 void showType(int); 98 void showType(int);
99 void showCategory( int ); 99 void showCategory( int );
100 void resizeEvent(QResizeEvent *); 100 void resizeEvent(QResizeEvent *);
101 void flushBgCache(); 101 void flushBgCache();
102 102
103protected: 103protected:
104 void paletteChange( const QPalette & ); 104 void paletteChange( const QPalette & );
105 105
106 void fontChanged(const QFont &); 106 void fontChanged(const QFont &);
107 107
108private: 108private:
109 static bool bsy; 109 static bool bsy;
110 QWidget* tools; 110 QWidget* tools;
111 LauncherIconView* icons; 111 LauncherIconView* icons;
112 QComboBox *typemb; 112 QComboBox *typemb;
113 QStringList typelist; 113 QStringList typelist;
114 CategorySelect *catmb; 114 CategorySelect *catmb;
115 ViewMode vmode; 115 ViewMode vmode;
116 BackgroundType bgType; 116 BackgroundType bgType;
117 QString bgName; 117 QString bgName;
118 QColor textCol; 118 QColor textCol;
119 119
120 QImage loadBackgroundImage(QString &fname); 120 QImage loadBackgroundImage(QString &fname);
121 121
122}; 122};
123 123
124/* from opie-eye */ 124/* from opie-eye */
125struct PixmapInfo { 125struct PixmapInfo {
126 PixmapInfo() : width( -1 ), height( -1 ) {} 126 PixmapInfo() : width( -1 ), height( -1 ) {}
127 bool operator==( const PixmapInfo& r ) { 127 bool operator==( const PixmapInfo& r ) {
128 if ( width != r.width ) return false; 128 if ( width != r.width ) return false;
129 if ( height != r.height ) return false; 129 if ( height != r.height ) return false;
130 if ( file != r.file ) return false; 130 if ( file != r.file ) return false;
131 return true; 131 return true;
132 } 132 }
133 int width, height; 133 int width, height;
134 QString file; 134 QString file;
135 QPixmap pixmap; 135 QPixmap pixmap;
136}; 136};
137 137
138class LauncherThumbReceiver:public QObject 138class LauncherThumbReceiver:public QObject
139{ 139{
140 Q_OBJECT 140 Q_OBJECT
141 typedef QValueList<PixmapInfo> PixmapInfos; 141 typedef QValueList<PixmapInfo> PixmapInfos;
142public: 142public:
143 LauncherThumbReceiver(); 143 LauncherThumbReceiver();
144 ~LauncherThumbReceiver(); 144 ~LauncherThumbReceiver();
145 void requestThumb(const QString&file,int width,int height); 145 void requestThumb(const QString&file,int width,int height);
146 146
147public slots: 147public slots:
148 void recieve( const QCString&, const QByteArray& ); 148 void recieve( const QCString&, const QByteArray& );
149protected slots: 149protected slots:
150 virtual void sendRequest(); 150 virtual void sendRequest();
151 151
152signals: 152signals:
153 void sig_Thumbnail(const QPixmap&,const QString&,int); 153 void sig_Thumbnail(const QPixmap&,const QString&,int);
154 154
155protected: 155protected:
156 PixmapInfos m_inThumbNail; 156 PixmapInfos m_inThumbNail;
157}; 157};
158 158
159class LauncherIconView : public QIconView { 159class LauncherIconView : public QIconView {
160 Q_OBJECT 160 Q_OBJECT
161public: 161public:
162 LauncherIconView( QWidget* parent, const char* name=0 ); 162 LauncherIconView( QWidget* parent, const char* name=0 );
163 ~LauncherIconView(); 163 ~LauncherIconView();
164 QIconViewItem* busyItem() const; 164 QIconViewItem* busyItem() const;
165 165
166#ifdef USE_ANIMATED_BUSY_ICON_OVERLAY 166#ifdef USE_ANIMATED_BUSY_ICON_OVERLAY
167 QPixmap busyPixmap() const { return busyPix; } 167 QPixmap busyPixmap() const { return busyPix; }
168#endif 168#endif
169 void setBigIcons( bool bi ); 169 void setBigIcons( bool bi );
170 void updateCategoriesAndMimeTypes(); 170 void updateCategoriesAndMimeTypes();
171 void setBusyIndicatorType ( BusyIndicatorType t ); 171 void setBusyIndicatorType ( BusyIndicatorType t );
172 void setStaticBackgroundPicture( bool enable );
172 void doAutoScroll() 173 void doAutoScroll()
173 { 174 {
174 // We don't want rubberbanding (yet) 175 // We don't want rubberbanding (yet)
175 } 176 }
176 177
177 void setBusy(bool on); 178 void setBusy(bool on);
178 bool inKeyEvent() const { return ike; } 179 bool inKeyEvent() const { return ike; }
179 180
180 void addItem(AppLnk* app, bool resort=TRUE); 181 void addItem(AppLnk* app, bool resort=TRUE);
181 bool removeLink(const QString& linkfile,bool removeCache = true); 182 bool removeLink(const QString& linkfile,bool removeCache = true);
182 void changeItem(const AppLnk&old,AppLnk*nlink); 183 void changeItem(const AppLnk&old,AppLnk*nlink);
183 184
184 QStringList mimeTypes() const; 185 QStringList mimeTypes() const;
185 QStringList categories() const; 186 QStringList categories() const;
186 void clear(); 187 void clear();
187 void addCatsAndMimes(AppLnk* app); 188 void addCatsAndMimes(AppLnk* app);
188 189
189 void setBackgroundOrigin( QWidget::BackgroundOrigin ) {} 190 void setBackgroundOrigin( QWidget::BackgroundOrigin ) {}
190 191
191 void setBackgroundPixmap( const QPixmap &pm ) { 192 void setBackgroundPixmap( const QPixmap &pm ) {
192 bgPixmap = pm; 193 bgPixmap = pm;
193 } 194 }
194 195
195 void setBackgroundColor( const QColor &c ) { 196 void setBackgroundColor( const QColor &c ) {
196 bgColor = c; 197 bgColor = c;
197 } 198 }
198 199
199 void setColNumber( int ); 200 void setColNumber( int );
200 201
201 void drawBackground( QPainter *p, const QRect &r ); 202 void drawBackground( QPainter *p, const QRect &r );
202 void setItemTextPos( ItemTextPos pos ); 203 void setItemTextPos( ItemTextPos pos );
203 void hideOrShowItems(bool resort); 204 void hideOrShowItems(bool resort);
204 205
205 void setTypeFilter(const QString& typefilter, bool resort); 206 void setTypeFilter(const QString& typefilter, bool resort);
206 void setCategoryFilter( int catfilter, bool resort ); 207 void setCategoryFilter( int catfilter, bool resort );
207 208
208 enum SortMethod { Name, Date, Type }; 209 enum SortMethod { Name, Date, Type };
209 210
210 void setSortMethod( SortMethod m ); 211 void setSortMethod( SortMethod m );
211 int compare(const AppLnk* a, const AppLnk* b); 212 int compare(const AppLnk* a, const AppLnk* b);
212 void requestEyePix(const LauncherItem*which); 213 void requestEyePix(const LauncherItem*which);
213 214
214 static QMap<QString,QPixmap>* sm_EyeCache; 215 static QMap<QString,QPixmap>* sm_EyeCache;
215 216
216protected: 217protected:
217 virtual void timerEvent( QTimerEvent *te ); 218 virtual void timerEvent( QTimerEvent *te );
218 void styleChange( QStyle &old ); 219 void styleChange( QStyle &old );
219 void calculateGrid( ItemTextPos pos ); 220 void calculateGrid( ItemTextPos pos );
220 void focusInEvent( QFocusEvent * ) {} 221 void focusInEvent( QFocusEvent * ) {}
221 void focusOutEvent( QFocusEvent * ) {} 222 void focusOutEvent( QFocusEvent * ) {}
222 LauncherItem*findDocItem(const QString&); 223 LauncherItem*findDocItem(const QString&);
223 void addCheckItem(AppLnk* app); 224 void addCheckItem(AppLnk* app);
224 void checkCallback(); 225 void checkCallback();
225 virtual void keyPressEvent(QKeyEvent* e); 226 virtual void keyPressEvent(QKeyEvent* e);
226 227
227protected slots: 228protected slots:
228 void setEyePixmap(const QPixmap&,const QString&,int width); 229 void setEyePixmap(const QPixmap&,const QString&,int width);
229 void stopEyeTimer(); 230 void stopEyeTimer();
230 231
231private: 232private:
232 QList<AppLnk> hidden; 233 QList<AppLnk> hidden;
233 QDict<void> mimes; 234 QDict<void> mimes;
234 QDict<void> cats; 235 QDict<void> cats;
235 SortMethod sortmeth; 236 SortMethod sortmeth;
236 QRegExp tf; 237 QRegExp tf;
237 int cf; 238 int cf;
238 LauncherItem* bsy; 239 LauncherItem* bsy;
239 int busyTimer; 240 int busyTimer;
240 bool ike; 241 bool ike;
241 bool bigIcns; 242 bool bigIcns;
242 QPixmap bgPixmap; 243 QPixmap bgPixmap;
243 QColor bgColor; 244 QColor bgColor;
244 LauncherThumbReceiver*m_EyeCallBack; 245 LauncherThumbReceiver*m_EyeCallBack;
245#ifdef USE_ANIMATED_BUSY_ICON_OVERLAY 246#ifdef USE_ANIMATED_BUSY_ICON_OVERLAY
246 QPixmap busyPix; 247 QPixmap busyPix;
247#endif 248#endif
248 BusyIndicatorType busyType; 249 BusyIndicatorType busyType;
249 QTimer m_eyeTimer; 250 QTimer m_eyeTimer;
250 int numColumns; 251 int numColumns;
251 bool staticBackground; 252 bool staticBackground;
252}; 253};
253 254
254#endif // LAUNCHERVIEW_H 255#endif // LAUNCHERVIEW_H
diff --git a/core/settings/launcher/tabssettings.cpp b/core/settings/launcher/tabssettings.cpp
index 42f0568..fca6b20 100644
--- a/core/settings/launcher/tabssettings.cpp
+++ b/core/settings/launcher/tabssettings.cpp
@@ -1,330 +1,339 @@
1/* 1/*
2               =. This file is part of the OPIE Project 2               =. This file is part of the OPIE Project
3             .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> 3             .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org>
4           .>+-= 4           .>+-=
5 _;:,     .>    :=|. This file is free software; you can 5 _;:,     .>    :=|. This file is free software; you can
6.> <`_,   >  .   <= redistribute it and/or modify it under 6.> <`_,   >  .   <= redistribute it and/or modify it under
7:`=1 )Y*s>-.--   : the terms of the GNU General Public 7:`=1 )Y*s>-.--   : the terms of the GNU General Public
8.="- .-=="i,     .._ License as published by the Free Software 8.="- .-=="i,     .._ License as published by the Free Software
9 - .   .-<_>     .<> Foundation; either version 2 of the License, 9 - .   .-<_>     .<> Foundation; either version 2 of the License,
10     ._= =}       : or (at your option) any later version. 10     ._= =}       : or (at your option) any later version.
11    .%`+i>       _;_. 11    .%`+i>       _;_.
12    .i_,=:_.      -<s. This file is distributed in the hope that 12    .i_,=:_.      -<s. This file is distributed in the hope that
13     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 13     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
14    : ..    .:,     . . . without even the implied warranty of 14    : ..    .:,     . . . without even the implied warranty of
15    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 15    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
16  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General 16  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
17..}^=.=       =       ; Public License for more details. 17..}^=.=       =       ; Public License for more details.
18++=   -.     .`     .: 18++=   -.     .`     .:
19 :     =  ...= . :.=- You should have received a copy of the GNU 19 :     =  ...= . :.=- You should have received a copy of the GNU
20 -.   .:....=;==+<; General Public License along with this file; 20 -.   .:....=;==+<; General Public License along with this file;
21  -_. . .   )=.  = see the file COPYING. If not, write to the 21  -_. . .   )=.  = see the file COPYING. If not, write to the
22    --        :-=` Free Software Foundation, Inc., 22    --        :-=` Free Software Foundation, Inc.,
23 59 Temple Place - Suite 330, 23 59 Temple Place - Suite 330,
24 Boston, MA 02111-1307, USA. 24 Boston, MA 02111-1307, USA.
25 25
26*/ 26*/
27 27
28#include "tabssettings.h" 28#include "tabssettings.h"
29 29
30#include <qpe/resource.h> 30#include <qpe/resource.h>
31#include <qpe/applnk.h> 31#include <qpe/applnk.h>
32#include <qpe/mimetype.h> 32#include <qpe/mimetype.h>
33#include <qpe/qcopenvelope_qws.h> 33#include <qpe/qcopenvelope_qws.h>
34#include <qpe/config.h> 34#include <qpe/config.h>
35#include <qpe/qpeapplication.h> 35#include <qpe/qpeapplication.h>
36 36
37#include <qlistbox.h> 37#include <qlistbox.h>
38#include <qpushbutton.h> 38#include <qpushbutton.h>
39#include <qlayout.h> 39#include <qlayout.h>
40#include <qlabel.h> 40#include <qlabel.h>
41#include <qwhatsthis.h> 41#include <qwhatsthis.h>
42#include <qcheckbox.h> 42#include <qcheckbox.h>
43 43
44#include "tabdialog.h" 44#include "tabdialog.h"
45 45
46#include <stdlib.h> 46#include <stdlib.h>
47#include <qmessagebox.h> 47#include <qmessagebox.h>
48 48
49 49
50 #define GLOBALID ".global." 50 #define GLOBALID ".global."
51 51
52 52
53TabsSettings::TabsSettings ( QWidget *parent, const char *name ) 53TabsSettings::TabsSettings ( QWidget *parent, const char *name )
54 : QWidget ( parent, name ) 54 : QWidget ( parent, name )
55{ 55{
56 QGridLayout *lay = new QGridLayout ( this, 0, 0, 4, 4 ); 56 QGridLayout *lay = new QGridLayout ( this, 0, 0, 4, 4 );
57 57
58 QLabel *l = new QLabel ( tr( "Launcher Tabs:" ), this ); 58 QLabel *l = new QLabel ( tr( "Launcher Tabs:" ), this );
59 lay-> addMultiCellWidget ( l, 0, 0, 0, 1 ); 59 lay-> addMultiCellWidget ( l, 0, 0, 0, 1 );
60 60
61 m_list = new QListBox ( this ); 61 m_list = new QListBox ( this );
62 lay-> addMultiCellWidget ( m_list, 1, 4, 0, 0 ); 62 lay-> addMultiCellWidget ( m_list, 1, 4, 0, 0 );
63 63
64 QWhatsThis::add ( m_list, tr( "foobar" )); 64 QWhatsThis::add ( m_list, tr( "foobar" ));
65 65
66 QPushButton *p1, *p2, *p3; 66 QPushButton *p1, *p2, *p3;
67 p1 = new QPushButton ( tr( "New" ), this ); 67 p1 = new QPushButton ( tr( "New" ), this );
68 lay-> addWidget ( p1, 1, 1 ); 68 lay-> addWidget ( p1, 1, 1 );
69 connect ( p1, SIGNAL( clicked()), this, SLOT( newClicked())); 69 connect ( p1, SIGNAL( clicked()), this, SLOT( newClicked()));
70 70
71 p2 = new QPushButton ( tr( "Edit" ), this ); 71 p2 = new QPushButton ( tr( "Edit" ), this );
72 lay-> addWidget ( p2, 2, 1 ); 72 lay-> addWidget ( p2, 2, 1 );
73 connect ( p2, SIGNAL( clicked()), this, SLOT( editClicked())); 73 connect ( p2, SIGNAL( clicked()), this, SLOT( editClicked()));
74 74
75 p3 = new QPushButton ( tr( "Delete" ), this ); 75 p3 = new QPushButton ( tr( "Delete" ), this );
76 lay-> addWidget ( p3, 3, 1 ); 76 lay-> addWidget ( p3, 3, 1 );
77 connect ( p3, SIGNAL( clicked()), this, SLOT( deleteClicked())); 77 connect ( p3, SIGNAL( clicked()), this, SLOT( deleteClicked()));
78 78
79 lay-> setRowStretch ( 4, 10 ); 79 lay-> setRowStretch ( 4, 10 );
80 80
81 m_bigbusy = new QCheckBox( tr( "Enable big busy indicator" ), this ); 81 m_bigbusy = new QCheckBox( tr( "Enable big busy indicator" ), this );
82 lay-> addMultiCellWidget ( m_bigbusy, 5, 5, 0, 1 ); 82 lay-> addMultiCellWidget ( m_bigbusy, 5, 5, 0, 1 );
83 83
84 m_busyani = new QCheckBox ( tr( "Enable animated busy indicator" ), this ); 84 m_busyani = new QCheckBox ( tr( "Enable animated busy indicator" ), this );
85 lay-> addMultiCellWidget ( m_busyani, 6, 6, 0, 1 ); 85 lay-> addMultiCellWidget ( m_busyani, 6, 6, 0, 1 );
86
87 m_staticbackground = new QCheckBox( tr( "Enable static background pixmap" ), this );
88 lay->addMultiCellWidget( m_staticbackground, 7, 7, 0, 1 );
86 89
87 p1-> setEnabled ( false ); 90 p1-> setEnabled ( false );
88 p3-> setEnabled ( false ); 91 p3-> setEnabled ( false );
89 92
90 init ( ); 93 init ( );
91 94
92 QWhatsThis::add ( m_list, tr( "Select the Launcher Tab you want to edit or delete." )); 95 QWhatsThis::add ( m_list, tr( "Select the Launcher Tab you want to edit or delete." ));
93 QWhatsThis::add ( p1, tr( "Adds a new Tab to the Launcher." ) + QString ( "<center><br><i>not yet implemented</i><br>Please use the tabmanager</center>." )); 96 QWhatsThis::add ( p1, tr( "Adds a new Tab to the Launcher." ) + QString ( "<center><br><i>not yet implemented</i><br>Please use the tabmanager</center>." ));
94 QWhatsThis::add ( p2, tr( "Opens a new dialog to customize the select Tab." )); 97 QWhatsThis::add ( p2, tr( "Opens a new dialog to customize the select Tab." ));
95 QWhatsThis::add ( p3, tr( "Deletes a Tab from the Launcher." ) + QString ( "<center><br><i>not yet implemented</i><br>Please use the tabmanager</center>." )); 98 QWhatsThis::add ( p3, tr( "Deletes a Tab from the Launcher." ) + QString ( "<center><br><i>not yet implemented</i><br>Please use the tabmanager</center>." ));
96 QWhatsThis::add ( m_bigbusy, tr( "Activate this, if you want a big busy indicator in the middle of the screen instead of the one in taskbar." )); 99 QWhatsThis::add ( m_bigbusy, tr( "Activate this, if you want a big busy indicator in the middle of the screen instead of the one in taskbar." ));
97 QWhatsThis::add ( m_busyani, tr( "Activate this, if you want an animatedbusy indicator for starting applications in the Launcher." )); 100 QWhatsThis::add ( m_busyani, tr( "Activate this, if you want an animatedbusy indicator for starting applications in the Launcher." ));
101 QWhatsThis::add ( m_staticbackground, tr( "Activate this, if you want the background pixmap not to scroll with the icons." ));
98} 102}
99 103
100void TabsSettings::init ( ) 104void TabsSettings::init ( )
101{ 105{
102 AppLnkSet rootFolder( MimeType::appsFolderName ( )); 106 AppLnkSet rootFolder( MimeType::appsFolderName ( ));
103 QStringList types = rootFolder. types ( ); 107 QStringList types = rootFolder. types ( );
104 108
105 m_list-> insertItem ( tr( "All Tabs" )); 109 m_list-> insertItem ( tr( "All Tabs" ));
106 m_ids << GLOBALID; 110 m_ids << GLOBALID;
107 111
108 for ( QStringList::Iterator it = types. begin ( ); it != types. end ( ); ++it ) { 112 for ( QStringList::Iterator it = types. begin ( ); it != types. end ( ); ++it ) {
109 m_list-> insertItem ( rootFolder. typePixmap ( *it ), rootFolder. typeName ( *it )); 113 m_list-> insertItem ( rootFolder. typePixmap ( *it ), rootFolder. typeName ( *it ));
110 m_ids << *it; 114 m_ids << *it;
111 } 115 }
112 QImage img ( Resource::loadImage ( "DocsIcon" )); 116 QImage img ( Resource::loadImage ( "DocsIcon" ));
113 QPixmap pix; 117 QPixmap pix;
114 pix = img. smoothScale ( AppLnk::smallIconSize ( ), AppLnk::smallIconSize ( )); 118 pix = img. smoothScale ( AppLnk::smallIconSize ( ), AppLnk::smallIconSize ( ));
115 m_list-> insertItem ( pix, tr( "Documents" )); 119 m_list-> insertItem ( pix, tr( "Documents" ));
116 m_ids += "Documents"; // No tr 120 m_ids += "Documents"; // No tr
117 121
118 Config cfg ( "Launcher" ); 122 Config cfg ( "Launcher" );
119 123
120 readTabSettings ( cfg ); 124 readTabSettings ( cfg );
121 125
122 cfg. setGroup ( "GUI" ); 126 cfg. setGroup ( "GUI" );
123 m_busyani-> setChecked ( cfg. readEntry ( "BusyType" ). lower ( ) == "animated" ); 127 m_busyani-> setChecked ( cfg. readEntry ( "BusyType" ). lower ( ) == "animated" );
124 m_bigbusy->setChecked( cfg. readBoolEntry ( "BigBusy" ) ); 128 m_bigbusy->setChecked( cfg. readBoolEntry ( "BigBusy" ) );
129 m_staticbackground->setChecked( cfg.readBoolEntry( "StaticBackground", true ) );
125} 130}
126 131
127 132
128void TabsSettings::readTabSettings ( Config &cfg ) 133void TabsSettings::readTabSettings ( Config &cfg )
129{ 134{
130 QString grp ( "Tab %1" ); // No tr 135 QString grp ( "Tab %1" ); // No tr
131 m_tabs. clear ( ); 136 m_tabs. clear ( );
132 137
133 TabConfig global_def; 138 TabConfig global_def;
134 global_def. m_view = TabConfig::Icon; 139 global_def. m_view = TabConfig::Icon;
135 global_def. m_bg_type = TabConfig::Ruled; 140 global_def. m_bg_type = TabConfig::Ruled;
136 global_def. m_bg_image = "launcher/opie-background"; 141 global_def. m_bg_image = "launcher/opie-background";
137 global_def. m_bg_color = colorGroup ( ). color ( QColorGroup::Base ). name ( ); 142 global_def. m_bg_color = colorGroup ( ). color ( QColorGroup::Base ). name ( );
138 global_def. m_iconcolumns = 0; // automatic 143 global_def. m_iconcolumns = 0; // automatic
139 global_def. m_text_color = colorGroup ( ). color ( QColorGroup::Text ). name ( ); 144 global_def. m_text_color = colorGroup ( ). color ( QColorGroup::Text ). name ( );
140 global_def. m_font_use = false; 145 global_def. m_font_use = false;
141 global_def. m_font_family = font ( ). family ( ); 146 global_def. m_font_family = font ( ). family ( );
142 global_def. m_font_size = font ( ). pointSize ( ); 147 global_def. m_font_size = font ( ). pointSize ( );
143 global_def. m_font_weight = 50; 148 global_def. m_font_weight = 50;
144 global_def. m_font_italic = false; 149 global_def. m_font_italic = false;
145 global_def. m_changed = false; 150 global_def. m_changed = false;
146 151
147 Config cfg2 = Config( "Launchersettings" ); 152 Config cfg2 = Config( "Launchersettings" );
148 153
149 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { 154 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) {
150 TabConfig tc = ( it != m_ids. begin ( )) ? m_tabs [GLOBALID] : global_def; 155 TabConfig tc = ( it != m_ids. begin ( )) ? m_tabs [GLOBALID] : global_def;
151 156
152 cfg. setGroup ( grp. arg ( *it )); 157 cfg. setGroup ( grp. arg ( *it ));
153 cfg2. setGroup( grp. arg ( *it )); 158 cfg2. setGroup( grp. arg ( *it ));
154 159
155 QString view = cfg. readEntry ( "View" ); 160 QString view = cfg. readEntry ( "View" );
156 if ( view == "Icon" ) // No tr 161 if ( view == "Icon" ) // No tr
157 tc. m_view = TabConfig::Icon; 162 tc. m_view = TabConfig::Icon;
158 if ( view == "List" ) // No tr 163 if ( view == "List" ) // No tr
159 tc. m_view = TabConfig::List; 164 tc. m_view = TabConfig::List;
160 165
161 QString bgType = cfg. readEntry ( "BackgroundType" ); 166 QString bgType = cfg. readEntry ( "BackgroundType" );
162 if ( bgType == "Image" ) 167 if ( bgType == "Image" )
163 tc. m_bg_type = TabConfig::Image; 168 tc. m_bg_type = TabConfig::Image;
164 else if ( bgType == "SolidColor" ) 169 else if ( bgType == "SolidColor" )
165 tc. m_bg_type = TabConfig::SolidColor; 170 tc. m_bg_type = TabConfig::SolidColor;
166 else if ( bgType == "Image" ) // No tr 171 else if ( bgType == "Image" ) // No tr
167 tc. m_bg_type = TabConfig::Image; 172 tc. m_bg_type = TabConfig::Image;
168 173
169 tc. m_bg_image = cfg. readEntry ( "BackgroundImage", tc. m_bg_image ); 174 tc. m_bg_image = cfg. readEntry ( "BackgroundImage", tc. m_bg_image );
170 tc. m_last_directory = cfg2.readEntry( "DefaultDir", "" ); 175 tc. m_last_directory = cfg2.readEntry( "DefaultDir", "" );
171 tc. m_bg_color = cfg. readEntry ( "BackgroundColor", tc. m_bg_color ); 176 tc. m_bg_color = cfg. readEntry ( "BackgroundColor", tc. m_bg_color );
172 tc. m_iconcolumns = cfg. readNumEntry ( "Columns", tc. m_iconcolumns ); 177 tc. m_iconcolumns = cfg. readNumEntry ( "Columns", tc. m_iconcolumns );
173 qDebug( "m_iconcolumns for %s = %d", (const char*) *it, tc.m_iconcolumns ); 178 qDebug( "m_iconcolumns for %s = %d", (const char*) *it, tc.m_iconcolumns );
174 tc. m_text_color = cfg. readEntry ( "TextColor", tc. m_text_color ); 179 tc. m_text_color = cfg. readEntry ( "TextColor", tc. m_text_color );
175 QStringList f = cfg. readListEntry ( "Font", ',' ); 180 QStringList f = cfg. readListEntry ( "Font", ',' );
176 if ( f. count ( ) == 4 ) { 181 if ( f. count ( ) == 4 ) {
177 tc. m_font_use = true; 182 tc. m_font_use = true;
178 tc. m_font_family = f [0]; 183 tc. m_font_family = f [0];
179 tc. m_font_size = f [1]. toInt ( ); 184 tc. m_font_size = f [1]. toInt ( );
180 tc. m_font_weight = f [2]. toInt ( ); 185 tc. m_font_weight = f [2]. toInt ( );
181 tc. m_font_italic = ( f [3]. toInt ( )); 186 tc. m_font_italic = ( f [3]. toInt ( ));
182 } 187 }
183 m_tabs [*it] = tc; 188 m_tabs [*it] = tc;
184 } 189 }
185 190
186 // if all tabs have the same config, then initialize the GLOBALID tab to these values 191 // if all tabs have the same config, then initialize the GLOBALID tab to these values
187 192
188 TabConfig *first = 0; 193 TabConfig *first = 0;
189 bool same = true; 194 bool same = true;
190 195
191 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { 196 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) {
192 if ( *it == GLOBALID ) 197 if ( *it == GLOBALID )
193 continue; 198 continue;
194 else if ( !first ) 199 else if ( !first )
195 first = &m_tabs [*it]; 200 first = &m_tabs [*it];
196 else 201 else
197 same &= ( *first == m_tabs [*it] ); 202 same &= ( *first == m_tabs [*it] );
198 } 203 }
199 if ( same ) { 204 if ( same ) {
200 m_tabs [GLOBALID] = *first; 205 m_tabs [GLOBALID] = *first;
201 m_tabs [GLOBALID]. m_changed = true; 206 m_tabs [GLOBALID]. m_changed = true;
202 } 207 }
203} 208}
204 209
205 210
206void TabsSettings::accept ( ) 211void TabsSettings::accept ( )
207{ 212{
208 Config cfg ( "Launcher" ); 213 Config cfg ( "Launcher" );
209 Config cfg2 ( "Launchersettings" ); 214 Config cfg2 ( "Launchersettings" );
210 215
211 // Launcher Tab 216 // Launcher Tab
212 QString grp ( "Tab %1" ); // No tr 217 QString grp ( "Tab %1" ); // No tr
213 218
214 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { 219 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) {
215 TabConfig &tc = m_tabs [*it]; 220 TabConfig &tc = m_tabs [*it];
216 221
217 if ( !tc. m_changed ) 222 if ( !tc. m_changed )
218 continue; 223 continue;
219 224
220 cfg. setGroup ( grp. arg ( *it )); 225 cfg. setGroup ( grp. arg ( *it ));
221 cfg2. setGroup ( grp. arg ( *it )); 226 cfg2. setGroup ( grp. arg ( *it ));
222 switch ( tc. m_view ) { 227 switch ( tc. m_view ) {
223 case TabConfig::Icon: 228 case TabConfig::Icon:
224 cfg.writeEntry ( "View", "Icon" ); 229 cfg.writeEntry ( "View", "Icon" );
225 break; 230 break;
226 case TabConfig::List: 231 case TabConfig::List:
227 cfg.writeEntry ( "View", "List" ); 232 cfg.writeEntry ( "View", "List" );
228 break; 233 break;
229 } 234 }
230 235
231 QCopEnvelope e ( "QPE/Launcher", "setTabView(QString,int)" ); 236 QCopEnvelope e ( "QPE/Launcher", "setTabView(QString,int)" );
232 e << *it << tc. m_view; 237 e << *it << tc. m_view;
233 238
234 cfg. writeEntry ( "BackgroundImage", tc. m_bg_image ); 239 cfg. writeEntry ( "BackgroundImage", tc. m_bg_image );
235 cfg. writeEntry ( "BackgroundColor", tc. m_bg_color ); 240 cfg. writeEntry ( "BackgroundColor", tc. m_bg_color );
236 cfg. writeEntry ( "Columns", tc. m_iconcolumns ); 241 cfg. writeEntry ( "Columns", tc. m_iconcolumns );
237 cfg. writeEntry ( "TextColor", tc. m_text_color ); 242 cfg. writeEntry ( "TextColor", tc. m_text_color );
238 cfg2. writeEntry ( "DefaultDir", tc.m_last_directory ); 243 cfg2. writeEntry ( "DefaultDir", tc.m_last_directory );
239 244
240 if ( tc. m_font_use ) { 245 if ( tc. m_font_use ) {
241 QString f = tc. m_font_family + "," + QString::number ( tc. m_font_size ) + "," + QString::number ( tc. m_font_weight ) + "," + ( tc. m_font_italic ? "1" : "0" ); 246 QString f = tc. m_font_family + "," + QString::number ( tc. m_font_size ) + "," + QString::number ( tc. m_font_weight ) + "," + ( tc. m_font_italic ? "1" : "0" );
242 cfg. writeEntry ( "Font", f ); 247 cfg. writeEntry ( "Font", f );
243 } 248 }
244 else 249 else
245 cfg. removeEntry ( "Font" ); 250 cfg. removeEntry ( "Font" );
246 251
247 QCopEnvelope be ( "QPE/Launcher", "setTabBackground(QString,int,QString)" ); 252 QCopEnvelope be ( "QPE/Launcher", "setTabBackground(QString,int,QString)" );
248 253
249 switch ( tc. m_bg_type ) { 254 switch ( tc. m_bg_type ) {
250 case TabConfig::Ruled: 255 case TabConfig::Ruled:
251 cfg.writeEntry( "BackgroundType", "Ruled" ); 256 cfg.writeEntry( "BackgroundType", "Ruled" );
252 be << *it << tc. m_bg_type << QString(""); 257 be << *it << tc. m_bg_type << QString("");
253 break; 258 break;
254 case TabConfig::SolidColor: 259 case TabConfig::SolidColor:
255 cfg.writeEntry( "BackgroundType", "SolidColor" ); 260 cfg.writeEntry( "BackgroundType", "SolidColor" );
256 be << *it << tc. m_bg_type << tc. m_bg_color; 261 be << *it << tc. m_bg_type << tc. m_bg_color;
257 break; 262 break;
258 case TabConfig::Image: 263 case TabConfig::Image:
259 cfg.writeEntry( "BackgroundType", "Image" ); 264 cfg.writeEntry( "BackgroundType", "Image" );
260 be << *it << tc. m_bg_type << tc. m_bg_image; 265 be << *it << tc. m_bg_type << tc. m_bg_image;
261 break; 266 break;
262 } 267 }
263 268
264 QCopEnvelope te( "QPE/Launcher", "setTextColor(QString,QString)" ); 269 QCopEnvelope te( "QPE/Launcher", "setTextColor(QString,QString)" );
265 te << *it << tc. m_text_color; 270 te << *it << tc. m_text_color;
266 271
267 QCopEnvelope ic( "QPE/Launcher", "setIconColumns(QString,int)" ); 272 QCopEnvelope ic( "QPE/Launcher", "setIconColumns(QString,int)" );
268 ic << *it << tc. m_iconcolumns; 273 ic << *it << tc. m_iconcolumns;
269 274
270 QCopEnvelope fe ( "QPE/Launcher", "setFont(QString,QString,int,int,int)" ); 275 QCopEnvelope fe ( "QPE/Launcher", "setFont(QString,QString,int,int,int)" );
271 fe << *it; 276 fe << *it;
272 fe << ( tc. m_font_use ? tc. m_font_family : QString::null ); 277 fe << ( tc. m_font_use ? tc. m_font_family : QString::null );
273 fe << tc. m_font_size; 278 fe << tc. m_font_size;
274 fe << tc. m_font_weight; 279 fe << tc. m_font_weight;
275 fe << ( tc. m_font_italic ? 1 : 0 ); 280 fe << ( tc. m_font_italic ? 1 : 0 );
276 281
277 tc. m_changed = false; 282 tc. m_changed = false;
278 } 283 }
279 cfg. setGroup ( "GUI" ); 284 cfg. setGroup ( "GUI" );
280 QString busytype = QString ( m_busyani-> isChecked ( ) ? "Animated" : "" ); 285 QString busytype = QString ( m_busyani-> isChecked ( ) ? "Animated" : "" );
281 cfg. writeEntry ( "BusyType", busytype ); 286 cfg. writeEntry ( "BusyType", busytype );
282 287 cfg. writeEntry ( "BigBusy", m_bigbusy->isChecked( ) );
283 cfg. writeEntry ( "BigBusy", m_bigbusy->isChecked( ) ); 288 cfg. writeEntry ( "StaticBackground", m_staticbackground->isChecked( ) );
284 289
285 { 290 {
286 QCopEnvelope e ( "QPE/Launcher", "setBusyIndicatorType(QString)" ); 291 QCopEnvelope e ( "QPE/Launcher", "setBusyIndicatorType(QString)" );
287 e << busytype; 292 e << busytype;
288 } 293 }
294 {
295 QCopEnvelope e ( "QPE/Launcher", "setStaticBackground(bool)" );
296 e << m_staticbackground->isChecked();
297 }
289} 298}
290 299
291void TabsSettings::newClicked ( ) 300void TabsSettings::newClicked ( )
292{ 301{
293 QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" )); 302 QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" ));
294} 303}
295 304
296void TabsSettings::deleteClicked ( ) 305void TabsSettings::deleteClicked ( )
297{ 306{
298 int ind = m_list-> currentItem ( ); 307 int ind = m_list-> currentItem ( );
299 308
300 if ( ind < 0 ) 309 if ( ind < 0 )
301 return; 310 return;
302 311
303 QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" )); 312 QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" ));
304} 313}
305 314
306void TabsSettings::editClicked ( ) 315void TabsSettings::editClicked ( )
307{ 316{
308 int ind = m_list-> currentItem ( ); 317 int ind = m_list-> currentItem ( );
309 318
310 if ( ind < 0 ) 319 if ( ind < 0 )
311 return; 320 return;
312 321
313 TabConfig tc = m_tabs [m_ids [ind]]; 322 TabConfig tc = m_tabs [m_ids [ind]];
314 323
315 TabDialog *d = new TabDialog ( m_list-> pixmap ( ind ), m_list-> text ( ind ), tc, this, "TabDialog", true ); 324 TabDialog *d = new TabDialog ( m_list-> pixmap ( ind ), m_list-> text ( ind ), tc, this, "TabDialog", true );
316 325
317 if ( QPEApplication::execDialog( d ) == QDialog::Accepted ) { 326 if ( QPEApplication::execDialog( d ) == QDialog::Accepted ) {
318 tc. m_changed = true; 327 tc. m_changed = true;
319 m_tabs [m_ids [ind]] = tc; 328 m_tabs [m_ids [ind]] = tc;
320 329
321 if ( m_ids [ind] == GLOBALID ) { 330 if ( m_ids [ind] == GLOBALID ) {
322 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { 331 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) {
323 if ( *it != GLOBALID ) 332 if ( *it != GLOBALID )
324 m_tabs [*it] = tc; 333 m_tabs [*it] = tc;
325 } 334 }
326 } 335 }
327 } 336 }
328 337
329 delete d; 338 delete d;
330} 339}
diff --git a/core/settings/launcher/tabssettings.h b/core/settings/launcher/tabssettings.h
index 600c65c..bbe1e72 100644
--- a/core/settings/launcher/tabssettings.h
+++ b/core/settings/launcher/tabssettings.h
@@ -1,68 +1,68 @@
1/* 1/*
2               =. This file is part of the OPIE Project 2               =. This file is part of the OPIE Project
3             .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> 3             .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org>
4           .>+-= 4           .>+-=
5 _;:,     .>    :=|. This file is free software; you can 5 _;:,     .>    :=|. This file is free software; you can
6.> <`_,   >  .   <= redistribute it and/or modify it under 6.> <`_,   >  .   <= redistribute it and/or modify it under
7:`=1 )Y*s>-.--   : the terms of the GNU General Public 7:`=1 )Y*s>-.--   : the terms of the GNU General Public
8.="- .-=="i,     .._ License as published by the Free Software 8.="- .-=="i,     .._ License as published by the Free Software
9 - .   .-<_>     .<> Foundation; either version 2 of the License, 9 - .   .-<_>     .<> Foundation; either version 2 of the License,
10     ._= =}       : or (at your option) any later version. 10     ._= =}       : or (at your option) any later version.
11    .%`+i>       _;_. 11    .%`+i>       _;_.
12    .i_,=:_.      -<s. This file is distributed in the hope that 12    .i_,=:_.      -<s. This file is distributed in the hope that
13     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 13     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
14    : ..    .:,     . . . without even the implied warranty of 14    : ..    .:,     . . . without even the implied warranty of
15    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 15    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
16  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General 16  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
17..}^=.=       =       ; Public License for more details. 17..}^=.=       =       ; Public License for more details.
18++=   -.     .`     .: 18++=   -.     .`     .:
19 :     =  ...= . :.=- You should have received a copy of the GNU 19 :     =  ...= . :.=- You should have received a copy of the GNU
20 -.   .:....=;==+<; General Public License along with this file; 20 -.   .:....=;==+<; General Public License along with this file;
21  -_. . .   )=.  = see the file COPYING. If not, write to the 21  -_. . .   )=.  = see the file COPYING. If not, write to the
22    --        :-=` Free Software Foundation, Inc., 22    --        :-=` Free Software Foundation, Inc.,
23 59 Temple Place - Suite 330, 23 59 Temple Place - Suite 330,
24 Boston, MA 02111-1307, USA. 24 Boston, MA 02111-1307, USA.
25 25
26*/ 26*/
27#ifndef __TABS_SETTINGS_H__ 27#ifndef __TABS_SETTINGS_H__
28#define __TABS_SETTINGS_H__ 28#define __TABS_SETTINGS_H__
29 29
30#include <qwidget.h> 30#include <qwidget.h>
31#include <qmap.h> 31#include <qmap.h>
32 32
33#include "tabconfig.h" 33#include "tabconfig.h"
34 34
35class QListBox; 35class QListBox;
36class QCheckBox; 36class QCheckBox;
37class Config; 37class Config;
38 38
39 39
40class TabsSettings : public QWidget { 40class TabsSettings : public QWidget {
41 Q_OBJECT 41 Q_OBJECT
42 42
43public: 43public:
44 TabsSettings ( QWidget *parent = 0, const char *name = 0 ); 44 TabsSettings ( QWidget *parent = 0, const char *name = 0 );
45 45
46 void accept ( ); 46 void accept ( );
47 47
48protected slots: 48protected slots:
49 void newClicked ( ); 49 void newClicked ( );
50 void deleteClicked ( ); 50 void deleteClicked ( );
51 void editClicked ( ); 51 void editClicked ( );
52 52
53protected: 53protected:
54 void init ( ); 54 void init ( );
55 void readTabSettings ( Config & ); 55 void readTabSettings ( Config & );
56 56
57private: 57private:
58 QListBox *m_list; 58 QListBox *m_list;
59 //QString currentTab; 59 //QString currentTab;
60 QStringList m_ids; 60 QStringList m_ids;
61 QMap <QString, TabConfig> m_tabs; 61 QMap <QString, TabConfig> m_tabs;
62 QCheckBox *m_busyani, *m_bigbusy; 62 QCheckBox *m_busyani, *m_bigbusy, *m_staticbackground;
63}; 63};
64 64
65 65
66 66
67 67
68#endif 68#endif