summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2005-01-11 16:46:50 (UTC)
committer mickeyl <mickeyl>2005-01-11 16:46:50 (UTC)
commitf82173157bdba4fa99afde9cc999bfe9b511ce07 (patch) (unidiff)
tree5285a7aef75f2acf78c40d8a992193d029c55446
parent0619c844b8a3054c6d6e480ba1c90e3f42e63873 (diff)
downloadopie-f82173157bdba4fa99afde9cc999bfe9b511ce07.zip
opie-f82173157bdba4fa99afde9cc999bfe9b511ce07.tar.gz
opie-f82173157bdba4fa99afde9cc999bfe9b511ce07.tar.bz2
number of icon columns now also customizable through LauncherSettings
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--ChangeLog1
-rw-r--r--core/settings/launcher/tabconfig.h1
-rw-r--r--core/settings/launcher/tabdialog.cpp14
-rw-r--r--core/settings/launcher/tabdialog.h16
-rw-r--r--core/settings/launcher/tabssettings.cpp3
5 files changed, 26 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index fdaaa25..9b31725 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,186 +1,187 @@
1 2005-??-??Opie 1.2.0 1 2005-??-??Opie 1.2.0
2 2
3 New Features 3 New Features
4 ------------ 4 ------------
5 * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl) 5 * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl)
6 * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl)
6 7
7 Fixed Bugs 8 Fixed Bugs
8 ---------- 9 ----------
9 * #1501 - Fixed bug in todo sql backend (eilers) 10 * #1501 - Fixed bug in todo sql backend (eilers)
10 * n.a - Removed hard coded font sizes in a couple of inputmethods (mickeyl) 11 * n.a - Removed hard coded font sizes in a couple of inputmethods (mickeyl)
11 12
12 Internal 13 Internal
13 -------- 14 --------
14 * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl) 15 * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl)
15 16
16 2004-11-26Opie 1.1.8 17 2004-11-26Opie 1.1.8
17 18
18 New Features 19 New Features
19 ------------ 20 ------------
20 * PackageManager supports installation of local ipkg files (drw) 21 * PackageManager supports installation of local ipkg files (drw)
21 * PackageManager supports linking of applications to root (drw) 22 * PackageManager supports linking of applications to root (drw)
22 * PackageManager supports src/gz feeds (drw,wimpie) 23 * PackageManager supports src/gz feeds (drw,wimpie)
23 * Added a syslog information tab to sysinfo (mickeyl) 24 * Added a syslog information tab to sysinfo (mickeyl)
24 * Added new, more consistent, PIM icons + a GIMP teplate (ar) 25 * Added new, more consistent, PIM icons + a GIMP teplate (ar)
25 26
26 Fixed Bugs 27 Fixed Bugs
27 ---------- 28 ----------
28 * #1017 - Tetrix doesn't display correctly for high resolution screens (drw) 29 * #1017 - Tetrix doesn't display correctly for high resolution screens (drw)
29 * #1269 - VCards were imported into personal area if it was activated (eilers) 30 * #1269 - VCards were imported into personal area if it was activated (eilers)
30 * #1464 - Packagemanager dont set active filter after install a package (drw) 31 * #1464 - Packagemanager dont set active filter after install a package (drw)
31 * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers) 32 * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers)
32 * #1493 - Fixed one column layout bug of the launcher (hrw) 33 * #1493 - Fixed one column layout bug of the launcher (hrw)
33 * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw) 34 * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw)
34 * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw) 35 * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw)
35 * n.a. - Battery Applet - fix sizing of battery info popup (drw,mickeyl) 36 * n.a. - Battery Applet - fix sizing of battery info popup (drw,mickeyl)
36 37
37 Internal 38 Internal
38 -------- 39 --------
39 * Moved libopie1 to unsupported (mickeyl) 40 * Moved libopie1 to unsupported (mickeyl)
40 * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers) 41 * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers)
41 * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers) 42 * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers)
42 43
43 2004-11-14Opie 1.1.7 44 2004-11-14Opie 1.1.7
44 45
45 New Features 46 New Features
46 ------------ 47 ------------
47 * libOpieDB now uses SQLite V3 instead V2. Remember to upgrade your database files! (eilers) 48 * libOpieDB now uses SQLite V3 instead V2. Remember to upgrade your database files! (eilers)
48 * Backup now uses the busy indicator when backing up and restore (ar) 49 * Backup now uses the busy indicator when backing up and restore (ar)
49 * OpiePlayer2 gained adding of Directories to the playlist (zecke) 50 * OpiePlayer2 gained adding of Directories to the playlist (zecke)
50 * OpiePlayer2 better error handling (zecke) 51 * OpiePlayer2 better error handling (zecke)
51 * OpiePlayer2 progress indication while streaming (zecke) 52 * OpiePlayer2 progress indication while streaming (zecke)
52 * OpiePlayer2 ported to use libxine 1.0.0-rc6a (brad,zecke) 53 * OpiePlayer2 ported to use libxine 1.0.0-rc6a (brad,zecke)
53 * Ported brightnessapplet from Qtopia 1.7 (mickeyl) 54 * Ported brightnessapplet from Qtopia 1.7 (mickeyl)
54 * Opie-Eye got a Digital Camera File Backend (alwin,zecke) 55 * Opie-Eye got a Digital Camera File Backend (alwin,zecke)
55 * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke) 56 * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke)
56 * Opie-Console use Custom Font and Size in a Profile (harlekin) 57 * Opie-Console use Custom Font and Size in a Profile (harlekin)
57 * Opie-Console transparently log the Output and Input to a file (harlekin) 58 * Opie-Console transparently log the Output and Input to a file (harlekin)
58 * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem) 59 * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem)
59 * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem) 60 * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem)
60 * Opie-Security gained a 'test authentication' button (clem) 61 * Opie-Security gained a 'test authentication' button (clem)
61 * Opie-Eye got a more unique layout (menubar), a slideshow, user can setup some defaults 62 * Opie-Eye got a more unique layout (menubar), a slideshow, user can setup some defaults
62 * Opie-Mail improve the handling of POP mail boxes (alwin) 63 * Opie-Mail improve the handling of POP mail boxes (alwin)
63 * Both Opie-Eye and Opie-Mail were greatly improved due the hard work of Rajko Albrecht(alwin) 64 * Both Opie-Eye and Opie-Mail were greatly improved due the hard work of Rajko Albrecht(alwin)
64 * Opie IRC - backports of the 'NeIRC fork' (zecke) 65 * Opie IRC - backports of the 'NeIRC fork' (zecke)
65 66
66 Fixed Bugs 67 Fixed Bugs
67 ---------- 68 ----------
68 * #501 - Pickboard is able to show 'Umlaute' (TT,zecke) 69 * #501 - Pickboard is able to show 'Umlaute' (TT,zecke)
69 * #608 - Make Opie usable for left handed users (zecke) 70 * #608 - Make Opie usable for left handed users (zecke)
70 * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke) 71 * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke)
71 * #1245 - Opie-Go 'paused' (zecke) 72 * #1245 - Opie-Go 'paused' (zecke)
72 * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke) 73 * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke)
73 * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke) 74 * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke)
74 * #1395 - Build VNC Backend with gcc3.4 75 * #1395 - Build VNC Backend with gcc3.4
75 * #1440 - The icon of opie-mobilemsg is missing (CoreDump) 76 * #1440 - The icon of opie-mobilemsg is missing (CoreDump)
76 * #1426 - Add missing opie-bartender Icon (CoreDump) 77 * #1426 - Add missing opie-bartender Icon (CoreDump)
77 * #1445 - Opie-Sheet Has No Icon (CoreDump) 78 * #1445 - Opie-Sheet Has No Icon (CoreDump)
78 * #1448 - Brightness Applet added (mickeyl) 79 * #1448 - Brightness Applet added (mickeyl)
79 * #1450 - ZSame didn't clear the bonus item after winning a game (zecke) 80 * #1450 - ZSame didn't clear the bonus item after winning a game (zecke)
80 * #1482 - Fix OFileSelector to be able to sort by size (zecke) 81 * #1482 - Fix OFileSelector to be able to sort by size (zecke)
81 * n.a. - Opie-mail: fixed some crasher, some layout-problems 82 * n.a. - Opie-mail: fixed some crasher, some layout-problems
82 * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke) 83 * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke)
83 * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke) 84 * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke)
84 * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem) 85 * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem)
85 * 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) 86 * 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)
86 * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl) 87 * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl)
87 88
88 Internal 89 Internal
89 -------- 90 --------
90 * Opie-Qashmoney has been moved to unsupported (mickeyl) 91 * Opie-Qashmoney has been moved to unsupported (mickeyl)
91 * Opie-Ubrowser has been moved to unsupported (mickeyl) 92 * Opie-Ubrowser has been moved to unsupported (mickeyl)
92 93
93 2004-09-17Opie 1.1.6 94 2004-09-17Opie 1.1.6
94 95
95 New Features 96 New Features
96 ------------ 97 ------------
97 * Fifteen gained configurable number of items (zecke) 98 * Fifteen gained configurable number of items (zecke)
98 * Fifteen can have custom background images (zecke) 99 * Fifteen can have custom background images (zecke)
99 * Added daemonizing capabilities to QWS Server [via Qt/Embedded] (mickeyl) 100 * Added daemonizing capabilities to QWS Server [via Qt/Embedded] (mickeyl)
100 * Integrated the new security framework into libopie2 (zecke,clem) 101 * Integrated the new security framework into libopie2 (zecke,clem)
101 * Converted the launcher to use the new security framework (zecke) 102 * Converted the launcher to use the new security framework (zecke)
102 * Backup can now handle custom locations for backup and restore (ar) 103 * Backup can now handle custom locations for backup and restore (ar)
103 * Implemented right-on-hold feedback (wimpie,zecke) 104 * Implemented right-on-hold feedback (wimpie,zecke)
104 * Lots of new features in opie-reader (tim,pohly) 105 * Lots of new features in opie-reader (tim,pohly)
105 * Build system cleanups (schurig) 106 * Build system cleanups (schurig)
106 107
107 Fixed Bugs 108 Fixed Bugs
108 -------- 109 --------
109 * #1005 - Fixed backup to CompactFlash (ar) 110 * #1005 - Fixed backup to CompactFlash (ar)
110 * #1167 - Fixed Opie write crashing on more text than one page (ar) 111 * #1167 - Fixed Opie write crashing on more text than one page (ar)
111 * #1225 - Fixed repeated light flashing on Zaurus with keyz (mickeyl) 112 * #1225 - Fixed repeated light flashing on Zaurus with keyz (mickeyl)
112 * #1359 - Fixed bookmarks in Gutenbrowser (ljp) 113 * #1359 - Fixed bookmarks in Gutenbrowser (ljp)
113 * #1361 - Fixed auto upercase in Opie-Addressbook (eilers) 114 * #1361 - Fixed auto upercase in Opie-Addressbook (eilers)
114 * #1370 - Pimconverter now reacts on cancel key (eilers) 115 * #1370 - Pimconverter now reacts on cancel key (eilers)
115 * #1376 - Bring back the capslock/numlock display (zecke) 116 * #1376 - Bring back the capslock/numlock display (zecke)
116 * #1383 - Language settings now warns about losing open apps (Markus Litz) 117 * #1383 - Language settings now warns about losing open apps (Markus Litz)
117 * #1393 - Fixed line wrap issues in opie-console for the default profile (mickeyl) 118 * #1393 - Fixed line wrap issues in opie-console for the default profile (mickeyl)
118 * #1394 - Fixed oversized headline in opie-login (coredump) 119 * #1394 - Fixed oversized headline in opie-login (coredump)
119 * #1396 - Opie-console captures the escape key and vim is working (zecke) 120 * #1396 - Opie-console captures the escape key and vim is working (zecke)
120 * #1401 - Scrollbar is now only visible if necessary in DocTab (mickeyl) 121 * #1401 - Scrollbar is now only visible if necessary in DocTab (mickeyl)
121 122
122 2004-07-06Opie 1.1.4 123 2004-07-06Opie 1.1.4
123 124
124 New Features 125 New Features
125 ------------ 126 ------------
126 * Added four themes courtesy Robert Griebl (http://www.softforge.de/zstyle) 127 * Added four themes courtesy Robert Griebl (http://www.softforge.de/zstyle)
127 * Added Conversion tool for pim-data (eilers) 128 * Added Conversion tool for pim-data (eilers)
128 * Introduced new OPimAccessFactory and OBackendFactory which simplyfies database access (eilers) 129 * Introduced new OPimAccessFactory and OBackendFactory which simplyfies database access (eilers)
129 * Modified the PIM API for providing generic use of OPimRecords (eilers) 130 * Modified the PIM API for providing generic use of OPimRecords (eilers)
130 * Clicking on the application symbol now iterates over the application's top level widgets if already raised (zecke) 131 * Clicking on the application symbol now iterates over the application's top level widgets if already raised (zecke)
131 132
132 Fixed Bugs 133 Fixed Bugs
133 -------- 134 --------
134 * #1068 - Country Drop Down Box Off Screen 135 * #1068 - Country Drop Down Box Off Screen
135 * #1291 - Opie tinykate does not open .desktop files (ar) 136 * #1291 - Opie tinykate does not open .desktop files (ar)
136 * #1291 - Opie sheet not saving correctly (ar) 137 * #1291 - Opie sheet not saving correctly (ar)
137 * #1294 - Opie does not know about British Summer Time 138 * #1294 - Opie does not know about British Summer Time
138 * #1314 - Drawpad initialization (mickeyl) 139 * #1314 - Drawpad initialization (mickeyl)
139 * #1317 - Packagemanager crashes on hold-down or install (chicken) 140 * #1317 - Packagemanager crashes on hold-down or install (chicken)
140 * #1321 - Batteryapplet graphic glitch (harlekin) 141 * #1321 - Batteryapplet graphic glitch (harlekin)
141 * #1324 - ZSafe not starting up (mickeyl) 142 * #1324 - ZSafe not starting up (mickeyl)
142 * #1328 - Personal Home Address fields is trimmed to 1char (eilers) 143 * #1328 - Personal Home Address fields is trimmed to 1char (eilers)
143 * #1327 - Opie-mail ipk does not depend on libopiedb2 (chicken) 144 * #1327 - Opie-mail ipk does not depend on libopiedb2 (chicken)
144 * #1345 - Networksettingsplugin wlan plugin dependency on libpcap0 (mickeyl) 145 * #1345 - Networksettingsplugin wlan plugin dependency on libpcap0 (mickeyl)
145 * #1348 - Datebook dependency on libopiedb2 (chicken) 146 * #1348 - Datebook dependency on libopiedb2 (chicken)
146 * #1328 - Switched SQLDatabase and VCards char encoding from latin1 to unicode (eilers) 147 * #1328 - Switched SQLDatabase and VCards char encoding from latin1 to unicode (eilers)
147 148
148 2004-04-25Opie 1.1.3 149 2004-04-25Opie 1.1.3
149 150
150 * Introduced first implementation of SQL-Support using SQLite (eilers) 151 * Introduced first implementation of SQL-Support using SQLite (eilers)
151 * Added a new Gutenberg Project reader app - opie-gutenbrowser (ljp) 152 * Added a new Gutenberg Project reader app - opie-gutenbrowser (ljp)
152 * Added a real system graffiti character set (brad) 153 * Added a real system graffiti character set (brad)
153 * Added Generic Keyconfig Widget (zecke) 154 * Added Generic Keyconfig Widget (zecke)
154 * Improved Screenshotapplet and Drawpad integration. You can now open a screenshot in drawpad and take notes (zecke) 155 * Improved Screenshotapplet and Drawpad integration. You can now open a screenshot in drawpad and take notes (zecke)
155 * Added new Bible reader app - opie-dagger (drw) 156 * Added new Bible reader app - opie-dagger (drw)
156 * Added a new Image Viewer. Work is ongoing (zecke,alwin) 157 * Added a new Image Viewer. Work is ongoing (zecke,alwin)
157 * Added namespace usage in libopie2 and everywhere (zecke,alwin) 158 * Added namespace usage in libopie2 and everywhere (zecke,alwin)
158 * Enabled the possibility to pass command line arguments to applications (mickeyl) 159 * Enabled the possibility to pass command line arguments to applications (mickeyl)
159 * Added an about applet showing some credits and information about Opie (mickeyl) 160 * Added an about applet showing some credits and information about Opie (mickeyl)
160 * Added benchmarking functionality to sysinfo (mickeyl) 161 * Added benchmarking functionality to sysinfo (mickeyl)
161 * Added applet and configuration application for switching hardware keyboard layouts (alwin) 162 * Added applet and configuration application for switching hardware keyboard layouts (alwin)
162 * Ported applications from libopie1 to libopie2* (drw,ar,alwin) 163 * Ported applications from libopie1 to libopie2* (drw,ar,alwin)
163 * Imported fullscreen and font improvements from the Qkonsole fork to embeddedkonsole (waspe) 164 * Imported fullscreen and font improvements from the Qkonsole fork to embeddedkonsole (waspe)
164 * Clean-up of package information in control files (drw) 165 * Clean-up of package information in control files (drw)
165 * Repaired mediummount which was broken since integrating the quicklauncher (alwin) 166 * Repaired mediummount which was broken since integrating the quicklauncher (alwin)
166 * Improved big-screen support (zecke,ar) 167 * Improved big-screen support (zecke,ar)
167 * Improved multikeyboard support, added keyboard layout switching applet (mouse) 168 * Improved multikeyboard support, added keyboard layout switching applet (mouse)
168 * Added a new mail client based on libetpan (harlekin,alwin,jgf) 169 * Added a new mail client based on libetpan (harlekin,alwin,jgf)
169 * Added new package manager - opie-packagemanager (drw) 170 * Added new package manager - opie-packagemanager (drw)
170 * Improved light-n-power for C7x0 (mickeyl) 171 * Improved light-n-power for C7x0 (mickeyl)
171 * Added automatic rotation support for C7x0 (treke) 172 * Added automatic rotation support for C7x0 (treke)
172 * Split libopie1 up into a set of smaller - functionally grouped - libraries (mickeyl) 173 * Split libopie1 up into a set of smaller - functionally grouped - libraries (mickeyl)
173 * Added scanning the wireless network neighbourhood to networksettings (mickeyl) 174 * Added scanning the wireless network neighbourhood to networksettings (mickeyl)
174 175
175 2003-11-29Opie 1.0.3 176 2003-11-29Opie 1.0.3
176 177
177 * Released as Version 1.0.3 178 * Released as Version 1.0.3
178 * Improved i18n (various contributors) 179 * Improved i18n (various contributors)
179 * Reduced application startup time by integrating the TT quicklauncher (zecke,harlekin) 180 * Reduced application startup time by integrating the TT quicklauncher (zecke,harlekin)
180 * Made the Documents Tab optional (mickeyl) 181 * Made the Documents Tab optional (mickeyl)
181 * Integrated basic support for HP iPAQ 54xx and the Jornada 5xx (chicken) 182 * Integrated basic support for HP iPAQ 54xx and the Jornada 5xx (chicken)
182 183
183 2003-08-04Opie 1.0.0 184 2003-08-04Opie 1.0.0
184 185
185 * Released as Version 1.0.0 186 * Released as Version 1.0.0
186 * Including a PPP module for easy dial up (tille,harlekin,zecke) 187 * Including a PPP module for easy dial up (tille,harlekin,zecke)
diff --git a/core/settings/launcher/tabconfig.h b/core/settings/launcher/tabconfig.h
index 84ba073..7844673 100644
--- a/core/settings/launcher/tabconfig.h
+++ b/core/settings/launcher/tabconfig.h
@@ -1,72 +1,73 @@
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 __TABCONFIG_H__ 27#ifndef __TABCONFIG_H__
28#define __TABCONFIG_H__ 28#define __TABCONFIG_H__
29 29
30struct TabConfig { 30struct TabConfig {
31 enum ViewMode { 31 enum ViewMode {
32 Icon, 32 Icon,
33 List 33 List
34 }; 34 };
35 enum BackgroundType { 35 enum BackgroundType {
36 Ruled, 36 Ruled,
37 SolidColor, 37 SolidColor,
38 Image 38 Image
39 }; 39 };
40 40
41 ViewMode m_view; 41 ViewMode m_view;
42 BackgroundType m_bg_type; 42 BackgroundType m_bg_type;
43 QString m_last_directory; 43 QString m_last_directory;
44 QString m_bg_image; 44 QString m_bg_image;
45 QString m_bg_color; 45 QString m_bg_color;
46 int m_iconcolumns;
46 QString m_text_color; 47 QString m_text_color;
47 bool m_font_use; 48 bool m_font_use;
48 QString m_font_family; 49 QString m_font_family;
49 int m_font_size; 50 int m_font_size;
50 int m_font_weight; 51 int m_font_weight;
51 bool m_font_italic; 52 bool m_font_italic;
52 bool m_changed; 53 bool m_changed;
53 54
54 bool operator == ( const TabConfig &tc ) 55 bool operator == ( const TabConfig &tc )
55 { 56 {
56 return ( m_view == tc. m_view ) && 57 return ( m_view == tc. m_view ) &&
57 ( m_bg_type == tc. m_bg_type ) && 58 ( m_bg_type == tc. m_bg_type ) &&
58 ( m_bg_image == tc. m_bg_image ) && 59 ( m_bg_image == tc. m_bg_image ) &&
59 ( m_bg_color == tc. m_bg_color ) && 60 ( m_bg_color == tc. m_bg_color ) &&
60 ( m_text_color == tc. m_text_color ) && 61 ( m_text_color == tc. m_text_color ) &&
61 ( m_font_use == tc. m_font_use ) && 62 ( m_font_use == tc. m_font_use ) &&
62 ( m_font_use ? ( 63 ( m_font_use ? (
63 ( m_font_family == tc. m_font_family ) && 64 ( m_font_family == tc. m_font_family ) &&
64 ( m_font_size == tc. m_font_size ) && 65 ( m_font_size == tc. m_font_size ) &&
65 ( m_font_weight == tc. m_font_weight ) && 66 ( m_font_weight == tc. m_font_weight ) &&
66 ( m_font_italic == tc. m_font_italic ) 67 ( m_font_italic == tc. m_font_italic )
67 ) : true ); 68 ) : true );
68 69
69 } 70 }
70}; 71};
71 72
72#endif 73#endif
diff --git a/core/settings/launcher/tabdialog.cpp b/core/settings/launcher/tabdialog.cpp
index cef92d9..abe310f 100644
--- a/core/settings/launcher/tabdialog.cpp
+++ b/core/settings/launcher/tabdialog.cpp
@@ -1,524 +1,534 @@
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 "tabdialog.h" 28#include "tabdialog.h"
29 29
30/* OPIE */ 30/* OPIE */
31 31
32#include <opie2/ofontselector.h> 32#include <opie2/ofontselector.h>
33#include <opie2/otabwidget.h> 33#include <opie2/otabwidget.h>
34#include <opie2/ocolorbutton.h> 34#include <opie2/ocolorbutton.h>
35#include <opie2/ofiledialog.h> 35#include <opie2/ofiledialog.h>
36#include <opie2/odebug.h> 36#include <opie2/odebug.h>
37 37
38/* QPE */ 38/* QPE */
39#include <qpe/resource.h> 39#include <qpe/resource.h>
40#include <qpe/qpeapplication.h> 40#include <qpe/qpeapplication.h>
41 41
42/* QT */ 42/* QT */
43#include <qlayout.h> 43#include <qlayout.h>
44#include <qvbox.h> 44#include <qvbox.h>
45#include <qtabbar.h> 45#include <qtabbar.h>
46#include <qiconview.h> 46#include <qiconview.h>
47#include <qapplication.h> 47#include <qapplication.h>
48#include <qlabel.h> 48#include <qlabel.h>
49#include <qfileinfo.h> 49#include <qfileinfo.h>
50#include <qradiobutton.h> 50#include <qradiobutton.h>
51#include <qbuttongroup.h> 51#include <qbuttongroup.h>
52#include <qwhatsthis.h> 52#include <qwhatsthis.h>
53#include <qcheckbox.h> 53#include <qcheckbox.h>
54#include <qspinbox.h>
54 55
55 56
56using namespace Opie::Ui; 57using namespace Opie::Ui;
57class SampleItem : public QIconViewItem { 58class SampleItem : public QIconViewItem {
58public: 59public:
59 SampleItem ( QIconView *v, const QString &text, const QPixmap &pix ) : QIconViewItem ( v, text ) 60 SampleItem ( QIconView *v, const QString &text, const QPixmap &pix ) : QIconViewItem ( v, text )
60 { 61 {
61 m_large = pix; 62 m_large = pix;
62 m_small. convertFromImage ( pix. convertToImage ( ). smoothScale ( pix. width ( ) / 2, pix. height ( ) / 2 )); 63 m_small. convertFromImage ( pix. convertToImage ( ). smoothScale ( pix. width ( ) / 2, pix. height ( ) / 2 ));
63 } 64 }
64 65
65 void sizeChange ( ) 66 void sizeChange ( )
66 { 67 {
67 calcRect ( ); 68 calcRect ( );
68 repaint ( ); 69 repaint ( );
69 } 70 }
70 71
71 QPixmap *pixmap ( ) const 72 QPixmap *pixmap ( ) const
72 { 73 {
73 if ( iconView ( )-> itemTextPos ( ) == QIconView::Right ) 74 if ( iconView ( )-> itemTextPos ( ) == QIconView::Right )
74 return (QPixmap *) &m_small; 75 return (QPixmap *) &m_small;
75 else 76 else
76 return (QPixmap *) &m_large; 77 return (QPixmap *) &m_large;
77 } 78 }
78 79
79private: 80private:
80 QPixmap m_large, m_small; 81 QPixmap m_large, m_small;
81}; 82};
82 83
84//FIXME: Why not derive SampleView from LauncherView ???
85
83class SampleView : public QIconView { 86class SampleView : public QIconView {
84public: 87public:
85 SampleView ( QWidget *parent = 0, const char *name = 0 ) : QIconView ( parent, name ) 88 SampleView ( QWidget *parent = 0, const char *name = 0 ) : QIconView ( parent, name )
86 { 89 {
87 setItemsMovable ( false ); 90 setItemsMovable ( false );
88 setAutoArrange ( true ); 91 setAutoArrange ( true );
89 setSorting ( true ); 92 setSorting ( true );
90 setFrameStyle ( QFrame::NoFrame ); 93 setFrameStyle ( QFrame::NoFrame );
91 setSpacing ( 4 ); 94 setSpacing ( 4 );
92 setMargin ( 0 ); 95 setMargin ( 0 );
93 setSelectionMode ( QIconView::NoSelection ); 96 setSelectionMode ( QIconView::NoSelection );
94 setBackgroundMode ( PaletteBase ); 97 setBackgroundMode ( PaletteBase );
95 setViewMode ( TabConfig::Icon ); 98 setViewMode ( TabConfig::Icon );
96 calculateGrid ( Bottom ); 99 calculateGrid ( Bottom );
97 100
98 101
99 new SampleItem ( this, QObject::tr( "Sample 1" ), Resource::loadPixmap ( "datebook/DateBook" )); 102 new SampleItem ( this, QObject::tr( "Sample 1" ), Resource::loadPixmap ( "datebook/DateBook" ));
100 new SampleItem ( this, QObject::tr( "Sample 2" ), Resource::loadPixmap ( "Calibrate" )); 103 new SampleItem ( this, QObject::tr( "Sample 2" ), Resource::loadPixmap ( "Calibrate" ));
101 new SampleItem ( this, QObject::tr( "Sample 3" ), Resource::loadPixmap ( "UnknownDocument" )); 104 new SampleItem ( this, QObject::tr( "Sample 3" ), Resource::loadPixmap ( "UnknownDocument" ));
102 105
103 setBackgroundType ( TabConfig::Ruled, QString::null ); 106 setBackgroundType ( TabConfig::Ruled, QString::null );
104 107
105 setMaximumHeight ( firstItem ( )-> height ( ) + 16 ); 108 setMaximumHeight ( firstItem ( )-> height ( ) + 16 );
106 } 109 }
107 110
108 void setViewMode ( TabConfig::ViewMode m ) 111 void setViewMode ( TabConfig::ViewMode m )
109 { 112 {
110 viewport ( )-> setUpdatesEnabled ( false ); 113 viewport ( )-> setUpdatesEnabled ( false );
111 114
112 switch ( m ) { 115 switch ( m ) {
113 case TabConfig::List: 116 case TabConfig::List:
114 setItemTextPos( QIconView::Right ); 117 setItemTextPos( QIconView::Right );
115 break; 118 break;
116 case TabConfig::Icon: 119 case TabConfig::Icon:
117 setItemTextPos( QIconView::Bottom ); 120 setItemTextPos( QIconView::Bottom );
118 break; 121 break;
119 } 122 }
120// hideOrShowItems ( false ); 123// hideOrShowItems ( false );
121 124
122 for ( QIconViewItem *it = firstItem ( ); it; it = it-> nextItem ( )) 125 for ( QIconViewItem *it = firstItem ( ); it; it = it-> nextItem ( ))
123 ((SampleItem *) it )-> sizeChange ( ); 126 ((SampleItem *) it )-> sizeChange ( );
124 arrangeItemsInGrid ( true ); 127 arrangeItemsInGrid ( true );
125 viewport ( )-> setUpdatesEnabled ( true ); 128 viewport ( )-> setUpdatesEnabled ( true );
126 update ( ); 129 update ( );
127 } 130 }
128 131
129 132
130 void setBackgroundType( TabConfig::BackgroundType t, const QString &val ) 133 void setBackgroundType( TabConfig::BackgroundType t, const QString &val )
131 { 134 {
132 switch ( t ) { 135 switch ( t ) {
133 case TabConfig::Ruled: { 136 case TabConfig::Ruled: {
134 QPixmap bg ( width ( ), 9 ); 137 QPixmap bg ( width ( ), 9 );
135 QPainter painter ( &bg ); 138 QPainter painter ( &bg );
136 for ( int i = 0; i < 3; i++ ) { 139 for ( int i = 0; i < 3; i++ ) {
137 painter. setPen ( white ); 140 painter. setPen ( white );
138 painter. drawLine ( 0, i*3, width()-1, i*3 ); 141 painter. drawLine ( 0, i*3, width()-1, i*3 );
139 painter. drawLine ( 0, i*3+1, width()-1, i*3+1 ); 142 painter. drawLine ( 0, i*3+1, width()-1, i*3+1 );
140 painter. setPen ( colorGroup().background().light(105) ); 143 painter. setPen ( colorGroup().background().light(105) );
141 painter. drawLine ( 0, i*3+2, width()-1, i*3+2 ); 144 painter. drawLine ( 0, i*3+2, width()-1, i*3+2 );
142 } 145 }
143 painter.end ( ); 146 painter.end ( );
144 setBackgroundPixmap ( bg ); 147 setBackgroundPixmap ( bg );
145 break; 148 break;
146 } 149 }
147 150
148 case TabConfig::SolidColor: { 151 case TabConfig::SolidColor: {
149 setBackgroundPixmap ( QPixmap ( )); 152 setBackgroundPixmap ( QPixmap ( ));
150 if ( val. isEmpty ( )) 153 if ( val. isEmpty ( ))
151 setBackgroundColor ( colorGroup ( ). base ( )); 154 setBackgroundColor ( colorGroup ( ). base ( ));
152 else 155 else
153 setBackgroundColor ( val ); 156 setBackgroundColor ( val );
154 break; 157 break;
155 } 158 }
156 159
157 case TabConfig::Image: { 160 case TabConfig::Image: {
158 odebug << "Loading image: " << val << "" << oendl; 161 odebug << "Loading image: " << val << "" << oendl;
159 QPixmap bg ( Resource::loadPixmap ( "wallpaper/" + val )); 162 QPixmap bg ( Resource::loadPixmap ( "wallpaper/" + val ));
160 if ( bg. isNull ( )) { 163 if ( bg. isNull ( )) {
161 QImageIO imgio; 164 QImageIO imgio;
162 imgio. setFileName ( val ); 165 imgio. setFileName ( val );
163 QSize ds = qApp-> desktop ( )-> size ( ); 166 QSize ds = qApp-> desktop ( )-> size ( );
164 QString param ( "Scale( %1, %2, ScaleMin )" ); // No tr 167 QString param ( "Scale( %1, %2, ScaleMin )" ); // No tr
165 imgio. setParameters ( param. arg ( ds. width ( )). arg ( ds. height ( )). latin1 ( )); 168 imgio. setParameters ( param. arg ( ds. width ( )). arg ( ds. height ( )). latin1 ( ));
166 imgio. read ( ); 169 imgio. read ( );
167 bg = imgio. image ( ); 170 bg = imgio. image ( );
168 } 171 }
169 setBackgroundPixmap ( bg ); 172 setBackgroundPixmap ( bg );
170 break; 173 break;
171 } 174 }
172 } 175 }
173 m_bgtype = t; 176 m_bgtype = t;
174 viewport ( )-> update ( ); 177 viewport ( )-> update ( );
175 } 178 }
176 179
177 void setTextColor ( const QColor &tc ) 180 void setTextColor ( const QColor &tc )
178 { 181 {
179 m_textcolor = tc; 182 m_textcolor = tc;
180 QColorGroup cg = colorGroup ( ); 183 QColorGroup cg = colorGroup ( );
181 cg. setColor ( QColorGroup::Text, tc ); 184 cg. setColor ( QColorGroup::Text, tc );
182 setPalette ( QPalette ( cg, cg, cg )); 185 setPalette ( QPalette ( cg, cg, cg ));
183 viewport ( )-> update ( ); 186 viewport ( )-> update ( );
184 } 187 }
185 188
186 void setViewFont ( const QFont &f ) 189 void setViewFont ( const QFont &f )
187 { 190 {
188 setFont ( f ); 191 setFont ( f );
189 } 192 }
190 193
191 void setItemTextPos ( ItemTextPos pos ) 194 void setItemTextPos ( ItemTextPos pos )
192 { 195 {
193 calculateGrid ( pos ); 196 calculateGrid ( pos );
194 QIconView::setItemTextPos( pos ); 197 QIconView::setItemTextPos( pos );
195 } 198 }
196 199
200 //FIXME: Add per-tab column handling from launcherview.cpp
197 void calculateGrid ( ItemTextPos pos ) 201 void calculateGrid ( ItemTextPos pos )
198 { 202 {
199 int dw = QApplication::desktop ( )-> width ( ); 203 int dw = QApplication::desktop ( )-> width ( );
200 int viewerWidth = dw - style ( ).scrollBarExtent ( ). width ( ); 204 int viewerWidth = dw - style ( ).scrollBarExtent ( ). width ( );
201 if ( pos == Bottom ) { 205 if ( pos == Bottom ) {
202 int cols = 3; 206 int cols = 3;
203 if ( viewerWidth <= 200 ) 207 if ( viewerWidth <= 200 )
204 cols = 2; 208 cols = 2;
205 else if ( viewerWidth >= 400 ) 209 else if ( viewerWidth >= 400 )
206 cols = viewerWidth/96; 210 cols = viewerWidth/96;
207 setSpacing ( 4 ); 211 setSpacing ( 4 );
208 setGridX (( viewerWidth - ( cols + 1 ) * spacing ( )) / cols ); 212 setGridX (( viewerWidth - ( cols + 1 ) * spacing ( )) / cols );
209 setGridY ( fontMetrics ( ). height ( ) * 2 + 24 ); 213 setGridY ( fontMetrics ( ). height ( ) * 2 + 24 );
210 } 214 }
211 else { 215 else {
212 int cols = 2; 216 int cols = 2;
213 if ( viewerWidth < 150 ) 217 if ( viewerWidth < 150 )
214 cols = 1; 218 cols = 1;
215 else if ( viewerWidth >= 400 ) 219 else if ( viewerWidth >= 400 )
216 cols = viewerWidth / 150; 220 cols = viewerWidth / 150;
217 setSpacing ( 2 ); 221 setSpacing ( 2 );
218 setGridX (( viewerWidth - ( cols + 1 ) * spacing ( )) / cols ); 222 setGridX (( viewerWidth - ( cols + 1 ) * spacing ( )) / cols );
219 setGridY ( fontMetrics ( ). height ( ) + 2 ); 223 setGridY ( fontMetrics ( ). height ( ) + 2 );
220 } 224 }
221 } 225 }
222 226
223 void paletteChange( const QPalette &p ) 227 void paletteChange( const QPalette &p )
224 { 228 {
225 static bool excllock = false; 229 static bool excllock = false;
226 230
227 if ( excllock ) 231 if ( excllock )
228 return; 232 return;
229 excllock = true; 233 excllock = true;
230 234
231 unsetPalette ( ); 235 unsetPalette ( );
232 QIconView::paletteChange ( p ); 236 QIconView::paletteChange ( p );
233 if ( m_bgtype == TabConfig::Ruled ) 237 if ( m_bgtype == TabConfig::Ruled )
234 setBackgroundType ( TabConfig::Ruled, QString::null ); 238 setBackgroundType ( TabConfig::Ruled, QString::null );
235 QColorGroup cg = colorGroup ( ); 239 QColorGroup cg = colorGroup ( );
236 cg.setColor ( QColorGroup::Text, m_textcolor ); 240 cg.setColor ( QColorGroup::Text, m_textcolor );
237 setPalette ( QPalette ( cg, cg, cg )); 241 setPalette ( QPalette ( cg, cg, cg ));
238 242
239 excllock = false; 243 excllock = false;
240 } 244 }
241 245
242 void setBackgroundPixmap ( const QPixmap &pm ) 246 void setBackgroundPixmap ( const QPixmap &pm )
243 { 247 {
244 m_bgpix = pm; 248 m_bgpix = pm;
245 } 249 }
246 250
247 void setBackgroundColor ( const QColor &c ) 251 void setBackgroundColor ( const QColor &c )
248 { 252 {
249 m_bgcolor = c; 253 m_bgcolor = c;
250 } 254 }
251 255
252 void drawBackground ( QPainter *p, const QRect &r ) 256 void drawBackground ( QPainter *p, const QRect &r )
253 { 257 {
254 if ( !m_bgpix. isNull ( )) { 258 if ( !m_bgpix. isNull ( )) {
255 p-> drawTiledPixmap ( r, m_bgpix, QPoint (( r. x ( ) + contentsX ( )) % m_bgpix. width ( ), 259 p-> drawTiledPixmap ( r, m_bgpix, QPoint (( r. x ( ) + contentsX ( )) % m_bgpix. width ( ),
256 ( r. y ( ) + contentsY ( )) % m_bgpix. height ( ))); 260 ( r. y ( ) + contentsY ( )) % m_bgpix. height ( )));
257 } 261 }
258 else 262 else
259 p-> fillRect ( r, m_bgcolor ); 263 p-> fillRect ( r, m_bgcolor );
260 } 264 }
261 265
262private: 266private:
263 QColor m_textcolor; 267 QColor m_textcolor;
264 QColor m_bgcolor; 268 QColor m_bgcolor;
265 QPixmap m_bgpix; 269 QPixmap m_bgpix;
266 TabConfig::BackgroundType m_bgtype; 270 TabConfig::BackgroundType m_bgtype;
267}; 271};
268 272
269 273
270 274
271TabDialog::TabDialog ( const QPixmap *tabicon, const QString &tabname, TabConfig &tc, QWidget *parent, const char *dname, bool modal, WFlags fl ) 275TabDialog::TabDialog ( const QPixmap *tabicon, const QString &tabname, TabConfig &tc, QWidget *parent, const char *dname, bool modal, WFlags fl )
272 : QDialog ( parent, dname, modal, fl | WStyle_ContextHelp ), m_tc ( tc ) 276 : QDialog ( parent, dname, modal, fl | WStyle_ContextHelp ), m_tc ( tc )
273{ 277{
274 setCaption ( tr( "Edit Tab" )); 278 setCaption ( tr( "Edit Tab" ));
275 279
276 QVBoxLayout *lay = new QVBoxLayout ( this, 3, 3 ); 280 QVBoxLayout *lay = new QVBoxLayout ( this, 3, 3 );
277 281
278 OTabWidget *tw = new OTabWidget ( this, "tabwidget", OTabWidget::Global, OTabWidget::Bottom ); 282 OTabWidget *tw = new OTabWidget ( this, "tabwidget", OTabWidget::Global, OTabWidget::Bottom );
279 QWidget *bgtab; 283 QWidget *bgtab;
280 284
281 tw-> addTab ( bgtab = createBgTab ( tw ), "appearance/color", tr( "Background" )); 285 tw-> addTab ( bgtab = createBgTab ( tw ), "appearance/color", tr( "Background" ));
282 tw-> addTab ( createFontTab ( tw ), "font", tr( "Font" )); 286 tw-> addTab ( createFontTab ( tw ), "font", tr( "Font" ));
283 tw-> addTab ( createIconTab ( tw ), "pixmap", tr( "Icons" ) ); 287 tw-> addTab ( createIconTab ( tw ), "pixmap", tr( "Icons" ) );
284 288
285 tw-> setCurrentTab ( bgtab ); 289 tw-> setCurrentTab ( bgtab );
286 290
287 QWidget *sample = new QVBox ( this ); 291 QWidget *sample = new QVBox ( this );
288 QTabBar *tb = new QTabBar ( sample ); 292 QTabBar *tb = new QTabBar ( sample );
289 QString name ( tr( "Previewing %1" ). arg ( tabname )); 293 QString name ( tr( "Previewing %1" ). arg ( tabname ));
290 294
291 tb-> addTab ( tabicon ? new QTab ( *tabicon, name ) : new QTab ( name )); 295 tb-> addTab ( tabicon ? new QTab ( *tabicon, name ) : new QTab ( name ));
292 296
293 m_sample = new SampleView ( sample ); 297 m_sample = new SampleView ( sample );
294 298
295 lay-> addWidget ( tw, 10 ); 299 lay-> addWidget ( tw, 10 );
296 lay-> addWidget ( sample, 1 ); 300 lay-> addWidget ( sample, 1 );
297 301
298 m_iconsize-> setButton ( tc. m_view ); 302 m_iconsize-> setButton ( tc. m_view );
299 iconSizeClicked ( tc. m_view ); 303 iconSizeClicked ( tc. m_view );
300 //m_iconcolor-> setColor ( QColor ( m_tc. m_text_color )); 304 //m_iconcolor-> setColor ( QColor ( m_tc. m_text_color ));
301 iconColorClicked ( m_iconcolor-> color ( )); 305 iconColorClicked ( m_iconcolor-> color ( ));
302 m_bgtype-> setButton ( tc. m_bg_type ); 306 m_bgtype-> setButton ( tc. m_bg_type );
303 //m_solidcolor-> setColor ( QColor ( tc. m_bg_color )); 307 //m_solidcolor-> setColor ( QColor ( tc. m_bg_color ));
304 m_bgimage = tc. m_bg_image; 308 m_bgimage = tc. m_bg_image;
305 bgTypeClicked ( tc. m_bg_type ); 309 bgTypeClicked ( tc. m_bg_type );
306 m_fontuse-> setChecked ( tc. m_font_use ); 310 m_fontuse-> setChecked ( tc. m_font_use );
307 m_fontselect-> setSelectedFont ( QFont ( tc. m_font_family, tc. m_font_size, tc. m_font_weight, tc. m_font_italic )); 311 m_fontselect-> setSelectedFont ( QFont ( tc. m_font_family, tc. m_font_size, tc. m_font_weight, tc. m_font_italic ));
308 m_fontselect-> setEnabled ( m_fontuse-> isChecked ( )); 312 m_fontselect-> setEnabled ( m_fontuse-> isChecked ( ));
309 fontClicked ( m_fontselect-> selectedFont ( )); 313 fontClicked ( m_fontselect-> selectedFont ( ));
310 314
311 QWhatsThis::add ( sample, tr( "This is a rough preview of what the currently selected Tab will look like." )); 315 QWhatsThis::add ( sample, tr( "This is a rough preview of what the currently selected Tab will look like." ));
312} 316}
313 317
314 318
315TabDialog::~TabDialog ( ) 319TabDialog::~TabDialog ( )
316{ 320{
317} 321}
318 322
319QWidget *TabDialog::createFontTab ( QWidget *parent ) 323QWidget *TabDialog::createFontTab ( QWidget *parent )
320{ 324{
321 QWidget *tab = new QWidget ( parent, "FontTab" ); 325 QWidget *tab = new QWidget ( parent, "FontTab" );
322 QVBoxLayout *vertLayout = new QVBoxLayout ( tab, 3, 3 ); 326 QVBoxLayout *vertLayout = new QVBoxLayout ( tab, 3, 3 );
323 327
324 m_fontuse = new QCheckBox ( tr( "Use a custom font" ), tab ); 328 m_fontuse = new QCheckBox ( tr( "Use a custom font" ), tab );
325 vertLayout-> addWidget ( m_fontuse ); 329 vertLayout-> addWidget ( m_fontuse );
326 330
327 m_fontselect = new OFontSelector ( false, tab, "fontsel" ); 331 m_fontselect = new OFontSelector ( false, tab, "fontsel" );
328 vertLayout-> addWidget ( m_fontselect ); 332 vertLayout-> addWidget ( m_fontselect );
329 333
330 connect ( m_fontuse, SIGNAL( toggled(bool)), m_fontselect, SLOT( setEnabled(bool))); 334 connect ( m_fontuse, SIGNAL( toggled(bool)), m_fontselect, SLOT( setEnabled(bool)));
331 connect( m_fontselect, SIGNAL( fontSelected(const QFont&)), 335 connect( m_fontselect, SIGNAL( fontSelected(const QFont&)),
332 this, SLOT( fontClicked(const QFont&))); 336 this, SLOT( fontClicked(const QFont&)));
333 337
334 return tab; 338 return tab;
335} 339}
336 340
337QWidget *TabDialog::createBgTab ( QWidget *parent ) 341QWidget *TabDialog::createBgTab ( QWidget *parent )
338{ 342{
339 QWidget *tab = new QWidget( parent, "BgTab" ); 343 QWidget *tab = new QWidget( parent, "BgTab" );
340 QVBoxLayout *vertLayout = new QVBoxLayout( tab, 3, 3 ); 344 QVBoxLayout *vertLayout = new QVBoxLayout( tab, 3, 3 );
341 345
342 QGridLayout* gridLayout = new QGridLayout ( vertLayout ); 346 QGridLayout* gridLayout = new QGridLayout ( vertLayout );
343 gridLayout-> setColStretch ( 1, 10 ); 347 gridLayout-> setColStretch ( 1, 10 );
344 348
345 QLabel* label = new QLabel( tr( "Type:" ), tab ); 349 QLabel* label = new QLabel( tr( "Type:" ), tab );
346 gridLayout-> addWidget ( label, 0, 0 ); 350 gridLayout-> addWidget ( label, 0, 0 );
347 m_bgtype = new QButtonGroup( tab, "buttongroup" ); 351 m_bgtype = new QButtonGroup( tab, "buttongroup" );
348 m_bgtype-> hide ( ); 352 m_bgtype-> hide ( );
349 m_bgtype-> setExclusive ( true ); 353 m_bgtype-> setExclusive ( true );
350 354
351 QRadioButton *rb; 355 QRadioButton *rb;
352 rb = new QRadioButton( tr( "Ruled" ), tab, "ruled" ); 356 rb = new QRadioButton( tr( "Ruled" ), tab, "ruled" );
353 m_bgtype-> insert ( rb, TabConfig::Ruled ); 357 m_bgtype-> insert ( rb, TabConfig::Ruled );
354 gridLayout-> addWidget( rb, 0, 1 ); 358 gridLayout-> addWidget( rb, 0, 1 );
355 359
356 QHBoxLayout *hb = new QHBoxLayout ( ); 360 QHBoxLayout *hb = new QHBoxLayout ( );
357 hb-> setSpacing ( 3 ); 361 hb-> setSpacing ( 3 );
358 362
359 rb = new QRadioButton( tr( "Solid color" ), tab, "solid" ); 363 rb = new QRadioButton( tr( "Solid color" ), tab, "solid" );
360 m_bgtype-> insert ( rb, TabConfig::SolidColor ); 364 m_bgtype-> insert ( rb, TabConfig::SolidColor );
361 hb-> addWidget ( rb ); 365 hb-> addWidget ( rb );
362 hb-> addSpacing ( 10 ); 366 hb-> addSpacing ( 10 );
363 367
364 m_solidcolor = new Opie::OColorButton ( tab, QColor ( m_tc. m_bg_color ) ); 368 m_solidcolor = new Opie::OColorButton ( tab, QColor ( m_tc. m_bg_color ) );
365 connect ( m_solidcolor, SIGNAL( colorSelected(const QColor&)), this, SLOT( bgColorClicked(const QColor&))); 369 connect ( m_solidcolor, SIGNAL( colorSelected(const QColor&)), this, SLOT( bgColorClicked(const QColor&)));
366 hb-> addWidget ( m_solidcolor ); 370 hb-> addWidget ( m_solidcolor );
367 hb-> addStretch ( 10 ); 371 hb-> addStretch ( 10 );
368 372
369 gridLayout-> addLayout ( hb, 1, 1 ); 373 gridLayout-> addLayout ( hb, 1, 1 );
370 374
371 hb = new QHBoxLayout ( ); 375 hb = new QHBoxLayout ( );
372 hb-> setSpacing ( 3 ); 376 hb-> setSpacing ( 3 );
373 377
374 rb = new QRadioButton( tr( "Image" ), tab, "image" ); 378 rb = new QRadioButton( tr( "Image" ), tab, "image" );
375 m_bgtype-> insert ( rb, TabConfig::Image ); 379 m_bgtype-> insert ( rb, TabConfig::Image );
376 hb-> addWidget( rb ); 380 hb-> addWidget( rb );
377 hb-> addSpacing ( 10 ); 381 hb-> addSpacing ( 10 );
378 382
379 m_imagebrowse = new QPushButton ( tr( "Select..." ), tab ); 383 m_imagebrowse = new QPushButton ( tr( "Select..." ), tab );
380 connect ( m_imagebrowse, SIGNAL( clicked()), this, SLOT( bgImageClicked())); 384 connect ( m_imagebrowse, SIGNAL( clicked()), this, SLOT( bgImageClicked()));
381 hb-> addWidget ( m_imagebrowse ); 385 hb-> addWidget ( m_imagebrowse );
382 hb-> addStretch ( 10 ); 386 hb-> addStretch ( 10 );
383 387
384 gridLayout-> addLayout ( hb, 2, 1 ); 388 gridLayout-> addLayout ( hb, 2, 1 );
385 389
386 QPushButton *p = new QPushButton ( tr( "Default" ), tab ); 390 QPushButton *p = new QPushButton ( tr( "Default" ), tab );
387 connect ( p, SIGNAL( clicked()), this, SLOT( bgDefaultClicked())); 391 connect ( p, SIGNAL( clicked()), this, SLOT( bgDefaultClicked()));
388 gridLayout-> addWidget ( p, 3, 1 ); 392 gridLayout-> addWidget ( p, 3, 1 );
389 393
390 connect ( m_bgtype, SIGNAL( clicked(int)), this, SLOT( bgTypeClicked(int))); 394 connect ( m_bgtype, SIGNAL( clicked(int)), this, SLOT( bgTypeClicked(int)));
391 395
392 vertLayout-> addStretch ( 10 ); 396 vertLayout-> addStretch ( 10 );
393 397
394 return tab; 398 return tab;
395} 399}
396 400
397QWidget *TabDialog::createIconTab ( QWidget *parent ) 401QWidget *TabDialog::createIconTab ( QWidget *parent )
398{ 402{
399 QWidget *tab = new QWidget( parent, "IconTab" ); 403 QWidget *tab = new QWidget( parent, "IconTab" );
400 QVBoxLayout *vertLayout = new QVBoxLayout( tab, 3, 3 ); 404 QVBoxLayout *vertLayout = new QVBoxLayout( tab, 3, 3 );
401 405
402 QGridLayout* gridLayout = new QGridLayout ( vertLayout ); 406 QGridLayout* gridLayout = new QGridLayout ( vertLayout );
403 gridLayout-> setColStretch ( 1, 10 ); 407 gridLayout-> setColStretch ( 1, 10 );
404 408
405 QLabel* label = new QLabel( tr( "Size:" ), tab ); 409 QLabel* label = new QLabel( tr( "Size:" ), tab );
406 gridLayout-> addWidget ( label, 0, 0 ); 410 gridLayout-> addWidget ( label, 0, 0 );
407 m_iconsize = new QButtonGroup( tab, "buttongroup" ); 411 m_iconsize = new QButtonGroup( tab, "buttongroup" );
408 m_iconsize-> hide ( ); 412 m_iconsize-> hide ( );
409 m_iconsize-> setExclusive ( true ); 413 m_iconsize-> setExclusive ( true );
410 414
411 QRadioButton *rb; 415 QRadioButton *rb;
412 rb = new QRadioButton( tr( "Small" ), tab, "iconsmall" ); 416 rb = new QRadioButton( tr( "Small" ), tab, "iconsmall" );
413 m_iconsize-> insert ( rb, TabConfig::List ); 417 m_iconsize-> insert ( rb, TabConfig::List );
414 gridLayout-> addWidget( rb, 0, 1 ); 418 gridLayout-> addWidget( rb, 0, 1 );
415 419
416 rb = new QRadioButton( tr( "Large" ), tab, "iconlarge" ); 420 rb = new QRadioButton( tr( "Large" ), tab, "iconlarge" );
417 m_iconsize-> insert ( rb, TabConfig::Icon ); 421 m_iconsize-> insert ( rb, TabConfig::Icon );
418 gridLayout-> addWidget( rb, 1, 1 ); 422 gridLayout-> addWidget( rb, 1, 1 );
419
420 connect ( m_iconsize, SIGNAL( clicked(int)), this, SLOT( iconSizeClicked(int))); 423 connect ( m_iconsize, SIGNAL( clicked(int)), this, SLOT( iconSizeClicked(int)));
421
422 gridLayout-> addRowSpacing ( 2, 8 ); 424 gridLayout-> addRowSpacing ( 2, 8 );
423 425
424 label = new QLabel ( tr( "Color:" ), tab ); 426 label = new QLabel ( tr( "Color:" ), tab );
425 gridLayout-> addWidget ( label, 3, 0 ); 427 gridLayout-> addWidget ( label, 3, 0 );
428 gridLayout-> addRowSpacing ( 3, 8 );
426 429
427 m_iconcolor = new Opie::OColorButton ( tab, QColor ( m_tc. m_text_color ) ); 430 m_iconcolor = new Opie::OColorButton ( tab, QColor ( m_tc. m_text_color ) );
428 connect ( m_iconcolor, SIGNAL( colorSelected(const QColor&)), this, SLOT( iconColorClicked(const QColor&))); 431 connect ( m_iconcolor, SIGNAL( colorSelected(const QColor&)), this, SLOT( iconColorClicked(const QColor&)));
429 gridLayout-> addWidget ( m_iconcolor, 3, 1, AlignLeft ); 432 gridLayout-> addWidget ( m_iconcolor, 3, 1, AlignLeft );
430 433
434 label = new QLabel( tr( "Columns:" ), tab );
435 gridLayout->addWidget( label, 4, 0 );
436 m_iconcolumns = new QSpinBox( 0, 10, 1, tab, "iconspinbox" );
437 m_iconcolumns->setSpecialValueText( tr( "Automatic" ) );
438 gridLayout->addWidget( m_iconcolumns, 4, 1, AlignLeft );
439
431 vertLayout-> addStretch ( 10 ); 440 vertLayout-> addStretch ( 10 );
432 441
433 if ( m_tc.m_last_directory == QString::null ) { 442 if ( m_tc.m_last_directory == QString::null ) {
434 m_tc.m_last_directory = QPEApplication::documentDir(); 443 m_tc.m_last_directory = QPEApplication::documentDir();
435 } 444 }
436 445
437 return tab; 446 return tab;
438} 447}
439 448
440 449
441void TabDialog::iconSizeClicked ( int s ) 450void TabDialog::iconSizeClicked ( int s )
442{ 451{
443 m_sample-> setViewMode ((TabConfig::ViewMode) s ); 452 m_sample-> setViewMode ((TabConfig::ViewMode) s );
444} 453}
445 454
446void TabDialog::fontClicked ( const QFont &f ) 455void TabDialog::fontClicked ( const QFont &f )
447{ 456{
448 m_sample-> setViewFont ( f ); 457 m_sample-> setViewFont ( f );
449} 458}
450 459
451void TabDialog::bgTypeClicked ( int t ) 460void TabDialog::bgTypeClicked ( int t )
452{ 461{
453 QString s; 462 QString s;
454 463
455 if ( m_bgtype-> id ( m_bgtype-> selected ( )) != t ) 464 if ( m_bgtype-> id ( m_bgtype-> selected ( )) != t )
456 m_bgtype-> setButton ( t ); 465 m_bgtype-> setButton ( t );
457 466
458 m_solidcolor-> setEnabled ( t == TabConfig::SolidColor ); 467 m_solidcolor-> setEnabled ( t == TabConfig::SolidColor );
459 m_imagebrowse-> setEnabled ( t == TabConfig::Image ); 468 m_imagebrowse-> setEnabled ( t == TabConfig::Image );
460 469
461 if ( t == TabConfig::SolidColor ) 470 if ( t == TabConfig::SolidColor )
462 s = m_solidcolor-> color ( ). name ( ); 471 s = m_solidcolor-> color ( ). name ( );
463 else if ( t == TabConfig::Image ) 472 else if ( t == TabConfig::Image )
464 s = Resource::findPixmap ( m_bgimage ); 473 s = Resource::findPixmap ( m_bgimage );
465 474
466 m_sample-> setBackgroundType ((TabConfig::BackgroundType) t, s ); 475 m_sample-> setBackgroundType ((TabConfig::BackgroundType) t, s );
467} 476}
468 477
469void TabDialog::bgColorClicked ( const QColor & ) 478void TabDialog::bgColorClicked ( const QColor & )
470{ 479{
471 bgTypeClicked ( TabConfig::SolidColor ); 480 bgTypeClicked ( TabConfig::SolidColor );
472} 481}
473 482
474void TabDialog::iconColorClicked ( const QColor &col ) 483void TabDialog::iconColorClicked ( const QColor &col )
475{ 484{
476 m_sample-> setTextColor ( col ); 485 m_sample-> setTextColor ( col );
477} 486}
478 487
479void TabDialog::bgImageClicked ( ) 488void TabDialog::bgImageClicked ( )
480{ 489{
481 // ### use OFileSelector here ### 490 // ### use OFileSelector here ###
482 // this is just a quick c&p from the old appearance app 491 // this is just a quick c&p from the old appearance app
483 492
484 MimeTypes types; 493 MimeTypes types;
485 QStringList list; 494 QStringList list;
486 list << "image/*"; 495 list << "image/*";
487 types. insert ( "Images", list ); 496 types. insert ( "Images", list );
488 497
489 QString file = OFileDialog::getOpenFileName ( 1, m_tc.m_last_directory, QString::null, types ); 498 QString file = OFileDialog::getOpenFileName ( 1, m_tc.m_last_directory, QString::null, types );
490 499
491 if ( !file. isEmpty ( )) { 500 if ( !file. isEmpty ( )) {
492 m_tc.m_last_directory = QFileInfo( file ).dirPath(); 501 m_tc.m_last_directory = QFileInfo( file ).dirPath();
493 m_bgimage = DocLnk ( file ). file ( ); 502 m_bgimage = DocLnk ( file ). file ( );
494 bgTypeClicked ( TabConfig::Image ); 503 bgTypeClicked ( TabConfig::Image );
495 } 504 }
496} 505}
497 506
498void TabDialog::bgDefaultClicked ( ) 507void TabDialog::bgDefaultClicked ( )
499{ 508{
500 m_bgimage = "launcher/opie-background"; 509 m_bgimage = "launcher/opie-background";
501 bgTypeClicked ( TabConfig::Image ); 510 bgTypeClicked ( TabConfig::Image );
502} 511}
503 512
504void TabDialog::accept ( ) 513void TabDialog::accept ( )
505{ 514{
506 m_tc. m_view = (TabConfig::ViewMode) m_iconsize-> id ( m_iconsize-> selected ( )); 515 m_tc. m_view = (TabConfig::ViewMode) m_iconsize-> id ( m_iconsize-> selected ( ));
507 m_tc. m_bg_type = (TabConfig::BackgroundType) m_bgtype-> id ( m_bgtype-> selected ( )); 516 m_tc. m_bg_type = (TabConfig::BackgroundType) m_bgtype-> id ( m_bgtype-> selected ( ));
508 m_tc. m_bg_color = m_solidcolor-> color ( ). name ( ); 517 m_tc. m_bg_color = m_solidcolor-> color ( ). name ( );
518 m_tc. m_iconcolumns = m_iconcolumns-> value( );
509 m_tc. m_bg_image = m_bgimage; 519 m_tc. m_bg_image = m_bgimage;
510 m_tc. m_text_color = m_iconcolor-> color ( ). name ( ); 520 m_tc. m_text_color = m_iconcolor-> color ( ). name ( );
511 521
512 m_tc. m_font_use = m_fontuse-> isChecked ( ); 522 m_tc. m_font_use = m_fontuse-> isChecked ( );
513 523
514 if ( m_tc. m_font_use ) { 524 if ( m_tc. m_font_use ) {
515 QFont f = m_fontselect-> selectedFont ( ); 525 QFont f = m_fontselect-> selectedFont ( );
516 526
517 m_tc. m_font_family = f. family ( ); 527 m_tc. m_font_family = f. family ( );
518 m_tc. m_font_size = f. pointSize ( ); 528 m_tc. m_font_size = f. pointSize ( );
519 m_tc. m_font_weight = f. weight ( ); 529 m_tc. m_font_weight = f. weight ( );
520 m_tc. m_font_italic = f. italic ( ); 530 m_tc. m_font_italic = f. italic ( );
521 } 531 }
522 532
523 QDialog::accept ( ); 533 QDialog::accept ( );
524} 534}
diff --git a/core/settings/launcher/tabdialog.h b/core/settings/launcher/tabdialog.h
index 46b7ae9..9381237 100644
--- a/core/settings/launcher/tabdialog.h
+++ b/core/settings/launcher/tabdialog.h
@@ -1,81 +1,83 @@
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#ifndef __TABDIALOG_H__ 28#ifndef __TABDIALOG_H__
29#define __TABDIALOG_H__ 29#define __TABDIALOG_H__
30 30
31#include <qdialog.h> 31#include <qdialog.h>
32#include "tabconfig.h" 32#include "tabconfig.h"
33 33
34class QButtonGroup; 34class QButtonGroup;
35namespace Opie {namespace Ui {class OFontSelector;}} 35namespace Opie {namespace Ui {class OFontSelector;}}
36class SampleView; 36class SampleView;
37namespace Opie {class OColorButton;} 37namespace Opie {class OColorButton;}
38class QPushButton; 38class QPushButton;
39class QCheckBox; 39class QCheckBox;
40class QSpinBox;
40 41
41 42
42class TabDialog : public QDialog { 43class TabDialog : public QDialog {
43 Q_OBJECT 44 Q_OBJECT
44public: 45public:
45 TabDialog ( const QPixmap *tabicon, const QString &tabname, TabConfig &cfg, QWidget *parent = 0, const char *dname = 0, bool modal = false, WFlags = 0 ); 46 TabDialog ( const QPixmap *tabicon, const QString &tabname, TabConfig &cfg, QWidget *parent = 0, const char *dname = 0, bool modal = false, WFlags = 0 );
46 virtual ~TabDialog ( ); 47 virtual ~TabDialog ( );
47 48
48public slots: 49public slots:
49 virtual void accept ( ); 50 virtual void accept ( );
50 51
51protected slots: 52protected slots:
52 void iconSizeClicked ( int ); 53 void iconSizeClicked ( int );
53 void fontClicked ( const QFont & ); 54 void fontClicked ( const QFont & );
54 void bgTypeClicked ( int ); 55 void bgTypeClicked ( int );
55 void bgColorClicked ( const QColor & ); 56 void bgColorClicked ( const QColor & );
56 void iconColorClicked ( const QColor & ); 57 void iconColorClicked ( const QColor & );
57 void bgImageClicked ( ); 58 void bgImageClicked ( );
58 void bgDefaultClicked ( ); 59 void bgDefaultClicked ( );
59 60
60private: 61private:
61 QWidget *createBgTab ( QWidget *parent ); 62 QWidget *createBgTab ( QWidget *parent );
62 QWidget *createFontTab ( QWidget *parent ); 63 QWidget *createFontTab ( QWidget *parent );
63 QWidget *createIconTab ( QWidget *parent ); 64 QWidget *createIconTab ( QWidget *parent );
64 65
65 66
66private: 67private:
67 SampleView *m_sample; 68 SampleView *m_sample;
68 QButtonGroup *m_iconsize; 69 QButtonGroup *m_iconsize;
69 Opie::Ui::OFontSelector *m_fontselect; 70 Opie::Ui::OFontSelector *m_fontselect;
70 Opie::OColorButton *m_solidcolor; 71 Opie::OColorButton *m_solidcolor;
71 Opie::OColorButton *m_iconcolor; 72 Opie::OColorButton *m_iconcolor;
73 QSpinBox *m_iconcolumns;
72 QPushButton *m_imagebrowse; 74 QPushButton *m_imagebrowse;
73 QString m_bgimage; 75 QString m_bgimage;
74 QButtonGroup *m_bgtype; 76 QButtonGroup *m_bgtype;
75 QCheckBox *m_fontuse; 77 QCheckBox *m_fontuse;
76 78
77 TabConfig &m_tc; 79 TabConfig &m_tc;
78}; 80};
79 81
80 82
81#endif 83#endif
diff --git a/core/settings/launcher/tabssettings.cpp b/core/settings/launcher/tabssettings.cpp
index 5ac625b..ab64331 100644
--- a/core/settings/launcher/tabssettings.cpp
+++ b/core/settings/launcher/tabssettings.cpp
@@ -1,323 +1,326 @@
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 86
87 p1-> setEnabled ( false ); 87 p1-> setEnabled ( false );
88 p3-> setEnabled ( false ); 88 p3-> setEnabled ( false );
89 89
90 init ( ); 90 init ( );
91 91
92 QWhatsThis::add ( m_list, tr( "Select the Launcher Tab you want to edit or delete." )); 92 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>." )); 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>." ));
94 QWhatsThis::add ( p2, tr( "Opens a new dialog to customize the select Tab." )); 94 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>." )); 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>." ));
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." )); 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." ));
97 QWhatsThis::add ( m_busyani, tr( "Activate this, if you want an animatedbusy indicator for starting applications in the Launcher." )); 97 QWhatsThis::add ( m_busyani, tr( "Activate this, if you want an animatedbusy indicator for starting applications in the Launcher." ));
98} 98}
99 99
100void TabsSettings::init ( ) 100void TabsSettings::init ( )
101{ 101{
102 AppLnkSet rootFolder( MimeType::appsFolderName ( )); 102 AppLnkSet rootFolder( MimeType::appsFolderName ( ));
103 QStringList types = rootFolder. types ( ); 103 QStringList types = rootFolder. types ( );
104 104
105 m_list-> insertItem ( tr( "All Tabs" )); 105 m_list-> insertItem ( tr( "All Tabs" ));
106 m_ids << GLOBALID; 106 m_ids << GLOBALID;
107 107
108 for ( QStringList::Iterator it = types. begin ( ); it != types. end ( ); ++it ) { 108 for ( QStringList::Iterator it = types. begin ( ); it != types. end ( ); ++it ) {
109 m_list-> insertItem ( rootFolder. typePixmap ( *it ), rootFolder. typeName ( *it )); 109 m_list-> insertItem ( rootFolder. typePixmap ( *it ), rootFolder. typeName ( *it ));
110 m_ids << *it; 110 m_ids << *it;
111 } 111 }
112 QImage img ( Resource::loadImage ( "DocsIcon" )); 112 QImage img ( Resource::loadImage ( "DocsIcon" ));
113 QPixmap pix; 113 QPixmap pix;
114 pix = img. smoothScale ( AppLnk::smallIconSize ( ), AppLnk::smallIconSize ( )); 114 pix = img. smoothScale ( AppLnk::smallIconSize ( ), AppLnk::smallIconSize ( ));
115 m_list-> insertItem ( pix, tr( "Documents" )); 115 m_list-> insertItem ( pix, tr( "Documents" ));
116 m_ids += "Documents"; // No tr 116 m_ids += "Documents"; // No tr
117 117
118 Config cfg ( "Launcher" ); 118 Config cfg ( "Launcher" );
119 119
120 readTabSettings ( cfg ); 120 readTabSettings ( cfg );
121 121
122 cfg. setGroup ( "GUI" ); 122 cfg. setGroup ( "GUI" );
123 m_busyani-> setChecked ( cfg. readEntry ( "BusyType" ). lower ( ) == "animated" ); 123 m_busyani-> setChecked ( cfg. readEntry ( "BusyType" ). lower ( ) == "animated" );
124 m_bigbusy->setChecked( cfg. readBoolEntry ( "BigBusy" ) ); 124 m_bigbusy->setChecked( cfg. readBoolEntry ( "BigBusy" ) );
125} 125}
126 126
127 127
128void TabsSettings::readTabSettings ( Config &cfg ) 128void TabsSettings::readTabSettings ( Config &cfg )
129{ 129{
130 QString grp ( "Tab %1" ); // No tr 130 QString grp ( "Tab %1" ); // No tr
131 m_tabs. clear ( ); 131 m_tabs. clear ( );
132 132
133 TabConfig global_def; 133 TabConfig global_def;
134 global_def. m_view = TabConfig::Icon; 134 global_def. m_view = TabConfig::Icon;
135 global_def. m_bg_type = TabConfig::Ruled; 135 global_def. m_bg_type = TabConfig::Ruled;
136 global_def. m_bg_image = "launcher/opie-background"; 136 global_def. m_bg_image = "launcher/opie-background";
137 global_def. m_bg_color = colorGroup ( ). color ( QColorGroup::Base ). name ( ); 137 global_def. m_bg_color = colorGroup ( ). color ( QColorGroup::Base ). name ( );
138 global_def. m_iconcolumns = 0; // automatic
138 global_def. m_text_color = colorGroup ( ). color ( QColorGroup::Text ). name ( ); 139 global_def. m_text_color = colorGroup ( ). color ( QColorGroup::Text ). name ( );
139 global_def. m_font_use = false; 140 global_def. m_font_use = false;
140 global_def. m_font_family = font ( ). family ( ); 141 global_def. m_font_family = font ( ). family ( );
141 global_def. m_font_size = font ( ). pointSize ( ); 142 global_def. m_font_size = font ( ). pointSize ( );
142 global_def. m_font_weight = 50; 143 global_def. m_font_weight = 50;
143 global_def. m_font_italic = false; 144 global_def. m_font_italic = false;
144 global_def. m_changed = false; 145 global_def. m_changed = false;
145 146
146 Config cfg2 = Config( "Launchersettings" ); 147 Config cfg2 = Config( "Launchersettings" );
147 148
148 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { 149 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) {
149 TabConfig tc = ( it != m_ids. begin ( )) ? m_tabs [GLOBALID] : global_def; 150 TabConfig tc = ( it != m_ids. begin ( )) ? m_tabs [GLOBALID] : global_def;
150 151
151 cfg. setGroup ( grp. arg ( *it )); 152 cfg. setGroup ( grp. arg ( *it ));
152 cfg2. setGroup( grp. arg ( *it )); 153 cfg2. setGroup( grp. arg ( *it ));
153 154
154 QString view = cfg. readEntry ( "View" ); 155 QString view = cfg. readEntry ( "View" );
155 if ( view == "Icon" ) // No tr 156 if ( view == "Icon" ) // No tr
156 tc. m_view = TabConfig::Icon; 157 tc. m_view = TabConfig::Icon;
157 if ( view == "List" ) // No tr 158 if ( view == "List" ) // No tr
158 tc. m_view = TabConfig::List; 159 tc. m_view = TabConfig::List;
159 160
160 QString bgType = cfg. readEntry ( "BackgroundType" ); 161 QString bgType = cfg. readEntry ( "BackgroundType" );
161 if ( bgType == "Image" ) 162 if ( bgType == "Image" )
162 tc. m_bg_type = TabConfig::Image; 163 tc. m_bg_type = TabConfig::Image;
163 else if ( bgType == "SolidColor" ) 164 else if ( bgType == "SolidColor" )
164 tc. m_bg_type = TabConfig::SolidColor; 165 tc. m_bg_type = TabConfig::SolidColor;
165 else if ( bgType == "Image" ) // No tr 166 else if ( bgType == "Image" ) // No tr
166 tc. m_bg_type = TabConfig::Image; 167 tc. m_bg_type = TabConfig::Image;
167 168
168 tc. m_bg_image = cfg. readEntry ( "BackgroundImage", tc. m_bg_image ); 169 tc. m_bg_image = cfg. readEntry ( "BackgroundImage", tc. m_bg_image );
169 tc. m_last_directory = cfg2.readEntry( "DefaultDir", "" ); 170 tc. m_last_directory = cfg2.readEntry( "DefaultDir", "" );
170 tc. m_bg_color = cfg. readEntry ( "BackgroundColor", tc. m_bg_color ); 171 tc. m_bg_color = cfg. readEntry ( "BackgroundColor", tc. m_bg_color );
172 tc. m_iconcolumns = cfg. readNumEntry ( "Columns", tc. m_iconcolumns );
171 tc. m_text_color = cfg. readEntry ( "TextColor", tc. m_text_color ); 173 tc. m_text_color = cfg. readEntry ( "TextColor", tc. m_text_color );
172 QStringList f = cfg. readListEntry ( "Font", ',' ); 174 QStringList f = cfg. readListEntry ( "Font", ',' );
173 if ( f. count ( ) == 4 ) { 175 if ( f. count ( ) == 4 ) {
174 tc. m_font_use = true; 176 tc. m_font_use = true;
175 tc. m_font_family = f [0]; 177 tc. m_font_family = f [0];
176 tc. m_font_size = f [1]. toInt ( ); 178 tc. m_font_size = f [1]. toInt ( );
177 tc. m_font_weight = f [2]. toInt ( ); 179 tc. m_font_weight = f [2]. toInt ( );
178 tc. m_font_italic = ( f [3]. toInt ( )); 180 tc. m_font_italic = ( f [3]. toInt ( ));
179 } 181 }
180 m_tabs [*it] = tc; 182 m_tabs [*it] = tc;
181 } 183 }
182 184
183 // if all tabs have the same config, then initialize the GLOBALID tab to these values 185 // if all tabs have the same config, then initialize the GLOBALID tab to these values
184 186
185 TabConfig *first = 0; 187 TabConfig *first = 0;
186 bool same = true; 188 bool same = true;
187 189
188 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { 190 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) {
189 if ( *it == GLOBALID ) 191 if ( *it == GLOBALID )
190 continue; 192 continue;
191 else if ( !first ) 193 else if ( !first )
192 first = &m_tabs [*it]; 194 first = &m_tabs [*it];
193 else 195 else
194 same &= ( *first == m_tabs [*it] ); 196 same &= ( *first == m_tabs [*it] );
195 } 197 }
196 if ( same ) { 198 if ( same ) {
197 m_tabs [GLOBALID] = *first; 199 m_tabs [GLOBALID] = *first;
198 m_tabs [GLOBALID]. m_changed = true; 200 m_tabs [GLOBALID]. m_changed = true;
199 } 201 }
200} 202}
201 203
202 204
203void TabsSettings::accept ( ) 205void TabsSettings::accept ( )
204{ 206{
205 Config cfg ( "Launcher" ); 207 Config cfg ( "Launcher" );
206 Config cfg2 ( "Launchersettings" ); 208 Config cfg2 ( "Launchersettings" );
207 209
208 // Launcher Tab 210 // Launcher Tab
209 QString grp ( "Tab %1" ); // No tr 211 QString grp ( "Tab %1" ); // No tr
210 212
211 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { 213 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) {
212 TabConfig &tc = m_tabs [*it]; 214 TabConfig &tc = m_tabs [*it];
213 215
214 if ( !tc. m_changed ) 216 if ( !tc. m_changed )
215 continue; 217 continue;
216 218
217 cfg. setGroup ( grp. arg ( *it )); 219 cfg. setGroup ( grp. arg ( *it ));
218 cfg2. setGroup ( grp. arg ( *it )); 220 cfg2. setGroup ( grp. arg ( *it ));
219 switch ( tc. m_view ) { 221 switch ( tc. m_view ) {
220 case TabConfig::Icon: 222 case TabConfig::Icon:
221 cfg.writeEntry ( "View", "Icon" ); 223 cfg.writeEntry ( "View", "Icon" );
222 break; 224 break;
223 case TabConfig::List: 225 case TabConfig::List:
224 cfg.writeEntry ( "View", "List" ); 226 cfg.writeEntry ( "View", "List" );
225 break; 227 break;
226 } 228 }
227 229
228 QCopEnvelope e ( "QPE/Launcher", "setTabView(QString,int)" ); 230 QCopEnvelope e ( "QPE/Launcher", "setTabView(QString,int)" );
229 e << *it << tc. m_view; 231 e << *it << tc. m_view;
230 232
231 cfg. writeEntry ( "BackgroundImage", tc. m_bg_image ); 233 cfg. writeEntry ( "BackgroundImage", tc. m_bg_image );
232 cfg. writeEntry ( "BackgroundColor", tc. m_bg_color ); 234 cfg. writeEntry ( "BackgroundColor", tc. m_bg_color );
235 cfg. writeEntry ( "Columns", tc. m_iconcolumns );
233 cfg. writeEntry ( "TextColor", tc. m_text_color ); 236 cfg. writeEntry ( "TextColor", tc. m_text_color );
234 cfg2. writeEntry ( "DefaultDir", tc.m_last_directory ); 237 cfg2. writeEntry ( "DefaultDir", tc.m_last_directory );
235 238
236 if ( tc. m_font_use ) { 239 if ( tc. m_font_use ) {
237 QString f = tc. m_font_family + "," + QString::number ( tc. m_font_size ) + "," + QString::number ( tc. m_font_weight ) + "," + ( tc. m_font_italic ? "1" : "0" ); 240 QString f = tc. m_font_family + "," + QString::number ( tc. m_font_size ) + "," + QString::number ( tc. m_font_weight ) + "," + ( tc. m_font_italic ? "1" : "0" );
238 cfg. writeEntry ( "Font", f ); 241 cfg. writeEntry ( "Font", f );
239 } 242 }
240 else 243 else
241 cfg. removeEntry ( "Font" ); 244 cfg. removeEntry ( "Font" );
242 245
243 QCopEnvelope be ( "QPE/Launcher", "setTabBackground(QString,int,QString)" ); 246 QCopEnvelope be ( "QPE/Launcher", "setTabBackground(QString,int,QString)" );
244 247
245 switch ( tc. m_bg_type ) { 248 switch ( tc. m_bg_type ) {
246 case TabConfig::Ruled: 249 case TabConfig::Ruled:
247 cfg.writeEntry( "BackgroundType", "Ruled" ); 250 cfg.writeEntry( "BackgroundType", "Ruled" );
248 be << *it << tc. m_bg_type << QString(""); 251 be << *it << tc. m_bg_type << QString("");
249 break; 252 break;
250 case TabConfig::SolidColor: 253 case TabConfig::SolidColor:
251 cfg.writeEntry( "BackgroundType", "SolidColor" ); 254 cfg.writeEntry( "BackgroundType", "SolidColor" );
252 be << *it << tc. m_bg_type << tc. m_bg_color; 255 be << *it << tc. m_bg_type << tc. m_bg_color;
253 break; 256 break;
254 case TabConfig::Image: 257 case TabConfig::Image:
255 cfg.writeEntry( "BackgroundType", "Image" ); 258 cfg.writeEntry( "BackgroundType", "Image" );
256 be << *it << tc. m_bg_type << tc. m_bg_image; 259 be << *it << tc. m_bg_type << tc. m_bg_image;
257 break; 260 break;
258 } 261 }
259 262
260 QCopEnvelope te( "QPE/Launcher", "setTextColor(QString,QString)" ); 263 QCopEnvelope te( "QPE/Launcher", "setTextColor(QString,QString)" );
261 te << *it << tc. m_text_color; 264 te << *it << tc. m_text_color;
262 265
263 QCopEnvelope fe ( "QPE/Launcher", "setFont(QString,QString,int,int,int)" ); 266 QCopEnvelope fe ( "QPE/Launcher", "setFont(QString,QString,int,int,int)" );
264 fe << *it; 267 fe << *it;
265 fe << ( tc. m_font_use ? tc. m_font_family : QString::null ); 268 fe << ( tc. m_font_use ? tc. m_font_family : QString::null );
266 fe << tc. m_font_size; 269 fe << tc. m_font_size;
267 fe << tc. m_font_weight; 270 fe << tc. m_font_weight;
268 fe << ( tc. m_font_italic ? 1 : 0 ); 271 fe << ( tc. m_font_italic ? 1 : 0 );
269 272
270 tc. m_changed = false; 273 tc. m_changed = false;
271 } 274 }
272 cfg. setGroup ( "GUI" ); 275 cfg. setGroup ( "GUI" );
273 QString busytype = QString ( m_busyani-> isChecked ( ) ? "Animated" : "" ); 276 QString busytype = QString ( m_busyani-> isChecked ( ) ? "Animated" : "" );
274 cfg. writeEntry ( "BusyType", busytype ); 277 cfg. writeEntry ( "BusyType", busytype );
275 278
276 cfg. writeEntry ( "BigBusy", m_bigbusy->isChecked( ) ); 279 cfg. writeEntry ( "BigBusy", m_bigbusy->isChecked( ) );
277 280
278 { 281 {
279 QCopEnvelope e ( "QPE/Launcher", "setBusyIndicatorType(QString)" ); 282 QCopEnvelope e ( "QPE/Launcher", "setBusyIndicatorType(QString)" );
280 e << busytype; 283 e << busytype;
281 } 284 }
282} 285}
283 286
284void TabsSettings::newClicked ( ) 287void TabsSettings::newClicked ( )
285{ 288{
286 QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" )); 289 QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" ));
287} 290}
288 291
289void TabsSettings::deleteClicked ( ) 292void TabsSettings::deleteClicked ( )
290{ 293{
291 int ind = m_list-> currentItem ( ); 294 int ind = m_list-> currentItem ( );
292 295
293 if ( ind < 0 ) 296 if ( ind < 0 )
294 return; 297 return;
295 298
296 QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" )); 299 QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" ));
297} 300}
298 301
299void TabsSettings::editClicked ( ) 302void TabsSettings::editClicked ( )
300{ 303{
301 int ind = m_list-> currentItem ( ); 304 int ind = m_list-> currentItem ( );
302 305
303 if ( ind < 0 ) 306 if ( ind < 0 )
304 return; 307 return;
305 308
306 TabConfig tc = m_tabs [m_ids [ind]]; 309 TabConfig tc = m_tabs [m_ids [ind]];
307 310
308 TabDialog *d = new TabDialog ( m_list-> pixmap ( ind ), m_list-> text ( ind ), tc, this, "TabDialog", true ); 311 TabDialog *d = new TabDialog ( m_list-> pixmap ( ind ), m_list-> text ( ind ), tc, this, "TabDialog", true );
309 312
310 if ( QPEApplication::execDialog( d ) == QDialog::Accepted ) { 313 if ( QPEApplication::execDialog( d ) == QDialog::Accepted ) {
311 tc. m_changed = true; 314 tc. m_changed = true;
312 m_tabs [m_ids [ind]] = tc; 315 m_tabs [m_ids [ind]] = tc;
313 316
314 if ( m_ids [ind] == GLOBALID ) { 317 if ( m_ids [ind] == GLOBALID ) {
315 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { 318 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) {
316 if ( *it != GLOBALID ) 319 if ( *it != GLOBALID )
317 m_tabs [*it] = tc; 320 m_tabs [*it] = tc;
318 } 321 }
319 } 322 }
320 } 323 }
321 324
322 delete d; 325 delete d;
323} 326}