summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-08-08 11:01:52 (UTC)
committer zautrix <zautrix>2004-08-08 11:01:52 (UTC)
commit7c4e0075810cf95ab2b1ecda2d971264e9a9b60c (patch) (unidiff)
tree2900efa863dd70b7131b3c07ef7f522ac7da845f
parent71eba6589af91448b84bfd409439115972203e9e (diff)
downloadkdepimpi-7c4e0075810cf95ab2b1ecda2d971264e9a9b60c.zip
kdepimpi-7c4e0075810cf95ab2b1ecda2d971264e9a9b60c.tar.gz
kdepimpi-7c4e0075810cf95ab2b1ecda2d971264e9a9b60c.tar.bz2
Made it compileable on desktop
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--Makefile424
-rw-r--r--gammu/emb/common/common.pro6
-rw-r--r--gammu/emb/common/commonE.pro179
-rw-r--r--kabc/kabc.pro4
-rw-r--r--kaddressbook/kabcore.cpp4
-rw-r--r--kaddressbook/kaddressbook.pro3
-rw-r--r--kopi-desktop.pro2
-rw-r--r--korganizer/koprefs.cpp1
-rw-r--r--korganizer/korganizer.pro4
-rw-r--r--libkcal/libkcal.pro4
-rw-r--r--microkde/microkde.pro10
11 files changed, 366 insertions, 275 deletions
diff --git a/Makefile b/Makefile
index 38fd000..cfaec5a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,267 +1,159 @@
1DISTPATH = $(shell pwd) 1#############################################################################
2DISTDIR = $(shell basename $(DISTPATH)) 2# Makefile for building: kopi-desktop
3# Generated by qmake (1.07a) (Qt 3.3.2) on: Sun Aug 8 12:23:00 2004
4# Project: kopi-desktop.pro
5# Template: subdirs
6# Command: $(QMAKE) "CONFIG+=thread" "CONFIG+=debug" -o Makefile kopi-desktop.pro
7#############################################################################
8
9 MAKEFILE =Makefile
10 QMAKE =qmake
11DEL_FILE = rm -f
12CHK_DIR_EXISTS= test -d
13MKDIR = mkdir -p
14INSTALL_FILE=
15INSTALL_DIR =
16 SUBTARGETS = \
17 sub-gammu-emb-common \
18 sub-libical \
19 sub-libkcal \
20 sub-microkde \
21 sub-libkdepim \
22 sub-kabc \
23 sub-korganizer \
24 sub-kaddressbook \
25 sub-kabc-plugins-file \
26 sub-kabc-plugins-dir
27
28first: all
29
30all: Makefile $(SUBTARGETS)
31
32gammu/emb/common/$(MAKEFILE):
33 @$(CHK_DIR_EXISTS) "gammu/emb/common" || $(MKDIR) "gammu/emb/common"
34 cd gammu/emb/common && $(QMAKE) common.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE)
35sub-gammu-emb-common: gammu/emb/common/$(MAKEFILE) FORCE
36 cd gammu/emb/common && $(MAKE) -f $(MAKEFILE)
37
38libical/$(MAKEFILE):
39 @$(CHK_DIR_EXISTS) "libical" || $(MKDIR) "libical"
40 cd libical && $(QMAKE) libical.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE)
41sub-libical: libical/$(MAKEFILE) FORCE
42 cd libical && $(MAKE) -f $(MAKEFILE)
43
44libkcal/$(MAKEFILE):
45 @$(CHK_DIR_EXISTS) "libkcal" || $(MKDIR) "libkcal"
46 cd libkcal && $(QMAKE) libkcal.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE)
47sub-libkcal: libkcal/$(MAKEFILE) FORCE
48 cd libkcal && $(MAKE) -f $(MAKEFILE)
49
50microkde/$(MAKEFILE):
51 @$(CHK_DIR_EXISTS) "microkde" || $(MKDIR) "microkde"
52 cd microkde && $(QMAKE) microkde.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE)
53sub-microkde: microkde/$(MAKEFILE) FORCE
54 cd microkde && $(MAKE) -f $(MAKEFILE)
55
56libkdepim/$(MAKEFILE):
57 @$(CHK_DIR_EXISTS) "libkdepim" || $(MKDIR) "libkdepim"
58 cd libkdepim && $(QMAKE) libkdepim.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE)
59sub-libkdepim: libkdepim/$(MAKEFILE) FORCE
60 cd libkdepim && $(MAKE) -f $(MAKEFILE)
61
62kabc/$(MAKEFILE):
63 @$(CHK_DIR_EXISTS) "kabc" || $(MKDIR) "kabc"
64 cd kabc && $(QMAKE) kabc.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE)
65sub-kabc: kabc/$(MAKEFILE) FORCE
66 cd kabc && $(MAKE) -f $(MAKEFILE)
67
68korganizer/$(MAKEFILE):
69 @$(CHK_DIR_EXISTS) "korganizer" || $(MKDIR) "korganizer"
70 cd korganizer && $(QMAKE) korganizer.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE)
71sub-korganizer: korganizer/$(MAKEFILE) FORCE
72 cd korganizer && $(MAKE) -f $(MAKEFILE)
73
74kaddressbook/$(MAKEFILE):
75 @$(CHK_DIR_EXISTS) "kaddressbook" || $(MKDIR) "kaddressbook"
76 cd kaddressbook && $(QMAKE) kaddressbook.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE)
77sub-kaddressbook: kaddressbook/$(MAKEFILE) FORCE
78 cd kaddressbook && $(MAKE) -f $(MAKEFILE)
79
80kabc/plugins/file/$(MAKEFILE):
81 @$(CHK_DIR_EXISTS) "kabc/plugins/file" || $(MKDIR) "kabc/plugins/file"
82 cd kabc/plugins/file && $(QMAKE) file.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE)
83sub-kabc-plugins-file: kabc/plugins/file/$(MAKEFILE) FORCE
84 cd kabc/plugins/file && $(MAKE) -f $(MAKEFILE)
85
86kabc/plugins/dir/$(MAKEFILE):
87 @$(CHK_DIR_EXISTS) "kabc/plugins/dir" || $(MKDIR) "kabc/plugins/dir"
88 cd kabc/plugins/dir && $(QMAKE) dir.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE)
89sub-kabc-plugins-dir: kabc/plugins/dir/$(MAKEFILE) FORCE
90 cd kabc/plugins/dir && $(MAKE) -f $(MAKEFILE)
91
92Makefile: kopi-desktop.pro /usr/local/qtgcc/mkspecs/default/qmake.conf
93 $(QMAKE) "CONFIG+=thread" "CONFIG+=debug" -o Makefile kopi-desktop.pro
94qmake: qmake_all
95 @$(QMAKE) "CONFIG+=thread" "CONFIG+=debug" -o Makefile kopi-desktop.pro
96
97all: $(SUBTARGETS)
98qmake_all: gammu/emb/common/$(MAKEFILE) libical/$(MAKEFILE) libkcal/$(MAKEFILE) microkde/$(MAKEFILE) libkdepim/$(MAKEFILE) kabc/$(MAKEFILE) korganizer/$(MAKEFILE) kaddressbook/$(MAKEFILE) kabc/plugins/file/$(MAKEFILE) kabc/plugins/dir/$(MAKEFILE)
99 ( [ -d gammu/emb/common ] && cd gammu/emb/common ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
100 ( [ -d libical ] && cd libical ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
101 ( [ -d libkcal ] && cd libkcal ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
102 ( [ -d microkde ] && cd microkde ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
103 ( [ -d libkdepim ] && cd libkdepim ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
104 ( [ -d kabc ] && cd kabc ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
105 ( [ -d korganizer ] && cd korganizer ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
106 ( [ -d kaddressbook ] && cd kaddressbook ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
107 ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
108 ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
109clean uicables mocables uiclean mocclean lexclean yaccclean : qmake_all FORCE
110 ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) $@; ) || true
111 ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) $@; ) || true
112 ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) $@; ) || true
113 ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) $@; ) || true
114 ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) $@; ) || true
115 ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) $@; ) || true
116 ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) $@; ) || true
117 ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) $@; ) || true
118 ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) $@; ) || true
119 ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) $@; ) || true
120uninstall_subdirs: qmake_all FORCE
121 ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
122 ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
123 ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
124 ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
125 ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
126 ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
127 ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
128 ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
129 ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
130 ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
131install_subdirs: qmake_all FORCE
132 ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) install; ) || true
133 ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) install; ) || true
134 ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) install; ) || true
135 ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) install; ) || true
136 ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) install; ) || true
137 ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) install; ) || true
138 ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) install; ) || true
139 ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) install; ) || true
140 ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) install; ) || true
141 ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) install; ) || true
142distclean: qmake_all FORCE
143 ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
144 ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
145 ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
146 ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
147 ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
148 ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
149 ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
150 ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
151 ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
152 ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
153
154install: install_subdirs
155
156uninstall: uninstall_subdirs
157
158FORCE:
3 159
4
5ifeq ($(PLATFORM) , zaurus)
6 BUILD_NO_LDAP_PLUGIN=1
7endif
8
9ifneq ($(PLATFORM) , zaurus)
10 BUILD_NO_SHARP_PLUGIN=1
11endif
12
13SUBDIRS_MICROKDE = \
14 libical/src/libical \
15 libical/src/libicalss \
16 qtcompat \
17 microkde \
18 libkcal \
19 libkdepim \
20 kabc \
21 kabc/formats/binary \
22 kabc/plugins/file \
23 kabc/plugins/dir \
24 korganizer \
25 kalarmd \
26 kaddressbook
27
28SUBDIRS_QTOPIA_PLUGIN = \
29 kabc/plugins/qtopia
30
31SUBDIRS_OPIE_PLUGIN = \
32 kabc/plugins/opie
33
34SUBDIRS_SHARP_PLUGIN = \
35 kabc/plugins/sharpdtm
36
37SUBDIRS_LDAP_PLUGIN = \
38 kabc/plugins/ldap
39
40SUBDIRS_MICROMAIL = \
41 kmicromail/libetpan \
42 kmicromail/libmailwrapper \
43 kmicromail
44
45SUBDIRS = \
46 $(SUBDIRS_MICROKDE) \
47 $(SUBDIRS_QTOPIA_PLUGIN) \
48 $(SUBDIRS_OPIE_PLUGIN) \
49 $(SUBDIRS_SHARP_PLUGIN) \
50 $(SUBDIRS_LDAP_PLUGIN) \
51 $(SUBDIRS_MICROMAIL)
52
53
54all: build_microkde \
55 build_qtopia_plugin \
56 build_opie_plugin \
57 build_sharp_plugin \
58 build_ldap_plugin \
59 build_micromail
60
61
62build_microkde: variable_test tmake
63 for i in $(SUBDIRS_MICROKDE); do pushd $$i; \
64 make -f Makefile$(PLATFORM) || exit 1; popd; \
65 done
66
67build_qtopia_plugin: build_microkde
68 for i in $(SUBDIRS_QTOPIA_PLUGIN); do pushd $$i; \
69 make -f Makefile$(PLATFORM) || exit 1; popd; \
70 done
71
72build_opie_plugin: build_microkde
73 ifdef BUILD_NO_OPIE_PLUGIN
74 @echo ---> opie plugin not build.
75 else
76 for i in $(SUBDIRS_OPIE_PLUGIN); do pushd $$i; \
77 make -f Makefile$(PLATFORM) || exit 1; popd; \
78 done
79 endif
80
81build_sharp_plugin: build_microkde
82 ifdef BUILD_NO_SHARP_PLUGIN
83 @echo ---> ldap plugin not build.
84 else
85 for i in $(SUBDIRS_SHARP_PLUGIN); do pushd $$i; \
86 make -f Makefile$(PLATFORM) || exit 1; popd; \
87 done
88 endif
89
90build_ldap_plugin: build_microkde
91 ifdef BUILD_NO_LDAP_PLUGIN
92 @echo ---> ldap plugin not build.
93 else
94 for i in $(SUBDIRS_LDAP_PLUGIN); do pushd $$i; \
95 make -f Makefile$(PLATFORM) || exit 1; popd; \
96 done
97 endif
98
99
100build_micromail: build_microkde
101 ifdef BUILD_NO_MICROMAIL
102 @echo ---> micromail not build.
103 else
104 for i in $(SUBDIRS_MICROMAIL); do pushd $$i; \
105 make -f Makefile$(PLATFORM) || exit 1; popd; \
106 done
107 endif
108
109
110variable_info:
111 @echo --------------------------------------
112 @echo KDEPIM buildsystem, variableinfo...
113 @echo QTDIR=$(QTDIR)
114 @echo QPEDIR=$(QPEDIR)
115 @echo OPIEDIR=$(OPIEDIR)
116 @echo PLATFORM=$(PLATFORM)
117 @echo RELEASE_DEBUG=$(RELEASE_DEBUG)
118 @echo BUILD_NO_MICROMAIL=$(BUILD_NO_MICROMAIL)
119 @echo BUILD_NO_LDAP_PLUGIN=$(BUILD_NO_LDAP_PLUGIN)
120 @echo BUILD_NO_OPIE_PLUGIN=$(BUILD_NO_OPIE_PLUGIN)
121 @echo BUILD_NO_SHARP_PLUGIN=$(BUILD_NO_SHARP_PLUGIN)
122 ifndef BUILD_NO_SHARP_PLUGIN
123 @echo SHARPDTMSDK=$(SHARPDTMSDK)
124 endif
125 @echo --------------------------------------
126
127variable_test: variable_info
128 @echo KDEPIM buildsystem, variablecheck...
129 ifndef PLATFORM
130 @echo PLATFORM is not defined.
131 $(error PLATFORM is not defined)
132 endif
133 ifdef BUILD_NO_LDAP_PLUGIN
134 @echo LDAP PLUGIN will not be build, because BUILD_NO_LDAP_PLUGIN is set to $(BUILD_NO_LDAP_PLUGIN)
135 endif
136 ifdef BUILD_NO_OPIE_PLUGIN
137 @echo OPIE PLUGIN will not be build, because BUILD_NO_OPIE_PLUGIN is set to $(BUILD_NO_OPIE_PLUGIN)
138 endif
139 ifdef BUILD_NO_MICROMAIL
140 @echo MICROMAIL will not be build, because BUILD_NO_MICROMAIL is set to $(BUILD_NO_MICROMAIL)
141 endif
142 ifdef BUILD_NO_SHARP_PLUGIN
143 @echo SHARP PLUGIN will not be build, because BUILD_NO_SHARP_PLUGIN is set to $(BUILD_NO_SHARP_PLUGIN)
144 else
145 ifndef SHARPDTMSDK
146 @echo SHARP PLUGIN can not be build, because SHARPDTMSDK is set to $(SHARPDTMSDK)
147 $(error SHARPDTMSDK is not defined)
148 endif
149 endif
150 @echo --------------------------------------
151
152
153objects:
154 for i in $(SUBDIRS); do mkdir -p $$i/obj/$(PLATFORM); done
155 for i in $(SUBDIRS); do mkdir -p $$i/moc/$(PLATFORM); done
156 mkdir -p libical/lib/$(PLATFORM)
157
158clean:
159 rm -f libical/lib/$(PLATFORM)/*;
160 for i in $(SUBDIRS); do pushd $$i; make clean; rm -f *~;\
161 rm -f obj/$(PLATFORM)/*; rm -f moc/$(PLATFORM)/*; rm Makefile$(PLATFORM); popd; \
162 done
163install:
164 cd bin/kdepim; make install
165 cp db2file/db2file $(QPEDIR)/bin/db2file
166 cp korganizer/korganizer.desktop $(QPEDIR)/apps/Pim/korganizer.desktop
167 cp kaddressbook/kaddressbook.desktop $(QPEDIR)/apps/Pim/kaddressbook.desktop
168 cp kmicromail/kmicromail.desktop $(QPEDIR)/apps/Pim/kmicromail.desktop
169
170dist:
171 @echo Dont forget to do "make install" before "make dist"
172 rm -f *arm.ipk
173 rm -f *~
174 cd ..; tar czf kdepim.src.tar.gz --exclude=obj --exclude=moc kdepim
175 ./mkipks kmicrokdelibs.control
176 ./mkipks korganizer.control
177 ./mkipks kaddressbook.control
178 ifndef BUILD_NO_MICROMAIL
179 ./mkipks kopiemail.control
180 endif
181 ./mkipks korganizer-alarm.control
182
183tmake: objects \
184 qtcompat/Makefile$(PLATFORM) \
185 microkde/Makefile$(PLATFORM) \
186 libkcal/Makefile$(PLATFORM) \
187 libkdepim/Makefile$(PLATFORM) \
188 korganizer/Makefile$(PLATFORM) \
189 kalarmd/Makefile$(PLATFORM) \
190 libical/src/libical/Makefile$(PLATFORM) \
191 libical/src/libicalss/Makefile$(PLATFORM) \
192 kabc/Makefile$(PLATFORM) \
193 kabc/formats/binary/Makefile$(PLATFORM) \
194 kabc/plugins/file/Makefile$(PLATFORM) \
195 kabc/plugins/dir/Makefile$(PLATFORM) \
196 kabc/plugins/ldap/Makefile$(PLATFORM) \
197 kabc/plugins/opie/Makefile$(PLATFORM) \
198 kabc/plugins/qtopia/Makefile$(PLATFORM) \
199 kabc/plugins/sharpdtm/Makefile$(PLATFORM) \
200 kaddressbook/Makefile$(PLATFORM) \
201 kmicromail/Makefile$(PLATFORM) \
202 kmicromail/libetpan/Makefile$(PLATFORM) \
203 kmicromail/libmailwrapper/Makefile$(PLATFORM)
204
205
206
207
208qtcompat/Makefile$(PLATFORM): qtcompat/qtcompat.pro
209 cd qtcompat; tmake "CONFIG+=$(RELEASE_DEBUG)" qtcompat.pro -o Makefile$(PLATFORM)
210
211microkde/Makefile$(PLATFORM): microkde/microkdeE.pro
212 cd microkde; tmake "CONFIG+=$(RELEASE_DEBUG)" microkdeE.pro -o Makefile$(PLATFORM)
213
214libkcal/Makefile$(PLATFORM): libkcal/libkcalE.pro
215 cd libkcal; tmake "CONFIG+=$(RELEASE_DEBUG)" libkcalE.pro -o Makefile$(PLATFORM)
216
217
218libkdepim/Makefile$(PLATFORM): libkdepim/libkdepimE.pro
219 cd libkdepim; tmake "CONFIG+=$(RELEASE_DEBUG)" libkdepimE.pro -o Makefile$(PLATFORM)
220
221kalarmd/Makefile$(PLATFORM): kalarmd/kalarmdE.pro
222 cd kalarmd; tmake "CONFIG+=$(RELEASE_DEBUG)" kalarmdE.pro -o Makefile$(PLATFORM)
223
224korganizer/Makefile$(PLATFORM): korganizer/korganizerE.pro
225 cd korganizer; tmake "CONFIG+=$(RELEASE_DEBUG)" korganizerE.pro -o Makefile$(PLATFORM)
226
227libical/src/libical/Makefile$(PLATFORM): libical/src/libical/libicalE.pro
228 cd libical/src/libical; tmake "CONFIG+=$(RELEASE_DEBUG)" libicalE.pro -o Makefile$(PLATFORM)
229
230libical/src/libicalss/Makefile$(PLATFORM): libical/src/libicalss/libicalssE.pro
231 cd libical/src/libicalss; tmake "CONFIG+=$(RELEASE_DEBUG)" libicalssE.pro -o Makefile$(PLATFORM)
232
233kabc/Makefile$(PLATFORM): kabc/kabcE.pro
234 cd kabc; tmake "CONFIG+=$(RELEASE_DEBUG)" kabcE.pro -o Makefile$(PLATFORM)
235
236kabc/formats/binary/Makefile$(PLATFORM): kabc/formats/binary/kabcformat_binaryE.pro
237 cd kabc/formats/binary; tmake "CONFIG+=$(RELEASE_DEBUG)" kabcformat_binaryE.pro -o Makefile$(PLATFORM)
238
239kabc/plugins/file/Makefile$(PLATFORM): kabc/plugins/file/fileE.pro
240 cd kabc/plugins/file; tmake "CONFIG+=$(RELEASE_DEBUG)" fileE.pro -o Makefile$(PLATFORM)
241
242kabc/plugins/dir/Makefile$(PLATFORM): kabc/plugins/dir/dirE.pro
243 cd kabc/plugins/dir; tmake "CONFIG+=$(RELEASE_DEBUG)" dirE.pro -o Makefile$(PLATFORM)
244
245kabc/plugins/ldap/Makefile$(PLATFORM): kabc/plugins/ldap/ldapE.pro
246 cd kabc/plugins/ldap; tmake "CONFIG+=$(RELEASE_DEBUG)" ldapE.pro -o Makefile$(PLATFORM)
247
248kabc/plugins/opie/Makefile$(PLATFORM): kabc/plugins/opie/opieE.pro
249 cd kabc/plugins/opie; tmake "CONFIG+=$(RELEASE_DEBUG)" opieE.pro -o Makefile$(PLATFORM)
250
251kabc/plugins/qtopia/Makefile$(PLATFORM): kabc/plugins/qtopia/qtopiaE.pro
252 cd kabc/plugins/qtopia; tmake "CONFIG+=$(RELEASE_DEBUG)" qtopiaE.pro -o Makefile$(PLATFORM)
253
254kabc/plugins/sharpdtm/Makefile$(PLATFORM): kabc/plugins/sharpdtm/sharpdtmE.pro
255 cd kabc/plugins/sharpdtm; tmake "CONFIG+=$(RELEASE_DEBUG)" sharpdtmE.pro -o Makefile$(PLATFORM)
256
257kaddressbook/Makefile$(PLATFORM): kaddressbook/kaddressbookE.pro
258 cd kaddressbook; tmake "CONFIG+=$(RELEASE_DEBUG)" kaddressbookE.pro -o Makefile$(PLATFORM)
259
260kmicromail/Makefile$(PLATFORM): kmicromail/kmicromailE.pro
261 cd kmicromail; tmake "CONFIG+=$(RELEASE_DEBUG)" kmicromailE.pro -o Makefile$(PLATFORM)
262
263kmicromail/libetpan/Makefile$(PLATFORM): kmicromail/libetpan/libetpanE.pro
264 cd kmicromail/libetpan; tmake "CONFIG+=$(RELEASE_DEBUG)" libetpanE.pro -o Makefile$(PLATFORM)
265
266kmicromail/libmailwrapper/Makefile$(PLATFORM): kmicromail/libmailwrapper/libmailwrapperE.pro
267 cd kmicromail/libmailwrapper; tmake "CONFIG+=$(RELEASE_DEBUG)" libmailwrapperE.pro -o Makefile$(PLATFORM)
diff --git a/gammu/emb/common/common.pro b/gammu/emb/common/common.pro
index 49fecc6..7cbcb17 100644
--- a/gammu/emb/common/common.pro
+++ b/gammu/emb/common/common.pro
@@ -1,179 +1,179 @@
1###################################################################### 1######################################################################
2# Automatically generated by qmake (1.07a) Fri Jul 30 22:13:34 2004 2# Automatically generated by qmake (1.07a) Fri Jul 30 22:13:34 2004
3###################################################################### 3######################################################################
4 4
5TEMPLATE = lib 5TEMPLATE = lib
6DEPENDPATH += device \ 6DEPENDPATH += device \
7 misc \ 7 misc \
8 phone \ 8 phone \
9 protocol \ 9 protocol \
10 service \ 10 service \
11 device/bluetoth \ 11 device/bluetoth \
12 device/irda \ 12 device/irda \
13 device/serial \ 13 device/serial \
14 misc/coding \ 14 misc/coding \
15 phone/alcatel \ 15 phone/alcatel \
16 phone/at \ 16 phone/at \
17 phone/nokia \ 17 phone/nokia \
18 phone/obex \ 18 phone/obex \
19 phone/symbian \ 19 phone/symbian \
20 protocol/alcatel \ 20 protocol/alcatel \
21 protocol/at \ 21 protocol/at \
22 protocol/nokia \ 22 protocol/nokia \
23 protocol/obex \ 23 protocol/obex \
24 protocol/symbian \ 24 protocol/symbian \
25 service/backup \ 25 service/backup \
26 service/sms \ 26 service/sms \
27 phone/nokia/dct3 \ 27 phone/nokia/dct3 \
28 phone/nokia/dct4 28 phone/nokia/dct4
29INCLUDEPATH += . \ 29INCLUDEPATH += . \
30 misc/coding \ 30 misc/coding \
31 misc \ 31 misc \
32 device \ 32 device \
33 phone/nokia/dct4 \ 33 phone/nokia/dct4 \
34 phone/nokia/dct3 \ 34 phone/nokia/dct3 \
35 phone/at \ 35 phone/at \
36 phone/alcatel \ 36 phone/alcatel \
37 phone/obex \ 37 phone/obex \
38 phone/symbian \ 38 phone/symbian \
39 protocol \ 39 protocol \
40 protocol/nokia \ 40 protocol/nokia \
41 protocol/at \ 41 protocol/at \
42 protocol/alcatel \ 42 protocol/alcatel \
43 protocol/obex \ 43 protocol/obex \
44 protocol/symbian \ 44 protocol/symbian \
45 device/serial \ 45 device/serial \
46 device/irda \ 46 device/irda \
47 device/bluetoth \ 47 device/bluetoth \
48 service \ 48 service \
49 service/sms \ 49 service/sms \
50 service/backup \ 50 service/backup \
51 phone/nokia \ 51 phone/nokia \
52 phone 52 phone
53 53
54# Input 54# Input
55HEADERS += config.h \ 55HEADERS += config.h \
56 gammu.h \ 56 gammu.h \
57 gsmcomon.h \ 57 gsmcomon.h \
58 gsmstate.h \ 58 gsmstate.h \
59 device/devfunc.h \ 59 device/devfunc.h \
60 misc/cfg.h \ 60 misc/cfg.h \
61 misc/misc.h \ 61 misc/misc.h \
62 phone/pfunc.h \ 62 phone/pfunc.h \
63 protocol/protocol.h \ 63 protocol/protocol.h \
64 service/gsmcal.h \ 64 service/gsmcal.h \
65 service/gsmcall.h \ 65 service/gsmcall.h \
66 service/gsmdata.h \ 66 service/gsmdata.h \
67 service/gsmlogo.h \ 67 service/gsmlogo.h \
68 service/gsmmisc.h \ 68 service/gsmmisc.h \
69 service/gsmnet.h \ 69 service/gsmnet.h \
70 service/gsmpbk.h \ 70 service/gsmpbk.h \
71 service/gsmprof.h \ 71 service/gsmprof.h \
72 service/gsmring.h \ 72 service/gsmring.h \
73 device/bluetoth/affix.h \ 73 device/bluetoth/affix.h \
74 device/bluetoth/blue_w32.h \ 74 device/bluetoth/blue_w32.h \
75 device/bluetoth/bluetoth.h \ 75 device/bluetoth/bluetoth.h \
76 device/bluetoth/bluez.h \ 76 device/bluetoth/bluez.h \
77 device/irda/irda.h \ 77 device/irda/irda.h \
78 device/irda/irda_unx.h \ 78 device/irda/irda_unx.h \
79 device/irda/irda_w32.h \ 79 device/irda/irda_w32.h \
80 device/serial/ser_djg.h \ 80 device/serial/ser_djg.h \
81 device/serial/ser_unx.h \ 81 device/serial/ser_unx.h \
82 device/serial/ser_w32.h \ 82 device/serial/ser_w32.h \
83 misc/coding/coding.h \ 83 misc/coding/coding.h \
84 misc/coding/md5.h \ 84 misc/coding/md5.h \
85 phone/alcatel/alcatel.h \ 85 phone/alcatel/alcatel.h \
86 phone/at/atgen.h \ 86 phone/at/atgen.h \
87 phone/nokia/ncommon.h \ 87 phone/nokia/ncommon.h \
88 phone/nokia/nfunc.h \ 88 phone/nokia/nfunc.h \
89 phone/nokia/nfuncold.h \ 89 phone/nokia/nfuncold.h \
90 phone/obex/obexgen.h \ 90 phone/obex/obexgen.h \
91 phone/symbian/mroutgen.h \ 91 phone/symbian/mroutgen.h \
92 protocol/alcatel/alcabus.h \ 92 protocol/alcatel/alcabus.h \
93 protocol/at/at.h \ 93 protocol/at/at.h \
94 protocol/nokia/fbus2.h \ 94 protocol/nokia/fbus2.h \
95 protocol/nokia/mbus2.h \ 95 protocol/nokia/mbus2.h \
96 protocol/nokia/phonet.h \ 96 protocol/nokia/phonet.h \
97 protocol/obex/obex.h \ 97 protocol/obex/obex.h \
98 protocol/symbian/mrouter.h \ 98 protocol/symbian/mrouter.h \
99 service/backup/backgen.h \ 99 service/backup/backgen.h \
100 service/backup/backics.h \ 100 service/backup/backics.h \
101 service/backup/backldif.h \ 101 service/backup/backldif.h \
102 service/backup/backlmb.h \ 102 service/backup/backlmb.h \
103 service/backup/backtext.h \ 103 service/backup/backtext.h \
104 service/backup/backvcf.h \ 104 service/backup/backvcf.h \
105 service/backup/backvcs.h \ 105 service/backup/backvcs.h \
106 service/backup/gsmback.h \ 106 service/backup/gsmback.h \
107 service/sms/gsmems.h \ 107 service/sms/gsmems.h \
108 service/sms/gsmmulti.h \ 108 service/sms/gsmmulti.h \
109 service/sms/gsmsms.h \ 109 service/sms/gsmsms.h \
110 phone/nokia/dct3/dct3comm.h \ 110 phone/nokia/dct3/dct3comm.h \
111 phone/nokia/dct3/dct3func.h \ 111 phone/nokia/dct3/dct3func.h \
112 phone/nokia/dct3/n6110.h \ 112 phone/nokia/dct3/n6110.h \
113 phone/nokia/dct3/n7110.h \ 113 phone/nokia/dct3/n7110.h \
114 phone/nokia/dct3/n9210.h \ 114 phone/nokia/dct3/n9210.h \
115 phone/nokia/dct4/dct4func.h \ 115 phone/nokia/dct4/dct4func.h \
116 phone/nokia/dct4/n3320.h \ 116 phone/nokia/dct4/n3320.h \
117 phone/nokia/dct4/n3650.h \ 117 phone/nokia/dct4/n3650.h \
118 phone/nokia/dct4/n6510.h 118 phone/nokia/dct4/n6510.h
119SOURCES +=gsmcomon.c \ 119SOURCES +=gsmcomon.c \
120gsmstate.c \ 120gsmstate.c \
121misc/misc.c \ 121misc/misc.c \
122misc/cfg.c \ 122misc/cfg.c \
123misc/coding/coding.c \ 123misc/coding/coding.c \
124misc/coding/md5.c \ 124misc/coding/md5.c \
125service/sms/gsmsms.c \ 125service/sms/gsmsms.c \
126service/sms/gsmems.c \ 126service/sms/gsmems.c \
127service/sms/gsmmulti.c \ 127service/sms/gsmmulti.c \
128service/gsmcal.c \ 128service/gsmcal.c \
129service/gsmdata.c \ 129service/gsmdata.c \
130service/gsmpbk.c \ 130service/gsmpbk.c \
131service/gsmring.c \ 131service/gsmring.c \
132service/gsmlogo.c \ 132service/gsmlogo.c \
133service/gsmmisc.c \ 133service/gsmmisc.c \
134service/gsmnet.c \ 134service/gsmnet.c \
135service/backup/gsmback.c \ 135service/backup/gsmback.c \
136service/backup/backldif.c \ 136service/backup/backldif.c \
137service/backup/backlmb.c \ 137service/backup/backlmb.c \
138service/backup/backtext.c \ 138service/backup/backtext.c \
139service/backup/backvcs.c \ 139service/backup/backvcs.c \
140service/backup/backvcf.c \ 140service/backup/backvcf.c \
141service/backup/backics.c \ 141service/backup/backics.c \
142device/bluetoth/affix.c \ 142device/bluetoth/affix.c \
143device/bluetoth/bluez.c \ 143device/bluetoth/bluez.c \
144device/bluetoth/blue_w32.c \ 144device/bluetoth/blue_w32.c \
145device/bluetoth/bluetoth.c \ 145device/bluetoth/bluetoth.c \
146device/serial/ser_unx.c \ 146device/serial/ser_unx.c \
147device/serial/ser_djg.c \ 147device/serial/ser_djg.c \
148device/irda/irda.c \ 148device/irda/irda.c \
149device/devfunc.c \ 149device/devfunc.c \
150protocol/at/at.c \ 150protocol/at/at.c \
151protocol/alcatel/alcabus.c \ 151protocol/alcatel/alcabus.c \
152protocol/nokia/mbus2.c \ 152protocol/nokia/mbus2.c \
153protocol/nokia/fbus2.c \ 153protocol/nokia/fbus2.c \
154protocol/nokia/phonet.c \ 154protocol/nokia/phonet.c \
155protocol/obex/obex.c \ 155protocol/obex/obex.c \
156protocol/symbian/mrouter.c \ 156protocol/symbian/mrouter.c \
157phone/pfunc.c \ 157phone/pfunc.c \
158phone/at/atgen.c \ 158phone/at/atgen.c \
159phone/at/siemens.c \ 159phone/at/siemens.c \
160phone/at/sonyeric.c \ 160phone/at/sonyeric.c \
161phone/alcatel/alcatel.c \ 161phone/alcatel/alcatel.c \
162phone/nokia/dct3/n6110.c \ 162phone/nokia/dct3/n6110.c \
163phone/nokia/dct3/n7110.c \ 163phone/nokia/dct3/n7110.c \
164phone/nokia/dct3/n9210.c \ 164phone/nokia/dct3/n9210.c \
165phone/nokia/dct3/dct3func.c \ 165phone/nokia/dct3/dct3func.c \
166phone/nokia/dct4/n3320.c \ 166phone/nokia/dct4/n3320.c \
167phone/nokia/dct4/n3650.c \ 167phone/nokia/dct4/n3650.c \
168phone/nokia/dct4/n6510.c \ 168phone/nokia/dct4/n6510.c \
169phone/nokia/dct4/dct4func.c \ 169phone/nokia/dct4/dct4func.c \
170phone/nokia/nauto.c \ 170phone/nokia/nauto.c \
171phone/nokia/nfunc.c \ 171phone/nokia/nfunc.c \
172phone/nokia/nfuncold.c \ 172phone/nokia/nfuncold.c \
173phone/obex/obexgen.c \ 173phone/obex/obexgen.c \
174phone/symbian/mroutgen.c 174phone/symbian/mroutgen.c
175 175
176TARGET = microgammu 176TARGET = microgammu
177DESTDIR = $(QPEDIR)/lib 177DESTDIR = ../../../bin
178OBJECTS_DIR = obj/$(PLATFORM) 178OBJECTS_DIR = obj/unix
179MOC_DIR = moc/$(PLATFORM) 179MOC_DIR = moc/unix
diff --git a/gammu/emb/common/commonE.pro b/gammu/emb/common/commonE.pro
new file mode 100644
index 0000000..49fecc6
--- a/dev/null
+++ b/gammu/emb/common/commonE.pro
@@ -0,0 +1,179 @@
1######################################################################
2# Automatically generated by qmake (1.07a) Fri Jul 30 22:13:34 2004
3######################################################################
4
5TEMPLATE = lib
6DEPENDPATH += device \
7 misc \
8 phone \
9 protocol \
10 service \
11 device/bluetoth \
12 device/irda \
13 device/serial \
14 misc/coding \
15 phone/alcatel \
16 phone/at \
17 phone/nokia \
18 phone/obex \
19 phone/symbian \
20 protocol/alcatel \
21 protocol/at \
22 protocol/nokia \
23 protocol/obex \
24 protocol/symbian \
25 service/backup \
26 service/sms \
27 phone/nokia/dct3 \
28 phone/nokia/dct4
29INCLUDEPATH += . \
30 misc/coding \
31 misc \
32 device \
33 phone/nokia/dct4 \
34 phone/nokia/dct3 \
35 phone/at \
36 phone/alcatel \
37 phone/obex \
38 phone/symbian \
39 protocol \
40 protocol/nokia \
41 protocol/at \
42 protocol/alcatel \
43 protocol/obex \
44 protocol/symbian \
45 device/serial \
46 device/irda \
47 device/bluetoth \
48 service \
49 service/sms \
50 service/backup \
51 phone/nokia \
52 phone
53
54# Input
55HEADERS += config.h \
56 gammu.h \
57 gsmcomon.h \
58 gsmstate.h \
59 device/devfunc.h \
60 misc/cfg.h \
61 misc/misc.h \
62 phone/pfunc.h \
63 protocol/protocol.h \
64 service/gsmcal.h \
65 service/gsmcall.h \
66 service/gsmdata.h \
67 service/gsmlogo.h \
68 service/gsmmisc.h \
69 service/gsmnet.h \
70 service/gsmpbk.h \
71 service/gsmprof.h \
72 service/gsmring.h \
73 device/bluetoth/affix.h \
74 device/bluetoth/blue_w32.h \
75 device/bluetoth/bluetoth.h \
76 device/bluetoth/bluez.h \
77 device/irda/irda.h \
78 device/irda/irda_unx.h \
79 device/irda/irda_w32.h \
80 device/serial/ser_djg.h \
81 device/serial/ser_unx.h \
82 device/serial/ser_w32.h \
83 misc/coding/coding.h \
84 misc/coding/md5.h \
85 phone/alcatel/alcatel.h \
86 phone/at/atgen.h \
87 phone/nokia/ncommon.h \
88 phone/nokia/nfunc.h \
89 phone/nokia/nfuncold.h \
90 phone/obex/obexgen.h \
91 phone/symbian/mroutgen.h \
92 protocol/alcatel/alcabus.h \
93 protocol/at/at.h \
94 protocol/nokia/fbus2.h \
95 protocol/nokia/mbus2.h \
96 protocol/nokia/phonet.h \
97 protocol/obex/obex.h \
98 protocol/symbian/mrouter.h \
99 service/backup/backgen.h \
100 service/backup/backics.h \
101 service/backup/backldif.h \
102 service/backup/backlmb.h \
103 service/backup/backtext.h \
104 service/backup/backvcf.h \
105 service/backup/backvcs.h \
106 service/backup/gsmback.h \
107 service/sms/gsmems.h \
108 service/sms/gsmmulti.h \
109 service/sms/gsmsms.h \
110 phone/nokia/dct3/dct3comm.h \
111 phone/nokia/dct3/dct3func.h \
112 phone/nokia/dct3/n6110.h \
113 phone/nokia/dct3/n7110.h \
114 phone/nokia/dct3/n9210.h \
115 phone/nokia/dct4/dct4func.h \
116 phone/nokia/dct4/n3320.h \
117 phone/nokia/dct4/n3650.h \
118 phone/nokia/dct4/n6510.h
119SOURCES +=gsmcomon.c \
120gsmstate.c \
121misc/misc.c \
122misc/cfg.c \
123misc/coding/coding.c \
124misc/coding/md5.c \
125service/sms/gsmsms.c \
126service/sms/gsmems.c \
127service/sms/gsmmulti.c \
128service/gsmcal.c \
129service/gsmdata.c \
130service/gsmpbk.c \
131service/gsmring.c \
132service/gsmlogo.c \
133service/gsmmisc.c \
134service/gsmnet.c \
135service/backup/gsmback.c \
136service/backup/backldif.c \
137service/backup/backlmb.c \
138service/backup/backtext.c \
139service/backup/backvcs.c \
140service/backup/backvcf.c \
141service/backup/backics.c \
142device/bluetoth/affix.c \
143device/bluetoth/bluez.c \
144device/bluetoth/blue_w32.c \
145device/bluetoth/bluetoth.c \
146device/serial/ser_unx.c \
147device/serial/ser_djg.c \
148device/irda/irda.c \
149device/devfunc.c \
150protocol/at/at.c \
151protocol/alcatel/alcabus.c \
152protocol/nokia/mbus2.c \
153protocol/nokia/fbus2.c \
154protocol/nokia/phonet.c \
155protocol/obex/obex.c \
156protocol/symbian/mrouter.c \
157phone/pfunc.c \
158phone/at/atgen.c \
159phone/at/siemens.c \
160phone/at/sonyeric.c \
161phone/alcatel/alcatel.c \
162phone/nokia/dct3/n6110.c \
163phone/nokia/dct3/n7110.c \
164phone/nokia/dct3/n9210.c \
165phone/nokia/dct3/dct3func.c \
166phone/nokia/dct4/n3320.c \
167phone/nokia/dct4/n3650.c \
168phone/nokia/dct4/n6510.c \
169phone/nokia/dct4/dct4func.c \
170phone/nokia/nauto.c \
171phone/nokia/nfunc.c \
172phone/nokia/nfuncold.c \
173phone/obex/obexgen.c \
174phone/symbian/mroutgen.c
175
176TARGET = microgammu
177DESTDIR = $(QPEDIR)/lib
178OBJECTS_DIR = obj/$(PLATFORM)
179MOC_DIR = moc/$(PLATFORM)
diff --git a/kabc/kabc.pro b/kabc/kabc.pro
index 10b092c..95ebd68 100644
--- a/kabc/kabc.pro
+++ b/kabc/kabc.pro
@@ -1,216 +1,218 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2CONFIG += qt warn_on 2CONFIG += qt warn_on
3#release debug 3#release debug
4DESTDIR=../bin 4DESTDIR=../bin
5 5
6TARGET = microkabc 6TARGET = microkabc
7 7
8include( ../variables.pri ) 8include( ../variables.pri )
9 9
10INCLUDEPATH += . ./vcard/include ./vcard/include/generated ../microkde ../microkde/kdecore ../microkde/kio/kfile ../microkde/kio/kio ../libkdepim ../qtcompat ../microkde/kdeui 10INCLUDEPATH += . ./vcard/include ./vcard/include/generated ../microkde ../microkde/kdecore ../microkde/kio/kfile ../microkde/kio/kio ../libkdepim ../qtcompat ../microkde/kdeui ..
11 11
12#LIBS += -lmicrokde -lldap 12#LIBS += -lmicrokde -lldap
13LIBS += -L$(QPEDIR)/lib 13LIBS += -L$(QPEDIR)/lib
14DEFINES += KAB_EMBEDDED DESKTOP_VERSION 14DEFINES += KAB_EMBEDDED DESKTOP_VERSION
15unix : { 15unix : {
16 16
17OBJECTS_DIR = obj/unix 17OBJECTS_DIR = obj/unix
18MOC_DIR = moc/unix 18MOC_DIR = moc/unix
19} 19}
20win32: { 20win32: {
21DEFINES += _WIN32_ 21DEFINES += _WIN32_
22OBJECTS_DIR = obj/win 22OBJECTS_DIR = obj/win
23MOC_DIR = moc/win 23MOC_DIR = moc/win
24} 24}
25INTERFACES = \ 25INTERFACES = \
26 26
27 27
28HEADERS = \ 28HEADERS = \
29 resource.h \ 29 resource.h \
30 stdaddressbook.h \ 30 stdaddressbook.h \
31 agent.h \ 31 agent.h \
32 geo.h \ 32 geo.h \
33 key.h \ 33 key.h \
34 field.h \ 34 field.h \
35 plugin.h \ 35 plugin.h \
36 address.h \ 36 address.h \
37 addresseelist.h \ 37 addresseelist.h \
38formatfactory.h \ 38formatfactory.h \
39 formatplugin.h \ 39 formatplugin.h \
40 phonenumber.h \ 40 phonenumber.h \
41distributionlist.h \ 41distributionlist.h \
42distributionlistdialog.h \ 42distributionlistdialog.h \
43distributionlisteditor.h \ 43distributionlisteditor.h \
44vcardformatplugin.h \ 44vcardformatplugin.h \
45formats/vcardformatplugin2.h \ 45formats/vcardformatplugin2.h \
46 picture.h \ 46 picture.h \
47 secrecy.h \ 47 secrecy.h \
48 sound.h \ 48 sound.h \
49 addressbook.h \ 49 addressbook.h \
50 syncprefwidget.h \
50 timezone.h \ 51 timezone.h \
51 tmpaddressbook.h \ 52 tmpaddressbook.h \
52 addressee.h \ 53 addressee.h \
53 addresseedialog.h \ 54 addresseedialog.h \
54 vcardconverter.h \ 55 vcardconverter.h \
55 vcard21parser.h \ 56 vcard21parser.h \
56 vcardformatimpl.h \ 57 vcardformatimpl.h \
57 plugins/file/resourcefile.h \ 58 plugins/file/resourcefile.h \
58 plugins/file/resourcefileconfig.h \ 59 plugins/file/resourcefileconfig.h \
59 plugins/dir/resourcedir.h \ 60 plugins/dir/resourcedir.h \
60 plugins/dir/resourcedirconfig.h \ 61 plugins/dir/resourcedirconfig.h \
61 vcardparser/vcardline.h \ 62 vcardparser/vcardline.h \
62 vcardparser/vcard.h \ 63 vcardparser/vcard.h \
63 vcardparser/vcardtool.h \ 64 vcardparser/vcardtool.h \
64 vcardparser/vcardparser.h \ 65 vcardparser/vcardparser.h \
65vcard/include/VCardAdrParam.h \ 66vcard/include/VCardAdrParam.h \
66vcard/include/VCardAdrValue.h \ 67vcard/include/VCardAdrValue.h \
67vcard/include/VCardAgentParam.h \ 68vcard/include/VCardAgentParam.h \
68vcard/include/VCardContentLine.h \ 69vcard/include/VCardContentLine.h \
69vcard/include/VCardDateParam.h \ 70vcard/include/VCardDateParam.h \
70vcard/include/VCardDateValue.h \ 71vcard/include/VCardDateValue.h \
71vcard/include/VCardEmailParam.h \ 72vcard/include/VCardEmailParam.h \
72vcard/include/VCardGeoValue.h \ 73vcard/include/VCardGeoValue.h \
73vcard/include/VCardGroup.h \ 74vcard/include/VCardGroup.h \
74vcard/include/VCardImageParam.h \ 75vcard/include/VCardImageParam.h \
75vcard/include/VCardImageValue.h \ 76vcard/include/VCardImageValue.h \
76vcard/include/VCardLangValue.h \ 77vcard/include/VCardLangValue.h \
77vcard/include/VCardNValue.h \ 78vcard/include/VCardNValue.h \
78vcard/include/VCardParam.h \ 79vcard/include/VCardParam.h \
79vcard/include/VCardPhoneNumberValue.h \ 80vcard/include/VCardPhoneNumberValue.h \
80vcard/include/VCardSourceParam.h \ 81vcard/include/VCardSourceParam.h \
81vcard/include/VCardTelParam.h \ 82vcard/include/VCardTelParam.h \
82vcard/include/VCardTextParam.h \ 83vcard/include/VCardTextParam.h \
83vcard/include/VCardTextNSParam.h \ 84vcard/include/VCardTextNSParam.h \
84vcard/include/VCardTextValue.h \ 85vcard/include/VCardTextValue.h \
85vcard/include/VCardTextBinParam.h \ 86vcard/include/VCardTextBinParam.h \
86vcard/include/VCardURIValue.h \ 87vcard/include/VCardURIValue.h \
87vcard/include/VCardVCard.h \ 88vcard/include/VCardVCard.h \
88vcard/include/VCardEntity.h \ 89vcard/include/VCardEntity.h \
89vcard/include/VCardValue.h \ 90vcard/include/VCardValue.h \
90vcard/include/VCardSoundValue.h \ 91vcard/include/VCardSoundValue.h \
91vcard/include/VCardAgentValue.h \ 92vcard/include/VCardAgentValue.h \
92vcard/include/VCardTelValue.h \ 93vcard/include/VCardTelValue.h \
93vcard/include/VCardTextBinValue.h \ 94vcard/include/VCardTextBinValue.h \
94vcard/include/VCardOrgValue.h \ 95vcard/include/VCardOrgValue.h \
95vcard/include/VCardUTCValue.h \ 96vcard/include/VCardUTCValue.h \
96vcard/include/VCardClassValue.h \ 97vcard/include/VCardClassValue.h \
97vcard/include/VCardFloatValue.h \ 98vcard/include/VCardFloatValue.h \
98vcard/include/VCardTextListValue.h \ 99vcard/include/VCardTextListValue.h \
99vcard/include/generated/AdrParam-generated.h \ 100vcard/include/generated/AdrParam-generated.h \
100vcard/include/generated/AdrValue-generated.h \ 101vcard/include/generated/AdrValue-generated.h \
101vcard/include/generated/AgentParam-generated.h \ 102vcard/include/generated/AgentParam-generated.h \
102vcard/include/generated/ContentLine-generated.h \ 103vcard/include/generated/ContentLine-generated.h \
103vcard/include/generated/DateParam-generated.h \ 104vcard/include/generated/DateParam-generated.h \
104vcard/include/generated/DateValue-generated.h \ 105vcard/include/generated/DateValue-generated.h \
105vcard/include/generated/EmailParam-generated.h \ 106vcard/include/generated/EmailParam-generated.h \
106vcard/include/generated/GeoValue-generated.h \ 107vcard/include/generated/GeoValue-generated.h \
107vcard/include/generated/Group-generated.h \ 108vcard/include/generated/Group-generated.h \
108vcard/include/generated/ImageParam-generated.h \ 109vcard/include/generated/ImageParam-generated.h \
109vcard/include/generated/ImageValue-generated.h \ 110vcard/include/generated/ImageValue-generated.h \
110vcard/include/generated/LangValue-generated.h \ 111vcard/include/generated/LangValue-generated.h \
111vcard/include/generated/NValue-generated.h \ 112vcard/include/generated/NValue-generated.h \
112vcard/include/generated/Param-generated.h \ 113vcard/include/generated/Param-generated.h \
113vcard/include/generated/PhoneNumberValue-generated.h \ 114vcard/include/generated/PhoneNumberValue-generated.h \
114vcard/include/generated/SourceParam-generated.h \ 115vcard/include/generated/SourceParam-generated.h \
115vcard/include/generated/TelParam-generated.h \ 116vcard/include/generated/TelParam-generated.h \
116vcard/include/generated/TextParam-generated.h \ 117vcard/include/generated/TextParam-generated.h \
117vcard/include/generated/TextNSParam-generated.h \ 118vcard/include/generated/TextNSParam-generated.h \
118vcard/include/generated/TextValue-generated.h \ 119vcard/include/generated/TextValue-generated.h \
119vcard/include/generated/TextBinParam-generated.h \ 120vcard/include/generated/TextBinParam-generated.h \
120vcard/include/generated/URIValue-generated.h \ 121vcard/include/generated/URIValue-generated.h \
121vcard/include/generated/VCard-generated.h \ 122vcard/include/generated/VCard-generated.h \
122vcard/include/generated/VCardEntity-generated.h \ 123vcard/include/generated/VCardEntity-generated.h \
123vcard/include/generated/Value-generated.h \ 124vcard/include/generated/Value-generated.h \
124vcard/include/generated/SoundValue-generated.h \ 125vcard/include/generated/SoundValue-generated.h \
125vcard/include/generated/AgentValue-generated.h \ 126vcard/include/generated/AgentValue-generated.h \
126vcard/include/generated/TelValue-generated.h \ 127vcard/include/generated/TelValue-generated.h \
127vcard/include/generated/TextBinValue-generated.h \ 128vcard/include/generated/TextBinValue-generated.h \
128vcard/include/generated/OrgValue-generated.h \ 129vcard/include/generated/OrgValue-generated.h \
129vcard/include/generated/UTCValue-generated.h \ 130vcard/include/generated/UTCValue-generated.h \
130vcard/include/generated/ClassValue-generated.h \ 131vcard/include/generated/ClassValue-generated.h \
131vcard/include/generated/FloatValue-generated.h \ 132vcard/include/generated/FloatValue-generated.h \
132vcard/include/generated/TextListValue-generated.h 133vcard/include/generated/TextListValue-generated.h
133 134
134 135
135# plugins/ldap/resourceldap.h \ 136# plugins/ldap/resourceldap.h \
136# plugins/ldap/resourceldapconfig.h \ 137# plugins/ldap/resourceldapconfig.h \
137#formats/binary/binaryformat.h \ 138#formats/binary/binaryformat.h \
138 139
139 140
140SOURCES = \ 141SOURCES = \
141distributionlist.cpp \ 142distributionlist.cpp \
142distributionlistdialog.cpp \ 143distributionlistdialog.cpp \
143distributionlisteditor.cpp \ 144distributionlisteditor.cpp \
144vcardformatplugin.cpp \ 145vcardformatplugin.cpp \
145formats/vcardformatplugin2.cpp \ 146formats/vcardformatplugin2.cpp \
146formatfactory.cpp \ 147formatfactory.cpp \
147 resource.cpp \ 148 resource.cpp \
148 stdaddressbook.cpp \ 149 stdaddressbook.cpp \
149 plugin.cpp \ 150 plugin.cpp \
150 agent.cpp \ 151 agent.cpp \
151 geo.cpp \ 152 geo.cpp \
152 key.cpp \ 153 key.cpp \
153 field.cpp \ 154 field.cpp \
154 address.cpp \ 155 address.cpp \
155 phonenumber.cpp \ 156 phonenumber.cpp \
156 picture.cpp \ 157 picture.cpp \
157 secrecy.cpp \ 158 secrecy.cpp \
158 sound.cpp \ 159 sound.cpp \
159 addressbook.cpp \ 160 addressbook.cpp \
161 syncprefwidget.cpp \
160 timezone.cpp \ 162 timezone.cpp \
161 tmpaddressbook.cpp \ 163 tmpaddressbook.cpp \
162 addressee.cpp \ 164 addressee.cpp \
163 addresseelist.cpp \ 165 addresseelist.cpp \
164 addresseedialog.cpp \ 166 addresseedialog.cpp \
165 vcardconverter.cpp \ 167 vcardconverter.cpp \
166 vcard21parser.cpp \ 168 vcard21parser.cpp \
167 vcardformatimpl.cpp \ 169 vcardformatimpl.cpp \
168 plugins/file/resourcefile.cpp \ 170 plugins/file/resourcefile.cpp \
169 plugins/file/resourcefileconfig.cpp \ 171 plugins/file/resourcefileconfig.cpp \
170 plugins/dir/resourcedir.cpp \ 172 plugins/dir/resourcedir.cpp \
171 plugins/dir/resourcedirconfig.cpp \ 173 plugins/dir/resourcedirconfig.cpp \
172 vcardparser/vcardline.cpp \ 174 vcardparser/vcardline.cpp \
173 vcardparser/vcard.cpp \ 175 vcardparser/vcard.cpp \
174 vcardparser/vcardtool.cpp \ 176 vcardparser/vcardtool.cpp \
175 vcardparser/vcardparser.cpp \ 177 vcardparser/vcardparser.cpp \
176vcard/AdrParam.cpp \ 178vcard/AdrParam.cpp \
177vcard/AdrValue.cpp \ 179vcard/AdrValue.cpp \
178vcard/AgentParam.cpp \ 180vcard/AgentParam.cpp \
179vcard/ContentLine.cpp \ 181vcard/ContentLine.cpp \
180vcard/DateParam.cpp \ 182vcard/DateParam.cpp \
181vcard/DateValue.cpp \ 183vcard/DateValue.cpp \
182vcard/EmailParam.cpp \ 184vcard/EmailParam.cpp \
183vcard/Entity.cpp \ 185vcard/Entity.cpp \
184vcard/Enum.cpp \ 186vcard/Enum.cpp \
185vcard/GeoValue.cpp \ 187vcard/GeoValue.cpp \
186vcard/ImageParam.cpp \ 188vcard/ImageParam.cpp \
187vcard/ImageValue.cpp \ 189vcard/ImageValue.cpp \
188vcard/LangValue.cpp \ 190vcard/LangValue.cpp \
189vcard/NValue.cpp \ 191vcard/NValue.cpp \
190vcard/Param.cpp \ 192vcard/Param.cpp \
191vcard/PhoneNumberValue.cpp \ 193vcard/PhoneNumberValue.cpp \
192vcard/RToken.cpp \ 194vcard/RToken.cpp \
193vcard/SourceParam.cpp \ 195vcard/SourceParam.cpp \
194vcard/TelParam.cpp \ 196vcard/TelParam.cpp \
195vcard/TextParam.cpp \ 197vcard/TextParam.cpp \
196vcard/TextValue.cpp \ 198vcard/TextValue.cpp \
197vcard/TextBinParam.cpp \ 199vcard/TextBinParam.cpp \
198vcard/URIValue.cpp \ 200vcard/URIValue.cpp \
199vcard/VCardv.cpp \ 201vcard/VCardv.cpp \
200vcard/VCardEntity.cpp \ 202vcard/VCardEntity.cpp \
201vcard/Value.cpp \ 203vcard/Value.cpp \
202vcard/SoundValue.cpp \ 204vcard/SoundValue.cpp \
203vcard/AgentValue.cpp \ 205vcard/AgentValue.cpp \
204vcard/TelValue.cpp \ 206vcard/TelValue.cpp \
205vcard/TextBinValue.cpp \ 207vcard/TextBinValue.cpp \
206vcard/OrgValue.cpp \ 208vcard/OrgValue.cpp \
207vcard/UTCValue.cpp \ 209vcard/UTCValue.cpp \
208vcard/ClassValue.cpp \ 210vcard/ClassValue.cpp \
209vcard/FloatValue.cpp \ 211vcard/FloatValue.cpp \
210vcard/TextListValue.cpp 212vcard/TextListValue.cpp
211 213
212 214
213# plugins/ldap/resourceldap.cpp \ 215# plugins/ldap/resourceldap.cpp \
214# plugins/ldap/resourceldapconfig.cpp \ 216# plugins/ldap/resourceldapconfig.cpp \
215 217
216#formats/binary/binaryformat.cpp \ 218#formats/binary/binaryformat.cpp \
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 1667400..4303cab 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -1,1886 +1,1886 @@
1/* 1/*
2 This file is part of KAddressbook. 2 This file is part of KAddressbook.
3 Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> 3 Copyright (c) 2003 Tobias Koenig <tokoe@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 "kabcore.h" 24#include "kabcore.h"
25 25
26#include <stdaddressbook.h> 26#include <stdaddressbook.h>
27#include <klocale.h> 27#include <klocale.h>
28 28
29#ifndef KAB_EMBEDDED 29#ifndef KAB_EMBEDDED
30#include <qclipboard.h> 30#include <qclipboard.h>
31#include <qdir.h> 31#include <qdir.h>
32#include <qfile.h> 32#include <qfile.h>
33#include <qapplicaton.h> 33#include <qapplicaton.h>
34#include <qlayout.h> 34#include <qlayout.h>
35#include <qregexp.h> 35#include <qregexp.h>
36#include <qvbox.h> 36#include <qvbox.h>
37#include <kabc/addresseelist.h> 37#include <kabc/addresseelist.h>
38#include <kabc/errorhandler.h> 38#include <kabc/errorhandler.h>
39#include <kabc/resource.h> 39#include <kabc/resource.h>
40#include <kabc/vcardconverter.h> 40#include <kabc/vcardconverter.h>
41#include <kapplication.h> 41#include <kapplication.h>
42#include <kactionclasses.h> 42#include <kactionclasses.h>
43#include <kcmultidialog.h> 43#include <kcmultidialog.h>
44#include <kdebug.h> 44#include <kdebug.h>
45#include <kdeversion.h> 45#include <kdeversion.h>
46#include <kkeydialog.h> 46#include <kkeydialog.h>
47#include <kmessagebox.h> 47#include <kmessagebox.h>
48#include <kprinter.h> 48#include <kprinter.h>
49#include <kprotocolinfo.h> 49#include <kprotocolinfo.h>
50#include <kresources/selectdialog.h> 50#include <kresources/selectdialog.h>
51#include <kstandarddirs.h> 51#include <kstandarddirs.h>
52#include <ktempfile.h> 52#include <ktempfile.h>
53#include <kxmlguiclient.h> 53#include <kxmlguiclient.h>
54#include <kaboutdata.h> 54#include <kaboutdata.h>
55#include <libkdepim/categoryselectdialog.h> 55#include <libkdepim/categoryselectdialog.h>
56 56
57#include "addresseeutil.h" 57#include "addresseeutil.h"
58#include "addresseeeditordialog.h" 58#include "addresseeeditordialog.h"
59#include "extensionmanager.h" 59#include "extensionmanager.h"
60#include "kstdaction.h" 60#include "kstdaction.h"
61#include "kaddressbookservice.h" 61#include "kaddressbookservice.h"
62#include "ldapsearchdialog.h" 62#include "ldapsearchdialog.h"
63#include "printing/printingwizard.h" 63#include "printing/printingwizard.h"
64#else // KAB_EMBEDDED 64#else // KAB_EMBEDDED
65 65
66#include <kapplication.h> 66#include <kapplication.h>
67#include "KDGanttMinimizeSplitter.h" 67#include "KDGanttMinimizeSplitter.h"
68#include "kaddressbookmain.h" 68#include "kaddressbookmain.h"
69#include "kactioncollection.h" 69#include "kactioncollection.h"
70#include <qapp.h> 70#include <qapp.h>
71#include <qmenubar.h> 71#include <qmenubar.h>
72//#include <qtoolbar.h> 72//#include <qtoolbar.h>
73#include <qmessagebox.h> 73#include <qmessagebox.h>
74#include <kdebug.h> 74#include <kdebug.h>
75#include <kiconloader.h> // needed for SmallIcon 75#include <kiconloader.h> // needed for SmallIcon
76#include <kresources/kcmkresources.h> 76#include <kresources/kcmkresources.h>
77#include <ktoolbar.h> 77#include <ktoolbar.h>
78 78
79 79
80//#include <qlabel.h> 80//#include <qlabel.h>
81 81
82 82
83#ifdef Q_WS_QWS 83#ifndef DESKTOP_VERSION
84#include <qtopia/services.h> 84#include <qtopia/services.h>
85#include <qtopia/qcopenvelope_qws.h> 85#include <qtopia/qcopenvelope_qws.h>
86#endif
87#include <qpe/ir.h> 86#include <qpe/ir.h>
87#endif
88 88
89#endif // KAB_EMBEDDED 89#endif // KAB_EMBEDDED
90#include "kcmconfigs/kcmkabconfig.h" 90#include "kcmconfigs/kcmkabconfig.h"
91#include "kcmconfigs/kcmkdepimconfig.h" 91#include "kcmconfigs/kcmkdepimconfig.h"
92 92
93 93
94#include <kresources/selectdialog.h> 94#include <kresources/selectdialog.h>
95#include <kmessagebox.h> 95#include <kmessagebox.h>
96 96
97#include <picture.h> 97#include <picture.h>
98#include <resource.h> 98#include <resource.h>
99 99
100//US#include <qsplitter.h> 100//US#include <qsplitter.h>
101#include <qmap.h> 101#include <qmap.h>
102#include <qdir.h> 102#include <qdir.h>
103#include <qfile.h> 103#include <qfile.h>
104#include <qvbox.h> 104#include <qvbox.h>
105#include <qlayout.h> 105#include <qlayout.h>
106#include <qclipboard.h> 106#include <qclipboard.h>
107#include <qtextstream.h> 107#include <qtextstream.h>
108 108
109#include <libkdepim/categoryselectdialog.h> 109#include <libkdepim/categoryselectdialog.h>
110#include <kabc/vcardconverter.h> 110#include <kabc/vcardconverter.h>
111 111
112 112
113#include "addresseeutil.h" 113#include "addresseeutil.h"
114#include "undocmds.h" 114#include "undocmds.h"
115#include "addresseeeditordialog.h" 115#include "addresseeeditordialog.h"
116#include "viewmanager.h" 116#include "viewmanager.h"
117#include "details/detailsviewcontainer.h" 117#include "details/detailsviewcontainer.h"
118#include "kabprefs.h" 118#include "kabprefs.h"
119#include "xxportmanager.h" 119#include "xxportmanager.h"
120#include "incsearchwidget.h" 120#include "incsearchwidget.h"
121#include "jumpbuttonbar.h" 121#include "jumpbuttonbar.h"
122#include "extensionmanager.h" 122#include "extensionmanager.h"
123#include "addresseeconfig.h" 123#include "addresseeconfig.h"
124#include <kcmultidialog.h> 124#include <kcmultidialog.h>
125 125
126#ifdef _WIN32_ 126#ifdef _WIN32_
127 127
128#include "kaimportoldialog.h" 128#include "kaimportoldialog.h"
129#endif 129#endif
130 130
131bool pasteWithNewUid = true; 131bool pasteWithNewUid = true;
132 132
133#ifdef KAB_EMBEDDED 133#ifdef KAB_EMBEDDED
134KABCore::KABCore( KAddressBookMain *client, bool readWrite, QWidget *parent, const char *name ) 134KABCore::KABCore( KAddressBookMain *client, bool readWrite, QWidget *parent, const char *name )
135 : QWidget( parent, name ), mGUIClient( client ), mViewManager( 0 ), 135 : QWidget( parent, name ), mGUIClient( client ), mViewManager( 0 ),
136 mExtensionManager( 0 ),mConfigureDialog( 0 ),/*US mLdapSearchDialog( 0 ),*/ 136 mExtensionManager( 0 ),mConfigureDialog( 0 ),/*US mLdapSearchDialog( 0 ),*/
137 mReadWrite( readWrite ), mModified( false ), mMainWindow(client) 137 mReadWrite( readWrite ), mModified( false ), mMainWindow(client)
138#else //KAB_EMBEDDED 138#else //KAB_EMBEDDED
139KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const char *name ) 139KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const char *name )
140 : QWidget( parent, name ), mGUIClient( client ), mViewManager( 0 ), 140 : QWidget( parent, name ), mGUIClient( client ), mViewManager( 0 ),
141 mExtensionManager( 0 ), mConfigureDialog( 0 ), mLdapSearchDialog( 0 ), 141 mExtensionManager( 0 ), mConfigureDialog( 0 ), mLdapSearchDialog( 0 ),
142 mReadWrite( readWrite ), mModified( false ) 142 mReadWrite( readWrite ), mModified( false )
143#endif //KAB_EMBEDDED 143#endif //KAB_EMBEDDED
144{ 144{
145 145
146 mExtensionBarSplitter = 0; 146 mExtensionBarSplitter = 0;
147 mIsPart = !parent->inherits( "KAddressBookMain" ); 147 mIsPart = !parent->inherits( "KAddressBookMain" );
148 148
149 mAddressBook = KABC::StdAddressBook::self(); 149 mAddressBook = KABC::StdAddressBook::self();
150 KABC::StdAddressBook::setAutomaticSave( false ); 150 KABC::StdAddressBook::setAutomaticSave( false );
151 151
152#ifndef KAB_EMBEDDED 152#ifndef KAB_EMBEDDED
153 mAddressBook->setErrorHandler( new KABC::GUIErrorHandler ); 153 mAddressBook->setErrorHandler( new KABC::GUIErrorHandler );
154#endif //KAB_EMBEDDED 154#endif //KAB_EMBEDDED
155 155
156 connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook * ) ), 156 connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook * ) ),
157 SLOT( addressBookChanged() ) ); 157 SLOT( addressBookChanged() ) );
158 158
159 mAddressBook->addCustomField( i18n( "Department" ), KABC::Field::Organization, 159 mAddressBook->addCustomField( i18n( "Department" ), KABC::Field::Organization,
160 "X-Department", "KADDRESSBOOK" ); 160 "X-Department", "KADDRESSBOOK" );
161 mAddressBook->addCustomField( i18n( "Profession" ), KABC::Field::Organization, 161 mAddressBook->addCustomField( i18n( "Profession" ), KABC::Field::Organization,
162 "X-Profession", "KADDRESSBOOK" ); 162 "X-Profession", "KADDRESSBOOK" );
163 mAddressBook->addCustomField( i18n( "Assistant's Name" ), KABC::Field::Organization, 163 mAddressBook->addCustomField( i18n( "Assistant's Name" ), KABC::Field::Organization,
164 "X-AssistantsName", "KADDRESSBOOK" ); 164 "X-AssistantsName", "KADDRESSBOOK" );
165 mAddressBook->addCustomField( i18n( "Manager's Name" ), KABC::Field::Organization, 165 mAddressBook->addCustomField( i18n( "Manager's Name" ), KABC::Field::Organization,
166 "X-ManagersName", "KADDRESSBOOK" ); 166 "X-ManagersName", "KADDRESSBOOK" );
167 mAddressBook->addCustomField( i18n( "Spouse's Name" ), KABC::Field::Personal, 167 mAddressBook->addCustomField( i18n( "Spouse's Name" ), KABC::Field::Personal,
168 "X-SpousesName", "KADDRESSBOOK" ); 168 "X-SpousesName", "KADDRESSBOOK" );
169 mAddressBook->addCustomField( i18n( "Office" ), KABC::Field::Personal, 169 mAddressBook->addCustomField( i18n( "Office" ), KABC::Field::Personal,
170 "X-Office", "KADDRESSBOOK" ); 170 "X-Office", "KADDRESSBOOK" );
171 mAddressBook->addCustomField( i18n( "IM Address" ), KABC::Field::Personal, 171 mAddressBook->addCustomField( i18n( "IM Address" ), KABC::Field::Personal,
172 "X-IMAddress", "KADDRESSBOOK" ); 172 "X-IMAddress", "KADDRESSBOOK" );
173 mAddressBook->addCustomField( i18n( "Anniversary" ), KABC::Field::Personal, 173 mAddressBook->addCustomField( i18n( "Anniversary" ), KABC::Field::Personal,
174 "X-Anniversary", "KADDRESSBOOK" ); 174 "X-Anniversary", "KADDRESSBOOK" );
175 175
176 //US added this field to become compatible with Opie/qtopia addressbook 176 //US added this field to become compatible with Opie/qtopia addressbook
177 // values can be "female" or "male" or "". An empty field represents undefined. 177 // values can be "female" or "male" or "". An empty field represents undefined.
178 mAddressBook->addCustomField( i18n( "Gender" ), KABC::Field::Personal, 178 mAddressBook->addCustomField( i18n( "Gender" ), KABC::Field::Personal,
179 "X-Gender", "KADDRESSBOOK" ); 179 "X-Gender", "KADDRESSBOOK" );
180 mAddressBook->addCustomField( i18n( "Children" ), KABC::Field::Personal, 180 mAddressBook->addCustomField( i18n( "Children" ), KABC::Field::Personal,
181 "X-Children", "KADDRESSBOOK" ); 181 "X-Children", "KADDRESSBOOK" );
182 mAddressBook->addCustomField( i18n( "FreeBusyUrl" ), KABC::Field::Personal, 182 mAddressBook->addCustomField( i18n( "FreeBusyUrl" ), KABC::Field::Personal,
183 "X-FreeBusyUrl", "KADDRESSBOOK" ); 183 "X-FreeBusyUrl", "KADDRESSBOOK" );
184 184
185 initGUI(); 185 initGUI();
186 186
187 mIncSearchWidget->setFocus(); 187 mIncSearchWidget->setFocus();
188 188
189 189
190 connect( mViewManager, SIGNAL( selected( const QString& ) ), 190 connect( mViewManager, SIGNAL( selected( const QString& ) ),
191 SLOT( setContactSelected( const QString& ) ) ); 191 SLOT( setContactSelected( const QString& ) ) );
192 connect( mViewManager, SIGNAL( executed( const QString& ) ), 192 connect( mViewManager, SIGNAL( executed( const QString& ) ),
193 SLOT( editContact( const QString& ) ) ); 193 SLOT( editContact( const QString& ) ) );
194 connect( mViewManager, SIGNAL( deleteRequest( ) ), 194 connect( mViewManager, SIGNAL( deleteRequest( ) ),
195 SLOT( deleteContacts( ) ) ); 195 SLOT( deleteContacts( ) ) );
196 connect( mViewManager, SIGNAL( modified() ), 196 connect( mViewManager, SIGNAL( modified() ),
197 SLOT( setModified() ) ); 197 SLOT( setModified() ) );
198 198
199 connect( mExtensionManager, SIGNAL( modified( const KABC::Addressee::List& ) ), this, SLOT( extensionModified( const KABC::Addressee::List& ) ) ); 199 connect( mExtensionManager, SIGNAL( modified( const KABC::Addressee::List& ) ), this, SLOT( extensionModified( const KABC::Addressee::List& ) ) );
200 200
201 connect( mXXPortManager, SIGNAL( modified() ), 201 connect( mXXPortManager, SIGNAL( modified() ),
202 SLOT( setModified() ) ); 202 SLOT( setModified() ) );
203 203
204 connect( mJumpButtonBar, SIGNAL( jumpToLetter( const QString& ) ), 204 connect( mJumpButtonBar, SIGNAL( jumpToLetter( const QString& ) ),
205 SLOT( incrementalSearch( const QString& ) ) ); 205 SLOT( incrementalSearch( const QString& ) ) );
206 connect( mIncSearchWidget, SIGNAL( fieldChanged() ), 206 connect( mIncSearchWidget, SIGNAL( fieldChanged() ),
207 mJumpButtonBar, SLOT( recreateButtons() ) ); 207 mJumpButtonBar, SLOT( recreateButtons() ) );
208 208
209 connect( mDetails, SIGNAL( sendEmail( const QString& ) ), 209 connect( mDetails, SIGNAL( sendEmail( const QString& ) ),
210 SLOT( sendMail( const QString& ) ) ); 210 SLOT( sendMail( const QString& ) ) );
211 211
212#ifndef KAB_EMBEDDED 212#ifndef KAB_EMBEDDED
213 connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ), 213 connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ),
214 mXXPortManager, SLOT( importVCard( const KURL& ) ) ); 214 mXXPortManager, SLOT( importVCard( const KURL& ) ) );
215 215
216 connect( mDetails, SIGNAL( browse( const QString& ) ), 216 connect( mDetails, SIGNAL( browse( const QString& ) ),
217 SLOT( browse( const QString& ) ) ); 217 SLOT( browse( const QString& ) ) );
218 218
219 mAddressBookService = new KAddressBookService( this ); 219 mAddressBookService = new KAddressBookService( this );
220 220
221#endif //KAB_EMBEDDED 221#endif //KAB_EMBEDDED
222 mEditorDialog = 0; 222 mEditorDialog = 0;
223 createAddresseeEditorDialog( this ); 223 createAddresseeEditorDialog( this );
224 setModified( false ); 224 setModified( false );
225} 225}
226 226
227KABCore::~KABCore() 227KABCore::~KABCore()
228{ 228{
229 // save(); 229 // save();
230 //saveSettings(); 230 //saveSettings();
231 //KABPrefs::instance()->writeConfig(); 231 //KABPrefs::instance()->writeConfig();
232 delete AddresseeConfig::instance(); 232 delete AddresseeConfig::instance();
233 mAddressBook = 0; 233 mAddressBook = 0;
234 KABC::StdAddressBook::close(); 234 KABC::StdAddressBook::close();
235} 235}
236 236
237void KABCore::restoreSettings() 237void KABCore::restoreSettings()
238{ 238{
239 bool state = KABPrefs::instance()->mJumpButtonBarVisible; 239 bool state = KABPrefs::instance()->mJumpButtonBarVisible;
240 240
241 mActionJumpBar->setChecked( state ); 241 mActionJumpBar->setChecked( state );
242 setJumpButtonBarVisible( state ); 242 setJumpButtonBarVisible( state );
243 243
244 state = KABPrefs::instance()->mDetailsPageVisible; 244 state = KABPrefs::instance()->mDetailsPageVisible;
245 245
246 mActionDetails->setChecked( state ); 246 mActionDetails->setChecked( state );
247 setDetailsVisible( state ); 247 setDetailsVisible( state );
248 QValueList<int> splitterSize = KABPrefs::instance()->mDetailsSplitter; 248 QValueList<int> splitterSize = KABPrefs::instance()->mDetailsSplitter;
249 if ( splitterSize.count() == 0 ) { 249 if ( splitterSize.count() == 0 ) {
250 splitterSize.append( width() / 2 ); 250 splitterSize.append( width() / 2 );
251 splitterSize.append( width() / 2 ); 251 splitterSize.append( width() / 2 );
252 } 252 }
253 mMiniSplitter->setSizes( splitterSize ); 253 mMiniSplitter->setSizes( splitterSize );
254 if ( mExtensionBarSplitter ) { 254 if ( mExtensionBarSplitter ) {
255 splitterSize = KABPrefs::instance()->mExtensionsSplitter; 255 splitterSize = KABPrefs::instance()->mExtensionsSplitter;
256 if ( splitterSize.count() == 0 ) { 256 if ( splitterSize.count() == 0 ) {
257 splitterSize.append( width() / 2 ); 257 splitterSize.append( width() / 2 );
258 splitterSize.append( width() / 2 ); 258 splitterSize.append( width() / 2 );
259 } 259 }
260 mExtensionBarSplitter->setSizes( splitterSize ); 260 mExtensionBarSplitter->setSizes( splitterSize );
261 261
262 } 262 }
263#ifndef KAB_EMBEDDED 263#ifndef KAB_EMBEDDED
264 QValueList<int> splitterSize = KABPrefs::instance()->mExtensionsSplitter; 264 QValueList<int> splitterSize = KABPrefs::instance()->mExtensionsSplitter;
265 if ( splitterSize.count() == 0 ) { 265 if ( splitterSize.count() == 0 ) {
266 splitterSize.append( width() / 2 ); 266 splitterSize.append( width() / 2 );
267 splitterSize.append( width() / 2 ); 267 splitterSize.append( width() / 2 );
268 } 268 }
269 mExtensionBarSplitter->setSizes( splitterSize ); 269 mExtensionBarSplitter->setSizes( splitterSize );
270 270
271 splitterSize = KABPrefs::instance()->mDetailsSplitter; 271 splitterSize = KABPrefs::instance()->mDetailsSplitter;
272 if ( splitterSize.count() == 0 ) { 272 if ( splitterSize.count() == 0 ) {
273 splitterSize.append( height() / 2 ); 273 splitterSize.append( height() / 2 );
274 splitterSize.append( height() / 2 ); 274 splitterSize.append( height() / 2 );
275 } 275 }
276 mDetailsSplitter->setSizes( splitterSize ); 276 mDetailsSplitter->setSizes( splitterSize );
277 277
278 mExtensionManager->restoreSettings(); 278 mExtensionManager->restoreSettings();
279 279
280#endif //KAB_EMBEDDED 280#endif //KAB_EMBEDDED
281 281
282 mIncSearchWidget->setCurrentItem( KABPrefs::instance()->mCurrentIncSearchField ); 282 mIncSearchWidget->setCurrentItem( KABPrefs::instance()->mCurrentIncSearchField );
283 283
284 mViewManager->restoreSettings(); 284 mViewManager->restoreSettings();
285 mExtensionManager->restoreSettings(); 285 mExtensionManager->restoreSettings();
286} 286}
287 287
288void KABCore::saveSettings() 288void KABCore::saveSettings()
289{ 289{
290 KABPrefs::instance()->mJumpButtonBarVisible = mActionJumpBar->isChecked(); 290 KABPrefs::instance()->mJumpButtonBarVisible = mActionJumpBar->isChecked();
291 if ( mExtensionBarSplitter ) 291 if ( mExtensionBarSplitter )
292 KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes(); 292 KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes();
293 KABPrefs::instance()->mDetailsPageVisible = mActionDetails->isChecked(); 293 KABPrefs::instance()->mDetailsPageVisible = mActionDetails->isChecked();
294 KABPrefs::instance()->mDetailsSplitter = mMiniSplitter->sizes(); 294 KABPrefs::instance()->mDetailsSplitter = mMiniSplitter->sizes();
295#ifndef KAB_EMBEDDED 295#ifndef KAB_EMBEDDED
296 296
297 KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes(); 297 KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes();
298 KABPrefs::instance()->mDetailsSplitter = mDetailsSplitter->sizes(); 298 KABPrefs::instance()->mDetailsSplitter = mDetailsSplitter->sizes();
299#endif //KAB_EMBEDDED 299#endif //KAB_EMBEDDED
300 mExtensionManager->saveSettings(); 300 mExtensionManager->saveSettings();
301 mViewManager->saveSettings(); 301 mViewManager->saveSettings();
302 302
303 KABPrefs::instance()->mCurrentIncSearchField = mIncSearchWidget->currentItem(); 303 KABPrefs::instance()->mCurrentIncSearchField = mIncSearchWidget->currentItem();
304 304
305} 305}
306 306
307KABC::AddressBook *KABCore::addressBook() const 307KABC::AddressBook *KABCore::addressBook() const
308{ 308{
309 return mAddressBook; 309 return mAddressBook;
310} 310}
311 311
312KConfig *KABCore::config() 312KConfig *KABCore::config()
313{ 313{
314#ifndef KAB_EMBEDDED 314#ifndef KAB_EMBEDDED
315 return KABPrefs::instance()->config(); 315 return KABPrefs::instance()->config();
316#else //KAB_EMBEDDED 316#else //KAB_EMBEDDED
317 return KABPrefs::instance()->getConfig(); 317 return KABPrefs::instance()->getConfig();
318#endif //KAB_EMBEDDED 318#endif //KAB_EMBEDDED
319} 319}
320 320
321KActionCollection *KABCore::actionCollection() const 321KActionCollection *KABCore::actionCollection() const
322{ 322{
323 return mGUIClient->actionCollection(); 323 return mGUIClient->actionCollection();
324} 324}
325 325
326KABC::Field *KABCore::currentSearchField() const 326KABC::Field *KABCore::currentSearchField() const
327{ 327{
328 if (mIncSearchWidget) 328 if (mIncSearchWidget)
329 return mIncSearchWidget->currentField(); 329 return mIncSearchWidget->currentField();
330 else 330 else
331 return 0; 331 return 0;
332} 332}
333 333
334QStringList KABCore::selectedUIDs() const 334QStringList KABCore::selectedUIDs() const
335{ 335{
336 return mViewManager->selectedUids(); 336 return mViewManager->selectedUids();
337} 337}
338 338
339KABC::Resource *KABCore::requestResource( QWidget *parent ) 339KABC::Resource *KABCore::requestResource( QWidget *parent )
340{ 340{
341 QPtrList<KABC::Resource> kabcResources = addressBook()->resources(); 341 QPtrList<KABC::Resource> kabcResources = addressBook()->resources();
342 342
343 QPtrList<KRES::Resource> kresResources; 343 QPtrList<KRES::Resource> kresResources;
344 QPtrListIterator<KABC::Resource> resIt( kabcResources ); 344 QPtrListIterator<KABC::Resource> resIt( kabcResources );
345 KABC::Resource *resource; 345 KABC::Resource *resource;
346 while ( ( resource = resIt.current() ) != 0 ) { 346 while ( ( resource = resIt.current() ) != 0 ) {
347 ++resIt; 347 ++resIt;
348 if ( !resource->readOnly() ) { 348 if ( !resource->readOnly() ) {
349 KRES::Resource *res = static_cast<KRES::Resource*>( resource ); 349 KRES::Resource *res = static_cast<KRES::Resource*>( resource );
350 if ( res ) 350 if ( res )
351 kresResources.append( res ); 351 kresResources.append( res );
352 } 352 }
353 } 353 }
354 354
355 KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, parent ); 355 KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, parent );
356 return static_cast<KABC::Resource*>( res ); 356 return static_cast<KABC::Resource*>( res );
357} 357}
358 358
359#ifndef KAB_EMBEDDED 359#ifndef KAB_EMBEDDED
360KAboutData *KABCore::createAboutData() 360KAboutData *KABCore::createAboutData()
361#else //KAB_EMBEDDED 361#else //KAB_EMBEDDED
362void KABCore::createAboutData() 362void KABCore::createAboutData()
363#endif //KAB_EMBEDDED 363#endif //KAB_EMBEDDED
364{ 364{
365#ifndef KAB_EMBEDDED 365#ifndef KAB_EMBEDDED
366 KAboutData *about = new KAboutData( "kaddressbook", I18N_NOOP( "KAddressBook" ), 366 KAboutData *about = new KAboutData( "kaddressbook", I18N_NOOP( "KAddressBook" ),
367 "3.1", I18N_NOOP( "The KDE Address Book" ), 367 "3.1", I18N_NOOP( "The KDE Address Book" ),
368 KAboutData::License_GPL_V2, 368 KAboutData::License_GPL_V2,
369 I18N_NOOP( "(c) 1997-2003, The KDE PIM Team" ) ); 369 I18N_NOOP( "(c) 1997-2003, The KDE PIM Team" ) );
370 about->addAuthor( "Tobias Koenig", I18N_NOOP( "Current maintainer " ), "tokoe@kde.org" ); 370 about->addAuthor( "Tobias Koenig", I18N_NOOP( "Current maintainer " ), "tokoe@kde.org" );
371 about->addAuthor( "Don Sanders", I18N_NOOP( "Original author " ) ); 371 about->addAuthor( "Don Sanders", I18N_NOOP( "Original author " ) );
372 about->addAuthor( "Cornelius Schumacher", 372 about->addAuthor( "Cornelius Schumacher",
373 I18N_NOOP( "Co-maintainer, libkabc port, CSV import/export " ), 373 I18N_NOOP( "Co-maintainer, libkabc port, CSV import/export " ),
374 "schumacher@kde.org" ); 374 "schumacher@kde.org" );
375 about->addAuthor( "Mike Pilone", I18N_NOOP( "GUI and framework redesign " ), 375 about->addAuthor( "Mike Pilone", I18N_NOOP( "GUI and framework redesign " ),
376 "mpilone@slac.com" ); 376 "mpilone@slac.com" );
377 about->addAuthor( "Greg Stern", I18N_NOOP( "DCOP interface" ) ); 377 about->addAuthor( "Greg Stern", I18N_NOOP( "DCOP interface" ) );
378 about->addAuthor( "Mark Westcott", I18N_NOOP( "Contact pinning" ) ); 378 about->addAuthor( "Mark Westcott", I18N_NOOP( "Contact pinning" ) );
379 about->addAuthor( "Michel Boyer de la Giroday", I18N_NOOP( "LDAP Lookup\n" ), 379 about->addAuthor( "Michel Boyer de la Giroday", I18N_NOOP( "LDAP Lookup\n" ),
380 "michel@klaralvdalens-datakonsult.se" ); 380 "michel@klaralvdalens-datakonsult.se" );
381 about->addAuthor( "Steffen Hansen", I18N_NOOP( "LDAP Lookup " ), 381 about->addAuthor( "Steffen Hansen", I18N_NOOP( "LDAP Lookup " ),
382 "hansen@kde.org" ); 382 "hansen@kde.org" );
383 383
384 return about; 384 return about;
385#endif //KAB_EMBEDDED 385#endif //KAB_EMBEDDED
386 386
387 QString version; 387 QString version;
388#include <../version> 388#include <../version>
389 QMessageBox::about( this, "About KAddressbook/Pi", 389 QMessageBox::about( this, "About KAddressbook/Pi",
390 "KAddressbook/Platform-independent\n" 390 "KAddressbook/Platform-independent\n"
391 "(KA/Pi) " +version + " - " + 391 "(KA/Pi) " +version + " - " +
392#ifdef DESKTOP_VERSION 392#ifdef DESKTOP_VERSION
393 "Desktop Edition\n" 393 "Desktop Edition\n"
394#else 394#else
395 "PDA-Edition\n" 395 "PDA-Edition\n"
396 "for: Zaurus 5500 / 7x0 / 8x0\n" 396 "for: Zaurus 5500 / 7x0 / 8x0\n"
397#endif 397#endif
398 398
399 "(c) 2004 Ulf Schenk\n" 399 "(c) 2004 Ulf Schenk\n"
400 "(c) 1997-2003, The KDE PIM Team\n" 400 "(c) 1997-2003, The KDE PIM Team\n"
401 "Tobias Koenig Current maintainer tokoe@kde.org\n" 401 "Tobias Koenig Current maintainer tokoe@kde.org\n"
402 "Don Sanders Original author\n" 402 "Don Sanders Original author\n"
403 "Cornelius Schumacher Co-maintainer schumacher@kde.org\n" 403 "Cornelius Schumacher Co-maintainer schumacher@kde.org\n"
404 "Mike Pilone GUI and framework redesign mpilone@slac.com\n" 404 "Mike Pilone GUI and framework redesign mpilone@slac.com\n"
405 "Greg Stern DCOP interface\n" 405 "Greg Stern DCOP interface\n"
406 "Mark Westcot Contact pinning\n" 406 "Mark Westcot Contact pinning\n"
407 "Michel Boyer de la Giroday LDAP Lookup\n" "michel@klaralvdalens-datakonsult.se\n" 407 "Michel Boyer de la Giroday LDAP Lookup\n" "michel@klaralvdalens-datakonsult.se\n"
408 "Steffen Hansen LDAP Lookup hansen@kde.org\n" 408 "Steffen Hansen LDAP Lookup hansen@kde.org\n"
409#ifdef _WIN32_ 409#ifdef _WIN32_
410 "(c) 2004 Lutz Rogowski Import from OL rogowski@kde.org\n" 410 "(c) 2004 Lutz Rogowski Import from OL rogowski@kde.org\n"
411#endif 411#endif
412 ); 412 );
413} 413}
414 414
415void KABCore::setContactSelected( const QString &uid ) 415void KABCore::setContactSelected( const QString &uid )
416{ 416{
417 KABC::Addressee addr = mAddressBook->findByUid( uid ); 417 KABC::Addressee addr = mAddressBook->findByUid( uid );
418 if ( !mDetails->isHidden() ) 418 if ( !mDetails->isHidden() )
419 mDetails->setAddressee( addr ); 419 mDetails->setAddressee( addr );
420 420
421 if ( !addr.isEmpty() ) { 421 if ( !addr.isEmpty() ) {
422 emit contactSelected( addr.formattedName() ); 422 emit contactSelected( addr.formattedName() );
423 KABC::Picture pic = addr.photo(); 423 KABC::Picture pic = addr.photo();
424 if ( pic.isIntern() ) { 424 if ( pic.isIntern() ) {
425//US emit contactSelected( pic.data() ); 425//US emit contactSelected( pic.data() );
426//US instead use: 426//US instead use:
427 QPixmap px; 427 QPixmap px;
428 if (pic.data().isNull() != true) 428 if (pic.data().isNull() != true)
429 { 429 {
430 px.convertFromImage(pic.data()); 430 px.convertFromImage(pic.data());
431 } 431 }
432 432
433 emit contactSelected( px ); 433 emit contactSelected( px );
434 } 434 }
435 } 435 }
436 436
437 437
438 mExtensionManager->setSelectionChanged(); 438 mExtensionManager->setSelectionChanged();
439 439
440 // update the actions 440 // update the actions
441 bool selected = !uid.isEmpty(); 441 bool selected = !uid.isEmpty();
442 442
443 if ( mReadWrite ) { 443 if ( mReadWrite ) {
444 mActionCut->setEnabled( selected ); 444 mActionCut->setEnabled( selected );
445 mActionPaste->setEnabled( selected ); 445 mActionPaste->setEnabled( selected );
446 } 446 }
447 447
448 mActionCopy->setEnabled( selected ); 448 mActionCopy->setEnabled( selected );
449 mActionDelete->setEnabled( selected ); 449 mActionDelete->setEnabled( selected );
450 mActionEditAddressee->setEnabled( selected ); 450 mActionEditAddressee->setEnabled( selected );
451 mActionMail->setEnabled( selected ); 451 mActionMail->setEnabled( selected );
452 mActionMailVCard->setEnabled( selected ); 452 mActionMailVCard->setEnabled( selected );
453 //if (mActionBeam) 453 //if (mActionBeam)
454 //mActionBeam->setEnabled( selected ); 454 //mActionBeam->setEnabled( selected );
455 455
456 if (mActionBeamVCard) 456 if (mActionBeamVCard)
457 mActionBeamVCard->setEnabled( selected ); 457 mActionBeamVCard->setEnabled( selected );
458 458
459 mActionWhoAmI->setEnabled( selected ); 459 mActionWhoAmI->setEnabled( selected );
460 mActionCategories->setEnabled( selected ); 460 mActionCategories->setEnabled( selected );
461} 461}
462 462
463void KABCore::sendMail() 463void KABCore::sendMail()
464{ 464{
465 sendMail( mViewManager->selectedEmails().join( ", " ) ); 465 sendMail( mViewManager->selectedEmails().join( ", " ) );
466} 466}
467 467
468void KABCore::sendMail( const QString& email ) 468void KABCore::sendMail( const QString& email )
469{ 469{
470//US original kde implementation : kapp->invokeMailer( email, "" ); 470//US original kde implementation : kapp->invokeMailer( email, "" );
471 471
472/*US original qtopia implementation 472/*US original qtopia implementation
473 PimContact c = abList->currentEntry(); 473 PimContact c = abList->currentEntry();
474 QString name = c.fileAs(); 474 QString name = c.fileAs();
475 QString email = c.defaultEmail(); 475 QString email = c.defaultEmail();
476#ifndef QT_NO_COP 476#ifndef QT_NO_COP
477 QCopEnvelope e(Service::channel("Email"), "writeMail(QString,QString)"); 477 QCopEnvelope e(Service::channel("Email"), "writeMail(QString,QString)");
478 e << name << email; 478 e << name << email;
479#else 479#else
480*/ 480*/
481 481
482 482
483#ifndef QT_NO_COP 483#ifndef QT_NO_COP
484 QCString channel = KABPrefs::instance()->mEmailChannel.latin1(); 484 QCString channel = KABPrefs::instance()->mEmailChannel.latin1();
485 qDebug("Using QCopEnvelope e(\"" + channel + "\", \"writeMail(QMap(QString,QString))\")"); 485 qDebug("Using QCopEnvelope e(\"" + channel + "\", \"writeMail(QMap(QString,QString))\")");
486 486
487 QCopEnvelope e(channel, "writeMail(QString,QString)"); 487 QCopEnvelope e(channel, "writeMail(QString,QString)");
488 //US we need no names in the To field. The emailadresses are enough 488 //US we need no names in the To field. The emailadresses are enough
489 e << "" << email; 489 e << "" << email;
490#else 490#else
491 KMessageBox::sorry( this, i18n( "This version does not support sending emails." ) ); 491 KMessageBox::sorry( this, i18n( "This version does not support sending emails." ) );
492#endif 492#endif
493} 493}
494 494
495 495
496 496
497void KABCore::mailVCard() 497void KABCore::mailVCard()
498{ 498{
499 QStringList uids = mViewManager->selectedUids(); 499 QStringList uids = mViewManager->selectedUids();
500 if ( !uids.isEmpty() ) 500 if ( !uids.isEmpty() )
501 mailVCard( uids ); 501 mailVCard( uids );
502} 502}
503 503
504void KABCore::mailVCard( const QStringList& uids ) 504void KABCore::mailVCard( const QStringList& uids )
505{ 505{
506 QStringList urls; 506 QStringList urls;
507 507
508 QString tmpdir = locateLocal("tmp", KGlobal::getAppName()); 508 QString tmpdir = locateLocal("tmp", KGlobal::getAppName());
509 509
510/*US 510/*US
511 // Create a temp dir, so that we can put the files in it with proper names 511 // Create a temp dir, so that we can put the files in it with proper names
512 KTempFile tempDir; 512 KTempFile tempDir;
513 if ( tempDir.status() != 0 ) { 513 if ( tempDir.status() != 0 ) {
514 kdWarning() << strerror( tempDir.status() ) << endl; 514 kdWarning() << strerror( tempDir.status() ) << endl;
515 return; 515 return;
516 } 516 }
517 517
518 QString dirName = tempDir.name(); 518 QString dirName = tempDir.name();
519 tempDir.unlink(); 519 tempDir.unlink();
520*/ 520*/
521 QString dirName = tmpdir + "/" + KApplication::randomString( 8 ); 521 QString dirName = tmpdir + "/" + KApplication::randomString( 8 );
522 522
523 523
524 524
525 QDir().mkdir( dirName, true ); 525 QDir().mkdir( dirName, true );
526 526
527 for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) { 527 for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) {
528 KABC::Addressee a = mAddressBook->findByUid( *it ); 528 KABC::Addressee a = mAddressBook->findByUid( *it );
529 529
530 if ( a.isEmpty() ) 530 if ( a.isEmpty() )
531 continue; 531 continue;
532 532
533 QString name = a.givenName() + "_" + a.familyName() + ".vcf"; 533 QString name = a.givenName() + "_" + a.familyName() + ".vcf";
534 534
535 QString fileName = dirName + "/" + name; 535 QString fileName = dirName + "/" + name;
536 536
537 QFile outFile(fileName); 537 QFile outFile(fileName);
538 if ( outFile.open(IO_WriteOnly) ) { // file opened successfully 538 if ( outFile.open(IO_WriteOnly) ) { // file opened successfully
539 KABC::VCardConverter converter; 539 KABC::VCardConverter converter;
540 QString vcard; 540 QString vcard;
541 541
542 converter.addresseeToVCard( a, vcard ); 542 converter.addresseeToVCard( a, vcard );
543 543
544 QTextStream t( &outFile ); // use a text stream 544 QTextStream t( &outFile ); // use a text stream
545 t.setEncoding( QTextStream::UnicodeUTF8 ); 545 t.setEncoding( QTextStream::UnicodeUTF8 );
546 t << vcard; 546 t << vcard;
547 547
548 outFile.close(); 548 outFile.close();
549 549
550 urls.append( fileName ); 550 urls.append( fileName );
551 } 551 }
552 } 552 }
553/*US 553/*US
554 kapp->invokeMailer( QString::null, QString::null, QString::null, 554 kapp->invokeMailer( QString::null, QString::null, QString::null,
555 QString::null, // subject 555 QString::null, // subject
556 QString::null, // body 556 QString::null, // body
557 QString::null, 557 QString::null,
558 urls ); // attachments 558 urls ); // attachments
559*/ 559*/
560#ifndef QT_NO_COP 560#ifndef QT_NO_COP
561 QCString channel = KABPrefs::instance()->mEmailChannel.latin1(); 561 QCString channel = KABPrefs::instance()->mEmailChannel.latin1();
562 qDebug("Using QCopEnvelope e(\"" + channel + "\", \"writeMail(QMap(QString,QString))\")"); 562 qDebug("Using QCopEnvelope e(\"" + channel + "\", \"writeMail(QMap(QString,QString))\")");
563 563
564 QMap<QString, QString> parameterMap; 564 QMap<QString, QString> parameterMap;
565 parameterMap.insert("ATTACHMENT<n>", urls.join(", ")); 565 parameterMap.insert("ATTACHMENT<n>", urls.join(", "));
566 566
567 QCopEnvelope e(channel, "writeMail(QMap(QString,QString))"); 567 QCopEnvelope e(channel, "writeMail(QMap(QString,QString))");
568 e << parameterMap; 568 e << parameterMap;
569#else 569#else
570 KMessageBox::sorry( this, i18n( "This version does not support sending emails." ) ); 570 KMessageBox::sorry( this, i18n( "This version does not support sending emails." ) );
571#endif 571#endif
572 572
573 573
574} 574}
575 575
576/** 576/**
577 Beams the "WhoAmI contact. 577 Beams the "WhoAmI contact.
578*/ 578*/
579void KABCore::beamMySelf() 579void KABCore::beamMySelf()
580{ 580{
581 KABC::Addressee a = KABC::StdAddressBook::self()->whoAmI(); 581 KABC::Addressee a = KABC::StdAddressBook::self()->whoAmI();
582 if (!a.isEmpty()) 582 if (!a.isEmpty())
583 { 583 {
584 QStringList uids; 584 QStringList uids;
585 uids << a.uid(); 585 uids << a.uid();
586 586
587 beamVCard(uids); 587 beamVCard(uids);
588 } else { 588 } else {
589 KMessageBox::information( this, i18n( "Your personal contact is\nnot set! Please select it\nand set it with menu:\nSettings - Set Who Am I\n" ) ); 589 KMessageBox::information( this, i18n( "Your personal contact is\nnot set! Please select it\nand set it with menu:\nSettings - Set Who Am I\n" ) );
590 590
591 591
592 } 592 }
593} 593}
594 594
595void KABCore::beamVCard() 595void KABCore::beamVCard()
596{ 596{
597 QStringList uids = mViewManager->selectedUids(); 597 QStringList uids = mViewManager->selectedUids();
598 if ( !uids.isEmpty() ) 598 if ( !uids.isEmpty() )
599 beamVCard( uids ); 599 beamVCard( uids );
600} 600}
601 601
602 602
603void KABCore::beamVCard(const QStringList& uids) 603void KABCore::beamVCard(const QStringList& uids)
604{ 604{
605/*US 605/*US
606 QString beamFilename; 606 QString beamFilename;
607 Opie::OPimContact c; 607 Opie::OPimContact c;
608 if ( actionPersonal->isOn() ) { 608 if ( actionPersonal->isOn() ) {
609 beamFilename = addressbookPersonalVCardName(); 609 beamFilename = addressbookPersonalVCardName();
610 if ( !QFile::exists( beamFilename ) ) 610 if ( !QFile::exists( beamFilename ) )
611 return; // can't beam a non-existent file 611 return; // can't beam a non-existent file
612 Opie::OPimContactAccessBackend* vcard_backend = new Opie::OPimContactAccessBackend_VCard( QString::null, 612 Opie::OPimContactAccessBackend* vcard_backend = new Opie::OPimContactAccessBackend_VCard( QString::null,
613 beamFilename ); 613 beamFilename );
614 Opie::OPimContactAccess* access = new Opie::OPimContactAccess ( "addressbook", QString::null , vcard_backend, true ); 614 Opie::OPimContactAccess* access = new Opie::OPimContactAccess ( "addressbook", QString::null , vcard_backend, true );
615 Opie::OPimContactAccess::List allList = access->allRecords(); 615 Opie::OPimContactAccess::List allList = access->allRecords();
616 Opie::OPimContactAccess::List::Iterator it = allList.begin(); // Just take first 616 Opie::OPimContactAccess::List::Iterator it = allList.begin(); // Just take first
617 c = *it; 617 c = *it;
618 618
619 delete access; 619 delete access;
620 } else { 620 } else {
621 unlink( beamfile ); // delete if exists 621 unlink( beamfile ); // delete if exists
622 mkdir("/tmp/obex/", 0755); 622 mkdir("/tmp/obex/", 0755);
623 c = m_abView -> currentEntry(); 623 c = m_abView -> currentEntry();
624 Opie::OPimContactAccessBackend* vcard_backend = new Opie::OPimContactAccessBackend_VCard( QString::null, 624 Opie::OPimContactAccessBackend* vcard_backend = new Opie::OPimContactAccessBackend_VCard( QString::null,
625 beamfile ); 625 beamfile );
626 Opie::OPimContactAccess* access = new Opie::OPimContactAccess ( "addressbook", QString::null , vcard_backend, true ); 626 Opie::OPimContactAccess* access = new Opie::OPimContactAccess ( "addressbook", QString::null , vcard_backend, true );
627 access->add( c ); 627 access->add( c );
628 access->save(); 628 access->save();
629 delete access; 629 delete access;
630 630
631 beamFilename = beamfile; 631 beamFilename = beamfile;
632 } 632 }
633 633
634 owarn << "Beaming: " << beamFilename << oendl; 634 owarn << "Beaming: " << beamFilename << oendl;
635*/ 635*/
636 636
637#if 0 637#if 0
638 QString tmpdir = locateLocal("tmp", KGlobal::getAppName()); 638 QString tmpdir = locateLocal("tmp", KGlobal::getAppName());
639 639
640 QString dirName = tmpdir + "/" + KApplication::randomString( 8 ); 640 QString dirName = tmpdir + "/" + KApplication::randomString( 8 );
641 641
642 QString name = "contact.vcf"; 642 QString name = "contact.vcf";
643 643
644 QString fileName = dirName + "/" + name; 644 QString fileName = dirName + "/" + name;
645#endif 645#endif
646 // LR: we should use the /tmp dir, because: /tmp = RAM, (HOME)/kdepim = flash memory 646 // LR: we should use the /tmp dir, because: /tmp = RAM, (HOME)/kdepim = flash memory
647 // 647 //
648 QString fileName = "/tmp/kdepimbeamfile"; 648 QString fileName = "/tmp/kdepimbeamfile";
649 649
650 650
651 //QDir().mkdir( dirName, true ); 651 //QDir().mkdir( dirName, true );
652 652
653 QFile outFile(fileName); 653 QFile outFile(fileName);
654 KABC::VCardConverter converter; 654 KABC::VCardConverter converter;
655 QString description; 655 QString description;
656 656
657 if ( outFile.open(IO_WriteOnly) ) { // file opened successfully 657 if ( outFile.open(IO_WriteOnly) ) { // file opened successfully
658 658
659 QTextStream t( &outFile ); // use a text stream 659 QTextStream t( &outFile ); // use a text stream
660 t.setEncoding( QTextStream::UnicodeUTF8 ); 660 t.setEncoding( QTextStream::UnicodeUTF8 );
661 661
662 for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) { 662 for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) {
663 KABC::Addressee a = mAddressBook->findByUid( *it ); 663 KABC::Addressee a = mAddressBook->findByUid( *it );
664 664
665 if ( a.isEmpty() ) 665 if ( a.isEmpty() )
666 continue; 666 continue;
667 667
668 if (description.isEmpty()) 668 if (description.isEmpty())
669 description = a.formattedName(); 669 description = a.formattedName();
670 670
671 QString vcard; 671 QString vcard;
672 converter.addresseeToVCard( a, vcard ); 672 converter.addresseeToVCard( a, vcard );
673 t << vcard; 673 t << vcard;
674 674
675 } 675 }
676 } else { 676 } else {
677 qDebug("Error open temp beam file "); 677 qDebug("Error open temp beam file ");
678 return; 678 return;
679 } 679 }
680 680
681 outFile.close(); 681 outFile.close();
682 682
683#ifndef DESKTOP_VERSION 683#ifndef DESKTOP_VERSION
684 Ir *ir = new Ir( this ); 684 Ir *ir = new Ir( this );
685 connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) ); 685 connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) );
686 ir->send( fileName, description, "text/x-vCard" ); 686 ir->send( fileName, description, "text/x-vCard" );
687#endif 687#endif
688 688
689} 689}
690 690
691void KABCore::beamDone( Ir *ir ) 691void KABCore::beamDone( Ir *ir )
692{ 692{
693#ifndef DESKTOP_VERSION 693#ifndef DESKTOP_VERSION
694 delete ir; 694 delete ir;
695#endif 695#endif
696} 696}
697 697
698 698
699void KABCore::browse( const QString& url ) 699void KABCore::browse( const QString& url )
700{ 700{
701#ifndef KAB_EMBEDDED 701#ifndef KAB_EMBEDDED
702 kapp->invokeBrowser( url ); 702 kapp->invokeBrowser( url );
703#else //KAB_EMBEDDED 703#else //KAB_EMBEDDED
704 qDebug("KABCore::browse must be fixed"); 704 qDebug("KABCore::browse must be fixed");
705#endif //KAB_EMBEDDED 705#endif //KAB_EMBEDDED
706} 706}
707 707
708void KABCore::selectAllContacts() 708void KABCore::selectAllContacts()
709{ 709{
710 mViewManager->setSelected( QString::null, true ); 710 mViewManager->setSelected( QString::null, true );
711} 711}
712 712
713void KABCore::deleteContacts() 713void KABCore::deleteContacts()
714{ 714{
715 QStringList uidList = mViewManager->selectedUids(); 715 QStringList uidList = mViewManager->selectedUids();
716 deleteContacts( uidList ); 716 deleteContacts( uidList );
717} 717}
718 718
719void KABCore::deleteContacts( const QStringList &uids ) 719void KABCore::deleteContacts( const QStringList &uids )
720{ 720{
721 if ( uids.count() > 0 ) { 721 if ( uids.count() > 0 ) {
722 PwDeleteCommand *command = new PwDeleteCommand( mAddressBook, uids ); 722 PwDeleteCommand *command = new PwDeleteCommand( mAddressBook, uids );
723 UndoStack::instance()->push( command ); 723 UndoStack::instance()->push( command );
724 RedoStack::instance()->clear(); 724 RedoStack::instance()->clear();
725 725
726 // now if we deleted anything, refresh 726 // now if we deleted anything, refresh
727 setContactSelected( QString::null ); 727 setContactSelected( QString::null );
728 setModified( true ); 728 setModified( true );
729 } 729 }
730} 730}
731 731
732void KABCore::copyContacts() 732void KABCore::copyContacts()
733{ 733{
734 KABC::Addressee::List addrList = mViewManager->selectedAddressees(); 734 KABC::Addressee::List addrList = mViewManager->selectedAddressees();
735 735
736 QString clipText = AddresseeUtil::addresseesToClipboard( addrList ); 736 QString clipText = AddresseeUtil::addresseesToClipboard( addrList );
737 737
738 kdDebug(5720) << "KABCore::copyContacts: " << clipText << endl; 738 kdDebug(5720) << "KABCore::copyContacts: " << clipText << endl;
739 739
740 QClipboard *cb = QApplication::clipboard(); 740 QClipboard *cb = QApplication::clipboard();
741 cb->setText( clipText ); 741 cb->setText( clipText );
742} 742}
743 743
744void KABCore::cutContacts() 744void KABCore::cutContacts()
745{ 745{
746 QStringList uidList = mViewManager->selectedUids(); 746 QStringList uidList = mViewManager->selectedUids();
747 747
748//US if ( uidList.size() > 0 ) { 748//US if ( uidList.size() > 0 ) {
749 if ( uidList.count() > 0 ) { 749 if ( uidList.count() > 0 ) {
750 PwCutCommand *command = new PwCutCommand( mAddressBook, uidList ); 750 PwCutCommand *command = new PwCutCommand( mAddressBook, uidList );
751 UndoStack::instance()->push( command ); 751 UndoStack::instance()->push( command );
752 RedoStack::instance()->clear(); 752 RedoStack::instance()->clear();
753 753
754 setModified( true ); 754 setModified( true );
755 } 755 }
756} 756}
757 757
758void KABCore::pasteContacts() 758void KABCore::pasteContacts()
759{ 759{
760 QClipboard *cb = QApplication::clipboard(); 760 QClipboard *cb = QApplication::clipboard();
761 761
762 KABC::Addressee::List list = AddresseeUtil::clipboardToAddressees( cb->text() ); 762 KABC::Addressee::List list = AddresseeUtil::clipboardToAddressees( cb->text() );
763 763
764 pasteContacts( list ); 764 pasteContacts( list );
765} 765}
766 766
767void KABCore::pasteContacts( KABC::Addressee::List &list ) 767void KABCore::pasteContacts( KABC::Addressee::List &list )
768{ 768{
769 KABC::Resource *resource = requestResource( this ); 769 KABC::Resource *resource = requestResource( this );
770 KABC::Addressee::List::Iterator it; 770 KABC::Addressee::List::Iterator it;
771 for ( it = list.begin(); it != list.end(); ++it ) 771 for ( it = list.begin(); it != list.end(); ++it )
772 (*it).setResource( resource ); 772 (*it).setResource( resource );
773 773
774 PwPasteCommand *command = new PwPasteCommand( this, list ); 774 PwPasteCommand *command = new PwPasteCommand( this, list );
775 UndoStack::instance()->push( command ); 775 UndoStack::instance()->push( command );
776 RedoStack::instance()->clear(); 776 RedoStack::instance()->clear();
777 777
778 setModified( true ); 778 setModified( true );
779} 779}
780 780
781void KABCore::setWhoAmI() 781void KABCore::setWhoAmI()
782{ 782{
783 KABC::Addressee::List addrList = mViewManager->selectedAddressees(); 783 KABC::Addressee::List addrList = mViewManager->selectedAddressees();
784 784
785 if ( addrList.count() > 1 ) { 785 if ( addrList.count() > 1 ) {
786 KMessageBox::sorry( this, i18n( "Please select only one contact." ) ); 786 KMessageBox::sorry( this, i18n( "Please select only one contact." ) );
787 return; 787 return;
788 } 788 }
789 789
790 QString text( i18n( "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>" ) ); 790 QString text( i18n( "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>" ) );
791 if ( KMessageBox::questionYesNo( this, text.arg( addrList[ 0 ].assembledName() ) ) == KMessageBox::Yes ) 791 if ( KMessageBox::questionYesNo( this, text.arg( addrList[ 0 ].assembledName() ) ) == KMessageBox::Yes )
792 static_cast<KABC::StdAddressBook*>( KABC::StdAddressBook::self() )->setWhoAmI( addrList[ 0 ] ); 792 static_cast<KABC::StdAddressBook*>( KABC::StdAddressBook::self() )->setWhoAmI( addrList[ 0 ] );
793} 793}
794 794
795void KABCore::setCategories() 795void KABCore::setCategories()
796{ 796{
797 KPIM::CategorySelectDialog dlg( KABPrefs::instance(), this, "", true ); 797 KPIM::CategorySelectDialog dlg( KABPrefs::instance(), this, "", true );
798 if ( !dlg.exec() ) 798 if ( !dlg.exec() )
799 return; 799 return;
800 800
801 bool merge = false; 801 bool merge = false;
802 QString msg = i18n( "Merge with existing categories?" ); 802 QString msg = i18n( "Merge with existing categories?" );
803 if ( KMessageBox::questionYesNo( this, msg ) == KMessageBox::Yes ) 803 if ( KMessageBox::questionYesNo( this, msg ) == KMessageBox::Yes )
804 merge = true; 804 merge = true;
805 805
806 QStringList categories = dlg.selectedCategories(); 806 QStringList categories = dlg.selectedCategories();
807 807
808 QStringList uids = mViewManager->selectedUids(); 808 QStringList uids = mViewManager->selectedUids();
809 QStringList::Iterator it; 809 QStringList::Iterator it;
810 for ( it = uids.begin(); it != uids.end(); ++it ) { 810 for ( it = uids.begin(); it != uids.end(); ++it ) {
811 KABC::Addressee addr = mAddressBook->findByUid( *it ); 811 KABC::Addressee addr = mAddressBook->findByUid( *it );
812 if ( !addr.isEmpty() ) { 812 if ( !addr.isEmpty() ) {
813 if ( !merge ) 813 if ( !merge )
814 addr.setCategories( categories ); 814 addr.setCategories( categories );
815 else { 815 else {
816 QStringList addrCategories = addr.categories(); 816 QStringList addrCategories = addr.categories();
817 QStringList::Iterator catIt; 817 QStringList::Iterator catIt;
818 for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) { 818 for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) {
819 if ( !addrCategories.contains( *catIt ) ) 819 if ( !addrCategories.contains( *catIt ) )
820 addrCategories.append( *catIt ); 820 addrCategories.append( *catIt );
821 } 821 }
822 addr.setCategories( addrCategories ); 822 addr.setCategories( addrCategories );
823 } 823 }
824 824
825 mAddressBook->insertAddressee( addr ); 825 mAddressBook->insertAddressee( addr );
826 } 826 }
827 } 827 }
828 828
829 if ( uids.count() > 0 ) 829 if ( uids.count() > 0 )
830 setModified( true ); 830 setModified( true );
831} 831}
832 832
833void KABCore::setSearchFields( const KABC::Field::List &fields ) 833void KABCore::setSearchFields( const KABC::Field::List &fields )
834{ 834{
835 mIncSearchWidget->setFields( fields ); 835 mIncSearchWidget->setFields( fields );
836} 836}
837 837
838void KABCore::incrementalSearch( const QString& text ) 838void KABCore::incrementalSearch( const QString& text )
839{ 839{
840 mViewManager->setSelected( QString::null, false ); 840 mViewManager->setSelected( QString::null, false );
841 841
842 if ( !text.isEmpty() ) { 842 if ( !text.isEmpty() ) {
843 KABC::Field *field = mIncSearchWidget->currentField(); 843 KABC::Field *field = mIncSearchWidget->currentField();
844 844
845 QString pattern = text.lower(); 845 QString pattern = text.lower();
846 846
847#if 1 //KDE_VERSION >= 319 847#if 1 //KDE_VERSION >= 319
848 KABC::AddresseeList list( mAddressBook->allAddressees() ); 848 KABC::AddresseeList list( mAddressBook->allAddressees() );
849 if ( field ) { 849 if ( field ) {
850 list.sortByField( field ); 850 list.sortByField( field );
851 KABC::AddresseeList::Iterator it; 851 KABC::AddresseeList::Iterator it;
852 for ( it = list.begin(); it != list.end(); ++it ) { 852 for ( it = list.begin(); it != list.end(); ++it ) {
853 if ( field->value( *it ).lower().startsWith( pattern ) ) { 853 if ( field->value( *it ).lower().startsWith( pattern ) ) {
854 mViewManager->setSelected( (*it).uid(), true ); 854 mViewManager->setSelected( (*it).uid(), true );
855 return; 855 return;
856 } 856 }
857 } 857 }
858 } else { 858 } else {
859 KABC::AddresseeList::Iterator it; 859 KABC::AddresseeList::Iterator it;
860 for ( it = list.begin(); it != list.end(); ++it ) { 860 for ( it = list.begin(); it != list.end(); ++it ) {
861 KABC::Field::List fieldList = mIncSearchWidget->fields(); 861 KABC::Field::List fieldList = mIncSearchWidget->fields();
862 KABC::Field::List::ConstIterator fieldIt; 862 KABC::Field::List::ConstIterator fieldIt;
863 for ( fieldIt = fieldList.begin(); fieldIt != fieldList.end(); ++fieldIt ) { 863 for ( fieldIt = fieldList.begin(); fieldIt != fieldList.end(); ++fieldIt ) {
864 if ( (*fieldIt)->value( *it ).lower().startsWith( pattern ) ) { 864 if ( (*fieldIt)->value( *it ).lower().startsWith( pattern ) ) {
865 mViewManager->setSelected( (*it).uid(), true ); 865 mViewManager->setSelected( (*it).uid(), true );
866 return; 866 return;
867 } 867 }
868 } 868 }
869 } 869 }
870 } 870 }
871#else 871#else
872 KABC::AddressBook::Iterator it; 872 KABC::AddressBook::Iterator it;
873 for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { 873 for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
874 if ( field ) { 874 if ( field ) {
875 if ( field->value( *it ).lower().startsWith( pattern ) ) { 875 if ( field->value( *it ).lower().startsWith( pattern ) ) {
876 mViewManager->setSelected( (*it).uid(), true ); 876 mViewManager->setSelected( (*it).uid(), true );
877 return; 877 return;
878 } 878 }
879 } else { 879 } else {
880 KABC::Field::List fieldList = mIncSearchWidget->fields(); 880 KABC::Field::List fieldList = mIncSearchWidget->fields();
881 KABC::Field::List::ConstIterator fieldIt; 881 KABC::Field::List::ConstIterator fieldIt;
882 for ( fieldIt = fieldList.begin(); fieldIt != fieldList.end(); ++fieldIt ) { 882 for ( fieldIt = fieldList.begin(); fieldIt != fieldList.end(); ++fieldIt ) {
883 if ( (*fieldIt)->value( *it ).lower().startsWith( pattern ) ) { 883 if ( (*fieldIt)->value( *it ).lower().startsWith( pattern ) ) {
884 mViewManager->setSelected( (*it).uid(), true ); 884 mViewManager->setSelected( (*it).uid(), true );
885 return; 885 return;
886 } 886 }
887 } 887 }
888 } 888 }
889 } 889 }
890#endif 890#endif
891 } 891 }
892} 892}
893 893
894void KABCore::setModified() 894void KABCore::setModified()
895{ 895{
896 setModified( true ); 896 setModified( true );
897} 897}
898 898
899void KABCore::setModifiedWOrefresh() 899void KABCore::setModifiedWOrefresh()
900{ 900{
901 // qDebug("KABCore::setModifiedWOrefresh() "); 901 // qDebug("KABCore::setModifiedWOrefresh() ");
902 mModified = true; 902 mModified = true;
903 mActionSave->setEnabled( mModified ); 903 mActionSave->setEnabled( mModified );
904#ifdef DESKTOP_VERSION 904#ifdef DESKTOP_VERSION
905 mDetails->refreshView(); 905 mDetails->refreshView();
906#endif 906#endif
907 907
908} 908}
909void KABCore::setModified( bool modified ) 909void KABCore::setModified( bool modified )
910{ 910{
911 mModified = modified; 911 mModified = modified;
912 mActionSave->setEnabled( mModified ); 912 mActionSave->setEnabled( mModified );
913 913
914 if ( modified ) 914 if ( modified )
915 mJumpButtonBar->recreateButtons(); 915 mJumpButtonBar->recreateButtons();
916 916
917 mViewManager->refreshView(); 917 mViewManager->refreshView();
918 mDetails->refreshView(); 918 mDetails->refreshView();
919 919
920} 920}
921 921
922bool KABCore::modified() const 922bool KABCore::modified() const
923{ 923{
924 return mModified; 924 return mModified;
925} 925}
926 926
927void KABCore::contactModified( const KABC::Addressee &addr ) 927void KABCore::contactModified( const KABC::Addressee &addr )
928{ 928{
929 929
930 Command *command = 0; 930 Command *command = 0;
931 QString uid; 931 QString uid;
932 932
933 // check if it exists already 933 // check if it exists already
934 KABC::Addressee origAddr = mAddressBook->findByUid( addr.uid() ); 934 KABC::Addressee origAddr = mAddressBook->findByUid( addr.uid() );
935 if ( origAddr.isEmpty() ) 935 if ( origAddr.isEmpty() )
936 command = new PwNewCommand( mAddressBook, addr ); 936 command = new PwNewCommand( mAddressBook, addr );
937 else { 937 else {
938 command = new PwEditCommand( mAddressBook, origAddr, addr ); 938 command = new PwEditCommand( mAddressBook, origAddr, addr );
939 uid = addr.uid(); 939 uid = addr.uid();
940 } 940 }
941 941
942 UndoStack::instance()->push( command ); 942 UndoStack::instance()->push( command );
943 RedoStack::instance()->clear(); 943 RedoStack::instance()->clear();
944 944
945 setModified( true ); 945 setModified( true );
946} 946}
947 947
948void KABCore::newContact() 948void KABCore::newContact()
949{ 949{
950 950
951 951
952 QPtrList<KABC::Resource> kabcResources = mAddressBook->resources(); 952 QPtrList<KABC::Resource> kabcResources = mAddressBook->resources();
953 953
954 QPtrList<KRES::Resource> kresResources; 954 QPtrList<KRES::Resource> kresResources;
955 QPtrListIterator<KABC::Resource> it( kabcResources ); 955 QPtrListIterator<KABC::Resource> it( kabcResources );
956 KABC::Resource *resource; 956 KABC::Resource *resource;
957 while ( ( resource = it.current() ) != 0 ) { 957 while ( ( resource = it.current() ) != 0 ) {
958 ++it; 958 ++it;
959 if ( !resource->readOnly() ) { 959 if ( !resource->readOnly() ) {
960 KRES::Resource *res = static_cast<KRES::Resource*>( resource ); 960 KRES::Resource *res = static_cast<KRES::Resource*>( resource );
961 if ( res ) 961 if ( res )
962 kresResources.append( res ); 962 kresResources.append( res );
963 } 963 }
964 } 964 }
965 965
966 KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, this ); 966 KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, this );
967 resource = static_cast<KABC::Resource*>( res ); 967 resource = static_cast<KABC::Resource*>( res );
968 968
969 if ( resource ) { 969 if ( resource ) {
970 KABC::Addressee addr; 970 KABC::Addressee addr;
971 addr.setResource( resource ); 971 addr.setResource( resource );
972 mEditorDialog->setAddressee( addr ); 972 mEditorDialog->setAddressee( addr );
973 KApplication::execDialog ( mEditorDialog ); 973 KApplication::execDialog ( mEditorDialog );
974 974
975 } else 975 } else
976 return; 976 return;
977 977
978 // mEditorDict.insert( dialog->addressee().uid(), dialog ); 978 // mEditorDict.insert( dialog->addressee().uid(), dialog );
979 979
980 980
981} 981}
982 982
983void KABCore::addEmail( QString aStr ) 983void KABCore::addEmail( QString aStr )
984{ 984{
985#ifndef KAB_EMBEDDED 985#ifndef KAB_EMBEDDED
986 QString fullName, email; 986 QString fullName, email;
987 987
988 KABC::Addressee::parseEmailAddress( aStr, fullName, email ); 988 KABC::Addressee::parseEmailAddress( aStr, fullName, email );
989 989
990 // Try to lookup the addressee matching the email address 990 // Try to lookup the addressee matching the email address
991 bool found = false; 991 bool found = false;
992 QStringList emailList; 992 QStringList emailList;
993 KABC::AddressBook::Iterator it; 993 KABC::AddressBook::Iterator it;
994 for ( it = mAddressBook->begin(); !found && (it != mAddressBook->end()); ++it ) { 994 for ( it = mAddressBook->begin(); !found && (it != mAddressBook->end()); ++it ) {
995 emailList = (*it).emails(); 995 emailList = (*it).emails();
996 if ( emailList.contains( email ) > 0 ) { 996 if ( emailList.contains( email ) > 0 ) {
997 found = true; 997 found = true;
998 (*it).setNameFromString( fullName ); 998 (*it).setNameFromString( fullName );
999 editContact( (*it).uid() ); 999 editContact( (*it).uid() );
1000 } 1000 }
1001 } 1001 }
1002 1002
1003 if ( !found ) { 1003 if ( !found ) {
1004 KABC::Addressee addr; 1004 KABC::Addressee addr;
1005 addr.setNameFromString( fullName ); 1005 addr.setNameFromString( fullName );
1006 addr.insertEmail( email, true ); 1006 addr.insertEmail( email, true );
1007 1007
1008 mAddressBook->insertAddressee( addr ); 1008 mAddressBook->insertAddressee( addr );
1009 mViewManager->refreshView( addr.uid() ); 1009 mViewManager->refreshView( addr.uid() );
1010 editContact( addr.uid() ); 1010 editContact( addr.uid() );
1011 } 1011 }
1012#else //KAB_EMBEDDED 1012#else //KAB_EMBEDDED
1013 qDebug("KABCore::addEmail finsih method"); 1013 qDebug("KABCore::addEmail finsih method");
1014#endif //KAB_EMBEDDED 1014#endif //KAB_EMBEDDED
1015} 1015}
1016 1016
1017void KABCore::importVCard( const KURL &url, bool showPreview ) 1017void KABCore::importVCard( const KURL &url, bool showPreview )
1018{ 1018{
1019 mXXPortManager->importVCard( url, showPreview ); 1019 mXXPortManager->importVCard( url, showPreview );
1020} 1020}
1021void KABCore::importFromOL() 1021void KABCore::importFromOL()
1022{ 1022{
1023#ifdef _WIN32_ 1023#ifdef _WIN32_
1024 KAImportOLdialog* idgl = new KAImportOLdialog( i18n("Import Contacts from OL"), mAddressBook, this ); 1024 KAImportOLdialog* idgl = new KAImportOLdialog( i18n("Import Contacts from OL"), mAddressBook, this );
1025 idgl->exec(); 1025 idgl->exec();
1026 KABC::Addressee::List list = idgl->getAddressList(); 1026 KABC::Addressee::List list = idgl->getAddressList();
1027 if ( list.count() > 0 ) { 1027 if ( list.count() > 0 ) {
1028 KABC::Addressee::List listNew; 1028 KABC::Addressee::List listNew;
1029 KABC::Addressee::List listExisting; 1029 KABC::Addressee::List listExisting;
1030 KABC::Addressee::List::Iterator it; 1030 KABC::Addressee::List::Iterator it;
1031 KABC::AddressBook::Iterator iter; 1031 KABC::AddressBook::Iterator iter;
1032 for ( it = list.begin(); it != list.end(); ++it ) { 1032 for ( it = list.begin(); it != list.end(); ++it ) {
1033 if ( mAddressBook->findByUid((*it).uid() ).isEmpty()) 1033 if ( mAddressBook->findByUid((*it).uid() ).isEmpty())
1034 listNew.append( (*it) ); 1034 listNew.append( (*it) );
1035 else 1035 else
1036 listExisting.append( (*it) ); 1036 listExisting.append( (*it) );
1037 } 1037 }
1038 if ( listExisting.count() > 0 ) 1038 if ( listExisting.count() > 0 )
1039 KMessageBox::information( this, i18n("%1 contacts not added to addressbook\nbecause they were already in the addressbook!").arg( listExisting.count() )); 1039 KMessageBox::information( this, i18n("%1 contacts not added to addressbook\nbecause they were already in the addressbook!").arg( listExisting.count() ));
1040 if ( listNew.count() > 0 ) { 1040 if ( listNew.count() > 0 ) {
1041 pasteWithNewUid = false; 1041 pasteWithNewUid = false;
1042 pasteContacts( listNew ); 1042 pasteContacts( listNew );
1043 pasteWithNewUid = true; 1043 pasteWithNewUid = true;
1044 } 1044 }
1045 } 1045 }
1046 delete idgl; 1046 delete idgl;
1047#endif 1047#endif
1048} 1048}
1049 1049
1050void KABCore::importVCard( const QString &vCard, bool showPreview ) 1050void KABCore::importVCard( const QString &vCard, bool showPreview )
1051{ 1051{
1052 mXXPortManager->importVCard( vCard, showPreview ); 1052 mXXPortManager->importVCard( vCard, showPreview );
1053} 1053}
1054 1054
1055//US added a second method without defaultparameter 1055//US added a second method without defaultparameter
1056void KABCore::editContact2() { 1056void KABCore::editContact2() {
1057 editContact( QString::null ); 1057 editContact( QString::null );
1058} 1058}
1059 1059
1060void KABCore::editContact( const QString &uid ) 1060void KABCore::editContact( const QString &uid )
1061{ 1061{
1062 1062
1063 if ( mExtensionManager->isQuickEditVisible() ) 1063 if ( mExtensionManager->isQuickEditVisible() )
1064 return; 1064 return;
1065 1065
1066 // First, locate the contact entry 1066 // First, locate the contact entry
1067 QString localUID = uid; 1067 QString localUID = uid;
1068 if ( localUID.isNull() ) { 1068 if ( localUID.isNull() ) {
1069 QStringList uidList = mViewManager->selectedUids(); 1069 QStringList uidList = mViewManager->selectedUids();
1070 if ( uidList.count() > 0 ) 1070 if ( uidList.count() > 0 )
1071 localUID = *( uidList.at( 0 ) ); 1071 localUID = *( uidList.at( 0 ) );
1072 } 1072 }
1073 1073
1074 KABC::Addressee addr = mAddressBook->findByUid( localUID ); 1074 KABC::Addressee addr = mAddressBook->findByUid( localUID );
1075 if ( !addr.isEmpty() ) { 1075 if ( !addr.isEmpty() ) {
1076 mEditorDialog->setAddressee( addr ); 1076 mEditorDialog->setAddressee( addr );
1077 KApplication::execDialog ( mEditorDialog ); 1077 KApplication::execDialog ( mEditorDialog );
1078 } 1078 }
1079} 1079}
1080 1080
1081void KABCore::save() 1081void KABCore::save()
1082{ 1082{
1083 if ( !mModified ) 1083 if ( !mModified )
1084 return; 1084 return;
1085 QString text = i18n( "There was an error while attempting to save\n the " 1085 QString text = i18n( "There was an error while attempting to save\n the "
1086 "address book. Please check that some \nother application is " 1086 "address book. Please check that some \nother application is "
1087 "not using it. " ); 1087 "not using it. " );
1088 statusMessage(i18n("Saving addressbook ... ")); 1088 statusMessage(i18n("Saving addressbook ... "));
1089#ifndef KAB_EMBEDDED 1089#ifndef KAB_EMBEDDED
1090 KABC::StdAddressBook *b = dynamic_cast<KABC::StdAddressBook*>( mAddressBook ); 1090 KABC::StdAddressBook *b = dynamic_cast<KABC::StdAddressBook*>( mAddressBook );
1091 if ( !b || !b->save() ) { 1091 if ( !b || !b->save() ) {
1092 KMessageBox::error( this, text, i18n( "Unable to Save" ) ); 1092 KMessageBox::error( this, text, i18n( "Unable to Save" ) );
1093 } 1093 }
1094#else //KAB_EMBEDDED 1094#else //KAB_EMBEDDED
1095 KABC::StdAddressBook *b = (KABC::StdAddressBook*)( mAddressBook ); 1095 KABC::StdAddressBook *b = (KABC::StdAddressBook*)( mAddressBook );
1096 if ( !b || !b->save() ) { 1096 if ( !b || !b->save() ) {
1097 QMessageBox::critical( this, i18n( "Unable to Save" ), text, i18n("Ok")); 1097 QMessageBox::critical( this, i18n( "Unable to Save" ), text, i18n("Ok"));
1098 } 1098 }
1099#endif //KAB_EMBEDDED 1099#endif //KAB_EMBEDDED
1100 1100
1101 statusMessage(i18n("Addressbook saved!")); 1101 statusMessage(i18n("Addressbook saved!"));
1102 setModified( false ); 1102 setModified( false );
1103} 1103}
1104 1104
1105void KABCore::statusMessage(QString mess , int time ) 1105void KABCore::statusMessage(QString mess , int time )
1106{ 1106{
1107 //topLevelWidget()->setCaption( mess ); 1107 //topLevelWidget()->setCaption( mess );
1108 // pending setting timer to revome message 1108 // pending setting timer to revome message
1109} 1109}
1110void KABCore::undo() 1110void KABCore::undo()
1111{ 1111{
1112 UndoStack::instance()->undo(); 1112 UndoStack::instance()->undo();
1113 1113
1114 // Refresh the view 1114 // Refresh the view
1115 mViewManager->refreshView(); 1115 mViewManager->refreshView();
1116} 1116}
1117 1117
1118void KABCore::redo() 1118void KABCore::redo()
1119{ 1119{
1120 RedoStack::instance()->redo(); 1120 RedoStack::instance()->redo();
1121 1121
1122 // Refresh the view 1122 // Refresh the view
1123 mViewManager->refreshView(); 1123 mViewManager->refreshView();
1124} 1124}
1125 1125
1126void KABCore::setJumpButtonBarVisible( bool visible ) 1126void KABCore::setJumpButtonBarVisible( bool visible )
1127{ 1127{
1128 if ( visible ) 1128 if ( visible )
1129 mJumpButtonBar->show(); 1129 mJumpButtonBar->show();
1130 else 1130 else
1131 mJumpButtonBar->hide(); 1131 mJumpButtonBar->hide();
1132} 1132}
1133void KABCore::setDetailsToState() 1133void KABCore::setDetailsToState()
1134{ 1134{
1135 setDetailsVisible( mActionDetails->isChecked() ); 1135 setDetailsVisible( mActionDetails->isChecked() );
1136} 1136}
1137 1137
1138void KABCore::setDetailsVisible( bool visible ) 1138void KABCore::setDetailsVisible( bool visible )
1139{ 1139{
1140 if ( visible ) 1140 if ( visible )
1141 mDetails->show(); 1141 mDetails->show();
1142 else 1142 else
1143 mDetails->hide(); 1143 mDetails->hide();
1144} 1144}
1145 1145
1146void KABCore::extensionModified( const KABC::Addressee::List &list ) 1146void KABCore::extensionModified( const KABC::Addressee::List &list )
1147{ 1147{
1148 1148
1149 if ( list.count() != 0 ) { 1149 if ( list.count() != 0 ) {
1150 KABC::Addressee::List::ConstIterator it; 1150 KABC::Addressee::List::ConstIterator it;
1151 for ( it = list.begin(); it != list.end(); ++it ) 1151 for ( it = list.begin(); it != list.end(); ++it )
1152 mAddressBook->insertAddressee( *it ); 1152 mAddressBook->insertAddressee( *it );
1153 if ( list.count() > 1 ) 1153 if ( list.count() > 1 )
1154 setModified(); 1154 setModified();
1155 else 1155 else
1156 setModifiedWOrefresh(); 1156 setModifiedWOrefresh();
1157 } 1157 }
1158 if ( list.count() == 0 ) 1158 if ( list.count() == 0 )
1159 mViewManager->refreshView(); 1159 mViewManager->refreshView();
1160 else 1160 else
1161 mViewManager->refreshView( list[ 0 ].uid() ); 1161 mViewManager->refreshView( list[ 0 ].uid() );
1162 1162
1163 1163
1164 1164
1165} 1165}
1166 1166
1167QString KABCore::getNameByPhone( const QString &phone ) 1167QString KABCore::getNameByPhone( const QString &phone )
1168{ 1168{
1169#ifndef KAB_EMBEDDED 1169#ifndef KAB_EMBEDDED
1170 QRegExp r( "[/*/-/ ]" ); 1170 QRegExp r( "[/*/-/ ]" );
1171 QString localPhone( phone ); 1171 QString localPhone( phone );
1172 1172
1173 bool found = false; 1173 bool found = false;
1174 QString ownerName = ""; 1174 QString ownerName = "";
1175 KABC::AddressBook::Iterator iter; 1175 KABC::AddressBook::Iterator iter;
1176 KABC::PhoneNumber::List::Iterator phoneIter; 1176 KABC::PhoneNumber::List::Iterator phoneIter;
1177 KABC::PhoneNumber::List phoneList; 1177 KABC::PhoneNumber::List phoneList;
1178 for ( iter = mAddressBook->begin(); !found && ( iter != mAddressBook->end() ); ++iter ) { 1178 for ( iter = mAddressBook->begin(); !found && ( iter != mAddressBook->end() ); ++iter ) {
1179 phoneList = (*iter).phoneNumbers(); 1179 phoneList = (*iter).phoneNumbers();
1180 for ( phoneIter = phoneList.begin(); !found && ( phoneIter != phoneList.end() ); 1180 for ( phoneIter = phoneList.begin(); !found && ( phoneIter != phoneList.end() );
1181 ++phoneIter) { 1181 ++phoneIter) {
1182 // Get rid of separator chars so just the numbers are compared. 1182 // Get rid of separator chars so just the numbers are compared.
1183 if ( (*phoneIter).number().replace( r, "" ) == localPhone.replace( r, "" ) ) { 1183 if ( (*phoneIter).number().replace( r, "" ) == localPhone.replace( r, "" ) ) {
1184 ownerName = (*iter).formattedName(); 1184 ownerName = (*iter).formattedName();
1185 found = true; 1185 found = true;
1186 } 1186 }
1187 } 1187 }
1188 } 1188 }
1189 1189
1190 return ownerName; 1190 return ownerName;
1191#else //KAB_EMBEDDED 1191#else //KAB_EMBEDDED
1192 qDebug("KABCore::getNameByPhone finsih method"); 1192 qDebug("KABCore::getNameByPhone finsih method");
1193 return ""; 1193 return "";
1194#endif //KAB_EMBEDDED 1194#endif //KAB_EMBEDDED
1195 1195
1196} 1196}
1197 1197
1198void KABCore::openConfigDialog() 1198void KABCore::openConfigDialog()
1199{ 1199{
1200 KABPrefs* prefs = KABPrefs::instance(); 1200 KABPrefs* prefs = KABPrefs::instance();
1201 KCMultiDialog* ConfigureDialog = new KCMultiDialog( prefs, "PIM", this ,"kabconfigdialog", true ); 1201 KCMultiDialog* ConfigureDialog = new KCMultiDialog( prefs, "PIM", this ,"kabconfigdialog", true );
1202 KCMKabConfig* kabcfg = new KCMKabConfig( ConfigureDialog->getNewVBoxPage(i18n( "Addressbook")) , "KCMKabConfig" ); 1202 KCMKabConfig* kabcfg = new KCMKabConfig( ConfigureDialog->getNewVBoxPage(i18n( "Addressbook")) , "KCMKabConfig" );
1203 ConfigureDialog->addModule(kabcfg ); 1203 ConfigureDialog->addModule(kabcfg );
1204 KCMKdePimConfig* kdelibcfg = new KCMKdePimConfig( ConfigureDialog->getNewVBoxPage(i18n( "Pim")) , "KCMKdeLibConfig" ); 1204 KCMKdePimConfig* kdelibcfg = new KCMKdePimConfig( ConfigureDialog->getNewVBoxPage(i18n( "Pim")) , "KCMKdeLibConfig" );
1205 ConfigureDialog->addModule(kdelibcfg ); 1205 ConfigureDialog->addModule(kdelibcfg );
1206 1206
1207 1207
1208 1208
1209 connect( ConfigureDialog, SIGNAL( applyClicked() ), 1209 connect( ConfigureDialog, SIGNAL( applyClicked() ),
1210 this, SLOT( configurationChanged() ) ); 1210 this, SLOT( configurationChanged() ) );
1211 connect( ConfigureDialog, SIGNAL( okClicked() ), 1211 connect( ConfigureDialog, SIGNAL( okClicked() ),
1212 this, SLOT( configurationChanged() ) ); 1212 this, SLOT( configurationChanged() ) );
1213 saveSettings(); 1213 saveSettings();
1214 ConfigureDialog->showMaximized(); 1214 ConfigureDialog->showMaximized();
1215 if ( ConfigureDialog->exec() ) 1215 if ( ConfigureDialog->exec() )
1216 KMessageBox::information( this, i18n("If you configured \nExtensions,\nplease restart!\n") ); 1216 KMessageBox::information( this, i18n("If you configured \nExtensions,\nplease restart!\n") );
1217 delete ConfigureDialog; 1217 delete ConfigureDialog;
1218} 1218}
1219 1219
1220void KABCore::openLDAPDialog() 1220void KABCore::openLDAPDialog()
1221{ 1221{
1222#ifndef KAB_EMBEDDED 1222#ifndef KAB_EMBEDDED
1223 if ( !mLdapSearchDialog ) { 1223 if ( !mLdapSearchDialog ) {
1224 mLdapSearchDialog = new LDAPSearchDialog( mAddressBook, this ); 1224 mLdapSearchDialog = new LDAPSearchDialog( mAddressBook, this );
1225 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), mViewManager, 1225 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), mViewManager,
1226 SLOT( refreshView() ) ); 1226 SLOT( refreshView() ) );
1227 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), this, 1227 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), this,
1228 SLOT( setModified() ) ); 1228 SLOT( setModified() ) );
1229 } else 1229 } else
1230 mLdapSearchDialog->restoreSettings(); 1230 mLdapSearchDialog->restoreSettings();
1231 1231
1232 if ( mLdapSearchDialog->isOK() ) 1232 if ( mLdapSearchDialog->isOK() )
1233 mLdapSearchDialog->exec(); 1233 mLdapSearchDialog->exec();
1234#else //KAB_EMBEDDED 1234#else //KAB_EMBEDDED
1235 qDebug("KABCore::openLDAPDialog() finsih method"); 1235 qDebug("KABCore::openLDAPDialog() finsih method");
1236#endif //KAB_EMBEDDED 1236#endif //KAB_EMBEDDED
1237} 1237}
1238 1238
1239void KABCore::print() 1239void KABCore::print()
1240{ 1240{
1241#ifndef KAB_EMBEDDED 1241#ifndef KAB_EMBEDDED
1242 KPrinter printer; 1242 KPrinter printer;
1243 if ( !printer.setup( this ) ) 1243 if ( !printer.setup( this ) )
1244 return; 1244 return;
1245 1245
1246 KABPrinting::PrintingWizard wizard( &printer, mAddressBook, 1246 KABPrinting::PrintingWizard wizard( &printer, mAddressBook,
1247 mViewManager->selectedUids(), this ); 1247 mViewManager->selectedUids(), this );
1248 1248
1249 wizard.exec(); 1249 wizard.exec();
1250#else //KAB_EMBEDDED 1250#else //KAB_EMBEDDED
1251 qDebug("KABCore::print() finsih method"); 1251 qDebug("KABCore::print() finsih method");
1252#endif //KAB_EMBEDDED 1252#endif //KAB_EMBEDDED
1253 1253
1254} 1254}
1255 1255
1256 1256
1257void KABCore::addGUIClient( KXMLGUIClient *client ) 1257void KABCore::addGUIClient( KXMLGUIClient *client )
1258{ 1258{
1259 if ( mGUIClient ) 1259 if ( mGUIClient )
1260 mGUIClient->insertChildClient( client ); 1260 mGUIClient->insertChildClient( client );
1261 else 1261 else
1262 KMessageBox::error( this, "no KXMLGUICLient"); 1262 KMessageBox::error( this, "no KXMLGUICLient");
1263} 1263}
1264 1264
1265 1265
1266void KABCore::configurationChanged() 1266void KABCore::configurationChanged()
1267{ 1267{
1268 mExtensionManager->reconfigure(); 1268 mExtensionManager->reconfigure();
1269} 1269}
1270 1270
1271void KABCore::addressBookChanged() 1271void KABCore::addressBookChanged()
1272{ 1272{
1273/*US 1273/*US
1274 QDictIterator<AddresseeEditorDialog> it( mEditorDict ); 1274 QDictIterator<AddresseeEditorDialog> it( mEditorDict );
1275 while ( it.current() ) { 1275 while ( it.current() ) {
1276 if ( it.current()->dirty() ) { 1276 if ( it.current()->dirty() ) {
1277 QString text = i18n( "Data has been changed externally. Unsaved " 1277 QString text = i18n( "Data has been changed externally. Unsaved "
1278 "changes will be lost." ); 1278 "changes will be lost." );
1279 KMessageBox::information( this, text ); 1279 KMessageBox::information( this, text );
1280 } 1280 }
1281 it.current()->setAddressee( mAddressBook->findByUid( it.currentKey() ) ); 1281 it.current()->setAddressee( mAddressBook->findByUid( it.currentKey() ) );
1282 ++it; 1282 ++it;
1283 } 1283 }
1284*/ 1284*/
1285 if (mEditorDialog) 1285 if (mEditorDialog)
1286 { 1286 {
1287 if (mEditorDialog->dirty()) 1287 if (mEditorDialog->dirty())
1288 { 1288 {
1289 QString text = i18n( "Data has been changed externally. Unsaved " 1289 QString text = i18n( "Data has been changed externally. Unsaved "
1290 "changes will be lost." ); 1290 "changes will be lost." );
1291 KMessageBox::information( this, text ); 1291 KMessageBox::information( this, text );
1292 } 1292 }
1293 QString currentuid = mEditorDialog->addressee().uid(); 1293 QString currentuid = mEditorDialog->addressee().uid();
1294 mEditorDialog->setAddressee( mAddressBook->findByUid( currentuid ) ); 1294 mEditorDialog->setAddressee( mAddressBook->findByUid( currentuid ) );
1295 } 1295 }
1296 mViewManager->refreshView(); 1296 mViewManager->refreshView();
1297// mDetails->refreshView(); 1297// mDetails->refreshView();
1298 1298
1299 1299
1300} 1300}
1301 1301
1302AddresseeEditorDialog *KABCore::createAddresseeEditorDialog( QWidget *parent, 1302AddresseeEditorDialog *KABCore::createAddresseeEditorDialog( QWidget *parent,
1303 const char *name ) 1303 const char *name )
1304{ 1304{
1305 1305
1306 if ( mEditorDialog == 0 ) { 1306 if ( mEditorDialog == 0 ) {
1307 mEditorDialog = new AddresseeEditorDialog( this, parent, 1307 mEditorDialog = new AddresseeEditorDialog( this, parent,
1308 name ? name : "editorDialog" ); 1308 name ? name : "editorDialog" );
1309 1309
1310 1310
1311 connect( mEditorDialog, SIGNAL( contactModified( const KABC::Addressee& ) ), 1311 connect( mEditorDialog, SIGNAL( contactModified( const KABC::Addressee& ) ),
1312 SLOT( contactModified( const KABC::Addressee& ) ) ); 1312 SLOT( contactModified( const KABC::Addressee& ) ) );
1313 //connect( mEditorDialog, SIGNAL( editorDestroyed( const QString& ) ), 1313 //connect( mEditorDialog, SIGNAL( editorDestroyed( const QString& ) ),
1314 // SLOT( slotEditorDestroyed( const QString& ) ) ); 1314 // SLOT( slotEditorDestroyed( const QString& ) ) );
1315 } 1315 }
1316 1316
1317 return mEditorDialog; 1317 return mEditorDialog;
1318} 1318}
1319 1319
1320void KABCore::slotEditorDestroyed( const QString &uid ) 1320void KABCore::slotEditorDestroyed( const QString &uid )
1321{ 1321{
1322 //mEditorDict.remove( uid ); 1322 //mEditorDict.remove( uid );
1323} 1323}
1324 1324
1325void KABCore::initGUI() 1325void KABCore::initGUI()
1326{ 1326{
1327#ifndef KAB_EMBEDDED 1327#ifndef KAB_EMBEDDED
1328 QHBoxLayout *topLayout = new QHBoxLayout( this ); 1328 QHBoxLayout *topLayout = new QHBoxLayout( this );
1329 topLayout->setSpacing( KDialogBase::spacingHint() ); 1329 topLayout->setSpacing( KDialogBase::spacingHint() );
1330 1330
1331 mExtensionBarSplitter = new QSplitter( this ); 1331 mExtensionBarSplitter = new QSplitter( this );
1332 mExtensionBarSplitter->setOrientation( Qt::Vertical ); 1332 mExtensionBarSplitter->setOrientation( Qt::Vertical );
1333 1333
1334 mDetailsSplitter = new QSplitter( mExtensionBarSplitter ); 1334 mDetailsSplitter = new QSplitter( mExtensionBarSplitter );
1335 1335
1336 QVBox *viewSpace = new QVBox( mDetailsSplitter ); 1336 QVBox *viewSpace = new QVBox( mDetailsSplitter );
1337 mIncSearchWidget = new IncSearchWidget( viewSpace ); 1337 mIncSearchWidget = new IncSearchWidget( viewSpace );
1338 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), 1338 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ),
1339 SLOT( incrementalSearch( const QString& ) ) ); 1339 SLOT( incrementalSearch( const QString& ) ) );
1340 1340
1341 mViewManager = new ViewManager( this, viewSpace ); 1341 mViewManager = new ViewManager( this, viewSpace );
1342 viewSpace->setStretchFactor( mViewManager, 1 ); 1342 viewSpace->setStretchFactor( mViewManager, 1 );
1343 1343
1344 mDetails = new ViewContainer( mDetailsSplitter ); 1344 mDetails = new ViewContainer( mDetailsSplitter );
1345 1345
1346 mJumpButtonBar = new JumpButtonBar( this, this ); 1346 mJumpButtonBar = new JumpButtonBar( this, this );
1347 1347
1348 mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter ); 1348 mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter );
1349 1349
1350 topLayout->addWidget( mExtensionBarSplitter ); 1350 topLayout->addWidget( mExtensionBarSplitter );
1351 topLayout->setStretchFactor( mExtensionBarSplitter, 100 ); 1351 topLayout->setStretchFactor( mExtensionBarSplitter, 100 );
1352 topLayout->addWidget( mJumpButtonBar ); 1352 topLayout->addWidget( mJumpButtonBar );
1353 topLayout->setStretchFactor( mJumpButtonBar, 1 ); 1353 topLayout->setStretchFactor( mJumpButtonBar, 1 );
1354 1354
1355 mXXPortManager = new XXPortManager( this, this ); 1355 mXXPortManager = new XXPortManager( this, this );
1356 1356
1357#else //KAB_EMBEDDED 1357#else //KAB_EMBEDDED
1358 //US initialize viewMenu before settingup viewmanager. 1358 //US initialize viewMenu before settingup viewmanager.
1359 // Viewmanager needs this menu to plugin submenues. 1359 // Viewmanager needs this menu to plugin submenues.
1360 viewMenu = new QPopupMenu( this ); 1360 viewMenu = new QPopupMenu( this );
1361 settingsMenu = new QPopupMenu( this ); 1361 settingsMenu = new QPopupMenu( this );
1362 //filterMenu = new QPopupMenu( this ); 1362 //filterMenu = new QPopupMenu( this );
1363 ImportMenu = new QPopupMenu( this ); 1363 ImportMenu = new QPopupMenu( this );
1364 ExportMenu = new QPopupMenu( this ); 1364 ExportMenu = new QPopupMenu( this );
1365 1365
1366 changeMenu= new QPopupMenu( this ); 1366 changeMenu= new QPopupMenu( this );
1367 1367
1368//US since we have no splitter for the embedded system, setup 1368//US since we have no splitter for the embedded system, setup
1369// a layout with two frames. One left and one right. 1369// a layout with two frames. One left and one right.
1370 1370
1371 QBoxLayout *topLayout; 1371 QBoxLayout *topLayout;
1372 1372
1373 // = new QHBoxLayout( this ); 1373 // = new QHBoxLayout( this );
1374// QBoxLayout *topLayout = (QBoxLayout*)layout(); 1374// QBoxLayout *topLayout = (QBoxLayout*)layout();
1375 1375
1376// QWidget *mainBox = new QWidget( this ); 1376// QWidget *mainBox = new QWidget( this );
1377// QBoxLayout * mainBoxLayout = new QHBoxLayout(mainBox); 1377// QBoxLayout * mainBoxLayout = new QHBoxLayout(mainBox);
1378 1378
1379#ifdef DESKTOP_VERSION 1379#ifdef DESKTOP_VERSION
1380 topLayout = new QHBoxLayout( this ); 1380 topLayout = new QHBoxLayout( this );
1381 1381
1382 1382
1383 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); 1383 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this);
1384 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); 1384 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
1385 1385
1386 topLayout->addWidget(mMiniSplitter ); 1386 topLayout->addWidget(mMiniSplitter );
1387 1387
1388 mExtensionBarSplitter = new KDGanttMinimizeSplitter( Qt::Vertical,mMiniSplitter ); 1388 mExtensionBarSplitter = new KDGanttMinimizeSplitter( Qt::Vertical,mMiniSplitter );
1389 mExtensionBarSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); 1389 mExtensionBarSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
1390 mViewManager = new ViewManager( this, mExtensionBarSplitter ); 1390 mViewManager = new ViewManager( this, mExtensionBarSplitter );
1391 mDetails = new ViewContainer( mMiniSplitter ); 1391 mDetails = new ViewContainer( mMiniSplitter );
1392 mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter ); 1392 mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter );
1393#else 1393#else
1394 if ( QApplication::desktop()->width() > 480 ) { 1394 if ( QApplication::desktop()->width() > 480 ) {
1395 topLayout = new QHBoxLayout( this ); 1395 topLayout = new QHBoxLayout( this );
1396 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); 1396 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this);
1397 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); 1397 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
1398 } else { 1398 } else {
1399 1399
1400 topLayout = new QHBoxLayout( this ); 1400 topLayout = new QHBoxLayout( this );
1401 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this); 1401 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this);
1402 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); 1402 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
1403 } 1403 }
1404 1404
1405 topLayout->addWidget(mMiniSplitter ); 1405 topLayout->addWidget(mMiniSplitter );
1406 mViewManager = new ViewManager( this, mMiniSplitter ); 1406 mViewManager = new ViewManager( this, mMiniSplitter );
1407 mDetails = new ViewContainer( mMiniSplitter ); 1407 mDetails = new ViewContainer( mMiniSplitter );
1408 1408
1409 1409
1410 mExtensionManager = new ExtensionManager( this, mMiniSplitter ); 1410 mExtensionManager = new ExtensionManager( this, mMiniSplitter );
1411#endif 1411#endif
1412 //eh->hide(); 1412 //eh->hide();
1413 // topLayout->addWidget(mExtensionManager ); 1413 // topLayout->addWidget(mExtensionManager );
1414 1414
1415 1415
1416/*US 1416/*US
1417#ifndef KAB_NOSPLITTER 1417#ifndef KAB_NOSPLITTER
1418 QHBoxLayout *topLayout = new QHBoxLayout( this ); 1418 QHBoxLayout *topLayout = new QHBoxLayout( this );
1419//US topLayout->setSpacing( KDialogBase::spacingHint() ); 1419//US topLayout->setSpacing( KDialogBase::spacingHint() );
1420 topLayout->setSpacing( 10 ); 1420 topLayout->setSpacing( 10 );
1421 1421
1422 mDetailsSplitter = new QSplitter( this ); 1422 mDetailsSplitter = new QSplitter( this );
1423 1423
1424 QVBox *viewSpace = new QVBox( mDetailsSplitter ); 1424 QVBox *viewSpace = new QVBox( mDetailsSplitter );
1425 1425
1426 mViewManager = new ViewManager( this, viewSpace ); 1426 mViewManager = new ViewManager( this, viewSpace );
1427 viewSpace->setStretchFactor( mViewManager, 1 ); 1427 viewSpace->setStretchFactor( mViewManager, 1 );
1428 1428
1429 mDetails = new ViewContainer( mDetailsSplitter ); 1429 mDetails = new ViewContainer( mDetailsSplitter );
1430 1430
1431 topLayout->addWidget( mDetailsSplitter ); 1431 topLayout->addWidget( mDetailsSplitter );
1432 topLayout->setStretchFactor( mDetailsSplitter, 100 ); 1432 topLayout->setStretchFactor( mDetailsSplitter, 100 );
1433#else //KAB_NOSPLITTER 1433#else //KAB_NOSPLITTER
1434 QHBoxLayout *topLayout = new QHBoxLayout( this ); 1434 QHBoxLayout *topLayout = new QHBoxLayout( this );
1435//US topLayout->setSpacing( KDialogBase::spacingHint() ); 1435//US topLayout->setSpacing( KDialogBase::spacingHint() );
1436 topLayout->setSpacing( 10 ); 1436 topLayout->setSpacing( 10 );
1437 1437
1438// mDetailsSplitter = new QSplitter( this ); 1438// mDetailsSplitter = new QSplitter( this );
1439 1439
1440 QVBox *viewSpace = new QVBox( this ); 1440 QVBox *viewSpace = new QVBox( this );
1441 1441
1442 mViewManager = new ViewManager( this, viewSpace ); 1442 mViewManager = new ViewManager( this, viewSpace );
1443 viewSpace->setStretchFactor( mViewManager, 1 ); 1443 viewSpace->setStretchFactor( mViewManager, 1 );
1444 1444
1445 mDetails = new ViewContainer( this ); 1445 mDetails = new ViewContainer( this );
1446 1446
1447 topLayout->addWidget( viewSpace ); 1447 topLayout->addWidget( viewSpace );
1448// topLayout->setStretchFactor( mDetailsSplitter, 100 ); 1448// topLayout->setStretchFactor( mDetailsSplitter, 100 );
1449 topLayout->addWidget( mDetails ); 1449 topLayout->addWidget( mDetails );
1450#endif //KAB_NOSPLITTER 1450#endif //KAB_NOSPLITTER
1451*/ 1451*/
1452 1452
1453 1453
1454#endif //KAB_EMBEDDED 1454#endif //KAB_EMBEDDED
1455 initActions(); 1455 initActions();
1456 1456
1457#ifdef KAB_EMBEDDED 1457#ifdef KAB_EMBEDDED
1458 addActionsManually(); 1458 addActionsManually();
1459 //US make sure the export and import menues are initialized before creating the xxPortManager. 1459 //US make sure the export and import menues are initialized before creating the xxPortManager.
1460 mXXPortManager = new XXPortManager( this, this ); 1460 mXXPortManager = new XXPortManager( this, this );
1461 1461
1462 // LR mIncSearchWidget = new IncSearchWidget( mMainWindow->getIconToolBar() ); 1462 // LR mIncSearchWidget = new IncSearchWidget( mMainWindow->getIconToolBar() );
1463 //mMainWindow->toolBar()->insertWidget(-1, 4, mIncSearchWidget); 1463 //mMainWindow->toolBar()->insertWidget(-1, 4, mIncSearchWidget);
1464 // mActionQuit->plug ( mMainWindow->toolBar()); 1464 // mActionQuit->plug ( mMainWindow->toolBar());
1465 //mIncSearchWidget = new IncSearchWidget( mMainWindow->toolBar() ); 1465 //mIncSearchWidget = new IncSearchWidget( mMainWindow->toolBar() );
1466 //mMainWindow->toolBar()->insertWidget(-1, 0, mIncSearchWidget); 1466 //mMainWindow->toolBar()->insertWidget(-1, 0, mIncSearchWidget);
1467 // mIncSearchWidget->hide(); 1467 // mIncSearchWidget->hide();
1468 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), 1468 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ),
1469 SLOT( incrementalSearch( const QString& ) ) ); 1469 SLOT( incrementalSearch( const QString& ) ) );
1470 1470
1471 1471
1472 mJumpButtonBar = new JumpButtonBar( this, this ); 1472 mJumpButtonBar = new JumpButtonBar( this, this );
1473 1473
1474 topLayout->addWidget( mJumpButtonBar ); 1474 topLayout->addWidget( mJumpButtonBar );
1475//US topLayout->setStretchFactor( mJumpButtonBar, 10 ); 1475//US topLayout->setStretchFactor( mJumpButtonBar, 10 );
1476 1476
1477// mMainWindow->getIconToolBar()->raise(); 1477// mMainWindow->getIconToolBar()->raise();
1478 1478
1479#endif //KAB_EMBEDDED 1479#endif //KAB_EMBEDDED
1480 1480
1481} 1481}
1482void KABCore::initActions() 1482void KABCore::initActions()
1483{ 1483{
1484//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); 1484//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart);
1485 1485
1486#ifndef KAB_EMBEDDED 1486#ifndef KAB_EMBEDDED
1487 connect( QApplication::clipboard(), SIGNAL( dataChanged() ), 1487 connect( QApplication::clipboard(), SIGNAL( dataChanged() ),
1488 SLOT( clipboardDataChanged() ) ); 1488 SLOT( clipboardDataChanged() ) );
1489#endif //KAB_EMBEDDED 1489#endif //KAB_EMBEDDED
1490 1490
1491 // file menu 1491 // file menu
1492 if ( mIsPart ) { 1492 if ( mIsPart ) {
1493 mActionMail = new KAction( i18n( "&Mail" ), "mail_generic", 0, this, 1493 mActionMail = new KAction( i18n( "&Mail" ), "mail_generic", 0, this,
1494 SLOT( sendMail() ), actionCollection(), 1494 SLOT( sendMail() ), actionCollection(),
1495 "kaddressbook_mail" ); 1495 "kaddressbook_mail" );
1496 mActionPrint = new KAction( i18n( "&Print" ), "fileprint", CTRL + Key_P, this, 1496 mActionPrint = new KAction( i18n( "&Print" ), "fileprint", CTRL + Key_P, this,
1497 SLOT( print() ), actionCollection(), "kaddressbook_print" ); 1497 SLOT( print() ), actionCollection(), "kaddressbook_print" );
1498 1498
1499 } else { 1499 } else {
1500 mActionMail = KStdAction::mail( this, SLOT( sendMail() ), actionCollection() ); 1500 mActionMail = KStdAction::mail( this, SLOT( sendMail() ), actionCollection() );
1501 mActionPrint = KStdAction::print( this, SLOT( print() ), actionCollection() ); 1501 mActionPrint = KStdAction::print( this, SLOT( print() ), actionCollection() );
1502 } 1502 }
1503 1503
1504 1504
1505 mActionSave = new KAction( i18n( "&Save" ), "filesave", CTRL+Key_S, this, 1505 mActionSave = new KAction( i18n( "&Save" ), "filesave", CTRL+Key_S, this,
1506 SLOT( save() ), actionCollection(), "file_sync" ); 1506 SLOT( save() ), actionCollection(), "file_sync" );
1507 1507
1508 mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", CTRL+Key_N, this, 1508 mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", CTRL+Key_N, this,
1509 SLOT( newContact() ), actionCollection(), "file_new_contact" ); 1509 SLOT( newContact() ), actionCollection(), "file_new_contact" );
1510 1510
1511 mActionMailVCard = new KAction(i18n("Mail &vCard..."), "mail_post_to", 0, 1511 mActionMailVCard = new KAction(i18n("Mail &vCard..."), "mail_post_to", 0,
1512 this, SLOT( mailVCard() ), 1512 this, SLOT( mailVCard() ),
1513 actionCollection(), "file_mail_vcard"); 1513 actionCollection(), "file_mail_vcard");
1514 1514
1515 mActionBeamVCard = 0; 1515 mActionBeamVCard = 0;
1516 mActionBeam = 0; 1516 mActionBeam = 0;
1517 1517
1518#ifndef DESKTOP_VERSION 1518#ifndef DESKTOP_VERSION
1519 if ( Ir::supported() ) { 1519 if ( Ir::supported() ) {
1520 mActionBeamVCard = new KAction( i18n( "Beam selected v&Card(s)" ), "beam", 0, this, 1520 mActionBeamVCard = new KAction( i18n( "Beam selected v&Card(s)" ), "beam", 0, this,
1521 SLOT( beamVCard() ), actionCollection(), 1521 SLOT( beamVCard() ), actionCollection(),
1522 "kaddressbook_beam_vcard" ); 1522 "kaddressbook_beam_vcard" );
1523 1523
1524 mActionBeam = new KAction( i18n( "&Beam personal vCard" ), "beam", 0, this, 1524 mActionBeam = new KAction( i18n( "&Beam personal vCard" ), "beam", 0, this,
1525 SLOT( beamMySelf() ), actionCollection(), 1525 SLOT( beamMySelf() ), actionCollection(),
1526 "kaddressbook_beam_myself" ); 1526 "kaddressbook_beam_myself" );
1527 } 1527 }
1528#endif 1528#endif
1529 1529
1530 mActionEditAddressee = new KAction( i18n( "&Edit Contact..." ), "edit", 0, 1530 mActionEditAddressee = new KAction( i18n( "&Edit Contact..." ), "edit", 0,
1531 this, SLOT( editContact2() ), 1531 this, SLOT( editContact2() ),
1532 actionCollection(), "file_properties" ); 1532 actionCollection(), "file_properties" );
1533 1533
1534#ifdef KAB_EMBEDDED 1534#ifdef KAB_EMBEDDED
1535 // mActionQuit = KStdAction::quit( mMainWindow, SLOT( exit() ), actionCollection() ); 1535 // mActionQuit = KStdAction::quit( mMainWindow, SLOT( exit() ), actionCollection() );
1536 mActionQuit = new KAction( i18n( "&Exit" ), "exit", 0, 1536 mActionQuit = new KAction( i18n( "&Exit" ), "exit", 0,
1537 mMainWindow, SLOT( exit() ), 1537 mMainWindow, SLOT( exit() ),
1538 actionCollection(), "quit" ); 1538 actionCollection(), "quit" );
1539#endif //KAB_EMBEDDED 1539#endif //KAB_EMBEDDED
1540 1540
1541 // edit menu 1541 // edit menu
1542 if ( mIsPart ) { 1542 if ( mIsPart ) {
1543 mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", CTRL + Key_C, this, 1543 mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", CTRL + Key_C, this,
1544 SLOT( copyContacts() ), actionCollection(), 1544 SLOT( copyContacts() ), actionCollection(),
1545 "kaddressbook_copy" ); 1545 "kaddressbook_copy" );
1546 mActionCut = new KAction( i18n( "Cu&t" ), "editcut", CTRL + Key_X, this, 1546 mActionCut = new KAction( i18n( "Cu&t" ), "editcut", CTRL + Key_X, this,
1547 SLOT( cutContacts() ), actionCollection(), 1547 SLOT( cutContacts() ), actionCollection(),
1548 "kaddressbook_cut" ); 1548 "kaddressbook_cut" );
1549 mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", CTRL + Key_V, this, 1549 mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", CTRL + Key_V, this,
1550 SLOT( pasteContacts() ), actionCollection(), 1550 SLOT( pasteContacts() ), actionCollection(),
1551 "kaddressbook_paste" ); 1551 "kaddressbook_paste" );
1552 mActionSelectAll = new KAction( i18n( "Select &All" ), CTRL + Key_A, this, 1552 mActionSelectAll = new KAction( i18n( "Select &All" ), CTRL + Key_A, this,
1553 SLOT( selectAllContacts() ), actionCollection(), 1553 SLOT( selectAllContacts() ), actionCollection(),
1554 "kaddressbook_select_all" ); 1554 "kaddressbook_select_all" );
1555 mActionUndo = new KAction( i18n( "&Undo" ), "undo", CTRL + Key_Z, this, 1555 mActionUndo = new KAction( i18n( "&Undo" ), "undo", CTRL + Key_Z, this,
1556 SLOT( undo() ), actionCollection(), 1556 SLOT( undo() ), actionCollection(),
1557 "kaddressbook_undo" ); 1557 "kaddressbook_undo" );
1558 mActionRedo = new KAction( i18n( "Re&do" ), "redo", CTRL + SHIFT + Key_Z, 1558 mActionRedo = new KAction( i18n( "Re&do" ), "redo", CTRL + SHIFT + Key_Z,
1559 this, SLOT( redo() ), actionCollection(), 1559 this, SLOT( redo() ), actionCollection(),
1560 "kaddressbook_redo" ); 1560 "kaddressbook_redo" );
1561 } else { 1561 } else {
1562 mActionCopy = KStdAction::copy( this, SLOT( copyContacts() ), actionCollection() ); 1562 mActionCopy = KStdAction::copy( this, SLOT( copyContacts() ), actionCollection() );
1563 mActionCut = KStdAction::cut( this, SLOT( cutContacts() ), actionCollection() ); 1563 mActionCut = KStdAction::cut( this, SLOT( cutContacts() ), actionCollection() );
1564 mActionPaste = KStdAction::paste( this, SLOT( pasteContacts() ), actionCollection() ); 1564 mActionPaste = KStdAction::paste( this, SLOT( pasteContacts() ), actionCollection() );
1565 mActionSelectAll = KStdAction::selectAll( this, SLOT( selectAllContacts() ), actionCollection() ); 1565 mActionSelectAll = KStdAction::selectAll( this, SLOT( selectAllContacts() ), actionCollection() );
1566 mActionUndo = KStdAction::undo( this, SLOT( undo() ), actionCollection() ); 1566 mActionUndo = KStdAction::undo( this, SLOT( undo() ), actionCollection() );
1567 mActionRedo = KStdAction::redo( this, SLOT( redo() ), actionCollection() ); 1567 mActionRedo = KStdAction::redo( this, SLOT( redo() ), actionCollection() );
1568 } 1568 }
1569 1569
1570 mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete", 1570 mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete",
1571 Key_Delete, this, SLOT( deleteContacts() ), 1571 Key_Delete, this, SLOT( deleteContacts() ),
1572 actionCollection(), "edit_delete" ); 1572 actionCollection(), "edit_delete" );
1573 1573
1574 mActionUndo->setEnabled( false ); 1574 mActionUndo->setEnabled( false );
1575 mActionRedo->setEnabled( false ); 1575 mActionRedo->setEnabled( false );
1576 1576
1577 // settings menu 1577 // settings menu
1578#ifdef KAB_EMBEDDED 1578#ifdef KAB_EMBEDDED
1579//US special menuentry to configure the addressbook resources. On KDE 1579//US special menuentry to configure the addressbook resources. On KDE
1580// you do that through the control center !!! 1580// you do that through the control center !!!
1581 mActionConfigResources = new KAction( i18n( "Configure &Resources..." ), "configure_resources", 0, this, 1581 mActionConfigResources = new KAction( i18n( "Configure &Resources..." ), "configure_resources", 0, this,
1582 SLOT( configureResources() ), actionCollection(), 1582 SLOT( configureResources() ), actionCollection(),
1583 "kaddressbook_configure_resources" ); 1583 "kaddressbook_configure_resources" );
1584#endif //KAB_EMBEDDED 1584#endif //KAB_EMBEDDED
1585 1585
1586 if ( mIsPart ) { 1586 if ( mIsPart ) {
1587 mActionConfigKAddressbook = new KAction( i18n( "&Configure KAddressBook..." ), "configure", 0, this, 1587 mActionConfigKAddressbook = new KAction( i18n( "&Configure KAddressBook..." ), "configure", 0, this,
1588 SLOT( openConfigDialog() ), actionCollection(), 1588 SLOT( openConfigDialog() ), actionCollection(),
1589 "kaddressbook_configure" ); 1589 "kaddressbook_configure" );
1590 1590
1591 mActionConfigShortcuts = new KAction( i18n( "Configure S&hortcuts..." ), "configure_shortcuts", 0, 1591 mActionConfigShortcuts = new KAction( i18n( "Configure S&hortcuts..." ), "configure_shortcuts", 0,
1592 this, SLOT( configureKeyBindings() ), actionCollection(), 1592 this, SLOT( configureKeyBindings() ), actionCollection(),
1593 "kaddressbook_configure_shortcuts" ); 1593 "kaddressbook_configure_shortcuts" );
1594#ifdef KAB_EMBEDDED 1594#ifdef KAB_EMBEDDED
1595 mActionConfigureToolbars = KStdAction::configureToolbars( this, SLOT( mMainWindow->configureToolbars() ), actionCollection() ); 1595 mActionConfigureToolbars = KStdAction::configureToolbars( this, SLOT( mMainWindow->configureToolbars() ), actionCollection() );
1596 mActionConfigureToolbars->setEnabled( false ); 1596 mActionConfigureToolbars->setEnabled( false );
1597#endif //KAB_EMBEDDED 1597#endif //KAB_EMBEDDED
1598 1598
1599 } else { 1599 } else {
1600 mActionConfigKAddressbook = KStdAction::preferences( this, SLOT( openConfigDialog() ), actionCollection() ); 1600 mActionConfigKAddressbook = KStdAction::preferences( this, SLOT( openConfigDialog() ), actionCollection() );
1601 1601
1602 mActionKeyBindings = KStdAction::keyBindings( this, SLOT( configureKeyBindings() ), actionCollection() ); 1602 mActionKeyBindings = KStdAction::keyBindings( this, SLOT( configureKeyBindings() ), actionCollection() );
1603 } 1603 }
1604 1604
1605 mActionJumpBar = new KToggleAction( i18n( "Show Jump Bar" ), 0, 0, 1605 mActionJumpBar = new KToggleAction( i18n( "Show Jump Bar" ), 0, 0,
1606 actionCollection(), "options_show_jump_bar" ); 1606 actionCollection(), "options_show_jump_bar" );
1607 connect( mActionJumpBar, SIGNAL( toggled( bool ) ), SLOT( setJumpButtonBarVisible( bool ) ) ); 1607 connect( mActionJumpBar, SIGNAL( toggled( bool ) ), SLOT( setJumpButtonBarVisible( bool ) ) );
1608 1608
1609 mActionDetails = new KToggleAction( i18n( "Show Details" ), 0, 0, 1609 mActionDetails = new KToggleAction( i18n( "Show Details" ), 0, 0,
1610 actionCollection(), "options_show_details" ); 1610 actionCollection(), "options_show_details" );
1611 connect( mActionDetails, SIGNAL( toggled( bool ) ), SLOT( setDetailsVisible( bool ) ) ); 1611 connect( mActionDetails, SIGNAL( toggled( bool ) ), SLOT( setDetailsVisible( bool ) ) );
1612 1612
1613 // misc 1613 // misc
1614 // only enable LDAP lookup if we can handle the protocol 1614 // only enable LDAP lookup if we can handle the protocol
1615#ifndef KAB_EMBEDDED 1615#ifndef KAB_EMBEDDED
1616 if ( KProtocolInfo::isKnownProtocol( KURL( "ldap://localhost" ) ) ) { 1616 if ( KProtocolInfo::isKnownProtocol( KURL( "ldap://localhost" ) ) ) {
1617 new KAction( i18n( "&Lookup Addresses in Directory" ), "find", 0, 1617 new KAction( i18n( "&Lookup Addresses in Directory" ), "find", 0,
1618 this, SLOT( openLDAPDialog() ), actionCollection(), 1618 this, SLOT( openLDAPDialog() ), actionCollection(),
1619 "ldap_lookup" ); 1619 "ldap_lookup" );
1620 } 1620 }
1621#else //KAB_EMBEDDED 1621#else //KAB_EMBEDDED
1622 //qDebug("KABCore::initActions() LDAP has to be implemented"); 1622 //qDebug("KABCore::initActions() LDAP has to be implemented");
1623#endif //KAB_EMBEDDED 1623#endif //KAB_EMBEDDED
1624 1624
1625 1625
1626 mActionWhoAmI = new KAction( i18n( "Set Who Am I" ), "personal", 0, this, 1626 mActionWhoAmI = new KAction( i18n( "Set Who Am I" ), "personal", 0, this,
1627 SLOT( setWhoAmI() ), actionCollection(), 1627 SLOT( setWhoAmI() ), actionCollection(),
1628 "set_personal" ); 1628 "set_personal" );
1629 1629
1630 1630
1631 1631
1632 1632
1633 mActionCategories = new KAction( i18n( "Set Categories" ), 0, this, 1633 mActionCategories = new KAction( i18n( "Set Categories" ), 0, this,
1634 SLOT( setCategories() ), actionCollection(), 1634 SLOT( setCategories() ), actionCollection(),
1635 "edit_set_categories" ); 1635 "edit_set_categories" );
1636 1636
1637 mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this, 1637 mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this,
1638 SLOT( removeVoice() ), actionCollection(), 1638 SLOT( removeVoice() ), actionCollection(),
1639 "remove_voice" ); 1639 "remove_voice" );
1640 mActionImportOL = new KAction( i18n( "Import from OL..." ), 0, this, 1640 mActionImportOL = new KAction( i18n( "Import from OL..." ), 0, this,
1641 SLOT( importFromOL() ), actionCollection(), 1641 SLOT( importFromOL() ), actionCollection(),
1642 "import_OL" ); 1642 "import_OL" );
1643#ifdef KAB_EMBEDDED 1643#ifdef KAB_EMBEDDED
1644 mActionLicence = new KAction( i18n( "Licence" ), "licence", 0, 1644 mActionLicence = new KAction( i18n( "Licence" ), "licence", 0,
1645 this, SLOT( showLicence() ), actionCollection(), 1645 this, SLOT( showLicence() ), actionCollection(),
1646 "licence_about_data" ); 1646 "licence_about_data" );
1647 mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0, 1647 mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0,
1648 this, SLOT( createAboutData() ), actionCollection(), 1648 this, SLOT( createAboutData() ), actionCollection(),
1649 "kaddressbook_about_data" ); 1649 "kaddressbook_about_data" );
1650#endif //KAB_EMBEDDED 1650#endif //KAB_EMBEDDED
1651 1651
1652 clipboardDataChanged(); 1652 clipboardDataChanged();
1653 connect( UndoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); 1653 connect( UndoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) );
1654 connect( RedoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); 1654 connect( RedoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) );
1655} 1655}
1656 1656
1657//US we need this function, to plug all actions into the correct menues. 1657//US we need this function, to plug all actions into the correct menues.
1658// KDE uses a XML format to plug the actions, but we work her without this overhead. 1658// KDE uses a XML format to plug the actions, but we work her without this overhead.
1659void KABCore::addActionsManually() 1659void KABCore::addActionsManually()
1660{ 1660{
1661//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); 1661//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart);
1662 1662
1663#ifdef KAB_EMBEDDED 1663#ifdef KAB_EMBEDDED
1664 QPopupMenu *fileMenu = new QPopupMenu( this ); 1664 QPopupMenu *fileMenu = new QPopupMenu( this );
1665 QPopupMenu *editMenu = new QPopupMenu( this ); 1665 QPopupMenu *editMenu = new QPopupMenu( this );
1666 QPopupMenu *helpMenu = new QPopupMenu( this ); 1666 QPopupMenu *helpMenu = new QPopupMenu( this );
1667 1667
1668 KToolBar* tb = mMainWindow->toolBar(); 1668 KToolBar* tb = mMainWindow->toolBar();
1669 1669
1670#ifdef DESKTOP_VERSION 1670#ifdef DESKTOP_VERSION
1671 QMenuBar* mb = mMainWindow->menuBar(); 1671 QMenuBar* mb = mMainWindow->menuBar();
1672 1672
1673 //US setup menubar. 1673 //US setup menubar.
1674 //Disable the following block if you do not want to have a menubar. 1674 //Disable the following block if you do not want to have a menubar.
1675 mb->insertItem( "&File", fileMenu ); 1675 mb->insertItem( "&File", fileMenu );
1676 mb->insertItem( "&Edit", editMenu ); 1676 mb->insertItem( "&Edit", editMenu );
1677 mb->insertItem( "&View", viewMenu ); 1677 mb->insertItem( "&View", viewMenu );
1678 mb->insertItem( "&Settings", settingsMenu ); 1678 mb->insertItem( "&Settings", settingsMenu );
1679 mb->insertItem( "&Change selected", changeMenu ); 1679 mb->insertItem( "&Change selected", changeMenu );
1680 mb->insertItem( "&Help", helpMenu ); 1680 mb->insertItem( "&Help", helpMenu );
1681 mIncSearchWidget = new IncSearchWidget( tb ); 1681 mIncSearchWidget = new IncSearchWidget( tb );
1682 // tb->insertWidget(-1, 0, mIncSearchWidget); 1682 // tb->insertWidget(-1, 0, mIncSearchWidget);
1683 1683
1684#else 1684#else
1685 //US setup toolbar 1685 //US setup toolbar
1686 QMenuBar *menuBarTB = new QMenuBar( tb ); 1686 QMenuBar *menuBarTB = new QMenuBar( tb );
1687 QPopupMenu *popupBarTB = new QPopupMenu( this ); 1687 QPopupMenu *popupBarTB = new QPopupMenu( this );
1688 menuBarTB->insertItem( "ME", popupBarTB); 1688 menuBarTB->insertItem( "ME", popupBarTB);
1689 tb->insertWidget(-1, 0, menuBarTB); 1689 tb->insertWidget(-1, 0, menuBarTB);
1690 mIncSearchWidget = new IncSearchWidget( tb ); 1690 mIncSearchWidget = new IncSearchWidget( tb );
1691 1691
1692 tb->enableMoving(false); 1692 tb->enableMoving(false);
1693 popupBarTB->insertItem( "&File", fileMenu ); 1693 popupBarTB->insertItem( "&File", fileMenu );
1694 popupBarTB->insertItem( "&Edit", editMenu ); 1694 popupBarTB->insertItem( "&Edit", editMenu );
1695 popupBarTB->insertItem( "&View", viewMenu ); 1695 popupBarTB->insertItem( "&View", viewMenu );
1696 popupBarTB->insertItem( "&Settings", settingsMenu ); 1696 popupBarTB->insertItem( "&Settings", settingsMenu );
1697 mViewManager->getFilterAction()->plug ( popupBarTB); 1697 mViewManager->getFilterAction()->plug ( popupBarTB);
1698 popupBarTB->insertItem( "&Change selected", changeMenu ); 1698 popupBarTB->insertItem( "&Change selected", changeMenu );
1699 popupBarTB->insertItem( "&Help", helpMenu ); 1699 popupBarTB->insertItem( "&Help", helpMenu );
1700 if (QApplication::desktop()->width() > 320 ) { 1700 if (QApplication::desktop()->width() > 320 ) {
1701 // mViewManager->getFilterAction()->plug ( tb); 1701 // mViewManager->getFilterAction()->plug ( tb);
1702 } 1702 }
1703#endif 1703#endif
1704 // mActionQuit->plug ( mMainWindow->toolBar()); 1704 // mActionQuit->plug ( mMainWindow->toolBar());
1705 1705
1706 1706
1707 1707
1708 //US Now connect the actions with the menue entries. 1708 //US Now connect the actions with the menue entries.
1709 mActionPrint->plug( fileMenu ); 1709 mActionPrint->plug( fileMenu );
1710 mActionMail->plug( fileMenu ); 1710 mActionMail->plug( fileMenu );
1711 fileMenu->insertSeparator(); 1711 fileMenu->insertSeparator();
1712 1712
1713 mActionNewContact->plug( fileMenu ); 1713 mActionNewContact->plug( fileMenu );
1714 mActionNewContact->plug( tb ); 1714 mActionNewContact->plug( tb );
1715 1715
1716 mActionEditAddressee->plug( fileMenu ); 1716 mActionEditAddressee->plug( fileMenu );
1717 fileMenu->insertSeparator(); 1717 fileMenu->insertSeparator();
1718 mActionSave->plug( fileMenu ); 1718 mActionSave->plug( fileMenu );
1719 fileMenu->insertItem( "&Import", ImportMenu ); 1719 fileMenu->insertItem( "&Import", ImportMenu );
1720 fileMenu->insertItem( "&Emport", ExportMenu ); 1720 fileMenu->insertItem( "&Emport", ExportMenu );
1721 fileMenu->insertSeparator(); 1721 fileMenu->insertSeparator();
1722 mActionMailVCard->plug( fileMenu ); 1722 mActionMailVCard->plug( fileMenu );
1723#ifndef DESKTOP_VERSION 1723#ifndef DESKTOP_VERSION
1724 if ( Ir::supported() ) mActionBeamVCard->plug( fileMenu ); 1724 if ( Ir::supported() ) mActionBeamVCard->plug( fileMenu );
1725 if ( Ir::supported() ) mActionBeam->plug(fileMenu ); 1725 if ( Ir::supported() ) mActionBeam->plug(fileMenu );
1726#endif 1726#endif
1727 fileMenu->insertSeparator(); 1727 fileMenu->insertSeparator();
1728 mActionQuit->plug( fileMenu ); 1728 mActionQuit->plug( fileMenu );
1729#ifdef _WIN32_ 1729#ifdef _WIN32_
1730 mActionImportOL->plug( ImportMenu ); 1730 mActionImportOL->plug( ImportMenu );
1731#endif 1731#endif
1732 // edit menu 1732 // edit menu
1733 mActionUndo->plug( editMenu ); 1733 mActionUndo->plug( editMenu );
1734 mActionRedo->plug( editMenu ); 1734 mActionRedo->plug( editMenu );
1735 editMenu->insertSeparator(); 1735 editMenu->insertSeparator();
1736 mActionCut->plug( editMenu ); 1736 mActionCut->plug( editMenu );
1737 mActionCopy->plug( editMenu ); 1737 mActionCopy->plug( editMenu );
1738 mActionPaste->plug( editMenu ); 1738 mActionPaste->plug( editMenu );
1739 mActionDelete->plug( editMenu ); 1739 mActionDelete->plug( editMenu );
1740 editMenu->insertSeparator(); 1740 editMenu->insertSeparator();
1741 mActionSelectAll->plug( editMenu ); 1741 mActionSelectAll->plug( editMenu );
1742 1742
1743 mActionRemoveVoice->plug( changeMenu ); 1743 mActionRemoveVoice->plug( changeMenu );
1744 // settings menu 1744 // settings menu
1745//US special menuentry to configure the addressbook resources. On KDE 1745//US special menuentry to configure the addressbook resources. On KDE
1746// you do that through the control center !!! 1746// you do that through the control center !!!
1747 mActionConfigResources->plug( settingsMenu ); 1747 mActionConfigResources->plug( settingsMenu );
1748 settingsMenu->insertSeparator(); 1748 settingsMenu->insertSeparator();
1749 1749
1750 mActionConfigKAddressbook->plug( settingsMenu ); 1750 mActionConfigKAddressbook->plug( settingsMenu );
1751 1751
1752 if ( mIsPart ) { 1752 if ( mIsPart ) {
1753 mActionConfigShortcuts->plug( settingsMenu ); 1753 mActionConfigShortcuts->plug( settingsMenu );
1754 mActionConfigureToolbars->plug( settingsMenu ); 1754 mActionConfigureToolbars->plug( settingsMenu );
1755 1755
1756 } else { 1756 } else {
1757 mActionKeyBindings->plug( settingsMenu ); 1757 mActionKeyBindings->plug( settingsMenu );
1758 } 1758 }
1759 1759
1760 settingsMenu->insertSeparator(); 1760 settingsMenu->insertSeparator();
1761 1761
1762 mActionJumpBar->plug( settingsMenu ); 1762 mActionJumpBar->plug( settingsMenu );
1763 mActionDetails->plug( settingsMenu ); 1763 mActionDetails->plug( settingsMenu );
1764 settingsMenu->insertSeparator(); 1764 settingsMenu->insertSeparator();
1765 1765
1766 mActionWhoAmI->plug( settingsMenu ); 1766 mActionWhoAmI->plug( settingsMenu );
1767 mActionCategories->plug( settingsMenu ); 1767 mActionCategories->plug( settingsMenu );
1768 1768
1769 mActionAboutKAddressbook->plug( helpMenu ); 1769 mActionAboutKAddressbook->plug( helpMenu );
1770 mActionLicence->plug( helpMenu ); 1770 mActionLicence->plug( helpMenu );
1771 1771
1772 if (QApplication::desktop()->width() > 320 ) { 1772 if (QApplication::desktop()->width() > 320 ) {
1773 1773
1774 mActionEditAddressee->plug( tb ); 1774 mActionEditAddressee->plug( tb );
1775 mActionSave->plug( tb ); 1775 mActionSave->plug( tb );
1776 mViewManager->getFilterAction()->plug ( tb); 1776 mViewManager->getFilterAction()->plug ( tb);
1777 if (QApplication::desktop()->width() > 480 ) { 1777 if (QApplication::desktop()->width() > 480 ) {
1778 mActionUndo->plug( tb ); 1778 mActionUndo->plug( tb );
1779 mActionDelete->plug( tb ); 1779 mActionDelete->plug( tb );
1780 mActionRedo->plug( tb ); 1780 mActionRedo->plug( tb );
1781 } 1781 }
1782 } 1782 }
1783 //mActionQuit->plug ( tb ); 1783 //mActionQuit->plug ( tb );
1784 // tb->insertWidget(-1, 0, mIncSearchWidget, 6); 1784 // tb->insertWidget(-1, 0, mIncSearchWidget, 6);
1785 1785
1786 //US link the searchwidget first to this. 1786 //US link the searchwidget first to this.
1787 // The real linkage to the toolbar happens later. 1787 // The real linkage to the toolbar happens later.
1788//US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE); 1788//US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE);
1789//US tb->insertItem( mIncSearchWidget ); 1789//US tb->insertItem( mIncSearchWidget );
1790/*US 1790/*US
1791 mIncSearchWidget = new IncSearchWidget( tb ); 1791 mIncSearchWidget = new IncSearchWidget( tb );
1792 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), 1792 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ),
1793 SLOT( incrementalSearch( const QString& ) ) ); 1793 SLOT( incrementalSearch( const QString& ) ) );
1794 1794
1795 mJumpButtonBar = new JumpButtonBar( this, this ); 1795 mJumpButtonBar = new JumpButtonBar( this, this );
1796 1796
1797//US topLayout->addWidget( mJumpButtonBar ); 1797//US topLayout->addWidget( mJumpButtonBar );
1798 this->layout()->add( mJumpButtonBar ); 1798 this->layout()->add( mJumpButtonBar );
1799*/ 1799*/
1800 1800
1801#endif //KAB_EMBEDDED 1801#endif //KAB_EMBEDDED
1802} 1802}
1803void KABCore::showLicence() 1803void KABCore::showLicence()
1804{ 1804{
1805 KApplication::showLicence(); 1805 KApplication::showLicence();
1806} 1806}
1807void KABCore::removeVoice() 1807void KABCore::removeVoice()
1808{ 1808{
1809 if ( KMessageBox::questionYesNo( this, i18n("After importing, phone numbers\nmay have two or more types.\n(E.g. work+voice)\nThese numbers are shown as \"other\".\nClick Yes to remove the voice type\nfrom numbers with more than one type.\n\nRemove voice type?") ) == KMessageBox::No ) 1809 if ( KMessageBox::questionYesNo( this, i18n("After importing, phone numbers\nmay have two or more types.\n(E.g. work+voice)\nThese numbers are shown as \"other\".\nClick Yes to remove the voice type\nfrom numbers with more than one type.\n\nRemove voice type?") ) == KMessageBox::No )
1810 return; 1810 return;
1811 KABC::Addressee::List list = mViewManager->selectedAddressees(); 1811 KABC::Addressee::List list = mViewManager->selectedAddressees();
1812 KABC::Addressee::List::Iterator it; 1812 KABC::Addressee::List::Iterator it;
1813 for ( it = list.begin(); it != list.end(); ++it ) { 1813 for ( it = list.begin(); it != list.end(); ++it ) {
1814 PhoneNumber::List phoneNumbers = (*it).phoneNumbers(); 1814 PhoneNumber::List phoneNumbers = (*it).phoneNumbers();
1815 PhoneNumber::List::Iterator phoneIt; 1815 PhoneNumber::List::Iterator phoneIt;
1816 bool found = false; 1816 bool found = false;
1817 for ( phoneIt = phoneNumbers.begin(); phoneIt != phoneNumbers.end(); ++phoneIt ) { 1817 for ( phoneIt = phoneNumbers.begin(); phoneIt != phoneNumbers.end(); ++phoneIt ) {
1818 if ( (*phoneIt).type() & PhoneNumber::Voice) { // voice found 1818 if ( (*phoneIt).type() & PhoneNumber::Voice) { // voice found
1819 if ((*phoneIt).type() - PhoneNumber::Voice ) { 1819 if ((*phoneIt).type() - PhoneNumber::Voice ) {
1820 (*phoneIt).setType((*phoneIt).type() - PhoneNumber::Voice ); 1820 (*phoneIt).setType((*phoneIt).type() - PhoneNumber::Voice );
1821 (*it).insertPhoneNumber( (*phoneIt) ); 1821 (*it).insertPhoneNumber( (*phoneIt) );
1822 found = true; 1822 found = true;
1823 } 1823 }
1824 } 1824 }
1825 1825
1826 } 1826 }
1827 if ( found ) 1827 if ( found )
1828 contactModified((*it) ); 1828 contactModified((*it) );
1829 } 1829 }
1830} 1830}
1831 1831
1832 1832
1833 1833
1834void KABCore::clipboardDataChanged() 1834void KABCore::clipboardDataChanged()
1835{ 1835{
1836 1836
1837 if ( mReadWrite ) 1837 if ( mReadWrite )
1838 mActionPaste->setEnabled( !QApplication::clipboard()->text().isEmpty() ); 1838 mActionPaste->setEnabled( !QApplication::clipboard()->text().isEmpty() );
1839 1839
1840} 1840}
1841 1841
1842void KABCore::updateActionMenu() 1842void KABCore::updateActionMenu()
1843{ 1843{
1844 UndoStack *undo = UndoStack::instance(); 1844 UndoStack *undo = UndoStack::instance();
1845 RedoStack *redo = RedoStack::instance(); 1845 RedoStack *redo = RedoStack::instance();
1846 1846
1847 if ( undo->isEmpty() ) 1847 if ( undo->isEmpty() )
1848 mActionUndo->setText( i18n( "Undo" ) ); 1848 mActionUndo->setText( i18n( "Undo" ) );
1849 else 1849 else
1850 mActionUndo->setText( i18n( "Undo %1" ).arg( undo->top()->name() ) ); 1850 mActionUndo->setText( i18n( "Undo %1" ).arg( undo->top()->name() ) );
1851 1851
1852 mActionUndo->setEnabled( !undo->isEmpty() ); 1852 mActionUndo->setEnabled( !undo->isEmpty() );
1853 1853
1854 if ( !redo->top() ) 1854 if ( !redo->top() )
1855 mActionRedo->setText( i18n( "Redo" ) ); 1855 mActionRedo->setText( i18n( "Redo" ) );
1856 else 1856 else
1857 mActionRedo->setText( i18n( "Redo %1" ).arg( redo->top()->name() ) ); 1857 mActionRedo->setText( i18n( "Redo %1" ).arg( redo->top()->name() ) );
1858 1858
1859 mActionRedo->setEnabled( !redo->isEmpty() ); 1859 mActionRedo->setEnabled( !redo->isEmpty() );
1860} 1860}
1861 1861
1862void KABCore::configureKeyBindings() 1862void KABCore::configureKeyBindings()
1863{ 1863{
1864#ifndef KAB_EMBEDDED 1864#ifndef KAB_EMBEDDED
1865 KKeyDialog::configure( actionCollection(), true ); 1865 KKeyDialog::configure( actionCollection(), true );
1866#else //KAB_EMBEDDED 1866#else //KAB_EMBEDDED
1867 qDebug("KABCore::configureKeyBindings() not implemented"); 1867 qDebug("KABCore::configureKeyBindings() not implemented");
1868#endif //KAB_EMBEDDED 1868#endif //KAB_EMBEDDED
1869} 1869}
1870 1870
1871#ifdef KAB_EMBEDDED 1871#ifdef KAB_EMBEDDED
1872void KABCore::configureResources() 1872void KABCore::configureResources()
1873{ 1873{
1874 KRES::KCMKResources dlg( this, "" , 0 ); 1874 KRES::KCMKResources dlg( this, "" , 0 );
1875 1875
1876 if ( !dlg.exec() ) 1876 if ( !dlg.exec() )
1877 return; 1877 return;
1878 KMessageBox::information( this, i18n("Please restart to get the \nchanged resources (re)loaded!\n") ); 1878 KMessageBox::information( this, i18n("Please restart to get the \nchanged resources (re)loaded!\n") );
1879} 1879}
1880#endif //KAB_EMBEDDED 1880#endif //KAB_EMBEDDED
1881 1881
1882 1882
1883 1883
1884#ifndef KAB_EMBEDDED 1884#ifndef KAB_EMBEDDED
1885#include "kabcore.moc" 1885#include "kabcore.moc"
1886#endif //KAB_EMBEDDED 1886#endif //KAB_EMBEDDED
diff --git a/kaddressbook/kaddressbook.pro b/kaddressbook/kaddressbook.pro
index b57317f..fec2341 100644
--- a/kaddressbook/kaddressbook.pro
+++ b/kaddressbook/kaddressbook.pro
@@ -1,183 +1,186 @@
1 TEMPLATE= app 1 TEMPLATE= app
2 CONFIG = qt warn_on 2 CONFIG = qt warn_on
3 TARGET = kapi 3 TARGET = kapi
4DESTDIR= ../bin 4DESTDIR= ../bin
5 5
6include( ../variables.pri ) 6include( ../variables.pri )
7 7
8 8
9INCLUDEPATH += . ./details ./features ./xxport ../libkdepim ../microkde ../microkde/kdecore ../microkde/kutils ../microkde/kio/kfile ../microkde/kio/kio ../microkde/kdeui ../microkde/kresources ../kabc ../ interfaces 9INCLUDEPATH += . ./details ./features ./xxport ../libkdepim ../microkde ../microkde/kdecore ../microkde/kutils ../microkde/kio/kfile ../microkde/kio/kio ../microkde/kdeui ../microkde/kresources ../kabc ../ interfaces
10DEFINES += KAB_EMBEDDED KAB_NOSPLITTER DESKTOP_VERSION 10DEFINES += KAB_EMBEDDED KAB_NOSPLITTER DESKTOP_VERSION
11 11
12unix : { 12unix : {
13LIBS += ../bin/libmicrokdepim.so 13LIBS += ../bin/libmicrokdepim.so
14LIBS += ../bin/libmicrokde.so 14LIBS += ../bin/libmicrokde.so
15LIBS += ../bin/libmicrokabc.so 15LIBS += ../bin/libmicrokabc.so
16LIBS += ../bin/libmicrokcal.so 16LIBS += ../bin/libmicrokcal.so
17LIBS += ../bin/libmicrogammu.so
18LIBS += -lbluetooth
19LIBS += -lsdp
17LIBS += -lldap 20LIBS += -lldap
18OBJECTS_DIR = obj/unix 21OBJECTS_DIR = obj/unix
19MOC_DIR = moc/unix 22MOC_DIR = moc/unix
20} 23}
21win32: { 24win32: {
22DEFINES += _WIN32_ 25DEFINES += _WIN32_
23LIBS += ../bin/microkdepim.lib 26LIBS += ../bin/microkdepim.lib
24LIBS += ../bin/microkcal.lib 27LIBS += ../bin/microkcal.lib
25LIBS += ../bin/microkde.lib 28LIBS += ../bin/microkde.lib
26LIBS += ../bin/microkabc.lib 29LIBS += ../bin/microkabc.lib
27QMAKE_LINK += /NODEFAULTLIB:LIBC 30QMAKE_LINK += /NODEFAULTLIB:LIBC
28OBJECTS_DIR = obj/win 31OBJECTS_DIR = obj/win
29MOC_DIR = moc/win 32MOC_DIR = moc/win
30LIBS += mfc71u.lib 33LIBS += mfc71u.lib
31} 34}
32 35
33 36
34 37
35 38
36 39
37 40
38 41
39 42
40INTERFACES = \ 43INTERFACES = \
41# filteredit_base.ui \ 44# filteredit_base.ui \
42# kofilterview_base.ui \ 45# kofilterview_base.ui \
43 46
44HEADERS = \ 47HEADERS = \
45features/mergewidget.h \ 48features/mergewidget.h \
46features/distributionlistwidget.h \ 49features/distributionlistwidget.h \
47kcmconfigs/addresseewidget.h \ 50kcmconfigs/addresseewidget.h \
48kcmconfigs/extensionconfigdialog.h \ 51kcmconfigs/extensionconfigdialog.h \
49kcmconfigs/kcmkabconfig.h \ 52kcmconfigs/kcmkabconfig.h \
50kcmconfigs/kabconfigwidget.h \ 53kcmconfigs/kabconfigwidget.h \
51addresseeeditordialog.h \ 54addresseeeditordialog.h \
52addresseeeditorwidget.h \ 55addresseeeditorwidget.h \
53addresseditwidget.h \ 56addresseditwidget.h \
54addresseeconfig.h \ 57addresseeconfig.h \
55addresseeutil.h \ 58addresseeutil.h \
56emaileditwidget.h \ 59emaileditwidget.h \
57filtereditdialog.h \ 60filtereditdialog.h \
58kaddressbookmain.h \ 61kaddressbookmain.h \
59kabprefs.h \ 62kabprefs.h \
60kabcore.h \ 63kabcore.h \
61viewmanager.h \ 64viewmanager.h \
62extensionmanager.h \ 65extensionmanager.h \
63extensionwidget.h \ 66extensionwidget.h \
64kaddressbookview.h \ 67kaddressbookview.h \
65geowidget.h \ 68geowidget.h \
66imagewidget.h \ 69imagewidget.h \
67incsearchwidget.h \ 70incsearchwidget.h \
68jumpbuttonbar.h \ 71jumpbuttonbar.h \
69phoneeditwidget.h \ 72phoneeditwidget.h \
70secrecywidget.h \ 73secrecywidget.h \
71keywidget.h \ 74keywidget.h \
72nameeditdialog.h \ 75nameeditdialog.h \
73filter.h \ 76filter.h \
74addviewdialog.h \ 77addviewdialog.h \
75configurewidget.h \ 78configurewidget.h \
76viewconfigurewidget.h \ 79viewconfigurewidget.h \
77viewconfigurefieldspage.h \ 80viewconfigurefieldspage.h \
78viewconfigurefilterpage.h \ 81viewconfigurefilterpage.h \
79typecombo.h \ 82typecombo.h \
80undo.h \ 83undo.h \
81undocmds.h \ 84undocmds.h \
82xxportmanager.h \ 85xxportmanager.h \
83xxportobject.h \ 86xxportobject.h \
84xxportselectdialog.h \ 87xxportselectdialog.h \
85details/detailsviewcontainer.h \ 88details/detailsviewcontainer.h \
86details/look_basic.h \ 89details/look_basic.h \
87details/look_html.h \ 90details/look_html.h \
88views/kaddressbookiconview.h \ 91views/kaddressbookiconview.h \
89views/kaddressbooktableview.h \ 92views/kaddressbooktableview.h \
90views/kaddressbookcardview.h \ 93views/kaddressbookcardview.h \
91views/configuretableviewdialog.h \ 94views/configuretableviewdialog.h \
92views/configurecardviewdialog.h \ 95views/configurecardviewdialog.h \
93views/cardview.h \ 96views/cardview.h \
94views/colorlistbox.h \ 97views/colorlistbox.h \
95views/contactlistview.h \ 98views/contactlistview.h \
96xxport/vcard_xxport.h \ 99xxport/vcard_xxport.h \
97xxport/kde2_xxport.h \ 100xxport/kde2_xxport.h \
98xxport/csv_xxport.h \ 101xxport/csv_xxport.h \
99xxport/csvimportdialog.h \ 102xxport/csvimportdialog.h \
100xxport/opie_xxport.h \ 103xxport/opie_xxport.h \
101xxport/qtopia_xxport.h \ 104xxport/qtopia_xxport.h \
102xxport/sharpdtm_xxport.h \ 105xxport/sharpdtm_xxport.h \
103#details/look_details.h \ 106#details/look_details.h \
104#mainwindoiw.h \ 107#mainwindoiw.h \
105# alarmclient.h \ 108# alarmclient.h \
106# calendarview.h \ 109# calendarview.h \
107# customlistviewitem.h \ 110# customlistviewitem.h \
108# datenavigator.h 111# datenavigator.h
109 112
110SOURCES = \ 113SOURCES = \
111addresseeeditordialog.cpp \ 114addresseeeditordialog.cpp \
112addresseeeditorwidget.cpp \ 115addresseeeditorwidget.cpp \
113addresseditwidget.cpp \ 116addresseditwidget.cpp \
114addresseeconfig.cpp \ 117addresseeconfig.cpp \
115addresseeutil.cpp \ 118addresseeutil.cpp \
116extensionmanager.cpp \ 119extensionmanager.cpp \
117features/mergewidget.cpp \ 120features/mergewidget.cpp \
118features/distributionlistwidget.cpp \ 121features/distributionlistwidget.cpp \
119kcmconfigs/addresseewidget.cpp \ 122kcmconfigs/addresseewidget.cpp \
120kcmconfigs/extensionconfigdialog.cpp \ 123kcmconfigs/extensionconfigdialog.cpp \
121kcmconfigs/kcmkabconfig.cpp \ 124kcmconfigs/kcmkabconfig.cpp \
122kcmconfigs/kabconfigwidget.cpp \ 125kcmconfigs/kabconfigwidget.cpp \
123emaileditwidget.cpp \ 126emaileditwidget.cpp \
124filtereditdialog.cpp \ 127filtereditdialog.cpp \
125mainembedded.cpp \ 128mainembedded.cpp \
126kaddressbookmain.cpp \ 129kaddressbookmain.cpp \
127kabcore.cpp \ 130kabcore.cpp \
128kabprefs.cpp \ 131kabprefs.cpp \
129viewmanager.cpp \ 132viewmanager.cpp \
130kaddressbookview.cpp \ 133kaddressbookview.cpp \
131extensionwidget.cpp \ 134extensionwidget.cpp \
132geowidget.cpp \ 135geowidget.cpp \
133imagewidget.cpp \ 136imagewidget.cpp \
134incsearchwidget.cpp \ 137incsearchwidget.cpp \
135jumpbuttonbar.cpp \ 138jumpbuttonbar.cpp \
136phoneeditwidget.cpp \ 139phoneeditwidget.cpp \
137secrecywidget.cpp \ 140secrecywidget.cpp \
138keywidget.cpp \ 141keywidget.cpp \
139nameeditdialog.cpp \ 142nameeditdialog.cpp \
140filter.cpp \ 143filter.cpp \
141addviewdialog.cpp \ 144addviewdialog.cpp \
142configurewidget.cpp \ 145configurewidget.cpp \
143viewconfigurewidget.cpp \ 146viewconfigurewidget.cpp \
144viewconfigurefieldspage.cpp \ 147viewconfigurefieldspage.cpp \
145viewconfigurefilterpage.cpp \ 148viewconfigurefilterpage.cpp \
146undo.cpp \ 149undo.cpp \
147undocmds.cpp \ 150undocmds.cpp \
148xxportmanager.cpp \ 151xxportmanager.cpp \
149xxportobject.cpp \ 152xxportobject.cpp \
150xxportselectdialog.cpp \ 153xxportselectdialog.cpp \
151details/detailsviewcontainer.cpp \ 154details/detailsviewcontainer.cpp \
152details/look_basic.cpp \ 155details/look_basic.cpp \
153details/look_html.cpp \ 156details/look_html.cpp \
154views/kaddressbookiconview.cpp \ 157views/kaddressbookiconview.cpp \
155views/kaddressbooktableview.cpp \ 158views/kaddressbooktableview.cpp \
156views/kaddressbookcardview.cpp \ 159views/kaddressbookcardview.cpp \
157views/configuretableviewdialog.cpp \ 160views/configuretableviewdialog.cpp \
158views/configurecardviewdialog.cpp \ 161views/configurecardviewdialog.cpp \
159views/cardview.cpp \ 162views/cardview.cpp \
160views/contactlistview.cpp \ 163views/contactlistview.cpp \
161views/colorlistbox.cpp \ 164views/colorlistbox.cpp \
162xxport/vcard_xxport.cpp \ 165xxport/vcard_xxport.cpp \
163xxport/kde2_xxport.cpp \ 166xxport/kde2_xxport.cpp \
164xxport/csv_xxport.cpp \ 167xxport/csv_xxport.cpp \
165xxport/csvimportdialog.cpp \ 168xxport/csvimportdialog.cpp \
166xxport/opie_xxport.cpp \ 169xxport/opie_xxport.cpp \
167xxport/qtopia_xxport.cpp \ 170xxport/qtopia_xxport.cpp \
168xxport/sharpdtm_xxport.cpp \ 171xxport/sharpdtm_xxport.cpp \
169#details/look_details.cpp \ 172#details/look_details.cpp \
170#mainwindow.cpp \ 173#mainwindow.cpp \
171# calendarview.cpp \ 174# calendarview.cpp \
172# timespanview.cpp 175# timespanview.cpp
173 176
174 177
175 178
176win32: { 179win32: {
177HEADERS += ../outport/msoutl9.h \ 180HEADERS += ../outport/msoutl9.h \
178 kaimportoldialog.h 181 kaimportoldialog.h
179 182
180SOURCES += ../outport/msoutl9.cpp \ 183SOURCES += ../outport/msoutl9.cpp \
181 kaimportoldialog.cpp 184 kaimportoldialog.cpp
182} 185}
183 186
diff --git a/kopi-desktop.pro b/kopi-desktop.pro
index b255756..69c874f 100644
--- a/kopi-desktop.pro
+++ b/kopi-desktop.pro
@@ -1,6 +1,6 @@
1 1
2 2
3TEMPLATE = subdirs 3TEMPLATE = subdirs
4SUBDIRS = libical libkcal microkde libkdepim kabc korganizer kaddressbook kabc/plugins/file kabc/plugins/dir 4SUBDIRS = gammu/emb/common libical libkcal microkde libkdepim kabc korganizer kaddressbook kabc/plugins/file kabc/plugins/dir
5#kalarmd 5#kalarmd
6 6
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 042046e..0db8e6d 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -1,565 +1,566 @@
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 <qfont.h> 33#include <qfont.h>
33#include <qcolor.h> 34#include <qcolor.h>
34#include <qstringlist.h> 35#include <qstringlist.h>
35#include <stdlib.h> 36#include <stdlib.h>
36 37
37#include <kglobal.h> 38#include <kglobal.h>
38#include <kconfig.h> 39#include <kconfig.h>
39#include <klocale.h> 40#include <klocale.h>
40#include <kdebug.h> 41#include <kdebug.h>
41#include <kemailsettings.h> 42#include <kemailsettings.h>
42#include <kstaticdeleter.h> 43#include <kstaticdeleter.h>
43 44
44#include "koprefs.h" 45#include "koprefs.h"
45#include "mainwindow.h" 46#include "mainwindow.h"
46 47
47const char *germanwords[][2] = { 48const char *germanwords[][2] = {
48#include "wordsgerman.h" 49#include "wordsgerman.h"
49 "", "" 50 "", ""
50}; 51};
51 52
52KOPrefs *KOPrefs::mInstance = 0; 53KOPrefs *KOPrefs::mInstance = 0;
53static KStaticDeleter<KOPrefs> insd; 54static KStaticDeleter<KOPrefs> insd;
54 55
55KOPrefs::KOPrefs() : 56KOPrefs::KOPrefs() :
56 KPimPrefs("korganizerrc") 57 KPimPrefs("korganizerrc")
57{ 58{
58 mCategoryColors.setAutoDelete(true); 59 mCategoryColors.setAutoDelete(true);
59 mLocaleDict = 0; 60 mLocaleDict = 0;
60 fillMailDefaults(); 61 fillMailDefaults();
61 mDefaultCategoryColor = QColor(175,210,255);//196,196,196); 62 mDefaultCategoryColor = QColor(175,210,255);//196,196,196);
62 QColor defaultHolidayColor = QColor(255,0,0); 63 QColor defaultHolidayColor = QColor(255,0,0);
63 QColor defaultHighlightColor = QColor(129,112,255);//64,64,255); 64 QColor defaultHighlightColor = QColor(129,112,255);//64,64,255);
64 QColor defaultAgendaBgColor = QColor(239,241,169);//128,128,128); 65 QColor defaultAgendaBgColor = QColor(239,241,169);//128,128,128);
65 QColor defaultWorkingHoursColor = QColor(170,223,150);//160,160,160); 66 QColor defaultWorkingHoursColor = QColor(170,223,150);//160,160,160);
66 QColor defaultTodoDueTodayColor = QColor(255,220,100); 67 QColor defaultTodoDueTodayColor = QColor(255,220,100);
67 QColor defaultTodoOverdueColor = QColor(255,153,125); 68 QColor defaultTodoOverdueColor = QColor(255,153,125);
68 69
69 mTimeBarFont = QFont("helvetica",10);//,QFont::Bold); 70 mTimeBarFont = QFont("helvetica",10);//,QFont::Bold);
70 mDefaultViewFont = QFont("helvetica",10); 71 mDefaultViewFont = QFont("helvetica",10);
71 mDefaultMonthViewFont = QFont("helvetica",8); 72 mDefaultMonthViewFont = QFont("helvetica",8);
72 mMarcusBainsFont= QFont("helvetica",10); 73 mMarcusBainsFont= QFont("helvetica",10);
73 mDateNavigatorFont= QFont("helvetica",10, QFont::Bold); 74 mDateNavigatorFont= QFont("helvetica",10, QFont::Bold);
74 mEditBoxFont = QFont("helvetica",12); 75 mEditBoxFont = QFont("helvetica",12);
75 mJornalViewFont = QFont("helvetica",12); 76 mJornalViewFont = QFont("helvetica",12);
76 77
77 KPrefs::setCurrentGroup("General"); 78 KPrefs::setCurrentGroup("General");
78 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); 79 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false);
79 80
80 addItemBool("ShowIconNewTodo",&mShowIconNewTodo,true); 81 addItemBool("ShowIconNewTodo",&mShowIconNewTodo,true);
81 addItemBool("ShowIconNewEvent",&mShowIconNewEvent,true); 82 addItemBool("ShowIconNewEvent",&mShowIconNewEvent,true);
82 addItemBool("ShowIconSearch",&mShowIconSearch,true); 83 addItemBool("ShowIconSearch",&mShowIconSearch,true);
83 addItemBool("ShowIconList",&mShowIconList,true); 84 addItemBool("ShowIconList",&mShowIconList,true);
84 addItemBool("ShowIconDay1",&mShowIconDay1,true); 85 addItemBool("ShowIconDay1",&mShowIconDay1,true);
85 addItemBool("ShowIconDay5",&mShowIconDay5,true); 86 addItemBool("ShowIconDay5",&mShowIconDay5,true);
86 addItemBool("ShowIconDay7",&mShowIconDay7,true); 87 addItemBool("ShowIconDay7",&mShowIconDay7,true);
87 addItemBool("ShowIconMonth",&mShowIconMonth,true); 88 addItemBool("ShowIconMonth",&mShowIconMonth,true);
88 addItemBool("ShowIconTodoview",&mShowIconTodoview,true); 89 addItemBool("ShowIconTodoview",&mShowIconTodoview,true);
89 addItemBool("ShowIconBackFast",&mShowIconBackFast,true); 90 addItemBool("ShowIconBackFast",&mShowIconBackFast,true);
90 addItemBool("ShowIconBack",&mShowIconBack,true); 91 addItemBool("ShowIconBack",&mShowIconBack,true);
91 addItemBool("ShowIconToday",&mShowIconToday,true); 92 addItemBool("ShowIconToday",&mShowIconToday,true);
92 addItemBool("ShowIconForward",&mShowIconForward,true); 93 addItemBool("ShowIconForward",&mShowIconForward,true);
93 addItemBool("ShowIconForwardFast",&mShowIconForwardFast,true); 94 addItemBool("ShowIconForwardFast",&mShowIconForwardFast,true);
94 addItemBool("ShowIconWhatsThis",&mShowIconWhatsThis,false); 95 addItemBool("ShowIconWhatsThis",&mShowIconWhatsThis,false);
95 addItemBool("ShowIconNextDays",&mShowIconNextDays,true); 96 addItemBool("ShowIconNextDays",&mShowIconNextDays,true);
96 addItemBool("ShowIconNext",&mShowIconNext,true); 97 addItemBool("ShowIconNext",&mShowIconNext,true);
97 addItemBool("ShowIconJournal",&mShowIconJournal,true); 98 addItemBool("ShowIconJournal",&mShowIconJournal,true);
98 addItemBool("ShowIconStretch",&mShowIconStretch,true); 99 addItemBool("ShowIconStretch",&mShowIconStretch,true);
99 addItemBool("LanguageChanged",&mLanguageChanged,false); 100 addItemBool("LanguageChanged",&mLanguageChanged,false);
100 101
101 addItemBool("AskForQuit",&mAskForQuit,false); 102 addItemBool("AskForQuit",&mAskForQuit,false);
102 103
103#ifndef DESKTOP_VERSION 104#ifndef DESKTOP_VERSION
104 addItemBool("ShowFullMenu",&mShowFullMenu,false); 105 addItemBool("ShowFullMenu",&mShowFullMenu,false);
105#else 106#else
106 addItemBool("ShowFullMenu",&mShowFullMenu,true); 107 addItemBool("ShowFullMenu",&mShowFullMenu,true);
107#endif 108#endif
108 addItemBool("ToolBarHor",&mToolBarHor, true ); 109 addItemBool("ToolBarHor",&mToolBarHor, true );
109 addItemBool("ToolBarUp",&mToolBarUp, false ); 110 addItemBool("ToolBarUp",&mToolBarUp, false );
110 addItemBool("ToolBarMiniIcons",&mToolBarMiniIcons, false ); 111 addItemBool("ToolBarMiniIcons",&mToolBarMiniIcons, false );
111 addItemInt("Whats Next Days",&mWhatsNextDays,3); 112 addItemInt("Whats Next Days",&mWhatsNextDays,3);
112 addItemInt("Whats Next Prios",&mWhatsNextPrios,1); 113 addItemInt("Whats Next Prios",&mWhatsNextPrios,1);
113 114
114 addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true); 115 addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true);
115 addItemBool("ShowCompletedTodo",&mShowCompletedTodo,true); 116 addItemBool("ShowCompletedTodo",&mShowCompletedTodo,true);
116 addItemInt("AllDay Size",&mAllDaySize,28); 117 addItemInt("AllDay Size",&mAllDaySize,28);
117 QString defAlarm = KGlobal::iconLoader()->iconPath()+"koalarm.wav"; 118 QString defAlarm = KGlobal::iconLoader()->iconPath()+"koalarm.wav";
118 addItemString("DefaultAlarmFile",&mDefaultAlarmFile,defAlarm ); 119 addItemString("DefaultAlarmFile",&mDefaultAlarmFile,defAlarm );
119 120
120 addItemStringList("LocationDefaults",&mLocationDefaults ); 121 addItemStringList("LocationDefaults",&mLocationDefaults );
121 addItemStringList("EventSummary User",&mEventSummaryUser); 122 addItemStringList("EventSummary User",&mEventSummaryUser);
122 addItemStringList("TodoSummary User",&mTodoSummaryUser); 123 addItemStringList("TodoSummary User",&mTodoSummaryUser);
123 124
124 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); 125 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false);
125 addItemBool("Enable Project View",&mEnableProjectView,false); 126 addItemBool("Enable Project View",&mEnableProjectView,false);
126 addItemBool("Auto Save",&mAutoSave,false); 127 addItemBool("Auto Save",&mAutoSave,false);
127 addItemInt("Auto Save Interval",&mAutoSaveInterval,3); 128 addItemInt("Auto Save Interval",&mAutoSaveInterval,3);
128 addItemBool("Confirm Deletes",&mConfirm,true); 129 addItemBool("Confirm Deletes",&mConfirm,true);
129 addItemString("Archive File",&mArchiveFile); 130 addItemString("Archive File",&mArchiveFile);
130 addItemString("Html Export File",&mHtmlExportFile, 131 addItemString("Html Export File",&mHtmlExportFile,
131 QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html")); 132 QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html"));
132 addItemBool("Html With Save",&mHtmlWithSave,false); 133 addItemBool("Html With Save",&mHtmlWithSave,false);
133 134
134 KPrefs::setCurrentGroup("Personal Settings"); 135 KPrefs::setCurrentGroup("Personal Settings");
135 136
136 addItemInt("Mail Client",&mMailClient,MailClientKMail); 137 addItemInt("Mail Client",&mMailClient,MailClientKMail);
137 addItemBool("Use Control Center Email",&mEmailControlCenter,false); 138 addItemBool("Use Control Center Email",&mEmailControlCenter,false);
138 addItemBool("Bcc",&mBcc,false); 139 addItemBool("Bcc",&mBcc,false);
139 140
140 KPrefs::setCurrentGroup("Time & Date"); 141 KPrefs::setCurrentGroup("Time & Date");
141 142
142 // addItemString("Time Zone",&mTimeZone,"+0100"); 143 // addItemString("Time Zone",&mTimeZone,"+0100");
143 addItemString("TimeZoneName",&mTimeZoneId,i18n ("+01:00 Europe/Oslo(CET)") ); 144 addItemString("TimeZoneName",&mTimeZoneId,i18n ("+01:00 Europe/Oslo(CET)") );
144 // addItemInt("TimeZoneOffset",&mTimeZoneOffset,60); 145 // addItemInt("TimeZoneOffset",&mTimeZoneOffset,60);
145 addItemBool("UseDaylightsaving",&mUseDaylightsaving,true); 146 addItemBool("UseDaylightsaving",&mUseDaylightsaving,true);
146 addItemInt("DaylightsavingStart",&mDaylightsavingStart,90); 147 addItemInt("DaylightsavingStart",&mDaylightsavingStart,90);
147 addItemInt("DaylightsavingEnd",&mDaylightsavingEnd,304); 148 addItemInt("DaylightsavingEnd",&mDaylightsavingEnd,304);
148 149
149 150
150 addItemInt("Default Start Time",&mStartTime,10); 151 addItemInt("Default Start Time",&mStartTime,10);
151 addItemInt("Default Duration",&mDefaultDuration,2); 152 addItemInt("Default Duration",&mDefaultDuration,2);
152 addItemInt("Default Alarm Time",&mAlarmTime,3); 153 addItemInt("Default Alarm Time",&mAlarmTime,3);
153 addItemInt("Daylight Savings",&mDaylightSavings,0); 154 addItemInt("Daylight Savings",&mDaylightSavings,0);
154 KPrefs::setCurrentGroup("AlarmSettings"); 155 KPrefs::setCurrentGroup("AlarmSettings");
155 addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20); 156 addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20);
156 addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7); 157 addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7);
157 addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5); 158 addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5);
158 addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3); 159 addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3);
159 160
160 161
161 KPrefs::setCurrentGroup("Calendar"); 162 KPrefs::setCurrentGroup("Calendar");
162 163
163 addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar); 164 addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar);
164 165
165 KPrefs::setCurrentGroup("Fonts"); 166 KPrefs::setCurrentGroup("Fonts");
166 // qDebug(" KPrefs::setCurrentGroup(Fonts); "); 167 // qDebug(" KPrefs::setCurrentGroup(Fonts); ");
167 addItemFont("TimeBar Font",&mTimeBarFont); 168 addItemFont("TimeBar Font",&mTimeBarFont);
168 addItemFont("MonthView Font",&mMonthViewFont); 169 addItemFont("MonthView Font",&mMonthViewFont);
169 addItemFont("AgendaView Font",&mAgendaViewFont); 170 addItemFont("AgendaView Font",&mAgendaViewFont);
170 addItemFont("MarcusBains Font",&mMarcusBainsFont); 171 addItemFont("MarcusBains Font",&mMarcusBainsFont);
171 addItemFont("TimeLabels Font",&mTimeLabelsFont); 172 addItemFont("TimeLabels Font",&mTimeLabelsFont);
172 addItemFont("TodoView Font",&mTodoViewFont); 173 addItemFont("TodoView Font",&mTodoViewFont);
173 addItemFont("ListView Font",&mListViewFont); 174 addItemFont("ListView Font",&mListViewFont);
174 addItemFont("DateNavigator Font",&mDateNavigatorFont); 175 addItemFont("DateNavigator Font",&mDateNavigatorFont);
175 addItemFont("EditBox Font",&mEditBoxFont); 176 addItemFont("EditBox Font",&mEditBoxFont);
176 addItemFont("JournalView Font",&mJornalViewFont); 177 addItemFont("JournalView Font",&mJornalViewFont);
177 addItemFont("WhatsNextView Font",&mWhatsNextFont); 178 addItemFont("WhatsNextView Font",&mWhatsNextFont);
178 addItemFont("EventView Font",&mEventViewFont); 179 addItemFont("EventView Font",&mEventViewFont);
179 180
180// KPrefs::setCurrentGroup("SyncProfiles"); 181// KPrefs::setCurrentGroup("SyncProfiles");
181// addItemString("LocalMachineName",&mLocalMachineName, "undefined"); 182// addItemString("LocalMachineName",&mLocalMachineName, "undefined");
182// addItemStringList("SyncProfileNames",&mSyncProfileNames); 183// addItemStringList("SyncProfileNames",&mSyncProfileNames);
183// addItemStringList("ExternSyncProfiles",&mExternSyncProfileNames); 184// addItemStringList("ExternSyncProfiles",&mExternSyncProfileNames);
184 185
185 KPrefs::setCurrentGroup("RemoteSyncing"); 186 KPrefs::setCurrentGroup("RemoteSyncing");
186// addItemBool("UsePasswd",&mUsePassWd,false); 187// addItemBool("UsePasswd",&mUsePassWd,false);
187// addItemBool("WriteBackFile",&mWriteBackFile,true); 188// addItemBool("WriteBackFile",&mWriteBackFile,true);
188// addItemBool("WriteBackExistingOnly",&mWriteBackExistingOnly,false); 189// addItemBool("WriteBackExistingOnly",&mWriteBackExistingOnly,false);
189// addItemBool("AskForPreferences",&mAskForPreferences,true); 190// addItemBool("AskForPreferences",&mAskForPreferences,true);
190// addItemBool("ShowSyncSummary",&mShowSyncSummary,true); 191// addItemBool("ShowSyncSummary",&mShowSyncSummary,true);
191 addItemBool("ShowSyncEvents",&mShowSyncEvents,false); 192 addItemBool("ShowSyncEvents",&mShowSyncEvents,false);
192 addItemInt("LastSyncTime",&mLastSyncTime,0); 193 addItemInt("LastSyncTime",&mLastSyncTime,0);
193 addItemInt("SyncAlgoPrefs",&mSyncAlgoPrefs,3); 194 addItemInt("SyncAlgoPrefs",&mSyncAlgoPrefs,3);
194 addItemInt("RingSyncAlgoPrefs",&mRingSyncAlgoPrefs,3); 195 addItemInt("RingSyncAlgoPrefs",&mRingSyncAlgoPrefs,3);
195 196
196#ifdef _WIN32_ 197#ifdef _WIN32_
197 QString hdp= locateLocal("data","korganizer")+"\\\\"; 198 QString hdp= locateLocal("data","korganizer")+"\\\\";
198#else 199#else
199 QString hdp= locateLocal("data","korganizer")+"/"; 200 QString hdp= locateLocal("data","korganizer")+"/";
200#endif 201#endif
201// addItemString("RemoteIP",&mRemoteIP, "192.168.0.65"); 202// addItemString("RemoteIP",&mRemoteIP, "192.168.0.65");
202// addItemString("RemoteUser",&mRemoteUser, "zaurus"); 203// addItemString("RemoteUser",&mRemoteUser, "zaurus");
203// addItemString("RemotePassWd",&mRemotePassWd, ""); 204// addItemString("RemotePassWd",&mRemotePassWd, "");
204// addItemString("RemoteFile", &mRemoteFile, hdp+"mycalendar.ics"); 205// addItemString("RemoteFile", &mRemoteFile, hdp+"mycalendar.ics");
205// addItemString("LocalTempFile",&mLocalTempFile, "/tmp/tempsyncfile.ics" ); 206// addItemString("LocalTempFile",&mLocalTempFile, "/tmp/tempsyncfile.ics" );
206 207
207 208
208 KPrefs::setCurrentGroup("LoadSaveFileNames"); 209 KPrefs::setCurrentGroup("LoadSaveFileNames");
209 210
210 addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" ); 211 addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" );
211 addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" ); 212 addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" );
212 addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" ); 213 addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" );
213 addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" ); 214 addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" );
214 addItemString("LastSyncedLocalFile", &mLastSyncedLocalFile ,hdp +"lastsync.ics" ); 215 addItemString("LastSyncedLocalFile", &mLastSyncedLocalFile ,hdp +"lastsync.ics" );
215 216
216 217
217 KPrefs::setCurrentGroup("Locale"); 218 KPrefs::setCurrentGroup("Locale");
218 addItemInt("PreferredLanguage",&mPreferredLanguage,0); 219 addItemInt("PreferredLanguage",&mPreferredLanguage,0);
219 addItemInt("PreferredTime",&mPreferredTime,0); 220 addItemInt("PreferredTime",&mPreferredTime,0);
220 addItemInt("PreferredDate",&mPreferredDate,0); 221 addItemInt("PreferredDate",&mPreferredDate,0);
221 addItemBool("WeekStartsOnSunday",&mWeekStartsOnSunday,false); 222 addItemBool("WeekStartsOnSunday",&mWeekStartsOnSunday,false);
222 addItemBool("QuickSavingWOUnicode",&mUseQuicksave,false); 223 addItemBool("QuickSavingWOUnicode",&mUseQuicksave,false);
223 addItemBool("ShortDateInViewer",&mShortDateInViewer,false); 224 addItemBool("ShortDateInViewer",&mShortDateInViewer,false);
224 addItemString("UserDateFormatLong", &mUserDateFormatLong, "%A %d %b %y"); 225 addItemString("UserDateFormatLong", &mUserDateFormatLong, "%A %d %b %y");
225 addItemString("UserDateFormatShort", &mUserDateFormatShort, "%aK %d.%m.%y"); 226 addItemString("UserDateFormatShort", &mUserDateFormatShort, "%aK %d.%m.%y");
226 227
227 228
228 KPrefs::setCurrentGroup("Colors"); 229 KPrefs::setCurrentGroup("Colors");
229 addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor); 230 addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor);
230 addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor); 231 addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor);
231 addItemColor("Event Color",&mEventColor,mDefaultCategoryColor); 232 addItemColor("Event Color",&mEventColor,mDefaultCategoryColor);
232 addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor); 233 addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor);
233 addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor); 234 addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor);
234 addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor); 235 addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor);
235 addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor); 236 addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor);
236 addItemColor("MonthViewEvenColor",&mMonthViewEvenColor,QColor( 160,160,255 )); 237 addItemColor("MonthViewEvenColor",&mMonthViewEvenColor,QColor( 160,160,255 ));
237 addItemColor("MonthViewOddColor",&mMonthViewOddColor,QColor( 160,255,160 )); 238 addItemColor("MonthViewOddColor",&mMonthViewOddColor,QColor( 160,255,160 ));
238 addItemColor("MonthViewHolidayColor",&mMonthViewHolidayColor,QColor( 255,160,160 )); 239 addItemColor("MonthViewHolidayColor",&mMonthViewHolidayColor,QColor( 255,160,160 ));
239 addItemBool("MonthViewUsesDayColors",&mMonthViewUsesDayColors,true); 240 addItemBool("MonthViewUsesDayColors",&mMonthViewUsesDayColors,true);
240 addItemBool("MonthViewSatSunTog",&mMonthViewSatSunTog,true); 241 addItemBool("MonthViewSatSunTog",&mMonthViewSatSunTog,true);
241 addItemBool("HightlightDateTimeEdit",&mHightlightDateTimeEdit,false); 242 addItemBool("HightlightDateTimeEdit",&mHightlightDateTimeEdit,false);
242 addItemColor("AppColor1",&mAppColor1,QColor( 130,170,255 )); 243 addItemColor("AppColor1",&mAppColor1,QColor( 130,170,255 ));
243 addItemColor("AppColor2",&mAppColor2,QColor( 174,216,255 )); 244 addItemColor("AppColor2",&mAppColor2,QColor( 174,216,255 ));
244 addItemBool("UseAppColors",&mUseAppColors,false); 245 addItemBool("UseAppColors",&mUseAppColors,false);
245 246
246 247
247 248
248 KPrefs::setCurrentGroup("Views"); 249 KPrefs::setCurrentGroup("Views");
249 addItemInt("Hour Size",&mHourSize,8); 250 addItemInt("Hour Size",&mHourSize,8);
250 addItemBool("Show Daily Recurrences",&mDailyRecur,true); 251 addItemBool("Show Daily Recurrences",&mDailyRecur,true);
251 addItemBool("Show Weekly Recurrences",&mWeeklyRecur,true); 252 addItemBool("Show Weekly Recurrences",&mWeeklyRecur,true);
252 addItemBool("Show Month Daily Recurrences",&mMonthDailyRecur,true); 253 addItemBool("Show Month Daily Recurrences",&mMonthDailyRecur,true);
253 addItemBool("Show Month Weekly Recurrences",&mMonthWeeklyRecur,true); 254 addItemBool("Show Month Weekly Recurrences",&mMonthWeeklyRecur,true);
254 addItemBool("ShowShortMonthName",&mMonthShowShort,false); 255 addItemBool("ShowShortMonthName",&mMonthShowShort,false);
255 addItemBool("ShowIconsInMonthCell",&mMonthShowIcons,true); 256 addItemBool("ShowIconsInMonthCell",&mMonthShowIcons,true);
256 addItemBool("Enable ToolTips",&mEnableToolTips,false); 257 addItemBool("Enable ToolTips",&mEnableToolTips,false);
257 addItemBool("Enable MonthView ScrollBars",&mEnableMonthScroll,false); 258 addItemBool("Enable MonthView ScrollBars",&mEnableMonthScroll,false);
258 addItemBool("Marcus Bains shows seconds",&mMarcusBainsShowSeconds,false); 259 addItemBool("Marcus Bains shows seconds",&mMarcusBainsShowSeconds,false);
259 addItemBool("Show Marcus Bains",&mMarcusBainsEnabled,true); 260 addItemBool("Show Marcus Bains",&mMarcusBainsEnabled,true);
260 addItemBool("EditOnDoubleClick",&mEditOnDoubleClick,true); 261 addItemBool("EditOnDoubleClick",&mEditOnDoubleClick,true);
261 addItemBool("ViewChangeHoldFullscreen",&mViewChangeHoldFullscreen,false); 262 addItemBool("ViewChangeHoldFullscreen",&mViewChangeHoldFullscreen,false);
262 addItemBool("ViewChangeHoldNonFullscreen",&mViewChangeHoldNonFullscreen,false); 263 addItemBool("ViewChangeHoldNonFullscreen",&mViewChangeHoldNonFullscreen,false);
263 addItemBool("CenterOnCurrentTime",&mCenterOnCurrentTime,false); 264 addItemBool("CenterOnCurrentTime",&mCenterOnCurrentTime,false);
264 addItemBool("SetTimeToDayStartAt",&mSetTimeToDayStartAt,true); 265 addItemBool("SetTimeToDayStartAt",&mSetTimeToDayStartAt,true);
265 addItemBool("HighlightCurrentDay",&mHighlightCurrentDay,true); 266 addItemBool("HighlightCurrentDay",&mHighlightCurrentDay,true);
266 addItemBool("WNViewShowsParents",&mWNViewShowsParents,true); 267 addItemBool("WNViewShowsParents",&mWNViewShowsParents,true);
267 addItemBool("WNViewShowLocation",&mWNViewShowLocation,false); 268 addItemBool("WNViewShowLocation",&mWNViewShowLocation,false);
268 addItemBool("UseHighlightLightColor",&mUseHighlightLightColor,false); 269 addItemBool("UseHighlightLightColor",&mUseHighlightLightColor,false);
269 addItemBool("ListViewMonthTimespan",&mListViewMonthTimespan,true); 270 addItemBool("ListViewMonthTimespan",&mListViewMonthTimespan,true);
270 addItemBool("TodoViewUsesCatColors",&mTodoViewUsesCatColors,false); 271 addItemBool("TodoViewUsesCatColors",&mTodoViewUsesCatColors,false);
271 addItemBool("TodoViewShowsPercentage",&mTodoViewShowsPercentage,false); 272 addItemBool("TodoViewShowsPercentage",&mTodoViewShowsPercentage,false);
272 addItemBool("TodoViewUsesSmallFont",&mTodoViewUsesSmallFont,false); 273 addItemBool("TodoViewUsesSmallFont",&mTodoViewUsesSmallFont,false);
273 addItemBool("TodoViewUsesForegroundColor",&mTodoViewUsesForegroundColor,false); 274 addItemBool("TodoViewUsesForegroundColor",&mTodoViewUsesForegroundColor,false);
274 addItemBool("MonthViewUsesForegroundColor",&mMonthViewUsesForegroundColor,false); 275 addItemBool("MonthViewUsesForegroundColor",&mMonthViewUsesForegroundColor,false);
275#ifdef DESKTOP_VERSION 276#ifdef DESKTOP_VERSION
276 addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,true); 277 addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,true);
277#else 278#else
278 addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,false); 279 addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,false);
279#endif 280#endif
280 addItemInt("Day Begins",&mDayBegins,7); 281 addItemInt("Day Begins",&mDayBegins,7);
281 addItemInt("Working Hours Start",&mWorkingHoursStart,8); 282 addItemInt("Working Hours Start",&mWorkingHoursStart,8);
282 addItemInt("Working Hours End",&mWorkingHoursEnd,17); 283 addItemInt("Working Hours End",&mWorkingHoursEnd,17);
283 addItemBool("Exclude Holidays",&mExcludeHolidays,true); 284 addItemBool("Exclude Holidays",&mExcludeHolidays,true);
284 addItemBool("Exclude Saturdays",&mExcludeSaturdays,true); 285 addItemBool("Exclude Saturdays",&mExcludeSaturdays,true);
285 286
286 addItemBool("Month View Uses Category Color",&mMonthViewUsesCategoryColor,false); 287 addItemBool("Month View Uses Category Color",&mMonthViewUsesCategoryColor,false);
287 addItemBool("Full View Month",&mFullViewMonth,true); 288 addItemBool("Full View Month",&mFullViewMonth,true);
288 addItemBool("Full View Todo",&mFullViewTodo,true); 289 addItemBool("Full View Todo",&mFullViewTodo,true);
289 addItemBool("Quick Todo",&mEnableQuickTodo,false); 290 addItemBool("Quick Todo",&mEnableQuickTodo,false);
290 291
291 addItemInt("Next X Days",&mNextXDays,3); 292 addItemInt("Next X Days",&mNextXDays,3);
292 293
293 KPrefs::setCurrentGroup("Printer"); 294 KPrefs::setCurrentGroup("Printer");
294 295
295 KPrefs::setCurrentGroup("Layout"); 296 KPrefs::setCurrentGroup("Layout");
296 297
297 addItemBool("CompactDialogs",&mCompactDialogs,false); 298 addItemBool("CompactDialogs",&mCompactDialogs,false);
298 addItemBool("VerticalScreen",&mVerticalScreen,true); 299 addItemBool("VerticalScreen",&mVerticalScreen,true);
299 300
300 KPrefs::setCurrentGroup("KOrganizer Plugins"); 301 KPrefs::setCurrentGroup("KOrganizer Plugins");
301 302
302 addItemStringList("SelectedPlugins",&mSelectedPlugins,"holidays"); 303 addItemStringList("SelectedPlugins",&mSelectedPlugins,"holidays");
303 304
304 KPrefs::setCurrentGroup("Group Scheduling"); 305 KPrefs::setCurrentGroup("Group Scheduling");
305 306
306 addItemInt("IMIPScheduler",&mIMIPScheduler,IMIPKMail); 307 addItemInt("IMIPScheduler",&mIMIPScheduler,IMIPKMail);
307 addItemInt("IMIPSend",&mIMIPSend,IMIPdirectsend); 308 addItemInt("IMIPSend",&mIMIPSend,IMIPdirectsend);
308 addItemStringList("AdditionalMails",&mAdditionalMails,""); 309 addItemStringList("AdditionalMails",&mAdditionalMails,"");
309 addItemInt("IMIP auto refresh",&mIMIPAutoRefresh,neverAuto); 310 addItemInt("IMIP auto refresh",&mIMIPAutoRefresh,neverAuto);
310 addItemInt("IMIP auto insert request",&mIMIPAutoInsertRequest,neverAuto); 311 addItemInt("IMIP auto insert request",&mIMIPAutoInsertRequest,neverAuto);
311 addItemInt("IMIP auto insert reply",&mIMIPAutoInsertReply,neverAuto); 312 addItemInt("IMIP auto insert reply",&mIMIPAutoInsertReply,neverAuto);
312 addItemInt("IMIP auto FreeBusy",&mIMIPAutoFreeBusy,neverAuto); 313 addItemInt("IMIP auto FreeBusy",&mIMIPAutoFreeBusy,neverAuto);
313 addItemInt("IMIP auto save FreeBusy",&mIMIPAutoFreeBusyReply,neverAuto); 314 addItemInt("IMIP auto save FreeBusy",&mIMIPAutoFreeBusyReply,neverAuto);
314 315
315 KPrefs::setCurrentGroup( "Editors" ); 316 KPrefs::setCurrentGroup( "Editors" );
316 317
317 addItemStringList( "EventTemplates", &mEventTemplates ); 318 addItemStringList( "EventTemplates", &mEventTemplates );
318 addItemStringList( "TodoTemplates", &mTodoTemplates ); 319 addItemStringList( "TodoTemplates", &mTodoTemplates );
319 320
320 addItemInt("DestinationPolicy",&mDestination,standardDestination); 321 addItemInt("DestinationPolicy",&mDestination,standardDestination);
321 322
322 323
323 324
324} 325}
325 326
326 327
327KOPrefs::~KOPrefs() 328KOPrefs::~KOPrefs()
328{ 329{
329 if (mInstance == this) 330 if (mInstance == this)
330 mInstance = insd.setObject(0); 331 mInstance = insd.setObject(0);
331 setLocaleDict( 0 ); 332 setLocaleDict( 0 );
332 if ( mLocaleDict ) 333 if ( mLocaleDict )
333 delete mLocaleDict; 334 delete mLocaleDict;
334 //qDebug("KOPrefs::~KOPrefs() "); 335 //qDebug("KOPrefs::~KOPrefs() ");
335} 336}
336 337
337 338
338KOPrefs *KOPrefs::instance() 339KOPrefs *KOPrefs::instance()
339{ 340{
340 if (!mInstance) { 341 if (!mInstance) {
341 mInstance = insd.setObject(new KOPrefs()); 342 mInstance = insd.setObject(new KOPrefs());
342 mInstance->readConfig(); 343 mInstance->readConfig();
343 } 344 }
344 345
345 return mInstance; 346 return mInstance;
346} 347}
347 348
348void KOPrefs::usrSetDefaults() 349void KOPrefs::usrSetDefaults()
349{ 350{
350 351
351} 352}
352 353
353void KOPrefs::fillMailDefaults() 354void KOPrefs::fillMailDefaults()
354{ 355{
355 if (mName.isEmpty()) mName = i18n("Anonymous"); 356 if (mName.isEmpty()) mName = i18n("Anonymous");
356 if (mEmail.isEmpty()) mEmail = i18n("nobody@nowhere"); 357 if (mEmail.isEmpty()) mEmail = i18n("nobody@nowhere");
357} 358}
358 359
359void KOPrefs::setTimeZoneIdDefault() 360void KOPrefs::setTimeZoneIdDefault()
360{ 361{
361 mTimeZoneId = i18n("+01:00 Europe/Oslo(CET)"); 362 mTimeZoneId = i18n("+01:00 Europe/Oslo(CET)");
362} 363}
363 364
364void KOPrefs::setCategoryDefaults() 365void KOPrefs::setCategoryDefaults()
365{ 366{
366 mCustomCategories.clear(); 367 mCustomCategories.clear();
367 mCustomCategories = getDefaultList(); 368 mCustomCategories = getDefaultList();
368 369
369 QStringList::Iterator it; 370 QStringList::Iterator it;
370 for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { 371 for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) {
371 setCategoryColor(*it,mDefaultCategoryColor); 372 setCategoryColor(*it,mDefaultCategoryColor);
372 } 373 }
373} 374}
374 375
375QStringList KOPrefs::getDefaultList() 376QStringList KOPrefs::getDefaultList()
376{ 377{
377 QStringList retval ; 378 QStringList retval ;
378 retval << i18n("Anniversary") << i18n("Appointment") << i18n("Birthday") << i18n("Business") << i18n("Business Travel") << i18n("Cinema") << i18n("Customer") 379 retval << i18n("Anniversary") << i18n("Appointment") << i18n("Birthday") << i18n("Business") << i18n("Business Travel") << i18n("Cinema") << i18n("Customer")
379 << i18n("Break")<< i18n("Breakfast")<< i18n("Competition")<< i18n("Dinner") 380 << i18n("Break")<< i18n("Breakfast")<< i18n("Competition")<< i18n("Dinner")
380 << i18n("Education")<< i18n("Family") << i18n("Favorites") << i18n("Festival")<< i18n("Fishing")<< i18n("Flight") << i18n("Gifts") 381 << i18n("Education")<< i18n("Family") << i18n("Favorites") << i18n("Festival")<< i18n("Fishing")<< i18n("Flight") << i18n("Gifts")
381 << i18n("Holiday") << i18n("Holiday Cards")<< i18n("Hot Contacts") << i18n("Hiking") << i18n("Hunting") << i18n("Key Customer") << i18n("Kids") 382 << i18n("Holiday") << i18n("Holiday Cards")<< i18n("Hot Contacts") << i18n("Hiking") << i18n("Hunting") << i18n("Key Customer") << i18n("Kids")
382 << i18n("Lunch") << i18n("Meeting") << i18n("Miscellaneous") << i18n("Partner")<< i18n("Party") << i18n("Personal") << i18n("Personal Travel") 383 << i18n("Lunch") << i18n("Meeting") << i18n("Miscellaneous") << i18n("Partner")<< i18n("Party") << i18n("Personal") << i18n("Personal Travel")
383 << i18n("PHB") << i18n("Phone Calls") << i18n("Projects") << i18n("Recurring") << i18n("School") << i18n("Shopping") 384 << i18n("PHB") << i18n("Phone Calls") << i18n("Projects") << i18n("Recurring") << i18n("School") << i18n("Shopping")
384 << i18n("Speach") << i18n("Special Occasion") << i18n("Sports") << i18n("Talk") << i18n("Travel") << i18n("TV")<< i18n("University") 385 << i18n("Speach") << i18n("Special Occasion") << i18n("Sports") << i18n("Talk") << i18n("Travel") << i18n("TV")<< i18n("University")
385 << i18n("Vacation") << i18n("VIP") << i18n("SyncEvent") ; 386 << i18n("Vacation") << i18n("VIP") << i18n("SyncEvent") ;
386 retval.sort(); 387 retval.sort();
387 return retval; 388 return retval;
388} 389}
389 390
390void KOPrefs::usrReadConfig() 391void KOPrefs::usrReadConfig()
391{ 392{
392 mLocaleDict = 0; 393 mLocaleDict = 0;
393 // pending LR fix translation 394 // pending LR fix translation
394 // qDebug("KOPrefs::usrReadConfig() fix translation "); 395 // qDebug("KOPrefs::usrReadConfig() fix translation ");
395 if ( mPreferredLanguage == 1 ) { 396 if ( mPreferredLanguage == 1 ) {
396 mLocaleDict = new QDict<QString>; 397 mLocaleDict = new QDict<QString>;
397 int i = 0; 398 int i = 0;
398 QString fw ( germanwords[i] [0]); 399 QString fw ( germanwords[i] [0]);
399 while ( !fw.isEmpty() ) { 400 while ( !fw.isEmpty() ) {
400 mLocaleDict->insert( fw, new QString (germanwords[i] [1] )); 401 mLocaleDict->insert( fw, new QString (germanwords[i] [1] ));
401 ++i; 402 ++i;
402 fw = germanwords[i] [0]; 403 fw = germanwords[i] [0];
403 } 404 }
404 405
405 setLocaleDict( mLocaleDict ); 406 setLocaleDict( mLocaleDict );
406 } else { 407 } else {
407 QString fileName ; 408 QString fileName ;
408 if ( mPreferredLanguage == 3 ) 409 if ( mPreferredLanguage == 3 )
409 fileName = MainWindow::resourcePath()+"usertranslation.txt"; 410 fileName = MainWindow::resourcePath()+"usertranslation.txt";
410 else if ( mPreferredLanguage == 2 ) 411 else if ( mPreferredLanguage == 2 )
411 fileName = MainWindow::resourcePath()+"frenchtranslation.txt"; 412 fileName = MainWindow::resourcePath()+"frenchtranslation.txt";
412 else return; 413 else return;
413 QFile file( fileName ); 414 QFile file( fileName );
414 if (file.open( IO_ReadOnly ) ) { 415 if (file.open( IO_ReadOnly ) ) {
415 QTextStream ts( &file ); 416 QTextStream ts( &file );
416 ts.setCodec( QTextCodec::codecForLocale() ); 417 ts.setCodec( QTextCodec::codecForLocale() );
417 QString text = ts.read(); 418 QString text = ts.read();
418 file.close(); 419 file.close();
419 text.replace( QRegExp("\\\\n"), "\n" ); 420 text.replace( QRegExp("\\\\n"), "\n" );
420 QString line; 421 QString line;
421 QString we; 422 QString we;
422 QString wt; 423 QString wt;
423 int br = 0; 424 int br = 0;
424 int nbr; 425 int nbr;
425 nbr = text.find ( "},", br ); 426 nbr = text.find ( "},", br );
426 line = text.mid( br, nbr - br ); 427 line = text.mid( br, nbr - br );
427 br = nbr+1; 428 br = nbr+1;
428 int se, ee, st, et; 429 int se, ee, st, et;
429 mLocaleDict = new QDict<QString>; 430 mLocaleDict = new QDict<QString>;
430 QString end = "{ \"\",\"\" }"; 431 QString end = "{ \"\",\"\" }";
431 while ( (line != end) && (br > 1) ) { 432 while ( (line != end) && (br > 1) ) {
432 //qDebug("%d *%s* ", br, line.latin1()); 433 //qDebug("%d *%s* ", br, line.latin1());
433 se = line.find("\"")+1; 434 se = line.find("\"")+1;
434 et = line.findRev("\"",-1); 435 et = line.findRev("\"",-1);
435 ee = line.find("\",\""); 436 ee = line.find("\",\"");
436 st = ee+3; 437 st = ee+3;
437 we = line.mid( se, ee-se ); 438 we = line.mid( se, ee-se );
438 wt = line.mid( st, et-st ); 439 wt = line.mid( st, et-st );
439 //qDebug("*%s* *%s* ", we.latin1(), wt.latin1()); 440 //qDebug("*%s* *%s* ", we.latin1(), wt.latin1());
440 mLocaleDict->insert( we, new QString (wt) ); 441 mLocaleDict->insert( we, new QString (wt) );
441 nbr = text.find ( "}", br ); 442 nbr = text.find ( "}", br );
442 line = text.mid( br, nbr - br ); 443 line = text.mid( br, nbr - br );
443 br = nbr+1; 444 br = nbr+1;
444 } 445 }
445 //qDebug("end *%s* ", end.latin1()); 446 //qDebug("end *%s* ", end.latin1());
446 447
447 setLocaleDict( mLocaleDict ); 448 setLocaleDict( mLocaleDict );
448 } else { 449 } else {
449 qDebug("KO: Cannot find translation file %s",fileName.latin1() ); 450 qDebug("KO: Cannot find translation file %s",fileName.latin1() );
450 } 451 }
451 452
452} 453}
453 config()->setGroup("General"); 454 config()->setGroup("General");
454 455
455 mCustomCategories = config()->readListEntry("Custom Categories"); 456 mCustomCategories = config()->readListEntry("Custom Categories");
456 if ( KOPrefs::instance()->mLanguageChanged ) { 457 if ( KOPrefs::instance()->mLanguageChanged ) {
457 mLocationDefaults.clear(); 458 mLocationDefaults.clear();
458 mEventSummaryUser.clear(); 459 mEventSummaryUser.clear();
459 mTodoSummaryUser.clear(); 460 mTodoSummaryUser.clear();
460 } 461 }
461 if (mLocationDefaults.isEmpty()) { 462 if (mLocationDefaults.isEmpty()) {
462 mLocationDefaults << i18n("Home") << i18n("Office") << i18n("Libary") << i18n("School") << i18n("Doctor") << i18n("Beach") 463 mLocationDefaults << i18n("Home") << i18n("Office") << i18n("Libary") << i18n("School") << i18n("Doctor") << i18n("Beach")
463 << i18n("University") << i18n("Restaurant") << i18n("Bar") << i18n("Conference room") << i18n("Cinema") << i18n("Lake") << i18n("Kindergarden") 464 << i18n("University") << i18n("Restaurant") << i18n("Bar") << i18n("Conference room") << i18n("Cinema") << i18n("Lake") << i18n("Kindergarden")
464 << i18n("Germany") << i18n("Sweden") << i18n("Forest") << i18n("Desert") << i18n("Kitchen") ; 465 << i18n("Germany") << i18n("Sweden") << i18n("Forest") << i18n("Desert") << i18n("Kitchen") ;
465 // << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") 466 // << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("")
466 mLocationDefaults.sort(); 467 mLocationDefaults.sort();
467 } 468 }
468 469
469 if (mEventSummaryUser.isEmpty()) { 470 if (mEventSummaryUser.isEmpty()) {
470 mEventSummaryUser = getDefaultList() ; 471 mEventSummaryUser = getDefaultList() ;
471 } 472 }
472 if (mTodoSummaryUser.isEmpty()) { 473 if (mTodoSummaryUser.isEmpty()) {
473 mTodoSummaryUser = getDefaultList() ; 474 mTodoSummaryUser = getDefaultList() ;
474 } 475 }
475 476
476 if (mCustomCategories.isEmpty()) setCategoryDefaults(); 477 if (mCustomCategories.isEmpty()) setCategoryDefaults();
477 478
478 config()->setGroup("Personal Settings"); 479 config()->setGroup("Personal Settings");
479 mName = config()->readEntry("user_name",""); 480 mName = config()->readEntry("user_name","");
480 mEmail = config()->readEntry("user_email",""); 481 mEmail = config()->readEntry("user_email","");
481 fillMailDefaults(); 482 fillMailDefaults();
482 483
483 config()->setGroup("Category Colors"); 484 config()->setGroup("Category Colors");
484 QStringList::Iterator it; 485 QStringList::Iterator it;
485 for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { 486 for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) {
486 setCategoryColor(*it,config()->readColorEntry(*it,&mDefaultCategoryColor)); 487 setCategoryColor(*it,config()->readColorEntry(*it,&mDefaultCategoryColor));
487 488
488 } 489 }
489 490
490 if (mTimeZoneId.isEmpty()) { 491 if (mTimeZoneId.isEmpty()) {
491 setTimeZoneIdDefault(); 492 setTimeZoneIdDefault();
492 } 493 }
493 KPimPrefs::usrReadConfig(); 494 KPimPrefs::usrReadConfig();
494} 495}
495 496
496 497
497void KOPrefs::usrWriteConfig() 498void KOPrefs::usrWriteConfig()
498{ 499{
499 config()->setGroup("General"); 500 config()->setGroup("General");
500 config()->writeEntry("Custom Categories",mCustomCategories); 501 config()->writeEntry("Custom Categories",mCustomCategories);
501 502
502 config()->setGroup("Personal Settings"); 503 config()->setGroup("Personal Settings");
503 config()->writeEntry("user_name",mName); 504 config()->writeEntry("user_name",mName);
504 config()->writeEntry("user_email",mEmail); 505 config()->writeEntry("user_email",mEmail);
505 506
506 config()->setGroup("Category Colors"); 507 config()->setGroup("Category Colors");
507 QDictIterator<QColor> it(mCategoryColors); 508 QDictIterator<QColor> it(mCategoryColors);
508 while (it.current()) { 509 while (it.current()) {
509 config()->writeEntry(it.currentKey(),*(it.current())); 510 config()->writeEntry(it.currentKey(),*(it.current()));
510 ++it; 511 ++it;
511 } 512 }
512 513
513 514
514 KPimPrefs::usrWriteConfig(); 515 KPimPrefs::usrWriteConfig();
515} 516}
516 517
517void KOPrefs::setCategoryColor(QString cat,const QColor & color) 518void KOPrefs::setCategoryColor(QString cat,const QColor & color)
518{ 519{
519 mCategoryColors.replace(cat,new QColor(color)); 520 mCategoryColors.replace(cat,new QColor(color));
520} 521}
521 522
522QColor *KOPrefs::categoryColor(QString cat) 523QColor *KOPrefs::categoryColor(QString cat)
523{ 524{
524 QColor *color = 0; 525 QColor *color = 0;
525 526
526 if (!cat.isEmpty()) color = mCategoryColors[cat]; 527 if (!cat.isEmpty()) color = mCategoryColors[cat];
527 528
528 if (color) return color; 529 if (color) return color;
529 else return &mDefaultCategoryColor; 530 else return &mDefaultCategoryColor;
530} 531}
531 532
532void KOPrefs::setFullName(const QString &name) 533void KOPrefs::setFullName(const QString &name)
533{ 534{
534 mName = name; 535 mName = name;
535} 536}
536 537
537void KOPrefs::setEmail(const QString &email) 538void KOPrefs::setEmail(const QString &email)
538{ 539{
539 //qDebug(" KOPrefs::setEmai*********** %s",email.latin1() ); 540 //qDebug(" KOPrefs::setEmai*********** %s",email.latin1() );
540 mEmail = email; 541 mEmail = email;
541} 542}
542 543
543QString KOPrefs::fullName() 544QString KOPrefs::fullName()
544{ 545{
545 if (mEmailControlCenter) { 546 if (mEmailControlCenter) {
546 KEMailSettings settings; 547 KEMailSettings settings;
547 return settings.getSetting(KEMailSettings::RealName); 548 return settings.getSetting(KEMailSettings::RealName);
548 } else { 549 } else {
549 return mName; 550 return mName;
550 } 551 }
551} 552}
552 553
553QString KOPrefs::email() 554QString KOPrefs::email()
554{ 555{
555 if (mEmailControlCenter) { 556 if (mEmailControlCenter) {
556 KEMailSettings settings; 557 KEMailSettings settings;
557 return settings.getSetting(KEMailSettings::EmailAddress); 558 return settings.getSetting(KEMailSettings::EmailAddress);
558 } else { 559 } else {
559 return mEmail; 560 return mEmail;
560 } 561 }
561} 562}
562KConfig* KOPrefs::getConfig() 563KConfig* KOPrefs::getConfig()
563{ 564{
564 return config(); 565 return config();
565} 566}
diff --git a/korganizer/korganizer.pro b/korganizer/korganizer.pro
index 02e608c..e501d88 100644
--- a/korganizer/korganizer.pro
+++ b/korganizer/korganizer.pro
@@ -1,189 +1,193 @@
1 TEMPLATE= app 1 TEMPLATE= app
2 CONFIG = qt warn_on 2 CONFIG = qt warn_on
3 TARGET = kopi 3 TARGET = kopi
4OBJECTS_DIR = _obj/ 4OBJECTS_DIR = _obj/
5MOC_DIR = _moc 5MOC_DIR = _moc
6DESTDIR= ../bin 6DESTDIR= ../bin
7 7
8include( ../variables.pri ) 8include( ../variables.pri )
9 9
10INCLUDEPATH += ../microkde ../ interfaces ../microkde/kdecore ../microkde/kdeui ../microkde/kio/kfile ../microkde/kio/kio 10INCLUDEPATH += ../microkde ../ interfaces ../microkde/kdecore ../microkde/kdeui ../microkde/kio/kfile ../microkde/kio/kio
11#../qtcompat 11#../qtcompat
12DEFINES += KORG_NODND KORG_NOPLUGINS KORG_NOARCHIVE KORG_NOMAIL 12DEFINES += KORG_NODND KORG_NOPLUGINS KORG_NOARCHIVE KORG_NOMAIL
13DEFINES += KORG_NODCOP KORG_NOKALARMD KORG_NORESOURCEVIEW KORG_NOSPLITTER 13DEFINES += KORG_NODCOP KORG_NOKALARMD KORG_NORESOURCEVIEW KORG_NOSPLITTER
14#KORG_NOPRINTER KORG_NOKABC 14#KORG_NOPRINTER KORG_NOKABC
15DEFINES += KORG_NOLVALTERNATION 15DEFINES += KORG_NOLVALTERNATION
16DEFINES += DESKTOP_VERSION 16DEFINES += DESKTOP_VERSION
17unix : { 17unix : {
18LIBS += ../bin/libmicrokdepim.so 18LIBS += ../bin/libmicrokdepim.so
19LIBS += ../bin/libmicrokcal.so 19LIBS += ../bin/libmicrokcal.so
20LIBS += ../bin/libmicrokde.so 20LIBS += ../bin/libmicrokde.so
21LIBS += ../bin/libmicrokabc.so 21LIBS += ../bin/libmicrokabc.so
22LIBS += ../bin/libmicrogammu.so
23LIBS += -lbluetooth
24LIBS += -lsdp
25
22LIBS += -lldap 26LIBS += -lldap
23OBJECTS_DIR = obj/unix 27OBJECTS_DIR = obj/unix
24MOC_DIR = moc/unix 28MOC_DIR = moc/unix
25} 29}
26win32: { 30win32: {
27DEFINES += _WIN32_ 31DEFINES += _WIN32_
28LIBS += ../bin/microkdepim.lib 32LIBS += ../bin/microkdepim.lib
29LIBS += ../bin/microkcal.lib 33LIBS += ../bin/microkcal.lib
30LIBS += ../bin/microkde.lib 34LIBS += ../bin/microkde.lib
31LIBS += ../bin/microkabc.lib 35LIBS += ../bin/microkabc.lib
32LIBS += ../libical/lib/ical.lib 36LIBS += ../libical/lib/ical.lib
33LIBS += ../libical/lib/icalss.lib 37LIBS += ../libical/lib/icalss.lib
34#LIBS += atls.lib 38#LIBS += atls.lib
35LIBS += mfc71u.lib 39LIBS += mfc71u.lib
36QMAKE_LINK += /NODEFAULTLIB:LIBC 40QMAKE_LINK += /NODEFAULTLIB:LIBC
37#QMAKE_LINK += /NODEFAULTLIB:MSVCRT 41#QMAKE_LINK += /NODEFAULTLIB:MSVCRT
38#QMAKE_LINK += /NODEFAULTLIB:uafxcw.lib 42#QMAKE_LINK += /NODEFAULTLIB:uafxcw.lib
39OBJECTS_DIR = obj/win 43OBJECTS_DIR = obj/win
40MOC_DIR = moc/win 44MOC_DIR = moc/win
41} 45}
42 46
43 47
44INTERFACES = kofilterview_base.ui 48INTERFACES = kofilterview_base.ui
45# filteredit_base.ui 49# filteredit_base.ui
46 50
47# kdateedit.h \ 51# kdateedit.h \
48 52
49HEADERS = \ 53HEADERS = \
50 filteredit_base.h \ 54 filteredit_base.h \
51 alarmclient.h \ 55 alarmclient.h \
52 calendarview.h \ 56 calendarview.h \
53 customlistviewitem.h \ 57 customlistviewitem.h \
54 datenavigator.h \ 58 datenavigator.h \
55 docprefs.h \ 59 docprefs.h \
56 filtereditdialog.h \ 60 filtereditdialog.h \
57 incomingdialog.h \ 61 incomingdialog.h \
58 incomingdialog_base.h \ 62 incomingdialog_base.h \
59 interfaces/korganizer/baseview.h \ 63 interfaces/korganizer/baseview.h \
60 interfaces/korganizer/calendarviewbase.h \ 64 interfaces/korganizer/calendarviewbase.h \
61 journalentry.h \ 65 journalentry.h \
62 kdatenavigator.h \ 66 kdatenavigator.h \
63 koagenda.h \ 67 koagenda.h \
64 koagendaitem.h \ 68 koagendaitem.h \
65 koagendaview.h \ 69 koagendaview.h \
66 kocounterdialog.h \ 70 kocounterdialog.h \
67 kodaymatrix.h \ 71 kodaymatrix.h \
68 kodialogmanager.h \ 72 kodialogmanager.h \
69 koeditordetails.h \ 73 koeditordetails.h \
70 koeditorgeneral.h \ 74 koeditorgeneral.h \
71 koeditorgeneralevent.h \ 75 koeditorgeneralevent.h \
72 koeditorgeneraltodo.h \ 76 koeditorgeneraltodo.h \
73 koeditorrecurrence.h \ 77 koeditorrecurrence.h \
74 koeventeditor.h \ 78 koeventeditor.h \
75 koeventpopupmenu.h \ 79 koeventpopupmenu.h \
76 koeventview.h \ 80 koeventview.h \
77 koeventviewer.h \ 81 koeventviewer.h \
78 koeventviewerdialog.h \ 82 koeventviewerdialog.h \
79 kofilterview.h \ 83 kofilterview.h \
80 koglobals.h \ 84 koglobals.h \
81 koincidenceeditor.h \ 85 koincidenceeditor.h \
82 kojournalview.h \ 86 kojournalview.h \
83 kolistview.h \ 87 kolistview.h \
84 kolocationbox.h \ 88 kolocationbox.h \
85 komonthview.h \ 89 komonthview.h \
86 koprefs.h \ 90 koprefs.h \
87 koprefsdialog.h \ 91 koprefsdialog.h \
88 kotimespanview.h \ 92 kotimespanview.h \
89 kotodoeditor.h \ 93 kotodoeditor.h \
90 kotodoview.h \ 94 kotodoview.h \
91 kotodoviewitem.h \ 95 kotodoviewitem.h \
92 koviewmanager.h \ 96 koviewmanager.h \
93 kowhatsnextview.h \ 97 kowhatsnextview.h \
94 ktimeedit.h \ 98 ktimeedit.h \
95 lineview.h \ 99 lineview.h \
96 mainwindow.h \ 100 mainwindow.h \
97 navigatorbar.h \ 101 navigatorbar.h \
98 outgoingdialog.h \ 102 outgoingdialog.h \
99 outgoingdialog_base.h \ 103 outgoingdialog_base.h \
100 publishdialog.h \ 104 publishdialog.h \
101 publishdialog_base.h \ 105 publishdialog_base.h \
102 savetemplatedialog.h \ 106 savetemplatedialog.h \
103 searchdialog.h \ 107 searchdialog.h \
104 simplealarmclient.h \ 108 simplealarmclient.h \
105 statusdialog.h \ 109 statusdialog.h \
106 timeline.h \ 110 timeline.h \
107 timespanview.h \ 111 timespanview.h \
108 version.h \ 112 version.h \
109 ../kalarmd/alarmdialog.h \ 113 ../kalarmd/alarmdialog.h \
110 114
111 115
112SOURCES = \ 116SOURCES = \
113filteredit_base.cpp \ 117filteredit_base.cpp \
114 calendarview.cpp \ 118 calendarview.cpp \
115 datenavigator.cpp \ 119 datenavigator.cpp \
116 docprefs.cpp \ 120 docprefs.cpp \
117 filtereditdialog.cpp \ 121 filtereditdialog.cpp \
118 incomingdialog.cpp \ 122 incomingdialog.cpp \
119 incomingdialog_base.cpp \ 123 incomingdialog_base.cpp \
120 journalentry.cpp \ 124 journalentry.cpp \
121 kdatenavigator.cpp \ 125 kdatenavigator.cpp \
122 koagenda.cpp \ 126 koagenda.cpp \
123 koagendaitem.cpp \ 127 koagendaitem.cpp \
124 koagendaview.cpp \ 128 koagendaview.cpp \
125 kocounterdialog.cpp \ 129 kocounterdialog.cpp \
126 kodaymatrix.cpp \ 130 kodaymatrix.cpp \
127 kodialogmanager.cpp \ 131 kodialogmanager.cpp \
128 koeditordetails.cpp \ 132 koeditordetails.cpp \
129 koeditorgeneral.cpp \ 133 koeditorgeneral.cpp \
130 koeditorgeneralevent.cpp \ 134 koeditorgeneralevent.cpp \
131 koeditorgeneraltodo.cpp \ 135 koeditorgeneraltodo.cpp \
132 koeditorrecurrence.cpp \ 136 koeditorrecurrence.cpp \
133 koeventeditor.cpp \ 137 koeventeditor.cpp \
134 koeventpopupmenu.cpp \ 138 koeventpopupmenu.cpp \
135 koeventview.cpp \ 139 koeventview.cpp \
136 koeventviewer.cpp \ 140 koeventviewer.cpp \
137 koeventviewerdialog.cpp \ 141 koeventviewerdialog.cpp \
138 kofilterview.cpp \ 142 kofilterview.cpp \
139 koglobals.cpp \ 143 koglobals.cpp \
140 koincidenceeditor.cpp \ 144 koincidenceeditor.cpp \
141 kojournalview.cpp \ 145 kojournalview.cpp \
142 kolistview.cpp \ 146 kolistview.cpp \
143 kolocationbox.cpp \ 147 kolocationbox.cpp \
144 komonthview.cpp \ 148 komonthview.cpp \
145 koprefs.cpp \ 149 koprefs.cpp \
146 koprefsdialog.cpp \ 150 koprefsdialog.cpp \
147 kotimespanview.cpp \ 151 kotimespanview.cpp \
148 kotodoeditor.cpp \ 152 kotodoeditor.cpp \
149 kotodoview.cpp \ 153 kotodoview.cpp \
150 kotodoviewitem.cpp \ 154 kotodoviewitem.cpp \
151 koviewmanager.cpp \ 155 koviewmanager.cpp \
152 kowhatsnextview.cpp \ 156 kowhatsnextview.cpp \
153 ktimeedit.cpp \ 157 ktimeedit.cpp \
154 lineview.cpp \ 158 lineview.cpp \
155 main.cpp \ 159 main.cpp \
156 mainwindow.cpp \ 160 mainwindow.cpp \
157 navigatorbar.cpp \ 161 navigatorbar.cpp \
158 outgoingdialog.cpp \ 162 outgoingdialog.cpp \
159 outgoingdialog_base.cpp \ 163 outgoingdialog_base.cpp \
160 publishdialog.cpp \ 164 publishdialog.cpp \
161 publishdialog_base.cpp \ 165 publishdialog_base.cpp \
162 savetemplatedialog.cpp \ 166 savetemplatedialog.cpp \
163 searchdialog.cpp \ 167 searchdialog.cpp \
164 simplealarmclient.cpp \ 168 simplealarmclient.cpp \
165 statusdialog.cpp \ 169 statusdialog.cpp \
166 timeline.cpp \ 170 timeline.cpp \
167 timespanview.cpp \ 171 timespanview.cpp \
168 ../kalarmd/alarmdialog.cpp 172 ../kalarmd/alarmdialog.cpp
169 173
170HEADERS += calprintbase.h calprinter.h calprintplugins.h cellitem.h 174HEADERS += calprintbase.h calprinter.h calprintplugins.h cellitem.h
171INTERFACES += calprintdayconfig_base.ui \ 175INTERFACES += calprintdayconfig_base.ui \
172 calprintmonthconfig_base.ui \ 176 calprintmonthconfig_base.ui \
173 calprinttodoconfig_base.ui \ 177 calprinttodoconfig_base.ui \
174 calprintweekconfig_base.ui 178 calprintweekconfig_base.ui
175SOURCES += calprintbase.cpp calprinter.cpp calprintplugins.cpp cellitem.cpp 179SOURCES += calprintbase.cpp calprinter.cpp calprintplugins.cpp cellitem.cpp
176 180
177 181
178 182
179win32: { 183win32: {
180HEADERS += ../outport/msoutl9.h \ 184HEADERS += ../outport/msoutl9.h \
181 koimportoldialog.h 185 koimportoldialog.h
182 186
183 187
184SOURCES += ../outport/msoutl9.cpp \ 188SOURCES += ../outport/msoutl9.cpp \
185 koimportoldialog.cpp 189 koimportoldialog.cpp
186 190
187 191
188} 192}
189 193
diff --git a/libkcal/libkcal.pro b/libkcal/libkcal.pro
index 49aa24b..d02f080 100644
--- a/libkcal/libkcal.pro
+++ b/libkcal/libkcal.pro
@@ -1,100 +1,104 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2 CONFIG += qt warn_on 2 CONFIG += qt warn_on
3 TARGET = microkcal 3 TARGET = microkcal
4 4
5include( ../variables.pri ) 5include( ../variables.pri )
6 6
7INCLUDEPATH += ../microkde versit ../microkde/kdecore 7INCLUDEPATH += ../microkde versit ../microkde/kdecore
8#../qtcompat 8#../qtcompat
9INCLUDEPATH += ../libical/src/libical 9INCLUDEPATH += ../libical/src/libical
10INCLUDEPATH += ../libical/src/libicalss 10INCLUDEPATH += ../libical/src/libicalss
11DESTDIR = ../bin 11DESTDIR = ../bin
12DEFINES += DESKTOP_VERSION 12DEFINES += DESKTOP_VERSION
13unix: { 13unix: {
14LIBS += ../libical/lib/libical.a 14LIBS += ../libical/lib/libical.a
15LIBS += ../libical/lib/libicalss.a 15LIBS += ../libical/lib/libicalss.a
16OBJECTS_DIR = obj/unix 16OBJECTS_DIR = obj/unix
17MOC_DIR = moc/unix 17MOC_DIR = moc/unix
18} 18}
19win32: { 19win32: {
20DEFINES += _WIN32_ 20DEFINES += _WIN32_
21 21
22LIBS += ../libical/lib/ical.lib 22LIBS += ../libical/lib/ical.lib
23LIBS += ../libical/lib/icalss.lib 23LIBS += ../libical/lib/icalss.lib
24OBJECTS_DIR = obj/win 24OBJECTS_DIR = obj/win
25MOC_DIR = moc/win 25MOC_DIR = moc/win
26 26
27} 27}
28 28
29INTERFACES = \ 29INTERFACES = \
30 30
31HEADERS = \ 31HEADERS = \
32 alarm.h \ 32 alarm.h \
33 attachment.h \ 33 attachment.h \
34 attendee.h \ 34 attendee.h \
35 calendar.h \ 35 calendar.h \
36 calendarlocal.h \ 36 calendarlocal.h \
37 calfilter.h \ 37 calfilter.h \
38 calformat.h \ 38 calformat.h \
39 calstorage.h \ 39 calstorage.h \
40 compat.h \ 40 compat.h \
41 customproperties.h \ 41 customproperties.h \
42 dummyscheduler.h \ 42 dummyscheduler.h \
43 duration.h \ 43 duration.h \
44 event.h \ 44 event.h \
45 exceptions.h \ 45 exceptions.h \
46 filestorage.h \ 46 filestorage.h \
47 freebusy.h \ 47 freebusy.h \
48 icaldrag.h \ 48 icaldrag.h \
49 icalformat.h \ 49 icalformat.h \
50 icalformatimpl.h \ 50 icalformatimpl.h \
51 imipscheduler.h \ 51 imipscheduler.h \
52 incidence.h \ 52 incidence.h \
53 incidencebase.h \ 53 incidencebase.h \
54 journal.h \ 54 journal.h \
55 period.h \ 55 period.h \
56 person.h \ 56 person.h \
57 qtopiaformat.h \ 57 qtopiaformat.h \
58 recurrence.h \ 58 recurrence.h \
59 scheduler.h \ 59 scheduler.h \
60 todo.h \ 60 todo.h \
61 vcaldrag.h \ 61 vcaldrag.h \
62 vcalformat.h \ 62 vcalformat.h \
63 versit/port.h \ 63 versit/port.h \
64 versit/vcc.h \ 64 versit/vcc.h \
65 versit/vobject.h \ 65 versit/vobject.h \
66 phoneformat.h \
67
68
66 69
67SOURCES = \ 70SOURCES = \
68 alarm.cpp \ 71 alarm.cpp \
69 attachment.cpp \ 72 attachment.cpp \
70 attendee.cpp \ 73 attendee.cpp \
71 calendar.cpp \ 74 calendar.cpp \
72 calendarlocal.cpp \ 75 calendarlocal.cpp \
73 calfilter.cpp \ 76 calfilter.cpp \
74 calformat.cpp \ 77 calformat.cpp \
75 compat.cpp \ 78 compat.cpp \
76 customproperties.cpp \ 79 customproperties.cpp \
77 dummyscheduler.cpp \ 80 dummyscheduler.cpp \
78 duration.cpp \ 81 duration.cpp \
79 event.cpp \ 82 event.cpp \
80 exceptions.cpp \ 83 exceptions.cpp \
81 filestorage.cpp \ 84 filestorage.cpp \
82 freebusy.cpp \ 85 freebusy.cpp \
83 icaldrag.cpp \ 86 icaldrag.cpp \
84 icalformat.cpp \ 87 icalformat.cpp \
85 icalformatimpl.cpp \ 88 icalformatimpl.cpp \
86 imipscheduler.cpp \ 89 imipscheduler.cpp \
87 incidence.cpp \ 90 incidence.cpp \
88 incidencebase.cpp \ 91 incidencebase.cpp \
89 journal.cpp \ 92 journal.cpp \
90 period.cpp \ 93 period.cpp \
91 person.cpp \ 94 person.cpp \
92 qtopiaformat.cpp \ 95 qtopiaformat.cpp \
93 recurrence.cpp \ 96 recurrence.cpp \
94 scheduler.cpp \ 97 scheduler.cpp \
95 todo.cpp \ 98 todo.cpp \
96 vcaldrag.cpp \ 99 vcaldrag.cpp \
97 vcalformat.cpp \ 100 vcalformat.cpp \
98 versit/vcc.c \ 101 versit/vcc.c \
99 versit/vobject.c \ 102 versit/vobject.c \
103 phoneformat.cpp \
100 104
diff --git a/microkde/microkde.pro b/microkde/microkde.pro
index 4ebf53c..f9adfb1 100644
--- a/microkde/microkde.pro
+++ b/microkde/microkde.pro
@@ -1,171 +1,177 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2 CONFIG += qt warn_on 2 CONFIG += qt warn_on
3#INCLUDEPATH += $(QTDIR)/include . 3#INCLUDEPATH += $(QTDIR)/include .
4#DEPENDPATH += $(QTDIR)/include 4#DEPENDPATH += $(QTDIR)/include
5INCLUDEPATH += . ../ ../kabc ./kdecore ./kdeui ./kio/kfile ./kio/kio 5INCLUDEPATH += . ../ ../kabc ./kdecore ./kdeui ./kio/kfile ./kio/kio
6#LIBS += -lqtcompat 6#LIBS += -lqtcompat
7 7
8 TARGET = microkde 8 TARGET = microkde
9DESTDIR= ../bin 9DESTDIR= ../bin
10DEFINES += DESKTOP_VERSION KDE_QT_ONLY 10DEFINES += DESKTOP_VERSION KDE_QT_ONLY
11unix : { 11unix : {
12OBJECTS_DIR = obj/unix 12OBJECTS_DIR = obj/unix
13MOC_DIR = moc/unix 13MOC_DIR = moc/unix
14} 14}
15win32: { 15win32: {
16DEFINES += _WIN32_ 16DEFINES += _WIN32_
17OBJECTS_DIR = obj/win 17OBJECTS_DIR = obj/win
18MOC_DIR = moc/win 18MOC_DIR = moc/win
19} 19}
20include( ../variables.pri ) 20include( ../variables.pri )
21 21
22 22
23 23
24HEADERS = \ 24HEADERS = \
25qlayoutengine_p.h \ 25qlayoutengine_p.h \
26KDGanttMinimizeSplitter.h \ 26KDGanttMinimizeSplitter.h \
27 kapplication.h \ 27 kapplication.h \
28 kaudioplayer.h \ 28 kaudioplayer.h \
29 kcalendarsystem.h \ 29 kcalendarsystem.h \
30 kcalendarsystemgregorian.h \ 30 kcalendarsystemgregorian.h \
31 kcolorbutton.h \ 31 kcolorbutton.h \
32 kcolordialog.h \ 32 kcolordialog.h \
33 kcombobox.h \ 33 kcombobox.h \
34 kconfig.h \ 34 kconfig.h \
35 kdatetbl.h \ 35 kdatetbl.h \
36 kdebug.h \ 36 kdebug.h \
37 kdialog.h \ 37 kdialog.h \
38 kdialogbase.h \ 38 kdialogbase.h \
39 kdirwatch.h \ 39 kdirwatch.h \
40 keditlistbox.h \ 40 keditlistbox.h \
41 kemailsettings.h \ 41 kemailsettings.h \
42 kfiledialog.h \ 42 kfiledialog.h \
43 kfontdialog.h \ 43 kfontdialog.h \
44 kglobal.h \ 44 kglobal.h \
45 kglobalsettings.h \ 45 kglobalsettings.h \
46 kiconloader.h \ 46 kiconloader.h \
47 klineedit.h \ 47 klineedit.h \
48 klineeditdlg.h \ 48 klineeditdlg.h \
49 kmessagebox.h \ 49 kmessagebox.h \
50 knotifyclient.h \ 50 knotifyclient.h \
51 kprinter.h \ 51 kprinter.h \
52 kprocess.h \ 52 kprocess.h \
53 krestrictedline.h \ 53 krestrictedline.h \
54 krun.h \ 54 krun.h \
55 ksimpleconfig.h \ 55 ksimpleconfig.h \
56 kstaticdeleter.h \ 56 kstaticdeleter.h \
57 ksystemtray.h \ 57 ksystemtray.h \
58 ktempfile.h \ 58 ktempfile.h \
59 ktextedit.h \ 59 ktextedit.h \
60 kunload.h \ 60 kunload.h \
61 kurl.h \ 61 kurl.h \
62 kdeui/kguiitem.h \ 62 kdeui/kguiitem.h \
63 kdeui/kcmodule.h \ 63 kdeui/kcmodule.h \
64 kdeui/kbuttonbox.h \ 64 kdeui/kbuttonbox.h \
65 kdeui/klistbox.h \ 65 kdeui/klistbox.h \
66 kdeui/klistview.h \ 66 kdeui/klistview.h \
67 kdeui/kjanuswidget.h \ 67 kdeui/kjanuswidget.h \
68 kdeui/kseparator.h \ 68 kdeui/kseparator.h \
69 kdeui/knuminput.h \ 69 kdeui/knuminput.h \
70 kdeui/knumvalidator.h \ 70 kdeui/knumvalidator.h \
71 kdeui/ksqueezedtextlabel.h \ 71 kdeui/ksqueezedtextlabel.h \
72 kio/job.h \ 72 kio/job.h \
73 kio/kio/kdirwatch.h \ 73 kio/kio/kdirwatch.h \
74 kio/kio/kdirwatch_p.h \ 74 kio/kio/kdirwatch_p.h \
75 kio/kfile/kurlrequester.h \ 75 kio/kfile/kurlrequester.h \
76 kresources/resource.h \ 76 kresources/resource.h \
77 kresources/factory.h \ 77 kresources/factory.h \
78 kresources/managerimpl.h \ 78 kresources/managerimpl.h \
79 kresources/manager.h \ 79 kresources/manager.h \
80 kresources/selectdialog.h \ 80 kresources/selectdialog.h \
81 kresources/configpage.h \ 81 kresources/configpage.h \
82 kresources/configwidget.h \ 82 kresources/configwidget.h \
83 kresources/configdialog.h \ 83 kresources/configdialog.h \
84 kresources/kcmkresources.h \ 84 kresources/kcmkresources.h \
85 kresources/syncwidget.h \
85 kdecore/kmdcodec.h \ 86 kdecore/kmdcodec.h \
86 kdecore/kconfigbase.h \ 87 kdecore/kconfigbase.h \
87 kdecore/klocale.h \ 88 kdecore/klocale.h \
88 kdecore/kcatalogue.h \ 89 kdecore/kcatalogue.h \
89 kdecore/ksharedptr.h \ 90 kdecore/ksharedptr.h \
90 kdecore/kshell.h \ 91 kdecore/kshell.h \
91 kdecore/kstandarddirs.h \ 92 kdecore/kstandarddirs.h \
92 kdecore/kstringhandler.h \ 93 kdecore/kstringhandler.h \
93 kdecore/kshortcut.h \ 94 kdecore/kshortcut.h \
94 kutils/kcmultidialog.h \ 95 kutils/kcmultidialog.h \
95 kdeui/kxmlguiclient.h \ 96 kdeui/kxmlguiclient.h \
96 kdeui/kstdaction.h \ 97 kdeui/kstdaction.h \
97 kdeui/kmainwindow.h \ 98 kdeui/kmainwindow.h \
98 kdeui/ktoolbar.h \ 99 kdeui/ktoolbar.h \
99 kdeui/ktoolbarbutton.h \ 100 kdeui/ktoolbarbutton.h \
100 kdeui/ktoolbarhandler.h \ 101 kdeui/ktoolbarhandler.h \
101 kdeui/kaction.h \ 102 kdeui/kaction.h \
102 kdeui/kactionclasses.h \ 103 kdeui/kactionclasses.h \
103 kdeui/kactioncollection.h \ 104 kdeui/kactioncollection.h \
104 kdecore/klibloader.h 105 kdecore/kprefs.h \
106 kdecore/klibloader.h \
107 kidmanager.h
105 108
106 109
107# kdecore/klibloader.h \ 110# kdecore/klibloader.h \
108 111
109 112
110SOURCES = \ 113SOURCES = \
111KDGanttMinimizeSplitter.cpp \ 114KDGanttMinimizeSplitter.cpp \
112 kapplication.cpp \ 115 kapplication.cpp \
113 kcalendarsystem.cpp \ 116 kcalendarsystem.cpp \
114 kcalendarsystemgregorian.cpp \ 117 kcalendarsystemgregorian.cpp \
115 kcolorbutton.cpp \ 118 kcolorbutton.cpp \
116 kcolordialog.cpp \ 119 kcolordialog.cpp \
117 kconfig.cpp \ 120 kconfig.cpp \
118 kdatetbl.cpp \ 121 kdatetbl.cpp \
119 kdialog.cpp \ 122 kdialog.cpp \
120 kdialogbase.cpp \ 123 kdialogbase.cpp \
121 keditlistbox.cpp \ 124 keditlistbox.cpp \
122 kemailsettings.cpp \ 125 kemailsettings.cpp \
123 kfontdialog.cpp \ 126 kfontdialog.cpp \
124 kfiledialog.cpp \ 127 kfiledialog.cpp \
125 kglobal.cpp \ 128 kglobal.cpp \
126 kglobalsettings.cpp \ 129 kglobalsettings.cpp \
127 kiconloader.cpp \ 130 kiconloader.cpp \
128 kmessagebox.cpp \ 131 kmessagebox.cpp \
129 ktextedit.cpp \ 132 ktextedit.cpp \
130 kprocess.cpp \ 133 kprocess.cpp \
131 krun.cpp \ 134 krun.cpp \
132 ksystemtray.cpp \ 135 ksystemtray.cpp \
133 ktempfile.cpp \ 136 ktempfile.cpp \
134 kurl.cpp \ 137 kurl.cpp \
135 kdecore/kcatalogue.cpp \ 138 kdecore/kcatalogue.cpp \
136 kdecore/klocale.cpp \ 139 kdecore/klocale.cpp \
137 kdecore/kmdcodec.cpp \ 140 kdecore/kmdcodec.cpp \
138 kdecore/kshell.cpp \ 141 kdecore/kshell.cpp \
139 kdecore/kstandarddirs.cpp \ 142 kdecore/kstandarddirs.cpp \
140 kdecore/kstringhandler.cpp \ 143 kdecore/kstringhandler.cpp \
141 kdeui/kbuttonbox.cpp \ 144 kdeui/kbuttonbox.cpp \
142 kdeui/kcmodule.cpp \ 145 kdeui/kcmodule.cpp \
143 kdeui/kguiitem.cpp \ 146 kdeui/kguiitem.cpp \
144 kdeui/kjanuswidget.cpp \ 147 kdeui/kjanuswidget.cpp \
145 kdeui/klistbox.cpp \ 148 kdeui/klistbox.cpp \
146 kdeui/klistview.cpp \ 149 kdeui/klistview.cpp \
147 kdeui/knuminput.cpp \ 150 kdeui/knuminput.cpp \
148 kdeui/knumvalidator.cpp \ 151 kdeui/knumvalidator.cpp \
149 kdeui/kseparator.cpp \ 152 kdeui/kseparator.cpp \
150 kdeui/ksqueezedtextlabel.cpp \ 153 kdeui/ksqueezedtextlabel.cpp \
151 kio/kio/kdirwatch.cpp \ 154 kio/kio/kdirwatch.cpp \
152 kio/kfile/kurlrequester.cpp \ 155 kio/kfile/kurlrequester.cpp \
153 kresources/configpage.cpp \ 156 kresources/configpage.cpp \
154 kresources/configdialog.cpp \ 157 kresources/configdialog.cpp \
155 kresources/configwidget.cpp \ 158 kresources/configwidget.cpp \
156 kresources/factory.cpp \ 159 kresources/factory.cpp \
157 kresources/kcmkresources.cpp \ 160 kresources/kcmkresources.cpp \
158 kresources/managerimpl.cpp \ 161 kresources/managerimpl.cpp \
159 kresources/resource.cpp \ 162 kresources/resource.cpp \
160 kresources/selectdialog.cpp \ 163 kresources/selectdialog.cpp \
164 kresources/syncwidget.cpp \
161 kutils/kcmultidialog.cpp \ 165 kutils/kcmultidialog.cpp \
162 kdeui/kaction.cpp \ 166 kdeui/kaction.cpp \
163 kdeui/kactionclasses.cpp \ 167 kdeui/kactionclasses.cpp \
164 kdeui/kactioncollection.cpp \ 168 kdeui/kactioncollection.cpp \
165 kdeui/kmainwindow.cpp \ 169 kdeui/kmainwindow.cpp \
166 kdeui/ktoolbar.cpp \ 170 kdeui/ktoolbar.cpp \
167 kdeui/ktoolbarbutton.cpp \ 171 kdeui/ktoolbarbutton.cpp \
168 kdeui/ktoolbarhandler.cpp \ 172 kdeui/ktoolbarhandler.cpp \
169 kdeui/kstdaction.cpp \ 173 kdeui/kstdaction.cpp \
170 kdeui/kxmlguiclient.cpp \ 174 kdeui/kxmlguiclient.cpp \
171 kdecore/klibloader.cpp 175 kdecore/kprefs.cpp \
176 kdecore/klibloader.cpp \
177 kidmanager.cpp