author | zautrix <zautrix> | 2004-09-08 02:02:15 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-08 02:02:15 (UTC) |
commit | e5f6ea343bc2b129f81fde3734b100cfa2ed6c83 (patch) (unidiff) | |
tree | 8d33b16e52b1d886cf524052418e8dd445689a66 | |
parent | 199025628054eef739a261437a51a98f5218ab0f (diff) | |
download | kdepimpi-e5f6ea343bc2b129f81fde3734b100cfa2ed6c83.zip kdepimpi-e5f6ea343bc2b129f81fde3734b100cfa2ed6c83.tar.gz kdepimpi-e5f6ea343bc2b129f81fde3734b100cfa2ed6c83.tar.bz2 |
Some fixes
-rw-r--r-- | Makefile | 13 | ||||
-rw-r--r-- | kaddressbook/kabcore.cpp | 2 | ||||
-rw-r--r-- | kalarmd/simplealarmdaemonimpl.cpp | 2 | ||||
-rw-r--r-- | kdepim.control | 2 | ||||
-rw-r--r-- | kmicrokdelibs.control | 2 | ||||
-rw-r--r-- | kmicromail/composemail.cpp | 2 | ||||
-rw-r--r-- | kmicromail/main.cpp | 2 | ||||
-rw-r--r-- | kmicromail/opiemail.cpp | 11 |
8 files changed, 21 insertions, 15 deletions
@@ -1,299 +1,302 @@ | |||
1 | export KDEPIMDIR = $(shell pwd) | 1 | export KDEPIMDIR = $(shell pwd) |
2 | 2 | ||
3 | 3 | ||
4 | ifeq ($(PLATFORM) , zaurus) | 4 | ifeq ($(PLATFORM) , zaurus) |
5 | BUILD_NO_LDAP_PLUGIN=1 | 5 | BUILD_NO_LDAP_PLUGIN=1 |
6 | endif | 6 | endif |
7 | 7 | ||
8 | ifneq ($(PLATFORM) , zaurus) | 8 | ifneq ($(PLATFORM) , zaurus) |
9 | BUILD_NO_SHARP_PLUGIN=1 | 9 | BUILD_NO_SHARP_PLUGIN=1 |
10 | endif | 10 | endif |
11 | 11 | ||
12 | SUBDIRS_MICROKDE = \ | 12 | SUBDIRS_MICROKDE = \ |
13 | libical/src/libical \ | 13 | libical/src/libical \ |
14 | libical/src/libicalss \ | 14 | libical/src/libicalss \ |
15 | qtcompat \ | 15 | qtcompat \ |
16 | microkde \ | 16 | microkde \ |
17 | libkcal \ | 17 | libkcal \ |
18 | libkdepim \ | 18 | libkdepim \ |
19 | kabc \ | 19 | kabc \ |
20 | kabc/formats/binary \ | 20 | kabc/formats/binary \ |
21 | kabc/plugins/file \ | 21 | kabc/plugins/file \ |
22 | kabc/plugins/dir \ | 22 | kabc/plugins/dir \ |
23 | korganizer \ | 23 | korganizer \ |
24 | kalarmd \ | 24 | kalarmd \ |
25 | kaddressbook | 25 | kaddressbook |
26 | 26 | ||
27 | SUBDIRS_QTOPIA_PLUGIN = \ | 27 | SUBDIRS_QTOPIA_PLUGIN = \ |
28 | kabc/plugins/qtopia | 28 | kabc/plugins/qtopia |
29 | 29 | ||
30 | SUBDIRS_OPIE_PLUGIN = \ | 30 | SUBDIRS_OPIE_PLUGIN = \ |
31 | kabc/plugins/opie | 31 | kabc/plugins/opie |
32 | 32 | ||
33 | SUBDIRS_SHARP_PLUGIN = \ | 33 | SUBDIRS_SHARP_PLUGIN = \ |
34 | kabc/plugins/sharpdtm | 34 | kabc/plugins/sharpdtm |
35 | 35 | ||
36 | SUBDIRS_LDAP_PLUGIN = \ | 36 | SUBDIRS_LDAP_PLUGIN = \ |
37 | kabc/plugins/ldap | 37 | kabc/plugins/ldap |
38 | 38 | ||
39 | SUBDIRS_MICROMAIL = \ | 39 | SUBDIRS_MICROMAIL = \ |
40 | kmicromail/libetpan \ | 40 | kmicromail/libetpan \ |
41 | kmicromail/libmailwrapper \ | 41 | kmicromail/libmailwrapper \ |
42 | kmicromail | 42 | kmicromail |
43 | 43 | ||
44 | SUBDIRS_GAMMU = \ | 44 | SUBDIRS_GAMMU = \ |
45 | gammu/emb/common \ | 45 | gammu/emb/common \ |
46 | gammu/emb/gammu | 46 | gammu/emb/gammu |
47 | 47 | ||
48 | SUBDIRS = \ | 48 | SUBDIRS = \ |
49 | $(SUBDIRS_MICROKDE) \ | 49 | $(SUBDIRS_MICROKDE) \ |
50 | $(SUBDIRS_QTOPIA_PLUGIN) \ | 50 | $(SUBDIRS_QTOPIA_PLUGIN) \ |
51 | $(SUBDIRS_OPIE_PLUGIN) \ | 51 | $(SUBDIRS_OPIE_PLUGIN) \ |
52 | $(SUBDIRS_SHARP_PLUGIN) \ | 52 | $(SUBDIRS_SHARP_PLUGIN) \ |
53 | $(SUBDIRS_LDAP_PLUGIN) \ | 53 | $(SUBDIRS_LDAP_PLUGIN) \ |
54 | $(SUBDIRS_MICROMAIL) \ | 54 | $(SUBDIRS_MICROMAIL) \ |
55 | $(SUBDIRS_GAMMU) | 55 | $(SUBDIRS_GAMMU) |
56 | 56 | ||
57 | all: build_microkde \ | 57 | all: build_microkde \ |
58 | build_qtopia_plugin \ | 58 | build_qtopia_plugin \ |
59 | build_opie_plugin \ | 59 | build_opie_plugin \ |
60 | build_sharp_plugin \ | 60 | build_sharp_plugin \ |
61 | build_ldap_plugin \ | 61 | build_ldap_plugin \ |
62 | build_micromail \ | 62 | build_micromail \ |
63 | build_gammu | 63 | build_gammu |
64 | 64 | ||
65 | 65 | ||
66 | build_microkde: variable_test tmake | 66 | build_microkde: variable_test tmake |
67 | for i in $(SUBDIRS_MICROKDE); do pushd $$i; \ | 67 | for i in $(SUBDIRS_MICROKDE); do pushd $$i; \ |
68 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 68 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
69 | done | 69 | done |
70 | 70 | ||
71 | build_qtopia_plugin: build_microkde | 71 | build_qtopia_plugin: build_microkde |
72 | for i in $(SUBDIRS_QTOPIA_PLUGIN); do pushd $$i; \ | 72 | for i in $(SUBDIRS_QTOPIA_PLUGIN); do pushd $$i; \ |
73 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 73 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
74 | done | 74 | done |
75 | 75 | ||
76 | build_opie_plugin: build_microkde | 76 | build_opie_plugin: build_microkde |
77 | ifdef BUILD_NO_OPIE_PLUGIN | 77 | ifdef BUILD_NO_OPIE_PLUGIN |
78 | @echo ---> opie plugin not build. | 78 | @echo == opie plugin not build. |
79 | else | 79 | else |
80 | for i in $(SUBDIRS_OPIE_PLUGIN); do pushd $$i; \ | 80 | for i in $(SUBDIRS_OPIE_PLUGIN); do pushd $$i; \ |
81 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 81 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
82 | done | 82 | done |
83 | endif | 83 | endif |
84 | 84 | ||
85 | build_sharp_plugin: build_microkde | 85 | build_sharp_plugin: build_microkde |
86 | ifdef BUILD_NO_SHARP_PLUGIN | 86 | ifdef BUILD_NO_SHARP_PLUGIN |
87 | @echo ---> ldap plugin not build. | 87 | @echo == ldap plugin not build. |
88 | else | 88 | else |
89 | for i in $(SUBDIRS_SHARP_PLUGIN); do pushd $$i; \ | 89 | for i in $(SUBDIRS_SHARP_PLUGIN); do pushd $$i; \ |
90 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 90 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
91 | done | 91 | done |
92 | endif | 92 | endif |
93 | 93 | ||
94 | build_ldap_plugin: build_microkde | 94 | build_ldap_plugin: build_microkde |
95 | ifdef BUILD_NO_LDAP_PLUGIN | 95 | ifdef BUILD_NO_LDAP_PLUGIN |
96 | @echo ---> ldap plugin not build. | 96 | @echo == ldap plugin not build. |
97 | else | 97 | else |
98 | for i in $(SUBDIRS_LDAP_PLUGIN); do pushd $$i; \ | 98 | for i in $(SUBDIRS_LDAP_PLUGIN); do pushd $$i; \ |
99 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 99 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
100 | done | 100 | done |
101 | endif | 101 | endif |
102 | 102 | ||
103 | 103 | ||
104 | build_micromail: build_microkde | 104 | build_micromail: build_microkde |
105 | ifdef BUILD_NO_MICROMAIL | 105 | ifdef BUILD_NO_MICROMAIL |
106 | @echo ---> micromail not build. | 106 | @echo == kmicromail not build. |
107 | else | 107 | else |
108 | for i in $(SUBDIRS_MICROMAIL); do pushd $$i; \ | 108 | for i in $(SUBDIRS_MICROMAIL); do pushd $$i; \ |
109 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 109 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
110 | done | 110 | done |
111 | endif | 111 | endif |
112 | 112 | ||
113 | build_gammu: variable_test tmake | 113 | build_gammu: variable_test tmake |
114 | ifdef BUILD_NO_GAMMU | 114 | ifdef BUILD_NO_GAMMU |
115 | @echo ---> gammu not build. | 115 | @echo == gammu not build. |
116 | else | 116 | else |
117 | for i in $(SUBDIRS_GAMMU); do pushd $$i; \ | 117 | for i in $(SUBDIRS_GAMMU); do pushd $$i; \ |
118 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 118 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
119 | done | 119 | done |
120 | endif | 120 | endif |
121 | 121 | ||
122 | 122 | ||
123 | variable_info: | 123 | variable_info: |
124 | @echo -------------------------------------- | 124 | @echo -------------------------------------- |
125 | @echo KDEPIM buildsystem, variableinfo... | 125 | @echo KDEPIM buildsystem, variableinfo... |
126 | @echo KDEPIMDIR=$(KDEPIMDIR) | 126 | @echo KDEPIMDIR=$(KDEPIMDIR) |
127 | @echo QTDIR=$(QTDIR) | 127 | @echo QTDIR=$(QTDIR) |
128 | @echo QPEDIR=$(QPEDIR) | 128 | @echo QPEDIR=$(QPEDIR) |
129 | @echo OPIEDIR=$(OPIEDIR) | 129 | @echo OPIEDIR=$(OPIEDIR) |
130 | @echo PLATFORM=$(PLATFORM) | 130 | @echo PLATFORM=$(PLATFORM) |
131 | @echo RELEASE_DEBUG=$(RELEASE_DEBUG) | 131 | @echo RELEASE_DEBUG=$(RELEASE_DEBUG) |
132 | @echo BUILD_NO_MICROMAIL=$(BUILD_NO_MICROMAIL) | 132 | @echo BUILD_NO_MICROMAIL=$(BUILD_NO_MICROMAIL) |
133 | @echo BUILD_NO_LDAP_PLUGIN=$(BUILD_NO_LDAP_PLUGIN) | 133 | @echo BUILD_NO_LDAP_PLUGIN=$(BUILD_NO_LDAP_PLUGIN) |
134 | @echo BUILD_NO_OPIE_PLUGIN=$(BUILD_NO_OPIE_PLUGIN) | 134 | @echo BUILD_NO_OPIE_PLUGIN=$(BUILD_NO_OPIE_PLUGIN) |
135 | @echo BUILD_NO_SHARP_PLUGIN=$(BUILD_NO_SHARP_PLUGIN) | 135 | @echo BUILD_NO_SHARP_PLUGIN=$(BUILD_NO_SHARP_PLUGIN) |
136 | ifndef BUILD_NO_SHARP_PLUGIN | 136 | ifndef BUILD_NO_SHARP_PLUGIN |
137 | @echo SHARPDTMSDK=$(SHARPDTMSDK) | 137 | @echo SHARPDTMSDK=$(SHARPDTMSDK) |
138 | endif | 138 | endif |
139 | @echo BUILD_NO_GAMMU=$(BUILD_NO_GAMMU) | 139 | @echo BUILD_NO_GAMMU=$(BUILD_NO_GAMMU) |
140 | @echo -------------------------------------- | 140 | @echo -------------------------------------- |
141 | 141 | ||
142 | variable_test: variable_info | 142 | variable_test: variable_info |
143 | @echo KDEPIM buildsystem, variablecheck... | 143 | @echo KDEPIM buildsystem, variablecheck... |
144 | ifndef KDEPIMDIR | 144 | ifndef KDEPIMDIR |
145 | @echo KDEPIMDIR is not defined. | 145 | @echo KDEPIMDIR is not defined. |
146 | $(error KDEPIMDIR is not defined) | 146 | $(error KDEPIMDIR is not defined) |
147 | endif | 147 | endif |
148 | ifndef PLATFORM | 148 | ifndef PLATFORM |
149 | @echo PLATFORM is not defined. | 149 | @echo PLATFORM is not defined. |
150 | $(error PLATFORM is not defined) | 150 | $(error PLATFORM is not defined) |
151 | endif | 151 | endif |
152 | ifdef BUILD_NO_LDAP_PLUGIN | 152 | ifdef BUILD_NO_LDAP_PLUGIN |
153 | @echo LDAP PLUGIN will not be build, because BUILD_NO_LDAP_PLUGIN is set to $(BUILD_NO_LDAP_PLUGIN) | 153 | @echo LDAP PLUGIN will not be build, because BUILD_NO_LDAP_PLUGIN is set to $(BUILD_NO_LDAP_PLUGIN) |
154 | endif | 154 | endif |
155 | ifdef BUILD_NO_OPIE_PLUGIN | 155 | ifdef BUILD_NO_OPIE_PLUGIN |
156 | @echo OPIE PLUGIN will not be build, because BUILD_NO_OPIE_PLUGIN is set to $(BUILD_NO_OPIE_PLUGIN) | 156 | @echo OPIE PLUGIN will not be build, because BUILD_NO_OPIE_PLUGIN is set to $(BUILD_NO_OPIE_PLUGIN) |
157 | endif | 157 | endif |
158 | ifdef BUILD_NO_MICROMAIL | 158 | ifdef BUILD_NO_MICROMAIL |
159 | @echo MICROMAIL will not be build, because BUILD_NO_MICROMAIL is set to $(BUILD_NO_MICROMAIL) | 159 | @echo MICROMAIL will not be build, because BUILD_NO_MICROMAIL is set to $(BUILD_NO_MICROMAIL) |
160 | endif | 160 | endif |
161 | ifdef BUILD_NO_SHARP_PLUGIN | 161 | ifdef BUILD_NO_SHARP_PLUGIN |
162 | @echo SHARP PLUGIN will not be build, because BUILD_NO_SHARP_PLUGIN is set to $(BUILD_NO_SHARP_PLUGIN) | 162 | @echo SHARP PLUGIN will not be build, because BUILD_NO_SHARP_PLUGIN is set to $(BUILD_NO_SHARP_PLUGIN) |
163 | else | 163 | else |
164 | ifndef SHARPDTMSDK | 164 | ifndef SHARPDTMSDK |
165 | @echo SHARP PLUGIN can not be build, because SHARPDTMSDK is set to $(SHARPDTMSDK) | 165 | @echo SHARP PLUGIN can not be build, because SHARPDTMSDK is set to $(SHARPDTMSDK) |
166 | $(error SHARPDTMSDK is not defined) | 166 | $(error SHARPDTMSDK is not defined) |
167 | endif | 167 | endif |
168 | endif | 168 | endif |
169 | ifdef BUILD_NO_GAMMU | ||
170 | @echo GAMMU will not be build, because BUILD_NO_GAMMU is set to $(BUILD_NO_GAMMU) | ||
171 | endif | ||
169 | @echo -------------------------------------- | 172 | @echo -------------------------------------- |
170 | 173 | ||
171 | 174 | ||
172 | objects: | 175 | objects: |
173 | for i in $(SUBDIRS); do mkdir -p $$i/obj/$(PLATFORM); done | 176 | for i in $(SUBDIRS); do mkdir -p $$i/obj/$(PLATFORM); done |
174 | for i in $(SUBDIRS); do mkdir -p $$i/moc/$(PLATFORM); done | 177 | for i in $(SUBDIRS); do mkdir -p $$i/moc/$(PLATFORM); done |
175 | mkdir -p libical/lib/$(PLATFORM) | 178 | mkdir -p libical/lib/$(PLATFORM) |
176 | 179 | ||
177 | clean: | 180 | clean: |
178 | rm -rf libical/lib/$(PLATFORM)/*; | 181 | rm -rf libical/lib/$(PLATFORM)/*; |
179 | for i in $(SUBDIRS); do pushd $$i; make clean; rm -f *~;\ | 182 | for i in $(SUBDIRS); do pushd $$i; make clean; rm -f *~;\ |
180 | rm -f obj/$(PLATFORM)/*; rm -f moc/$(PLATFORM)/*; rm Makefile$(PLATFORM); popd; \ | 183 | rm -f obj/$(PLATFORM)/*; rm -f moc/$(PLATFORM)/*; rm Makefile$(PLATFORM); popd; \ |
181 | done | 184 | done |
182 | install: | 185 | install: |
183 | cd bin/kdepim; make install | 186 | cd bin/kdepim; make install |
184 | cp -r Pim $(QPEDIR)/apps | 187 | cp -r Pim $(QPEDIR)/apps |
185 | cp db2file/db2file $(QPEDIR)/bin/db2file | 188 | cp db2file/db2file $(QPEDIR)/bin/db2file |
186 | cp korganizer/korganizer.desktop $(QPEDIR)/apps/Pim/korganizer.desktop | 189 | cp korganizer/korganizer.desktop $(QPEDIR)/apps/Pim/korganizer.desktop |
187 | cp kaddressbook/kaddressbook.desktop $(QPEDIR)/apps/Pim/kaddressbook.desktop | 190 | cp kaddressbook/kaddressbook.desktop $(QPEDIR)/apps/Pim/kaddressbook.desktop |
188 | cp kmicromail/kmicromail.desktop $(QPEDIR)/apps/Pim/kmicromail.desktop | 191 | cp kmicromail/kmicromail.desktop $(QPEDIR)/apps/Pim/kmicromail.desktop |
189 | 192 | ||
190 | dist: | 193 | dist: |
191 | @echo Dont forget to do "make install" before "make dist" | 194 | @echo Dont forget to do "make install" before "make dist" |
192 | rm -f *arm.ipk | 195 | rm -f *arm.ipk |
193 | rm -f *~ | 196 | rm -f *~ |
194 | cd ..; tar czf kdepim.src.tar.gz --exclude=obj --exclude=moc --exclude=CVS --exclude=Makefilezaurus --exclude=Makefileqtopia kdepim | 197 | cd ..; tar czf kdepim.src.tar.gz --exclude=obj --exclude=moc --exclude=CVS --exclude=Makefilezaurus --exclude=Makefileqtopia kdepim |
195 | ./mkipks kmicrokdelibs.control | 198 | ./mkipks kmicrokdelibs.control |
196 | ./mkipks korganizer.control | 199 | ./mkipks korganizer.control |
197 | ./mkipks kaddressbook.control | 200 | ./mkipks kaddressbook.control |
198 | ifndef BUILD_NO_MICROMAIL | 201 | ifndef BUILD_NO_MICROMAIL |
199 | ./mkipks kopiemail.control | 202 | ./mkipks kopiemail.control |
200 | endif | 203 | endif |
201 | ./mkipks korganizer-alarm.control | 204 | ./mkipks korganizer-alarm.control |
202 | ifndef BUILD_NO_GAMMU | 205 | ifndef BUILD_NO_GAMMU |
203 | ./mkipks kammu.control | 206 | ./mkipks kammu.control |
204 | endif | 207 | endif |
205 | ./mkipks pim_TAB_icon.control | 208 | ./mkipks pim_TAB_icon.control |
206 | 209 | ||
207 | tmake: objects \ | 210 | tmake: objects \ |
208 | qtcompat/Makefile$(PLATFORM) \ | 211 | qtcompat/Makefile$(PLATFORM) \ |
209 | microkde/Makefile$(PLATFORM) \ | 212 | microkde/Makefile$(PLATFORM) \ |
210 | libkcal/Makefile$(PLATFORM) \ | 213 | libkcal/Makefile$(PLATFORM) \ |
211 | libkdepim/Makefile$(PLATFORM) \ | 214 | libkdepim/Makefile$(PLATFORM) \ |
212 | korganizer/Makefile$(PLATFORM) \ | 215 | korganizer/Makefile$(PLATFORM) \ |
213 | kalarmd/Makefile$(PLATFORM) \ | 216 | kalarmd/Makefile$(PLATFORM) \ |
214 | libical/src/libical/Makefile$(PLATFORM) \ | 217 | libical/src/libical/Makefile$(PLATFORM) \ |
215 | libical/src/libicalss/Makefile$(PLATFORM) \ | 218 | libical/src/libicalss/Makefile$(PLATFORM) \ |
216 | kabc/Makefile$(PLATFORM) \ | 219 | kabc/Makefile$(PLATFORM) \ |
217 | kabc/formats/binary/Makefile$(PLATFORM) \ | 220 | kabc/formats/binary/Makefile$(PLATFORM) \ |
218 | kabc/plugins/file/Makefile$(PLATFORM) \ | 221 | kabc/plugins/file/Makefile$(PLATFORM) \ |
219 | kabc/plugins/dir/Makefile$(PLATFORM) \ | 222 | kabc/plugins/dir/Makefile$(PLATFORM) \ |
220 | kabc/plugins/ldap/Makefile$(PLATFORM) \ | 223 | kabc/plugins/ldap/Makefile$(PLATFORM) \ |
221 | kabc/plugins/opie/Makefile$(PLATFORM) \ | 224 | kabc/plugins/opie/Makefile$(PLATFORM) \ |
222 | kabc/plugins/qtopia/Makefile$(PLATFORM) \ | 225 | kabc/plugins/qtopia/Makefile$(PLATFORM) \ |
223 | kabc/plugins/sharpdtm/Makefile$(PLATFORM) \ | 226 | kabc/plugins/sharpdtm/Makefile$(PLATFORM) \ |
224 | kaddressbook/Makefile$(PLATFORM) \ | 227 | kaddressbook/Makefile$(PLATFORM) \ |
225 | kmicromail/Makefile$(PLATFORM) \ | 228 | kmicromail/Makefile$(PLATFORM) \ |
226 | kmicromail/libetpan/Makefile$(PLATFORM) \ | 229 | kmicromail/libetpan/Makefile$(PLATFORM) \ |
227 | kmicromail/libmailwrapper/Makefile$(PLATFORM) \ | 230 | kmicromail/libmailwrapper/Makefile$(PLATFORM) \ |
228 | gammu/emb/common/Makefile$(PLATFORM) \ | 231 | gammu/emb/common/Makefile$(PLATFORM) \ |
229 | gammu/emb/gammu/Makefile$(PLATFORM) \ | 232 | gammu/emb/gammu/Makefile$(PLATFORM) \ |
230 | 233 | ||
231 | 234 | ||
232 | 235 | ||
233 | 236 | ||
234 | qtcompat/Makefile$(PLATFORM): qtcompat/qtcompat.pro | 237 | qtcompat/Makefile$(PLATFORM): qtcompat/qtcompat.pro |
235 | cd qtcompat; tmake "CONFIG+=$(RELEASE_DEBUG)" qtcompat.pro -o Makefile$(PLATFORM) | 238 | cd qtcompat; tmake "CONFIG+=$(RELEASE_DEBUG)" qtcompat.pro -o Makefile$(PLATFORM) |
236 | 239 | ||
237 | microkde/Makefile$(PLATFORM): microkde/microkdeE.pro | 240 | microkde/Makefile$(PLATFORM): microkde/microkdeE.pro |
238 | cd microkde; tmake "CONFIG+=$(RELEASE_DEBUG)" microkdeE.pro -o Makefile$(PLATFORM) | 241 | cd microkde; tmake "CONFIG+=$(RELEASE_DEBUG)" microkdeE.pro -o Makefile$(PLATFORM) |
239 | 242 | ||
240 | libkcal/Makefile$(PLATFORM): libkcal/libkcalE.pro | 243 | libkcal/Makefile$(PLATFORM): libkcal/libkcalE.pro |
241 | cd libkcal; tmake "CONFIG+=$(RELEASE_DEBUG)" libkcalE.pro -o Makefile$(PLATFORM) | 244 | cd libkcal; tmake "CONFIG+=$(RELEASE_DEBUG)" libkcalE.pro -o Makefile$(PLATFORM) |
242 | 245 | ||
243 | 246 | ||
244 | libkdepim/Makefile$(PLATFORM): libkdepim/libkdepimE.pro | 247 | libkdepim/Makefile$(PLATFORM): libkdepim/libkdepimE.pro |
245 | cd libkdepim; tmake "CONFIG+=$(RELEASE_DEBUG)" libkdepimE.pro -o Makefile$(PLATFORM) | 248 | cd libkdepim; tmake "CONFIG+=$(RELEASE_DEBUG)" libkdepimE.pro -o Makefile$(PLATFORM) |
246 | 249 | ||
247 | kalarmd/Makefile$(PLATFORM): kalarmd/kalarmdE.pro | 250 | kalarmd/Makefile$(PLATFORM): kalarmd/kalarmdE.pro |
248 | cd kalarmd; tmake "CONFIG+=$(RELEASE_DEBUG)" kalarmdE.pro -o Makefile$(PLATFORM) | 251 | cd kalarmd; tmake "CONFIG+=$(RELEASE_DEBUG)" kalarmdE.pro -o Makefile$(PLATFORM) |
249 | 252 | ||
250 | korganizer/Makefile$(PLATFORM): korganizer/korganizerE.pro | 253 | korganizer/Makefile$(PLATFORM): korganizer/korganizerE.pro |
251 | cd korganizer; tmake "CONFIG+=$(RELEASE_DEBUG)" korganizerE.pro -o Makefile$(PLATFORM) | 254 | cd korganizer; tmake "CONFIG+=$(RELEASE_DEBUG)" korganizerE.pro -o Makefile$(PLATFORM) |
252 | 255 | ||
253 | libical/src/libical/Makefile$(PLATFORM): libical/src/libical/libicalE.pro | 256 | libical/src/libical/Makefile$(PLATFORM): libical/src/libical/libicalE.pro |
254 | cd libical/src/libical; tmake "CONFIG+=$(RELEASE_DEBUG)" libicalE.pro -o Makefile$(PLATFORM) | 257 | cd libical/src/libical; tmake "CONFIG+=$(RELEASE_DEBUG)" libicalE.pro -o Makefile$(PLATFORM) |
255 | 258 | ||
256 | libical/src/libicalss/Makefile$(PLATFORM): libical/src/libicalss/libicalssE.pro | 259 | libical/src/libicalss/Makefile$(PLATFORM): libical/src/libicalss/libicalssE.pro |
257 | cd libical/src/libicalss; tmake "CONFIG+=$(RELEASE_DEBUG)" libicalssE.pro -o Makefile$(PLATFORM) | 260 | cd libical/src/libicalss; tmake "CONFIG+=$(RELEASE_DEBUG)" libicalssE.pro -o Makefile$(PLATFORM) |
258 | 261 | ||
259 | kabc/Makefile$(PLATFORM): kabc/kabcE.pro | 262 | kabc/Makefile$(PLATFORM): kabc/kabcE.pro |
260 | cd kabc; tmake "CONFIG+=$(RELEASE_DEBUG)" kabcE.pro -o Makefile$(PLATFORM) | 263 | cd kabc; tmake "CONFIG+=$(RELEASE_DEBUG)" kabcE.pro -o Makefile$(PLATFORM) |
261 | 264 | ||
262 | kabc/formats/binary/Makefile$(PLATFORM): kabc/formats/binary/kabcformat_binaryE.pro | 265 | kabc/formats/binary/Makefile$(PLATFORM): kabc/formats/binary/kabcformat_binaryE.pro |
263 | cd kabc/formats/binary; tmake "CONFIG+=$(RELEASE_DEBUG)" kabcformat_binaryE.pro -o Makefile$(PLATFORM) | 266 | cd kabc/formats/binary; tmake "CONFIG+=$(RELEASE_DEBUG)" kabcformat_binaryE.pro -o Makefile$(PLATFORM) |
264 | 267 | ||
265 | kabc/plugins/file/Makefile$(PLATFORM): kabc/plugins/file/fileE.pro | 268 | kabc/plugins/file/Makefile$(PLATFORM): kabc/plugins/file/fileE.pro |
266 | cd kabc/plugins/file; tmake "CONFIG+=$(RELEASE_DEBUG)" fileE.pro -o Makefile$(PLATFORM) | 269 | cd kabc/plugins/file; tmake "CONFIG+=$(RELEASE_DEBUG)" fileE.pro -o Makefile$(PLATFORM) |
267 | 270 | ||
268 | kabc/plugins/dir/Makefile$(PLATFORM): kabc/plugins/dir/dirE.pro | 271 | kabc/plugins/dir/Makefile$(PLATFORM): kabc/plugins/dir/dirE.pro |
269 | cd kabc/plugins/dir; tmake "CONFIG+=$(RELEASE_DEBUG)" dirE.pro -o Makefile$(PLATFORM) | 272 | cd kabc/plugins/dir; tmake "CONFIG+=$(RELEASE_DEBUG)" dirE.pro -o Makefile$(PLATFORM) |
270 | 273 | ||
271 | kabc/plugins/ldap/Makefile$(PLATFORM): kabc/plugins/ldap/ldapE.pro | 274 | kabc/plugins/ldap/Makefile$(PLATFORM): kabc/plugins/ldap/ldapE.pro |
272 | cd kabc/plugins/ldap; tmake "CONFIG+=$(RELEASE_DEBUG)" ldapE.pro -o Makefile$(PLATFORM) | 275 | cd kabc/plugins/ldap; tmake "CONFIG+=$(RELEASE_DEBUG)" ldapE.pro -o Makefile$(PLATFORM) |
273 | 276 | ||
274 | kabc/plugins/opie/Makefile$(PLATFORM): kabc/plugins/opie/opieE.pro | 277 | kabc/plugins/opie/Makefile$(PLATFORM): kabc/plugins/opie/opieE.pro |
275 | cd kabc/plugins/opie; tmake "CONFIG+=$(RELEASE_DEBUG)" opieE.pro -o Makefile$(PLATFORM) | 278 | cd kabc/plugins/opie; tmake "CONFIG+=$(RELEASE_DEBUG)" opieE.pro -o Makefile$(PLATFORM) |
276 | 279 | ||
277 | kabc/plugins/qtopia/Makefile$(PLATFORM): kabc/plugins/qtopia/qtopiaE.pro | 280 | kabc/plugins/qtopia/Makefile$(PLATFORM): kabc/plugins/qtopia/qtopiaE.pro |
278 | cd kabc/plugins/qtopia; tmake "CONFIG+=$(RELEASE_DEBUG)" qtopiaE.pro -o Makefile$(PLATFORM) | 281 | cd kabc/plugins/qtopia; tmake "CONFIG+=$(RELEASE_DEBUG)" qtopiaE.pro -o Makefile$(PLATFORM) |
279 | 282 | ||
280 | kabc/plugins/sharpdtm/Makefile$(PLATFORM): kabc/plugins/sharpdtm/sharpdtmE.pro | 283 | kabc/plugins/sharpdtm/Makefile$(PLATFORM): kabc/plugins/sharpdtm/sharpdtmE.pro |
281 | cd kabc/plugins/sharpdtm; tmake "CONFIG+=$(RELEASE_DEBUG)" sharpdtmE.pro -o Makefile$(PLATFORM) | 284 | cd kabc/plugins/sharpdtm; tmake "CONFIG+=$(RELEASE_DEBUG)" sharpdtmE.pro -o Makefile$(PLATFORM) |
282 | 285 | ||
283 | kaddressbook/Makefile$(PLATFORM): kaddressbook/kaddressbookE.pro | 286 | kaddressbook/Makefile$(PLATFORM): kaddressbook/kaddressbookE.pro |
284 | cd kaddressbook; tmake "CONFIG+=$(RELEASE_DEBUG)" kaddressbookE.pro -o Makefile$(PLATFORM) | 287 | cd kaddressbook; tmake "CONFIG+=$(RELEASE_DEBUG)" kaddressbookE.pro -o Makefile$(PLATFORM) |
285 | 288 | ||
286 | kmicromail/Makefile$(PLATFORM): kmicromail/kmicromailE.pro | 289 | kmicromail/Makefile$(PLATFORM): kmicromail/kmicromailE.pro |
287 | cd kmicromail; tmake "CONFIG+=$(RELEASE_DEBUG)" kmicromailE.pro -o Makefile$(PLATFORM) | 290 | cd kmicromail; tmake "CONFIG+=$(RELEASE_DEBUG)" kmicromailE.pro -o Makefile$(PLATFORM) |
288 | 291 | ||
289 | kmicromail/libetpan/Makefile$(PLATFORM): kmicromail/libetpan/libetpanE.pro | 292 | kmicromail/libetpan/Makefile$(PLATFORM): kmicromail/libetpan/libetpanE.pro |
290 | cd kmicromail/libetpan; tmake "CONFIG+=$(RELEASE_DEBUG)" libetpanE.pro -o Makefile$(PLATFORM) | 293 | cd kmicromail/libetpan; tmake "CONFIG+=$(RELEASE_DEBUG)" libetpanE.pro -o Makefile$(PLATFORM) |
291 | 294 | ||
292 | kmicromail/libmailwrapper/Makefile$(PLATFORM): kmicromail/libmailwrapper/libmailwrapperE.pro | 295 | kmicromail/libmailwrapper/Makefile$(PLATFORM): kmicromail/libmailwrapper/libmailwrapperE.pro |
293 | cd kmicromail/libmailwrapper; tmake "CONFIG+=$(RELEASE_DEBUG)" libmailwrapperE.pro -o Makefile$(PLATFORM) | 296 | cd kmicromail/libmailwrapper; tmake "CONFIG+=$(RELEASE_DEBUG)" libmailwrapperE.pro -o Makefile$(PLATFORM) |
294 | 297 | ||
295 | gammu/emb/common/Makefile$(PLATFORM): gammu/emb/common/commonE.pro | 298 | gammu/emb/common/Makefile$(PLATFORM): gammu/emb/common/commonE.pro |
296 | cd gammu/emb/common; tmake "CONFIG+=$(RELEASE_DEBUG)" commonE.pro -o Makefile$(PLATFORM) | 299 | cd gammu/emb/common; tmake "CONFIG+=$(RELEASE_DEBUG)" commonE.pro -o Makefile$(PLATFORM) |
297 | 300 | ||
298 | gammu/emb/gammu/Makefile$(PLATFORM): gammu/emb/gammu/gammuE.pro | 301 | gammu/emb/gammu/Makefile$(PLATFORM): gammu/emb/gammu/gammuE.pro |
299 | cd gammu/emb/gammu; tmake "CONFIG+=$(RELEASE_DEBUG)" gammuE.pro -o Makefile$(PLATFORM) | 302 | cd gammu/emb/gammu; tmake "CONFIG+=$(RELEASE_DEBUG)" gammuE.pro -o Makefile$(PLATFORM) |
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 5cd9649..6538295 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -448,385 +448,385 @@ void KABCore::setContactSelected( const QString &uid ) | |||
448 | mDetails->setAddressee( addr ); | 448 | mDetails->setAddressee( addr ); |
449 | 449 | ||
450 | if ( !addr.isEmpty() ) { | 450 | if ( !addr.isEmpty() ) { |
451 | emit contactSelected( addr.formattedName() ); | 451 | emit contactSelected( addr.formattedName() ); |
452 | KABC::Picture pic = addr.photo(); | 452 | KABC::Picture pic = addr.photo(); |
453 | if ( pic.isIntern() ) { | 453 | if ( pic.isIntern() ) { |
454 | //US emit contactSelected( pic.data() ); | 454 | //US emit contactSelected( pic.data() ); |
455 | //US instead use: | 455 | //US instead use: |
456 | QPixmap px; | 456 | QPixmap px; |
457 | if (pic.data().isNull() != true) | 457 | if (pic.data().isNull() != true) |
458 | { | 458 | { |
459 | px.convertFromImage(pic.data()); | 459 | px.convertFromImage(pic.data()); |
460 | } | 460 | } |
461 | 461 | ||
462 | emit contactSelected( px ); | 462 | emit contactSelected( px ); |
463 | } | 463 | } |
464 | } | 464 | } |
465 | 465 | ||
466 | 466 | ||
467 | mExtensionManager->setSelectionChanged(); | 467 | mExtensionManager->setSelectionChanged(); |
468 | 468 | ||
469 | // update the actions | 469 | // update the actions |
470 | bool selected = !uid.isEmpty(); | 470 | bool selected = !uid.isEmpty(); |
471 | 471 | ||
472 | if ( mReadWrite ) { | 472 | if ( mReadWrite ) { |
473 | mActionCut->setEnabled( selected ); | 473 | mActionCut->setEnabled( selected ); |
474 | mActionPaste->setEnabled( selected ); | 474 | mActionPaste->setEnabled( selected ); |
475 | } | 475 | } |
476 | 476 | ||
477 | mActionCopy->setEnabled( selected ); | 477 | mActionCopy->setEnabled( selected ); |
478 | mActionDelete->setEnabled( selected ); | 478 | mActionDelete->setEnabled( selected ); |
479 | mActionEditAddressee->setEnabled( selected ); | 479 | mActionEditAddressee->setEnabled( selected ); |
480 | mActionMail->setEnabled( selected ); | 480 | mActionMail->setEnabled( selected ); |
481 | mActionMailVCard->setEnabled( selected ); | 481 | mActionMailVCard->setEnabled( selected ); |
482 | //if (mActionBeam) | 482 | //if (mActionBeam) |
483 | //mActionBeam->setEnabled( selected ); | 483 | //mActionBeam->setEnabled( selected ); |
484 | 484 | ||
485 | if (mActionBeamVCard) | 485 | if (mActionBeamVCard) |
486 | mActionBeamVCard->setEnabled( selected ); | 486 | mActionBeamVCard->setEnabled( selected ); |
487 | 487 | ||
488 | mActionWhoAmI->setEnabled( selected ); | 488 | mActionWhoAmI->setEnabled( selected ); |
489 | mActionCategories->setEnabled( selected ); | 489 | mActionCategories->setEnabled( selected ); |
490 | } | 490 | } |
491 | 491 | ||
492 | void KABCore::sendMail() | 492 | void KABCore::sendMail() |
493 | { | 493 | { |
494 | sendMail( mViewManager->selectedEmails().join( ", " ) ); | 494 | sendMail( mViewManager->selectedEmails().join( ", " ) ); |
495 | } | 495 | } |
496 | 496 | ||
497 | void KABCore::sendMail( const QString& emaillist ) | 497 | void KABCore::sendMail( const QString& emaillist ) |
498 | { | 498 | { |
499 | // the parameter has the form "name1 <abc@aol.com>,name2 <abc@aol.com>;... " | 499 | // the parameter has the form "name1 <abc@aol.com>,name2 <abc@aol.com>;... " |
500 | if (emaillist.contains(",") > 0) | 500 | if (emaillist.contains(",") > 0) |
501 | ExternalAppHandler::instance()->mailToMultipleContacts( emaillist, QString::null ); | 501 | ExternalAppHandler::instance()->mailToMultipleContacts( emaillist, QString::null ); |
502 | else | 502 | else |
503 | ExternalAppHandler::instance()->mailToOneContact( emaillist ); | 503 | ExternalAppHandler::instance()->mailToOneContact( emaillist ); |
504 | } | 504 | } |
505 | 505 | ||
506 | 506 | ||
507 | 507 | ||
508 | void KABCore::mailVCard() | 508 | void KABCore::mailVCard() |
509 | { | 509 | { |
510 | QStringList uids = mViewManager->selectedUids(); | 510 | QStringList uids = mViewManager->selectedUids(); |
511 | if ( !uids.isEmpty() ) | 511 | if ( !uids.isEmpty() ) |
512 | mailVCard( uids ); | 512 | mailVCard( uids ); |
513 | } | 513 | } |
514 | 514 | ||
515 | void KABCore::mailVCard( const QStringList& uids ) | 515 | void KABCore::mailVCard( const QStringList& uids ) |
516 | { | 516 | { |
517 | QStringList urls; | 517 | QStringList urls; |
518 | 518 | ||
519 | // QString tmpdir = locateLocal("tmp", KGlobal::getAppName()); | 519 | // QString tmpdir = locateLocal("tmp", KGlobal::getAppName()); |
520 | 520 | ||
521 | QString dirName = "/tmp/" + KApplication::randomString( 8 ); | 521 | QString dirName = "/tmp/" + 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 | 538 | ||
539 | if ( outFile.open(IO_WriteOnly) ) { // file opened successfully | 539 | if ( outFile.open(IO_WriteOnly) ) { // file opened successfully |
540 | KABC::VCardConverter converter; | 540 | KABC::VCardConverter converter; |
541 | QString vcard; | 541 | QString vcard; |
542 | 542 | ||
543 | converter.addresseeToVCard( a, vcard ); | 543 | converter.addresseeToVCard( a, vcard ); |
544 | 544 | ||
545 | QTextStream t( &outFile ); // use a text stream | 545 | QTextStream t( &outFile ); // use a text stream |
546 | t.setEncoding( QTextStream::UnicodeUTF8 ); | 546 | t.setEncoding( QTextStream::UnicodeUTF8 ); |
547 | t << vcard; | 547 | t << vcard; |
548 | 548 | ||
549 | outFile.close(); | 549 | outFile.close(); |
550 | 550 | ||
551 | urls.append( fileName ); | 551 | urls.append( fileName ); |
552 | } | 552 | } |
553 | } | 553 | } |
554 | 554 | ||
555 | bool result = ExternalAppHandler::instance()->mailToMultipleContacts( QString::null, urls.join(", ") ); | 555 | bool result = ExternalAppHandler::instance()->mailToMultipleContacts( QString::null, urls.join(", ") ); |
556 | 556 | ||
557 | 557 | ||
558 | /*US | 558 | /*US |
559 | kapp->invokeMailer( QString::null, QString::null, QString::null, | 559 | kapp->invokeMailer( QString::null, QString::null, QString::null, |
560 | QString::null, // subject | 560 | QString::null, // subject |
561 | QString::null, // body | 561 | QString::null, // body |
562 | QString::null, | 562 | QString::null, |
563 | urls ); // attachments | 563 | urls ); // attachments |
564 | */ | 564 | */ |
565 | 565 | ||
566 | } | 566 | } |
567 | 567 | ||
568 | /** | 568 | /** |
569 | Beams the "WhoAmI contact. | 569 | Beams the "WhoAmI contact. |
570 | */ | 570 | */ |
571 | void KABCore::beamMySelf() | 571 | void KABCore::beamMySelf() |
572 | { | 572 | { |
573 | KABC::Addressee a = KABC::StdAddressBook::self()->whoAmI(); | 573 | KABC::Addressee a = KABC::StdAddressBook::self()->whoAmI(); |
574 | if (!a.isEmpty()) | 574 | if (!a.isEmpty()) |
575 | { | 575 | { |
576 | QStringList uids; | 576 | QStringList uids; |
577 | uids << a.uid(); | 577 | uids << a.uid(); |
578 | 578 | ||
579 | beamVCard(uids); | 579 | beamVCard(uids); |
580 | } else { | 580 | } else { |
581 | KMessageBox::information( this, i18n( "Your personal contact is\nnot set! Please select it\nand set it with menu:\nSettings - Set Who Am I\n" ) ); | 581 | KMessageBox::information( this, i18n( "Your personal contact is\nnot set! Please select it\nand set it with menu:\nSettings - Set Who Am I\n" ) ); |
582 | 582 | ||
583 | 583 | ||
584 | } | 584 | } |
585 | } | 585 | } |
586 | 586 | ||
587 | void KABCore::beamVCard() | 587 | void KABCore::beamVCard() |
588 | { | 588 | { |
589 | QStringList uids = mViewManager->selectedUids(); | 589 | QStringList uids = mViewManager->selectedUids(); |
590 | if ( !uids.isEmpty() ) | 590 | if ( !uids.isEmpty() ) |
591 | beamVCard( uids ); | 591 | beamVCard( uids ); |
592 | } | 592 | } |
593 | 593 | ||
594 | 594 | ||
595 | void KABCore::beamVCard(const QStringList& uids) | 595 | void KABCore::beamVCard(const QStringList& uids) |
596 | { | 596 | { |
597 | /*US | 597 | /*US |
598 | QString beamFilename; | 598 | QString beamFilename; |
599 | Opie::OPimContact c; | 599 | Opie::OPimContact c; |
600 | if ( actionPersonal->isOn() ) { | 600 | if ( actionPersonal->isOn() ) { |
601 | beamFilename = addressbookPersonalVCardName(); | 601 | beamFilename = addressbookPersonalVCardName(); |
602 | if ( !QFile::exists( beamFilename ) ) | 602 | if ( !QFile::exists( beamFilename ) ) |
603 | return; // can't beam a non-existent file | 603 | return; // can't beam a non-existent file |
604 | Opie::OPimContactAccessBackend* vcard_backend = new Opie::OPimContactAccessBackend_VCard( QString::null, | 604 | Opie::OPimContactAccessBackend* vcard_backend = new Opie::OPimContactAccessBackend_VCard( QString::null, |
605 | beamFilename ); | 605 | beamFilename ); |
606 | Opie::OPimContactAccess* access = new Opie::OPimContactAccess ( "addressbook", QString::null , vcard_backend, true ); | 606 | Opie::OPimContactAccess* access = new Opie::OPimContactAccess ( "addressbook", QString::null , vcard_backend, true ); |
607 | Opie::OPimContactAccess::List allList = access->allRecords(); | 607 | Opie::OPimContactAccess::List allList = access->allRecords(); |
608 | Opie::OPimContactAccess::List::Iterator it = allList.begin(); // Just take first | 608 | Opie::OPimContactAccess::List::Iterator it = allList.begin(); // Just take first |
609 | c = *it; | 609 | c = *it; |
610 | 610 | ||
611 | delete access; | 611 | delete access; |
612 | } else { | 612 | } else { |
613 | unlink( beamfile ); // delete if exists | 613 | unlink( beamfile ); // delete if exists |
614 | mkdir("/tmp/obex/", 0755); | 614 | mkdir("/tmp/obex/", 0755); |
615 | c = m_abView -> currentEntry(); | 615 | c = m_abView -> currentEntry(); |
616 | Opie::OPimContactAccessBackend* vcard_backend = new Opie::OPimContactAccessBackend_VCard( QString::null, | 616 | Opie::OPimContactAccessBackend* vcard_backend = new Opie::OPimContactAccessBackend_VCard( QString::null, |
617 | beamfile ); | 617 | beamfile ); |
618 | Opie::OPimContactAccess* access = new Opie::OPimContactAccess ( "addressbook", QString::null , vcard_backend, true ); | 618 | Opie::OPimContactAccess* access = new Opie::OPimContactAccess ( "addressbook", QString::null , vcard_backend, true ); |
619 | access->add( c ); | 619 | access->add( c ); |
620 | access->save(); | 620 | access->save(); |
621 | delete access; | 621 | delete access; |
622 | 622 | ||
623 | beamFilename = beamfile; | 623 | beamFilename = beamfile; |
624 | } | 624 | } |
625 | 625 | ||
626 | owarn << "Beaming: " << beamFilename << oendl; | 626 | owarn << "Beaming: " << beamFilename << oendl; |
627 | */ | 627 | */ |
628 | 628 | ||
629 | #if 0 | 629 | #if 0 |
630 | QString tmpdir = locateLocal("tmp", KGlobal::getAppName()); | 630 | QString tmpdir = locateLocal("tmp", KGlobal::getAppName()); |
631 | 631 | ||
632 | QString dirName = tmpdir + "/" + KApplication::randomString( 8 ); | 632 | QString dirName = tmpdir + "/" + KApplication::randomString( 8 ); |
633 | 633 | ||
634 | QString name = "contact.vcf"; | 634 | QString name = "contact.vcf"; |
635 | 635 | ||
636 | QString fileName = dirName + "/" + name; | 636 | QString fileName = dirName + "/" + name; |
637 | #endif | 637 | #endif |
638 | // LR: we should use the /tmp dir, because: /tmp = RAM, (HOME)/kdepim = flash memory | 638 | // LR: we should use the /tmp dir, because: /tmp = RAM, (HOME)/kdepim = flash memory |
639 | // | 639 | // |
640 | QString fileName = "/tmp/kdepimbeamfile"; | 640 | QString fileName = "/tmp/kapibeamfile.vcf"; |
641 | 641 | ||
642 | 642 | ||
643 | //QDir().mkdir( dirName, true ); | 643 | //QDir().mkdir( dirName, true ); |
644 | 644 | ||
645 | QFile outFile(fileName); | 645 | QFile outFile(fileName); |
646 | KABC::VCardConverter converter; | 646 | KABC::VCardConverter converter; |
647 | QString description; | 647 | QString description; |
648 | 648 | ||
649 | if ( outFile.open(IO_WriteOnly) ) { // file opened successfully | 649 | if ( outFile.open(IO_WriteOnly) ) { // file opened successfully |
650 | 650 | ||
651 | QTextStream t( &outFile ); // use a text stream | 651 | QTextStream t( &outFile ); // use a text stream |
652 | t.setEncoding( QTextStream::UnicodeUTF8 ); | 652 | t.setEncoding( QTextStream::UnicodeUTF8 ); |
653 | 653 | ||
654 | for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) { | 654 | for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) { |
655 | KABC::Addressee a = mAddressBook->findByUid( *it ); | 655 | KABC::Addressee a = mAddressBook->findByUid( *it ); |
656 | 656 | ||
657 | if ( a.isEmpty() ) | 657 | if ( a.isEmpty() ) |
658 | continue; | 658 | continue; |
659 | 659 | ||
660 | if (description.isEmpty()) | 660 | if (description.isEmpty()) |
661 | description = a.formattedName(); | 661 | description = a.formattedName(); |
662 | 662 | ||
663 | QString vcard; | 663 | QString vcard; |
664 | converter.addresseeToVCard( a, vcard ); | 664 | converter.addresseeToVCard( a, vcard ); |
665 | t << vcard; | 665 | t << vcard; |
666 | 666 | ||
667 | } | 667 | } |
668 | } else { | 668 | } else { |
669 | qDebug("Error open temp beam file "); | 669 | qDebug("Error open temp beam file "); |
670 | return; | 670 | return; |
671 | } | 671 | } |
672 | 672 | ||
673 | outFile.close(); | 673 | outFile.close(); |
674 | 674 | ||
675 | #ifndef DESKTOP_VERSION | 675 | #ifndef DESKTOP_VERSION |
676 | Ir *ir = new Ir( this ); | 676 | Ir *ir = new Ir( this ); |
677 | connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) ); | 677 | connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) ); |
678 | ir->send( fileName, description, "text/x-vCard" ); | 678 | ir->send( fileName, description, "text/x-vCard" ); |
679 | #endif | 679 | #endif |
680 | 680 | ||
681 | } | 681 | } |
682 | 682 | ||
683 | void KABCore::beamDone( Ir *ir ) | 683 | void KABCore::beamDone( Ir *ir ) |
684 | { | 684 | { |
685 | #ifndef DESKTOP_VERSION | 685 | #ifndef DESKTOP_VERSION |
686 | delete ir; | 686 | delete ir; |
687 | #endif | 687 | #endif |
688 | } | 688 | } |
689 | 689 | ||
690 | 690 | ||
691 | void KABCore::browse( const QString& url ) | 691 | void KABCore::browse( const QString& url ) |
692 | { | 692 | { |
693 | #ifndef KAB_EMBEDDED | 693 | #ifndef KAB_EMBEDDED |
694 | kapp->invokeBrowser( url ); | 694 | kapp->invokeBrowser( url ); |
695 | #else //KAB_EMBEDDED | 695 | #else //KAB_EMBEDDED |
696 | qDebug("KABCore::browse must be fixed"); | 696 | qDebug("KABCore::browse must be fixed"); |
697 | #endif //KAB_EMBEDDED | 697 | #endif //KAB_EMBEDDED |
698 | } | 698 | } |
699 | 699 | ||
700 | void KABCore::selectAllContacts() | 700 | void KABCore::selectAllContacts() |
701 | { | 701 | { |
702 | mViewManager->setSelected( QString::null, true ); | 702 | mViewManager->setSelected( QString::null, true ); |
703 | } | 703 | } |
704 | 704 | ||
705 | void KABCore::deleteContacts() | 705 | void KABCore::deleteContacts() |
706 | { | 706 | { |
707 | QStringList uidList = mViewManager->selectedUids(); | 707 | QStringList uidList = mViewManager->selectedUids(); |
708 | deleteContacts( uidList ); | 708 | deleteContacts( uidList ); |
709 | } | 709 | } |
710 | 710 | ||
711 | void KABCore::deleteContacts( const QStringList &uids ) | 711 | void KABCore::deleteContacts( const QStringList &uids ) |
712 | { | 712 | { |
713 | if ( uids.count() > 0 ) { | 713 | if ( uids.count() > 0 ) { |
714 | PwDeleteCommand *command = new PwDeleteCommand( mAddressBook, uids ); | 714 | PwDeleteCommand *command = new PwDeleteCommand( mAddressBook, uids ); |
715 | UndoStack::instance()->push( command ); | 715 | UndoStack::instance()->push( command ); |
716 | RedoStack::instance()->clear(); | 716 | RedoStack::instance()->clear(); |
717 | 717 | ||
718 | // now if we deleted anything, refresh | 718 | // now if we deleted anything, refresh |
719 | setContactSelected( QString::null ); | 719 | setContactSelected( QString::null ); |
720 | setModified( true ); | 720 | setModified( true ); |
721 | } | 721 | } |
722 | } | 722 | } |
723 | 723 | ||
724 | void KABCore::copyContacts() | 724 | void KABCore::copyContacts() |
725 | { | 725 | { |
726 | KABC::Addressee::List addrList = mViewManager->selectedAddressees(); | 726 | KABC::Addressee::List addrList = mViewManager->selectedAddressees(); |
727 | 727 | ||
728 | QString clipText = AddresseeUtil::addresseesToClipboard( addrList ); | 728 | QString clipText = AddresseeUtil::addresseesToClipboard( addrList ); |
729 | 729 | ||
730 | kdDebug(5720) << "KABCore::copyContacts: " << clipText << endl; | 730 | kdDebug(5720) << "KABCore::copyContacts: " << clipText << endl; |
731 | 731 | ||
732 | QClipboard *cb = QApplication::clipboard(); | 732 | QClipboard *cb = QApplication::clipboard(); |
733 | cb->setText( clipText ); | 733 | cb->setText( clipText ); |
734 | } | 734 | } |
735 | 735 | ||
736 | void KABCore::cutContacts() | 736 | void KABCore::cutContacts() |
737 | { | 737 | { |
738 | QStringList uidList = mViewManager->selectedUids(); | 738 | QStringList uidList = mViewManager->selectedUids(); |
739 | 739 | ||
740 | //US if ( uidList.size() > 0 ) { | 740 | //US if ( uidList.size() > 0 ) { |
741 | if ( uidList.count() > 0 ) { | 741 | if ( uidList.count() > 0 ) { |
742 | PwCutCommand *command = new PwCutCommand( mAddressBook, uidList ); | 742 | PwCutCommand *command = new PwCutCommand( mAddressBook, uidList ); |
743 | UndoStack::instance()->push( command ); | 743 | UndoStack::instance()->push( command ); |
744 | RedoStack::instance()->clear(); | 744 | RedoStack::instance()->clear(); |
745 | 745 | ||
746 | setModified( true ); | 746 | setModified( true ); |
747 | } | 747 | } |
748 | } | 748 | } |
749 | 749 | ||
750 | void KABCore::pasteContacts() | 750 | void KABCore::pasteContacts() |
751 | { | 751 | { |
752 | QClipboard *cb = QApplication::clipboard(); | 752 | QClipboard *cb = QApplication::clipboard(); |
753 | 753 | ||
754 | KABC::Addressee::List list = AddresseeUtil::clipboardToAddressees( cb->text() ); | 754 | KABC::Addressee::List list = AddresseeUtil::clipboardToAddressees( cb->text() ); |
755 | 755 | ||
756 | pasteContacts( list ); | 756 | pasteContacts( list ); |
757 | } | 757 | } |
758 | 758 | ||
759 | void KABCore::pasteContacts( KABC::Addressee::List &list ) | 759 | void KABCore::pasteContacts( KABC::Addressee::List &list ) |
760 | { | 760 | { |
761 | KABC::Resource *resource = requestResource( this ); | 761 | KABC::Resource *resource = requestResource( this ); |
762 | KABC::Addressee::List::Iterator it; | 762 | KABC::Addressee::List::Iterator it; |
763 | for ( it = list.begin(); it != list.end(); ++it ) | 763 | for ( it = list.begin(); it != list.end(); ++it ) |
764 | (*it).setResource( resource ); | 764 | (*it).setResource( resource ); |
765 | 765 | ||
766 | PwPasteCommand *command = new PwPasteCommand( this, list ); | 766 | PwPasteCommand *command = new PwPasteCommand( this, list ); |
767 | UndoStack::instance()->push( command ); | 767 | UndoStack::instance()->push( command ); |
768 | RedoStack::instance()->clear(); | 768 | RedoStack::instance()->clear(); |
769 | 769 | ||
770 | setModified( true ); | 770 | setModified( true ); |
771 | } | 771 | } |
772 | 772 | ||
773 | void KABCore::setWhoAmI() | 773 | void KABCore::setWhoAmI() |
774 | { | 774 | { |
775 | KABC::Addressee::List addrList = mViewManager->selectedAddressees(); | 775 | KABC::Addressee::List addrList = mViewManager->selectedAddressees(); |
776 | 776 | ||
777 | if ( addrList.count() > 1 ) { | 777 | if ( addrList.count() > 1 ) { |
778 | KMessageBox::sorry( this, i18n( "Please select only one contact." ) ); | 778 | KMessageBox::sorry( this, i18n( "Please select only one contact." ) ); |
779 | return; | 779 | return; |
780 | } | 780 | } |
781 | 781 | ||
782 | QString text( i18n( "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>" ) ); | 782 | QString text( i18n( "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>" ) ); |
783 | if ( KMessageBox::questionYesNo( this, text.arg( addrList[ 0 ].assembledName() ) ) == KMessageBox::Yes ) | 783 | if ( KMessageBox::questionYesNo( this, text.arg( addrList[ 0 ].assembledName() ) ) == KMessageBox::Yes ) |
784 | static_cast<KABC::StdAddressBook*>( KABC::StdAddressBook::self() )->setWhoAmI( addrList[ 0 ] ); | 784 | static_cast<KABC::StdAddressBook*>( KABC::StdAddressBook::self() )->setWhoAmI( addrList[ 0 ] ); |
785 | } | 785 | } |
786 | 786 | ||
787 | void KABCore::setCategories() | 787 | void KABCore::setCategories() |
788 | { | 788 | { |
789 | KPIM::CategorySelectDialog dlg( KABPrefs::instance(), this, "", true ); | 789 | KPIM::CategorySelectDialog dlg( KABPrefs::instance(), this, "", true ); |
790 | if ( !dlg.exec() ) | 790 | if ( !dlg.exec() ) |
791 | return; | 791 | return; |
792 | 792 | ||
793 | bool merge = false; | 793 | bool merge = false; |
794 | QString msg = i18n( "Merge with existing categories?" ); | 794 | QString msg = i18n( "Merge with existing categories?" ); |
795 | if ( KMessageBox::questionYesNo( this, msg ) == KMessageBox::Yes ) | 795 | if ( KMessageBox::questionYesNo( this, msg ) == KMessageBox::Yes ) |
796 | merge = true; | 796 | merge = true; |
797 | 797 | ||
798 | QStringList categories = dlg.selectedCategories(); | 798 | QStringList categories = dlg.selectedCategories(); |
799 | 799 | ||
800 | QStringList uids = mViewManager->selectedUids(); | 800 | QStringList uids = mViewManager->selectedUids(); |
801 | QStringList::Iterator it; | 801 | QStringList::Iterator it; |
802 | for ( it = uids.begin(); it != uids.end(); ++it ) { | 802 | for ( it = uids.begin(); it != uids.end(); ++it ) { |
803 | KABC::Addressee addr = mAddressBook->findByUid( *it ); | 803 | KABC::Addressee addr = mAddressBook->findByUid( *it ); |
804 | if ( !addr.isEmpty() ) { | 804 | if ( !addr.isEmpty() ) { |
805 | if ( !merge ) | 805 | if ( !merge ) |
806 | addr.setCategories( categories ); | 806 | addr.setCategories( categories ); |
807 | else { | 807 | else { |
808 | QStringList addrCategories = addr.categories(); | 808 | QStringList addrCategories = addr.categories(); |
809 | QStringList::Iterator catIt; | 809 | QStringList::Iterator catIt; |
810 | for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) { | 810 | for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) { |
811 | if ( !addrCategories.contains( *catIt ) ) | 811 | if ( !addrCategories.contains( *catIt ) ) |
812 | addrCategories.append( *catIt ); | 812 | addrCategories.append( *catIt ); |
813 | } | 813 | } |
814 | addr.setCategories( addrCategories ); | 814 | addr.setCategories( addrCategories ); |
815 | } | 815 | } |
816 | 816 | ||
817 | mAddressBook->insertAddressee( addr ); | 817 | mAddressBook->insertAddressee( addr ); |
818 | } | 818 | } |
819 | } | 819 | } |
820 | 820 | ||
821 | if ( uids.count() > 0 ) | 821 | if ( uids.count() > 0 ) |
822 | setModified( true ); | 822 | setModified( true ); |
823 | } | 823 | } |
824 | 824 | ||
825 | void KABCore::setSearchFields( const KABC::Field::List &fields ) | 825 | void KABCore::setSearchFields( const KABC::Field::List &fields ) |
826 | { | 826 | { |
827 | mIncSearchWidget->setFields( fields ); | 827 | mIncSearchWidget->setFields( fields ); |
828 | } | 828 | } |
829 | 829 | ||
830 | void KABCore::incrementalSearch( const QString& text ) | 830 | void KABCore::incrementalSearch( const QString& text ) |
831 | { | 831 | { |
832 | mViewManager->setSelected( QString::null, false ); | 832 | mViewManager->setSelected( QString::null, false ); |
diff --git a/kalarmd/simplealarmdaemonimpl.cpp b/kalarmd/simplealarmdaemonimpl.cpp index 18e4299..4ff6861 100644 --- a/kalarmd/simplealarmdaemonimpl.cpp +++ b/kalarmd/simplealarmdaemonimpl.cpp | |||
@@ -371,237 +371,237 @@ void SimpleAlarmDaemonImpl::fillTimerPopUp() | |||
371 | int secs = QDateTime::currentDateTime().secsTo ( mRunningTimer ); | 371 | int secs = QDateTime::currentDateTime().secsTo ( mRunningTimer ); |
372 | QTime t ( secs/3600, (secs/60)%60, secs%60 ); | 372 | QTime t ( secs/3600, (secs/60)%60, secs%60 ); |
373 | mTimerPopUp->insertItem( "Stop", 0 ); | 373 | mTimerPopUp->insertItem( "Stop", 0 ); |
374 | mTimerPopUp->insertItem( t.toString(),1); | 374 | mTimerPopUp->insertItem( t.toString(),1); |
375 | } else { | 375 | } else { |
376 | 376 | ||
377 | QString fileName = QDir::homeDirPath() +"/.kopialarmtimerrc"; | 377 | QString fileName = QDir::homeDirPath() +"/.kopialarmtimerrc"; |
378 | QFile file( fileName ); | 378 | QFile file( fileName ); |
379 | if( !QFile::exists( fileName) ) { | 379 | if( !QFile::exists( fileName) ) { |
380 | // write defaults | 380 | // write defaults |
381 | if (!file.open( IO_WriteOnly ) ) { | 381 | if (!file.open( IO_WriteOnly ) ) { |
382 | return; | 382 | return; |
383 | } | 383 | } |
384 | QString configString ; | 384 | QString configString ; |
385 | configString += "#config file for kopi alarm timer\n"; | 385 | configString += "#config file for kopi alarm timer\n"; |
386 | configString += "#format: <Text for popup menu>;<timer countdown in minutes>\n"; | 386 | configString += "#format: <Text for popup menu>;<timer countdown in minutes>\n"; |
387 | configString += "#NOTE: minimum value for timer are 3 minutes!\n"; | 387 | configString += "#NOTE: minimum value for timer are 3 minutes!\n"; |
388 | configString += "24 h; 1440\n"; | 388 | configString += "24 h; 1440\n"; |
389 | configString += " 8 h; 480\n"; | 389 | configString += " 8 h; 480\n"; |
390 | configString += " 5 h; 300\n"; | 390 | configString += " 5 h; 300\n"; |
391 | configString += " 1 h; 60\n"; | 391 | configString += " 1 h; 60\n"; |
392 | configString += "30 min; 30\n"; | 392 | configString += "30 min; 30\n"; |
393 | configString += "15 min; 15\n"; | 393 | configString += "15 min; 15\n"; |
394 | configString += "SEPARATOR\n"; | 394 | configString += "SEPARATOR\n"; |
395 | configString += "Pizza; 22\n"; | 395 | configString += "Pizza; 22\n"; |
396 | configString += "Nap; 45\n"; | 396 | configString += "Nap; 45\n"; |
397 | configString += "Tea; 5\n"; | 397 | configString += "Tea; 5\n"; |
398 | QTextStream ts( &file ); | 398 | QTextStream ts( &file ); |
399 | ts << configString ; | 399 | ts << configString ; |
400 | file.close(); | 400 | file.close(); |
401 | } | 401 | } |
402 | 402 | ||
403 | if (!file.open( IO_ReadOnly ) ) { | 403 | if (!file.open( IO_ReadOnly ) ) { |
404 | return ; | 404 | return ; |
405 | } | 405 | } |
406 | QString line; | 406 | QString line; |
407 | bool ok; | 407 | bool ok; |
408 | while ( file.readLine( line, 1024 ) > 0 ) { | 408 | while ( file.readLine( line, 1024 ) > 0 ) { |
409 | //qDebug("read %s ", line.latin1()); | 409 | //qDebug("read %s ", line.latin1()); |
410 | if ( line.left(1 ) != "#" ) { | 410 | if ( line.left(1 ) != "#" ) { |
411 | // no comment | 411 | // no comment |
412 | if ( line.left(9 ) == "SEPARATOR" ) { | 412 | if ( line.left(9 ) == "SEPARATOR" ) { |
413 | mTimerPopUp->insertSeparator(); | 413 | mTimerPopUp->insertSeparator(); |
414 | } else { | 414 | } else { |
415 | QStringList li = QStringList::split(";",line); | 415 | QStringList li = QStringList::split(";",line); |
416 | ok = false; | 416 | ok = false; |
417 | if ( li.count() == 2 ) { | 417 | if ( li.count() == 2 ) { |
418 | int val = li[1].toInt( &ok ); | 418 | int val = li[1].toInt( &ok ); |
419 | if ( ok && val > 2 ) { | 419 | if ( ok && val > 2 ) { |
420 | mTimerPopUp->insertItem( li[0], val); | 420 | mTimerPopUp->insertItem( li[0], val); |
421 | } | 421 | } |
422 | } | 422 | } |
423 | } | 423 | } |
424 | } | 424 | } |
425 | } | 425 | } |
426 | file.close(); | 426 | file.close(); |
427 | #if 0 | 427 | #if 0 |
428 | mTimerPopUp->insertItem( "24 h", 1440 ); | 428 | mTimerPopUp->insertItem( "24 h", 1440 ); |
429 | // mTimerPopUp->insertItem( i18n("12 h"), 720 ); | 429 | // mTimerPopUp->insertItem( i18n("12 h"), 720 ); |
430 | mTimerPopUp->insertItem( " 8 h", 480 ); | 430 | mTimerPopUp->insertItem( " 8 h", 480 ); |
431 | mTimerPopUp->insertItem( " 5 h", 300 ); | 431 | mTimerPopUp->insertItem( " 5 h", 300 ); |
432 | // mTimerPopUp->insertItem( i18n(" 2 h"), 120 ); | 432 | // mTimerPopUp->insertItem( i18n(" 2 h"), 120 ); |
433 | mTimerPopUp->insertItem( " 1 h", 60 ); | 433 | mTimerPopUp->insertItem( " 1 h", 60 ); |
434 | mTimerPopUp->insertItem( "30 min", 30 ); | 434 | mTimerPopUp->insertItem( "30 min", 30 ); |
435 | mTimerPopUp->insertItem( "15 min", 15 ); | 435 | mTimerPopUp->insertItem( "15 min", 15 ); |
436 | mTimerPopUp->insertItem( "10 min", 10 ); | 436 | mTimerPopUp->insertItem( "10 min", 10 ); |
437 | //mTimerPopUp->insertItem( " 5 min", 5 ); | 437 | //mTimerPopUp->insertItem( " 5 min", 5 ); |
438 | mTimerPopUp->insertSeparator(); | 438 | mTimerPopUp->insertSeparator(); |
439 | mTimerPopUp->insertItem( "Pizza", 22 ); | 439 | mTimerPopUp->insertItem( "Pizza", 22 ); |
440 | mTimerPopUp->insertItem( "Nap", 45 ); | 440 | mTimerPopUp->insertItem( "Nap", 45 ); |
441 | mTimerPopUp->insertItem( "Tea", 5 ); | 441 | mTimerPopUp->insertItem( "Tea", 5 ); |
442 | #endif | 442 | #endif |
443 | QString text = mCustomText.stripWhiteSpace (); | 443 | QString text = mCustomText.stripWhiteSpace (); |
444 | int in = text.find( " " ); | 444 | int in = text.find( " " ); |
445 | text = text.left ( in ); | 445 | text = text.left ( in ); |
446 | mTimerPopUp->insertItem( text, 3 ); | 446 | mTimerPopUp->insertItem( text, 3 ); |
447 | mTimerPopUp->insertSeparator(); | 447 | mTimerPopUp->insertSeparator(); |
448 | mTimerPopUp->insertItem( "Customize", 2 ); | 448 | mTimerPopUp->insertItem( "Customize", 2 ); |
449 | } | 449 | } |
450 | 450 | ||
451 | } | 451 | } |
452 | 452 | ||
453 | void SimpleAlarmDaemonImpl::showTimer() | 453 | void SimpleAlarmDaemonImpl::showTimer() |
454 | { | 454 | { |
455 | fillTimerPopUp(); | 455 | fillTimerPopUp(); |
456 | } | 456 | } |
457 | 457 | ||
458 | void SimpleAlarmDaemonImpl::confTimer( int time ) | 458 | void SimpleAlarmDaemonImpl::confTimer( int time ) |
459 | { | 459 | { |
460 | //qDebug("impleAlarmDaemonImpl::confTimer() %d ", time ); | 460 | //qDebug("impleAlarmDaemonImpl::confTimer() %d ", time ); |
461 | int minutes = time; | 461 | int minutes = time; |
462 | if ( minutes == 0 ) { | 462 | if ( minutes == 0 ) { |
463 | if ( ! mTimerTime ) | 463 | if ( ! mTimerTime ) |
464 | return; | 464 | return; |
465 | 465 | ||
466 | QDialog dia ( 0, ("Stop Timer" ), true ); | 466 | QDialog dia ( 0, ("Stop Timer" ), true ); |
467 | QLabel lab (("Really stop the timer?"), &dia ); | 467 | QLabel lab (("Really stop the timer?"), &dia ); |
468 | dia.setCaption(("KO/Pi Timer Stop" )); | 468 | dia.setCaption(("KO/Pi Timer Stop" )); |
469 | QVBoxLayout lay( &dia ); | 469 | QVBoxLayout lay( &dia ); |
470 | lay.setMargin(5); | 470 | lay.setMargin(5); |
471 | lay.setSpacing(5); | 471 | lay.setSpacing(5); |
472 | lay.addWidget( &lab); | 472 | lay.addWidget( &lab); |
473 | dia.resize( 200, dia.sizeHint().height() ); | 473 | dia.resize( 200, dia.sizeHint().height() ); |
474 | 474 | ||
475 | if ( !dia.exec() ) | 475 | if ( !dia.exec() ) |
476 | return; | 476 | return; |
477 | 477 | ||
478 | AlarmServer::deleteAlarm ( mRunningTimer,"koalarm" , timerMesssage.latin1() ); | 478 | AlarmServer::deleteAlarm ( mRunningTimer,"koalarm" , timerMesssage.latin1() ); |
479 | mTimerTime = 0; | 479 | mTimerTime = 0; |
480 | return; | 480 | return; |
481 | } | 481 | } |
482 | if ( mTimerTime ) | 482 | if ( mTimerTime ) |
483 | return; | 483 | return; |
484 | if ( minutes == 1 ) { | 484 | if ( minutes == 1 ) { |
485 | return; | 485 | return; |
486 | } | 486 | } |
487 | QString mess = "timer_alarm"; | 487 | QString mess = "timer_alarm"; |
488 | mess += ("Timer Alarm!\n"); | 488 | mess += ("Timer Alarm!\n"); |
489 | if ( minutes == 22 ) | 489 | if ( minutes == 22 ) |
490 | mess += ( "Pizza is ready"); | 490 | mess += ( "Pizza is ready"); |
491 | else if ( minutes == 45 ) | 491 | else if ( minutes == 45 ) |
492 | mess += ( "Please wake up!"); | 492 | mess += ( "Please wake up!"); |
493 | else if ( minutes == 5 ) | 493 | else if ( minutes == 5 ) |
494 | mess += ( "Tea is ready"); | 494 | mess += ( "Tea is ready"); |
495 | else if ( minutes == 3 ) { | 495 | else if ( minutes == 3 ) { |
496 | mess += mCustomText; | 496 | mess += mCustomText; |
497 | minutes = mCustomMinutes ; | 497 | minutes = mCustomMinutes ; |
498 | } | 498 | } |
499 | else { | 499 | else { |
500 | if ( minutes == 2 ) { | 500 | if ( minutes == 2 ) { |
501 | // ask time | 501 | // ask time |
502 | QDialog dia ( 0, ("Customize Timer" ), true ); | 502 | QDialog dia ( 0, ("Customize Timer" ), true ); |
503 | QLabel lab (("Message Text:"), &dia ); | 503 | QLabel lab (("Message Text:"), &dia ); |
504 | dia.setCaption(("KO/Pi Timer" )); | 504 | dia.setCaption(("KO/Pi Timer" )); |
505 | QVBoxLayout lay( &dia ); | 505 | QVBoxLayout lay( &dia ); |
506 | lay.setMargin(5); | 506 | lay.setMargin(5); |
507 | lay.setSpacing(5); | 507 | lay.setSpacing(5); |
508 | lay.addWidget( &lab); | 508 | lay.addWidget( &lab); |
509 | QLineEdit lEdit( mCustomText, &dia ); | 509 | QLineEdit lEdit( mCustomText, &dia ); |
510 | lay.addWidget( &lEdit); | 510 | lay.addWidget( &lEdit); |
511 | QLabel lab2 (("Countdown time (1 min - 24 h):"), &dia ); | 511 | QLabel lab2 (("Countdown time (1 min - 24 h):"), &dia ); |
512 | lay.addWidget( &lab2); | 512 | lay.addWidget( &lab2); |
513 | QHBox hbox ( &dia ); | 513 | QHBox hbox ( &dia ); |
514 | QLabel lab3 (("h:"), &hbox ); | 514 | QLabel lab3 (("h:"), &hbox ); |
515 | QSpinBox spinh( 0, 24, 1,& hbox ); | 515 | QSpinBox spinh( 0, 24, 1,& hbox ); |
516 | QLabel lab4 ((" min:"), &hbox ); | 516 | QLabel lab4 ((" min:"), &hbox ); |
517 | QSpinBox spinm( 0, 59, 1,&hbox ); | 517 | QSpinBox spinm( 0, 59, 1,&hbox ); |
518 | spinh.setValue( mCustomMinutes/60 ); | 518 | spinh.setValue( mCustomMinutes/60 ); |
519 | spinm.setValue( mCustomMinutes%60 ); | 519 | spinm.setValue( mCustomMinutes%60 ); |
520 | lay.addWidget( &hbox); | 520 | lay.addWidget( &hbox); |
521 | dia.resize( dia.sizeHint().width(), dia.sizeHint().height() ); | 521 | dia.resize( dia.sizeHint().width(), dia.sizeHint().height() ); |
522 | if ( !dia.exec() ) | 522 | if ( !dia.exec() ) |
523 | return; | 523 | return; |
524 | mCustomText = lEdit.text(); | 524 | mCustomText = lEdit.text(); |
525 | mCustomMinutes = spinh.value()*60+spinm.value(); | 525 | mCustomMinutes = spinh.value()*60+spinm.value(); |
526 | if ( mCustomMinutes == 0 ) | 526 | if ( mCustomMinutes == 0 ) |
527 | mCustomMinutes = 1; | 527 | mCustomMinutes = 1; |
528 | if ( mCustomMinutes > 1440 ) | 528 | if ( mCustomMinutes > 1440 ) |
529 | mCustomMinutes = 1440; | 529 | mCustomMinutes = 1440; |
530 | mess += mCustomText; | 530 | mess += mCustomText; |
531 | minutes = mCustomMinutes; | 531 | minutes = mCustomMinutes; |
532 | } | 532 | } |
533 | else | 533 | else |
534 | mess+= QString::number ( minutes ) + ( " minutes are past!"); | 534 | mess+= QString::number ( minutes ) + ( " minutes are past!"); |
535 | } | 535 | } |
536 | //minutes = 1; | 536 | //minutes = 1; |
537 | mRunningTimer = QDateTime::currentDateTime().addSecs( minutes * 60 ); | 537 | mRunningTimer = QDateTime::currentDateTime().addSecs( minutes * 60 ); |
538 | timerMesssage = mess; | 538 | timerMesssage = mess; |
539 | AlarmServer::addAlarm ( mRunningTimer,"koalarm",timerMesssage.latin1()); | 539 | AlarmServer::addAlarm ( mRunningTimer,"koalarm",timerMesssage.latin1()); |
540 | mTimerTime = 1; | 540 | mTimerTime = 1; |
541 | } | 541 | } |
542 | 542 | ||
543 | void SimpleAlarmDaemonImpl::writeFile() | 543 | void SimpleAlarmDaemonImpl::writeFile() |
544 | { | 544 | { |
545 | QCopEnvelope e("QPE/Application/kopi", "-writeFile"); | 545 | QCopEnvelope e("QPE/Application/kopi", "-writeFile"); |
546 | } | 546 | } |
547 | void SimpleAlarmDaemonImpl::showWN() | 547 | void SimpleAlarmDaemonImpl::showWN() |
548 | { | 548 | { |
549 | QCopEnvelope e("QPE/Application/kopi", "-showWN"); | 549 | QCopEnvelope e("QPE/Application/kopi", "-showWN"); |
550 | } | 550 | } |
551 | void SimpleAlarmDaemonImpl::newTodo() | 551 | void SimpleAlarmDaemonImpl::newTodo() |
552 | { | 552 | { |
553 | QCopEnvelope e("QPE/Application/kopi", "-newTodo"); | 553 | QCopEnvelope e("QPE/Application/kopi", "-newTodo"); |
554 | } | 554 | } |
555 | 555 | ||
556 | void SimpleAlarmDaemonImpl::newEvent() | 556 | void SimpleAlarmDaemonImpl::newEvent() |
557 | { | 557 | { |
558 | QCopEnvelope e("QPE/Application/kopi", "-newEvent"); | 558 | QCopEnvelope e("QPE/Application/kopi", "-newEvent"); |
559 | 559 | ||
560 | } | 560 | } |
561 | void SimpleAlarmDaemonImpl::newMail() | 561 | void SimpleAlarmDaemonImpl::newMail() |
562 | { | 562 | { |
563 | QCopEnvelope e("QPE/Application/kmpi", "newMail()"); | 563 | QCopEnvelope e("QPE/Application/ompi", "newMail()"); |
564 | } | 564 | } |
565 | void SimpleAlarmDaemonImpl::showAdd() | 565 | void SimpleAlarmDaemonImpl::showAdd() |
566 | { | 566 | { |
567 | QCopEnvelope e("QPE/Application/kapi", " "); | 567 | QCopEnvelope e("QPE/Application/kapi", " "); |
568 | } | 568 | } |
569 | void SimpleAlarmDaemonImpl::ringSync() | 569 | void SimpleAlarmDaemonImpl::ringSync() |
570 | { | 570 | { |
571 | QCopEnvelope e("QPE/Application/kopi", "-ringSync"); | 571 | QCopEnvelope e("QPE/Application/kopi", "-ringSync"); |
572 | 572 | ||
573 | } | 573 | } |
574 | void SimpleAlarmDaemonImpl::newCountdown() | 574 | void SimpleAlarmDaemonImpl::newCountdown() |
575 | { | 575 | { |
576 | //recieve("cal_alarm", 10 ); | 576 | //recieve("cal_alarm", 10 ); |
577 | } | 577 | } |
578 | void SimpleAlarmDaemonImpl::simulate() | 578 | void SimpleAlarmDaemonImpl::simulate() |
579 | { | 579 | { |
580 | writeFile(); | 580 | writeFile(); |
581 | QString filename = getenv("QPEDIR") ; | 581 | QString filename = getenv("QPEDIR") ; |
582 | filename += "/pics/kdepim/korganizer/koalarm.wav"; | 582 | filename += "/pics/kdepim/korganizer/koalarm.wav"; |
583 | startAlarm("Alarm simulation", filename ); | 583 | startAlarm("Alarm simulation", filename ); |
584 | } | 584 | } |
585 | void SimpleAlarmDaemonImpl::showKO() | 585 | void SimpleAlarmDaemonImpl::showKO() |
586 | { | 586 | { |
587 | QCopEnvelope e("QPE/Application/kopi", "-showKO"); | 587 | QCopEnvelope e("QPE/Application/kopi", "-showKO"); |
588 | 588 | ||
589 | } | 589 | } |
590 | void SimpleAlarmDaemonImpl::showTodo() | 590 | void SimpleAlarmDaemonImpl::showTodo() |
591 | { | 591 | { |
592 | QCopEnvelope e("QPE/Application/kopi", "-showTodo"); | 592 | QCopEnvelope e("QPE/Application/kopi", "-showTodo"); |
593 | 593 | ||
594 | } | 594 | } |
595 | void SimpleAlarmDaemonImpl::writeJournal() | 595 | void SimpleAlarmDaemonImpl::writeJournal() |
596 | { | 596 | { |
597 | QCopEnvelope e("QPE/Application/kopi", "-showJournal"); | 597 | QCopEnvelope e("QPE/Application/kopi", "-showJournal"); |
598 | 598 | ||
599 | } | 599 | } |
600 | 600 | ||
601 | void SimpleAlarmDaemonImpl::mousePressEvent( QMouseEvent * ) | 601 | void SimpleAlarmDaemonImpl::mousePressEvent( QMouseEvent * ) |
602 | { | 602 | { |
603 | 603 | ||
604 | mPopUp->popup(mapToGlobal(QPoint (0, -mPopUp->height() ))); | 604 | mPopUp->popup(mapToGlobal(QPoint (0, -mPopUp->height() ))); |
605 | 605 | ||
606 | } | 606 | } |
607 | 607 | ||
diff --git a/kdepim.control b/kdepim.control index 56f9460..b0355a2 100644 --- a/kdepim.control +++ b/kdepim.control | |||
@@ -1,14 +1,14 @@ | |||
1 | Files: bin/kopi bin/db2file bin/kapi apps/Pim/korganizer.desktop apps/Pim/kaddressbook.desktop pics/kdepim/* lib/libmicro* | 1 | Files: bin/kopi bin/db2file bin/kapi apps/Pim/korganizer.desktop apps/Pim/kaddressbook.desktop pics/kdepim/* lib/libmicro* |
2 | 2 | ||
3 | Priority: optional | 3 | Priority: optional |
4 | Section: qpe/pim | 4 | Section: qpe/pim |
5 | Maintainer: Lutz Rogowski <lutz@pi-sync.net> | 5 | Maintainer: Lutz Rogowski <lutz@pi-sync.net> |
6 | Architecture: arm | 6 | Architecture: arm |
7 | Version: 1.9.2a | 7 | Version: 1.9.4 |
8 | License: GPL | 8 | License: GPL |
9 | Depends: | 9 | Depends: |
10 | Description: KOrganizer/Pi and Kaddressbook/Pi | 10 | Description: KOrganizer/Pi and Kaddressbook/Pi |
11 | The embedded version of KOrganizer/Platform-independend, | 11 | The embedded version of KOrganizer/Platform-independend, |
12 | the KDE calendar and scheduling program | 12 | the KDE calendar and scheduling program |
13 | optimized for 640x480 and 320x240 resolution | 13 | optimized for 640x480 and 320x240 resolution |
14 | on Zaurus PDA | 14 | on Zaurus PDA |
diff --git a/kmicrokdelibs.control b/kmicrokdelibs.control index 173b639..d894176 100644 --- a/kmicrokdelibs.control +++ b/kmicrokdelibs.control | |||
@@ -1,14 +1,14 @@ | |||
1 | Files: bin/db2file lib/libmicro* | 1 | Files: bin/db2file lib/libmicro* pics/kdepim/LICENCE.TXT |
2 | 2 | ||
3 | Priority: optional | 3 | Priority: optional |
4 | Section: qpe/pim | 4 | Section: qpe/pim |
5 | Maintainer: Lutz Rogowski <lutz@pi-sync.net> | 5 | Maintainer: Lutz Rogowski <lutz@pi-sync.net> |
6 | Architecture: arm | 6 | Architecture: arm |
7 | Version: 1.9.4 | 7 | Version: 1.9.4 |
8 | License: GPL | 8 | License: GPL |
9 | Depends: | 9 | Depends: |
10 | Description: KOrganizer/Pi and Kaddressbook/Pi | 10 | Description: KOrganizer/Pi and Kaddressbook/Pi |
11 | The embedded version of KOrganizer/Platform-independend, | 11 | The embedded version of KOrganizer/Platform-independend, |
12 | the KDE calendar and scheduling program | 12 | the KDE calendar and scheduling program |
13 | optimized for 640x480 and 320x240 resolution | 13 | optimized for 640x480 and 320x240 resolution |
14 | on Zaurus PDA | 14 | on Zaurus PDA |
diff --git a/kmicromail/composemail.cpp b/kmicromail/composemail.cpp index f7604ad..14feeee 100644 --- a/kmicromail/composemail.cpp +++ b/kmicromail/composemail.cpp | |||
@@ -12,385 +12,385 @@ | |||
12 | //#include <opie2/odebug.h> | 12 | //#include <opie2/odebug.h> |
13 | #include <kfiledialog.h> | 13 | #include <kfiledialog.h> |
14 | //#include <qpe/resource.h> | 14 | //#include <qpe/resource.h> |
15 | #include <qpe/config.h> | 15 | #include <qpe/config.h> |
16 | #include <qpe/global.h> | 16 | #include <qpe/global.h> |
17 | //#include <qpe/contact.h> | 17 | //#include <qpe/contact.h> |
18 | 18 | ||
19 | 19 | ||
20 | #include <qcombobox.h> | 20 | #include <qcombobox.h> |
21 | #include <qcheckbox.h> | 21 | #include <qcheckbox.h> |
22 | #include <qtimer.h> | 22 | #include <qtimer.h> |
23 | #include <qmessagebox.h> | 23 | #include <qmessagebox.h> |
24 | #include <qpushbutton.h> | 24 | #include <qpushbutton.h> |
25 | #include <qmultilineedit.h> | 25 | #include <qmultilineedit.h> |
26 | #include <qlabel.h> | 26 | #include <qlabel.h> |
27 | #include <qtabwidget.h> | 27 | #include <qtabwidget.h> |
28 | #include <qlistview.h> | 28 | #include <qlistview.h> |
29 | #include <kabc/addresseedialog.h> | 29 | #include <kabc/addresseedialog.h> |
30 | #include <kabc/stdaddressbook.h> | 30 | #include <kabc/stdaddressbook.h> |
31 | #include <kabc/addressee.h> | 31 | #include <kabc/addressee.h> |
32 | #ifdef DESKTOP_VERSION | 32 | #ifdef DESKTOP_VERSION |
33 | #include <kabc/addresseedialog.h> | 33 | #include <kabc/addresseedialog.h> |
34 | #else //DESKTOP_VERSION | 34 | #else //DESKTOP_VERSION |
35 | #include <libkdepim/externalapphandler.h> | 35 | #include <libkdepim/externalapphandler.h> |
36 | #endif //DESKTOP_VERSION | 36 | #endif //DESKTOP_VERSION |
37 | 37 | ||
38 | 38 | ||
39 | //using namespace Opie::Core; | 39 | //using namespace Opie::Core; |
40 | //using namespace Opie::Ui; | 40 | //using namespace Opie::Ui; |
41 | ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) | 41 | ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) |
42 | : ComposeMailUI( parent, name, modal, flags ) | 42 | : ComposeMailUI( parent, name, modal, flags ) |
43 | { | 43 | { |
44 | 44 | ||
45 | mPickLineEdit = 0; | 45 | mPickLineEdit = 0; |
46 | connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)), | 46 | connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)), |
47 | this, SLOT(insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&))); | 47 | this, SLOT(insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&))); |
48 | settings = s; | 48 | settings = s; |
49 | m_replyid = ""; | 49 | m_replyid = ""; |
50 | KConfig config( locateLocal("config", "kabcrc") ); | 50 | KConfig config( locateLocal("config", "kabcrc") ); |
51 | config.setGroup( "General" ); | 51 | config.setGroup( "General" ); |
52 | QString whoami_uid = config.readEntry( "WhoAmI" ); | 52 | QString whoami_uid = config.readEntry( "WhoAmI" ); |
53 | if ( whoami_uid.isEmpty() ) { | 53 | if ( whoami_uid.isEmpty() ) { |
54 | QMessageBox::information( 0, tr( "Hint" ), | 54 | QMessageBox::information( 0, tr( "Hint" ), |
55 | tr( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ), | 55 | tr( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ), |
56 | tr( "Ok" ) ); | 56 | tr( "Ok" ) ); |
57 | 57 | ||
58 | } else | 58 | } else |
59 | bool res = ExternalAppHandler::instance()->requestDetailsFromKAPI("", "sendbacklist", whoami_uid); | 59 | bool res = ExternalAppHandler::instance()->requestDetailsFromKAPI("", "sendbacklist", whoami_uid); |
60 | #ifdef DESKTOP_VERSION | 60 | #ifdef DESKTOP_VERSION |
61 | KABC::Addressee con = KABC::StdAddressBook::self()->whoAmI( ); | 61 | KABC::Addressee con = KABC::StdAddressBook::self()->whoAmI( ); |
62 | QStringList mails = con.emails(); | 62 | QStringList mails = con.emails(); |
63 | QString defmail = con.preferredEmail(); | 63 | QString defmail = con.preferredEmail(); |
64 | if ( mails.count() == 0) | 64 | if ( mails.count() == 0) |
65 | QMessageBox::information( 0, tr( "Hint" ), | 65 | QMessageBox::information( 0, tr( "Hint" ), |
66 | tr( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ), | 66 | tr( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ), |
67 | tr( "Ok" ) ); | 67 | tr( "Ok" ) ); |
68 | if (defmail.length()!=0) { | 68 | if (defmail.length()!=0) { |
69 | fromBox->insertItem(defmail); | 69 | fromBox->insertItem(defmail); |
70 | } | 70 | } |
71 | QStringList::ConstIterator sit = mails.begin(); | 71 | QStringList::ConstIterator sit = mails.begin(); |
72 | for (;sit!=mails.end();++sit) { | 72 | for (;sit!=mails.end();++sit) { |
73 | if ( (*sit)==defmail) | 73 | if ( (*sit)==defmail) |
74 | continue; | 74 | continue; |
75 | fromBox->insertItem((*sit)); | 75 | fromBox->insertItem((*sit)); |
76 | } | 76 | } |
77 | senderNameEdit->setText(con.formattedName()); | 77 | senderNameEdit->setText(con.formattedName()); |
78 | #endif | 78 | #endif |
79 | Config cfg( "mail" ); | 79 | Config cfg( "mail" ); |
80 | cfg.setGroup( "Compose" ); | 80 | cfg.setGroup( "Compose" ); |
81 | checkBoxLater->setChecked( cfg.readBoolEntry( "sendLater", false ) ); | 81 | checkBoxLater->setChecked( cfg.readBoolEntry( "sendLater", false ) ); |
82 | 82 | ||
83 | attList->addColumn( tr( "Name" ) ); | 83 | attList->addColumn( tr( "Name" ) ); |
84 | attList->addColumn( tr( "Size" ) ); | 84 | attList->addColumn( tr( "Size" ) ); |
85 | 85 | ||
86 | QList<Account> accounts = settings->getAccounts(); | 86 | QList<Account> accounts = settings->getAccounts(); |
87 | 87 | ||
88 | Account *it; | 88 | Account *it; |
89 | for ( it = accounts.first(); it; it = accounts.next() ) { | 89 | for ( it = accounts.first(); it; it = accounts.next() ) { |
90 | if ( it->getType()==MAILLIB::A_SMTP ) { | 90 | if ( it->getType()==MAILLIB::A_SMTP ) { |
91 | SMTPaccount *smtp = static_cast<SMTPaccount *>(it); | 91 | SMTPaccount *smtp = static_cast<SMTPaccount *>(it); |
92 | smtpAccountBox->insertItem( smtp->getAccountName() ); | 92 | smtpAccountBox->insertItem( smtp->getAccountName() ); |
93 | smtpAccounts.append( smtp ); | 93 | smtpAccounts.append( smtp ); |
94 | } | 94 | } |
95 | } | 95 | } |
96 | if ( smtpAccounts.count() > 0 ) { | 96 | if ( smtpAccounts.count() > 0 ) { |
97 | fillValues( smtpAccountBox->currentItem() ); | 97 | fillValues( smtpAccountBox->currentItem() ); |
98 | } else { | 98 | } else { |
99 | QMessageBox::information( 0, tr( "Problem" ), | 99 | QMessageBox::information( 0, tr( "Problem" ), |
100 | tr( "Please create an SMTP account first.\nThe SMTP is needed for sending mail.\n" ), | 100 | tr( "Please create an SMTP account first.\nThe SMTP is needed for sending mail.\n" ), |
101 | tr( "Ok" ) ); | 101 | tr( "Ok" ) ); |
102 | return; | 102 | return; |
103 | } | 103 | } |
104 | connect( smtpAccountBox, SIGNAL( activated(int) ), SLOT( fillValues(int) ) ); | 104 | connect( smtpAccountBox, SIGNAL( activated(int) ), SLOT( fillValues(int) ) ); |
105 | connect( toButton, SIGNAL( clicked() ), SLOT( pickAddressTo() ) ); | 105 | connect( toButton, SIGNAL( clicked() ), SLOT( pickAddressTo() ) ); |
106 | connect( ccButton, SIGNAL( clicked() ), SLOT( pickAddressCC() ) ); | 106 | connect( ccButton, SIGNAL( clicked() ), SLOT( pickAddressCC() ) ); |
107 | connect( bccButton, SIGNAL( clicked() ), SLOT( pickAddressBCC() ) ); | 107 | connect( bccButton, SIGNAL( clicked() ), SLOT( pickAddressBCC() ) ); |
108 | connect( replyButton, SIGNAL( clicked() ), SLOT( pickAddressReply() ) ); | 108 | connect( replyButton, SIGNAL( clicked() ), SLOT( pickAddressReply() ) ); |
109 | connect( addButton, SIGNAL( clicked() ), SLOT( addAttachment() ) ); | 109 | connect( addButton, SIGNAL( clicked() ), SLOT( addAttachment() ) ); |
110 | connect( deleteButton, SIGNAL( clicked() ), SLOT( removeAttachment() ) ); | 110 | connect( deleteButton, SIGNAL( clicked() ), SLOT( removeAttachment() ) ); |
111 | connect( SaveButton, SIGNAL( clicked() ), SLOT( saveAsDraft()) ); | 111 | connect( SaveButton, SIGNAL( clicked() ), SLOT( saveAsDraft()) ); |
112 | mMail = 0; | 112 | mMail = 0; |
113 | warnAttach = true; | 113 | warnAttach = true; |
114 | 114 | ||
115 | } | 115 | } |
116 | 116 | ||
117 | 117 | ||
118 | 118 | ||
119 | void ComposeMail::saveAsDraft() | 119 | void ComposeMail::saveAsDraft() |
120 | { | 120 | { |
121 | 121 | ||
122 | Opie::Core::OSmartPointer<Mail> mail= new Mail(); | 122 | Opie::Core::OSmartPointer<Mail> mail= new Mail(); |
123 | mail->setMail(fromBox->currentText()); | 123 | mail->setMail(fromBox->currentText()); |
124 | mail->setTo( toLine->text() ); | 124 | mail->setTo( toLine->text() ); |
125 | mail->setName(senderNameEdit->text()); | 125 | mail->setName(senderNameEdit->text()); |
126 | mail->setCC( ccLine->text() ); | 126 | mail->setCC( ccLine->text() ); |
127 | mail->setBCC( bccLine->text() ); | 127 | mail->setBCC( bccLine->text() ); |
128 | mail->setReply( replyLine->text() ); | 128 | mail->setReply( replyLine->text() ); |
129 | mail->setSubject( subjectLine->text() ); | 129 | mail->setSubject( subjectLine->text() ); |
130 | if (!m_replyid.isEmpty()) { | 130 | if (!m_replyid.isEmpty()) { |
131 | QStringList ids; | 131 | QStringList ids; |
132 | ids.append(m_replyid); | 132 | ids.append(m_replyid); |
133 | mail->setInreply(ids); | 133 | mail->setInreply(ids); |
134 | } | 134 | } |
135 | QString txt = message->text(); | 135 | QString txt = message->text(); |
136 | if ( !sigMultiLine->text().isEmpty() ) { | 136 | if ( !sigMultiLine->text().isEmpty() ) { |
137 | txt.append( "\n--\n" ); | 137 | txt.append( "\n--\n" ); |
138 | txt.append( sigMultiLine->text() ); | 138 | txt.append( sigMultiLine->text() ); |
139 | } | 139 | } |
140 | mail->setMessage( txt ); | 140 | mail->setMessage( txt ); |
141 | 141 | ||
142 | /* only use the default drafts folder name! */ | 142 | /* only use the default drafts folder name! */ |
143 | Storemail wrapper(AbstractMail::draftFolder()); | 143 | Storemail wrapper(AbstractMail::draftFolder()); |
144 | wrapper.storeMail(mail); | 144 | wrapper.storeMail(mail); |
145 | 145 | ||
146 | AttachViewItem *it = (AttachViewItem *) attList->firstChild(); | 146 | AttachViewItem *it = (AttachViewItem *) attList->firstChild(); |
147 | /* attachments we will ignore! */ | 147 | /* attachments we will ignore! */ |
148 | if ( it != 0 ) { | 148 | if ( it != 0 ) { |
149 | if ( warnAttach ) | 149 | if ( warnAttach ) |
150 | QMessageBox::warning(0,tr("Store message"), | 150 | QMessageBox::warning(0,tr("Store message"), |
151 | tr("<center>Attachments will not be stored in \"Draft\" folder</center>")); | 151 | tr("<center>Attachments will not be stored in \"Draft\" folder</center>")); |
152 | warnAttach = false; | 152 | warnAttach = false; |
153 | } | 153 | } |
154 | setStatus( tr("Mail saved as draft!") ); | 154 | setStatus( tr("Mail saved as draft!") ); |
155 | } | 155 | } |
156 | void ComposeMail::clearStatus() | 156 | void ComposeMail::clearStatus() |
157 | { | 157 | { |
158 | topLevelWidget()->setCaption( tr("Compose mail") ); | 158 | topLevelWidget()->setCaption( tr("Compose mail") ); |
159 | } | 159 | } |
160 | void ComposeMail::setStatus( QString status ) | 160 | void ComposeMail::setStatus( QString status ) |
161 | { | 161 | { |
162 | topLevelWidget()->setCaption( status ); | 162 | topLevelWidget()->setCaption( status ); |
163 | QTimer::singleShot ( 10000, this, SLOT( clearStatus() ) ) ; | 163 | QTimer::singleShot ( 10000, this, SLOT( clearStatus() ) ) ; |
164 | } | 164 | } |
165 | void ComposeMail::pickAddress( ) | 165 | void ComposeMail::pickAddress( ) |
166 | { | 166 | { |
167 | 167 | ||
168 | QLineEdit *line = mPickLineEdit; | 168 | QLineEdit *line = mPickLineEdit; |
169 | if ( line == 0 ) | 169 | if ( line == 0 ) |
170 | return; | 170 | return; |
171 | #ifdef DESKTOP_VERSION | 171 | #ifdef DESKTOP_VERSION |
172 | //qDebug(" ComposeMail::pickAddress "); | 172 | //qDebug(" ComposeMail::pickAddress "); |
173 | QString names ;//= AddressPicker::getNames(); | 173 | QString names ;//= AddressPicker::getNames(); |
174 | 174 | ||
175 | KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this); | 175 | KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this); |
176 | uint i=0; | 176 | uint i=0; |
177 | for (i=0; i < list.count(); i++) { | 177 | for (i=0; i < list.count(); i++) { |
178 | if ( !list[i].preferredEmail().isEmpty()) { | 178 | if ( !list[i].preferredEmail().isEmpty()) { |
179 | if ( ! names.isEmpty() ) | 179 | if ( ! names.isEmpty() ) |
180 | names+= ","; | 180 | names+= ","; |
181 | names+= "\""+list[i].realName() +"\"<" +list[i].preferredEmail() +">"; | 181 | names+= "\""+list[i].realName() +"\"<" +list[i].preferredEmail() +">"; |
182 | 182 | ||
183 | } | 183 | } |
184 | } | 184 | } |
185 | 185 | ||
186 | 186 | ||
187 | if ( line->text().isEmpty() ) { | 187 | if ( line->text().isEmpty() ) { |
188 | line->setText( names ); | 188 | line->setText( names ); |
189 | } else if ( !names.isEmpty() ) { | 189 | } else if ( !names.isEmpty() ) { |
190 | line->setText( line->text() + ", " + names ); | 190 | line->setText( line->text() + ", " + names ); |
191 | } | 191 | } |
192 | #else | 192 | #else |
193 | bool res = ExternalAppHandler::instance()->requestNameEmailUidListFromKAPI("QPE/Application/ompi", this->name() /* name is here the unique uid*/); | 193 | bool res = ExternalAppHandler::instance()->requestNameEmailUidListFromKAPI("QPE/Application/ompi", this->name() /* name is here the unique uid*/); |
194 | // the result should now arrive through method insertAttendees | 194 | // the result should now arrive through method insertAttendees |
195 | #endif | 195 | #endif |
196 | } | 196 | } |
197 | //the map includes name/email pairs, that comes from Ka/Pi | 197 | //the map includes name/email pairs, that comes from Ka/Pi |
198 | void ComposeMail::insertAttendees(const QString& uid,const QStringList& nameList,const QStringList& emailList,const QStringList& uidList) | 198 | void ComposeMail::insertAttendees(const QString& uid,const QStringList& nameList,const QStringList& emailList,const QStringList& uidList) |
199 | { | 199 | { |
200 | qDebug("ComposeMail::insertAttendees "); | 200 | qDebug("ComposeMail::insertAttendees "); |
201 | raise(); | 201 | raise(); |
202 | 202 | ||
203 | if ( mPickLineEdit == 0 ) { //whoami received | 203 | if ( mPickLineEdit == 0 ) { //whoami received |
204 | 204 | qDebug("returnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn "); | |
205 | QString defmail = uidList[0]; | 205 | QString defmail = uidList[0]; |
206 | if ( emailList.count() == 0 ) | 206 | if ( emailList.count() == 0 ) |
207 | QMessageBox::information( 0, tr( "Hint" ), | 207 | QMessageBox::information( 0, tr( "Hint" ), |
208 | tr( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ), | 208 | tr( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ), |
209 | tr( "Ok" ) ); | 209 | tr( "Ok" ) ); |
210 | if (defmail.length()!=0) { | 210 | if (defmail.length()!=0) { |
211 | fromBox->insertItem(defmail); | 211 | fromBox->insertItem(defmail); |
212 | } | 212 | } |
213 | QStringList::ConstIterator sit = emailList.begin(); | 213 | QStringList::ConstIterator sit = emailList.begin(); |
214 | int pref = 0; | 214 | int pref = 0; |
215 | for (;sit!=emailList.end();++sit) { | 215 | for (;sit!=emailList.end();++sit) { |
216 | if ( (*sit)==defmail) | 216 | if ( (*sit)==defmail) |
217 | continue; | 217 | continue; |
218 | fromBox->insertItem((*sit)); | 218 | fromBox->insertItem((*sit)); |
219 | } | 219 | } |
220 | senderNameEdit->setText(nameList[0]); | 220 | senderNameEdit->setText(nameList[0]); |
221 | return; | 221 | return; |
222 | } | 222 | } |
223 | QString names ; | 223 | QString names ; |
224 | QLineEdit *line = mPickLineEdit; | 224 | QLineEdit *line = mPickLineEdit; |
225 | if (uid == this->name()) | 225 | if (uid == this->name()) |
226 | { | 226 | { |
227 | for ( int i = 0; i < nameList.count(); i++) | 227 | for ( int i = 0; i < nameList.count(); i++) |
228 | { | 228 | { |
229 | QString _name = nameList[i]; | 229 | QString _name = nameList[i]; |
230 | QString _email = emailList[i]; | 230 | QString _email = emailList[i]; |
231 | QString _uid = uidList[i]; | 231 | QString _uid = uidList[i]; |
232 | if ( ! _email.isEmpty() ) { | 232 | if ( ! _email.isEmpty() ) { |
233 | if ( ! names.isEmpty() ) | 233 | if ( ! names.isEmpty() ) |
234 | names+= ","; | 234 | names+= ","; |
235 | names+= "\""+_name +"\"<" +_email +">"; | 235 | names+= "\""+_name +"\"<" +_email +">"; |
236 | } | 236 | } |
237 | } | 237 | } |
238 | } | 238 | } |
239 | if ( line->text().isEmpty() ) { | 239 | if ( line->text().isEmpty() ) { |
240 | line->setText( names ); | 240 | line->setText( names ); |
241 | } else if ( !names.isEmpty() ) { | 241 | } else if ( !names.isEmpty() ) { |
242 | line->setText( line->text() + ", " + names ); | 242 | line->setText( line->text() + ", " + names ); |
243 | } | 243 | } |
244 | } | 244 | } |
245 | 245 | ||
246 | void ComposeMail::setTo( const QString & to ) | 246 | void ComposeMail::setTo( const QString & to ) |
247 | { | 247 | { |
248 | toLine->setText( to ); | 248 | toLine->setText( to ); |
249 | } | 249 | } |
250 | 250 | ||
251 | void ComposeMail::setSubject( const QString & subject ) | 251 | void ComposeMail::setSubject( const QString & subject ) |
252 | { | 252 | { |
253 | subjectLine->setText( subject ); | 253 | subjectLine->setText( subject ); |
254 | } | 254 | } |
255 | 255 | ||
256 | void ComposeMail::setInReplyTo( const QString & messageId ) | 256 | void ComposeMail::setInReplyTo( const QString & messageId ) |
257 | { | 257 | { |
258 | m_replyid = messageId; | 258 | m_replyid = messageId; |
259 | } | 259 | } |
260 | 260 | ||
261 | void ComposeMail::setMessage( const QString & text ) | 261 | void ComposeMail::setMessage( const QString & text ) |
262 | { | 262 | { |
263 | message->setText( text ); | 263 | message->setText( text ); |
264 | } | 264 | } |
265 | 265 | ||
266 | 266 | ||
267 | void ComposeMail::pickAddressTo() | 267 | void ComposeMail::pickAddressTo() |
268 | { | 268 | { |
269 | mPickLineEdit = toLine; | 269 | mPickLineEdit = toLine; |
270 | pickAddress( ); | 270 | pickAddress( ); |
271 | } | 271 | } |
272 | 272 | ||
273 | void ComposeMail::pickAddressCC() | 273 | void ComposeMail::pickAddressCC() |
274 | { | 274 | { |
275 | mPickLineEdit = ccLine; | 275 | mPickLineEdit = ccLine; |
276 | pickAddress( ); | 276 | pickAddress( ); |
277 | } | 277 | } |
278 | 278 | ||
279 | void ComposeMail::pickAddressBCC() | 279 | void ComposeMail::pickAddressBCC() |
280 | { | 280 | { |
281 | mPickLineEdit = bccLine; | 281 | mPickLineEdit = bccLine; |
282 | pickAddress( ); | 282 | pickAddress( ); |
283 | } | 283 | } |
284 | 284 | ||
285 | void ComposeMail::pickAddressReply() | 285 | void ComposeMail::pickAddressReply() |
286 | { | 286 | { |
287 | mPickLineEdit = replyLine; | 287 | mPickLineEdit = replyLine; |
288 | pickAddress( ); | 288 | pickAddress( ); |
289 | } | 289 | } |
290 | 290 | ||
291 | void ComposeMail::fillValues( int ) | 291 | void ComposeMail::fillValues( int ) |
292 | { | 292 | { |
293 | #if 0 | 293 | #if 0 |
294 | SMTPaccount *smtp = smtpAccounts.at( current ); | 294 | SMTPaccount *smtp = smtpAccounts.at( current ); |
295 | ccLine->clear(); | 295 | ccLine->clear(); |
296 | if ( smtp->getUseCC() ) { | 296 | if ( smtp->getUseCC() ) { |
297 | ccLine->setText( smtp->getCC() ); | 297 | ccLine->setText( smtp->getCC() ); |
298 | } | 298 | } |
299 | bccLine->clear(); | 299 | bccLine->clear(); |
300 | if ( smtp->getUseBCC() ) { | 300 | if ( smtp->getUseBCC() ) { |
301 | bccLine->setText( smtp->getBCC() ); | 301 | bccLine->setText( smtp->getBCC() ); |
302 | } | 302 | } |
303 | replyLine->clear(); | 303 | replyLine->clear(); |
304 | if ( smtp->getUseReply() ) { | 304 | if ( smtp->getUseReply() ) { |
305 | replyLine->setText( smtp->getReply() ); | 305 | replyLine->setText( smtp->getReply() ); |
306 | } | 306 | } |
307 | sigMultiLine->setText( smtp->getSignature() ); | 307 | sigMultiLine->setText( smtp->getSignature() ); |
308 | #endif | 308 | #endif |
309 | } | 309 | } |
310 | 310 | ||
311 | void ComposeMail::slotAdjustColumns() | 311 | void ComposeMail::slotAdjustColumns() |
312 | { | 312 | { |
313 | int currPage = tabWidget->currentPageIndex(); | 313 | int currPage = tabWidget->currentPageIndex(); |
314 | 314 | ||
315 | tabWidget->showPage( attachTab ); | 315 | tabWidget->showPage( attachTab ); |
316 | attList->setColumnWidth( 0, attList->visibleWidth() - 80 ); | 316 | attList->setColumnWidth( 0, attList->visibleWidth() - 80 ); |
317 | attList->setColumnWidth( 1, 80 ); | 317 | attList->setColumnWidth( 1, 80 ); |
318 | 318 | ||
319 | tabWidget->setCurrentPage( currPage ); | 319 | tabWidget->setCurrentPage( currPage ); |
320 | } | 320 | } |
321 | 321 | ||
322 | void ComposeMail::addAttachment() | 322 | void ComposeMail::addAttachment() |
323 | { | 323 | { |
324 | QString lnk = KFileDialog::getOpenFileName( "", "Add Attachment", this ); | 324 | QString lnk = KFileDialog::getOpenFileName( "", "Add Attachment", this ); |
325 | if ( !lnk.isEmpty() ) { | 325 | if ( !lnk.isEmpty() ) { |
326 | Attachment *att = new Attachment( lnk ); | 326 | Attachment *att = new Attachment( lnk ); |
327 | (void) new AttachViewItem( attList, att ); | 327 | (void) new AttachViewItem( attList, att ); |
328 | } | 328 | } |
329 | } | 329 | } |
330 | 330 | ||
331 | void ComposeMail::removeAttachment() | 331 | void ComposeMail::removeAttachment() |
332 | { | 332 | { |
333 | if ( !attList->currentItem() ) { | 333 | if ( !attList->currentItem() ) { |
334 | QMessageBox::information( this, tr( "Error" ), | 334 | QMessageBox::information( this, tr( "Error" ), |
335 | tr( "<p>Please select a File.</p>" ), | 335 | tr( "<p>Please select a File.</p>" ), |
336 | tr( "Ok" ) ); | 336 | tr( "Ok" ) ); |
337 | } else { | 337 | } else { |
338 | attList->takeItem( attList->currentItem() ); | 338 | attList->takeItem( attList->currentItem() ); |
339 | } | 339 | } |
340 | } | 340 | } |
341 | 341 | ||
342 | void ComposeMail::accept() | 342 | void ComposeMail::accept() |
343 | { | 343 | { |
344 | if ( smtpAccountBox->count() == 0 ) { | 344 | if ( smtpAccountBox->count() == 0 ) { |
345 | 345 | ||
346 | reject(); | 346 | reject(); |
347 | return; | 347 | return; |
348 | } | 348 | } |
349 | 349 | ||
350 | if (! checkBoxLater->isChecked() ) { | 350 | if (! checkBoxLater->isChecked() ) { |
351 | int yesno = QMessageBox::warning(0,tr("Stop editing message"), | 351 | int yesno = QMessageBox::warning(0,tr("Stop editing message"), |
352 | tr("Send this message?"), | 352 | tr("Send this message?"), |
353 | tr("Yes"), | 353 | tr("Yes"), |
354 | tr("Cancel")); | 354 | tr("Cancel")); |
355 | 355 | ||
356 | if (yesno == 1) { | 356 | if (yesno == 1) { |
357 | return; | 357 | return; |
358 | } | 358 | } |
359 | } | 359 | } |
360 | #if 0 | 360 | #if 0 |
361 | odebug << "Sending Mail with " | 361 | odebug << "Sending Mail with " |
362 | << smtpAccounts.at( smtpAccountBox->currentItem() )->getAccountName() << oendl; | 362 | << smtpAccounts.at( smtpAccountBox->currentItem() )->getAccountName() << oendl; |
363 | #endif | 363 | #endif |
364 | Opie::Core::OSmartPointer<Mail> mail=new Mail; | 364 | Opie::Core::OSmartPointer<Mail> mail=new Mail; |
365 | 365 | ||
366 | SMTPaccount *smtp = smtpAccounts.at( smtpAccountBox->currentItem() ); | 366 | SMTPaccount *smtp = smtpAccounts.at( smtpAccountBox->currentItem() ); |
367 | mail->setMail(fromBox->currentText()); | 367 | mail->setMail(fromBox->currentText()); |
368 | 368 | ||
369 | if ( !toLine->text().isEmpty() ) { | 369 | if ( !toLine->text().isEmpty() ) { |
370 | mail->setTo( toLine->text() ); | 370 | mail->setTo( toLine->text() ); |
371 | } else { | 371 | } else { |
372 | QMessageBox::warning(0,tr("Sending mail"), | 372 | QMessageBox::warning(0,tr("Sending mail"), |
373 | tr("No Receiver spezified" ) ); | 373 | tr("No Receiver spezified" ) ); |
374 | return; | 374 | return; |
375 | } | 375 | } |
376 | 376 | ||
377 | mail->setName(senderNameEdit->text()); | 377 | mail->setName(senderNameEdit->text()); |
378 | mail->setCC( ccLine->text() ); | 378 | mail->setCC( ccLine->text() ); |
379 | mail->setBCC( bccLine->text() ); | 379 | mail->setBCC( bccLine->text() ); |
380 | mail->setReply( replyLine->text() ); | 380 | mail->setReply( replyLine->text() ); |
381 | mail->setSubject( subjectLine->text() ); | 381 | mail->setSubject( subjectLine->text() ); |
382 | if (!m_replyid.isEmpty()) { | 382 | if (!m_replyid.isEmpty()) { |
383 | QStringList ids; | 383 | QStringList ids; |
384 | ids.append(m_replyid); | 384 | ids.append(m_replyid); |
385 | mail->setInreply(ids); | 385 | mail->setInreply(ids); |
386 | } | 386 | } |
387 | QString txt = message->text(); | 387 | QString txt = message->text(); |
388 | if ( !sigMultiLine->text().isEmpty() ) { | 388 | if ( !sigMultiLine->text().isEmpty() ) { |
389 | txt.append( "\n--\n" ); | 389 | txt.append( "\n--\n" ); |
390 | txt.append( sigMultiLine->text() ); | 390 | txt.append( sigMultiLine->text() ); |
391 | } | 391 | } |
392 | mail->setMessage( txt ); | 392 | mail->setMessage( txt ); |
393 | AttachViewItem *it = (AttachViewItem *) attList->firstChild(); | 393 | AttachViewItem *it = (AttachViewItem *) attList->firstChild(); |
394 | while ( it != 0 ) { | 394 | while ( it != 0 ) { |
395 | mail->addAttachment( it->getAttachment() ); | 395 | mail->addAttachment( it->getAttachment() ); |
396 | it = (AttachViewItem *) it->nextSibling(); | 396 | it = (AttachViewItem *) it->nextSibling(); |
diff --git a/kmicromail/main.cpp b/kmicromail/main.cpp index a3e1b86..65de770 100644 --- a/kmicromail/main.cpp +++ b/kmicromail/main.cpp | |||
@@ -1,61 +1,61 @@ | |||
1 | // CHANGED 2004-08-06 Lutz Rogowski | 1 | // CHANGED 2004-08-06 Lutz Rogowski |
2 | 2 | ||
3 | 3 | ||
4 | #ifndef DESKTOP_VERSION | 4 | #ifndef DESKTOP_VERSION |
5 | #include <qpe/qpeapplication.h> | 5 | #include <qpe/qpeapplication.h> |
6 | #include <libkdepim/externalapphandler.h> | 6 | #include <libkdepim/externalapphandler.h> |
7 | #include <stdlib.h> | 7 | #include <stdlib.h> |
8 | #else | 8 | #else |
9 | #include <qapplication.h> | 9 | #include <qapplication.h> |
10 | #include <qstring.h> | 10 | #include <qstring.h> |
11 | #include <qwindowsstyle.h> | 11 | #include <qwindowsstyle.h> |
12 | #include <qplatinumstyle.h> | 12 | #include <qplatinumstyle.h> |
13 | #include <qsgistyle.h> | 13 | #include <qsgistyle.h> |
14 | #endif | 14 | #endif |
15 | #include "opiemail.h" | 15 | #include "opiemail.h" |
16 | #include <qdir.h> | 16 | #include <qdir.h> |
17 | #include <kstandarddirs.h> | 17 | #include <kstandarddirs.h> |
18 | #include <kglobal.h> | 18 | #include <kglobal.h> |
19 | #include <stdio.h> | 19 | #include <stdio.h> |
20 | #include "mainwindow.h" | 20 | #include "mainwindow.h" |
21 | 21 | ||
22 | using namespace Opie::Core; | 22 | using namespace Opie::Core; |
23 | int main( int argc, char **argv ) { | 23 | int main( int argc, char **argv ) { |
24 | 24 | ||
25 | #ifndef DESKTOP_VERSION | 25 | #ifndef DESKTOP_VERSION |
26 | QPEApplication a( argc, argv ); | 26 | QPEApplication a( argc, argv ); |
27 | a.setKeepRunning (); | 27 | a.setKeepRunning (); |
28 | #else | 28 | #else |
29 | QApplication a( argc, argv ); | 29 | QApplication a( argc, argv ); |
30 | QApplication::setStyle( new QPlatinumStyle ()); | 30 | QApplication::setStyle( new QPlatinumStyle ()); |
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | KGlobal::setAppName( "kmicromail" ); | 33 | KGlobal::setAppName( "kmicromail" ); |
34 | QString fileName ; | 34 | QString fileName ; |
35 | #ifndef DESKTOP_VERSION | 35 | #ifndef DESKTOP_VERSION |
36 | fileName = getenv("QPEDIR"); | 36 | fileName = getenv("QPEDIR"); |
37 | if ( QApplication::desktop()->width() > 320 ) | 37 | if ( QApplication::desktop()->width() > 320 ) |
38 | KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kmicromail/icons22/"); | 38 | KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kmicromail/icons22/"); |
39 | else | 39 | else |
40 | KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kmicromail/"); | 40 | KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kmicromail/"); |
41 | #else | 41 | #else |
42 | fileName = qApp->applicationDirPath () + "/kdepim/kmicromail/"; | 42 | fileName = qApp->applicationDirPath () + "/kdepim/kmicromail/"; |
43 | KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); | 43 | KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); |
44 | #endif | 44 | #endif |
45 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kmicromail"))); | 45 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kmicromail"))); |
46 | OpieMail mw; | 46 | OpieMail mw; |
47 | #ifndef DESKTOP_VERSION | 47 | #ifndef DESKTOP_VERSION |
48 | //qDebug("CONNECT "); | 48 | //qDebug("CONNECT "); |
49 | QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&mw, SLOT(message( const QCString&, const QByteArray& ))); | 49 | QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&mw, SLOT(message( const QCString&, const QByteArray& ))); |
50 | QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); | 50 | // QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); |
51 | a.showMainWidget(&mw ); | 51 | a.showMainWidget(&mw ); |
52 | #else | 52 | #else |
53 | a.setMainWidget(&mw ); | 53 | a.setMainWidget(&mw ); |
54 | mw.show(); | 54 | mw.show(); |
55 | //m.resize( 800, 600 ); | 55 | //m.resize( 800, 600 ); |
56 | QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); | 56 | QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); |
57 | #endif | 57 | #endif |
58 | int rv = a.exec(); | 58 | int rv = a.exec(); |
59 | return rv; | 59 | return rv; |
60 | 60 | ||
61 | } | 61 | } |
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp index 3e560c5..a1c5645 100644 --- a/kmicromail/opiemail.cpp +++ b/kmicromail/opiemail.cpp | |||
@@ -1,274 +1,277 @@ | |||
1 | // CHANGED 2004-09-31 Lutz Rogowski | 1 | // CHANGED 2004-09-31 Lutz Rogowski |
2 | // CHANGED 2004-08-06 Lutz Rogowski | 2 | // CHANGED 2004-08-06 Lutz Rogowski |
3 | 3 | ||
4 | #include "settingsdialog.h" | 4 | #include "settingsdialog.h" |
5 | #include "opiemail.h" | 5 | #include "opiemail.h" |
6 | #include "editaccounts.h" | 6 | #include "editaccounts.h" |
7 | #include "composemail.h" | 7 | #include "composemail.h" |
8 | #include "mailistviewitem.h" | 8 | #include "mailistviewitem.h" |
9 | #include "viewmail.h" | 9 | #include "viewmail.h" |
10 | #include "selectstore.h" | 10 | #include "selectstore.h" |
11 | #include "selectsmtp.h" | 11 | #include "selectsmtp.h" |
12 | 12 | ||
13 | #include <qmessagebox.h> | 13 | #include <qmessagebox.h> |
14 | #include <libkdepim/externalapphandler.h> | ||
14 | 15 | ||
15 | #include <qpe/qpeapplication.h> | 16 | #include <qpe/qpeapplication.h> |
16 | #include <libmailwrapper/smtpwrapper.h> | 17 | #include <libmailwrapper/smtpwrapper.h> |
17 | #include <libmailwrapper/mailtypes.h> | 18 | #include <libmailwrapper/mailtypes.h> |
18 | #include <libmailwrapper/abstractmail.h> | 19 | #include <libmailwrapper/abstractmail.h> |
19 | /* OPIE */ | 20 | /* OPIE */ |
20 | //#include <qpe/resource.h> | 21 | //#include <qpe/resource.h> |
21 | //#include <qpe/qpeapplication.h> | 22 | //#include <qpe/qpeapplication.h> |
22 | 23 | ||
23 | /* QT */ | 24 | /* QT */ |
24 | 25 | ||
25 | using namespace Opie::Core; | 26 | using namespace Opie::Core; |
26 | 27 | ||
27 | OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags ) | 28 | OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags ) |
28 | : MainWindow( parent, name) //, WStyle_ContextHelp ) | 29 | : MainWindow( parent, name) //, WStyle_ContextHelp ) |
29 | { | 30 | { |
30 | settings = new Settings(); | 31 | settings = new Settings(); |
31 | 32 | ||
32 | folderView->populate( settings->getAccounts() ); | 33 | folderView->populate( settings->getAccounts() ); |
33 | 34 | ||
34 | } | 35 | } |
35 | 36 | ||
36 | OpieMail::~OpieMail() | 37 | OpieMail::~OpieMail() |
37 | { | 38 | { |
38 | if (settings) delete settings; | 39 | if (settings) delete settings; |
39 | } | 40 | } |
40 | 41 | ||
41 | void OpieMail::appMessage(const QCString &msg, const QByteArray &data) | 42 | void OpieMail::appMessage(const QCString &msg, const QByteArray &data) |
42 | { | 43 | { |
43 | 44 | ||
44 | } | 45 | } |
45 | #include <stdlib.h> | 46 | #include <stdlib.h> |
46 | void OpieMail::message(const QCString &msg, const QByteArray &data) | 47 | void OpieMail::message(const QCString &msg, const QByteArray &data) |
47 | { | 48 | { |
48 | // copied from old mail2 | 49 | // copied from old mail2 |
49 | static int ii = 0; | 50 | static int ii = 0; |
50 | 51 | qDebug("call ############################# %d ", ii); | |
51 | // block second call | 52 | // block second call |
52 | if ( ii < 2 ) { | 53 | if ( ii < 2 ) { |
53 | ++ii; | 54 | //++ii; |
54 | if ( ii > 1 ) { | 55 | if ( ii > 1 ) { |
55 | qDebug("qcop call blocked "); | 56 | qDebug("qcop call blocked "); |
56 | return; | 57 | //return; |
57 | } | 58 | } |
58 | } | 59 | } |
60 | ++ii; | ||
59 | //qDebug("KM:appMessage %d *%s* %x", ii, msg.data(), this); | 61 | //qDebug("KM:appMessage %d *%s* %x", ii, msg.data(), this); |
60 | if (msg == "writeMail(QString,QString)") | 62 | if (msg == "writeMail(QString,QString)") |
61 | { | 63 | { |
62 | QDataStream stream(data,IO_ReadOnly); | 64 | QDataStream stream(data,IO_ReadOnly); |
63 | QString name, email; | 65 | QString name, email; |
64 | stream >> name >> email; | 66 | stream >> name >> email; |
65 | // removing the whitespaces at beginning and end is needed! | 67 | // removing the whitespaces at beginning and end is needed! |
66 | slotwriteMail(name.stripWhiteSpace(),email.stripWhiteSpace()); | 68 | slotwriteMail(name.stripWhiteSpace(),email.stripWhiteSpace()); |
67 | } | 69 | } |
68 | else if (msg == "newMail()") | 70 | else if (msg == "newMail()") |
69 | { | 71 | { |
70 | slotComposeMail(); | 72 | slotComposeMail(); |
71 | } | 73 | } |
72 | else if (msg == "newMail(QString)") | 74 | else if (msg == "newMail(QString)") |
73 | { | 75 | { |
74 | QDataStream stream(data,IO_ReadOnly); | 76 | QDataStream stream(data,IO_ReadOnly); |
75 | QString nameemail; | 77 | QString nameemail; |
76 | stream >> nameemail; | 78 | stream >> nameemail; |
77 | // the format is | 79 | // the format is |
78 | // NAME <EMAIL>:SUBJECT | 80 | // NAME <EMAIL>:SUBJECT |
79 | //qDebug("message %s ", nameemail.latin1()); | 81 | //qDebug("message %s ", nameemail.latin1()); |
80 | 82 | ||
81 | slotwriteMail2( nameemail ); | 83 | slotwriteMail2( nameemail ); |
82 | } | 84 | } else |
85 | ExternalAppHandler::instance()->appMessage ( msg, data); | ||
83 | } | 86 | } |
84 | void OpieMail::slotwriteMail2(const QString& namemail ) | 87 | void OpieMail::slotwriteMail2(const QString& namemail ) |
85 | { | 88 | { |
86 | // qDebug("OpieMail::slotwriteMail2 "); | 89 | // qDebug("OpieMail::slotwriteMail2 "); |
87 | qApp->processEvents(); | 90 | qApp->processEvents(); |
88 | ComposeMail compose( settings, this, 0, true ); | 91 | ComposeMail compose( settings, this, 0, true ); |
89 | if ( !namemail.isEmpty() ) { | 92 | if ( !namemail.isEmpty() ) { |
90 | QString to = namemail; | 93 | QString to = namemail; |
91 | if ( namemail.find( " <") > 1 ) { | 94 | if ( namemail.find( " <") > 1 ) { |
92 | to = "\"" +to.replace( QRegExp( " <"), "\" <") ; | 95 | to = "\"" +to.replace( QRegExp( " <"), "\" <") ; |
93 | } else | 96 | } else |
94 | if ( namemail.find( "<") > 1 ) { | 97 | if ( namemail.find( "<") > 1 ) { |
95 | to = "\"" +to.replace( QRegExp( "<"), "\" <") ; | 98 | to = "\"" +to.replace( QRegExp( "<"), "\" <") ; |
96 | } | 99 | } |
97 | int sub = to.find( ">:"); | 100 | int sub = to.find( ">:"); |
98 | if ( sub > 0 ) { | 101 | if ( sub > 0 ) { |
99 | compose.setTo( to.left(sub+1) ); | 102 | compose.setTo( to.left(sub+1) ); |
100 | compose.setSubject( to.mid(sub+2) ); | 103 | compose.setSubject( to.mid(sub+2) ); |
101 | } else | 104 | } else |
102 | compose.setTo( to ); | 105 | compose.setTo( to ); |
103 | } | 106 | } |
104 | compose.slotAdjustColumns(); | 107 | compose.slotAdjustColumns(); |
105 | compose.showMaximized(); | 108 | compose.showMaximized(); |
106 | compose.exec(); | 109 | compose.exec(); |
107 | raise(); | 110 | raise(); |
108 | //qDebug("retttich "); | 111 | //qDebug("retttich "); |
109 | } | 112 | } |
110 | void OpieMail::slotwriteMail(const QString&name,const QString&email) | 113 | void OpieMail::slotwriteMail(const QString&name,const QString&email) |
111 | { | 114 | { |
112 | // qDebug("OpieMail::slotwriteMail "); | 115 | // qDebug("OpieMail::slotwriteMail "); |
113 | ComposeMail compose( settings, this, 0, true , WStyle_ContextHelp ); | 116 | ComposeMail compose( settings, this, 0, true , WStyle_ContextHelp ); |
114 | if (!email.isEmpty()) | 117 | if (!email.isEmpty()) |
115 | { | 118 | { |
116 | if (!name.isEmpty()) | 119 | if (!name.isEmpty()) |
117 | { | 120 | { |
118 | compose.setTo("\"" + name + "\"" + " " + "<"+ email + ">"); | 121 | compose.setTo("\"" + name + "\"" + " " + "<"+ email + ">"); |
119 | } | 122 | } |
120 | else | 123 | else |
121 | { | 124 | { |
122 | compose.setTo(email); | 125 | compose.setTo(email); |
123 | } | 126 | } |
124 | } | 127 | } |
125 | compose.slotAdjustColumns(); | 128 | compose.slotAdjustColumns(); |
126 | compose.showMaximized(); | 129 | compose.showMaximized(); |
127 | compose.exec(); | 130 | compose.exec(); |
128 | } | 131 | } |
129 | 132 | ||
130 | void OpieMail::slotComposeMail() | 133 | void OpieMail::slotComposeMail() |
131 | { | 134 | { |
132 | slotwriteMail2( QString () ); | 135 | slotwriteMail2( QString () ); |
133 | //slotwriteMail(0l,0l); | 136 | //slotwriteMail(0l,0l); |
134 | } | 137 | } |
135 | 138 | ||
136 | void OpieMail::slotSendQueued() | 139 | void OpieMail::slotSendQueued() |
137 | { | 140 | { |
138 | SMTPaccount *smtp = 0; | 141 | SMTPaccount *smtp = 0; |
139 | 142 | ||
140 | QList<Account> list = settings->getAccounts(); | 143 | QList<Account> list = settings->getAccounts(); |
141 | QList<SMTPaccount> smtpList; | 144 | QList<SMTPaccount> smtpList; |
142 | smtpList.setAutoDelete(false); | 145 | smtpList.setAutoDelete(false); |
143 | Account *it; | 146 | Account *it; |
144 | for ( it = list.first(); it; it = list.next() ) | 147 | for ( it = list.first(); it; it = list.next() ) |
145 | { | 148 | { |
146 | if ( it->getType() == MAILLIB::A_SMTP ) | 149 | if ( it->getType() == MAILLIB::A_SMTP ) |
147 | { | 150 | { |
148 | smtp = static_cast<SMTPaccount *>(it); | 151 | smtp = static_cast<SMTPaccount *>(it); |
149 | smtpList.append(smtp); | 152 | smtpList.append(smtp); |
150 | } | 153 | } |
151 | } | 154 | } |
152 | if (smtpList.count()==0) | 155 | if (smtpList.count()==0) |
153 | { | 156 | { |
154 | QMessageBox::information(0,tr("Info"),tr("Define a smtp account first!\n")); | 157 | QMessageBox::information(0,tr("Info"),tr("Define a smtp account first!\n")); |
155 | return; | 158 | return; |
156 | } | 159 | } |
157 | if (smtpList.count()==1) | 160 | if (smtpList.count()==1) |
158 | { | 161 | { |
159 | smtp = smtpList.at(0); | 162 | smtp = smtpList.at(0); |
160 | } | 163 | } |
161 | else | 164 | else |
162 | { | 165 | { |
163 | smtp = 0; | 166 | smtp = 0; |
164 | selectsmtp selsmtp; | 167 | selectsmtp selsmtp; |
165 | selsmtp.setSelectionlist(&smtpList); | 168 | selsmtp.setSelectionlist(&smtpList); |
166 | selsmtp.showMaximized(); | 169 | selsmtp.showMaximized(); |
167 | if ( selsmtp.exec() == QDialog::Accepted ) | 170 | if ( selsmtp.exec() == QDialog::Accepted ) |
168 | { | 171 | { |
169 | smtp = selsmtp.selected_smtp(); | 172 | smtp = selsmtp.selected_smtp(); |
170 | } | 173 | } |
171 | } | 174 | } |
172 | if (smtp) | 175 | if (smtp) |
173 | { | 176 | { |
174 | SMTPwrapper * wrap = new SMTPwrapper(smtp); | 177 | SMTPwrapper * wrap = new SMTPwrapper(smtp); |
175 | if ( wrap->flushOutbox() ) | 178 | if ( wrap->flushOutbox() ) |
176 | { | 179 | { |
177 | QMessageBox::information(0,tr("Info"),tr("Mail queue flushed")); | 180 | QMessageBox::information(0,tr("Info"),tr("Mail queue flushed")); |
178 | } | 181 | } |
179 | delete wrap; | 182 | delete wrap; |
180 | } | 183 | } |
181 | } | 184 | } |
182 | 185 | ||
183 | void OpieMail::slotSearchMails() | 186 | void OpieMail::slotSearchMails() |
184 | { | 187 | { |
185 | qDebug("OpieMail::slotSearchMails():not implemented "); | 188 | qDebug("OpieMail::slotSearchMails():not implemented "); |
186 | } | 189 | } |
187 | 190 | ||
188 | void OpieMail::slotEditSettings() | 191 | void OpieMail::slotEditSettings() |
189 | { | 192 | { |
190 | SettingsDialog settingsDialog( this, 0, true, WStyle_ContextHelp ); | 193 | SettingsDialog settingsDialog( this, 0, true, WStyle_ContextHelp ); |
191 | settingsDialog.showMaximized(); | 194 | settingsDialog.showMaximized(); |
192 | settingsDialog.exec(); | 195 | settingsDialog.exec(); |
193 | } | 196 | } |
194 | 197 | ||
195 | void OpieMail::slotEditAccounts() | 198 | void OpieMail::slotEditAccounts() |
196 | { | 199 | { |
197 | EditAccounts eaDialog( settings, this, 0, true, WStyle_ContextHelp ); | 200 | EditAccounts eaDialog( settings, this, 0, true, WStyle_ContextHelp ); |
198 | eaDialog.slotAdjustColumns(); | 201 | eaDialog.slotAdjustColumns(); |
199 | eaDialog.showMaximized(); | 202 | eaDialog.showMaximized(); |
200 | eaDialog.exec(); | 203 | eaDialog.exec(); |
201 | if ( settings ) delete settings; | 204 | if ( settings ) delete settings; |
202 | settings = new Settings(); | 205 | settings = new Settings(); |
203 | 206 | ||
204 | folderView->populate( settings->getAccounts() ); | 207 | folderView->populate( settings->getAccounts() ); |
205 | } | 208 | } |
206 | 209 | ||
207 | void OpieMail::displayMail() | 210 | void OpieMail::displayMail() |
208 | { | 211 | { |
209 | QListViewItem*item = mailView->currentItem(); | 212 | QListViewItem*item = mailView->currentItem(); |
210 | if (!item) return; | 213 | if (!item) return; |
211 | RecMailP mail = ((MailListViewItem*)item)->data(); | 214 | RecMailP mail = ((MailListViewItem*)item)->data(); |
212 | RecBodyP body = folderView->fetchBody(mail); | 215 | RecBodyP body = folderView->fetchBody(mail); |
213 | ViewMail readMail( this,"", Qt::WType_Modal | WStyle_ContextHelp ); | 216 | ViewMail readMail( this,"", Qt::WType_Modal | WStyle_ContextHelp ); |
214 | readMail.setBody( body ); | 217 | readMail.setBody( body ); |
215 | readMail.setMail( mail ); | 218 | readMail.setMail( mail ); |
216 | readMail.showMaximized(); | 219 | readMail.showMaximized(); |
217 | readMail.exec(); | 220 | readMail.exec(); |
218 | 221 | ||
219 | if ( readMail.deleted ) | 222 | if ( readMail.deleted ) |
220 | { | 223 | { |
221 | folderView->refreshCurrent(); | 224 | folderView->refreshCurrent(); |
222 | } | 225 | } |
223 | else | 226 | else |
224 | { | 227 | { |
225 | ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() ); | 228 | ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() ); |
226 | } | 229 | } |
227 | } | 230 | } |
228 | 231 | ||
229 | void OpieMail::slotDeleteMail() | 232 | void OpieMail::slotDeleteMail() |
230 | { | 233 | { |
231 | if (!mailView->currentItem()) return; | 234 | if (!mailView->currentItem()) return; |
232 | RecMailP mail = ((MailListViewItem*)mailView->currentItem() )->data(); | 235 | RecMailP mail = ((MailListViewItem*)mailView->currentItem() )->data(); |
233 | if ( QMessageBox::warning(this, tr("Delete Mail"), QString( tr("<p>Do you really want to delete this mail? <br><br>" ) + mail->getFrom() + " - " + mail->getSubject() ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) | 236 | if ( QMessageBox::warning(this, tr("Delete Mail"), QString( tr("<p>Do you really want to delete this mail? <br><br>" ) + mail->getFrom() + " - " + mail->getSubject() ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) |
234 | { | 237 | { |
235 | mail->Wrapper()->deleteMail( mail ); | 238 | mail->Wrapper()->deleteMail( mail ); |
236 | folderView->refreshCurrent(); | 239 | folderView->refreshCurrent(); |
237 | } | 240 | } |
238 | } | 241 | } |
239 | void OpieMail::slotDeleteAllMail() | 242 | void OpieMail::slotDeleteAllMail() |
240 | { | 243 | { |
241 | 244 | ||
242 | QValueList<RecMailP> t; | 245 | QValueList<RecMailP> t; |
243 | if ( QMessageBox::warning(this, tr("Delete All Mails"), tr("Do you really want to delete\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) | 246 | if ( QMessageBox::warning(this, tr("Delete All Mails"), tr("Do you really want to delete\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) |
244 | { | 247 | { |
245 | MailListViewItem* item = (MailListViewItem*)mailView->firstChild (); | 248 | MailListViewItem* item = (MailListViewItem*)mailView->firstChild (); |
246 | while ( item ) { | 249 | while ( item ) { |
247 | if ( item->isSelected() ) { | 250 | if ( item->isSelected() ) { |
248 | t.append( item->data() ); | 251 | t.append( item->data() ); |
249 | } | 252 | } |
250 | item = (MailListViewItem*)item->nextSibling(); | 253 | item = (MailListViewItem*)item->nextSibling(); |
251 | } | 254 | } |
252 | } | 255 | } |
253 | else | 256 | else |
254 | return; | 257 | return; |
255 | if ( t.count() == 0 ) | 258 | if ( t.count() == 0 ) |
256 | return; | 259 | return; |
257 | RecMailP mail = t.first(); | 260 | RecMailP mail = t.first(); |
258 | mail->Wrapper()->deleteMailList(t); | 261 | mail->Wrapper()->deleteMailList(t); |
259 | folderView->refreshCurrent(); | 262 | folderView->refreshCurrent(); |
260 | 263 | ||
261 | 264 | ||
262 | } | 265 | } |
263 | void OpieMail::clearSelection() | 266 | void OpieMail::clearSelection() |
264 | { | 267 | { |
265 | mailView->clearSelection(); | 268 | mailView->clearSelection(); |
266 | 269 | ||
267 | } | 270 | } |
268 | 271 | ||
269 | void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) | 272 | void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) |
270 | { | 273 | { |
271 | if (!mailView->currentItem()) return; | 274 | if (!mailView->currentItem()) return; |
272 | MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType(); | 275 | MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType(); |
273 | /* just the RIGHT button - or hold on pda */ | 276 | /* just the RIGHT button - or hold on pda */ |
274 | if (button!=2) {return;} | 277 | if (button!=2) {return;} |