-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | core/launcher/documentlist.cpp | 4 |
2 files changed, 5 insertions, 2 deletions
@@ -1,187 +1,188 @@ | |||
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 | * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl) |
7 | 7 | ||
8 | Fixed Bugs | 8 | Fixed Bugs |
9 | ---------- | 9 | ---------- |
10 | * #1501 - Fixed bug in todo sql backend (eilers) | 10 | * #1501 - Fixed bug in todo sql backend (eilers) |
11 | * 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) |
12 | * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl) | ||
12 | 13 | ||
13 | Internal | 14 | Internal |
14 | -------- | 15 | -------- |
15 | * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl) | 16 | * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl) |
16 | 17 | ||
17 | 2004-11-26Opie 1.1.8 | 18 | 2004-11-26Opie 1.1.8 |
18 | 19 | ||
19 | New Features | 20 | New Features |
20 | ------------ | 21 | ------------ |
21 | * PackageManager supports installation of local ipkg files (drw) | 22 | * PackageManager supports installation of local ipkg files (drw) |
22 | * PackageManager supports linking of applications to root (drw) | 23 | * PackageManager supports linking of applications to root (drw) |
23 | * PackageManager supports src/gz feeds (drw,wimpie) | 24 | * PackageManager supports src/gz feeds (drw,wimpie) |
24 | * Added a syslog information tab to sysinfo (mickeyl) | 25 | * Added a syslog information tab to sysinfo (mickeyl) |
25 | * Added new, more consistent, PIM icons + a GIMP teplate (ar) | 26 | * Added new, more consistent, PIM icons + a GIMP teplate (ar) |
26 | 27 | ||
27 | Fixed Bugs | 28 | Fixed Bugs |
28 | ---------- | 29 | ---------- |
29 | * #1017 - Tetrix doesn't display correctly for high resolution screens (drw) | 30 | * #1017 - Tetrix doesn't display correctly for high resolution screens (drw) |
30 | * #1269 - VCards were imported into personal area if it was activated (eilers) | 31 | * #1269 - VCards were imported into personal area if it was activated (eilers) |
31 | * #1464 - Packagemanager dont set active filter after install a package (drw) | 32 | * #1464 - Packagemanager dont set active filter after install a package (drw) |
32 | * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers) | 33 | * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers) |
33 | * #1493 - Fixed one column layout bug of the launcher (hrw) | 34 | * #1493 - Fixed one column layout bug of the launcher (hrw) |
34 | * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw) | 35 | * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw) |
35 | * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw) | 36 | * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw) |
36 | * n.a. - Battery Applet - fix sizing of battery info popup (drw,mickeyl) | 37 | * n.a. - Battery Applet - fix sizing of battery info popup (drw,mickeyl) |
37 | 38 | ||
38 | Internal | 39 | Internal |
39 | -------- | 40 | -------- |
40 | * Moved libopie1 to unsupported (mickeyl) | 41 | * Moved libopie1 to unsupported (mickeyl) |
41 | * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers) | 42 | * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers) |
42 | * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers) | 43 | * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers) |
43 | 44 | ||
44 | 2004-11-14Opie 1.1.7 | 45 | 2004-11-14Opie 1.1.7 |
45 | 46 | ||
46 | New Features | 47 | New Features |
47 | ------------ | 48 | ------------ |
48 | * libOpieDB now uses SQLite V3 instead V2. Remember to upgrade your database files! (eilers) | 49 | * libOpieDB now uses SQLite V3 instead V2. Remember to upgrade your database files! (eilers) |
49 | * Backup now uses the busy indicator when backing up and restore (ar) | 50 | * Backup now uses the busy indicator when backing up and restore (ar) |
50 | * OpiePlayer2 gained adding of Directories to the playlist (zecke) | 51 | * OpiePlayer2 gained adding of Directories to the playlist (zecke) |
51 | * OpiePlayer2 better error handling (zecke) | 52 | * OpiePlayer2 better error handling (zecke) |
52 | * OpiePlayer2 progress indication while streaming (zecke) | 53 | * OpiePlayer2 progress indication while streaming (zecke) |
53 | * OpiePlayer2 ported to use libxine 1.0.0-rc6a (brad,zecke) | 54 | * OpiePlayer2 ported to use libxine 1.0.0-rc6a (brad,zecke) |
54 | * Ported brightnessapplet from Qtopia 1.7 (mickeyl) | 55 | * Ported brightnessapplet from Qtopia 1.7 (mickeyl) |
55 | * Opie-Eye got a Digital Camera File Backend (alwin,zecke) | 56 | * Opie-Eye got a Digital Camera File Backend (alwin,zecke) |
56 | * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke) | 57 | * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke) |
57 | * Opie-Console use Custom Font and Size in a Profile (harlekin) | 58 | * Opie-Console use Custom Font and Size in a Profile (harlekin) |
58 | * Opie-Console transparently log the Output and Input to a file (harlekin) | 59 | * Opie-Console transparently log the Output and Input to a file (harlekin) |
59 | * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem) | 60 | * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem) |
60 | * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem) | 61 | * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem) |
61 | * Opie-Security gained a 'test authentication' button (clem) | 62 | * Opie-Security gained a 'test authentication' button (clem) |
62 | * Opie-Eye got a more unique layout (menubar), a slideshow, user can setup some defaults | 63 | * Opie-Eye got a more unique layout (menubar), a slideshow, user can setup some defaults |
63 | * Opie-Mail improve the handling of POP mail boxes (alwin) | 64 | * Opie-Mail improve the handling of POP mail boxes (alwin) |
64 | * Both Opie-Eye and Opie-Mail were greatly improved due the hard work of Rajko Albrecht(alwin) | 65 | * Both Opie-Eye and Opie-Mail were greatly improved due the hard work of Rajko Albrecht(alwin) |
65 | * Opie IRC - backports of the 'NeIRC fork' (zecke) | 66 | * Opie IRC - backports of the 'NeIRC fork' (zecke) |
66 | 67 | ||
67 | Fixed Bugs | 68 | Fixed Bugs |
68 | ---------- | 69 | ---------- |
69 | * #501 - Pickboard is able to show 'Umlaute' (TT,zecke) | 70 | * #501 - Pickboard is able to show 'Umlaute' (TT,zecke) |
70 | * #608 - Make Opie usable for left handed users (zecke) | 71 | * #608 - Make Opie usable for left handed users (zecke) |
71 | * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke) | 72 | * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke) |
72 | * #1245 - Opie-Go 'paused' (zecke) | 73 | * #1245 - Opie-Go 'paused' (zecke) |
73 | * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke) | 74 | * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke) |
74 | * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke) | 75 | * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke) |
75 | * #1395 - Build VNC Backend with gcc3.4 | 76 | * #1395 - Build VNC Backend with gcc3.4 |
76 | * #1440 - The icon of opie-mobilemsg is missing (CoreDump) | 77 | * #1440 - The icon of opie-mobilemsg is missing (CoreDump) |
77 | * #1426 - Add missing opie-bartender Icon (CoreDump) | 78 | * #1426 - Add missing opie-bartender Icon (CoreDump) |
78 | * #1445 - Opie-Sheet Has No Icon (CoreDump) | 79 | * #1445 - Opie-Sheet Has No Icon (CoreDump) |
79 | * #1448 - Brightness Applet added (mickeyl) | 80 | * #1448 - Brightness Applet added (mickeyl) |
80 | * #1450 - ZSame didn't clear the bonus item after winning a game (zecke) | 81 | * #1450 - ZSame didn't clear the bonus item after winning a game (zecke) |
81 | * #1482 - Fix OFileSelector to be able to sort by size (zecke) | 82 | * #1482 - Fix OFileSelector to be able to sort by size (zecke) |
82 | * n.a. - Opie-mail: fixed some crasher, some layout-problems | 83 | * n.a. - Opie-mail: fixed some crasher, some layout-problems |
83 | * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke) | 84 | * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke) |
84 | * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke) | 85 | * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke) |
85 | * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem) | 86 | * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (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) | 87 | * 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) |
87 | * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl) | 88 | * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl) |
88 | 89 | ||
89 | Internal | 90 | Internal |
90 | -------- | 91 | -------- |
91 | * Opie-Qashmoney has been moved to unsupported (mickeyl) | 92 | * Opie-Qashmoney has been moved to unsupported (mickeyl) |
92 | * Opie-Ubrowser has been moved to unsupported (mickeyl) | 93 | * Opie-Ubrowser has been moved to unsupported (mickeyl) |
93 | 94 | ||
94 | 2004-09-17Opie 1.1.6 | 95 | 2004-09-17Opie 1.1.6 |
95 | 96 | ||
96 | New Features | 97 | New Features |
97 | ------------ | 98 | ------------ |
98 | * Fifteen gained configurable number of items (zecke) | 99 | * Fifteen gained configurable number of items (zecke) |
99 | * Fifteen can have custom background images (zecke) | 100 | * Fifteen can have custom background images (zecke) |
100 | * Added daemonizing capabilities to QWS Server [via Qt/Embedded] (mickeyl) | 101 | * Added daemonizing capabilities to QWS Server [via Qt/Embedded] (mickeyl) |
101 | * Integrated the new security framework into libopie2 (zecke,clem) | 102 | * Integrated the new security framework into libopie2 (zecke,clem) |
102 | * Converted the launcher to use the new security framework (zecke) | 103 | * Converted the launcher to use the new security framework (zecke) |
103 | * Backup can now handle custom locations for backup and restore (ar) | 104 | * Backup can now handle custom locations for backup and restore (ar) |
104 | * Implemented right-on-hold feedback (wimpie,zecke) | 105 | * Implemented right-on-hold feedback (wimpie,zecke) |
105 | * Lots of new features in opie-reader (tim,pohly) | 106 | * Lots of new features in opie-reader (tim,pohly) |
106 | * Build system cleanups (schurig) | 107 | * Build system cleanups (schurig) |
107 | 108 | ||
108 | Fixed Bugs | 109 | Fixed Bugs |
109 | -------- | 110 | -------- |
110 | * #1005 - Fixed backup to CompactFlash (ar) | 111 | * #1005 - Fixed backup to CompactFlash (ar) |
111 | * #1167 - Fixed Opie write crashing on more text than one page (ar) | 112 | * #1167 - Fixed Opie write crashing on more text than one page (ar) |
112 | * #1225 - Fixed repeated light flashing on Zaurus with keyz (mickeyl) | 113 | * #1225 - Fixed repeated light flashing on Zaurus with keyz (mickeyl) |
113 | * #1359 - Fixed bookmarks in Gutenbrowser (ljp) | 114 | * #1359 - Fixed bookmarks in Gutenbrowser (ljp) |
114 | * #1361 - Fixed auto upercase in Opie-Addressbook (eilers) | 115 | * #1361 - Fixed auto upercase in Opie-Addressbook (eilers) |
115 | * #1370 - Pimconverter now reacts on cancel key (eilers) | 116 | * #1370 - Pimconverter now reacts on cancel key (eilers) |
116 | * #1376 - Bring back the capslock/numlock display (zecke) | 117 | * #1376 - Bring back the capslock/numlock display (zecke) |
117 | * #1383 - Language settings now warns about losing open apps (Markus Litz) | 118 | * #1383 - Language settings now warns about losing open apps (Markus Litz) |
118 | * #1393 - Fixed line wrap issues in opie-console for the default profile (mickeyl) | 119 | * #1393 - Fixed line wrap issues in opie-console for the default profile (mickeyl) |
119 | * #1394 - Fixed oversized headline in opie-login (coredump) | 120 | * #1394 - Fixed oversized headline in opie-login (coredump) |
120 | * #1396 - Opie-console captures the escape key and vim is working (zecke) | 121 | * #1396 - Opie-console captures the escape key and vim is working (zecke) |
121 | * #1401 - Scrollbar is now only visible if necessary in DocTab (mickeyl) | 122 | * #1401 - Scrollbar is now only visible if necessary in DocTab (mickeyl) |
122 | 123 | ||
123 | 2004-07-06Opie 1.1.4 | 124 | 2004-07-06Opie 1.1.4 |
124 | 125 | ||
125 | New Features | 126 | New Features |
126 | ------------ | 127 | ------------ |
127 | * Added four themes courtesy Robert Griebl (http://www.softforge.de/zstyle) | 128 | * Added four themes courtesy Robert Griebl (http://www.softforge.de/zstyle) |
128 | * Added Conversion tool for pim-data (eilers) | 129 | * Added Conversion tool for pim-data (eilers) |
129 | * Introduced new OPimAccessFactory and OBackendFactory which simplyfies database access (eilers) | 130 | * Introduced new OPimAccessFactory and OBackendFactory which simplyfies database access (eilers) |
130 | * Modified the PIM API for providing generic use of OPimRecords (eilers) | 131 | * Modified the PIM API for providing generic use of OPimRecords (eilers) |
131 | * Clicking on the application symbol now iterates over the application's top level widgets if already raised (zecke) | 132 | * Clicking on the application symbol now iterates over the application's top level widgets if already raised (zecke) |
132 | 133 | ||
133 | Fixed Bugs | 134 | Fixed Bugs |
134 | -------- | 135 | -------- |
135 | * #1068 - Country Drop Down Box Off Screen | 136 | * #1068 - Country Drop Down Box Off Screen |
136 | * #1291 - Opie tinykate does not open .desktop files (ar) | 137 | * #1291 - Opie tinykate does not open .desktop files (ar) |
137 | * #1291 - Opie sheet not saving correctly (ar) | 138 | * #1291 - Opie sheet not saving correctly (ar) |
138 | * #1294 - Opie does not know about British Summer Time | 139 | * #1294 - Opie does not know about British Summer Time |
139 | * #1314 - Drawpad initialization (mickeyl) | 140 | * #1314 - Drawpad initialization (mickeyl) |
140 | * #1317 - Packagemanager crashes on hold-down or install (chicken) | 141 | * #1317 - Packagemanager crashes on hold-down or install (chicken) |
141 | * #1321 - Batteryapplet graphic glitch (harlekin) | 142 | * #1321 - Batteryapplet graphic glitch (harlekin) |
142 | * #1324 - ZSafe not starting up (mickeyl) | 143 | * #1324 - ZSafe not starting up (mickeyl) |
143 | * #1328 - Personal Home Address fields is trimmed to 1char (eilers) | 144 | * #1328 - Personal Home Address fields is trimmed to 1char (eilers) |
144 | * #1327 - Opie-mail ipk does not depend on libopiedb2 (chicken) | 145 | * #1327 - Opie-mail ipk does not depend on libopiedb2 (chicken) |
145 | * #1345 - Networksettingsplugin wlan plugin dependency on libpcap0 (mickeyl) | 146 | * #1345 - Networksettingsplugin wlan plugin dependency on libpcap0 (mickeyl) |
146 | * #1348 - Datebook dependency on libopiedb2 (chicken) | 147 | * #1348 - Datebook dependency on libopiedb2 (chicken) |
147 | * #1328 - Switched SQLDatabase and VCards char encoding from latin1 to unicode (eilers) | 148 | * #1328 - Switched SQLDatabase and VCards char encoding from latin1 to unicode (eilers) |
148 | 149 | ||
149 | 2004-04-25Opie 1.1.3 | 150 | 2004-04-25Opie 1.1.3 |
150 | 151 | ||
151 | * Introduced first implementation of SQL-Support using SQLite (eilers) | 152 | * Introduced first implementation of SQL-Support using SQLite (eilers) |
152 | * Added a new Gutenberg Project reader app - opie-gutenbrowser (ljp) | 153 | * Added a new Gutenberg Project reader app - opie-gutenbrowser (ljp) |
153 | * Added a real system graffiti character set (brad) | 154 | * Added a real system graffiti character set (brad) |
154 | * Added Generic Keyconfig Widget (zecke) | 155 | * Added Generic Keyconfig Widget (zecke) |
155 | * Improved Screenshotapplet and Drawpad integration. You can now open a screenshot in drawpad and take notes (zecke) | 156 | * Improved Screenshotapplet and Drawpad integration. You can now open a screenshot in drawpad and take notes (zecke) |
156 | * Added new Bible reader app - opie-dagger (drw) | 157 | * Added new Bible reader app - opie-dagger (drw) |
157 | * Added a new Image Viewer. Work is ongoing (zecke,alwin) | 158 | * Added a new Image Viewer. Work is ongoing (zecke,alwin) |
158 | * Added namespace usage in libopie2 and everywhere (zecke,alwin) | 159 | * Added namespace usage in libopie2 and everywhere (zecke,alwin) |
159 | * Enabled the possibility to pass command line arguments to applications (mickeyl) | 160 | * Enabled the possibility to pass command line arguments to applications (mickeyl) |
160 | * Added an about applet showing some credits and information about Opie (mickeyl) | 161 | * Added an about applet showing some credits and information about Opie (mickeyl) |
161 | * Added benchmarking functionality to sysinfo (mickeyl) | 162 | * Added benchmarking functionality to sysinfo (mickeyl) |
162 | * Added applet and configuration application for switching hardware keyboard layouts (alwin) | 163 | * Added applet and configuration application for switching hardware keyboard layouts (alwin) |
163 | * Ported applications from libopie1 to libopie2* (drw,ar,alwin) | 164 | * Ported applications from libopie1 to libopie2* (drw,ar,alwin) |
164 | * Imported fullscreen and font improvements from the Qkonsole fork to embeddedkonsole (waspe) | 165 | * Imported fullscreen and font improvements from the Qkonsole fork to embeddedkonsole (waspe) |
165 | * Clean-up of package information in control files (drw) | 166 | * Clean-up of package information in control files (drw) |
166 | * Repaired mediummount which was broken since integrating the quicklauncher (alwin) | 167 | * Repaired mediummount which was broken since integrating the quicklauncher (alwin) |
167 | * Improved big-screen support (zecke,ar) | 168 | * Improved big-screen support (zecke,ar) |
168 | * Improved multikeyboard support, added keyboard layout switching applet (mouse) | 169 | * Improved multikeyboard support, added keyboard layout switching applet (mouse) |
169 | * Added a new mail client based on libetpan (harlekin,alwin,jgf) | 170 | * Added a new mail client based on libetpan (harlekin,alwin,jgf) |
170 | * Added new package manager - opie-packagemanager (drw) | 171 | * Added new package manager - opie-packagemanager (drw) |
171 | * Improved light-n-power for C7x0 (mickeyl) | 172 | * Improved light-n-power for C7x0 (mickeyl) |
172 | * Added automatic rotation support for C7x0 (treke) | 173 | * Added automatic rotation support for C7x0 (treke) |
173 | * Split libopie1 up into a set of smaller - functionally grouped - libraries (mickeyl) | 174 | * Split libopie1 up into a set of smaller - functionally grouped - libraries (mickeyl) |
174 | * Added scanning the wireless network neighbourhood to networksettings (mickeyl) | 175 | * Added scanning the wireless network neighbourhood to networksettings (mickeyl) |
175 | 176 | ||
176 | 2003-11-29Opie 1.0.3 | 177 | 2003-11-29Opie 1.0.3 |
177 | 178 | ||
178 | * Released as Version 1.0.3 | 179 | * Released as Version 1.0.3 |
179 | * Improved i18n (various contributors) | 180 | * Improved i18n (various contributors) |
180 | * Reduced application startup time by integrating the TT quicklauncher (zecke,harlekin) | 181 | * Reduced application startup time by integrating the TT quicklauncher (zecke,harlekin) |
181 | * Made the Documents Tab optional (mickeyl) | 182 | * Made the Documents Tab optional (mickeyl) |
182 | * Integrated basic support for HP iPAQ 54xx and the Jornada 5xx (chicken) | 183 | * Integrated basic support for HP iPAQ 54xx and the Jornada 5xx (chicken) |
183 | 184 | ||
184 | 2003-08-04Opie 1.0.0 | 185 | 2003-08-04Opie 1.0.0 |
185 | 186 | ||
186 | * Released as Version 1.0.0 | 187 | * Released as Version 1.0.0 |
187 | * Including a PPP module for easy dial up (tille,harlekin,zecke) | 188 | * Including a PPP module for easy dial up (tille,harlekin,zecke) |
diff --git a/core/launcher/documentlist.cpp b/core/launcher/documentlist.cpp index 9781a32..d2b9afa 100644 --- a/core/launcher/documentlist.cpp +++ b/core/launcher/documentlist.cpp | |||
@@ -357,387 +357,389 @@ void DocumentList::DiffAppLnks() | |||
357 | QPixmap pm = appLnkSet2->typePixmap(*ittypes); | 357 | QPixmap pm = appLnkSet2->typePixmap(*ittypes); |
358 | QPixmap bgPm = appLnkSet2->typeBigPixmap(*ittypes); | 358 | QPixmap bgPm = appLnkSet2->typeBigPixmap(*ittypes); |
359 | 359 | ||
360 | if (pm.isNull()) { | 360 | if (pm.isNull()) { |
361 | QImage img( Resource::loadImage( "UnknownDocument" ) ); | 361 | QImage img( Resource::loadImage( "UnknownDocument" ) ); |
362 | pm = img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ); | 362 | pm = img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ); |
363 | bgPm = img.smoothScale( AppLnk::bigIconSize(), AppLnk::bigIconSize() ); | 363 | bgPm = img.smoothScale( AppLnk::bigIconSize(), AppLnk::bigIconSize() ); |
364 | } | 364 | } |
365 | 365 | ||
366 | odebug << "adding type " << (*ittypes) << "" << oendl; | 366 | odebug << "adding type " << (*ittypes) << "" << oendl; |
367 | 367 | ||
368 | // ### our current launcher expects docs tab to be last | 368 | // ### our current launcher expects docs tab to be last |
369 | d->serverGui->typeAdded( *ittypes, name.isNull() ? (*ittypes) : name, pm, bgPm ); | 369 | d->serverGui->typeAdded( *ittypes, name.isNull() ? (*ittypes) : name, pm, bgPm ); |
370 | } | 370 | } |
371 | prevTypeList.remove(*ittypes); | 371 | prevTypeList.remove(*ittypes); |
372 | } | 372 | } |
373 | } | 373 | } |
374 | for ( QStringList::Iterator ittypes=prevTypeList.begin(); ittypes!=prevTypeList.end(); ++ittypes) { | 374 | for ( QStringList::Iterator ittypes=prevTypeList.begin(); ittypes!=prevTypeList.end(); ++ittypes) { |
375 | odebug << "removing type " << (*ittypes) << "" << oendl; | 375 | odebug << "removing type " << (*ittypes) << "" << oendl; |
376 | d->serverGui->typeRemoved(*ittypes); | 376 | d->serverGui->typeRemoved(*ittypes); |
377 | } | 377 | } |
378 | prevTypeList = types; | 378 | prevTypeList = types; |
379 | } | 379 | } |
380 | 380 | ||
381 | 381 | ||
382 | QListIterator<AppLnk> it1( appLnkSet->children() ); | 382 | QListIterator<AppLnk> it1( appLnkSet->children() ); |
383 | QListIterator<AppLnk> it2( appLnkSet2->children() ); | 383 | QListIterator<AppLnk> it2( appLnkSet2->children() ); |
384 | 384 | ||
385 | AppLnk *i; | 385 | AppLnk *i; |
386 | AppLnk *j; | 386 | AppLnk *j; |
387 | bool found; | 387 | bool found; |
388 | 388 | ||
389 | while ( (j=it2.current()) ) { | 389 | while ( (j=it2.current()) ) { |
390 | it1 = appLnkSet->children(); | 390 | it1 = appLnkSet->children(); |
391 | found = false; | 391 | found = false; |
392 | while ( (i=it1.current()) ){ | 392 | while ( (i=it1.current()) ){ |
393 | if (strcmp(i->name().ascii(),j->name().ascii()) == 0) | 393 | if (strcmp(i->name().ascii(),j->name().ascii()) == 0) |
394 | found = true; | 394 | found = true; |
395 | ++it1; | 395 | ++it1; |
396 | } | 396 | } |
397 | if (!found) { | 397 | if (!found) { |
398 | odebug << "Item " << j->name().ascii() << " needs to be added" << oendl; | 398 | odebug << "Item " << j->name().ascii() << " needs to be added" << oendl; |
399 | d->serverGui->applicationAdded( j->type(), *j ); | 399 | d->serverGui->applicationAdded( j->type(), *j ); |
400 | } | 400 | } |
401 | ++it2; | 401 | ++it2; |
402 | } | 402 | } |
403 | 403 | ||
404 | it1 = appLnkSet->children(); | 404 | it1 = appLnkSet->children(); |
405 | while ( (i=it1.current()) ) { | 405 | while ( (i=it1.current()) ) { |
406 | it2 = appLnkSet2->children(); | 406 | it2 = appLnkSet2->children(); |
407 | found = false; | 407 | found = false; |
408 | while ( (j=it2.current()) ){ | 408 | while ( (j=it2.current()) ){ |
409 | if (strcmp(i->name().ascii(),j->name().ascii()) == 0) | 409 | if (strcmp(i->name().ascii(),j->name().ascii()) == 0) |
410 | found = true; | 410 | found = true; |
411 | ++it2; | 411 | ++it2; |
412 | } | 412 | } |
413 | if (!found) { | 413 | if (!found) { |
414 | odebug << "Item " << i->name().ascii() << " needs to be removed" << oendl; | 414 | odebug << "Item " << i->name().ascii() << " needs to be removed" << oendl; |
415 | d->serverGui->applicationRemoved( i->type(), *i ); | 415 | d->serverGui->applicationRemoved( i->type(), *i ); |
416 | } | 416 | } |
417 | 417 | ||
418 | ++it1; | 418 | ++it1; |
419 | } | 419 | } |
420 | 420 | ||
421 | delete appLnkSet; | 421 | delete appLnkSet; |
422 | appLnkSet = appLnkSet2; | 422 | appLnkSet = appLnkSet2; |
423 | 423 | ||
424 | } | 424 | } |
425 | void DocumentList::storageChanged() | 425 | void DocumentList::storageChanged() |
426 | { | 426 | { |
427 | QTime t; | 427 | QTime t; |
428 | // ### can implement better | 428 | // ### can implement better |
429 | 429 | ||
430 | t.start(); | 430 | t.start(); |
431 | DiffAppLnks(); | 431 | DiffAppLnks(); |
432 | // reloadAppLnks(); | 432 | // reloadAppLnks(); |
433 | odebug << "Reload App links took " << t.elapsed() << " ms" << oendl; | 433 | odebug << "Reload App links took " << t.elapsed() << " ms" << oendl; |
434 | reloadDocLnks(); | 434 | reloadDocLnks(); |
435 | // odebug << "Reload links took " << t.elapsed() << " ms " << oendl; | 435 | // odebug << "Reload links took " << t.elapsed() << " ms " << oendl; |
436 | odebug << "Reload All links took " << t.elapsed() << " ms" << oendl; | 436 | odebug << "Reload All links took " << t.elapsed() << " ms" << oendl; |
437 | // ### Optimization opportunity | 437 | // ### Optimization opportunity |
438 | // Could be a bit more intelligent and somehow work out which | 438 | // Could be a bit more intelligent and somehow work out which |
439 | // mtab entry has changed and then only scan that and add and remove | 439 | // mtab entry has changed and then only scan that and add and remove |
440 | // links appropriately. | 440 | // links appropriately. |
441 | // rescan(); | 441 | // rescan(); |
442 | } | 442 | } |
443 | 443 | ||
444 | void DocumentList::sendAllDocLinks() | 444 | void DocumentList::sendAllDocLinks() |
445 | { | 445 | { |
446 | if ( d->tid != 0 ) { | 446 | if ( d->tid != 0 ) { |
447 | // We are in the middle of scanning, set a flag so | 447 | // We are in the middle of scanning, set a flag so |
448 | // we do this when we finish our scanning | 448 | // we do this when we finish our scanning |
449 | d->needToSendAllDocLinks = true; | 449 | d->needToSendAllDocLinks = true; |
450 | return; | 450 | return; |
451 | } | 451 | } |
452 | 452 | ||
453 | QString contents; | 453 | QString contents; |
454 | Categories cats; | 454 | Categories cats; |
455 | for ( QListIterator<DocLnk> it( d->dls.children() ); it.current(); ++it ) { | 455 | for ( QListIterator<DocLnk> it( d->dls.children() ); it.current(); ++it ) { |
456 | DocLnk *doc = it.current(); | 456 | DocLnk *doc = it.current(); |
457 | QFileInfo fi( doc->file() ); | 457 | QFileInfo fi( doc->file() ); |
458 | if ( !fi.exists() ) | 458 | if ( !fi.exists() ) |
459 | continue; | 459 | continue; |
460 | 460 | ||
461 | bool fake = !doc->linkFileKnown(); | 461 | bool fake = !doc->linkFileKnown(); |
462 | if ( !fake ) { | 462 | if ( !fake ) { |
463 | QFile f( doc->linkFile() ); | 463 | QFile f( doc->linkFile() ); |
464 | if ( f.open( IO_ReadOnly ) ) { | 464 | if ( f.open( IO_ReadOnly ) ) { |
465 | QTextStream ts( &f ); | 465 | QTextStream ts( &f ); |
466 | ts.setEncoding( QTextStream::UnicodeUTF8 ); | 466 | ts.setEncoding( QTextStream::UnicodeUTF8 ); |
467 | QString docLnk = ts.read(); | 467 | QString docLnk = ts.read(); |
468 | // Strip out the (stale) LinkFile entry | 468 | // Strip out the (stale) LinkFile entry |
469 | int start = docLnk.find( "\nLinkFile = " ) + 1; | 469 | int start = docLnk.find( "\nLinkFile = " ) + 1; |
470 | if ( start > 0 ) { | 470 | if ( start > 0 ) { |
471 | int end = docLnk.find( "\n", start + 1 ) + 1; | 471 | int end = docLnk.find( "\n", start + 1 ) + 1; |
472 | contents += docLnk.left(start); | 472 | contents += docLnk.left(start); |
473 | contents += docLnk.mid(end); | 473 | contents += docLnk.mid(end); |
474 | } else { | 474 | } else { |
475 | contents += docLnk; | 475 | contents += docLnk; |
476 | } | 476 | } |
477 | contents += "LinkFile = " + doc->linkFile() + "\n"; | 477 | contents += "LinkFile = " + doc->linkFile() + "\n"; |
478 | 478 | ||
479 | f.close(); | 479 | f.close(); |
480 | } else | 480 | } else |
481 | fake = TRUE; | 481 | fake = TRUE; |
482 | } | 482 | } |
483 | if (fake) { | 483 | if (fake) { |
484 | contents += "[Desktop Entry]\n"; // No tr | 484 | contents += "[Desktop Entry]\n"; // No tr |
485 | contents += "Categories = " + // No tr | 485 | contents += "Categories = " + // No tr |
486 | cats.labels("Document View",doc->categories()).join(";") + "\n"; // No tr | 486 | cats.labels("Document View",doc->categories()).join(";") + "\n"; // No tr |
487 | contents += "Name = "+doc->name()+"\n"; // No tr | 487 | contents += "Name = "+doc->name()+"\n"; // No tr |
488 | contents += "Type = "+doc->type()+"\n"; // No tr | 488 | contents += "Type = "+doc->type()+"\n"; // No tr |
489 | } | 489 | } |
490 | contents += "File = "+doc->file()+"\n"; // No tr // (resolves path) | 490 | contents += "File = "+doc->file()+"\n"; // No tr // (resolves path) |
491 | contents += QString("Size = %1\n").arg( fi.size() ); // No tr | 491 | contents += QString("Size = %1\n").arg( fi.size() ); // No tr |
492 | } | 492 | } |
493 | 493 | ||
494 | //odebug << "sending length " << contents.length() << "" << oendl; | 494 | //odebug << "sending length " << contents.length() << "" << oendl; |
495 | #ifndef QT_NO_COP | 495 | #ifndef QT_NO_COP |
496 | QCopEnvelope e( "QPE/Desktop", "docLinks(QString)" ); | 496 | QCopEnvelope e( "QPE/Desktop", "docLinks(QString)" ); |
497 | e << contents; | 497 | e << contents; |
498 | #endif | 498 | #endif |
499 | //odebug << "================ \n\n" << contents << "\n\n===============" << oendl; | 499 | //odebug << "================ \n\n" << contents << "\n\n===============" << oendl; |
500 | 500 | ||
501 | d->needToSendAllDocLinks = false; | 501 | d->needToSendAllDocLinks = false; |
502 | } | 502 | } |
503 | 503 | ||
504 | 504 | ||
505 | 505 | ||
506 | 506 | ||
507 | 507 | ||
508 | 508 | ||
509 | 509 | ||
510 | 510 | ||
511 | 511 | ||
512 | 512 | ||
513 | 513 | ||
514 | 514 | ||
515 | 515 | ||
516 | 516 | ||
517 | 517 | ||
518 | 518 | ||
519 | 519 | ||
520 | 520 | ||
521 | 521 | ||
522 | 522 | ||
523 | 523 | ||
524 | 524 | ||
525 | 525 | ||
526 | 526 | ||
527 | DocumentListPrivate::DocumentListPrivate( ServerInterface *gui ) | 527 | DocumentListPrivate::DocumentListPrivate( ServerInterface *gui ) |
528 | { | 528 | { |
529 | storage = new StorageInfo( this ); | 529 | storage = new StorageInfo( this ); |
530 | serverGui = gui; | 530 | serverGui = gui; |
531 | if ( serverGui ) { | 531 | if ( serverGui ) { |
532 | sendAppLnks = serverGui->requiresApplications(); | 532 | sendAppLnks = serverGui->requiresApplications(); |
533 | sendDocLnks = serverGui->requiresDocuments(); | 533 | sendDocLnks = serverGui->requiresDocuments(); |
534 | } else { | 534 | } else { |
535 | sendAppLnks = false; | 535 | sendAppLnks = false; |
536 | sendDocLnks = false; | 536 | sendDocLnks = false; |
537 | } | 537 | } |
538 | for ( int i = 0; i < MAX_SEARCH_DEPTH; i++ ) { | 538 | for ( int i = 0; i < MAX_SEARCH_DEPTH; i++ ) { |
539 | listDirs[i] = 0; | 539 | listDirs[i] = 0; |
540 | lists[i] = 0; | 540 | lists[i] = 0; |
541 | listPositions[i] = 0; | 541 | listPositions[i] = 0; |
542 | } | 542 | } |
543 | initialize(); | 543 | initialize(); |
544 | tid = 0; | 544 | tid = 0; |
545 | } | 545 | } |
546 | 546 | ||
547 | void DocumentListPrivate::appendDocpath(FileSystem*fs) | 547 | void DocumentListPrivate::appendDocpath(FileSystem*fs) |
548 | { | 548 | { |
549 | Config c( "qpe" ); | ||
550 | c.setGroup( "Startup" ); | ||
549 | QDir defPath(fs->path()+"/Documents"); | 551 | QDir defPath(fs->path()+"/Documents"); |
550 | QFileInfo f(fs->path()+"/.opiestorage.cf"); | 552 | QFileInfo f(fs->path()+"/.opiestorage.cf"); |
551 | if (!f.exists()) { | 553 | if ( c.readNumEntry( "FirstUse", 42 ) == 0 && !f.exists()) { |
552 | Mediadlg dlg(fs); | 554 | Mediadlg dlg(fs); |
553 | if (QDialog::Accepted != QPEApplication::execDialog( &dlg )) { | 555 | if (QDialog::Accepted != QPEApplication::execDialog( &dlg )) { |
554 | return; | 556 | return; |
555 | } | 557 | } |
556 | } | 558 | } |
557 | Config conf(f.filePath(), Config::File ); | 559 | Config conf(f.filePath(), Config::File ); |
558 | conf.setGroup("main"); | 560 | conf.setGroup("main"); |
559 | if (!conf.readBoolEntry("check",false)) { | 561 | if (!conf.readBoolEntry("check",false)) { |
560 | return; | 562 | return; |
561 | } | 563 | } |
562 | conf.setGroup("subdirs"); | 564 | conf.setGroup("subdirs"); |
563 | bool read_all = conf.readBoolEntry("wholemedia",true); | 565 | bool read_all = conf.readBoolEntry("wholemedia",true); |
564 | if (read_all) { | 566 | if (read_all) { |
565 | docPaths+=fs->path(); | 567 | docPaths+=fs->path(); |
566 | return; | 568 | return; |
567 | } | 569 | } |
568 | QStringList subDirs = conf.readListEntry("subdirs",':'); | 570 | QStringList subDirs = conf.readListEntry("subdirs",':'); |
569 | if (subDirs.isEmpty()) { | 571 | if (subDirs.isEmpty()) { |
570 | if (defPath.exists()) { | 572 | if (defPath.exists()) { |
571 | docPaths+=defPath.path(); | 573 | docPaths+=defPath.path(); |
572 | } | 574 | } |
573 | return; | 575 | return; |
574 | } | 576 | } |
575 | for (unsigned c = 0; c < subDirs.count();++c) { | 577 | for (unsigned c = 0; c < subDirs.count();++c) { |
576 | QDir docDir(QString(fs->path()+"/"+subDirs[c])); | 578 | QDir docDir(QString(fs->path()+"/"+subDirs[c])); |
577 | if (docDir.exists()) { | 579 | if (docDir.exists()) { |
578 | docPaths+=docDir.path(); | 580 | docPaths+=docDir.path(); |
579 | } | 581 | } |
580 | } | 582 | } |
581 | } | 583 | } |
582 | 584 | ||
583 | void DocumentListPrivate::initialize() | 585 | void DocumentListPrivate::initialize() |
584 | { | 586 | { |
585 | // Reset | 587 | // Reset |
586 | dls.clear(); | 588 | dls.clear(); |
587 | docPaths.clear(); | 589 | docPaths.clear(); |
588 | reference.clear(); | 590 | reference.clear(); |
589 | 591 | ||
590 | QDir docDir( QPEApplication::documentDir() ); | 592 | QDir docDir( QPEApplication::documentDir() ); |
591 | if ( docDir.exists() ) | 593 | if ( docDir.exists() ) |
592 | docPaths += QPEApplication::documentDir(); | 594 | docPaths += QPEApplication::documentDir(); |
593 | int i = 1; | 595 | int i = 1; |
594 | const QList<FileSystem> &fs = storage->fileSystems(); | 596 | const QList<FileSystem> &fs = storage->fileSystems(); |
595 | QListIterator<FileSystem> it( fs ); | 597 | QListIterator<FileSystem> it( fs ); |
596 | for ( ; it.current(); ++it ) { | 598 | for ( ; it.current(); ++it ) { |
597 | if ( (*it)->isRemovable() ) { | 599 | if ( (*it)->isRemovable() ) { |
598 | appendDocpath((*it)); | 600 | appendDocpath((*it)); |
599 | ++i; | 601 | ++i; |
600 | } | 602 | } |
601 | } | 603 | } |
602 | 604 | ||
603 | for ( int i = 0; i < MAX_SEARCH_DEPTH; ++i ) { | 605 | for ( int i = 0; i < MAX_SEARCH_DEPTH; ++i ) { |
604 | if ( listDirs[i] ) { | 606 | if ( listDirs[i] ) { |
605 | delete listDirs[i]; | 607 | delete listDirs[i]; |
606 | listDirs[i] = 0; | 608 | listDirs[i] = 0; |
607 | } | 609 | } |
608 | lists[i] = 0; | 610 | lists[i] = 0; |
609 | listPositions[i] = 0; | 611 | listPositions[i] = 0; |
610 | } | 612 | } |
611 | 613 | ||
612 | docPathsSearched = 0; | 614 | docPathsSearched = 0; |
613 | searchDepth = -1; | 615 | searchDepth = -1; |
614 | state = Find; | 616 | state = Find; |
615 | dit = 0; | 617 | dit = 0; |
616 | } | 618 | } |
617 | 619 | ||
618 | 620 | ||
619 | DocumentListPrivate::~DocumentListPrivate() | 621 | DocumentListPrivate::~DocumentListPrivate() |
620 | { | 622 | { |
621 | for ( int i = 0; i < MAX_SEARCH_DEPTH; i++ ) | 623 | for ( int i = 0; i < MAX_SEARCH_DEPTH; i++ ) |
622 | if ( listDirs[i] ) | 624 | if ( listDirs[i] ) |
623 | delete listDirs[i]; | 625 | delete listDirs[i]; |
624 | delete dit; | 626 | delete dit; |
625 | } | 627 | } |
626 | 628 | ||
627 | 629 | ||
628 | void DocumentListPrivate::estimatedPercentScanned() | 630 | void DocumentListPrivate::estimatedPercentScanned() |
629 | { | 631 | { |
630 | double overallProgress = 0.0; | 632 | double overallProgress = 0.0; |
631 | double levelWeight = 75.0; | 633 | double levelWeight = 75.0; |
632 | 634 | ||
633 | int topCount = docPaths.count(); | 635 | int topCount = docPaths.count(); |
634 | if ( topCount > 1 ) { | 636 | if ( topCount > 1 ) { |
635 | levelWeight = levelWeight / topCount; | 637 | levelWeight = levelWeight / topCount; |
636 | overallProgress += (docPathsSearched - 1) * levelWeight; | 638 | overallProgress += (docPathsSearched - 1) * levelWeight; |
637 | } | 639 | } |
638 | 640 | ||
639 | for ( int d = 0; d <= searchDepth; d++ ) { | 641 | for ( int d = 0; d <= searchDepth; d++ ) { |
640 | if ( listDirs[d] ) { | 642 | if ( listDirs[d] ) { |
641 | int items = lists[d]->count(); | 643 | int items = lists[d]->count(); |
642 | if ( items > 1 ) { | 644 | if ( items > 1 ) { |
643 | levelWeight = levelWeight / items; | 645 | levelWeight = levelWeight / items; |
644 | // Take in to account "." and ".." | 646 | // Take in to account "." and ".." |
645 | overallProgress += (listPositions[d] - 3) * levelWeight; | 647 | overallProgress += (listPositions[d] - 3) * levelWeight; |
646 | } | 648 | } |
647 | } else { | 649 | } else { |
648 | break; | 650 | break; |
649 | } | 651 | } |
650 | } | 652 | } |
651 | 653 | ||
652 | // odebug << "overallProgress: " << overallProgress << "" << oendl; | 654 | // odebug << "overallProgress: " << overallProgress << "" << oendl; |
653 | 655 | ||
654 | if ( serverGui ) | 656 | if ( serverGui ) |
655 | serverGui->documentScanningProgress( (int)overallProgress ); | 657 | serverGui->documentScanningProgress( (int)overallProgress ); |
656 | } | 658 | } |
657 | 659 | ||
658 | 660 | ||
659 | const QString DocumentListPrivate::nextFile() | 661 | const QString DocumentListPrivate::nextFile() |
660 | { | 662 | { |
661 | while ( TRUE ) { | 663 | while ( TRUE ) { |
662 | while ( searchDepth < 0 ) { | 664 | while ( searchDepth < 0 ) { |
663 | // go to next base path | 665 | // go to next base path |
664 | if ( docPathsSearched >= docPaths.count() ) { | 666 | if ( docPathsSearched >= docPaths.count() ) { |
665 | // end of base paths | 667 | // end of base paths |
666 | return QString::null; | 668 | return QString::null; |
667 | } else { | 669 | } else { |
668 | QDir dir( docPaths[docPathsSearched] ); | 670 | QDir dir( docPaths[docPathsSearched] ); |
669 | // odebug << "now using base path: " << docPaths[docPathsSearched] << "" << oendl; | 671 | // odebug << "now using base path: " << docPaths[docPathsSearched] << "" << oendl; |
670 | docPathsSearched++; | 672 | docPathsSearched++; |
671 | if ( !dir.exists( ".Qtopia-ignore" ) ) { | 673 | if ( !dir.exists( ".Qtopia-ignore" ) ) { |
672 | listDirs[0] = new QDir( dir ); | 674 | listDirs[0] = new QDir( dir ); |
673 | lists[0] = listDirs[0]->entryInfoList(); | 675 | lists[0] = listDirs[0]->entryInfoList(); |
674 | listPositions[0] = 0; | 676 | listPositions[0] = 0; |
675 | searchDepth = 0; | 677 | searchDepth = 0; |
676 | } | 678 | } |
677 | } | 679 | } |
678 | } | 680 | } |
679 | 681 | ||
680 | const QFileInfoList *fil = lists[searchDepth]; | 682 | const QFileInfoList *fil = lists[searchDepth]; |
681 | if (!fil) { | 683 | if (!fil) { |
682 | return QString::null; | 684 | return QString::null; |
683 | } | 685 | } |
684 | QFileInfoList *fl = (QFileInfoList *)fil; | 686 | QFileInfoList *fl = (QFileInfoList *)fil; |
685 | unsigned int pos = listPositions[searchDepth]; | 687 | unsigned int pos = listPositions[searchDepth]; |
686 | 688 | ||
687 | if ( pos >= fl->count() ) { | 689 | if ( pos >= fl->count() ) { |
688 | // go up a depth | 690 | // go up a depth |
689 | delete listDirs[searchDepth]; | 691 | delete listDirs[searchDepth]; |
690 | listDirs[searchDepth] = 0; | 692 | listDirs[searchDepth] = 0; |
691 | lists[searchDepth] = 0; | 693 | lists[searchDepth] = 0; |
692 | listPositions[searchDepth] = 0; | 694 | listPositions[searchDepth] = 0; |
693 | searchDepth--; | 695 | searchDepth--; |
694 | } else { | 696 | } else { |
695 | const QFileInfo *fi = fl->at(pos); | 697 | const QFileInfo *fi = fl->at(pos); |
696 | listPositions[searchDepth]++; | 698 | listPositions[searchDepth]++; |
697 | QString bn = fi->fileName(); | 699 | QString bn = fi->fileName(); |
698 | if ( bn[0] != '.' ) { | 700 | if ( bn[0] != '.' ) { |
699 | if ( fi->isDir() ) { | 701 | if ( fi->isDir() ) { |
700 | if ( bn != "CVS" && bn != "Qtopia" && bn != "QtPalmtop" ) { | 702 | if ( bn != "CVS" && bn != "Qtopia" && bn != "QtPalmtop" ) { |
701 | // go down a depth | 703 | // go down a depth |
702 | QDir dir( fi->filePath() ); | 704 | QDir dir( fi->filePath() ); |
703 | // odebug << "now going in to path: " << bn << "" << oendl; | 705 | // odebug << "now going in to path: " << bn << "" << oendl; |
704 | if ( !dir.exists( ".Qtopia-ignore" ) ) { | 706 | if ( !dir.exists( ".Qtopia-ignore" ) ) { |
705 | if ( searchDepth < MAX_SEARCH_DEPTH - 1) { | 707 | if ( searchDepth < MAX_SEARCH_DEPTH - 1) { |
706 | searchDepth++; | 708 | searchDepth++; |
707 | listDirs[searchDepth] = new QDir( dir ); | 709 | listDirs[searchDepth] = new QDir( dir ); |
708 | lists[searchDepth] = listDirs[searchDepth]->entryInfoList(); | 710 | lists[searchDepth] = listDirs[searchDepth]->entryInfoList(); |
709 | listPositions[searchDepth] = 0; | 711 | listPositions[searchDepth] = 0; |
710 | } | 712 | } |
711 | } | 713 | } |
712 | } | 714 | } |
713 | } else { | 715 | } else { |
714 | estimatedPercentScanned(); | 716 | estimatedPercentScanned(); |
715 | return fl->at(pos)->filePath(); | 717 | return fl->at(pos)->filePath(); |
716 | } | 718 | } |
717 | } | 719 | } |
718 | } | 720 | } |
719 | } | 721 | } |
720 | 722 | ||
721 | return QString::null; | 723 | return QString::null; |
722 | } | 724 | } |
723 | 725 | ||
724 | 726 | ||
725 | bool DocumentListPrivate::store( DocLnk* dl ) | 727 | bool DocumentListPrivate::store( DocLnk* dl ) |
726 | { | 728 | { |
727 | // if ( dl->fileKnown() && !dl->file().isEmpty() ) { | 729 | // if ( dl->fileKnown() && !dl->file().isEmpty() ) { |
728 | if ( dl && dl->fileKnown() ) { | 730 | if ( dl && dl->fileKnown() ) { |
729 | dls.add( dl ); // store | 731 | dls.add( dl ); // store |
730 | return TRUE; | 732 | return TRUE; |
731 | } | 733 | } |
732 | 734 | ||
733 | // don't store - delete | 735 | // don't store - delete |
734 | delete dl; | 736 | delete dl; |
735 | return FALSE; | 737 | return FALSE; |
736 | } | 738 | } |
737 | 739 | ||
738 | 740 | ||
739 | #define MAGIC_NUMBER ((void*)2) | 741 | #define MAGIC_NUMBER ((void*)2) |
740 | 742 | ||
741 | const DocLnk *DocumentListPrivate::iterate() | 743 | const DocLnk *DocumentListPrivate::iterate() |
742 | { | 744 | { |
743 | if ( state == Find ) { | 745 | if ( state == Find ) { |