summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--Makefile9
-rw-r--r--Makefile.Embedded9
-rw-r--r--bin/kdepim/kopiemail/germantranslation.txt10
-rw-r--r--kmicromail/koprefs.cpp5
-rw-r--r--kmicromail/koprefs.h1
-rw-r--r--kmicromail/koprefsdialog.cpp19
-rw-r--r--kmicromail/mainwindow.cpp64
-rw-r--r--kmicromail/opiemail.cpp3
-rw-r--r--korganizer/kowhatsnextview.cpp2
-rw-r--r--microkde/KDGanttMinimizeSplitter.cpp10
-rw-r--r--microkde/KDGanttMinimizeSplitter.h2
11 files changed, 101 insertions, 33 deletions
diff --git a/Makefile b/Makefile
index 68619b9..9656532 100644
--- a/Makefile
+++ b/Makefile
@@ -150,215 +150,216 @@ build_pwmanager: build_microkde
150variable_info: 150variable_info:
151 @echo -------------------------------------- 151 @echo --------------------------------------
152 @echo KDEPIM buildsystem, variableinfo... 152 @echo KDEPIM buildsystem, variableinfo...
153 @echo KDEPIMDIR=$(KDEPIMDIR) 153 @echo KDEPIMDIR=$(KDEPIMDIR)
154 @echo QTDIR=$(QTDIR) 154 @echo QTDIR=$(QTDIR)
155 @echo QPEDIR=$(QPEDIR) 155 @echo QPEDIR=$(QPEDIR)
156 @echo OPIEDIR=$(OPIEDIR) 156 @echo OPIEDIR=$(OPIEDIR)
157 @echo PLATFORM=$(PLATFORM) 157 @echo PLATFORM=$(PLATFORM)
158 @echo RELEASE_DEBUG=$(RELEASE_DEBUG) 158 @echo RELEASE_DEBUG=$(RELEASE_DEBUG)
159 @echo BUILD_NO_MICROMAIL=$(BUILD_NO_MICROMAIL) 159 @echo BUILD_NO_MICROMAIL=$(BUILD_NO_MICROMAIL)
160 @echo BUILD_NO_LDAP_PLUGIN=$(BUILD_NO_LDAP_PLUGIN) 160 @echo BUILD_NO_LDAP_PLUGIN=$(BUILD_NO_LDAP_PLUGIN)
161 @echo BUILD_NO_OPIE_PLUGIN=$(BUILD_NO_OPIE_PLUGIN) 161 @echo BUILD_NO_OPIE_PLUGIN=$(BUILD_NO_OPIE_PLUGIN)
162 @echo BUILD_NO_QTOPIA_PLUGIN=$(BUILD_NO_QTOPIA_PLUGIN) 162 @echo BUILD_NO_QTOPIA_PLUGIN=$(BUILD_NO_QTOPIA_PLUGIN)
163 @echo BUILD_NO_SHARP_PLUGIN=$(BUILD_NO_SHARP_PLUGIN) 163 @echo BUILD_NO_SHARP_PLUGIN=$(BUILD_NO_SHARP_PLUGIN)
164 ifndef BUILD_NO_SHARP_PLUGIN 164 ifndef BUILD_NO_SHARP_PLUGIN
165 @echo SHARPDTMSDK=$(SHARPDTMSDK) 165 @echo SHARPDTMSDK=$(SHARPDTMSDK)
166 endif 166 endif
167 @echo BUILD_NO_GAMMU=$(BUILD_NO_GAMMU) 167 @echo BUILD_NO_GAMMU=$(BUILD_NO_GAMMU)
168 @echo BUILD_NO_PWMANAGER=$(BUILD_NO_PWMANAGER) 168 @echo BUILD_NO_PWMANAGER=$(BUILD_NO_PWMANAGER)
169 @echo -------------------------------------- 169 @echo --------------------------------------
170 170
171variable_test: variable_info 171variable_test: variable_info
172 @echo KDEPIM buildsystem, variablecheck... 172 @echo KDEPIM buildsystem, variablecheck...
173 ifndef KDEPIMDIR 173 ifndef KDEPIMDIR
174 @echo KDEPIMDIR is not defined. 174 @echo KDEPIMDIR is not defined.
175 $(error KDEPIMDIR is not defined) 175 $(error KDEPIMDIR is not defined)
176 endif 176 endif
177 ifndef PLATFORM 177 ifndef PLATFORM
178 @echo PLATFORM is not defined. 178 @echo PLATFORM is not defined.
179 $(error PLATFORM is not defined) 179 $(error PLATFORM is not defined)
180 endif 180 endif
181 ifdef BUILD_NO_LDAP_PLUGIN 181 ifdef BUILD_NO_LDAP_PLUGIN
182 @echo LDAP PLUGIN will not be build, because BUILD_NO_LDAP_PLUGIN is set to $(BUILD_NO_LDAP_PLUGIN) 182 @echo LDAP PLUGIN will not be build, because BUILD_NO_LDAP_PLUGIN is set to $(BUILD_NO_LDAP_PLUGIN)
183 endif 183 endif
184 ifdef BUILD_NO_OPIE_PLUGIN 184 ifdef BUILD_NO_OPIE_PLUGIN
185 @echo OPIE PLUGIN will not be build, because BUILD_NO_OPIE_PLUGIN is set to $(BUILD_NO_OPIE_PLUGIN) 185 @echo OPIE PLUGIN will not be build, because BUILD_NO_OPIE_PLUGIN is set to $(BUILD_NO_OPIE_PLUGIN)
186 endif 186 endif
187 ifdef BUILD_NO_QTOPIA_PLUGIN 187 ifdef BUILD_NO_QTOPIA_PLUGIN
188 @echo QTOPIA PLUGIN will not be build, because BUILD_NO__QTOPIA_PLUGIN is set to $(BUILD_NO__QTOPIA_PLUGIN) 188 @echo QTOPIA PLUGIN will not be build, because BUILD_NO__QTOPIA_PLUGIN is set to $(BUILD_NO__QTOPIA_PLUGIN)
189 endif 189 endif
190 ifdef BUILD_NO_MICROMAIL 190 ifdef BUILD_NO_MICROMAIL
191 @echo MICROMAIL will not be build, because BUILD_NO_MICROMAIL is set to $(BUILD_NO_MICROMAIL) 191 @echo MICROMAIL will not be build, because BUILD_NO_MICROMAIL is set to $(BUILD_NO_MICROMAIL)
192 endif 192 endif
193 ifdef BUILD_NO_SHARP_PLUGIN 193 ifdef BUILD_NO_SHARP_PLUGIN
194 @echo SHARP PLUGIN will not be build, because BUILD_NO_SHARP_PLUGIN is set to $(BUILD_NO_SHARP_PLUGIN) 194 @echo SHARP PLUGIN will not be build, because BUILD_NO_SHARP_PLUGIN is set to $(BUILD_NO_SHARP_PLUGIN)
195 else 195 else
196 ifndef SHARPDTMSDK 196 ifndef SHARPDTMSDK
197 @echo SHARP PLUGIN can not be build, because SHARPDTMSDK is set to $(SHARPDTMSDK) 197 @echo SHARP PLUGIN can not be build, because SHARPDTMSDK is set to $(SHARPDTMSDK)
198 $(error SHARPDTMSDK is not defined) 198 $(error SHARPDTMSDK is not defined)
199 endif 199 endif
200 endif 200 endif
201 ifdef BUILD_NO_GAMMU 201 ifdef BUILD_NO_GAMMU
202 @echo GAMMU will not be build, because BUILD_NO_GAMMU is set to $(BUILD_NO_GAMMU) 202 @echo GAMMU will not be build, because BUILD_NO_GAMMU is set to $(BUILD_NO_GAMMU)
203 endif 203 endif
204 ifdef BUILD_NO_PWMANAGER 204 ifdef BUILD_NO_PWMANAGER
205 @echo PWMANAGER will not be build, because BUILD_NO_PWMANAGER is set to $(BUILD_NO_PWMANAGER) 205 @echo PWMANAGER will not be build, because BUILD_NO_PWMANAGER is set to $(BUILD_NO_PWMANAGER)
206 endif 206 endif
207 @echo -------------------------------------- 207 @echo --------------------------------------
208 208
209 209
210objects: 210objects:
211 for i in $(SUBDIRS); do mkdir -p $$i/obj/$(PLATFORM); done 211 for i in $(SUBDIRS); do mkdir -p $$i/obj/$(PLATFORM); done
212 for i in $(SUBDIRS); do mkdir -p $$i/moc/$(PLATFORM); done 212 for i in $(SUBDIRS); do mkdir -p $$i/moc/$(PLATFORM); done
213 mkdir -p libical/lib/$(PLATFORM) 213 mkdir -p libical/lib/$(PLATFORM)
214 mkdir -p pwmanager/libcrypt/$(PLATFORM) 214 mkdir -p pwmanager/libcrypt/$(PLATFORM)
215 215
216clean: 216clean:
217 rm -rf libical/lib/$(PLATFORM)/*; 217 rm -rf libical/lib/$(PLATFORM)/*;
218 rm -rf pwmanager/libcrypt/$(PLATFORM)/*; 218 rm -rf pwmanager/libcrypt/$(PLATFORM)/*;
219 for i in $(SUBDIRS); do pushd $$i; make clean; rm -f *~;\ 219 for i in $(SUBDIRS); do pushd $$i; make clean; rm -f *~;\
220 rm -f obj/$(PLATFORM)/*; rm -f moc/$(PLATFORM)/*; rm Makefile$(PLATFORM); popd; \ 220 rm -f obj/$(PLATFORM)/*; rm -f moc/$(PLATFORM)/*; rm Makefile$(PLATFORM); popd; \
221 done 221 done
222 222
223pac: 223pac:
224 rm -f $(QPEDIR)/lib/libmicro* 224 rm -f $(QPEDIR)/lib/libmicro*
225 rm -f $(QPEDIR)/plugins/applets/libkopi* 225 rm -f $(QPEDIR)/plugins/applets/libkopi*
226 make 226 make
227 make install 227 make install
228 make dist 228 make dist
229install: 229install:
230 230
231 cd bin/kdepim; make install 231 cd bin/kdepim; make install
232 cp -r Pim $(QPEDIR)/apps 232 cp -r Pim $(QPEDIR)/apps
233 cp db2file/db2file $(QPEDIR)/bin/db2file 233 cp db2file/db2file $(QPEDIR)/bin/db2file
234 chmod ugo+x $(QPEDIR)/bin/db2file 234 chmod ugo+x $(QPEDIR)/bin/db2file
235 cp korganizer/korganizer.desktop $(QPEDIR)/apps/Pim/korganizer.desktop 235 cp korganizer/korganizer.desktop $(QPEDIR)/apps/Pim/korganizer.desktop
236 cp kaddressbook/kaddressbook.desktop $(QPEDIR)/apps/Pim/kaddressbook.desktop 236 cp kaddressbook/kaddressbook.desktop $(QPEDIR)/apps/Pim/kaddressbook.desktop
237 cp kmicromail/kmicromail.desktop $(QPEDIR)/apps/Pim/kopiemail.desktop 237 cp kmicromail/kmicromail.desktop $(QPEDIR)/apps/Pim/kopiemail.desktop
238 cp pwmanager/pwmanager/pwmanager.desktop $(QPEDIR)/apps/Pim/pwmanager.desktop 238 cp pwmanager/pwmanager/pwmanager.desktop $(QPEDIR)/apps/Pim/pwmanager.desktop
239 239
240dist: 240dist:
241 @echo Dont forget to do "make install" before "make dist" 241 @echo Dont forget to do "make install" before "make dist"
242 rm -f *arm.ipk 242 rm -f *arm.ipk
243 rm -f *ipk.zip 243 rm -f *ipk.zip
244 rm -f ../new_$(KDEPIM_VERSION)/* 244 rm -f ../new_$(KDEPIM_VERSION)/*
245 rm -f *~ 245 rm -f *~
246 cd ..;mkdir -p new_$(KDEPIM_VERSION) 246 cd ..;mkdir -p kdepimpi_$(KDEPIM_VERSION)
247 cd ../kdepimpi_$(KDEPIM_VERSION);mkdir -p ipk
247 cd ..; tar czf kdepimpi-$(KDEPIM_VERSION).tar.gz --exclude=obj --exclude=moc --exclude=CVS --exclude=Makefilezaurus --exclude=Makefileqtopia kdepim 248 cd ..; tar czf kdepimpi-$(KDEPIM_VERSION).tar.gz --exclude=obj --exclude=moc --exclude=CVS --exclude=Makefilezaurus --exclude=Makefileqtopia kdepim
248 mkipks kmicrokdelibs.control 249 mkipks kmicrokdelibs.control
249 mkipks korganizer.control 250 mkipks korganizer.control
250 mkipks kaddressbook.control 251 mkipks kaddressbook.control
251 ifndef BUILD_NO_MICROMAIL 252 ifndef BUILD_NO_MICROMAIL
252 mkipks kopiemail.control 253 mkipks kopiemail.control
253 endif 254 endif
254 ifndef BUILD_NO_SHARP_PLUGIN 255 ifndef BUILD_NO_SHARP_PLUGIN
255 mkipks ksharpPIM-DTMaccess.control 256 mkipks ksharpPIM-DTMaccess.control
256 endif 257 endif
257 mkipks korganizer-alarm.control 258 mkipks korganizer-alarm.control
258 ifndef BUILD_NO_GAMMU 259 ifndef BUILD_NO_GAMMU
259 mkipks kmobilephoneaccess.control 260 mkipks kmobilephoneaccess.control
260 endif 261 endif
261 ifndef BUILD_NO_PWMANAGER 262 ifndef BUILD_NO_PWMANAGER
262 mkipks pwmanager.control 263 mkipks pwmanager.control
263 endif 264 endif
264 mkipks pimTABicon.control 265 mkipks pimTABicon.control
265 zip kdepim_$(KDEPIM_VERSION)_for_SharpRom.ipk.zip *.ipk ReleaseNotes.txt 266 zip kdepim_$(KDEPIM_VERSION)_for_SharpRom.ipk.zip *.ipk ReleaseNotes.txt
266 mv *.ipk ../new_$(KDEPIM_VERSION)/ 267 mv *.ipk ../kdepimpi_$(KDEPIM_VERSION)/ipk/
267 mv *for_SharpRom.ipk.zip ../new_$(KDEPIM_VERSION)/ 268 mv *for_SharpRom.ipk.zip ../kdepimpi_$(KDEPIM_VERSION)/
268 mv ../kdepimpi-$(KDEPIM_VERSION).tar.gz ../new_$(KDEPIM_VERSION)/ 269 mv ../kdepimpi-$(KDEPIM_VERSION).tar.gz ../kdepimpi_$(KDEPIM_VERSION)/
269 270
270tmake: objects \ 271tmake: objects \
271 qtcompat/Makefile$(PLATFORM) \ 272 qtcompat/Makefile$(PLATFORM) \
272 microkde/Makefile$(PLATFORM) \ 273 microkde/Makefile$(PLATFORM) \
273 libkcal/Makefile$(PLATFORM) \ 274 libkcal/Makefile$(PLATFORM) \
274 libkdepim/Makefile$(PLATFORM) \ 275 libkdepim/Makefile$(PLATFORM) \
275 korganizer/Makefile$(PLATFORM) \ 276 korganizer/Makefile$(PLATFORM) \
276 kalarmd/Makefile$(PLATFORM) \ 277 kalarmd/Makefile$(PLATFORM) \
277 libical/src/libical/Makefile$(PLATFORM) \ 278 libical/src/libical/Makefile$(PLATFORM) \
278 libical/src/libicalss/Makefile$(PLATFORM) \ 279 libical/src/libicalss/Makefile$(PLATFORM) \
279 kabc/Makefile$(PLATFORM) \ 280 kabc/Makefile$(PLATFORM) \
280 kabc/formats/binary/Makefile$(PLATFORM) \ 281 kabc/formats/binary/Makefile$(PLATFORM) \
281 kabc/plugins/file/Makefile$(PLATFORM) \ 282 kabc/plugins/file/Makefile$(PLATFORM) \
282 kabc/plugins/dir/Makefile$(PLATFORM) \ 283 kabc/plugins/dir/Makefile$(PLATFORM) \
283 kabc/plugins/ldap/Makefile$(PLATFORM) \ 284 kabc/plugins/ldap/Makefile$(PLATFORM) \
284 kabc/plugins/opie/Makefile$(PLATFORM) \ 285 kabc/plugins/opie/Makefile$(PLATFORM) \
285 kabc/plugins/qtopia/Makefile$(PLATFORM) \ 286 kabc/plugins/qtopia/Makefile$(PLATFORM) \
286 kabc/plugins/sharpdtm/Makefile$(PLATFORM) \ 287 kabc/plugins/sharpdtm/Makefile$(PLATFORM) \
287 kaddressbook/Makefile$(PLATFORM) \ 288 kaddressbook/Makefile$(PLATFORM) \
288 kmicromail/Makefile$(PLATFORM) \ 289 kmicromail/Makefile$(PLATFORM) \
289 kmicromail/libetpan/Makefile$(PLATFORM) \ 290 kmicromail/libetpan/Makefile$(PLATFORM) \
290 kmicromail/libmailwrapper/Makefile$(PLATFORM) \ 291 kmicromail/libmailwrapper/Makefile$(PLATFORM) \
291 gammu/emb/common/Makefile$(PLATFORM) \ 292 gammu/emb/common/Makefile$(PLATFORM) \
292 gammu/emb/gammu/Makefile$(PLATFORM) \ 293 gammu/emb/gammu/Makefile$(PLATFORM) \
293 pwmanager/pwmanager/Makefile$(PLATFORM) \ 294 pwmanager/pwmanager/Makefile$(PLATFORM) \
294 pwmanager/libcrypt/mpi/Makefile$(PLATFORM) \ 295 pwmanager/libcrypt/mpi/Makefile$(PLATFORM) \
295 pwmanager/libcrypt/error/Makefile$(PLATFORM) \ 296 pwmanager/libcrypt/error/Makefile$(PLATFORM) \
296 pwmanager/libcrypt/cipher/Makefile$(PLATFORM) \ 297 pwmanager/libcrypt/cipher/Makefile$(PLATFORM) \
297 pwmanager/libcrypt/zlib/Makefile$(PLATFORM) 298 pwmanager/libcrypt/zlib/Makefile$(PLATFORM)
298 299
299qtcompat/Makefile$(PLATFORM): qtcompat/qtcompat.pro 300qtcompat/Makefile$(PLATFORM): qtcompat/qtcompat.pro
300 cd qtcompat; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" qtcompat.pro -o Makefile$(PLATFORM) 301 cd qtcompat; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" qtcompat.pro -o Makefile$(PLATFORM)
301 302
302microkde/Makefile$(PLATFORM): microkde/microkdeE.pro 303microkde/Makefile$(PLATFORM): microkde/microkdeE.pro
303 cd microkde; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" microkdeE.pro -o Makefile$(PLATFORM) 304 cd microkde; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" microkdeE.pro -o Makefile$(PLATFORM)
304 305
305libkcal/Makefile$(PLATFORM): libkcal/libkcalE.pro 306libkcal/Makefile$(PLATFORM): libkcal/libkcalE.pro
306 cd libkcal; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libkcalE.pro -o Makefile$(PLATFORM) 307 cd libkcal; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libkcalE.pro -o Makefile$(PLATFORM)
307 308
308 309
309libkdepim/Makefile$(PLATFORM): libkdepim/libkdepimE.pro 310libkdepim/Makefile$(PLATFORM): libkdepim/libkdepimE.pro
310 cd libkdepim; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libkdepimE.pro -o Makefile$(PLATFORM) 311 cd libkdepim; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libkdepimE.pro -o Makefile$(PLATFORM)
311 312
312kalarmd/Makefile$(PLATFORM): kalarmd/kalarmdE.pro 313kalarmd/Makefile$(PLATFORM): kalarmd/kalarmdE.pro
313 cd kalarmd; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kalarmdE.pro -o Makefile$(PLATFORM) 314 cd kalarmd; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kalarmdE.pro -o Makefile$(PLATFORM)
314 315
315korganizer/Makefile$(PLATFORM): korganizer/korganizerE.pro 316korganizer/Makefile$(PLATFORM): korganizer/korganizerE.pro
316 cd korganizer; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" korganizerE.pro -o Makefile$(PLATFORM) 317 cd korganizer; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" korganizerE.pro -o Makefile$(PLATFORM)
317 318
318libical/src/libical/Makefile$(PLATFORM): libical/src/libical/libicalE.pro 319libical/src/libical/Makefile$(PLATFORM): libical/src/libical/libicalE.pro
319 cd libical/src/libical; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libicalE.pro -o Makefile$(PLATFORM) 320 cd libical/src/libical; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libicalE.pro -o Makefile$(PLATFORM)
320 321
321libical/src/libicalss/Makefile$(PLATFORM): libical/src/libicalss/libicalssE.pro 322libical/src/libicalss/Makefile$(PLATFORM): libical/src/libicalss/libicalssE.pro
322 cd libical/src/libicalss; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libicalssE.pro -o Makefile$(PLATFORM) 323 cd libical/src/libicalss; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libicalssE.pro -o Makefile$(PLATFORM)
323 324
324kabc/Makefile$(PLATFORM): kabc/kabcE.pro 325kabc/Makefile$(PLATFORM): kabc/kabcE.pro
325 cd kabc; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kabcE.pro -o Makefile$(PLATFORM) 326 cd kabc; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kabcE.pro -o Makefile$(PLATFORM)
326 327
327kabc/formats/binary/Makefile$(PLATFORM): kabc/formats/binary/kabcformat_binaryE.pro 328kabc/formats/binary/Makefile$(PLATFORM): kabc/formats/binary/kabcformat_binaryE.pro
328 cd kabc/formats/binary; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kabcformat_binaryE.pro -o Makefile$(PLATFORM) 329 cd kabc/formats/binary; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kabcformat_binaryE.pro -o Makefile$(PLATFORM)
329 330
330kabc/plugins/file/Makefile$(PLATFORM): kabc/plugins/file/fileE.pro 331kabc/plugins/file/Makefile$(PLATFORM): kabc/plugins/file/fileE.pro
331 cd kabc/plugins/file; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" fileE.pro -o Makefile$(PLATFORM) 332 cd kabc/plugins/file; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" fileE.pro -o Makefile$(PLATFORM)
332 333
333kabc/plugins/dir/Makefile$(PLATFORM): kabc/plugins/dir/dirE.pro 334kabc/plugins/dir/Makefile$(PLATFORM): kabc/plugins/dir/dirE.pro
334 cd kabc/plugins/dir; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" dirE.pro -o Makefile$(PLATFORM) 335 cd kabc/plugins/dir; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" dirE.pro -o Makefile$(PLATFORM)
335 336
336kabc/plugins/ldap/Makefile$(PLATFORM): kabc/plugins/ldap/ldapE.pro 337kabc/plugins/ldap/Makefile$(PLATFORM): kabc/plugins/ldap/ldapE.pro
337 cd kabc/plugins/ldap; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" ldapE.pro -o Makefile$(PLATFORM) 338 cd kabc/plugins/ldap; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" ldapE.pro -o Makefile$(PLATFORM)
338 339
339kabc/plugins/opie/Makefile$(PLATFORM): kabc/plugins/opie/opieE.pro 340kabc/plugins/opie/Makefile$(PLATFORM): kabc/plugins/opie/opieE.pro
340 cd kabc/plugins/opie; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" opieE.pro -o Makefile$(PLATFORM) 341 cd kabc/plugins/opie; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" opieE.pro -o Makefile$(PLATFORM)
341 342
342kabc/plugins/qtopia/Makefile$(PLATFORM): kabc/plugins/qtopia/qtopiaE.pro 343kabc/plugins/qtopia/Makefile$(PLATFORM): kabc/plugins/qtopia/qtopiaE.pro
343 cd kabc/plugins/qtopia; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" qtopiaE.pro -o Makefile$(PLATFORM) 344 cd kabc/plugins/qtopia; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" qtopiaE.pro -o Makefile$(PLATFORM)
344 345
345kabc/plugins/sharpdtm/Makefile$(PLATFORM): kabc/plugins/sharpdtm/sharpdtmE.pro 346kabc/plugins/sharpdtm/Makefile$(PLATFORM): kabc/plugins/sharpdtm/sharpdtmE.pro
346 cd kabc/plugins/sharpdtm; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" sharpdtmE.pro -o Makefile$(PLATFORM) 347 cd kabc/plugins/sharpdtm; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" sharpdtmE.pro -o Makefile$(PLATFORM)
347 348
348kaddressbook/Makefile$(PLATFORM): kaddressbook/kaddressbookE.pro 349kaddressbook/Makefile$(PLATFORM): kaddressbook/kaddressbookE.pro
349 cd kaddressbook; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kaddressbookE.pro -o Makefile$(PLATFORM) 350 cd kaddressbook; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kaddressbookE.pro -o Makefile$(PLATFORM)
350 351
351kmicromail/Makefile$(PLATFORM): kmicromail/kmicromailE.pro 352kmicromail/Makefile$(PLATFORM): kmicromail/kmicromailE.pro
352 cd kmicromail; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kmicromailE.pro -o Makefile$(PLATFORM) 353 cd kmicromail; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kmicromailE.pro -o Makefile$(PLATFORM)
353 354
354kmicromail/libetpan/Makefile$(PLATFORM): kmicromail/libetpan/libetpanE.pro 355kmicromail/libetpan/Makefile$(PLATFORM): kmicromail/libetpan/libetpanE.pro
355 cd kmicromail/libetpan; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libetpanE.pro -o Makefile$(PLATFORM) 356 cd kmicromail/libetpan; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libetpanE.pro -o Makefile$(PLATFORM)
356 357
357kmicromail/libmailwrapper/Makefile$(PLATFORM): kmicromail/libmailwrapper/libmailwrapperE.pro 358kmicromail/libmailwrapper/Makefile$(PLATFORM): kmicromail/libmailwrapper/libmailwrapperE.pro
358 cd kmicromail/libmailwrapper; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libmailwrapperE.pro -o Makefile$(PLATFORM) 359 cd kmicromail/libmailwrapper; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libmailwrapperE.pro -o Makefile$(PLATFORM)
359 360
360gammu/emb/common/Makefile$(PLATFORM): gammu/emb/common/commonE.pro 361gammu/emb/common/Makefile$(PLATFORM): gammu/emb/common/commonE.pro
361 cd gammu/emb/common; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" commonE.pro -o Makefile$(PLATFORM) 362 cd gammu/emb/common; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" commonE.pro -o Makefile$(PLATFORM)
362 363
363gammu/emb/gammu/Makefile$(PLATFORM): gammu/emb/gammu/gammuE.pro 364gammu/emb/gammu/Makefile$(PLATFORM): gammu/emb/gammu/gammuE.pro
364 cd gammu/emb/gammu; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" gammuE.pro -o Makefile$(PLATFORM) 365 cd gammu/emb/gammu; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" gammuE.pro -o Makefile$(PLATFORM)
diff --git a/Makefile.Embedded b/Makefile.Embedded
index 68619b9..9656532 100644
--- a/Makefile.Embedded
+++ b/Makefile.Embedded
@@ -150,215 +150,216 @@ build_pwmanager: build_microkde
150variable_info: 150variable_info:
151 @echo -------------------------------------- 151 @echo --------------------------------------
152 @echo KDEPIM buildsystem, variableinfo... 152 @echo KDEPIM buildsystem, variableinfo...
153 @echo KDEPIMDIR=$(KDEPIMDIR) 153 @echo KDEPIMDIR=$(KDEPIMDIR)
154 @echo QTDIR=$(QTDIR) 154 @echo QTDIR=$(QTDIR)
155 @echo QPEDIR=$(QPEDIR) 155 @echo QPEDIR=$(QPEDIR)
156 @echo OPIEDIR=$(OPIEDIR) 156 @echo OPIEDIR=$(OPIEDIR)
157 @echo PLATFORM=$(PLATFORM) 157 @echo PLATFORM=$(PLATFORM)
158 @echo RELEASE_DEBUG=$(RELEASE_DEBUG) 158 @echo RELEASE_DEBUG=$(RELEASE_DEBUG)
159 @echo BUILD_NO_MICROMAIL=$(BUILD_NO_MICROMAIL) 159 @echo BUILD_NO_MICROMAIL=$(BUILD_NO_MICROMAIL)
160 @echo BUILD_NO_LDAP_PLUGIN=$(BUILD_NO_LDAP_PLUGIN) 160 @echo BUILD_NO_LDAP_PLUGIN=$(BUILD_NO_LDAP_PLUGIN)
161 @echo BUILD_NO_OPIE_PLUGIN=$(BUILD_NO_OPIE_PLUGIN) 161 @echo BUILD_NO_OPIE_PLUGIN=$(BUILD_NO_OPIE_PLUGIN)
162 @echo BUILD_NO_QTOPIA_PLUGIN=$(BUILD_NO_QTOPIA_PLUGIN) 162 @echo BUILD_NO_QTOPIA_PLUGIN=$(BUILD_NO_QTOPIA_PLUGIN)
163 @echo BUILD_NO_SHARP_PLUGIN=$(BUILD_NO_SHARP_PLUGIN) 163 @echo BUILD_NO_SHARP_PLUGIN=$(BUILD_NO_SHARP_PLUGIN)
164 ifndef BUILD_NO_SHARP_PLUGIN 164 ifndef BUILD_NO_SHARP_PLUGIN
165 @echo SHARPDTMSDK=$(SHARPDTMSDK) 165 @echo SHARPDTMSDK=$(SHARPDTMSDK)
166 endif 166 endif
167 @echo BUILD_NO_GAMMU=$(BUILD_NO_GAMMU) 167 @echo BUILD_NO_GAMMU=$(BUILD_NO_GAMMU)
168 @echo BUILD_NO_PWMANAGER=$(BUILD_NO_PWMANAGER) 168 @echo BUILD_NO_PWMANAGER=$(BUILD_NO_PWMANAGER)
169 @echo -------------------------------------- 169 @echo --------------------------------------
170 170
171variable_test: variable_info 171variable_test: variable_info
172 @echo KDEPIM buildsystem, variablecheck... 172 @echo KDEPIM buildsystem, variablecheck...
173 ifndef KDEPIMDIR 173 ifndef KDEPIMDIR
174 @echo KDEPIMDIR is not defined. 174 @echo KDEPIMDIR is not defined.
175 $(error KDEPIMDIR is not defined) 175 $(error KDEPIMDIR is not defined)
176 endif 176 endif
177 ifndef PLATFORM 177 ifndef PLATFORM
178 @echo PLATFORM is not defined. 178 @echo PLATFORM is not defined.
179 $(error PLATFORM is not defined) 179 $(error PLATFORM is not defined)
180 endif 180 endif
181 ifdef BUILD_NO_LDAP_PLUGIN 181 ifdef BUILD_NO_LDAP_PLUGIN
182 @echo LDAP PLUGIN will not be build, because BUILD_NO_LDAP_PLUGIN is set to $(BUILD_NO_LDAP_PLUGIN) 182 @echo LDAP PLUGIN will not be build, because BUILD_NO_LDAP_PLUGIN is set to $(BUILD_NO_LDAP_PLUGIN)
183 endif 183 endif
184 ifdef BUILD_NO_OPIE_PLUGIN 184 ifdef BUILD_NO_OPIE_PLUGIN
185 @echo OPIE PLUGIN will not be build, because BUILD_NO_OPIE_PLUGIN is set to $(BUILD_NO_OPIE_PLUGIN) 185 @echo OPIE PLUGIN will not be build, because BUILD_NO_OPIE_PLUGIN is set to $(BUILD_NO_OPIE_PLUGIN)
186 endif 186 endif
187 ifdef BUILD_NO_QTOPIA_PLUGIN 187 ifdef BUILD_NO_QTOPIA_PLUGIN
188 @echo QTOPIA PLUGIN will not be build, because BUILD_NO__QTOPIA_PLUGIN is set to $(BUILD_NO__QTOPIA_PLUGIN) 188 @echo QTOPIA PLUGIN will not be build, because BUILD_NO__QTOPIA_PLUGIN is set to $(BUILD_NO__QTOPIA_PLUGIN)
189 endif 189 endif
190 ifdef BUILD_NO_MICROMAIL 190 ifdef BUILD_NO_MICROMAIL
191 @echo MICROMAIL will not be build, because BUILD_NO_MICROMAIL is set to $(BUILD_NO_MICROMAIL) 191 @echo MICROMAIL will not be build, because BUILD_NO_MICROMAIL is set to $(BUILD_NO_MICROMAIL)
192 endif 192 endif
193 ifdef BUILD_NO_SHARP_PLUGIN 193 ifdef BUILD_NO_SHARP_PLUGIN
194 @echo SHARP PLUGIN will not be build, because BUILD_NO_SHARP_PLUGIN is set to $(BUILD_NO_SHARP_PLUGIN) 194 @echo SHARP PLUGIN will not be build, because BUILD_NO_SHARP_PLUGIN is set to $(BUILD_NO_SHARP_PLUGIN)
195 else 195 else
196 ifndef SHARPDTMSDK 196 ifndef SHARPDTMSDK
197 @echo SHARP PLUGIN can not be build, because SHARPDTMSDK is set to $(SHARPDTMSDK) 197 @echo SHARP PLUGIN can not be build, because SHARPDTMSDK is set to $(SHARPDTMSDK)
198 $(error SHARPDTMSDK is not defined) 198 $(error SHARPDTMSDK is not defined)
199 endif 199 endif
200 endif 200 endif
201 ifdef BUILD_NO_GAMMU 201 ifdef BUILD_NO_GAMMU
202 @echo GAMMU will not be build, because BUILD_NO_GAMMU is set to $(BUILD_NO_GAMMU) 202 @echo GAMMU will not be build, because BUILD_NO_GAMMU is set to $(BUILD_NO_GAMMU)
203 endif 203 endif
204 ifdef BUILD_NO_PWMANAGER 204 ifdef BUILD_NO_PWMANAGER
205 @echo PWMANAGER will not be build, because BUILD_NO_PWMANAGER is set to $(BUILD_NO_PWMANAGER) 205 @echo PWMANAGER will not be build, because BUILD_NO_PWMANAGER is set to $(BUILD_NO_PWMANAGER)
206 endif 206 endif
207 @echo -------------------------------------- 207 @echo --------------------------------------
208 208
209 209
210objects: 210objects:
211 for i in $(SUBDIRS); do mkdir -p $$i/obj/$(PLATFORM); done 211 for i in $(SUBDIRS); do mkdir -p $$i/obj/$(PLATFORM); done
212 for i in $(SUBDIRS); do mkdir -p $$i/moc/$(PLATFORM); done 212 for i in $(SUBDIRS); do mkdir -p $$i/moc/$(PLATFORM); done
213 mkdir -p libical/lib/$(PLATFORM) 213 mkdir -p libical/lib/$(PLATFORM)
214 mkdir -p pwmanager/libcrypt/$(PLATFORM) 214 mkdir -p pwmanager/libcrypt/$(PLATFORM)
215 215
216clean: 216clean:
217 rm -rf libical/lib/$(PLATFORM)/*; 217 rm -rf libical/lib/$(PLATFORM)/*;
218 rm -rf pwmanager/libcrypt/$(PLATFORM)/*; 218 rm -rf pwmanager/libcrypt/$(PLATFORM)/*;
219 for i in $(SUBDIRS); do pushd $$i; make clean; rm -f *~;\ 219 for i in $(SUBDIRS); do pushd $$i; make clean; rm -f *~;\
220 rm -f obj/$(PLATFORM)/*; rm -f moc/$(PLATFORM)/*; rm Makefile$(PLATFORM); popd; \ 220 rm -f obj/$(PLATFORM)/*; rm -f moc/$(PLATFORM)/*; rm Makefile$(PLATFORM); popd; \
221 done 221 done
222 222
223pac: 223pac:
224 rm -f $(QPEDIR)/lib/libmicro* 224 rm -f $(QPEDIR)/lib/libmicro*
225 rm -f $(QPEDIR)/plugins/applets/libkopi* 225 rm -f $(QPEDIR)/plugins/applets/libkopi*
226 make 226 make
227 make install 227 make install
228 make dist 228 make dist
229install: 229install:
230 230
231 cd bin/kdepim; make install 231 cd bin/kdepim; make install
232 cp -r Pim $(QPEDIR)/apps 232 cp -r Pim $(QPEDIR)/apps
233 cp db2file/db2file $(QPEDIR)/bin/db2file 233 cp db2file/db2file $(QPEDIR)/bin/db2file
234 chmod ugo+x $(QPEDIR)/bin/db2file 234 chmod ugo+x $(QPEDIR)/bin/db2file
235 cp korganizer/korganizer.desktop $(QPEDIR)/apps/Pim/korganizer.desktop 235 cp korganizer/korganizer.desktop $(QPEDIR)/apps/Pim/korganizer.desktop
236 cp kaddressbook/kaddressbook.desktop $(QPEDIR)/apps/Pim/kaddressbook.desktop 236 cp kaddressbook/kaddressbook.desktop $(QPEDIR)/apps/Pim/kaddressbook.desktop
237 cp kmicromail/kmicromail.desktop $(QPEDIR)/apps/Pim/kopiemail.desktop 237 cp kmicromail/kmicromail.desktop $(QPEDIR)/apps/Pim/kopiemail.desktop
238 cp pwmanager/pwmanager/pwmanager.desktop $(QPEDIR)/apps/Pim/pwmanager.desktop 238 cp pwmanager/pwmanager/pwmanager.desktop $(QPEDIR)/apps/Pim/pwmanager.desktop
239 239
240dist: 240dist:
241 @echo Dont forget to do "make install" before "make dist" 241 @echo Dont forget to do "make install" before "make dist"
242 rm -f *arm.ipk 242 rm -f *arm.ipk
243 rm -f *ipk.zip 243 rm -f *ipk.zip
244 rm -f ../new_$(KDEPIM_VERSION)/* 244 rm -f ../new_$(KDEPIM_VERSION)/*
245 rm -f *~ 245 rm -f *~
246 cd ..;mkdir -p new_$(KDEPIM_VERSION) 246 cd ..;mkdir -p kdepimpi_$(KDEPIM_VERSION)
247 cd ../kdepimpi_$(KDEPIM_VERSION);mkdir -p ipk
247 cd ..; tar czf kdepimpi-$(KDEPIM_VERSION).tar.gz --exclude=obj --exclude=moc --exclude=CVS --exclude=Makefilezaurus --exclude=Makefileqtopia kdepim 248 cd ..; tar czf kdepimpi-$(KDEPIM_VERSION).tar.gz --exclude=obj --exclude=moc --exclude=CVS --exclude=Makefilezaurus --exclude=Makefileqtopia kdepim
248 mkipks kmicrokdelibs.control 249 mkipks kmicrokdelibs.control
249 mkipks korganizer.control 250 mkipks korganizer.control
250 mkipks kaddressbook.control 251 mkipks kaddressbook.control
251 ifndef BUILD_NO_MICROMAIL 252 ifndef BUILD_NO_MICROMAIL
252 mkipks kopiemail.control 253 mkipks kopiemail.control
253 endif 254 endif
254 ifndef BUILD_NO_SHARP_PLUGIN 255 ifndef BUILD_NO_SHARP_PLUGIN
255 mkipks ksharpPIM-DTMaccess.control 256 mkipks ksharpPIM-DTMaccess.control
256 endif 257 endif
257 mkipks korganizer-alarm.control 258 mkipks korganizer-alarm.control
258 ifndef BUILD_NO_GAMMU 259 ifndef BUILD_NO_GAMMU
259 mkipks kmobilephoneaccess.control 260 mkipks kmobilephoneaccess.control
260 endif 261 endif
261 ifndef BUILD_NO_PWMANAGER 262 ifndef BUILD_NO_PWMANAGER
262 mkipks pwmanager.control 263 mkipks pwmanager.control
263 endif 264 endif
264 mkipks pimTABicon.control 265 mkipks pimTABicon.control
265 zip kdepim_$(KDEPIM_VERSION)_for_SharpRom.ipk.zip *.ipk ReleaseNotes.txt 266 zip kdepim_$(KDEPIM_VERSION)_for_SharpRom.ipk.zip *.ipk ReleaseNotes.txt
266 mv *.ipk ../new_$(KDEPIM_VERSION)/ 267 mv *.ipk ../kdepimpi_$(KDEPIM_VERSION)/ipk/
267 mv *for_SharpRom.ipk.zip ../new_$(KDEPIM_VERSION)/ 268 mv *for_SharpRom.ipk.zip ../kdepimpi_$(KDEPIM_VERSION)/
268 mv ../kdepimpi-$(KDEPIM_VERSION).tar.gz ../new_$(KDEPIM_VERSION)/ 269 mv ../kdepimpi-$(KDEPIM_VERSION).tar.gz ../kdepimpi_$(KDEPIM_VERSION)/
269 270
270tmake: objects \ 271tmake: objects \
271 qtcompat/Makefile$(PLATFORM) \ 272 qtcompat/Makefile$(PLATFORM) \
272 microkde/Makefile$(PLATFORM) \ 273 microkde/Makefile$(PLATFORM) \
273 libkcal/Makefile$(PLATFORM) \ 274 libkcal/Makefile$(PLATFORM) \
274 libkdepim/Makefile$(PLATFORM) \ 275 libkdepim/Makefile$(PLATFORM) \
275 korganizer/Makefile$(PLATFORM) \ 276 korganizer/Makefile$(PLATFORM) \
276 kalarmd/Makefile$(PLATFORM) \ 277 kalarmd/Makefile$(PLATFORM) \
277 libical/src/libical/Makefile$(PLATFORM) \ 278 libical/src/libical/Makefile$(PLATFORM) \
278 libical/src/libicalss/Makefile$(PLATFORM) \ 279 libical/src/libicalss/Makefile$(PLATFORM) \
279 kabc/Makefile$(PLATFORM) \ 280 kabc/Makefile$(PLATFORM) \
280 kabc/formats/binary/Makefile$(PLATFORM) \ 281 kabc/formats/binary/Makefile$(PLATFORM) \
281 kabc/plugins/file/Makefile$(PLATFORM) \ 282 kabc/plugins/file/Makefile$(PLATFORM) \
282 kabc/plugins/dir/Makefile$(PLATFORM) \ 283 kabc/plugins/dir/Makefile$(PLATFORM) \
283 kabc/plugins/ldap/Makefile$(PLATFORM) \ 284 kabc/plugins/ldap/Makefile$(PLATFORM) \
284 kabc/plugins/opie/Makefile$(PLATFORM) \ 285 kabc/plugins/opie/Makefile$(PLATFORM) \
285 kabc/plugins/qtopia/Makefile$(PLATFORM) \ 286 kabc/plugins/qtopia/Makefile$(PLATFORM) \
286 kabc/plugins/sharpdtm/Makefile$(PLATFORM) \ 287 kabc/plugins/sharpdtm/Makefile$(PLATFORM) \
287 kaddressbook/Makefile$(PLATFORM) \ 288 kaddressbook/Makefile$(PLATFORM) \
288 kmicromail/Makefile$(PLATFORM) \ 289 kmicromail/Makefile$(PLATFORM) \
289 kmicromail/libetpan/Makefile$(PLATFORM) \ 290 kmicromail/libetpan/Makefile$(PLATFORM) \
290 kmicromail/libmailwrapper/Makefile$(PLATFORM) \ 291 kmicromail/libmailwrapper/Makefile$(PLATFORM) \
291 gammu/emb/common/Makefile$(PLATFORM) \ 292 gammu/emb/common/Makefile$(PLATFORM) \
292 gammu/emb/gammu/Makefile$(PLATFORM) \ 293 gammu/emb/gammu/Makefile$(PLATFORM) \
293 pwmanager/pwmanager/Makefile$(PLATFORM) \ 294 pwmanager/pwmanager/Makefile$(PLATFORM) \
294 pwmanager/libcrypt/mpi/Makefile$(PLATFORM) \ 295 pwmanager/libcrypt/mpi/Makefile$(PLATFORM) \
295 pwmanager/libcrypt/error/Makefile$(PLATFORM) \ 296 pwmanager/libcrypt/error/Makefile$(PLATFORM) \
296 pwmanager/libcrypt/cipher/Makefile$(PLATFORM) \ 297 pwmanager/libcrypt/cipher/Makefile$(PLATFORM) \
297 pwmanager/libcrypt/zlib/Makefile$(PLATFORM) 298 pwmanager/libcrypt/zlib/Makefile$(PLATFORM)
298 299
299qtcompat/Makefile$(PLATFORM): qtcompat/qtcompat.pro 300qtcompat/Makefile$(PLATFORM): qtcompat/qtcompat.pro
300 cd qtcompat; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" qtcompat.pro -o Makefile$(PLATFORM) 301 cd qtcompat; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" qtcompat.pro -o Makefile$(PLATFORM)
301 302
302microkde/Makefile$(PLATFORM): microkde/microkdeE.pro 303microkde/Makefile$(PLATFORM): microkde/microkdeE.pro
303 cd microkde; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" microkdeE.pro -o Makefile$(PLATFORM) 304 cd microkde; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" microkdeE.pro -o Makefile$(PLATFORM)
304 305
305libkcal/Makefile$(PLATFORM): libkcal/libkcalE.pro 306libkcal/Makefile$(PLATFORM): libkcal/libkcalE.pro
306 cd libkcal; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libkcalE.pro -o Makefile$(PLATFORM) 307 cd libkcal; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libkcalE.pro -o Makefile$(PLATFORM)
307 308
308 309
309libkdepim/Makefile$(PLATFORM): libkdepim/libkdepimE.pro 310libkdepim/Makefile$(PLATFORM): libkdepim/libkdepimE.pro
310 cd libkdepim; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libkdepimE.pro -o Makefile$(PLATFORM) 311 cd libkdepim; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libkdepimE.pro -o Makefile$(PLATFORM)
311 312
312kalarmd/Makefile$(PLATFORM): kalarmd/kalarmdE.pro 313kalarmd/Makefile$(PLATFORM): kalarmd/kalarmdE.pro
313 cd kalarmd; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kalarmdE.pro -o Makefile$(PLATFORM) 314 cd kalarmd; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kalarmdE.pro -o Makefile$(PLATFORM)
314 315
315korganizer/Makefile$(PLATFORM): korganizer/korganizerE.pro 316korganizer/Makefile$(PLATFORM): korganizer/korganizerE.pro
316 cd korganizer; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" korganizerE.pro -o Makefile$(PLATFORM) 317 cd korganizer; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" korganizerE.pro -o Makefile$(PLATFORM)
317 318
318libical/src/libical/Makefile$(PLATFORM): libical/src/libical/libicalE.pro 319libical/src/libical/Makefile$(PLATFORM): libical/src/libical/libicalE.pro
319 cd libical/src/libical; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libicalE.pro -o Makefile$(PLATFORM) 320 cd libical/src/libical; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libicalE.pro -o Makefile$(PLATFORM)
320 321
321libical/src/libicalss/Makefile$(PLATFORM): libical/src/libicalss/libicalssE.pro 322libical/src/libicalss/Makefile$(PLATFORM): libical/src/libicalss/libicalssE.pro
322 cd libical/src/libicalss; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libicalssE.pro -o Makefile$(PLATFORM) 323 cd libical/src/libicalss; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libicalssE.pro -o Makefile$(PLATFORM)
323 324
324kabc/Makefile$(PLATFORM): kabc/kabcE.pro 325kabc/Makefile$(PLATFORM): kabc/kabcE.pro
325 cd kabc; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kabcE.pro -o Makefile$(PLATFORM) 326 cd kabc; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kabcE.pro -o Makefile$(PLATFORM)
326 327
327kabc/formats/binary/Makefile$(PLATFORM): kabc/formats/binary/kabcformat_binaryE.pro 328kabc/formats/binary/Makefile$(PLATFORM): kabc/formats/binary/kabcformat_binaryE.pro
328 cd kabc/formats/binary; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kabcformat_binaryE.pro -o Makefile$(PLATFORM) 329 cd kabc/formats/binary; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kabcformat_binaryE.pro -o Makefile$(PLATFORM)
329 330
330kabc/plugins/file/Makefile$(PLATFORM): kabc/plugins/file/fileE.pro 331kabc/plugins/file/Makefile$(PLATFORM): kabc/plugins/file/fileE.pro
331 cd kabc/plugins/file; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" fileE.pro -o Makefile$(PLATFORM) 332 cd kabc/plugins/file; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" fileE.pro -o Makefile$(PLATFORM)
332 333
333kabc/plugins/dir/Makefile$(PLATFORM): kabc/plugins/dir/dirE.pro 334kabc/plugins/dir/Makefile$(PLATFORM): kabc/plugins/dir/dirE.pro
334 cd kabc/plugins/dir; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" dirE.pro -o Makefile$(PLATFORM) 335 cd kabc/plugins/dir; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" dirE.pro -o Makefile$(PLATFORM)
335 336
336kabc/plugins/ldap/Makefile$(PLATFORM): kabc/plugins/ldap/ldapE.pro 337kabc/plugins/ldap/Makefile$(PLATFORM): kabc/plugins/ldap/ldapE.pro
337 cd kabc/plugins/ldap; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" ldapE.pro -o Makefile$(PLATFORM) 338 cd kabc/plugins/ldap; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" ldapE.pro -o Makefile$(PLATFORM)
338 339
339kabc/plugins/opie/Makefile$(PLATFORM): kabc/plugins/opie/opieE.pro 340kabc/plugins/opie/Makefile$(PLATFORM): kabc/plugins/opie/opieE.pro
340 cd kabc/plugins/opie; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" opieE.pro -o Makefile$(PLATFORM) 341 cd kabc/plugins/opie; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" opieE.pro -o Makefile$(PLATFORM)
341 342
342kabc/plugins/qtopia/Makefile$(PLATFORM): kabc/plugins/qtopia/qtopiaE.pro 343kabc/plugins/qtopia/Makefile$(PLATFORM): kabc/plugins/qtopia/qtopiaE.pro
343 cd kabc/plugins/qtopia; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" qtopiaE.pro -o Makefile$(PLATFORM) 344 cd kabc/plugins/qtopia; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" qtopiaE.pro -o Makefile$(PLATFORM)
344 345
345kabc/plugins/sharpdtm/Makefile$(PLATFORM): kabc/plugins/sharpdtm/sharpdtmE.pro 346kabc/plugins/sharpdtm/Makefile$(PLATFORM): kabc/plugins/sharpdtm/sharpdtmE.pro
346 cd kabc/plugins/sharpdtm; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" sharpdtmE.pro -o Makefile$(PLATFORM) 347 cd kabc/plugins/sharpdtm; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" sharpdtmE.pro -o Makefile$(PLATFORM)
347 348
348kaddressbook/Makefile$(PLATFORM): kaddressbook/kaddressbookE.pro 349kaddressbook/Makefile$(PLATFORM): kaddressbook/kaddressbookE.pro
349 cd kaddressbook; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kaddressbookE.pro -o Makefile$(PLATFORM) 350 cd kaddressbook; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kaddressbookE.pro -o Makefile$(PLATFORM)
350 351
351kmicromail/Makefile$(PLATFORM): kmicromail/kmicromailE.pro 352kmicromail/Makefile$(PLATFORM): kmicromail/kmicromailE.pro
352 cd kmicromail; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kmicromailE.pro -o Makefile$(PLATFORM) 353 cd kmicromail; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kmicromailE.pro -o Makefile$(PLATFORM)
353 354
354kmicromail/libetpan/Makefile$(PLATFORM): kmicromail/libetpan/libetpanE.pro 355kmicromail/libetpan/Makefile$(PLATFORM): kmicromail/libetpan/libetpanE.pro
355 cd kmicromail/libetpan; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libetpanE.pro -o Makefile$(PLATFORM) 356 cd kmicromail/libetpan; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libetpanE.pro -o Makefile$(PLATFORM)
356 357
357kmicromail/libmailwrapper/Makefile$(PLATFORM): kmicromail/libmailwrapper/libmailwrapperE.pro 358kmicromail/libmailwrapper/Makefile$(PLATFORM): kmicromail/libmailwrapper/libmailwrapperE.pro
358 cd kmicromail/libmailwrapper; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libmailwrapperE.pro -o Makefile$(PLATFORM) 359 cd kmicromail/libmailwrapper; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libmailwrapperE.pro -o Makefile$(PLATFORM)
359 360
360gammu/emb/common/Makefile$(PLATFORM): gammu/emb/common/commonE.pro 361gammu/emb/common/Makefile$(PLATFORM): gammu/emb/common/commonE.pro
361 cd gammu/emb/common; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" commonE.pro -o Makefile$(PLATFORM) 362 cd gammu/emb/common; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" commonE.pro -o Makefile$(PLATFORM)
362 363
363gammu/emb/gammu/Makefile$(PLATFORM): gammu/emb/gammu/gammuE.pro 364gammu/emb/gammu/Makefile$(PLATFORM): gammu/emb/gammu/gammuE.pro
364 cd gammu/emb/gammu; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" gammuE.pro -o Makefile$(PLATFORM) 365 cd gammu/emb/gammu; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" gammuE.pro -o Makefile$(PLATFORM)
diff --git a/bin/kdepim/kopiemail/germantranslation.txt b/bin/kdepim/kopiemail/germantranslation.txt
index 86819b7..68dc6db 100644
--- a/bin/kdepim/kopiemail/germantranslation.txt
+++ b/bin/kdepim/kopiemail/germantranslation.txt
@@ -165,100 +165,110 @@
165{ "Mailbox has %1 mails","Mailbox hat %1 Mails" }, 165{ "Mailbox has %1 mails","Mailbox hat %1 Mails" },
166{ "Read this mail","Lies diese Mail" }, 166{ "Read this mail","Lies diese Mail" },
167{ "Move/Copy this mail","Verschiebe/kopiere diese Mail" }, 167{ "Move/Copy this mail","Verschiebe/kopiere diese Mail" },
168{ "Delete this mail","Lösche diese Mail" }, 168{ "Delete this mail","Lösche diese Mail" },
169{ "Move/Copy all selected mail","Verschiebe/kopiere selektierte Mails" }, 169{ "Move/Copy all selected mail","Verschiebe/kopiere selektierte Mails" },
170{ "Delete all selected mails","Lösche alle selektierten Mails" }, 170{ "Delete all selected mails","Lösche alle selektierten Mails" },
171{ "Clear selection","Selektion aufheben" }, 171{ "Clear selection","Selektion aufheben" },
172{ "Reply","Antworten" }, 172{ "Reply","Antworten" },
173{ "Forward","Weiterleiten" }, 173{ "Forward","Weiterleiten" },
174{ "Attachments","Anhang" }, 174{ "Attachments","Anhang" },
175{ "Show Html","Zeige in html" }, 175{ "Show Html","Zeige in html" },
176{ "Description","Beschreibung" }, 176{ "Description","Beschreibung" },
177{ "Filename","Dateiname" }, 177{ "Filename","Dateiname" },
178{ "E-Mail by %1","E-Mail von %1" }, 178{ "E-Mail by %1","E-Mail von %1" },
179{ "Cc","Kopie" }, 179{ "Cc","Kopie" },
180{ "To","An" }, 180{ "To","An" },
181{ "From","Von" }, 181{ "From","Von" },
182{ "<p>Do you really want to delete this mail? <br><br>","<p>Wollen Sie diese Mail wirklich löschen? <br><br>" }, 182{ "<p>Do you really want to delete this mail? <br><br>","<p>Wollen Sie diese Mail wirklich löschen? <br><br>" },
183{ "Mailbox has %1 mail(s)","Mailbox hat %1 Mail(s)" }, 183{ "Mailbox has %1 mail(s)","Mailbox hat %1 Mail(s)" },
184{ "Move/Copie all mails","Verschiebe/kopiere alle Mails" }, 184{ "Move/Copie all mails","Verschiebe/kopiere alle Mails" },
185{ "Delete all mails","Lösche alle Mails" }, 185{ "Delete all mails","Lösche alle Mails" },
186{ "Create new subfolder","Neues Unterverzeichnis" }, 186{ "Create new subfolder","Neues Unterverzeichnis" },
187{ "Delete folder","Lösche Verzeichnis" }, 187{ "Delete folder","Lösche Verzeichnis" },
188{ "Refresh folder list","Aktualisiere Liste" }, 188{ "Refresh folder list","Aktualisiere Liste" },
189{ "Create new folder","Neues Verzeichnis" }, 189{ "Create new folder","Neues Verzeichnis" },
190{ "Disconnect","Diskonnect" }, 190{ "Disconnect","Diskonnect" },
191{ "Set offline","Gehe offline" }, 191{ "Set offline","Gehe offline" },
192{ "Select target box","Wähle Ziel Box" }, 192{ "Select target box","Wähle Ziel Box" },
193{ "<b>Store mail(s) to</b>","<b>Speichere Mail(s) nach</b>" }, 193{ "<b>Store mail(s) to</b>","<b>Speichere Mail(s) nach</b>" },
194{ "Folder:","Verzeichnis:" }, 194{ "Folder:","Verzeichnis:" },
195{ "Account:","Zugang:" }, 195{ "Account:","Zugang:" },
196{ "Prefix will prepend, do not enter","Pfad-Prefix wird vorangestellt" }, 196{ "Prefix will prepend, do not enter","Pfad-Prefix wird vorangestellt" },
197{ "Move mail(s)","Verschiebe Mail(s)" }, 197{ "Move mail(s)","Verschiebe Mail(s)" },
198{ "only mails smaller","nur Mails kleiner" }, 198{ "only mails smaller","nur Mails kleiner" },
199{ " kB"," kB" }, 199{ " kB"," kB" },
200{ " message %1 of %2"," Nachricht %1 von %2" }, 200{ " message %1 of %2"," Nachricht %1 von %2" },
201{ "Copying...","Am Kopieren..." }, 201{ "Copying...","Am Kopieren..." },
202{ "Copy message %1 of %2","Kopiere Nachricht %1 von %2" }, 202{ "Copy message %1 of %2","Kopiere Nachricht %1 von %2" },
203{ "Do you really want to delete\nall selected mails?","Wollen Sie wirklich alle\nselektierten Mails Löschen?" }, 203{ "Do you really want to delete\nall selected mails?","Wollen Sie wirklich alle\nselektierten Mails Löschen?" },
204{ "Delete All Mails","Lösche alle Mails" }, 204{ "Delete All Mails","Lösche alle Mails" },
205{ "Deleting ...","Am Löschen..." }, 205{ "Deleting ...","Am Löschen..." },
206{ "Delete message %1 of %2","Lösche Nachricht %1 von %2" }, 206{ "Delete message %1 of %2","Lösche Nachricht %1 von %2" },
207{ "Compose Message","Verfasse Nachricht" }, 207{ "Compose Message","Verfasse Nachricht" },
208{ "Reply-To","Antwort-An" }, 208{ "Reply-To","Antwort-An" },
209{ "BCC","BCC" }, 209{ "BCC","BCC" },
210{ "Signature","Signatur" }, 210{ "Signature","Signatur" },
211{ "CC","Kopie" }, 211{ "CC","Kopie" },
212{ "Options","Optionen" }, 212{ "Options","Optionen" },
213{ "Delete File","Lösche Datei" }, 213{ "Delete File","Lösche Datei" },
214{ "Add File","Füge Datei hinzu" }, 214{ "Add File","Füge Datei hinzu" },
215{ "Attachment","Anhang" }, 215{ "Attachment","Anhang" },
216{ "send later","sende später" }, 216{ "send later","sende später" },
217{ "use:","via:" }, 217{ "use:","via:" },
218{ "Save","Speichern" }, 218{ "Save","Speichern" },
219{ "Name","Name" }, 219{ "Name","Name" },
220{ "No Receiver spezified","Kein Empfänger angegeben" }, 220{ "No Receiver spezified","Kein Empfänger angegeben" },
221{ "Sending mail","Sende Mail" }, 221{ "Sending mail","Sende Mail" },
222{ "No","Nein" }, 222{ "No","Nein" },
223{ "Yes","Ja" }, 223{ "Yes","Ja" },
224{ "Store message into drafts?\n","Speichere Nachricht in Entwürfe?\n" }, 224{ "Store message into drafts?\n","Speichere Nachricht in Entwürfe?\n" },
225{ "Store message?","Nachricht speichern?" }, 225{ "Store message?","Nachricht speichern?" },
226{ "Select Type","Selektiere Typ" }, 226{ "Select Type","Selektiere Typ" },
227{ "Select Account Type","Wähle Art des Zugangs" }, 227{ "Select Account Type","Wähle Art des Zugangs" },
228{ "IMAP","IMAP (online lesen)" }, 228{ "IMAP","IMAP (online lesen)" },
229{ "POP3","POP3 (holen)" }, 229{ "POP3","POP3 (holen)" },
230{ "SMTP","SMTP (senden)" }, 230{ "SMTP","SMTP (senden)" },
231{ "<p>Do you really want to delete the selected Account?</p>","<p>Möchten Sie wirklich den ausgewählten Account löschen?</p>" }, 231{ "<p>Do you really want to delete the selected Account?</p>","<p>Möchten Sie wirklich den ausgewählten Account löschen?</p>" },
232{ "Question","Eine Frage..." }, 232{ "Question","Eine Frage..." },
233{ "Send this message?","Nachricht wirklich senden?" }, 233{ "Send this message?","Nachricht wirklich senden?" },
234{ "Stop editing message","Stop editing message" }, 234{ "Stop editing message","Stop editing message" },
235{ "Sending mail %1 of %2","Sende Mail %1 von %2" }, 235{ "Sending mail %1 of %2","Sende Mail %1 von %2" },
236{ "%1 of %2 bytes send","%1 von %2 Bytes gesendet" }, 236{ "%1 of %2 bytes send","%1 von %2 Bytes gesendet" },
237{ "Refresh header list","Aktualisiere Titel Liste" }, 237{ "Refresh header list","Aktualisiere Titel Liste" },
238{ "Define a smtp\n account first!\n","Bitte zuerst einen\nSMTP Account anlegen!\n" }, 238{ "Define a smtp\n account first!\n","Bitte zuerst einen\nSMTP Account anlegen!\n" },
239{ "Mail queue flushed","Gespeicherte Mails gesendet!" }, 239{ "Mail queue flushed","Gespeicherte Mails gesendet!" },
240{ "Please create an\nSMTP account first.\nThe SMTP is needed\nfor sending mail.\n","Bitte legen Sie einen\nSMTP Account an.\nDer SMTP Account wird\nfür das Versenden von\nMails benötigt!" }, 240{ "Please create an\nSMTP account first.\nThe SMTP is needed\nfor sending mail.\n","Bitte legen Sie einen\nSMTP Account an.\nDer SMTP Account wird\nfür das Versenden von\nMails benötigt!" },
241{ "Show next mail","Zeige nächste Mail" }, 241{ "Show next mail","Zeige nächste Mail" },
242{ "End of List","Ende der Liste" }, 242{ "End of List","Ende der Liste" },
243{ "Language","Sprache" }, 243{ "Language","Sprache" },
244{ "Time Format","Zeit Format" }, 244{ "Time Format","Zeit Format" },
245{ "%1 groups subscribed","%1 Guppen abboniert" }, 245{ "%1 groups subscribed","%1 Guppen abboniert" },
246{ "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Ihr gerade genutztes Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverzeichnis)/apps/kopiemail/localmail" }, 246{ "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Ihr gerade genutztes Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverzeichnis)/apps/kopiemail/localmail" },
247{ "<b>Set new data storage dir:</b>","<b>Setze neues Datenspeicherverzeichnis:</b>" }, 247{ "<b>Set new data storage dir:</b>","<b>Setze neues Datenspeicherverzeichnis:</b>" },
248{ "Not existing dirs are created automatically","Nicht existierende Verzeichnisse werden erstellt" }, 248{ "Not existing dirs are created automatically","Nicht existierende Verzeichnisse werden erstellt" },
249{ "Save settings","Speichere Einstellungen" }, 249{ "Save settings","Speichere Einstellungen" },
250{ "Save standard","Speichere Standard" }, 250{ "Save standard","Speichere Standard" },
251{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, 251{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" },
252{ "The settings of the storage\ndir is saved in the file\n%1","Die Einstellungen des Speicherverzeichnisses\nwerden in folgender Datei gespeichert:\n%1" }, 252{ "The settings of the storage\ndir is saved in the file\n%1","Die Einstellungen des Speicherverzeichnisses\nwerden in folgender Datei gespeichert:\n%1" },
253{ "Data storage path","Daten Speicherpfad" }, 253{ "Data storage path","Daten Speicherpfad" },
254{ "userdefined","benutzerdefiniert" }, 254{ "userdefined","benutzerdefiniert" },
255{ "Reply to this mail","Beantworte diese Mail" }, 255{ "Reply to this mail","Beantworte diese Mail" },
256{ "Su:","Be:" }, 256{ "Su:","Be:" },
257{ "Fr:","Vo:" }, 257{ "Fr:","Vo:" },
258{ "To:","An:" }, 258{ "To:","An:" },
259{ "Download Mail","Mail runterladen" }, 259{ "Download Mail","Mail runterladen" },
260{ "View Source","Zeige Source" }, 260{ "View Source","Zeige Source" },
261{ "Show "To" field in list view","Zeige "An" Feld in Listenansicht" },
262{ "Show info fields at startup","Zeige Info Felder beim Start" },
263{ "Show "Subject" info field","Zeige "Betreff" Info Feld" },
264{ "Show "From" info field","Zeige "Von" Info Feld" },
265{ "Show "To" info field","Zeige "An" Info Feld" },
266{ "","" },
267{ "","" },
268{ "","" },
269{ "","" },
270{ "","" },
261{ "","" }, 271{ "","" },
262{ "","" }, 272{ "","" },
263{ "","" }, 273{ "","" },
264{ "","" }, 274{ "","" },
diff --git a/kmicromail/koprefs.cpp b/kmicromail/koprefs.cpp
index 2bae5f6..7b1e169 100644
--- a/kmicromail/koprefs.cpp
+++ b/kmicromail/koprefs.cpp
@@ -1,126 +1,129 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <time.h> 24#include <time.h>
25#ifndef _WIN32_ 25#ifndef _WIN32_
26#include <unistd.h> 26#include <unistd.h>
27#endif 27#endif
28#include <qdir.h> 28#include <qdir.h>
29#include <qtextstream.h> 29#include <qtextstream.h>
30#include <qtextcodec.h> 30#include <qtextcodec.h>
31#include <qstring.h> 31#include <qstring.h>
32#include <qregexp.h> 32#include <qregexp.h>
33#include <qfont.h> 33#include <qfont.h>
34#include <qcolor.h> 34#include <qcolor.h>
35#include <qstringlist.h> 35#include <qstringlist.h>
36#include <stdlib.h> 36#include <stdlib.h>
37 37
38#include <kglobal.h> 38#include <kglobal.h>
39#include <kconfig.h> 39#include <kconfig.h>
40#include <klocale.h> 40#include <klocale.h>
41#include <kdebug.h> 41#include <kdebug.h>
42#include <kemailsettings.h> 42#include <kemailsettings.h>
43#include <kstaticdeleter.h> 43#include <kstaticdeleter.h>
44 44
45#include "koprefs.h" 45#include "koprefs.h"
46#include "mainwindow.h" 46#include "mainwindow.h"
47 47
48 48
49KOPrefs *KOPrefs::mInstance = 0; 49KOPrefs *KOPrefs::mInstance = 0;
50static KStaticDeleter<KOPrefs> insd; 50static KStaticDeleter<KOPrefs> insd;
51 51
52KOPrefs::KOPrefs() : 52KOPrefs::KOPrefs() :
53 KPimPrefs("kopiemailrc") 53 KPimPrefs("kopiemailrc")
54{ 54{
55 mAppFont = QFont("helvetica",12); 55 mAppFont = QFont("helvetica",12);
56 mComposeFont = QFont("helvetica",12); 56 mComposeFont = QFont("helvetica",12);
57 mReadFont = QFont("helvetica",12); 57 mReadFont = QFont("helvetica",12);
58 58
59 KPrefs::setCurrentGroup("General"); 59 KPrefs::setCurrentGroup("General");
60 addItemString("SendCodec",&mSendCodec,i18n ("userdefined") ); 60 addItemString("SendCodec",&mSendCodec,i18n ("userdefined") );
61 addItemString("SenderName",&mName,i18n ("Please set at") ); 61 addItemString("SenderName",&mName,i18n ("Please set at") );
62 addItemString("SenderEmail",&mEmail,i18n ("Settings@General TAB") ); 62 addItemString("SenderEmail",&mEmail,i18n ("Settings@General TAB") );
63 addItemBool("ViewMailAsHtml",&mViewAsHtml,false); 63 addItemBool("ViewMailAsHtml",&mViewAsHtml,false);
64 addItemBool("SendMailLater",&mSendLater,true); 64 addItemBool("SendMailLater",&mSendLater,true);
65 addItemBool("ShowToField",&mShowToField,false); 65 addItemBool("ShowToField",&mShowToField,false);
66 addItemBool("UseKapi",&mUseKapi,false); 66 addItemBool("UseKapi",&mUseKapi,false);
67 addItemInt("CurrentCodec",&mCurrentCodec,0); 67 addItemInt("CurrentCodec",&mCurrentCodec,0);
68 68 addItemBool("ShowInfoSub",&mShowInfoSub,true);
69 addItemBool("ShowInfoFrom",&mShowInfoFrom,true);
70 addItemBool("ShowInfoTo",&mShowInfoTo,true);
71 addItemBool("ShowInfoStart",&mShowInfoStart,true);
69 KPrefs::setCurrentGroup("Fonts"); 72 KPrefs::setCurrentGroup("Fonts");
70 addItemFont("Application Font",&mAppFont); 73 addItemFont("Application Font",&mAppFont);
71 addItemFont("Compose Font",&mComposeFont); 74 addItemFont("Compose Font",&mComposeFont);
72 addItemFont("Read Font",&mReadFont); 75 addItemFont("Read Font",&mReadFont);
73 fillMailDefaults(); 76 fillMailDefaults();
74 isDirty = false; 77 isDirty = false;
75} 78}
76 79
77 80
78KOPrefs::~KOPrefs() 81KOPrefs::~KOPrefs()
79{ 82{
80 if ( isDirty ) 83 if ( isDirty )
81 writeConfig(); 84 writeConfig();
82 if (mInstance == this) 85 if (mInstance == this)
83 mInstance = insd.setObject(0); 86 mInstance = insd.setObject(0);
84 87
85} 88}
86 89
87 90
88KOPrefs *KOPrefs::instance() 91KOPrefs *KOPrefs::instance()
89{ 92{
90 if (!mInstance) { 93 if (!mInstance) {
91 mInstance = insd.setObject(new KOPrefs()); 94 mInstance = insd.setObject(new KOPrefs());
92 mInstance->readConfig(); 95 mInstance->readConfig();
93 } 96 }
94 97
95 return mInstance; 98 return mInstance;
96} 99}
97 100
98void KOPrefs::usrSetDefaults() 101void KOPrefs::usrSetDefaults()
99{ 102{
100 103
101} 104}
102 105
103void KOPrefs::fillMailDefaults() 106void KOPrefs::fillMailDefaults()
104{ 107{
105 if (mName.isEmpty()) mName = i18n ("Please set at"); 108 if (mName.isEmpty()) mName = i18n ("Please set at");
106 if (mEmail.isEmpty()) mEmail = i18n ("Settings@General TAB"); 109 if (mEmail.isEmpty()) mEmail = i18n ("Settings@General TAB");
107} 110}
108 111
109void KOPrefs::usrReadConfig() 112void KOPrefs::usrReadConfig()
110{ 113{
111 114
112 KPimPrefs::usrReadConfig(); 115 KPimPrefs::usrReadConfig();
113} 116}
114 117
115 118
116void KOPrefs::usrWriteConfig() 119void KOPrefs::usrWriteConfig()
117{ 120{
118 KPimPrefs::usrWriteConfig(); 121 KPimPrefs::usrWriteConfig();
119} 122}
120 123
121 124
122 125
123KConfig* KOPrefs::getConfig() 126KConfig* KOPrefs::getConfig()
124{ 127{
125 return config(); 128 return config();
126} 129}
diff --git a/kmicromail/koprefs.h b/kmicromail/koprefs.h
index f2c4fbb..f2501e3 100644
--- a/kmicromail/koprefs.h
+++ b/kmicromail/koprefs.h
@@ -1,80 +1,81 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23#ifndef KOPREFS_H 23#ifndef KOPREFS_H
24#define KOPREFS_H 24#define KOPREFS_H
25 25
26 26
27#include <libkdepim/kpimprefs.h> 27#include <libkdepim/kpimprefs.h>
28 28
29class KConfig; 29class KConfig;
30class QFont; 30class QFont;
31class QColor; 31class QColor;
32class QStringList; 32class QStringList;
33 33
34class KOPrefs : public KPimPrefs 34class KOPrefs : public KPimPrefs
35{ 35{
36 public: 36 public:
37 virtual ~KOPrefs(); 37 virtual ~KOPrefs();
38 38
39 /** Get instance of KOPrefs. It is made sure that there is only one 39 /** Get instance of KOPrefs. It is made sure that there is only one
40 instance. */ 40 instance. */
41 static KOPrefs *instance(); 41 static KOPrefs *instance();
42 42
43 /** Set preferences to default values */ 43 /** Set preferences to default values */
44 void usrSetDefaults(); 44 void usrSetDefaults();
45 45
46 /** Read preferences from config file */ 46 /** Read preferences from config file */
47 void usrReadConfig(); 47 void usrReadConfig();
48 48
49 /** Write preferences to config file */ 49 /** Write preferences to config file */
50 void usrWriteConfig(); 50 void usrWriteConfig();
51 void setCategoryDefaults(){;}; 51 void setCategoryDefaults(){;};
52 52
53 protected: 53 protected:
54 54
55 /** Fill empty mail fields with default values. */ 55 /** Fill empty mail fields with default values. */
56 void fillMailDefaults(); 56 void fillMailDefaults();
57 57
58 private: 58 private:
59 /** Constructor disabled for public. Use instance() to create a KOPrefs 59 /** Constructor disabled for public. Use instance() to create a KOPrefs
60 object. */ 60 object. */
61 KOPrefs(); 61 KOPrefs();
62 62
63 static KOPrefs *mInstance; 63 static KOPrefs *mInstance;
64 public: 64 public:
65 // preferences data 65 // preferences data
66 KConfig* getConfig(); 66 KConfig* getConfig();
67 QFont mAppFont; 67 QFont mAppFont;
68 QFont mComposeFont; 68 QFont mComposeFont;
69 QFont mReadFont; 69 QFont mReadFont;
70 QString mName; 70 QString mName;
71 QString mSendCodec; 71 QString mSendCodec;
72 QString mEmail; 72 QString mEmail;
73 QString mCurrentCodeName; 73 QString mCurrentCodeName;
74 int mCurrentCodec; 74 int mCurrentCodec;
75 bool mSendLater, mViewAsHtml, mUseKapi, isDirty, mShowToField; 75 bool mSendLater, mViewAsHtml, mUseKapi, isDirty, mShowToField;
76 bool mShowInfoSub, mShowInfoFrom, mShowInfoTo, mShowInfoStart;
76 private: 77 private:
77 78
78}; 79};
79 80
80#endif 81#endif
diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp
index 5c8a5a9..4af4a8c 100644
--- a/kmicromail/koprefsdialog.cpp
+++ b/kmicromail/koprefsdialog.cpp
@@ -57,192 +57,211 @@
57#include <klineedit.h> 57#include <klineedit.h>
58 58
59 59
60#include "koprefs.h" 60#include "koprefs.h"
61 61
62#include "koprefsdialog.h" 62#include "koprefsdialog.h"
63//#include <kprefswidget.h> 63//#include <kprefswidget.h>
64 64
65 65
66KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : 66KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
67 KPrefsDialog(KOPrefs::instance(),parent,name,true) 67 KPrefsDialog(KOPrefs::instance(),parent,name,true)
68{ 68{
69 69
70 setCaption( i18n("Settings - some need a restart (nr)")); 70 setCaption( i18n("Settings - some need a restart (nr)"));
71 setupGlobalTab(); 71 setupGlobalTab();
72 setupMainTab(); 72 setupMainTab();
73 setupMailTab();; 73 setupMailTab();;
74 setupFontsTab(); 74 setupFontsTab();
75 readConfig(); 75 readConfig();
76 76
77#if 0 77#if 0
78 78
79 setupMainTab(); 79 setupMainTab();
80 setupLocaleTab(); 80 setupLocaleTab();
81 setupTimeZoneTab(); 81 setupTimeZoneTab();
82 setupTimeTab(); 82 setupTimeTab();
83 setupLocaleDateTab(); 83 setupLocaleDateTab();
84 setupFontsTab(); 84 setupFontsTab();
85 setupColorsTab(); 85 setupColorsTab();
86 setupViewsTab(); 86 setupViewsTab();
87 //setupSyncTab(); 87 //setupSyncTab();
88 //setupSyncAlgTab(); 88 //setupSyncAlgTab();
89 //setupPrinterTab(); 89 //setupPrinterTab();
90 //setupGroupSchedulingTab(); 90 //setupGroupSchedulingTab();
91 //setupGroupAutomationTab(); 91 //setupGroupAutomationTab();
92#endif 92#endif
93} 93}
94 94
95#include "kpimglobalprefs.h" 95#include "kpimglobalprefs.h"
96 96
97KOPrefsDialog::~KOPrefsDialog() 97KOPrefsDialog::~KOPrefsDialog()
98{ 98{
99} 99}
100void KOPrefsDialog::setupGlobalTab() 100void KOPrefsDialog::setupGlobalTab()
101{ 101{
102 QFrame *topFrame = addPage(i18n("Global"),0,0); 102 QFrame *topFrame = addPage(i18n("Global"),0,0);
103 kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); 103 kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" );
104 QVBoxLayout *topLayout = new QVBoxLayout(topFrame); 104 QVBoxLayout *topLayout = new QVBoxLayout(topFrame);
105 topLayout->addWidget( kdelibcfg ); 105 topLayout->addWidget( kdelibcfg );
106 106
107 107
108} 108}
109void KOPrefsDialog::setupMainTab() 109void KOPrefsDialog::setupMainTab()
110{ 110{
111 QFrame *topFrame = addPage(i18n("General"),0,0); 111 QFrame *topFrame = addPage(i18n("General"),0,0);
112 112
113 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 113 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
114 topLayout->setSpacing(spacingHint()); 114 topLayout->setSpacing(spacingHint());
115 topLayout->setMargin(marginHint()); 115 topLayout->setMargin(marginHint());
116 116
117 117
118 mNameEdit = new QLineEdit(topFrame); 118 mNameEdit = new QLineEdit(topFrame);
119 mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); 119 mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame);
120 topLayout->addWidget(mNameLabel,0,0); 120 topLayout->addWidget(mNameLabel,0,0);
121 topLayout->addWidget(mNameEdit,0,1); 121 topLayout->addWidget(mNameEdit,0,1);
122 122
123 mEmailEdit = new QLineEdit(topFrame); 123 mEmailEdit = new QLineEdit(topFrame);
124 mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); 124 mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame);
125 topLayout->addWidget(mEmailLabel,1,0); 125 topLayout->addWidget(mEmailLabel,1,0);
126 topLayout->addWidget(mEmailEdit,1,1); 126 topLayout->addWidget(mEmailEdit,1,1);
127 QLabel *lab = new QLabel( i18n("HINT: Separate multiple\neMail addresses by \";\""), topFrame); 127 QLabel *lab = new QLabel( i18n("HINT: Separate multiple\neMail addresses by \";\""), topFrame);
128 topLayout->addMultiCellWidget(lab,2,2,0,1); 128 topLayout->addMultiCellWidget(lab,2,2,0,1);
129 KPrefsDialogWidBool* ttt = addWidBool(i18n("Ignore above settings and\nuse KA/Pi \"Who am I\" instead!"), 129 KPrefsDialogWidBool* ttt = addWidBool(i18n("Ignore above settings and\nuse KA/Pi \"Who am I\" instead!"),
130 &(KOPrefs::instance()->mUseKapi),topFrame); 130 &(KOPrefs::instance()->mUseKapi),topFrame);
131 topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1); 131 topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1);
132} 132}
133 133
134void KOPrefsDialog::setupMailTab() 134void KOPrefsDialog::setupMailTab()
135{ 135{
136 QFrame *topFrame = addPage(i18n("Mail"),0,0); 136 QFrame *topFrame = addPage(i18n("Mail"),0,0);
137 137
138 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 138 QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
139 topLayout->setSpacing(spacingHint()); 139 topLayout->setSpacing(spacingHint());
140 topLayout->setMargin(marginHint()); 140 topLayout->setMargin(marginHint());
141 141
142 KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"), 142 KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"),
143 &(KOPrefs::instance()->mViewAsHtml),topFrame); 143 &(KOPrefs::instance()->mViewAsHtml),topFrame);
144 topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1); 144 topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1);
145 145
146 146
147 ttt = addWidBool(i18n("Send mails later"), 147 ttt = addWidBool(i18n("Send mails later"),
148 &(KOPrefs::instance()->mSendLater),topFrame); 148 &(KOPrefs::instance()->mSendLater),topFrame);
149 topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1); 149 topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1);
150 ttt = addWidBool(i18n("Show \"To\" field in list view"), 150 ttt = addWidBool(i18n("Show \"To\" field in list view"),
151 &(KOPrefs::instance()->mShowToField),topFrame); 151 &(KOPrefs::instance()->mShowToField),topFrame);
152 topLayout->addMultiCellWidget(ttt->checkBox(),2,2,0,1); 152 topLayout->addMultiCellWidget(ttt->checkBox(),2,2,0,1);
153
154 int iii =3;
155 ttt = addWidBool(i18n("Show info fields at startup"),
156 &(KOPrefs::instance()->mShowInfoStart),topFrame);
157 topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1);
158 ++iii;
159 ttt = addWidBool(i18n("Show \"Subject\" info field"),
160 &(KOPrefs::instance()->mShowInfoSub),topFrame);
161 topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1);
162 ++iii;
163 ttt = addWidBool(i18n("Show \"From\" info field"),
164 &(KOPrefs::instance()->mShowInfoFrom),topFrame);
165 topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1);
166 ++iii;
167 ttt = addWidBool(i18n("Show \"To\" info field"),
168 &(KOPrefs::instance()->mShowInfoTo),topFrame);
169 topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1);
170 ++iii;
171
153 /* 172 /*
154 mCodecEdit = new QLineEdit(topFrame); 173 mCodecEdit = new QLineEdit(topFrame);
155 topLayout->addMultiCellWidget( new QLabel(mCodecEdit, i18n("User defined codec for new mails:"), topFrame),2,2,0,1); 174 topLayout->addMultiCellWidget( new QLabel(mCodecEdit, i18n("User defined codec for new mails:"), topFrame),2,2,0,1);
156 topLayout->addMultiCellWidget(mCodecEdit,3,3,0,1); 175 topLayout->addMultiCellWidget(mCodecEdit,3,3,0,1);
157 topLayout->addMultiCellWidget( new QLabel(0, i18n("Example: iso-8859-15"), topFrame),4,4,0,1); 176 topLayout->addMultiCellWidget( new QLabel(0, i18n("Example: iso-8859-15"), topFrame),4,4,0,1);
158 */ 177 */
159} 178}
160void KOPrefsDialog::setupFontsTab() 179void KOPrefsDialog::setupFontsTab()
161{ 180{
162 181
163 QFrame *topFrame = addPage(i18n("Fonts"),0,0); 182 QFrame *topFrame = addPage(i18n("Fonts"),0,0);
164 // DesktopIcon("fonts",KIcon::SizeMedium)); 183 // DesktopIcon("fonts",KIcon::SizeMedium));
165 184
166 QGridLayout *topLayout = new QGridLayout(topFrame,7,3); 185 QGridLayout *topLayout = new QGridLayout(topFrame,7,3);
167 topLayout->setSpacing(1); 186 topLayout->setSpacing(1);
168 topLayout->setMargin(3); 187 topLayout->setMargin(3);
169 KPrefsDialogWidFont * tVFont; 188 KPrefsDialogWidFont * tVFont;
170 int i = 0; 189 int i = 0;
171 KPrefsDialogWidFont *timeLabelsFont = 190 KPrefsDialogWidFont *timeLabelsFont =
172 addWidFont(i18n("OK"),i18n("Application(nr)"), 191 addWidFont(i18n("OK"),i18n("Application(nr)"),
173 &(KOPrefs::instance()->mAppFont),topFrame); 192 &(KOPrefs::instance()->mAppFont),topFrame);
174 topLayout->addWidget(timeLabelsFont->label(),i,0); 193 topLayout->addWidget(timeLabelsFont->label(),i,0);
175 topLayout->addWidget(timeLabelsFont->preview(),i,1); 194 topLayout->addWidget(timeLabelsFont->preview(),i,1);
176 topLayout->addWidget(timeLabelsFont->button(),i,2); 195 topLayout->addWidget(timeLabelsFont->button(),i,2);
177 ++i; 196 ++i;
178 197
179 198
180 timeLabelsFont = 199 timeLabelsFont =
181 addWidFont(i18n("Dear Mr."),i18n("Compose mail:"), 200 addWidFont(i18n("Dear Mr."),i18n("Compose mail:"),
182 &(KOPrefs::instance()->mComposeFont),topFrame); 201 &(KOPrefs::instance()->mComposeFont),topFrame);
183 topLayout->addWidget(timeLabelsFont->label(),i,0); 202 topLayout->addWidget(timeLabelsFont->label(),i,0);
184 topLayout->addWidget(timeLabelsFont->preview(),i,1); 203 topLayout->addWidget(timeLabelsFont->preview(),i,1);
185 topLayout->addWidget(timeLabelsFont->button(),i,2); 204 topLayout->addWidget(timeLabelsFont->button(),i,2);
186 ++i; 205 ++i;
187 206
188 KPrefsDialogWidFont *timeBarFont = 207 KPrefsDialogWidFont *timeBarFont =
189 addWidFont(i18n("Hello"),i18n("Read mail:"), 208 addWidFont(i18n("Hello"),i18n("Read mail:"),
190 &(KOPrefs::instance()->mReadFont),topFrame); 209 &(KOPrefs::instance()->mReadFont),topFrame);
191 topLayout->addWidget(timeBarFont->label(),i,0); 210 topLayout->addWidget(timeBarFont->label(),i,0);
192 topLayout->addWidget(timeBarFont->preview(),i,1); 211 topLayout->addWidget(timeBarFont->preview(),i,1);
193 topLayout->addWidget(timeBarFont->button(),i,2); 212 topLayout->addWidget(timeBarFont->button(),i,2);
194 ++i; 213 ++i;
195 214
196 topLayout->setColStretch(1,1); 215 topLayout->setColStretch(1,1);
197 topLayout->setRowStretch(4,1); 216 topLayout->setRowStretch(4,1);
198 217
199} 218}
200void KOPrefsDialog::usrReadConfig() 219void KOPrefsDialog::usrReadConfig()
201{ 220{
202 221
203 mNameEdit->setText(KOPrefs::instance()->mName); 222 mNameEdit->setText(KOPrefs::instance()->mName);
204 mEmailEdit->setText(KOPrefs::instance()->mEmail); 223 mEmailEdit->setText(KOPrefs::instance()->mEmail);
205 //mCodecEdit->setText(KOPrefs::instance()->mSendCodec); 224 //mCodecEdit->setText(KOPrefs::instance()->mSendCodec);
206 kdelibcfg->readConfig(); 225 kdelibcfg->readConfig();
207} 226}
208void KOPrefsDialog::usrWriteConfig() 227void KOPrefsDialog::usrWriteConfig()
209{ 228{
210 KOPrefs::instance()->mName = mNameEdit->text(); 229 KOPrefs::instance()->mName = mNameEdit->text();
211 KOPrefs::instance()->mEmail = mEmailEdit->text(); 230 KOPrefs::instance()->mEmail = mEmailEdit->text();
212 //KOPrefs::instance()->mSendCodec = mCodecEdit->text(); 231 //KOPrefs::instance()->mSendCodec = mCodecEdit->text();
213 kdelibcfg->writeConfig(); 232 kdelibcfg->writeConfig();
214 233
215 234
216} 235}
217 236
218#if 0 237#if 0
219void KOPrefsDialog::setupLocaleDateTab() 238void KOPrefsDialog::setupLocaleDateTab()
220{ 239{
221QFrame *topFrame = addPage(i18n("Date Format"),0,0); 240QFrame *topFrame = addPage(i18n("Date Format"),0,0);
222 QGridLayout *topLayout = new QGridLayout(topFrame,3,2); 241 QGridLayout *topLayout = new QGridLayout(topFrame,3,2);
223 topLayout->setSpacing(spacingHint()); 242 topLayout->setSpacing(spacingHint());
224 topLayout->setMargin(marginHint()); 243 topLayout->setMargin(marginHint());
225 int iii = 0; 244 int iii = 0;
226 245
227 246
228 KPrefsWidRadios *syncPrefsGroup = 247 KPrefsWidRadios *syncPrefsGroup =
229 addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); 248 addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame);
230 QString format; 249 QString format;
231 if ( QApplication::desktop()->width() < 480 ) 250 if ( QApplication::desktop()->width() < 480 )
232 format = "(%d.%m.%Y)"; 251 format = "(%d.%m.%Y)";
233 else 252 else
234 format = "(%d.%m.%Y|%A %d %B %Y)"; 253 format = "(%d.%m.%Y|%A %d %B %Y)";
235 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); 254 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format));
236 if ( QApplication::desktop()->width() < 480 ) 255 if ( QApplication::desktop()->width() < 480 )
237 format = "(%m.%d.%Y)"; 256 format = "(%m.%d.%Y)";
238 else 257 else
239 format = "(%m.%d.%Y|%A %B %d %Y)"; 258 format = "(%m.%d.%Y|%A %B %d %Y)";
240 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); 259 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format));
241 if ( QApplication::desktop()->width() < 480 ) 260 if ( QApplication::desktop()->width() < 480 )
242 format = "(%Y-%m-%d)"; 261 format = "(%Y-%m-%d)";
243 else 262 else
244 format = "(%Y-%m-%d|%A %Y %B %d)"; 263 format = "(%Y-%m-%d|%A %Y %B %d)";
245 syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); 264 syncPrefsGroup->addRadio(i18n("2004-03-24 "+format));
246 syncPrefsGroup->addRadio(i18n("User defined")); 265 syncPrefsGroup->addRadio(i18n("User defined"));
247 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 266 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
248 ++iii; 267 ++iii;
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp
index 250d114..0794e00 100644
--- a/kmicromail/mainwindow.cpp
+++ b/kmicromail/mainwindow.cpp
@@ -1,337 +1,357 @@
1 1
2// CHANGED 2004-08-06 Lutz Rogowski 2// CHANGED 2004-08-06 Lutz Rogowski
3#include <qlabel.h> 3#include <qlabel.h>
4#include <qvbox.h> 4#include <qvbox.h>
5#include <qheader.h> 5#include <qheader.h>
6#include <qtimer.h> 6#include <qtimer.h>
7#include <qlayout.h> 7#include <qlayout.h>
8//#include <kdialog.h> 8//#include <kdialog.h>
9#include <kiconloader.h> 9#include <kiconloader.h>
10#include <kapplication.h> 10#include <kapplication.h>
11 11
12#ifdef DESKTOP_VERSION 12#ifdef DESKTOP_VERSION
13#include <qapplication.h> 13#include <qapplication.h>
14#include <qstatusbar.h> 14#include <qstatusbar.h>
15#include <kabc/stdaddressbook.h> 15#include <kabc/stdaddressbook.h>
16extern QStatusBar* globalSstatusBarMainWindow; 16extern QStatusBar* globalSstatusBarMainWindow;
17#else 17#else
18#include <qpe/qpeapplication.h> 18#include <qpe/qpeapplication.h>
19#include <klocale.h> 19#include <klocale.h>
20#endif 20#endif
21#include "defines.h" 21#include "defines.h"
22#include "koprefs.h"
22#include "mainwindow.h" 23#include "mainwindow.h"
23#include "mailistviewitem.h" 24#include "mailistviewitem.h"
24#include <KDGanttMinimizeSplitter.h> 25#include <KDGanttMinimizeSplitter.h>
25 26
26#include "koprefs.h" 27#include "koprefs.h"
27 28
28MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) 29MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
29 : QMainWindow( parent, name ) //, flags ) 30 : QMainWindow( parent, name ) //, flags )
30{ 31{
31#ifdef DESKTOP_VERSION 32#ifdef DESKTOP_VERSION
32 globalSstatusBarMainWindow = statusBar(); 33 globalSstatusBarMainWindow = statusBar();
33#endif 34#endif
34 setCaption( i18n( "KOpieMail/Pi" ) ); 35 setCaption( i18n( "KOpieMail/Pi" ) );
35 setToolBarsMovable( false ); 36 setToolBarsMovable( false );
36 //KABC::StdAddressBook::self(); 37 //KABC::StdAddressBook::self();
37 toolBar = new QToolBar( this ); 38 toolBar = new QToolBar( this );
38 menuBar = new QPEMenuBar( toolBar ); 39 menuBar = new QPEMenuBar( toolBar );
39 mailMenu = new QPopupMenu( menuBar ); 40 mailMenu = new QPopupMenu( menuBar );
40 menuBar->insertItem( i18n( "Mail" ), mailMenu ); 41 menuBar->insertItem( i18n( "Mail" ), mailMenu );
41 settingsMenu = new QPopupMenu( menuBar ); 42 settingsMenu = new QPopupMenu( menuBar );
42 menuBar->insertItem( i18n( "Settings" ), settingsMenu ); 43 menuBar->insertItem( i18n( "Settings" ), settingsMenu );
43 44
44 addToolBar( toolBar ); 45 addToolBar( toolBar );
45 toolBar->setHorizontalStretchable( true ); 46 toolBar->setHorizontalStretchable( true );
46 QAction* getMail = new QAction( i18n( "Get all new mails" ), SmallIcon("enter"), 47 QAction* getMail = new QAction( i18n( "Get all new mails" ), SmallIcon("enter"),
47 0, 0, this ); 48 0, 0, this );
48 connect(getMail, SIGNAL( activated() ), 49 connect(getMail, SIGNAL( activated() ),
49 SLOT( slotGetAllMail() ) ); 50 SLOT( slotGetAllMail() ) );
50 getMail->addTo( mailMenu ); 51 getMail->addTo( mailMenu );
51 52
52 getMail = new QAction( i18n( "Get new messages" ), SmallIcon("add"), 53 getMail = new QAction( i18n( "Get new messages" ), SmallIcon("add"),
53 0, 0, this ); 54 0, 0, this );
54 getMail->addTo( toolBar ); 55 getMail->addTo( toolBar );
55 getMail->addTo( mailMenu ); 56 getMail->addTo( mailMenu );
56 connect(getMail, SIGNAL( activated() ), 57 connect(getMail, SIGNAL( activated() ),
57 SLOT( slotGetMail() ) ); 58 SLOT( slotGetMail() ) );
58 59
59 composeMail = new QAction( i18n( "Compose new mail" ), SmallIcon("composemail"), 60 composeMail = new QAction( i18n( "Compose new mail" ), SmallIcon("composemail"),
60 0, 0, this ); 61 0, 0, this );
61 composeMail->addTo( toolBar ); 62 composeMail->addTo( toolBar );
62 composeMail->addTo( mailMenu ); 63 composeMail->addTo( mailMenu );
63 64
64 sendQueued = new QAction( i18n( "Send queued mails" ), SmallIcon("sendqueued") , 65 sendQueued = new QAction( i18n( "Send queued mails" ), SmallIcon("sendqueued") ,
65 0, 0, this ); 66 0, 0, this );
66 sendQueued->addTo( toolBar ); 67 sendQueued->addTo( toolBar );
67 sendQueued->addTo( mailMenu ); 68 sendQueued->addTo( mailMenu );
68 69
69 /* 70 /*
70 syncFolders = new QAction( i18n( "Sync mailfolders" ), ICON_SYNC, 71 syncFolders = new QAction( i18n( "Sync mailfolders" ), ICON_SYNC,
71 0, 0, this ); 72 0, 0, this );
72 syncFolders->addTo( toolBar ); 73 syncFolders->addTo( toolBar );
73 syncFolders->addTo( mailMenu ); 74 syncFolders->addTo( mailMenu );
74 */ 75 */
75 76
76 showFolders = new QAction( i18n( "Show/Hide folders" ), SmallIcon("showfolders") , 77 showFolders = new QAction( i18n( "Show/Hide folders" ), SmallIcon("showfolders") ,
77 0, 0, this, 0, true ); 78 0, 0, this, 0, true );
78 showFolders->addTo( toolBar ); 79 showFolders->addTo( toolBar );
79 showFolders->addTo( mailMenu ); 80 showFolders->addTo( mailMenu );
80 showFolders->setOn( true ); 81 showFolders->setOn( true );
81 connect(showFolders, SIGNAL( toggled(bool) ), 82 connect(showFolders, SIGNAL( toggled(bool) ),
82 SLOT( slotShowFolders(bool) ) ); 83 SLOT( slotShowFolders(bool) ) );
83 84
84 /* 85 /*
85 searchMails = new QAction( i18n( "Search mails" ), SmallIcon("find") ), 86 searchMails = new QAction( i18n( "Search mails" ), SmallIcon("find") ),
86 0, 0, this ); 87 0, 0, this );
87 searchMails->addTo( toolBar ); 88 searchMails->kopddTo( toolBar );
88 searchMails->addTo( mailMenu ); 89 searchMails->addTo( mailMenu );
89 */ 90 */
90 91
91 deleteMails = new QAction(i18n("Delete Mail"), SmallIcon("trash"), 0, 0, this); 92 deleteMails = new QAction(i18n("Delete Mail"), SmallIcon("trash"), 0, 0, this);
92 deleteMails->addTo( toolBar ); 93 deleteMails->addTo( toolBar );
93 deleteMails->addTo( mailMenu ); 94 deleteMails->addTo( mailMenu );
94 connect( deleteMails, SIGNAL( activated() ), 95 connect( deleteMails, SIGNAL( activated() ),
95 SLOT( slotDeleteAllMail() ) ); 96 SLOT( slotDeleteAllMail() ) );
96 97
97 editSettings = new QAction( i18n( "Edit settings" ), SmallIcon("SettingsIcon") , 98 editSettings = new QAction( i18n( "Edit settings" ), SmallIcon("SettingsIcon") ,
98 0, 0, this ); 99 0, 0, this );
99 editSettings->addTo( settingsMenu ); 100 editSettings->addTo( settingsMenu );
100 connect( editSettings, SIGNAL( activated() ), 101 connect( editSettings, SIGNAL( activated() ),
101 SLOT( slotEditSettings() ) ); 102 SLOT( slotEditSettings() ) );
102 editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") , 103 editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") ,
103 0, 0, this ); 104 0, 0, this );
104 editAccounts->addTo( settingsMenu ); 105 editAccounts->addTo( settingsMenu );
105 codecMenu = new QPopupMenu( menuBar ); 106 codecMenu = new QPopupMenu( menuBar );
106 codecMenu->insertItem( "Western (iso-8859-1)",0,0); 107 codecMenu->insertItem( "Western (iso-8859-1)",0,0);
107 codecMenu->insertItem( "Cyrillic (iso-8859-5)",1,1); 108 codecMenu->insertItem( "Cyrillic (iso-8859-5)",1,1);
108 codecMenu->insertItem( "Western (iso-8859-15)",2,2); 109 codecMenu->insertItem( "Western (iso-8859-15)",2,2);
109 codecMenu->insertItem( "Chinese (big-5)",3,3); 110 codecMenu->insertItem( "Chinese (big-5)",3,3);
110 codecMenu->insertItem( "Unicode (utf-8)",4,4); 111 codecMenu->insertItem( "Unicode (utf-8)",4,4);
111 codecMenu->insertItem( "Userdefined ("+KOPrefs::instance()->mSendCodec+")",5,5); 112 codecMenu->insertItem( "Userdefined ("+KOPrefs::instance()->mSendCodec+")",5,5);
112 //disabled 113 //disabled
113 //settingsMenu->insertItem( i18n("Codec for new mails"), codecMenu); 114 //settingsMenu->insertItem( i18n("Codec for new mails"), codecMenu);
114 //setCentralWidget( view ); 115 //setCentralWidget( view );
115 116
116 QVBox* wrapperBox = new QVBox( this ); 117 QVBox* wrapperBox = new QVBox( this );
117 setCentralWidget( wrapperBox ); 118 setCentralWidget( wrapperBox );
118 119
119 // QWidget *view = new QWidget( wrapperBox ); 120 // QWidget *view = new QWidget( wrapperBox );
120 KDGanttMinimizeSplitter* splithor = new KDGanttMinimizeSplitter( Qt::Vertical, wrapperBox); 121 KDGanttMinimizeSplitter* splithor = new KDGanttMinimizeSplitter( Qt::Vertical, wrapperBox);
121 splithor->setMinimizeDirection( KDGanttMinimizeSplitter::Down); 122 splithor->setMinimizeDirection( KDGanttMinimizeSplitter::Down);
122 KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, splithor); 123 KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, splithor);
123 split->setMinimizeDirection( KDGanttMinimizeSplitter::Left); 124 split->setMinimizeDirection( KDGanttMinimizeSplitter::Left);
124 //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight ); 125 //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight );
125 QWidget* infoBox = new QWidget( splithor ); 126 subLE = 0;
126 QGridLayout *griLay = new QGridLayout( infoBox, 2,2); 127 fromLE = 0;
127 griLay->addWidget( new QLabel ( i18n("Su:"), infoBox ),0,0 ); 128 toLE = 0;
128 griLay->addWidget( new QLabel ( i18n("Fr:"), infoBox ),1,0 ); 129 if ( KOPrefs::instance()->mShowInfoSub || KOPrefs::instance()->mShowInfoFrom || KOPrefs::instance()->mShowInfoTo ) {
129 griLay->addWidget( new QLabel ( i18n("To:"), infoBox ),2,0 ); 130 QWidget* infoBox = new QWidget( splithor );
130 griLay->addWidget( subLE = new QLineEdit( infoBox ),0,1) ; 131 QGridLayout *griLay = new QGridLayout( infoBox, 2,2);
131 griLay->addWidget( fromLE = new QLineEdit( infoBox ),1,1) ; 132 if ( KOPrefs::instance()->mShowInfoSub ) {
132 griLay->addWidget( toLE = new QLineEdit( infoBox ),2,1) ; 133 griLay->addWidget( new QLabel ( i18n("Su:"), infoBox ),0,0 );
133 infoBox->setMaximumHeight( infoBox->sizeHint().height() ); 134 griLay->addWidget( subLE = new QLineEdit( infoBox ),0,1) ;
135 }
136 if ( KOPrefs::instance()->mShowInfoFrom ) {
137 griLay->addWidget( new QLabel ( i18n("Fr:"), infoBox ),1,0 );
138 griLay->addWidget( fromLE = new QLineEdit( infoBox ),1,1) ;
139 }
140 if ( KOPrefs::instance()->mShowInfoTo ) {
141 griLay->addWidget( new QLabel ( i18n("To:"), infoBox ),2,0 );
142 griLay->addWidget( toLE = new QLineEdit( infoBox ),2,1) ;
143 }
144 infoBox->setMaximumHeight( infoBox->sizeHint().height() );
145 if ( !KOPrefs::instance()->mShowInfoStart ) {
146 QTimer::singleShot( 1,splithor, SLOT ( toggle() ) );
147 }
148 }
149
150
134 folderView = new AccountView( split ); 151 folderView = new AccountView( split );
135 folderView->header()->hide(); 152 folderView->header()->hide();
136 folderView->setRootIsDecorated( false ); 153 folderView->setRootIsDecorated( false );
137 folderView->addColumn( i18n( "Mailbox" ) ); 154 folderView->addColumn( i18n( "Mailbox" ) );
138 155
139 //layout->addWidget( folderView ); 156 //layout->addWidget( folderView );
140 157
141 mailView = new QListView( split ); 158 mailView = new QListView( split );
142 mailView->addColumn( i18n( " " ) ); 159 mailView->addColumn( i18n( " " ) );
143 mailView->addColumn( i18n( "Subject" ),QListView::Manual ); 160 mailView->addColumn( i18n( "Subject" ),QListView::Manual );
144 mailView->addColumn( i18n( "Sender" ),QListView::Manual ); 161 mailView->addColumn( i18n( "Sender" ),QListView::Manual );
145 mailView->addColumn( i18n( "Size" ),QListView::Manual); 162 mailView->addColumn( i18n( "Size" ),QListView::Manual);
146 mailView->addColumn( i18n( "Date" ),QListView::Manual); 163 mailView->addColumn( i18n( "Date" ),QListView::Manual);
147 if ( KOPrefs::instance()->mShowToField ) 164 if ( KOPrefs::instance()->mShowToField )
148 mailView->addColumn( i18n( "To" ),QListView::Manual); 165 mailView->addColumn( i18n( "To" ),QListView::Manual);
149 mailView->setAllColumnsShowFocus(true); 166 mailView->setAllColumnsShowFocus(true);
150 //mailView->setSorting(-1); 167 //mailView->setSorting(-1);
151 mailView->setRootIsDecorated( false ); 168 mailView->setRootIsDecorated( false );
152 statusWidget = new StatusWidget( wrapperBox ); 169 statusWidget = new StatusWidget( wrapperBox );
153 statusWidget->hide(); 170 statusWidget->hide();
154 171
155 //layout->addWidget( mailView ); 172 //layout->addWidget( mailView );
156 //layout->setStretchFactor( folderView, 1 ); 173 //layout->setStretchFactor( folderView, 1 );
157 //layout->setStretchFactor( mailView, 2 ); 174 //layout->setStretchFactor( mailView, 2 );
158 175
159 slotAdjustLayout(); 176 slotAdjustLayout();
160#ifndef DESKTOP_VERSION 177#ifndef DESKTOP_VERSION
161 QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold); 178 QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold);
162 QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold); 179 QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold);
163 QPEApplication::setStylusOperation( subLE ,QPEApplication::RightOnHold); 180 if ( subLE )
164 QPEApplication::setStylusOperation( fromLE ,QPEApplication::RightOnHold); 181 QPEApplication::setStylusOperation( subLE ,QPEApplication::RightOnHold);
165 QPEApplication::setStylusOperation( toLE ,QPEApplication::RightOnHold); 182 if ( fromLE )
183 QPEApplication::setStylusOperation( fromLE ,QPEApplication::RightOnHold);
184 if ( toLE )
185 QPEApplication::setStylusOperation( toLE ,QPEApplication::RightOnHold);
166#endif 186#endif
167 connect( mailView, SIGNAL( doubleClicked (QListViewItem* )),this, 187 connect( mailView, SIGNAL( doubleClicked (QListViewItem* )),this,
168 SLOT( mailLeftClicked(QListViewItem*) ) ); 188 SLOT( mailLeftClicked(QListViewItem*) ) );
169 connect( mailView, SIGNAL( returnPressed (QListViewItem* )),this, 189 connect( mailView, SIGNAL( returnPressed (QListViewItem* )),this,
170 SLOT( mailLeftClicked(QListViewItem*) ) ); 190 SLOT( mailLeftClicked(QListViewItem*) ) );
171 connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, 191 connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this,
172 SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) ); 192 SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) );
173 connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)), 193 connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)),
174 this,SLOT(refreshMailView(const QValueList<RecMailP>&))); 194 this,SLOT(refreshMailView(const QValueList<RecMailP>&)));
175 195
176 connect( mailView, SIGNAL( currentChanged (QListViewItem* )),this, 196 connect( mailView, SIGNAL( currentChanged (QListViewItem* )),this,
177 SLOT( setInfoFields(QListViewItem*) ) ); 197 SLOT( setInfoFields(QListViewItem*) ) );
178 198
179 connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) ); 199 connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) );
180 connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) ); 200 connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) );
181// connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) ); 201// connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) );
182 connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) ); 202 connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) );
183 //mailView->setMultiSelection ( true ); 203 //mailView->setMultiSelection ( true );
184 mailView->setSelectionMode( QListView::Extended ); 204 mailView->setSelectionMode( QListView::Extended );
185 QValueList<int> list; 205 QValueList<int> list;
186 int fw = 100; 206 int fw = 100;
187 if ( QApplication::desktop()->width() > 320 ) 207 if ( QApplication::desktop()->width() > 320 )
188 fw = 50; 208 fw = 50;
189 list.append( fw ); 209 list.append( fw );
190 list.append( 100 ); 210 list.append( 100 );
191 split->setSizes( list ); 211 split->setSizes( list );
192 QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) ); 212 QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) );
193 mailView->setShowSortIndicator ( true ); 213 mailView->setShowSortIndicator ( true );
194 QLabel *spacer = new QLabel( toolBar ); 214 QLabel *spacer = new QLabel( toolBar );
195 spacer->setBackgroundMode( QWidget::PaletteButton ); 215 spacer->setBackgroundMode( QWidget::PaletteButton );
196 toolBar->setStretchableWidget( spacer ); 216 toolBar->setStretchableWidget( spacer );
197 217
198 QAction* closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this); 218 QAction* closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this);
199 connect( closeMail, SIGNAL( activated() ), SLOT( close() ) ); 219 connect( closeMail, SIGNAL( activated() ), SLOT( close() ) );
200 if ( QApplication::desktop()->width() > 320 ) 220 if ( QApplication::desktop()->width() > 320 )
201 closeMail->addTo(toolBar); 221 closeMail->addTo(toolBar);
202 closeMail->addTo(mailMenu); 222 closeMail->addTo(mailMenu);
203 223
204 224
205 QPopupMenu* helpMenu = new QPopupMenu( menuBar ); 225 QPopupMenu* helpMenu = new QPopupMenu( menuBar );
206 menuBar->insertItem( i18n( "Help" ), helpMenu ); 226 menuBar->insertItem( i18n( "Help" ), helpMenu );
207 QAction* li = new QAction(i18n("About"), QPixmap(), 0, 0, this); 227 QAction* li = new QAction(i18n("About"), QPixmap(), 0, 0, this);
208 connect( li, SIGNAL( activated() ), SLOT( showAbout()) ); 228 connect( li, SIGNAL( activated() ), SLOT( showAbout()) );
209 li->addTo(helpMenu); 229 li->addTo(helpMenu);
210 li = new QAction(i18n("Licence"),QPixmap(), 0, 0, this); 230 li = new QAction(i18n("Licence"),QPixmap(), 0, 0, this);
211 connect( li, SIGNAL( activated() ), SLOT( showLicence()) ); 231 connect( li, SIGNAL( activated() ), SLOT( showLicence()) );
212 li->addTo(helpMenu); 232 li->addTo(helpMenu);
213 li = new QAction(i18n("LibEtPan Licence"), QPixmap(), 0, 0, this); 233 li = new QAction(i18n("LibEtPan Licence"), QPixmap(), 0, 0, this);
214 connect( li, SIGNAL( activated() ), SLOT( showEtpanLicence()) ); 234 connect( li, SIGNAL( activated() ), SLOT( showEtpanLicence()) );
215 li->addTo(helpMenu); 235 li->addTo(helpMenu);
216 connect( codecMenu, SIGNAL( activated(int) ), this, SLOT( slotSetCodec( int )) ); 236 connect( codecMenu, SIGNAL( activated(int) ), this, SLOT( slotSetCodec( int )) );
217 slotSetCodec( KOPrefs::instance()->mCurrentCodec ); 237 slotSetCodec( KOPrefs::instance()->mCurrentCodec );
218#ifdef DESKTOP_VERSION 238#ifdef DESKTOP_VERSION
219 resize ( 640, 480 ); 239 resize ( 640, 480 );
220#endif 240#endif
221} 241}
222 242
223MainWindow::~MainWindow() 243MainWindow::~MainWindow()
224{ 244{
225} 245}
226 246
227void MainWindow::setInfoFields(QListViewItem* item ) 247void MainWindow::setInfoFields(QListViewItem* item )
228{ 248{
229 if ( item == 0) { 249 if ( item == 0) {
230 subLE->setText(""); 250 if ( subLE ) subLE->setText("");
231 fromLE->setText(""); 251 if ( fromLE ) fromLE->setText("");
232 toLE->setText(""); 252 if ( toLE ) toLE->setText("");
233 return; 253 return;
234 } 254 }
235 RecMailP mail = ((MailListViewItem*)item)->data(); 255 RecMailP mail = ((MailListViewItem*)item)->data();
236 subLE->setText(mail->getSubject()); 256 if ( subLE ) subLE->setText(mail->getSubject());
237 fromLE->setText(mail->getFrom()); 257 if ( fromLE ) fromLE->setText(mail->getFrom());
238 toLE->setText(mail->To().join(";" )); 258 if ( toLE ) toLE->setText(mail->To().join(";" ));
239 subLE->setCursorPosition(0); 259 if ( subLE ) subLE->setCursorPosition(0);
240 fromLE->setCursorPosition(0); 260 if ( fromLE ) fromLE->setCursorPosition(0);
241 toLE->setCursorPosition(0); 261 if ( toLE ) toLE->setCursorPosition(0);
242 262
243} 263}
244void MainWindow::slotSetCodec( int codec ) 264void MainWindow::slotSetCodec( int codec )
245{ 265{
246 codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, false ); 266 codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, false );
247 //qDebug("codec %d ", codec); 267 //qDebug("codec %d ", codec);
248 KOPrefs::instance()->mCurrentCodec = codec; 268 KOPrefs::instance()->mCurrentCodec = codec;
249 KOPrefs::instance()->isDirty = true; 269 KOPrefs::instance()->isDirty = true;
250 QString name; 270 QString name;
251 switch ( codec ) { 271 switch ( codec ) {
252 case 0: 272 case 0:
253 name = "iso-8859-1"; 273 name = "iso-8859-1";
254 break; 274 break;
255 case 1: 275 case 1:
256 name = "iso-8859-5"; 276 name = "iso-8859-5";
257 break; 277 break;
258 case 2: 278 case 2:
259 name = "iso-8859-15"; 279 name = "iso-8859-15";
260 break; 280 break;
261 case 3: 281 case 3:
262 name = "big-5"; 282 name = "big-5";
263 break; 283 break;
264 case 4: 284 case 4:
265 name = "utf-8"; 285 name = "utf-8";
266 break; 286 break;
267 case 5: 287 case 5:
268 name = KOPrefs::instance()->mSendCodec.lower(); 288 name = KOPrefs::instance()->mSendCodec.lower();
269 break; 289 break;
270 } 290 }
271 KOPrefs::instance()->mCurrentCodeName = name ; 291 KOPrefs::instance()->mCurrentCodeName = name ;
272 codecMenu->changeItem ( 5, "Userdefined ("+KOPrefs::instance()->mSendCodec+")"); 292 codecMenu->changeItem ( 5, "Userdefined ("+KOPrefs::instance()->mSendCodec+")");
273 codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, true ); 293 codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, true );
274} 294}
275void MainWindow::showLicence() 295void MainWindow::showLicence()
276{ 296{
277 KApplication::showLicence(); 297 KApplication::showLicence();
278} 298}
279void MainWindow::showAbout() 299void MainWindow::showAbout()
280{ 300{
281 QString version; 301 QString version;
282#include <../version> 302#include <../version>
283 303
284 QString cap = "About KOpieMail/Pi"; 304 QString cap = "About KOpieMail/Pi";
285 QString text =i18n("KOpieMail/Platform-independent\n") + 305 QString text =i18n("KOpieMail/Platform-independent\n") +
286 "(OM/Pi) " + version + " - " 306 "(OM/Pi) " + version + " - "
287 307
288#ifdef DESKTOP_VERSION 308#ifdef DESKTOP_VERSION
289 "Desktop Edition\n" 309 "Desktop Edition\n"
290#else 310#else
291 "PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n" 311 "PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n"
292#endif 312#endif
293 "www.pi-sync.net\n\n" 313 "www.pi-sync.net\n\n"
294 314
295 315
296 316
297"Copyright (c) 2004 Lutz Rogowski <lutz@pi-sync.net>\n" 317"Copyright (c) 2004 Lutz Rogowski <lutz@pi-sync.net>\n"
298 "KOpieMail/Pi is based on Opie Mail\n" 318 "KOpieMail/Pi is based on Opie Mail\n"
299 "Copyright (c) Rajko Albrecht and the Opie team\n" 319 "Copyright (c) Rajko Albrecht and the Opie team\n"
300 "KOpieMail/Pi is licensed under the GPL\n" 320 "KOpieMail/Pi is licensed under the GPL\n"
301 "\n" 321 "\n"
302 "KOpieMail/Pi uses LibEtPan - a mail stuff library\n" 322 "KOpieMail/Pi uses LibEtPan - a mail stuff library\n"
303 "Copyright (C) 2001, 2002 - DINH Viet Hoa\n" 323 "Copyright (C) 2001, 2002 - DINH Viet Hoa\n"
304 "libEtPan has its own licence - see LibEtPan licence\n"; 324 "libEtPan has its own licence - see LibEtPan licence\n";
305 325
306 KApplication::showText( cap, text ); 326 KApplication::showText( cap, text );
307} 327}
308void MainWindow::showEtpanLicence() 328void MainWindow::showEtpanLicence()
309{ 329{
310 KApplication::showFile( "LibEtPan licence", "kdepim/kopiemail/COPYRIGHTlibetpan" ); 330 KApplication::showFile( "LibEtPan licence", "kdepim/kopiemail/COPYRIGHTlibetpan" );
311 331
312} 332}
313void MainWindow::appMessage(const QCString &, const QByteArray &) 333void MainWindow::appMessage(const QCString &, const QByteArray &)
314{ 334{
315 qDebug("appMessage implemented by subclass"); 335 qDebug("appMessage implemented by subclass");
316} 336}
317 337
318void MainWindow::slotAdjustLayout() { 338void MainWindow::slotAdjustLayout() {
319 339
320 /* 340 /*
321 QWidget *d = QApplication::desktop(); 341 QWidget *d = QApplication::desktop();
322 342
323 if ( d->width() < d->height() ) { 343 if ( d->width() < d->height() ) {
324 layout->setDirection( QBoxLayout::TopToBottom ); 344 layout->setDirection( QBoxLayout::TopToBottom );
325 } else { 345 } else {
326 layout->setDirection( QBoxLayout::LeftToRight ); 346 layout->setDirection( QBoxLayout::LeftToRight );
327 } 347 }
328 */ 348 */
329} 349}
330 350
331void MainWindow::slotAdjustColumns() 351void MainWindow::slotAdjustColumns()
332{ 352{
333 bool hidden = folderView->isHidden(); 353 bool hidden = folderView->isHidden();
334 if ( hidden ) folderView->show(); 354 if ( hidden ) folderView->show();
335 folderView->setColumnWidth( 0, folderView->visibleWidth() ); 355 folderView->setColumnWidth( 0, folderView->visibleWidth() );
336 if ( hidden ) folderView->hide(); 356 if ( hidden ) folderView->hide();
337 357
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index 68f0eb3..f56711d 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -402,199 +402,200 @@ void OpieMail::displayMail()
402 readMail.showMaximized(); 402 readMail.showMaximized();
403#else 403#else
404 readMail.resize( 640, 480); 404 readMail.resize( 640, 480);
405#endif 405#endif
406 connect( &readMail,SIGNAL( showNextMail(ViewMail *) ), this, SLOT( displayNextMail(ViewMail *) ) ); 406 connect( &readMail,SIGNAL( showNextMail(ViewMail *) ), this, SLOT( displayNextMail(ViewMail *) ) );
407 connect( &readMail,SIGNAL( deleteAndDisplayNextMail(ViewMail *) ), this, SLOT(deleteAndDisplayNextMail(ViewMail *) ) ); 407 connect( &readMail,SIGNAL( deleteAndDisplayNextMail(ViewMail *) ), this, SLOT(deleteAndDisplayNextMail(ViewMail *) ) );
408 connect( &readMail,SIGNAL( signalDownloadMail() ), this, SLOT( slotDownloadMail() ) ); 408 connect( &readMail,SIGNAL( signalDownloadMail() ), this, SLOT( slotDownloadMail() ) );
409 409
410 readMail.exec(); 410 readMail.exec();
411 411
412 if ( readMail.deleted ) 412 if ( readMail.deleted )
413 { 413 {
414 folderView->refreshCurrent(); 414 folderView->refreshCurrent();
415 } 415 }
416 else 416 else
417 { 417 {
418 QListViewItem*item = mailView->currentItem(); 418 QListViewItem*item = mailView->currentItem();
419 if (item) 419 if (item)
420 ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() ); 420 ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() );
421 } 421 }
422} 422}
423void OpieMail::slotGetAllMail() 423void OpieMail::slotGetAllMail()
424{ 424{
425 QListViewItem * item = folderView->firstChild(); 425 QListViewItem * item = folderView->firstChild();
426 while ( item ){ 426 while ( item ){
427 ((AccountViewItem *)item)->contextMenuSelected( 101 ); 427 ((AccountViewItem *)item)->contextMenuSelected( 101 );
428 item = item->nextSibling (); 428 item = item->nextSibling ();
429 } 429 }
430} 430}
431void OpieMail::slotGetMail() 431void OpieMail::slotGetMail()
432{ 432{
433 QListViewItem * item = folderView->currentItem(); 433 QListViewItem * item = folderView->currentItem();
434 if ( ! item ) return; 434 if ( ! item ) return;
435 ((AccountViewItem *)item)->contextMenuSelected( 101 ); 435 ((AccountViewItem *)item)->contextMenuSelected( 101 );
436} 436}
437void OpieMail::slotDeleteMail() 437void OpieMail::slotDeleteMail()
438{ 438{
439 if (!mailView->currentItem()) return; 439 if (!mailView->currentItem()) return;
440 RecMailP mail = ((MailListViewItem*)mailView->currentItem() )->data(); 440 RecMailP mail = ((MailListViewItem*)mailView->currentItem() )->data();
441 if ( QMessageBox::warning(this, i18n("Delete Mail"), QString( i18n("<p>Do you really want to delete this mail? <br><br>" ) + mail->getFrom() + " - " + mail->getSubject() ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) 441 if ( QMessageBox::warning(this, i18n("Delete Mail"), QString( i18n("<p>Do you really want to delete this mail? <br><br>" ) + mail->getFrom() + " - " + mail->getSubject() ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
442 { 442 {
443 mail->Wrapper()->deleteMail( mail ); 443 mail->Wrapper()->deleteMail( mail );
444 folderView->refreshCurrent(); 444 folderView->refreshCurrent();
445 } 445 }
446} 446}
447void OpieMail::slotDeleteAllMail() 447void OpieMail::slotDeleteAllMail()
448{ 448{
449 449
450 QValueList<RecMailP> t; 450 QValueList<RecMailP> t;
451 if ( QMessageBox::warning(this, i18n("Delete All Mails"), i18n("Do you really want to delete\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) 451 if ( QMessageBox::warning(this, i18n("Delete All Mails"), i18n("Do you really want to delete\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
452 { 452 {
453 MailListViewItem* item = (MailListViewItem*)mailView->firstChild (); 453 MailListViewItem* item = (MailListViewItem*)mailView->firstChild ();
454 while ( item ) { 454 while ( item ) {
455 if ( item->isSelected() ) { 455 if ( item->isSelected() ) {
456 t.append( item->data() ); 456 t.append( item->data() );
457 } 457 }
458 item = (MailListViewItem*)item->nextSibling(); 458 item = (MailListViewItem*)item->nextSibling();
459 } 459 }
460 } 460 }
461 else 461 else
462 return; 462 return;
463 if ( t.count() == 0 ) 463 if ( t.count() == 0 )
464 return; 464 return;
465 RecMailP mail = t.first(); 465 RecMailP mail = t.first();
466 mail->Wrapper()->deleteMailList(t); 466 mail->Wrapper()->deleteMailList(t);
467 folderView->refreshCurrent(); 467 folderView->refreshCurrent();
468 468
469 469
470} 470}
471void OpieMail::clearSelection() 471void OpieMail::clearSelection()
472{ 472{
473 mailView->clearSelection(); 473 mailView->clearSelection();
474 474
475} 475}
476 476
477void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) 477void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int )
478{ 478{
479 if (!mailView->currentItem()) return; 479 if (!mailView->currentItem()) return;
480 MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType(); 480 MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType();
481 /* just the RIGHT button - or hold on pda */ 481 /* just the RIGHT button - or hold on pda */
482 if (button!=2) {return;} 482 if (button!=2) {return;}
483 if (!item) return; 483 if (!item) return;
484 QPopupMenu *m = new QPopupMenu(0); 484 QPopupMenu *m = new QPopupMenu(0);
485 if (m) 485 if (m)
486 { 486 {
487 if (mailtype==MAILLIB::A_NNTP) { 487 if (mailtype==MAILLIB::A_NNTP) {
488 m->insertItem(i18n("Read this posting"),this,SLOT(displayMail())); 488 m->insertItem(i18n("Read this posting"),this,SLOT(displayMail()));
489 m->insertItem(i18n("Copy this posting"),this,SLOT(slotMoveCopyMail())); 489 m->insertItem(i18n("Copy this posting"),this,SLOT(slotMoveCopyMail()));
490 m->insertSeparator(); 490 m->insertSeparator();
491 m->insertItem(i18n("Copy all selected postings"),this,SLOT(slotMoveCopyAllMail())); 491 m->insertItem(i18n("Copy all selected postings"),this,SLOT(slotMoveCopyAllMail()));
492 m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection())); 492 m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection()));
493 } else { 493 } else {
494 if (folderView->currentisDraft()) { 494 if (folderView->currentisDraft()) {
495 m->insertItem(i18n("Edit this mail"),this,SLOT(reEditMail())); 495 m->insertItem(i18n("Edit this mail"),this,SLOT(reEditMail()));
496 } 496 }
497 m->insertItem(i18n("Reply to this mail"),this,SLOT(replyMail())); 497 m->insertItem(i18n("Reply to this mail"),this,SLOT(replyMail()));
498 m->insertSeparator();
499 m->insertItem(i18n("Read this mail"),this,SLOT(displayMail())); 498 m->insertItem(i18n("Read this mail"),this,SLOT(displayMail()));
499 m->insertSeparator();
500 m->insertItem(i18n("Move/Copy this mail"),this,SLOT(slotMoveCopyMail())); 500 m->insertItem(i18n("Move/Copy this mail"),this,SLOT(slotMoveCopyMail()));
501 m->insertItem(i18n("Delete this mail"),this,SLOT(slotDeleteMail())); 501 m->insertItem(i18n("Delete this mail"),this,SLOT(slotDeleteMail()));
502 m->insertSeparator(); 502 m->insertSeparator();
503 m->insertItem(i18n("Move/Copy all selected mail"),this,SLOT(slotMoveCopyAllMail())); 503 m->insertItem(i18n("Move/Copy all selected mail"),this,SLOT(slotMoveCopyAllMail()));
504 m->insertItem(i18n("Delete all selected mails"),this,SLOT(slotDeleteAllMail())); 504 m->insertItem(i18n("Delete all selected mails"),this,SLOT(slotDeleteAllMail()));
505 m->insertSeparator();
505 m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection())); 506 m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection()));
506 } 507 }
507 m->setFocus(); 508 m->setFocus();
508 m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) ); 509 m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) );
509 delete m; 510 delete m;
510 } 511 }
511} 512}
512 513
513void OpieMail::slotShowFolders( bool show ) 514void OpieMail::slotShowFolders( bool show )
514{ 515{
515 if ( show && folderView->isHidden() ) 516 if ( show && folderView->isHidden() )
516 { 517 {
517 folderView->show(); 518 folderView->show();
518 } 519 }
519 else if ( !show && !folderView->isHidden() ) 520 else if ( !show && !folderView->isHidden() )
520 { 521 {
521 folderView->hide(); 522 folderView->hide();
522 } 523 }
523} 524}
524 525
525void OpieMail::refreshMailView(const QValueList<RecMailP>&list) 526void OpieMail::refreshMailView(const QValueList<RecMailP>&list)
526{ 527{
527 MailListViewItem*item = 0; 528 MailListViewItem*item = 0;
528 mailView->clear(); 529 mailView->clear();
529 530
530 QValueList<RecMailP>::ConstIterator it; 531 QValueList<RecMailP>::ConstIterator it;
531 for (it = list.begin(); it != list.end();++it) 532 for (it = list.begin(); it != list.end();++it)
532 { 533 {
533 item = new MailListViewItem(mailView,item); 534 item = new MailListViewItem(mailView,item);
534 item->storeData((*it)); 535 item->storeData((*it));
535 item->showEntry(); 536 item->showEntry();
536 } 537 }
537 mailView->setSorting ( 4, false ); 538 mailView->setSorting ( 4, false );
538} 539}
539 540
540void OpieMail::mailLeftClicked( QListViewItem *item ) 541void OpieMail::mailLeftClicked( QListViewItem *item )
541{ 542{
542 mailView->clearSelection(); 543 mailView->clearSelection();
543 /* just LEFT button - or tap with stylus on pda */ 544 /* just LEFT button - or tap with stylus on pda */
544 //if (button!=1) return; 545 //if (button!=1) return;
545 if (!item) return; 546 if (!item) return;
546 if (folderView->currentisDraft()) { 547 if (folderView->currentisDraft()) {
547 reEditMail(); 548 reEditMail();
548 } else { 549 } else {
549 displayMail(); 550 displayMail();
550 } 551 }
551} 552}
552 553
553void OpieMail::slotMoveCopyMail() 554void OpieMail::slotMoveCopyMail()
554{ 555{
555 if (!mailView->currentItem()) return; 556 if (!mailView->currentItem()) return;
556 RecMailP mail = ((MailListViewItem*)mailView->currentItem() )->data(); 557 RecMailP mail = ((MailListViewItem*)mailView->currentItem() )->data();
557 AbstractMail*targetMail = 0; 558 AbstractMail*targetMail = 0;
558 QString targetFolder = ""; 559 QString targetFolder = "";
559 Selectstore sels; 560 Selectstore sels;
560 folderView->setupFolderselect(&sels); 561 folderView->setupFolderselect(&sels);
561 if (!sels.exec()) return; 562 if (!sels.exec()) return;
562 targetMail = sels.currentMail(); 563 targetMail = sels.currentMail();
563 targetFolder = sels.currentFolder(); 564 targetFolder = sels.currentFolder();
564 if ( (mail->Wrapper()==targetMail && mail->getMbox()==targetFolder) || 565 if ( (mail->Wrapper()==targetMail && mail->getMbox()==targetFolder) ||
565 targetFolder.isEmpty()) 566 targetFolder.isEmpty())
566 { 567 {
567 return; 568 return;
568 } 569 }
569 if (sels.newFolder() && !targetMail->createMbox(targetFolder)) 570 if (sels.newFolder() && !targetMail->createMbox(targetFolder))
570 { 571 {
571 QMessageBox::critical(0,i18n("Error creating new Folder"), 572 QMessageBox::critical(0,i18n("Error creating new Folder"),
572 i18n("<center>Error while creating<br>new folder - breaking.</center>")); 573 i18n("<center>Error while creating<br>new folder - breaking.</center>"));
573 return; 574 return;
574 } 575 }
575 sels.hide(); 576 sels.hide();
576 qApp->processEvents(); 577 qApp->processEvents();
577 // qDebug("hiding sels "); 578 // qDebug("hiding sels ");
578 mail->Wrapper()->mvcpMail(mail,targetFolder,targetMail,sels.moveMails()); 579 mail->Wrapper()->mvcpMail(mail,targetFolder,targetMail,sels.moveMails());
579 folderView->refreshCurrent(); 580 folderView->refreshCurrent();
580} 581}
581 582
582void OpieMail::slotMoveCopyAllMail() 583void OpieMail::slotMoveCopyAllMail()
583{ 584{
584 585
585 if (!mailView->currentItem()) return; 586 if (!mailView->currentItem()) return;
586 QValueList<RecMailP> t; 587 QValueList<RecMailP> t;
587 // if ( QMessageBox::warning(this, i18n("Move/Copy all selected mails"), i18n("Do you really want to copy/move\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) 588 // if ( QMessageBox::warning(this, i18n("Move/Copy all selected mails"), i18n("Do you really want to copy/move\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
588 { 589 {
589 MailListViewItem* item = (MailListViewItem*)mailView->firstChild (); 590 MailListViewItem* item = (MailListViewItem*)mailView->firstChild ();
590 while ( item ) { 591 while ( item ) {
591 if ( item->isSelected() ) { 592 if ( item->isSelected() ) {
592 t.append( item->data() ); 593 t.append( item->data() );
593 } 594 }
594 item = (MailListViewItem*)item->nextSibling(); 595 item = (MailListViewItem*)item->nextSibling();
595 } 596 }
596 } 597 }
597 // else 598 // else
598 // return; 599 // return;
599 if ( t.count() == 0 ) 600 if ( t.count() == 0 )
600 return; 601 return;
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp
index 57623e6..d7ff9f2 100644
--- a/korganizer/kowhatsnextview.cpp
+++ b/korganizer/kowhatsnextview.cpp
@@ -519,193 +519,193 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a
519 dateText += event->dtEndTimeStr(); 519 dateText += event->dtEndTimeStr();
520 if ( notRed ) 520 if ( notRed )
521 tempText += dateText; 521 tempText += dateText;
522 else { 522 else {
523 if ( end < cdt ) { 523 if ( end < cdt ) {
524 if ( !KOPrefs::instance()->mWNViewShowsPast ) 524 if ( !KOPrefs::instance()->mWNViewShowsPast )
525 return false; 525 return false;
526 tempText += "<font color=\"#F00000\">" + dateText + "</font>"; 526 tempText += "<font color=\"#F00000\">" + dateText + "</font>";
527 } 527 }
528 else if ( st < cdt ) 528 else if ( st < cdt )
529 tempText += "<font color=\"#008000\">" + dateText + "</font>"; 529 tempText += "<font color=\"#008000\">" + dateText + "</font>";
530 else 530 else
531 tempText += dateText; 531 tempText += dateText;
532 532
533 } 533 }
534 534
535 } else { 535 } else {
536 if ( bDay ) { 536 if ( bDay ) {
537 537
538 if ( ev->categories().contains( i18n("Birthday") )) 538 if ( ev->categories().contains( i18n("Birthday") ))
539 tempText += "<font color=\"#F00000\">" + i18n("Birthday") +":</font>"; 539 tempText += "<font color=\"#F00000\">" + i18n("Birthday") +":</font>";
540 else 540 else
541 tempText += "<font color=\"#F00000\">" + i18n("Anniversary")+":</font>"; 541 tempText += "<font color=\"#F00000\">" + i18n("Anniversary")+":</font>";
542 } else { 542 } else {
543 tempText += i18n("Allday:"); 543 tempText += i18n("Allday:");
544 } 544 }
545 545
546 } 546 }
547 } 547 }
548 } else { 548 } else {
549 mTodos.append( ev ); 549 mTodos.append( ev );
550 tempText += i18n("ToDo:"); 550 tempText += i18n("ToDo:");
551 if (reply) { 551 if (reply) {
552 tempText += " "; 552 tempText += " ";
553 if ( noc != cdt ) { 553 if ( noc != cdt ) {
554 tempText += KGlobal::locale()->formatDate( noc.date() , KOPrefs::instance()->mShortDateInViewer) +": "; 554 tempText += KGlobal::locale()->formatDate( noc.date() , KOPrefs::instance()->mShortDateInViewer) +": ";
555 } 555 }
556 } else { 556 } else {
557 if ( ((Todo*)ev)->dtDue().date() < QDate::currentDate() ) { 557 if ( ((Todo*)ev)->dtDue().date() < QDate::currentDate() ) {
558 // tempText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>"; 558 // tempText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>";
559 QString dfs = KGlobal::locale()->dateFormatShort(); 559 QString dfs = KGlobal::locale()->dateFormatShort();
560 KGlobal::locale()->setDateFormatShort("%d.%b"); 560 KGlobal::locale()->setDateFormatShort("%d.%b");
561 tempText +="<font color=\"#F00000\">" + KGlobal::locale()->formatDate(((Todo*)ev)->dtDue().date(), true, KLocale::Userdefined) + "</font>"; 561 tempText +="<font color=\"#F00000\">" + KGlobal::locale()->formatDate(((Todo*)ev)->dtDue().date(), true, KLocale::Userdefined) + "</font>";
562 KGlobal::locale()->setDateFormatShort(dfs); 562 KGlobal::locale()->setDateFormatShort(dfs);
563 } else { 563 } else {
564 if (!ev->doesFloat() ) 564 if (!ev->doesFloat() )
565 if( ( (Todo*)ev)->dtDue() < cdt ) { 565 if( ( (Todo*)ev)->dtDue() < cdt ) {
566 tempText +="<font color=\"#F00000\">" + ((Todo*)ev)->dtDueTimeStr() + "</font>"; 566 tempText +="<font color=\"#F00000\">" + ((Todo*)ev)->dtDueTimeStr() + "</font>";
567 567
568 568
569 } else 569 } else
570 tempText +=((Todo*)ev)->dtDueTimeStr(); 570 tempText +=((Todo*)ev)->dtDueTimeStr();
571 mTodos.append( ev ); 571 mTodos.append( ev );
572 } 572 }
573 } 573 }
574 } 574 }
575 tempText += "</b></td><td>"; 575 tempText += "</b></td><td>";
576 bool needClose = false; 576 bool needClose = false;
577 if ( ev->cancelled() ) { 577 if ( ev->cancelled() ) {
578 tempText += "<font color=\"#F00000\">[c"; 578 tempText += "<font color=\"#F00000\">[c";
579 needClose =true; 579 needClose =true;
580 580
581 } 581 }
582 if ( ev->isAlarmEnabled() ) { 582 if ( ev->isAlarmEnabled() ) {
583 if ( !needClose) 583 if ( !needClose)
584 tempText +="["; 584 tempText +="[";
585 tempText += "a"; 585 tempText += "a";
586 needClose =true; 586 needClose =true;
587 587
588 } 588 }
589 if ( ev->description().length() > 0 ) { 589 if ( ev->description().length() > 0 ) {
590 if ( !needClose) 590 if ( !needClose)
591 tempText +="["; 591 tempText +="[";
592 tempText += "i"; 592 tempText += "i";
593 needClose =true; 593 needClose =true;
594 } 594 }
595 if ( ev->recurrence()->doesRecur() ) { 595 if ( ev->recurrence()->doesRecur() ) {
596 if ( !needClose) 596 if ( !needClose)
597 tempText +="["; 597 tempText +="[";
598 tempText += "r"; 598 tempText += "r";
599 needClose =true; 599 needClose =true;
600 } 600 }
601 if ( needClose ) { 601 if ( needClose ) {
602 tempText += "] "; 602 tempText += "] ";
603 } 603 }
604 if ( ev->cancelled() ) 604 if ( ev->cancelled() )
605 tempText += "</font>"; 605 tempText += "</font>";
606 tempText += "<a "; 606 tempText += "<a ";
607 if (ev->type()=="Event") tempText += "href=\"event:"; 607 if (ev->type()=="Event") tempText += "href=\"event:";
608 if (ev->type()=="Todo") tempText += "href=\"todo:"; 608 if (ev->type()=="Todo") tempText += "href=\"todo:";
609 tempText += ev->uid() + "\">"; 609 tempText += ev->uid() + "\">";
610 if ( ev->summary().length() > 0 ) 610 if ( ev->summary().length() > 0 )
611 tempText += ev->summary(); 611 tempText += ev->summary();
612 else 612 else
613 tempText += i18n("-no summary-"); 613 tempText += i18n("-no summary-");
614 if ( bDay ) { 614 if ( bDay ) {
615 noc = ev->getNextOccurence( cdt, &ok ); 615 noc = ev->getNextOccurence( cdt.addDays(-1), &ok );
616 if ( ok ) { 616 if ( ok ) {
617 int years = noc.date().year() - ev->dtStart().date().year(); 617 int years = noc.date().year() - ev->dtStart().date().year();
618 tempText += i18n(" (%1 y.)"). arg( years ); 618 tempText += i18n(" (%1 y.)"). arg( years );
619 } 619 }
620 } 620 }
621 621
622 tempText += "</a>"; 622 tempText += "</a>";
623 if ( KOPrefs::instance()->mWNViewShowLocation ) 623 if ( KOPrefs::instance()->mWNViewShowLocation )
624 if ( !ev->location().isEmpty() ) 624 if ( !ev->location().isEmpty() )
625 tempText += " ("+ev->location() +")"; 625 tempText += " ("+ev->location() +")";
626 if ( ev->relatedTo() && KOPrefs::instance()->mWNViewShowsParents) 626 if ( ev->relatedTo() && KOPrefs::instance()->mWNViewShowsParents)
627 tempText += " ["+ev->relatedTo()->summary() +"]"; 627 tempText += " ["+ev->relatedTo()->summary() +"]";
628 tempText += "</td></tr>\n"; 628 tempText += "</td></tr>\n";
629 mText += tempText; 629 mText += tempText;
630 return true; 630 return true;
631} 631}
632 632
633bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub ) 633bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub )
634{ 634{
635 if ( mTodos.find( ev ) != mTodos.end() ) return false; 635 if ( mTodos.find( ev ) != mTodos.end() ) return false;
636 636
637 mTodos.append( ev ); 637 mTodos.append( ev );
638 if ( !isSub ) 638 if ( !isSub )
639 mText += "<p>"; 639 mText += "<p>";
640 else 640 else
641 mText += "<li>"; 641 mText += "<li>";
642 mText += "[" +QString::number(ev->priority()) + "/" + QString::number(((Todo*)ev)->percentComplete())+"%] "; 642 mText += "[" +QString::number(ev->priority()) + "/" + QString::number(((Todo*)ev)->percentComplete())+"%] ";
643 643
644 644
645 mText += ind; 645 mText += ind;
646 bool needClose = false; 646 bool needClose = false;
647 if ( ev->cancelled() ) { 647 if ( ev->cancelled() ) {
648 mText += "<font color=\"#F00000\">[c"; 648 mText += "<font color=\"#F00000\">[c";
649 needClose =true; 649 needClose =true;
650 650
651 } 651 }
652 if ( ev->isAlarmEnabled() ) { 652 if ( ev->isAlarmEnabled() ) {
653 if ( !needClose) 653 if ( !needClose)
654 mText +="["; 654 mText +="[";
655 mText += "a"; 655 mText += "a";
656 needClose =true; 656 needClose =true;
657 657
658 } 658 }
659 659
660 if ( ev->description().length() > 0 ) { 660 if ( ev->description().length() > 0 ) {
661 if ( !needClose) 661 if ( !needClose)
662 mText +="["; 662 mText +="[";
663 mText += "i"; 663 mText += "i";
664 needClose =true; 664 needClose =true;
665 } 665 }
666 // if ( ev->recurrence()->doesRecur() ) { 666 // if ( ev->recurrence()->doesRecur() ) {
667 // if ( !needClose) 667 // if ( !needClose)
668 // mText +="("; 668 // mText +="(";
669 // mText += "r"; 669 // mText += "r";
670 // needClose =true; 670 // needClose =true;
671 // } 671 // }
672 if ( needClose ) 672 if ( needClose )
673 mText += "] "; 673 mText += "] ";
674 if ( ev->cancelled() ) 674 if ( ev->cancelled() )
675 mText += "</font>"; 675 mText += "</font>";
676 mText += "<a href=\"todo:" + ev->uid() + "\">"; 676 mText += "<a href=\"todo:" + ev->uid() + "\">";
677 if ( ev->summary().length() > 0 ) 677 if ( ev->summary().length() > 0 )
678 mText += ev->summary(); 678 mText += ev->summary();
679 else 679 else
680 mText += i18n("-no summary-"); 680 mText += i18n("-no summary-");
681 mText += "</a>"; 681 mText += "</a>";
682 if ( ((Todo*)ev)->hasDueDate () ) { 682 if ( ((Todo*)ev)->hasDueDate () ) {
683 QString year = ""; 683 QString year = "";
684 int ye = ((Todo*)ev)->dtDue().date().year(); 684 int ye = ((Todo*)ev)->dtDue().date().year();
685 if ( QDateTime::currentDateTime().date().year() != ye ) 685 if ( QDateTime::currentDateTime().date().year() != ye )
686 year = QString::number( ye ); 686 year = QString::number( ye );
687 QString dfs = KGlobal::locale()->dateFormatShort(); 687 QString dfs = KGlobal::locale()->dateFormatShort();
688 KGlobal::locale()->setDateFormatShort("%d.%b"); 688 KGlobal::locale()->setDateFormatShort("%d.%b");
689 mText +="<font color=\"#00A000\"> [" + KGlobal::locale()->formatDate(((Todo*)ev)->dtDue().date(), true, KLocale::Userdefined) + "."+ year +"]</font>"; 689 mText +="<font color=\"#00A000\"> [" + KGlobal::locale()->formatDate(((Todo*)ev)->dtDue().date(), true, KLocale::Userdefined) + "."+ year +"]</font>";
690 KGlobal::locale()->setDateFormatShort(dfs); 690 KGlobal::locale()->setDateFormatShort(dfs);
691 } 691 }
692 if ( KOPrefs::instance()->mWNViewShowLocation ) 692 if ( KOPrefs::instance()->mWNViewShowLocation )
693 if ( !ev->location().isEmpty() ) 693 if ( !ev->location().isEmpty() )
694 mText += " ("+ev->location() +")"; 694 mText += " ("+ev->location() +")";
695 if ( !isSub ) { 695 if ( !isSub ) {
696 if ( ((Todo*)ev)->relatedTo()&& KOPrefs::instance()->mWNViewShowsParents) 696 if ( ((Todo*)ev)->relatedTo()&& KOPrefs::instance()->mWNViewShowsParents)
697 mText += " ["+ev->relatedTo()->summary() +"]"; 697 mText += " ["+ev->relatedTo()->summary() +"]";
698 mText += "</p>\n"; 698 mText += "</p>\n";
699 } 699 }
700 else { 700 else {
701 ind += "-"; 701 ind += "-";
702 mText += "</li>\n"; 702 mText += "</li>\n";
703 } 703 }
704 QPtrList<Incidence> Relations = ev->relations(); 704 QPtrList<Incidence> Relations = ev->relations();
705 Incidence *to; 705 Incidence *to;
706 for (to=Relations.first();to;to=Relations.next()) { 706 for (to=Relations.first();to;to=Relations.next()) {
707 if (!((Todo*)to)->isCompleted()) 707 if (!((Todo*)to)->isCompleted())
708 appendTodo( to, ind , true ); 708 appendTodo( to, ind , true );
709 } 709 }
710 710
711 return true; 711 return true;
diff --git a/microkde/KDGanttMinimizeSplitter.cpp b/microkde/KDGanttMinimizeSplitter.cpp
index 567ae54..84edc0d 100644
--- a/microkde/KDGanttMinimizeSplitter.cpp
+++ b/microkde/KDGanttMinimizeSplitter.cpp
@@ -73,192 +73,193 @@ KDGanttSplitterHandle::KDGanttSplitterHandle( Qt::Orientation o,
73 if ( QApplication::desktop()->width() > 320 && QApplication::desktop()->width() < 650 ) { 73 if ( QApplication::desktop()->width() > 320 && QApplication::desktop()->width() < 650 ) {
74 mSizeHint = QSize(7,7); 74 mSizeHint = QSize(7,7);
75 mUseOffset = true; 75 mUseOffset = true;
76 } else { 76 } else {
77 mSizeHint = QSize(6,6); 77 mSizeHint = QSize(6,6);
78 mUseOffset = false; 78 mUseOffset = false;
79 } 79 }
80 s = parent; 80 s = parent;
81 setOrientation(o); 81 setOrientation(o);
82 setMouseTracking( true ); 82 setMouseTracking( true );
83 //setMaximumHeight( 5 ); // test only 83 //setMaximumHeight( 5 ); // test only
84} 84}
85 85
86QSize KDGanttSplitterHandle::sizeHint() const 86QSize KDGanttSplitterHandle::sizeHint() const
87{ 87{
88 return mSizeHint; 88 return mSizeHint;
89} 89}
90 90
91void KDGanttSplitterHandle::setOrientation( Qt::Orientation o ) 91void KDGanttSplitterHandle::setOrientation( Qt::Orientation o )
92{ 92{
93 orient = o; 93 orient = o;
94#ifndef QT_NO_CURSOR 94#ifndef QT_NO_CURSOR
95 if ( o == KDGanttMinimizeSplitter::Horizontal ) 95 if ( o == KDGanttMinimizeSplitter::Horizontal )
96 setCursor( splitHCursor ); 96 setCursor( splitHCursor );
97 else 97 else
98 setCursor( splitVCursor ); 98 setCursor( splitVCursor );
99#endif 99#endif
100} 100}
101 101
102 102
103void KDGanttSplitterHandle::mouseMoveEvent( QMouseEvent *e ) 103void KDGanttSplitterHandle::mouseMoveEvent( QMouseEvent *e )
104{ 104{
105 updateCursor( e->pos() ); 105 updateCursor( e->pos() );
106 if ( !(e->state()&LeftButton) ) 106 if ( !(e->state()&LeftButton) )
107 return; 107 return;
108 108
109 if ( _activeButton != 0) 109 if ( _activeButton != 0)
110 return; 110 return;
111 111
112 QCOORD pos = s->pick(parentWidget()->mapFromGlobal(e->globalPos())) 112 QCOORD pos = s->pick(parentWidget()->mapFromGlobal(e->globalPos()))
113 - mouseOffset; 113 - mouseOffset;
114 if ( true /*opaque()*/ ) { 114 if ( true /*opaque()*/ ) {
115 s->moveSplitter( pos, id() ); 115 s->moveSplitter( pos, id() );
116 } else { 116 } else {
117 int min = pos; int max = pos; 117 int min = pos; int max = pos;
118 s->getRange( id(), &min, &max ); 118 s->getRange( id(), &min, &max );
119 s->setRubberband( QMAX( min, QMIN(max, pos ))); 119 s->setRubberband( QMAX( min, QMIN(max, pos )));
120 } 120 }
121 _collapsed = false; 121 _collapsed = false;
122} 122}
123 123
124void KDGanttSplitterHandle::mousePressEvent( QMouseEvent *e ) 124void KDGanttSplitterHandle::mousePressEvent( QMouseEvent *e )
125{ 125{
126 if ( e->button() == LeftButton ) { 126 if ( e->button() == LeftButton ) {
127 _activeButton = onButton( e->pos() ); 127 _activeButton = onButton( e->pos() );
128 mouseOffset = s->pick(e->pos()); 128 mouseOffset = s->pick(e->pos());
129 if ( _activeButton != 0) 129 if ( _activeButton != 0)
130 repaint(); 130 repaint();
131 updateCursor( e->pos() ); 131 updateCursor( e->pos() );
132 } 132 }
133} 133}
134 134
135void KDGanttSplitterHandle::updateCursor( const QPoint& p) 135void KDGanttSplitterHandle::updateCursor( const QPoint& p)
136{ 136{
137 if ( onButton( p ) != 0 ) { 137 if ( onButton( p ) != 0 ) {
138 setCursor( arrowCursor ); 138 setCursor( arrowCursor );
139 } 139 }
140 else { 140 else {
141 if ( orient == KDGanttMinimizeSplitter::Horizontal ) 141 if ( orient == KDGanttMinimizeSplitter::Horizontal )
142 setCursor( splitHCursor ); 142 setCursor( splitHCursor );
143 else 143 else
144 setCursor( splitVCursor ); 144 setCursor( splitVCursor );
145 } 145 }
146} 146}
147void KDGanttSplitterHandle::toggle() 147void KDGanttSplitterHandle::toggle()
148{ 148{
149 int pos; 149 int pos;
150 int min, max; 150 int min, max;
151 if ( !_collapsed ) { 151 if ( !_collapsed ) {
152 s->expandPos( id(), &min, &max ); 152 s->expandPos( id(), &min, &max );
153 if ( s->minimizeDirection() == KDGanttMinimizeSplitter::Left 153 if ( s->minimizeDirection() == KDGanttMinimizeSplitter::Left
154 || s->minimizeDirection() == KDGanttMinimizeSplitter::Up ) { 154 || s->minimizeDirection() == KDGanttMinimizeSplitter::Up ) {
155 pos = min; 155 pos = min;
156 } 156 }
157 else { 157 else {
158 pos = max; 158 pos = max;
159 } 159 }
160 160
161 _origPos = s->pick(mapToParent( QPoint( 0,0 ) )); 161 _origPos = s->pick(mapToParent( QPoint( 0,0 ) ));
162 s->moveSplitter( pos, id() ); 162 s->moveSplitter( pos, id() );
163 _collapsed = true; 163 _collapsed = true;
164 } 164 }
165 else { 165 else {
166 s->moveSplitter( _origPos, id() ); 166 s->moveSplitter( _origPos, id() );
167 _collapsed = false; 167 _collapsed = false;
168 } 168 }
169 repaint();
169} 170}
170 171
171void KDGanttSplitterHandle::mouseReleaseEvent( QMouseEvent *e ) 172void KDGanttSplitterHandle::mouseReleaseEvent( QMouseEvent *e )
172{ 173{
173 if ( _activeButton != 0 ) { 174 if ( _activeButton != 0 ) {
174 if ( onButton( e->pos() ) == _activeButton ) 175 if ( onButton( e->pos() ) == _activeButton )
175 { 176 {
176 toggle(); 177 toggle();
177 } 178 }
178 _activeButton = 0; 179 _activeButton = 0;
179 updateCursor( e->pos() ); 180 updateCursor( e->pos() );
180 } 181 }
181 else { 182 else {
182 if ( !opaque() && e->button() == LeftButton ) { 183 if ( !opaque() && e->button() == LeftButton ) {
183 QCOORD pos = s->pick(parentWidget()->mapFromGlobal(e->globalPos())) 184 QCOORD pos = s->pick(parentWidget()->mapFromGlobal(e->globalPos()))
184 - mouseOffset; 185 - mouseOffset;
185 s->setRubberband( -1 ); 186 s->setRubberband( -1 );
186 s->moveSplitter( pos, id() ); 187 s->moveSplitter( pos, id() );
187 } 188 }
188 } 189 }
189 repaint(); 190 repaint();
190} 191}
191 192
192int KDGanttSplitterHandle::onButton( const QPoint& p ) 193int KDGanttSplitterHandle::onButton( const QPoint& p )
193{ 194{
194 QValueList<QPointArray> list = buttonRegions(); 195 QValueList<QPointArray> list = buttonRegions();
195 int index = 1; 196 int index = 1;
196 int add = 12; 197 int add = 12;
197 for( QValueList<QPointArray>::Iterator it = list.begin(); it != list.end(); ++it ) { 198 for( QValueList<QPointArray>::Iterator it = list.begin(); it != list.end(); ++it ) {
198 QRect rect = (*it).boundingRect(); 199 QRect rect = (*it).boundingRect();
199 rect.setLeft( rect.left()- add ); 200 rect.setLeft( rect.left()- add );
200 rect.setRight( rect.right() + add); 201 rect.setRight( rect.right() + add);
201 rect.setTop( rect.top()- add ); 202 rect.setTop( rect.top()- add );
202 rect.setBottom( rect.bottom() + add); 203 rect.setBottom( rect.bottom() + add);
203 if ( rect.contains( p ) ) { 204 if ( rect.contains( p ) ) {
204 return index; 205 return index;
205 } 206 }
206 index++; 207 index++;
207 } 208 }
208 return 0; 209 return 0;
209} 210}
210 211
211 212
212QValueList<QPointArray> KDGanttSplitterHandle::buttonRegions() 213QValueList<QPointArray> KDGanttSplitterHandle::buttonRegions()
213{ 214{
214 QValueList<QPointArray> list; 215 QValueList<QPointArray> list;
215 216
216 int sw = 8; 217 int sw = 8;
217 int yyy = 1; 218 int yyy = 1;
218 int xxx = 1; 219 int xxx = 1;
219 int voffset[] = { (int) -sw*3, (int) sw*3 }; 220 int voffset[] = { (int) -sw*3, (int) sw*3 };
220 for ( int i = 0; i < 2; i++ ) { 221 for ( int i = 0; i < 2; i++ ) {
221 QPointArray arr; 222 QPointArray arr;
222 if ( !_collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Right || 223 if ( !_collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Right ||
223 _collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Left) { 224 _collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Left) {
224 int mid = height()/2 + voffset[i]; 225 int mid = height()/2 + voffset[i];
225 arr.setPoints( 3, 226 arr.setPoints( 3,
226 1-xxx, mid - sw + 4, 227 1-xxx, mid - sw + 4,
227 sw-3-xxx, mid, 228 sw-3-xxx, mid,
228 1-xxx, mid + sw -4); 229 1-xxx, mid + sw -4);
229 } 230 }
230 else if ( !_collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Left || 231 else if ( !_collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Left ||
231 _collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Right ) { 232 _collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Right ) {
232 int mid = height()/2 + voffset[i]; 233 int mid = height()/2 + voffset[i];
233 arr.setPoints( 3, 234 arr.setPoints( 3,
234 sw-4, mid - sw + 4, 235 sw-4, mid - sw + 4,
235 0, mid, 236 0, mid,
236 sw-4, mid + sw - 4); 237 sw-4, mid + sw - 4);
237 } 238 }
238 else if ( !_collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Up || 239 else if ( !_collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Up ||
239 _collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Down) { 240 _collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Down) {
240 int mid = width()/2 + voffset[i]; 241 int mid = width()/2 + voffset[i];
241 arr.setPoints( 3, 242 arr.setPoints( 3,
242 mid - sw + 4, sw-4, 243 mid - sw + 4, sw-4,
243 mid, 0, 244 mid, 0,
244 mid + sw - 4, sw-4 ); 245 mid + sw - 4, sw-4 );
245 } 246 }
246 else if ( !_collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Down || 247 else if ( !_collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Down ||
247 _collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Up ) { 248 _collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Up ) {
248 int mid = width()/2 + voffset[i]; 249 int mid = width()/2 + voffset[i];
249 arr.setPoints( 3, 250 arr.setPoints( 3,
250 mid - sw + 4, 1-yyy, 251 mid - sw + 4, 1-yyy,
251 mid, sw-3-yyy, 252 mid, sw-3-yyy,
252 mid + sw -4, 1-yyy); 253 mid + sw -4, 1-yyy);
253 } 254 }
254 list.append( arr ); 255 list.append( arr );
255 } 256 }
256 return list; 257 return list;
257} 258}
258 259
259void KDGanttSplitterHandle::paintEvent( QPaintEvent * ) 260void KDGanttSplitterHandle::paintEvent( QPaintEvent * )
260{ 261{
261 QPixmap buffer( size() ); 262 QPixmap buffer( size() );
262 QPainter p( &buffer ); 263 QPainter p( &buffer );
263 264
264 //LR 265 //LR
@@ -387,192 +388,201 @@ void kdganttGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int
387 but you can use setOrientation( QSplitter::Vertical ) to set it to 388 but you can use setOrientation( QSplitter::Vertical ) to set it to
388 vertical. 389 vertical.
389 390
390 Use setResizeMode() to specify 391 Use setResizeMode() to specify
391 that a widget should keep its size when the splitter is resized. 392 that a widget should keep its size when the splitter is resized.
392 393
393 Although KDGanttMinimizeSplitter normally resizes the children only 394 Although KDGanttMinimizeSplitter normally resizes the children only
394 at the end of a resize operation, if you call setOpaqueResize( TRUE 395 at the end of a resize operation, if you call setOpaqueResize( TRUE
395 ) the widgets are resized as often as possible. 396 ) the widgets are resized as often as possible.
396 397
397 The initial distribution of size between the widgets is determined 398 The initial distribution of size between the widgets is determined
398 by the initial size of each widget. You can also use setSizes() to 399 by the initial size of each widget. You can also use setSizes() to
399 set the sizes of all the widgets. The function sizes() returns the 400 set the sizes of all the widgets. The function sizes() returns the
400 sizes set by the user. 401 sizes set by the user.
401 402
402 If you hide() a child, its space will be distributed among the other 403 If you hide() a child, its space will be distributed among the other
403 children. It will be reinstated when you show() it again. It is also 404 children. It will be reinstated when you show() it again. It is also
404 possible to reorder the widgets within the splitter using 405 possible to reorder the widgets within the splitter using
405 moveToFirst() and moveToLast(). 406 moveToFirst() and moveToLast().
406*/ 407*/
407 408
408 409
409 410
410static QSize minSize( const QWidget* /*w*/ ) 411static QSize minSize( const QWidget* /*w*/ )
411{ 412{
412 return QSize(0,0); 413 return QSize(0,0);
413} 414}
414 415
415// This is the original version of minSize 416// This is the original version of minSize
416static QSize minSizeHint( const QWidget* w ) 417static QSize minSizeHint( const QWidget* w )
417{ 418{
418 QSize min = w->minimumSize(); 419 QSize min = w->minimumSize();
419 QSize s; 420 QSize s;
420 if ( min.height() <= 0 || min.width() <= 0 ) 421 if ( min.height() <= 0 || min.width() <= 0 )
421 s = w->minimumSizeHint(); 422 s = w->minimumSizeHint();
422 if ( min.height() > 0 ) 423 if ( min.height() > 0 )
423 s.setHeight( min.height() ); 424 s.setHeight( min.height() );
424 if ( min.width() > 0 ) 425 if ( min.width() > 0 )
425 s.setWidth( min.width() ); 426 s.setWidth( min.width() );
426 return s.expandedTo(QSize(0,0)); 427 return s.expandedTo(QSize(0,0));
427} 428}
428 429
429 430
430 431
431/*! 432/*!
432 Constructs a horizontal splitter with the \a parent and \a 433 Constructs a horizontal splitter with the \a parent and \a
433 name arguments being passed on to the QFrame constructor. 434 name arguments being passed on to the QFrame constructor.
434*/ 435*/
435KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( QWidget *parent, const char *name ) 436KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( QWidget *parent, const char *name )
436 :QFrame(parent,name,WPaintUnclipped) 437 :QFrame(parent,name,WPaintUnclipped)
437{ 438{
438 mFirstHandle = 0; 439 mFirstHandle = 0;
439#if QT_VERSION >= 232 440#if QT_VERSION >= 232
440 orient = Horizontal; 441 orient = Horizontal;
441 init(); 442 init();
442#endif 443#endif
443} 444}
444 445
445/*! 446/*!
446 Constructs a splitter with orientation \a o with the \a parent 447 Constructs a splitter with orientation \a o with the \a parent
447 and \a name arguments being passed on to the QFrame constructor. 448 and \a name arguments being passed on to the QFrame constructor.
448*/ 449*/
449KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( Orientation o, QWidget *parent, const char *name ) 450KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( Orientation o, QWidget *parent, const char *name )
450 :QFrame(parent,name,WPaintUnclipped) 451 :QFrame(parent,name,WPaintUnclipped)
451{ 452{
452 mFirstHandle = 0; 453 mFirstHandle = 0;
453#if QT_VERSION >= 232 454#if QT_VERSION >= 232
454 orient = o; 455 orient = o;
455 init(); 456 init();
456#endif 457#endif
457} 458}
458 459
459/*! 460/*!
460 Destroys the splitter and any children. 461 Destroys the splitter and any children.
461*/ 462*/
462KDGanttMinimizeSplitter::~KDGanttMinimizeSplitter() 463KDGanttMinimizeSplitter::~KDGanttMinimizeSplitter()
463{ 464{
464#if QT_VERSION >= 232 465#if QT_VERSION >= 232
465 data->list.setAutoDelete( TRUE ); 466 data->list.setAutoDelete( TRUE );
466 delete data; 467 delete data;
467#endif 468#endif
468} 469}
469 470
470 471
471#if QT_VERSION >= 232 472#if QT_VERSION >= 232
472void KDGanttMinimizeSplitter::init() 473void KDGanttMinimizeSplitter::init()
473{ 474{
474 data = new QSplitterData; 475 data = new QSplitterData;
475 if ( orient == Horizontal ) 476 if ( orient == Horizontal )
476 setSizePolicy( QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Minimum) ); 477 setSizePolicy( QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Minimum) );
477 else 478 else
478 setSizePolicy( QSizePolicy(QSizePolicy::Minimum,QSizePolicy::Expanding) ); 479 setSizePolicy( QSizePolicy(QSizePolicy::Minimum,QSizePolicy::Expanding) );
479} 480}
480#endif 481#endif
481 482
482 483
484void KDGanttMinimizeSplitter::toggle()
485{
486 if ( mFirstHandle )
487 mFirstHandle->toggle();
488 else
489 qDebug("KDGanttMinimizeSplitter::toggle::sorry, handle not available ");
490
491}
492
483 493
484/*! 494/*!
485 \brief the orientation of the splitter 495 \brief the orientation of the splitter
486 496
487 By default the orientation is horizontal (the widgets are side by side). 497 By default the orientation is horizontal (the widgets are side by side).
488 The possible orientations are Qt:Vertical and Qt::Horizontal (the default). 498 The possible orientations are Qt:Vertical and Qt::Horizontal (the default).
489*/ 499*/
490void KDGanttMinimizeSplitter::setOrientation( Orientation o ) 500void KDGanttMinimizeSplitter::setOrientation( Orientation o )
491{ 501{
492#if QT_VERSION >= 232 502#if QT_VERSION >= 232
493 if ( orient == o ) 503 if ( orient == o )
494 return; 504 return;
495 orient = o; 505 orient = o;
496 506
497 if ( orient == Horizontal ) 507 if ( orient == Horizontal )
498 setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) ); 508 setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) );
499 else 509 else
500 setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Expanding ) ); 510 setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Expanding ) );
501 511
502 QSplitterLayoutStruct *s = data->list.first(); 512 QSplitterLayoutStruct *s = data->list.first();
503 while ( s ) { 513 while ( s ) {
504 if ( s->isSplitter ) 514 if ( s->isSplitter )
505 ((KDGanttSplitterHandle*)s->wid)->setOrientation( o ); 515 ((KDGanttSplitterHandle*)s->wid)->setOrientation( o );
506 s = data->list.next(); // ### next at end of loop, no iterator 516 s = data->list.next(); // ### next at end of loop, no iterator
507 } 517 }
508 recalc( isVisible() ); 518 recalc( isVisible() );
509#endif 519#endif
510} 520}
511 521
512 522
513#if QT_VERSION >= 232 523#if QT_VERSION >= 232
514/*! 524/*!
515 \reimp 525 \reimp
516*/ 526*/
517void KDGanttMinimizeSplitter::resizeEvent( QResizeEvent * ) 527void KDGanttMinimizeSplitter::resizeEvent( QResizeEvent * )
518{ 528{
519 doResize(); 529 doResize();
520} 530}
521 531
522 532
523/* 533/*
524 Inserts the widget \a w at the end (or at the beginning if \a first 534 Inserts the widget \a w at the end (or at the beginning if \a first
525 is TRUE) of the splitter's list of widgets. 535 is TRUE) of the splitter's list of widgets.
526 536
527 It is the responsibility of the caller of this function to make sure 537 It is the responsibility of the caller of this function to make sure
528 that \a w is not already in the splitter and to call recalcId if 538 that \a w is not already in the splitter and to call recalcId if
529 needed. (If \a first is TRUE, then recalcId is very probably 539 needed. (If \a first is TRUE, then recalcId is very probably
530 needed.) 540 needed.)
531*/ 541*/
532QSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( QWidget *w, bool first ) 542QSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( QWidget *w, bool first )
533{ 543{
534 QSplitterLayoutStruct *s; 544 QSplitterLayoutStruct *s;
535 KDGanttSplitterHandle *newHandle = 0; 545 KDGanttSplitterHandle *newHandle = 0;
536 if ( data->list.count() > 0 ) { 546 if ( data->list.count() > 0 ) {
537 s = new QSplitterLayoutStruct; 547 s = new QSplitterLayoutStruct;
538 s->mode = KeepSize; 548 s->mode = KeepSize;
539 QString tmp = "qt_splithandle_"; 549 QString tmp = "qt_splithandle_";
540 tmp += w->name(); 550 tmp += w->name();
541 newHandle = new KDGanttSplitterHandle( orientation(), this, tmp.latin1() ); 551 newHandle = new KDGanttSplitterHandle( orientation(), this, tmp.latin1() );
542 if ( ! mFirstHandle ) 552 if ( ! mFirstHandle )
543 mFirstHandle = newHandle; 553 mFirstHandle = newHandle;
544 s->wid = newHandle; 554 s->wid = newHandle;
545 newHandle->setId(data->list.count()); 555 newHandle->setId(data->list.count());
546 s->isSplitter = TRUE; 556 s->isSplitter = TRUE;
547 s->sizer = pick( newHandle->sizeHint() ); 557 s->sizer = pick( newHandle->sizeHint() );
548 if ( first ) 558 if ( first )
549 data->list.insert( 0, s ); 559 data->list.insert( 0, s );
550 else 560 else
551 data->list.append( s ); 561 data->list.append( s );
552 } 562 }
553 s = new QSplitterLayoutStruct; 563 s = new QSplitterLayoutStruct;
554 s->mode = Stretch; 564 s->mode = Stretch;
555 s->wid = w; 565 s->wid = w;
556 if ( !testWState( WState_Resized ) && w->sizeHint().isValid() ) 566 if ( !testWState( WState_Resized ) && w->sizeHint().isValid() )
557 s->sizer = pick( w->sizeHint() ); 567 s->sizer = pick( w->sizeHint() );
558 else 568 else
559 s->sizer = pick( w->size() ); 569 s->sizer = pick( w->size() );
560 s->isSplitter = FALSE; 570 s->isSplitter = FALSE;
561 if ( first ) 571 if ( first )
562 data->list.insert( 0, s ); 572 data->list.insert( 0, s );
563 else 573 else
564 data->list.append( s ); 574 data->list.append( s );
565 if ( newHandle && isVisible() ) 575 if ( newHandle && isVisible() )
566 newHandle->show(); //will trigger sending of post events 576 newHandle->show(); //will trigger sending of post events
567 return s; 577 return s;
568} 578}
569 579
570 580
571/*! 581/*!
572 Tells the splitter that a child widget has been inserted or removed. 582 Tells the splitter that a child widget has been inserted or removed.
573 The event is passed in \a c. 583 The event is passed in \a c.
574*/ 584*/
575void KDGanttMinimizeSplitter::childEvent( QChildEvent *c ) 585void KDGanttMinimizeSplitter::childEvent( QChildEvent *c )
576{ 586{
577 if ( c->type() == QEvent::ChildInserted ) { 587 if ( c->type() == QEvent::ChildInserted ) {
578 if ( !c->child()->isWidgetType() ) 588 if ( !c->child()->isWidgetType() )
diff --git a/microkde/KDGanttMinimizeSplitter.h b/microkde/KDGanttMinimizeSplitter.h
index 75e0443..8120d14 100644
--- a/microkde/KDGanttMinimizeSplitter.h
+++ b/microkde/KDGanttMinimizeSplitter.h
@@ -1,178 +1,180 @@
1/* -*- Mode: C++ -*- 1/* -*- Mode: C++ -*-
2 $Id$ 2 $Id$
3*/ 3*/
4 4
5/**************************************************************************** 5/****************************************************************************
6 ** Copyright (C) 2001-2004 Klarälvdalens Datakonsult AB. All rights reserved. 6 ** Copyright (C) 2001-2004 Klarälvdalens Datakonsult AB. All rights reserved.
7 ** 7 **
8 ** This file is part of the KDGantt library. 8 ** This file is part of the KDGantt library.
9 ** 9 **
10 ** This file may be distributed and/or modified under the terms of the 10 ** This file may be distributed and/or modified under the terms of the
11 ** GNU General Public License version 2 as published by the Free Software 11 ** GNU General Public License version 2 as published by the Free Software
12 ** Foundation and appearing in the file LICENSE.GPL included in the 12 ** Foundation and appearing in the file LICENSE.GPL included in the
13 ** packaging of this file. 13 ** packaging of this file.
14 ** 14 **
15 ** Licensees holding valid commercial KDGantt licenses may use this file in 15 ** Licensees holding valid commercial KDGantt licenses may use this file in
16 ** accordance with the KDGantt Commercial License Agreement provided with 16 ** accordance with the KDGantt Commercial License Agreement provided with
17 ** the Software. 17 ** the Software.
18 ** 18 **
19 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 19 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21 ** 21 **
22 ** See http://www.klaralvdalens-datakonsult.se/Public/products/ for 22 ** See http://www.klaralvdalens-datakonsult.se/Public/products/ for
23 ** information about KDGantt Commercial License Agreements. 23 ** information about KDGantt Commercial License Agreements.
24 ** 24 **
25 ** Contact info@klaralvdalens-datakonsult.se if any conditions of this 25 ** Contact info@klaralvdalens-datakonsult.se if any conditions of this
26 ** licensing are not clear to you. 26 ** licensing are not clear to you.
27 ** 27 **
28 ** As a special exception, permission is given to link this program 28 ** As a special exception, permission is given to link this program
29 ** with any edition of Qt, and distribute the resulting executable, 29 ** with any edition of Qt, and distribute the resulting executable,
30 ** without including the source code for Qt in the source distribution. 30 ** without including the source code for Qt in the source distribution.
31 ** 31 **
32 **********************************************************************/ 32 **********************************************************************/
33 33
34#ifndef KDGANTTMINIMIZESPLITTER_H 34#ifndef KDGANTTMINIMIZESPLITTER_H
35#define KDGANTTMINIMIZESPLITTER_H 35#define KDGANTTMINIMIZESPLITTER_H
36 36
37#ifndef QT_H 37#ifndef QT_H
38#include "qframe.h" 38#include "qframe.h"
39#include "qvaluelist.h" 39#include "qvaluelist.h"
40#endif // QT_H 40#endif // QT_H
41 41
42#ifndef QT_NO_SPLITTER___ 42#ifndef QT_NO_SPLITTER___
43class QSplitterData; 43class QSplitterData;
44class QSplitterLayoutStruct; 44class QSplitterLayoutStruct;
45class KDGanttSplitterHandle; 45class KDGanttSplitterHandle;
46class KDGanttMinimizeSplitter : public QFrame 46class KDGanttMinimizeSplitter : public QFrame
47{ 47{
48 Q_OBJECT 48 Q_OBJECT
49 // Q_ENUMS( Direction ) 49 // Q_ENUMS( Direction )
50 // Q_PROPERTY( Orientation orientation READ orientation WRITE setOrientation ) 50 // Q_PROPERTY( Orientation orientation READ orientation WRITE setOrientation )
51 // Q_PROPERTY( Direction minimizeDirection READ minimizeDirection WRITE setMinimizeDirection ) 51 // Q_PROPERTY( Direction minimizeDirection READ minimizeDirection WRITE setMinimizeDirection )
52 52
53public: 53public:
54 enum ResizeMode { Stretch, KeepSize, FollowSizeHint }; 54 enum ResizeMode { Stretch, KeepSize, FollowSizeHint };
55 enum Direction { Left, Right, Up, Down }; 55 enum Direction { Left, Right, Up, Down };
56 56
57 KDGanttMinimizeSplitter( QWidget* parent=0, const char* name=0 ); 57 KDGanttMinimizeSplitter( QWidget* parent=0, const char* name=0 );
58 KDGanttMinimizeSplitter( Orientation, QWidget* parent=0, const char* name=0 ); 58 KDGanttMinimizeSplitter( Orientation, QWidget* parent=0, const char* name=0 );
59 ~KDGanttMinimizeSplitter(); 59 ~KDGanttMinimizeSplitter();
60 60
61 virtual void setOrientation( Orientation ); 61 virtual void setOrientation( Orientation );
62 Orientation orientation() const { return orient; } 62 Orientation orientation() const { return orient; }
63 63
64 void setMinimizeDirection( Direction ); 64 void setMinimizeDirection( Direction );
65 Direction minimizeDirection() const; 65 Direction minimizeDirection() const;
66 66
67#if QT_VERSION >= 232 67#if QT_VERSION >= 232
68 virtual void setResizeMode( QWidget *w, ResizeMode ); 68 virtual void setResizeMode( QWidget *w, ResizeMode );
69 virtual void setOpaqueResize( bool = TRUE ); 69 virtual void setOpaqueResize( bool = TRUE );
70 bool opaqueResize() const; 70 bool opaqueResize() const;
71 71
72 void moveToFirst( QWidget * ); 72 void moveToFirst( QWidget * );
73 void moveToLast( QWidget * ); 73 void moveToLast( QWidget * );
74 74
75 void refresh() { recalc( TRUE ); } 75 void refresh() { recalc( TRUE ); }
76 QSize sizeHint() const; 76 QSize sizeHint() const;
77 QSize minimumSizeHint() const; 77 QSize minimumSizeHint() const;
78 78
79 QValueList<int> sizes() const; 79 QValueList<int> sizes() const;
80 void setSizes( QValueList<int> ); 80 void setSizes( QValueList<int> );
81 KDGanttSplitterHandle* firstHandle(){ return mFirstHandle;} 81 KDGanttSplitterHandle* firstHandle(){ return mFirstHandle;}
82 void expandPos( int id, int* min, int* max ); 82 void expandPos( int id, int* min, int* max );
83public slots:
84 void toggle();
83protected: 85protected:
84 void childEvent( QChildEvent * ); 86 void childEvent( QChildEvent * );
85 87
86 bool event( QEvent * ); 88 bool event( QEvent * );
87 void resizeEvent( QResizeEvent * ); 89 void resizeEvent( QResizeEvent * );
88 90
89 int idAfter( QWidget* ) const; 91 int idAfter( QWidget* ) const;
90 92
91 void moveSplitter( QCOORD pos, int id ); 93 void moveSplitter( QCOORD pos, int id );
92 virtual void drawSplitter( QPainter*, QCOORD x, QCOORD y, 94 virtual void drawSplitter( QPainter*, QCOORD x, QCOORD y,
93 QCOORD w, QCOORD h ); 95 QCOORD w, QCOORD h );
94 void styleChange( QStyle& ); 96 void styleChange( QStyle& );
95 int adjustPos( int , int ); 97 int adjustPos( int , int );
96 virtual void setRubberband( int ); 98 virtual void setRubberband( int );
97 void getRange( int id, int*, int* ); 99 void getRange( int id, int*, int* );
98 100
99private: 101private:
100 void init(); 102 void init();
101 void recalc( bool update = FALSE ); 103 void recalc( bool update = FALSE );
102 void doResize(); 104 void doResize();
103 void storeSizes(); 105 void storeSizes();
104 void processChildEvents(); 106 void processChildEvents();
105 QSplitterLayoutStruct *addWidget( QWidget*, bool first = FALSE ); 107 QSplitterLayoutStruct *addWidget( QWidget*, bool first = FALSE );
106 void recalcId(); 108 void recalcId();
107 void moveBefore( int pos, int id, bool upLeft ); 109 void moveBefore( int pos, int id, bool upLeft );
108 void moveAfter( int pos, int id, bool upLeft ); 110 void moveAfter( int pos, int id, bool upLeft );
109 void setG( QWidget *w, int p, int s, bool isSplitter = FALSE ); 111 void setG( QWidget *w, int p, int s, bool isSplitter = FALSE );
110 112
111 QCOORD pick( const QPoint &p ) const 113 QCOORD pick( const QPoint &p ) const
112 { return orient == Horizontal ? p.x() : p.y(); } 114 { return orient == Horizontal ? p.x() : p.y(); }
113 QCOORD pick( const QSize &s ) const 115 QCOORD pick( const QSize &s ) const
114 { return orient == Horizontal ? s.width() : s.height(); } 116 { return orient == Horizontal ? s.width() : s.height(); }
115 117
116 QCOORD trans( const QPoint &p ) const 118 QCOORD trans( const QPoint &p ) const
117 { return orient == Vertical ? p.x() : p.y(); } 119 { return orient == Vertical ? p.x() : p.y(); }
118 QCOORD trans( const QSize &s ) const 120 QCOORD trans( const QSize &s ) const
119 { return orient == Vertical ? s.width() : s.height(); } 121 { return orient == Vertical ? s.width() : s.height(); }
120 KDGanttSplitterHandle* mFirstHandle; 122 KDGanttSplitterHandle* mFirstHandle;
121 QSplitterData *data; 123 QSplitterData *data;
122#endif 124#endif
123 125
124private: 126private:
125 Orientation orient; 127 Orientation orient;
126 Direction _direction; 128 Direction _direction;
127#ifndef DOXYGEN_SKIP_INTERNAL 129#ifndef DOXYGEN_SKIP_INTERNAL
128 friend class KDGanttSplitterHandle; 130 friend class KDGanttSplitterHandle;
129#endif 131#endif
130 private:// Disabled copy constructor and operator= 132 private:// Disabled copy constructor and operator=
131#if defined(Q_DISABLE_COPY) 133#if defined(Q_DISABLE_COPY)
132 KDGanttMinimizeSplitter( const KDGanttMinimizeSplitter & ); 134 KDGanttMinimizeSplitter( const KDGanttMinimizeSplitter & );
133 KDGanttMinimizeSplitter& operator=( const KDGanttMinimizeSplitter & ); 135 KDGanttMinimizeSplitter& operator=( const KDGanttMinimizeSplitter & );
134#endif 136#endif
135}; 137};
136 138
137#ifndef DOXYGEN_SKIP_INTERNAL 139#ifndef DOXYGEN_SKIP_INTERNAL
138// This class was continued from a verbatim copy of the 140// This class was continued from a verbatim copy of the
139// QSplitterHandle pertaining to the Qt Enterprise License and the 141// QSplitterHandle pertaining to the Qt Enterprise License and the
140// GPL. It has only been renamed to KDGanttSplitterHandler in order to 142// GPL. It has only been renamed to KDGanttSplitterHandler in order to
141// avoid a symbol clash on some platforms. 143// avoid a symbol clash on some platforms.
142class KDGanttSplitterHandle : public QWidget 144class KDGanttSplitterHandle : public QWidget
143{ 145{
144 Q_OBJECT 146 Q_OBJECT
145#if QT_VERSION >= 232 147#if QT_VERSION >= 232
146public: 148public:
147 KDGanttSplitterHandle( Qt::Orientation o, 149 KDGanttSplitterHandle( Qt::Orientation o,
148 KDGanttMinimizeSplitter *parent, const char* name=0 ); 150 KDGanttMinimizeSplitter *parent, const char* name=0 );
149 void setOrientation( Qt::Orientation o ); 151 void setOrientation( Qt::Orientation o );
150 Qt::Orientation orientation() const { return orient; } 152 Qt::Orientation orientation() const { return orient; }
151 153
152 bool opaque() const { return s->opaqueResize(); } 154 bool opaque() const { return s->opaqueResize(); }
153 155
154 QSize sizeHint() const; 156 QSize sizeHint() const;
155 void toggle(); 157 void toggle();
156 158
157 int id() const { return myId; } // data->list.at(id())->wid == this 159 int id() const { return myId; } // data->list.at(id())->wid == this
158 void setId( int i ) { myId = i; } 160 void setId( int i ) { myId = i; }
159 161
160protected: 162protected:
161 QValueList<QPointArray> buttonRegions(); 163 QValueList<QPointArray> buttonRegions();
162 void paintEvent( QPaintEvent * ); 164 void paintEvent( QPaintEvent * );
163 void mouseMoveEvent( QMouseEvent * ); 165 void mouseMoveEvent( QMouseEvent * );
164 void mousePressEvent( QMouseEvent * ); 166 void mousePressEvent( QMouseEvent * );
165 void mouseReleaseEvent( QMouseEvent * ); 167 void mouseReleaseEvent( QMouseEvent * );
166 int onButton( const QPoint& p ); 168 int onButton( const QPoint& p );
167 void updateCursor( const QPoint& p ); 169 void updateCursor( const QPoint& p );
168 170
169private: 171private:
170 QSize mSizeHint; 172 QSize mSizeHint;
171 bool mUseOffset; 173 bool mUseOffset;
172 Qt::Orientation orient; 174 Qt::Orientation orient;
173 bool opaq; 175 bool opaq;
174 int myId; 176 int myId;
175 177
176 KDGanttMinimizeSplitter *s; 178 KDGanttMinimizeSplitter *s;
177 int _activeButton; 179 int _activeButton;
178 bool _collapsed; 180 bool _collapsed;