author | zautrix <zautrix> | 2004-09-16 15:13:40 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-16 15:13:40 (UTC) |
commit | 02e7ae4983679a787834277176a031286a8310c2 (patch) (unidiff) | |
tree | ea7e33e59b86b8fed2b033609d1018a9f245baff | |
parent | 68b1f3bce4b6e89bb343b965256537d93e63f7be (diff) | |
download | kdepimpi-02e7ae4983679a787834277176a031286a8310c2.zip kdepimpi-02e7ae4983679a787834277176a031286a8310c2.tar.gz kdepimpi-02e7ae4983679a787834277176a031286a8310c2.tar.bz2 |
Foldername fixes
-rw-r--r-- | Makefile | 31 | ||||
-rw-r--r-- | kmicromail/accountitem.cpp | 2 | ||||
-rw-r--r-- | kmicromail/libmailwrapper/mailwrapper.cpp | 7 | ||||
-rw-r--r-- | kmicromail/libmailwrapper/mailwrapper.h | 2 |
4 files changed, 34 insertions, 8 deletions
@@ -1,303 +1,328 @@ | |||
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_PWMANAGER = \ | ||
49 | pwmanager/pwmanager | ||
50 | |||
48 | SUBDIRS = \ | 51 | SUBDIRS = \ |
49 | $(SUBDIRS_MICROKDE) \ | 52 | $(SUBDIRS_MICROKDE) \ |
50 | $(SUBDIRS_QTOPIA_PLUGIN) \ | 53 | $(SUBDIRS_QTOPIA_PLUGIN) \ |
51 | $(SUBDIRS_OPIE_PLUGIN) \ | 54 | $(SUBDIRS_OPIE_PLUGIN) \ |
52 | $(SUBDIRS_SHARP_PLUGIN) \ | 55 | $(SUBDIRS_SHARP_PLUGIN) \ |
53 | $(SUBDIRS_LDAP_PLUGIN) \ | 56 | $(SUBDIRS_LDAP_PLUGIN) \ |
54 | $(SUBDIRS_MICROMAIL) \ | 57 | $(SUBDIRS_MICROMAIL) \ |
55 | $(SUBDIRS_GAMMU) | 58 | $(SUBDIRS_GAMMU) \ |
59 | $(SUBDIRS_PWMANAGER) | ||
56 | 60 | ||
57 | all: build_microkde \ | 61 | all: build_microkde \ |
58 | build_qtopia_plugin \ | 62 | build_qtopia_plugin \ |
59 | build_opie_plugin \ | 63 | build_opie_plugin \ |
60 | build_sharp_plugin \ | 64 | build_sharp_plugin \ |
61 | build_ldap_plugin \ | 65 | build_ldap_plugin \ |
62 | build_micromail \ | 66 | build_micromail \ |
63 | build_gammu | 67 | build_gammu \ |
68 | build_pwmanager | ||
64 | 69 | ||
65 | 70 | ||
66 | build_microkde: variable_test tmake | 71 | build_microkde: variable_test tmake |
67 | for i in $(SUBDIRS_MICROKDE); do pushd $$i; \ | 72 | for i in $(SUBDIRS_MICROKDE); do pushd $$i; \ |
68 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 73 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
69 | done | 74 | done |
70 | 75 | ||
71 | build_qtopia_plugin: build_microkde | 76 | build_qtopia_plugin: build_microkde |
72 | for i in $(SUBDIRS_QTOPIA_PLUGIN); do pushd $$i; \ | 77 | for i in $(SUBDIRS_QTOPIA_PLUGIN); do pushd $$i; \ |
73 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 78 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
74 | done | 79 | done |
75 | 80 | ||
76 | build_opie_plugin: build_microkde | 81 | build_opie_plugin: build_microkde |
77 | ifdef BUILD_NO_OPIE_PLUGIN | 82 | ifdef BUILD_NO_OPIE_PLUGIN |
78 | @echo == opie plugin not build. | 83 | @echo == opie plugin not build. |
79 | else | 84 | else |
80 | for i in $(SUBDIRS_OPIE_PLUGIN); do pushd $$i; \ | 85 | for i in $(SUBDIRS_OPIE_PLUGIN); do pushd $$i; \ |
81 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 86 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
82 | done | 87 | done |
83 | endif | 88 | endif |
84 | 89 | ||
85 | build_sharp_plugin: build_microkde | 90 | build_sharp_plugin: build_microkde |
86 | ifdef BUILD_NO_SHARP_PLUGIN | 91 | ifdef BUILD_NO_SHARP_PLUGIN |
87 | @echo == ldap plugin not build. | 92 | @echo == ldap plugin not build. |
88 | else | 93 | else |
89 | for i in $(SUBDIRS_SHARP_PLUGIN); do pushd $$i; \ | 94 | for i in $(SUBDIRS_SHARP_PLUGIN); do pushd $$i; \ |
90 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 95 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
91 | done | 96 | done |
92 | endif | 97 | endif |
93 | 98 | ||
94 | build_ldap_plugin: build_microkde | 99 | build_ldap_plugin: build_microkde |
95 | ifdef BUILD_NO_LDAP_PLUGIN | 100 | ifdef BUILD_NO_LDAP_PLUGIN |
96 | @echo == ldap plugin not build. | 101 | @echo == ldap plugin not build. |
97 | else | 102 | else |
98 | for i in $(SUBDIRS_LDAP_PLUGIN); do pushd $$i; \ | 103 | for i in $(SUBDIRS_LDAP_PLUGIN); do pushd $$i; \ |
99 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 104 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
100 | done | 105 | done |
101 | endif | 106 | endif |
102 | 107 | ||
103 | 108 | ||
104 | build_micromail: build_microkde | 109 | build_micromail: build_microkde |
105 | ifdef BUILD_NO_MICROMAIL | 110 | ifdef BUILD_NO_MICROMAIL |
106 | @echo == kmicromail not build. | 111 | @echo == kmicromail not build. |
107 | else | 112 | else |
108 | for i in $(SUBDIRS_MICROMAIL); do pushd $$i; \ | 113 | for i in $(SUBDIRS_MICROMAIL); do pushd $$i; \ |
109 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 114 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
110 | done | 115 | done |
111 | endif | 116 | endif |
112 | 117 | ||
113 | build_gammu: variable_test tmake | 118 | build_gammu: variable_test tmake |
114 | ifdef BUILD_NO_GAMMU | 119 | ifdef BUILD_NO_GAMMU |
115 | @echo == gammu not build. | 120 | @echo == gammu not build. |
116 | else | 121 | else |
117 | for i in $(SUBDIRS_GAMMU); do pushd $$i; \ | 122 | for i in $(SUBDIRS_GAMMU); do pushd $$i; \ |
118 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 123 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
119 | done | 124 | done |
120 | endif | 125 | endif |
121 | 126 | ||
127 | build_pwmanager: build_microkde | ||
128 | ifdef BUILD_NO_PWMANAGER | ||
129 | @echo == pwmanager not build. | ||
130 | else | ||
131 | for i in $(SUBDIRS_PWMANAGER); do pushd $$i; \ | ||
132 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | ||
133 | done | ||
134 | endif | ||
135 | |||
122 | 136 | ||
123 | variable_info: | 137 | variable_info: |
124 | @echo -------------------------------------- | 138 | @echo -------------------------------------- |
125 | @echo KDEPIM buildsystem, variableinfo... | 139 | @echo KDEPIM buildsystem, variableinfo... |
126 | @echo KDEPIMDIR=$(KDEPIMDIR) | 140 | @echo KDEPIMDIR=$(KDEPIMDIR) |
127 | @echo QTDIR=$(QTDIR) | 141 | @echo QTDIR=$(QTDIR) |
128 | @echo QPEDIR=$(QPEDIR) | 142 | @echo QPEDIR=$(QPEDIR) |
129 | @echo OPIEDIR=$(OPIEDIR) | 143 | @echo OPIEDIR=$(OPIEDIR) |
130 | @echo PLATFORM=$(PLATFORM) | 144 | @echo PLATFORM=$(PLATFORM) |
131 | @echo RELEASE_DEBUG=$(RELEASE_DEBUG) | 145 | @echo RELEASE_DEBUG=$(RELEASE_DEBUG) |
132 | @echo BUILD_NO_MICROMAIL=$(BUILD_NO_MICROMAIL) | 146 | @echo BUILD_NO_MICROMAIL=$(BUILD_NO_MICROMAIL) |
133 | @echo BUILD_NO_LDAP_PLUGIN=$(BUILD_NO_LDAP_PLUGIN) | 147 | @echo BUILD_NO_LDAP_PLUGIN=$(BUILD_NO_LDAP_PLUGIN) |
134 | @echo BUILD_NO_OPIE_PLUGIN=$(BUILD_NO_OPIE_PLUGIN) | 148 | @echo BUILD_NO_OPIE_PLUGIN=$(BUILD_NO_OPIE_PLUGIN) |
135 | @echo BUILD_NO_SHARP_PLUGIN=$(BUILD_NO_SHARP_PLUGIN) | 149 | @echo BUILD_NO_SHARP_PLUGIN=$(BUILD_NO_SHARP_PLUGIN) |
136 | ifndef BUILD_NO_SHARP_PLUGIN | 150 | ifndef BUILD_NO_SHARP_PLUGIN |
137 | @echo SHARPDTMSDK=$(SHARPDTMSDK) | 151 | @echo SHARPDTMSDK=$(SHARPDTMSDK) |
138 | endif | 152 | endif |
139 | @echo BUILD_NO_GAMMU=$(BUILD_NO_GAMMU) | 153 | @echo BUILD_NO_GAMMU=$(BUILD_NO_GAMMU) |
154 | @echo BUILD_NO_PWMANAGER=$(BUILD_NO_PWMANAGER) | ||
140 | @echo -------------------------------------- | 155 | @echo -------------------------------------- |
141 | 156 | ||
142 | variable_test: variable_info | 157 | variable_test: variable_info |
143 | @echo KDEPIM buildsystem, variablecheck... | 158 | @echo KDEPIM buildsystem, variablecheck... |
144 | ifndef KDEPIMDIR | 159 | ifndef KDEPIMDIR |
145 | @echo KDEPIMDIR is not defined. | 160 | @echo KDEPIMDIR is not defined. |
146 | $(error KDEPIMDIR is not defined) | 161 | $(error KDEPIMDIR is not defined) |
147 | endif | 162 | endif |
148 | ifndef PLATFORM | 163 | ifndef PLATFORM |
149 | @echo PLATFORM is not defined. | 164 | @echo PLATFORM is not defined. |
150 | $(error PLATFORM is not defined) | 165 | $(error PLATFORM is not defined) |
151 | endif | 166 | endif |
152 | ifdef BUILD_NO_LDAP_PLUGIN | 167 | 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) | 168 | @echo LDAP PLUGIN will not be build, because BUILD_NO_LDAP_PLUGIN is set to $(BUILD_NO_LDAP_PLUGIN) |
154 | endif | 169 | endif |
155 | ifdef BUILD_NO_OPIE_PLUGIN | 170 | 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) | 171 | @echo OPIE PLUGIN will not be build, because BUILD_NO_OPIE_PLUGIN is set to $(BUILD_NO_OPIE_PLUGIN) |
157 | endif | 172 | endif |
158 | ifdef BUILD_NO_MICROMAIL | 173 | ifdef BUILD_NO_MICROMAIL |
159 | @echo MICROMAIL will not be build, because BUILD_NO_MICROMAIL is set to $(BUILD_NO_MICROMAIL) | 174 | @echo MICROMAIL will not be build, because BUILD_NO_MICROMAIL is set to $(BUILD_NO_MICROMAIL) |
160 | endif | 175 | endif |
161 | ifdef BUILD_NO_SHARP_PLUGIN | 176 | 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) | 177 | @echo SHARP PLUGIN will not be build, because BUILD_NO_SHARP_PLUGIN is set to $(BUILD_NO_SHARP_PLUGIN) |
163 | else | 178 | else |
164 | ifndef SHARPDTMSDK | 179 | ifndef SHARPDTMSDK |
165 | @echo SHARP PLUGIN can not be build, because SHARPDTMSDK is set to $(SHARPDTMSDK) | 180 | @echo SHARP PLUGIN can not be build, because SHARPDTMSDK is set to $(SHARPDTMSDK) |
166 | $(error SHARPDTMSDK is not defined) | 181 | $(error SHARPDTMSDK is not defined) |
167 | endif | 182 | endif |
168 | endif | 183 | endif |
169 | ifdef BUILD_NO_GAMMU | 184 | ifdef BUILD_NO_GAMMU |
170 | @echo GAMMU will not be build, because BUILD_NO_GAMMU is set to $(BUILD_NO_GAMMU) | 185 | @echo GAMMU will not be build, because BUILD_NO_GAMMU is set to $(BUILD_NO_GAMMU) |
171 | endif | 186 | endif |
187 | ifdef BUILD_NO_PWMANAGER | ||
188 | @echo PWMANAGER will not be build, because BUILD_NO_PWMANAGER is set to $(BUILD_NO_PWMANAGER) | ||
189 | endif | ||
172 | @echo -------------------------------------- | 190 | @echo -------------------------------------- |
173 | 191 | ||
174 | 192 | ||
175 | objects: | 193 | objects: |
176 | for i in $(SUBDIRS); do mkdir -p $$i/obj/$(PLATFORM); done | 194 | for i in $(SUBDIRS); do mkdir -p $$i/obj/$(PLATFORM); done |
177 | for i in $(SUBDIRS); do mkdir -p $$i/moc/$(PLATFORM); done | 195 | for i in $(SUBDIRS); do mkdir -p $$i/moc/$(PLATFORM); done |
178 | mkdir -p libical/lib/$(PLATFORM) | 196 | mkdir -p libical/lib/$(PLATFORM) |
179 | 197 | ||
180 | clean: | 198 | clean: |
181 | rm -rf libical/lib/$(PLATFORM)/*; | 199 | rm -rf libical/lib/$(PLATFORM)/*; |
182 | for i in $(SUBDIRS); do pushd $$i; make clean; rm -f *~;\ | 200 | for i in $(SUBDIRS); do pushd $$i; make clean; rm -f *~;\ |
183 | rm -f obj/$(PLATFORM)/*; rm -f moc/$(PLATFORM)/*; rm Makefile$(PLATFORM); popd; \ | 201 | rm -f obj/$(PLATFORM)/*; rm -f moc/$(PLATFORM)/*; rm Makefile$(PLATFORM); popd; \ |
184 | done | 202 | done |
185 | install: | 203 | install: |
186 | 204 | ||
187 | cd bin/kdepim; make install | 205 | cd bin/kdepim; make install |
188 | cp -r Pim $(QPEDIR)/apps | 206 | cp -r Pim $(QPEDIR)/apps |
189 | cp db2file/db2file $(QPEDIR)/bin/db2file | 207 | cp db2file/db2file $(QPEDIR)/bin/db2file |
190 | cp korganizer/korganizer.desktop $(QPEDIR)/apps/Pim/korganizer.desktop | 208 | cp korganizer/korganizer.desktop $(QPEDIR)/apps/Pim/korganizer.desktop |
191 | cp kaddressbook/kaddressbook.desktop $(QPEDIR)/apps/Pim/kaddressbook.desktop | 209 | cp kaddressbook/kaddressbook.desktop $(QPEDIR)/apps/Pim/kaddressbook.desktop |
192 | cp kmicromail/kmicromail.desktop $(QPEDIR)/apps/Pim/kopiemail.desktop | 210 | cp kmicromail/kmicromail.desktop $(QPEDIR)/apps/Pim/kopiemail.desktop |
211 | cp pwmanager/pwmanager/pwmanager.desktop $(QPEDIR)/apps/Pim/pwmanager.desktop | ||
193 | 212 | ||
194 | dist: | 213 | dist: |
195 | @echo Dont forget to do "make install" before "make dist" | 214 | @echo Dont forget to do "make install" before "make dist" |
196 | rm -f *arm.ipk | 215 | rm -f *arm.ipk |
197 | rm -f *~ | 216 | rm -f *~ |
198 | cd ..; tar czf kdepim.src.tar.gz --exclude=obj --exclude=moc --exclude=CVS --exclude=Makefilezaurus --exclude=Makefileqtopia kdepim | 217 | cd ..; tar czf kdepim.src.tar.gz --exclude=obj --exclude=moc --exclude=CVS --exclude=Makefilezaurus --exclude=Makefileqtopia kdepim |
199 | ./mkipks kmicrokdelibs.control | 218 | ./mkipks kmicrokdelibs.control |
200 | ./mkipks korganizer.control | 219 | ./mkipks korganizer.control |
201 | ./mkipks kaddressbook.control | 220 | ./mkipks kaddressbook.control |
202 | ifndef BUILD_NO_MICROMAIL | 221 | ifndef BUILD_NO_MICROMAIL |
203 | ./mkipks kopiemail.control | 222 | ./mkipks kopiemail.control |
204 | endif | 223 | endif |
205 | ./mkipks korganizer-alarm.control | 224 | ./mkipks korganizer-alarm.control |
206 | ifndef BUILD_NO_GAMMU | 225 | ifndef BUILD_NO_GAMMU |
207 | ./mkipks kammu.control | 226 | ./mkipks kammu.control |
208 | endif | 227 | endif |
228 | ifndef BUILD_NO_PWMANAGER | ||
229 | ./mkipks pwmanager.control | ||
230 | endif | ||
209 | ./mkipks pim_TAB_icon.control | 231 | ./mkipks pim_TAB_icon.control |
210 | 232 | ||
211 | tmake: objects \ | 233 | tmake: objects \ |
212 | qtcompat/Makefile$(PLATFORM) \ | 234 | qtcompat/Makefile$(PLATFORM) \ |
213 | microkde/Makefile$(PLATFORM) \ | 235 | microkde/Makefile$(PLATFORM) \ |
214 | libkcal/Makefile$(PLATFORM) \ | 236 | libkcal/Makefile$(PLATFORM) \ |
215 | libkdepim/Makefile$(PLATFORM) \ | 237 | libkdepim/Makefile$(PLATFORM) \ |
216 | korganizer/Makefile$(PLATFORM) \ | 238 | korganizer/Makefile$(PLATFORM) \ |
217 | kalarmd/Makefile$(PLATFORM) \ | 239 | kalarmd/Makefile$(PLATFORM) \ |
218 | libical/src/libical/Makefile$(PLATFORM) \ | 240 | libical/src/libical/Makefile$(PLATFORM) \ |
219 | libical/src/libicalss/Makefile$(PLATFORM) \ | 241 | libical/src/libicalss/Makefile$(PLATFORM) \ |
220 | kabc/Makefile$(PLATFORM) \ | 242 | kabc/Makefile$(PLATFORM) \ |
221 | kabc/formats/binary/Makefile$(PLATFORM) \ | 243 | kabc/formats/binary/Makefile$(PLATFORM) \ |
222 | kabc/plugins/file/Makefile$(PLATFORM) \ | 244 | kabc/plugins/file/Makefile$(PLATFORM) \ |
223 | kabc/plugins/dir/Makefile$(PLATFORM) \ | 245 | kabc/plugins/dir/Makefile$(PLATFORM) \ |
224 | kabc/plugins/ldap/Makefile$(PLATFORM) \ | 246 | kabc/plugins/ldap/Makefile$(PLATFORM) \ |
225 | kabc/plugins/opie/Makefile$(PLATFORM) \ | 247 | kabc/plugins/opie/Makefile$(PLATFORM) \ |
226 | kabc/plugins/qtopia/Makefile$(PLATFORM) \ | 248 | kabc/plugins/qtopia/Makefile$(PLATFORM) \ |
227 | kabc/plugins/sharpdtm/Makefile$(PLATFORM) \ | 249 | kabc/plugins/sharpdtm/Makefile$(PLATFORM) \ |
228 | kaddressbook/Makefile$(PLATFORM) \ | 250 | kaddressbook/Makefile$(PLATFORM) \ |
229 | kmicromail/Makefile$(PLATFORM) \ | 251 | kmicromail/Makefile$(PLATFORM) \ |
230 | kmicromail/libetpan/Makefile$(PLATFORM) \ | 252 | kmicromail/libetpan/Makefile$(PLATFORM) \ |
231 | kmicromail/libmailwrapper/Makefile$(PLATFORM) \ | 253 | kmicromail/libmailwrapper/Makefile$(PLATFORM) \ |
232 | gammu/emb/common/Makefile$(PLATFORM) \ | 254 | gammu/emb/common/Makefile$(PLATFORM) \ |
233 | gammu/emb/gammu/Makefile$(PLATFORM) \ | 255 | gammu/emb/gammu/Makefile$(PLATFORM) \ |
234 | 256 | pwmanager/pwmanager/Makefile$(PLATFORM) \ | |
235 | 257 | ||
236 | 258 | ||
237 | 259 | ||
238 | qtcompat/Makefile$(PLATFORM): qtcompat/qtcompat.pro | 260 | qtcompat/Makefile$(PLATFORM): qtcompat/qtcompat.pro |
239 | cd qtcompat; tmake "CONFIG+=$(RELEASE_DEBUG)" qtcompat.pro -o Makefile$(PLATFORM) | 261 | cd qtcompat; tmake "CONFIG+=$(RELEASE_DEBUG)" qtcompat.pro -o Makefile$(PLATFORM) |
240 | 262 | ||
241 | microkde/Makefile$(PLATFORM): microkde/microkdeE.pro | 263 | microkde/Makefile$(PLATFORM): microkde/microkdeE.pro |
242 | cd microkde; tmake "CONFIG+=$(RELEASE_DEBUG)" microkdeE.pro -o Makefile$(PLATFORM) | 264 | cd microkde; tmake "CONFIG+=$(RELEASE_DEBUG)" microkdeE.pro -o Makefile$(PLATFORM) |
243 | 265 | ||
244 | libkcal/Makefile$(PLATFORM): libkcal/libkcalE.pro | 266 | libkcal/Makefile$(PLATFORM): libkcal/libkcalE.pro |
245 | cd libkcal; tmake "CONFIG+=$(RELEASE_DEBUG)" libkcalE.pro -o Makefile$(PLATFORM) | 267 | cd libkcal; tmake "CONFIG+=$(RELEASE_DEBUG)" libkcalE.pro -o Makefile$(PLATFORM) |
246 | 268 | ||
247 | 269 | ||
248 | libkdepim/Makefile$(PLATFORM): libkdepim/libkdepimE.pro | 270 | libkdepim/Makefile$(PLATFORM): libkdepim/libkdepimE.pro |
249 | cd libkdepim; tmake "CONFIG+=$(RELEASE_DEBUG)" libkdepimE.pro -o Makefile$(PLATFORM) | 271 | cd libkdepim; tmake "CONFIG+=$(RELEASE_DEBUG)" libkdepimE.pro -o Makefile$(PLATFORM) |
250 | 272 | ||
251 | kalarmd/Makefile$(PLATFORM): kalarmd/kalarmdE.pro | 273 | kalarmd/Makefile$(PLATFORM): kalarmd/kalarmdE.pro |
252 | cd kalarmd; tmake "CONFIG+=$(RELEASE_DEBUG)" kalarmdE.pro -o Makefile$(PLATFORM) | 274 | cd kalarmd; tmake "CONFIG+=$(RELEASE_DEBUG)" kalarmdE.pro -o Makefile$(PLATFORM) |
253 | 275 | ||
254 | korganizer/Makefile$(PLATFORM): korganizer/korganizerE.pro | 276 | korganizer/Makefile$(PLATFORM): korganizer/korganizerE.pro |
255 | cd korganizer; tmake "CONFIG+=$(RELEASE_DEBUG)" korganizerE.pro -o Makefile$(PLATFORM) | 277 | cd korganizer; tmake "CONFIG+=$(RELEASE_DEBUG)" korganizerE.pro -o Makefile$(PLATFORM) |
256 | 278 | ||
257 | libical/src/libical/Makefile$(PLATFORM): libical/src/libical/libicalE.pro | 279 | libical/src/libical/Makefile$(PLATFORM): libical/src/libical/libicalE.pro |
258 | cd libical/src/libical; tmake "CONFIG+=$(RELEASE_DEBUG)" libicalE.pro -o Makefile$(PLATFORM) | 280 | cd libical/src/libical; tmake "CONFIG+=$(RELEASE_DEBUG)" libicalE.pro -o Makefile$(PLATFORM) |
259 | 281 | ||
260 | libical/src/libicalss/Makefile$(PLATFORM): libical/src/libicalss/libicalssE.pro | 282 | libical/src/libicalss/Makefile$(PLATFORM): libical/src/libicalss/libicalssE.pro |
261 | cd libical/src/libicalss; tmake "CONFIG+=$(RELEASE_DEBUG)" libicalssE.pro -o Makefile$(PLATFORM) | 283 | cd libical/src/libicalss; tmake "CONFIG+=$(RELEASE_DEBUG)" libicalssE.pro -o Makefile$(PLATFORM) |
262 | 284 | ||
263 | kabc/Makefile$(PLATFORM): kabc/kabcE.pro | 285 | kabc/Makefile$(PLATFORM): kabc/kabcE.pro |
264 | cd kabc; tmake "CONFIG+=$(RELEASE_DEBUG)" kabcE.pro -o Makefile$(PLATFORM) | 286 | cd kabc; tmake "CONFIG+=$(RELEASE_DEBUG)" kabcE.pro -o Makefile$(PLATFORM) |
265 | 287 | ||
266 | kabc/formats/binary/Makefile$(PLATFORM): kabc/formats/binary/kabcformat_binaryE.pro | 288 | kabc/formats/binary/Makefile$(PLATFORM): kabc/formats/binary/kabcformat_binaryE.pro |
267 | cd kabc/formats/binary; tmake "CONFIG+=$(RELEASE_DEBUG)" kabcformat_binaryE.pro -o Makefile$(PLATFORM) | 289 | cd kabc/formats/binary; tmake "CONFIG+=$(RELEASE_DEBUG)" kabcformat_binaryE.pro -o Makefile$(PLATFORM) |
268 | 290 | ||
269 | kabc/plugins/file/Makefile$(PLATFORM): kabc/plugins/file/fileE.pro | 291 | kabc/plugins/file/Makefile$(PLATFORM): kabc/plugins/file/fileE.pro |
270 | cd kabc/plugins/file; tmake "CONFIG+=$(RELEASE_DEBUG)" fileE.pro -o Makefile$(PLATFORM) | 292 | cd kabc/plugins/file; tmake "CONFIG+=$(RELEASE_DEBUG)" fileE.pro -o Makefile$(PLATFORM) |
271 | 293 | ||
272 | kabc/plugins/dir/Makefile$(PLATFORM): kabc/plugins/dir/dirE.pro | 294 | kabc/plugins/dir/Makefile$(PLATFORM): kabc/plugins/dir/dirE.pro |
273 | cd kabc/plugins/dir; tmake "CONFIG+=$(RELEASE_DEBUG)" dirE.pro -o Makefile$(PLATFORM) | 295 | cd kabc/plugins/dir; tmake "CONFIG+=$(RELEASE_DEBUG)" dirE.pro -o Makefile$(PLATFORM) |
274 | 296 | ||
275 | kabc/plugins/ldap/Makefile$(PLATFORM): kabc/plugins/ldap/ldapE.pro | 297 | kabc/plugins/ldap/Makefile$(PLATFORM): kabc/plugins/ldap/ldapE.pro |
276 | cd kabc/plugins/ldap; tmake "CONFIG+=$(RELEASE_DEBUG)" ldapE.pro -o Makefile$(PLATFORM) | 298 | cd kabc/plugins/ldap; tmake "CONFIG+=$(RELEASE_DEBUG)" ldapE.pro -o Makefile$(PLATFORM) |
277 | 299 | ||
278 | kabc/plugins/opie/Makefile$(PLATFORM): kabc/plugins/opie/opieE.pro | 300 | kabc/plugins/opie/Makefile$(PLATFORM): kabc/plugins/opie/opieE.pro |
279 | cd kabc/plugins/opie; tmake "CONFIG+=$(RELEASE_DEBUG)" opieE.pro -o Makefile$(PLATFORM) | 301 | cd kabc/plugins/opie; tmake "CONFIG+=$(RELEASE_DEBUG)" opieE.pro -o Makefile$(PLATFORM) |
280 | 302 | ||
281 | kabc/plugins/qtopia/Makefile$(PLATFORM): kabc/plugins/qtopia/qtopiaE.pro | 303 | kabc/plugins/qtopia/Makefile$(PLATFORM): kabc/plugins/qtopia/qtopiaE.pro |
282 | cd kabc/plugins/qtopia; tmake "CONFIG+=$(RELEASE_DEBUG)" qtopiaE.pro -o Makefile$(PLATFORM) | 304 | cd kabc/plugins/qtopia; tmake "CONFIG+=$(RELEASE_DEBUG)" qtopiaE.pro -o Makefile$(PLATFORM) |
283 | 305 | ||
284 | kabc/plugins/sharpdtm/Makefile$(PLATFORM): kabc/plugins/sharpdtm/sharpdtmE.pro | 306 | kabc/plugins/sharpdtm/Makefile$(PLATFORM): kabc/plugins/sharpdtm/sharpdtmE.pro |
285 | cd kabc/plugins/sharpdtm; tmake "CONFIG+=$(RELEASE_DEBUG)" sharpdtmE.pro -o Makefile$(PLATFORM) | 307 | cd kabc/plugins/sharpdtm; tmake "CONFIG+=$(RELEASE_DEBUG)" sharpdtmE.pro -o Makefile$(PLATFORM) |
286 | 308 | ||
287 | kaddressbook/Makefile$(PLATFORM): kaddressbook/kaddressbookE.pro | 309 | kaddressbook/Makefile$(PLATFORM): kaddressbook/kaddressbookE.pro |
288 | cd kaddressbook; tmake "CONFIG+=$(RELEASE_DEBUG)" kaddressbookE.pro -o Makefile$(PLATFORM) | 310 | cd kaddressbook; tmake "CONFIG+=$(RELEASE_DEBUG)" kaddressbookE.pro -o Makefile$(PLATFORM) |
289 | 311 | ||
290 | kmicromail/Makefile$(PLATFORM): kmicromail/kmicromailE.pro | 312 | kmicromail/Makefile$(PLATFORM): kmicromail/kmicromailE.pro |
291 | cd kmicromail; tmake "CONFIG+=$(RELEASE_DEBUG)" kmicromailE.pro -o Makefile$(PLATFORM) | 313 | cd kmicromail; tmake "CONFIG+=$(RELEASE_DEBUG)" kmicromailE.pro -o Makefile$(PLATFORM) |
292 | 314 | ||
293 | kmicromail/libetpan/Makefile$(PLATFORM): kmicromail/libetpan/libetpanE.pro | 315 | kmicromail/libetpan/Makefile$(PLATFORM): kmicromail/libetpan/libetpanE.pro |
294 | cd kmicromail/libetpan; tmake "CONFIG+=$(RELEASE_DEBUG)" libetpanE.pro -o Makefile$(PLATFORM) | 316 | cd kmicromail/libetpan; tmake "CONFIG+=$(RELEASE_DEBUG)" libetpanE.pro -o Makefile$(PLATFORM) |
295 | 317 | ||
296 | kmicromail/libmailwrapper/Makefile$(PLATFORM): kmicromail/libmailwrapper/libmailwrapperE.pro | 318 | kmicromail/libmailwrapper/Makefile$(PLATFORM): kmicromail/libmailwrapper/libmailwrapperE.pro |
297 | cd kmicromail/libmailwrapper; tmake "CONFIG+=$(RELEASE_DEBUG)" libmailwrapperE.pro -o Makefile$(PLATFORM) | 319 | cd kmicromail/libmailwrapper; tmake "CONFIG+=$(RELEASE_DEBUG)" libmailwrapperE.pro -o Makefile$(PLATFORM) |
298 | 320 | ||
299 | gammu/emb/common/Makefile$(PLATFORM): gammu/emb/common/commonE.pro | 321 | gammu/emb/common/Makefile$(PLATFORM): gammu/emb/common/commonE.pro |
300 | cd gammu/emb/common; tmake "CONFIG+=$(RELEASE_DEBUG)" commonE.pro -o Makefile$(PLATFORM) | 322 | cd gammu/emb/common; tmake "CONFIG+=$(RELEASE_DEBUG)" commonE.pro -o Makefile$(PLATFORM) |
301 | 323 | ||
302 | gammu/emb/gammu/Makefile$(PLATFORM): gammu/emb/gammu/gammuE.pro | 324 | gammu/emb/gammu/Makefile$(PLATFORM): gammu/emb/gammu/gammuE.pro |
303 | cd gammu/emb/gammu; tmake "CONFIG+=$(RELEASE_DEBUG)" gammuE.pro -o Makefile$(PLATFORM) | 325 | cd gammu/emb/gammu; tmake "CONFIG+=$(RELEASE_DEBUG)" gammuE.pro -o Makefile$(PLATFORM) |
326 | |||
327 | pwmanager/pwmanager/Makefile$(PLATFORM): pwmanager/pwmanager/pwmanagerE.pro | ||
328 | cd pwmanager/pwmanager; tmake "CONFIG+=$(RELEASE_DEBUG)" pwmanagerE.pro -o Makefile$(PLATFORM) | ||
diff --git a/kmicromail/accountitem.cpp b/kmicromail/accountitem.cpp index 59c8abb..12d047a 100644 --- a/kmicromail/accountitem.cpp +++ b/kmicromail/accountitem.cpp | |||
@@ -402,193 +402,193 @@ void NNTPfolderItem::downloadMails() | |||
402 | { | 402 | { |
403 | AccountView*bl = nntp->accountView(); | 403 | AccountView*bl = nntp->accountView(); |
404 | if (!bl) return; | 404 | if (!bl) return; |
405 | bl->downloadMails(folder,nntp->getWrapper()); | 405 | bl->downloadMails(folder,nntp->getWrapper()); |
406 | } | 406 | } |
407 | 407 | ||
408 | void NNTPfolderItem::contextMenuSelected(int which) | 408 | void NNTPfolderItem::contextMenuSelected(int which) |
409 | { | 409 | { |
410 | AccountView * view = (AccountView*)listView(); | 410 | AccountView * view = (AccountView*)listView(); |
411 | switch (which) | 411 | switch (which) |
412 | { | 412 | { |
413 | case 0: | 413 | case 0: |
414 | /* must be 'cause pop3 lists are cached */ | 414 | /* must be 'cause pop3 lists are cached */ |
415 | nntp->getWrapper()->logout(); | 415 | nntp->getWrapper()->logout(); |
416 | view->refreshCurrent(); | 416 | view->refreshCurrent(); |
417 | break; | 417 | break; |
418 | case 1: | 418 | case 1: |
419 | downloadMails(); | 419 | downloadMails(); |
420 | break; | 420 | break; |
421 | default: | 421 | default: |
422 | break; | 422 | break; |
423 | } | 423 | } |
424 | } | 424 | } |
425 | 425 | ||
426 | /** | 426 | /** |
427 | * IMAP Account stuff | 427 | * IMAP Account stuff |
428 | */ | 428 | */ |
429 | IMAPviewItem::IMAPviewItem( IMAPaccount *a, AccountView *parent ) | 429 | IMAPviewItem::IMAPviewItem( IMAPaccount *a, AccountView *parent ) |
430 | : AccountViewItem( parent ) | 430 | : AccountViewItem( parent ) |
431 | { | 431 | { |
432 | account = a; | 432 | account = a; |
433 | wrapper = AbstractMail::getWrapper( account ); | 433 | wrapper = AbstractMail::getWrapper( account ); |
434 | SETPIX(PIXMAP_IMAPFOLDER); | 434 | SETPIX(PIXMAP_IMAPFOLDER); |
435 | setText( 0, account->getAccountName() ); | 435 | setText( 0, account->getAccountName() ); |
436 | setOpen( true ); | 436 | setOpen( true ); |
437 | } | 437 | } |
438 | 438 | ||
439 | IMAPviewItem::~IMAPviewItem() | 439 | IMAPviewItem::~IMAPviewItem() |
440 | { | 440 | { |
441 | delete wrapper; | 441 | delete wrapper; |
442 | } | 442 | } |
443 | 443 | ||
444 | AbstractMail *IMAPviewItem::getWrapper() | 444 | AbstractMail *IMAPviewItem::getWrapper() |
445 | { | 445 | { |
446 | return wrapper; | 446 | return wrapper; |
447 | } | 447 | } |
448 | 448 | ||
449 | void IMAPviewItem::refresh(QValueList<RecMailP>&) | 449 | void IMAPviewItem::refresh(QValueList<RecMailP>&) |
450 | { | 450 | { |
451 | refreshFolders(false); | 451 | refreshFolders(false); |
452 | } | 452 | } |
453 | 453 | ||
454 | const QStringList&IMAPviewItem::subFolders() | 454 | const QStringList&IMAPviewItem::subFolders() |
455 | { | 455 | { |
456 | return currentFolders; | 456 | return currentFolders; |
457 | } | 457 | } |
458 | 458 | ||
459 | void IMAPviewItem::refreshFolders(bool force) | 459 | void IMAPviewItem::refreshFolders(bool force) |
460 | { | 460 | { |
461 | if (childCount()>0 && force==false) return; | 461 | if (childCount()>0 && force==false) return; |
462 | if (account->getOffline()) return; | 462 | if (account->getOffline()) return; |
463 | 463 | ||
464 | removeChilds(); | 464 | removeChilds(); |
465 | currentFolders.clear(); | 465 | currentFolders.clear(); |
466 | QValueList<FolderP> * folders = wrapper->listFolders(); | 466 | QValueList<FolderP> * folders = wrapper->listFolders(); |
467 | 467 | ||
468 | QValueList<FolderP>::Iterator it; | 468 | QValueList<FolderP>::Iterator it; |
469 | QListViewItem*item = 0; | 469 | QListViewItem*item = 0; |
470 | QListViewItem*titem = 0; | 470 | QListViewItem*titem = 0; |
471 | QString fname,del,search; | 471 | QString fname,del,search; |
472 | int pos; | 472 | int pos; |
473 | 473 | ||
474 | for ( it = folders->begin(); it!=folders->end(); ++it) | 474 | for ( it = folders->begin(); it!=folders->end(); ++it) |
475 | { | 475 | { |
476 | if ((*it)->getDisplayName().lower()=="inbox") | 476 | if ((*it)->getDisplayName().lower()=="inbox") |
477 | { | 477 | { |
478 | item = new IMAPfolderItem( (*it), this , item ); | 478 | item = new IMAPfolderItem( (*it), this , item ); |
479 | folders->remove(it); | 479 | folders->remove(it); |
480 | break; | 480 | break; |
481 | } | 481 | } |
482 | } | 482 | } |
483 | for ( it = folders->begin(); it!=folders->end(); ++it) | 483 | for ( it = folders->begin(); it!=folders->end(); ++it) |
484 | { | 484 | { |
485 | fname = (*it)->getDisplayName(); | 485 | fname = (*it)->getDisplayName(); |
486 | currentFolders.append((*it)->getName()); | 486 | currentFolders.append((*it)->getName()); |
487 | pos = fname.findRev((*it)->Separator()); | 487 | pos = fname.findRev((*it)->Separator()); |
488 | if (pos != -1) | 488 | if (pos != -1) |
489 | { | 489 | { |
490 | fname = fname.left(pos); | 490 | fname = fname.left(pos); |
491 | } | 491 | } |
492 | IMAPfolderItem*pitem = (IMAPfolderItem*)findSubItem(fname); | 492 | IMAPfolderItem*pitem = (IMAPfolderItem*)findSubItem(fname); |
493 | if (pitem) | 493 | if (pitem) |
494 | { | 494 | { |
495 | titem = item; | 495 | titem = item; |
496 | item = new IMAPfolderItem( (*it),pitem,pitem->firstChild(),this); | 496 | item = new IMAPfolderItem( (*it),pitem,pitem->firstChild(),this); |
497 | /* setup the short name */ | 497 | /* setup the short name */ |
498 | item->setText(0,(*it)->getDisplayName().right((*it)->getDisplayName().length()-pos-1)); | 498 | item->setText(0,(*it)->getDisplayName().mid(pos+1)); |
499 | item = titem; | 499 | item = titem; |
500 | } | 500 | } |
501 | else | 501 | else |
502 | { | 502 | { |
503 | item = new IMAPfolderItem( (*it), this , item ); | 503 | item = new IMAPfolderItem( (*it), this , item ); |
504 | } | 504 | } |
505 | } | 505 | } |
506 | delete folders; | 506 | delete folders; |
507 | } | 507 | } |
508 | 508 | ||
509 | QPopupMenu * IMAPviewItem::getContextMenu() | 509 | QPopupMenu * IMAPviewItem::getContextMenu() |
510 | { | 510 | { |
511 | QPopupMenu *m = new QPopupMenu(0); | 511 | QPopupMenu *m = new QPopupMenu(0); |
512 | if (m) | 512 | if (m) |
513 | { | 513 | { |
514 | if (!account->getOffline()) | 514 | if (!account->getOffline()) |
515 | { | 515 | { |
516 | m->insertItem(QObject::tr("Refresh folder list",contextName),0); | 516 | m->insertItem(QObject::tr("Refresh folder list",contextName),0); |
517 | m->insertItem(QObject::tr("Create new folder",contextName),1); | 517 | m->insertItem(QObject::tr("Create new folder",contextName),1); |
518 | m->insertSeparator(); | 518 | m->insertSeparator(); |
519 | m->insertItem(QObject::tr("Disconnect",contextName),2); | 519 | m->insertItem(QObject::tr("Disconnect",contextName),2); |
520 | m->insertItem(QObject::tr("Set offline",contextName),3); | 520 | m->insertItem(QObject::tr("Set offline",contextName),3); |
521 | m->insertSeparator(); | 521 | m->insertSeparator(); |
522 | m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS); | 522 | m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS); |
523 | } | 523 | } |
524 | else | 524 | else |
525 | { | 525 | { |
526 | m->insertItem(QObject::tr("Set online",contextName),3); | 526 | m->insertItem(QObject::tr("Set online",contextName),3); |
527 | m->insertSeparator(); | 527 | m->insertSeparator(); |
528 | m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS); | 528 | m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS); |
529 | } | 529 | } |
530 | } | 530 | } |
531 | return m; | 531 | return m; |
532 | } | 532 | } |
533 | 533 | ||
534 | void IMAPviewItem::createNewFolder() | 534 | void IMAPviewItem::createNewFolder() |
535 | { | 535 | { |
536 | Newmdirdlg ndirdlg; | 536 | Newmdirdlg ndirdlg; |
537 | 537 | ||
538 | ndirdlg.showMaximized(); | 538 | ndirdlg.showMaximized(); |
539 | if ( ndirdlg.exec() ) | 539 | if ( ndirdlg.exec() ) |
540 | { | 540 | { |
541 | QString ndir = ndirdlg.Newdir(); | 541 | QString ndir = ndirdlg.Newdir(); |
542 | bool makesubs = ndirdlg.subpossible(); | 542 | bool makesubs = ndirdlg.subpossible(); |
543 | QString delemiter = "/"; | 543 | QString delemiter = "/"; |
544 | IMAPfolderItem*item = (IMAPfolderItem*)firstChild(); | 544 | IMAPfolderItem*item = (IMAPfolderItem*)firstChild(); |
545 | if (item) | 545 | if (item) |
546 | { | 546 | { |
547 | delemiter = item->Delemiter(); | 547 | delemiter = item->Delemiter(); |
548 | } | 548 | } |
549 | if (wrapper->createMbox(ndir,0,delemiter,makesubs)) | 549 | if (wrapper->createMbox(ndir,0,delemiter,makesubs)) |
550 | { | 550 | { |
551 | refreshFolders(true); | 551 | refreshFolders(true); |
552 | } | 552 | } |
553 | } | 553 | } |
554 | } | 554 | } |
555 | 555 | ||
556 | void IMAPviewItem::contextMenuSelected(int id) | 556 | void IMAPviewItem::contextMenuSelected(int id) |
557 | { | 557 | { |
558 | 558 | ||
559 | switch (id) | 559 | switch (id) |
560 | { | 560 | { |
561 | case 0: | 561 | case 0: |
562 | refreshFolders(true); | 562 | refreshFolders(true); |
563 | break; | 563 | break; |
564 | case 1: | 564 | case 1: |
565 | createNewFolder(); | 565 | createNewFolder(); |
566 | break; | 566 | break; |
567 | case 2: | 567 | case 2: |
568 | removeChilds(); | 568 | removeChilds(); |
569 | wrapper->logout(); | 569 | wrapper->logout(); |
570 | break; | 570 | break; |
571 | case 3: | 571 | case 3: |
572 | if (account->getOffline()==false) | 572 | if (account->getOffline()==false) |
573 | { | 573 | { |
574 | removeChilds(); | 574 | removeChilds(); |
575 | wrapper->logout(); | 575 | wrapper->logout(); |
576 | } | 576 | } |
577 | account->setOffline(!account->getOffline()); | 577 | account->setOffline(!account->getOffline()); |
578 | account->save(); | 578 | account->save(); |
579 | SETPIX(PIXMAP_IMAPFOLDER); | 579 | SETPIX(PIXMAP_IMAPFOLDER); |
580 | refreshFolders(false); | 580 | refreshFolders(false); |
581 | break; | 581 | break; |
582 | case GET_NEW_MAILS: // daunlood | 582 | case GET_NEW_MAILS: // daunlood |
583 | { | 583 | { |
584 | if (account->getOffline()) { | 584 | if (account->getOffline()) { |
585 | contextMenuSelected( 3 ); | 585 | contextMenuSelected( 3 ); |
586 | } | 586 | } |
587 | AccountView*bl = accountView(); | 587 | AccountView*bl = accountView(); |
588 | if (!bl) return; | 588 | if (!bl) return; |
589 | AccountViewItem* in = findSubItem( "inbox" , 0); | 589 | AccountViewItem* in = findSubItem( "inbox" , 0); |
590 | if ( ! in ) | 590 | if ( ! in ) |
591 | return; | 591 | return; |
592 | bl->downloadMailsInbox(in->getFolder(),getWrapper()); | 592 | bl->downloadMailsInbox(in->getFolder(),getWrapper()); |
593 | } | 593 | } |
594 | break; | 594 | break; |
diff --git a/kmicromail/libmailwrapper/mailwrapper.cpp b/kmicromail/libmailwrapper/mailwrapper.cpp index 9400649..2ee1ab3 100644 --- a/kmicromail/libmailwrapper/mailwrapper.cpp +++ b/kmicromail/libmailwrapper/mailwrapper.cpp | |||
@@ -1,149 +1,150 @@ | |||
1 | #include <stdlib.h> | 1 | #include <stdlib.h> |
2 | #include <sys/stat.h> | 2 | #include <sys/stat.h> |
3 | #include <sys/types.h> | 3 | #include <sys/types.h> |
4 | #include <unistd.h> | 4 | #include <unistd.h> |
5 | #include <fcntl.h> | 5 | #include <fcntl.h> |
6 | #include <string.h> | 6 | #include <string.h> |
7 | #include <qdir.h> | 7 | #include <qdir.h> |
8 | 8 | ||
9 | #include "mailwrapper.h" | 9 | #include "mailwrapper.h" |
10 | //#include "logindialog.h" | 10 | //#include "logindialog.h" |
11 | //#include "defines.h" | 11 | //#include "defines.h" |
12 | 12 | ||
13 | #define UNDEFINED 64 | 13 | #define UNDEFINED 64 |
14 | #define MAXLINE 76 | 14 | #define MAXLINE 76 |
15 | #define UTF16MASK 0x03FFUL | 15 | #define UTF16MASK 0x03FFUL |
16 | #define UTF16SHIFT 10 | 16 | #define UTF16SHIFT 10 |
17 | #define UTF16BASE 0x10000UL | 17 | #define UTF16BASE 0x10000UL |
18 | #define UTF16HIGHSTART 0xD800UL | 18 | #define UTF16HIGHSTART 0xD800UL |
19 | #define UTF16HIGHEND 0xDBFFUL | 19 | #define UTF16HIGHEND 0xDBFFUL |
20 | #define UTF16LOSTART 0xDC00UL | 20 | #define UTF16LOSTART 0xDC00UL |
21 | #define UTF16LOEND 0xDFFFUL | 21 | #define UTF16LOEND 0xDFFFUL |
22 | 22 | ||
23 | 23 | ||
24 | using namespace Opie::Core; | 24 | using namespace Opie::Core; |
25 | Attachment::Attachment( QString lnk ) | 25 | Attachment::Attachment( QString lnk ) |
26 | { | 26 | { |
27 | doc = lnk; | 27 | doc = lnk; |
28 | size = QFileInfo( doc ).size(); | 28 | size = QFileInfo( doc ).size(); |
29 | mPix = SmallIcon( "files" ); | 29 | mPix = SmallIcon( "files" ); |
30 | } | 30 | } |
31 | 31 | ||
32 | Folder::Folder(const QString&tmp_name, const QString&sep ) | 32 | Folder::Folder(const QString&tmp_name, const QString&sep ) |
33 | { | 33 | { |
34 | name = tmp_name; | 34 | name = tmp_name; |
35 | nameDisplay = name; | 35 | nameDisplay = name; |
36 | separator = sep; | 36 | separator = sep; |
37 | prefix = ""; | 37 | prefix = ""; |
38 | } | 38 | } |
39 | 39 | ||
40 | Folder::~Folder() | 40 | Folder::~Folder() |
41 | { | 41 | { |
42 | } | 42 | } |
43 | 43 | ||
44 | const QString& Folder::Separator()const | 44 | const QString& Folder::Separator()const |
45 | { | 45 | { |
46 | return separator; | 46 | return separator; |
47 | } | 47 | } |
48 | 48 | ||
49 | IMAPFolder::IMAPFolder(const QString&name,const QString&sep, bool select,bool no_inf, const QString&aprefix ) | 49 | IMAPFolder::IMAPFolder(const QString&t_name,const QString&sep, bool select,bool no_inf, const QString&aprefix ) |
50 | : Folder( name,sep ),m_MaySelect(select),m_NoInferior(no_inf) | 50 | : Folder( t_name,sep ),m_MaySelect(select),m_NoInferior(no_inf) |
51 | { | 51 | { |
52 | // Decode IMAP foldername | 52 | // Decode IMAP foldername |
53 | nameDisplay = IMAPFolder::decodeFolderName( name ); | 53 | nameDisplay = IMAPFolder::decodeFolderName( t_name ); |
54 | name = nameDisplay ; | ||
54 | /* | 55 | /* |
55 | odebug << "folder " + name + " - displayed as " + nameDisplay << oendl; | 56 | odebug << "folder " + name + " - displayed as " + nameDisplay << oendl; |
56 | */ | 57 | */ |
57 | prefix = aprefix; | 58 | prefix = aprefix; |
58 | 59 | ||
59 | if (prefix.length()>0) { | 60 | if (prefix.length()>0) { |
60 | if (nameDisplay.startsWith(prefix) && nameDisplay.length()>prefix.length()) { | 61 | if (nameDisplay.startsWith(prefix) && nameDisplay.length()>prefix.length()) { |
61 | nameDisplay=nameDisplay.right(nameDisplay.length()-prefix.length()); | 62 | nameDisplay=nameDisplay.right(nameDisplay.length()-prefix.length()); |
62 | } | 63 | } |
63 | } | 64 | } |
64 | } | 65 | } |
65 | 66 | ||
66 | IMAPFolder::~IMAPFolder() | 67 | IMAPFolder::~IMAPFolder() |
67 | { | 68 | { |
68 | } | 69 | } |
69 | 70 | ||
70 | static unsigned char base64chars[] = | 71 | static unsigned char base64chars[] = |
71 | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+,"; | 72 | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+,"; |
72 | 73 | ||
73 | /** | 74 | /** |
74 | * Decodes base64 encoded parts of the imapfolder name | 75 | * Decodes base64 encoded parts of the imapfolder name |
75 | * Code taken from kde cvs: kdebase/kioslave/imap4/rfcdecoder.cc | 76 | * Code taken from kde cvs: kdebase/kioslave/imap4/rfcdecoder.cc |
76 | */ | 77 | */ |
77 | QString IMAPFolder::decodeFolderName( const QString &name ) | 78 | QString IMAPFolder::decodeFolderName( const QString &name ) |
78 | { | 79 | { |
79 | unsigned char c, i, bitcount; | 80 | unsigned char c, i, bitcount; |
80 | unsigned long ucs4, utf16, bitbuf; | 81 | unsigned long ucs4, utf16, bitbuf; |
81 | unsigned char base64[256], utf8[6]; | 82 | unsigned char base64[256], utf8[6]; |
82 | unsigned long srcPtr = 0; | 83 | unsigned long srcPtr = 0; |
83 | QCString dst = ""; | 84 | QCString dst = ""; |
84 | QCString src = name.ascii(); | 85 | QCString src = name.ascii(); |
85 | 86 | ||
86 | /* initialize modified base64 decoding table */ | 87 | /* initialize modified base64 decoding table */ |
87 | memset(base64, UNDEFINED, sizeof(base64)); | 88 | memset(base64, UNDEFINED, sizeof(base64)); |
88 | for (i = 0; i < sizeof(base64chars); ++i) { | 89 | for (i = 0; i < sizeof(base64chars); ++i) { |
89 | base64[(int)base64chars[i]] = i; | 90 | base64[(int)base64chars[i]] = i; |
90 | } | 91 | } |
91 | 92 | ||
92 | /* loop until end of string */ | 93 | /* loop until end of string */ |
93 | while (srcPtr < src.length ()) { | 94 | while (srcPtr < src.length ()) { |
94 | c = src[srcPtr++]; | 95 | c = src[srcPtr++]; |
95 | /* deal with literal characters and &- */ | 96 | /* deal with literal characters and &- */ |
96 | if (c != '&' || src[srcPtr] == '-') { | 97 | if (c != '&' || src[srcPtr] == '-') { |
97 | /* encode literally */ | 98 | /* encode literally */ |
98 | dst += c; | 99 | dst += c; |
99 | /* skip over the '-' if this is an &- sequence */ | 100 | /* skip over the '-' if this is an &- sequence */ |
100 | if (c == '&') | 101 | if (c == '&') |
101 | srcPtr++; | 102 | srcPtr++; |
102 | } else { | 103 | } else { |
103 | /* convert modified UTF-7 -> UTF-16 -> UCS-4 -> UTF-8 -> HEX */ | 104 | /* convert modified UTF-7 -> UTF-16 -> UCS-4 -> UTF-8 -> HEX */ |
104 | bitbuf = 0; | 105 | bitbuf = 0; |
105 | bitcount = 0; | 106 | bitcount = 0; |
106 | ucs4 = 0; | 107 | ucs4 = 0; |
107 | while ((c = base64[(unsigned char) src[srcPtr]]) != UNDEFINED) { | 108 | while ((c = base64[(unsigned char) src[srcPtr]]) != UNDEFINED) { |
108 | ++srcPtr; | 109 | ++srcPtr; |
109 | bitbuf = (bitbuf << 6) | c; | 110 | bitbuf = (bitbuf << 6) | c; |
110 | bitcount += 6; | 111 | bitcount += 6; |
111 | /* enough bits for a UTF-16 character? */ | 112 | /* enough bits for a UTF-16 character? */ |
112 | if (bitcount >= 16) { | 113 | if (bitcount >= 16) { |
113 | bitcount -= 16; | 114 | bitcount -= 16; |
114 | utf16 = (bitcount ? bitbuf >> bitcount : bitbuf) & 0xffff; | 115 | utf16 = (bitcount ? bitbuf >> bitcount : bitbuf) & 0xffff; |
115 | /* convert UTF16 to UCS4 */ | 116 | /* convert UTF16 to UCS4 */ |
116 | if (utf16 >= UTF16HIGHSTART && utf16 <= UTF16HIGHEND) { | 117 | if (utf16 >= UTF16HIGHSTART && utf16 <= UTF16HIGHEND) { |
117 | ucs4 = (utf16 - UTF16HIGHSTART) << UTF16SHIFT; | 118 | ucs4 = (utf16 - UTF16HIGHSTART) << UTF16SHIFT; |
118 | continue; | 119 | continue; |
119 | } else if (utf16 >= UTF16LOSTART && utf16 <= UTF16LOEND) { | 120 | } else if (utf16 >= UTF16LOSTART && utf16 <= UTF16LOEND) { |
120 | ucs4 += utf16 - UTF16LOSTART + UTF16BASE; | 121 | ucs4 += utf16 - UTF16LOSTART + UTF16BASE; |
121 | } else { | 122 | } else { |
122 | ucs4 = utf16; | 123 | ucs4 = utf16; |
123 | } | 124 | } |
124 | /* convert UTF-16 range of UCS4 to UTF-8 */ | 125 | /* convert UTF-16 range of UCS4 to UTF-8 */ |
125 | if (ucs4 <= 0x7fUL) { | 126 | if (ucs4 <= 0x7fUL) { |
126 | utf8[0] = ucs4; | 127 | utf8[0] = ucs4; |
127 | i = 1; | 128 | i = 1; |
128 | } else if (ucs4 <= 0x7ffUL) { | 129 | } else if (ucs4 <= 0x7ffUL) { |
129 | utf8[0] = 0xc0 | (ucs4 >> 6); | 130 | utf8[0] = 0xc0 | (ucs4 >> 6); |
130 | utf8[1] = 0x80 | (ucs4 & 0x3f); | 131 | utf8[1] = 0x80 | (ucs4 & 0x3f); |
131 | i = 2; | 132 | i = 2; |
132 | } else if (ucs4 <= 0xffffUL) { | 133 | } else if (ucs4 <= 0xffffUL) { |
133 | utf8[0] = 0xe0 | (ucs4 >> 12); | 134 | utf8[0] = 0xe0 | (ucs4 >> 12); |
134 | utf8[1] = 0x80 | ((ucs4 >> 6) & 0x3f); | 135 | utf8[1] = 0x80 | ((ucs4 >> 6) & 0x3f); |
135 | utf8[2] = 0x80 | (ucs4 & 0x3f); | 136 | utf8[2] = 0x80 | (ucs4 & 0x3f); |
136 | i = 3; | 137 | i = 3; |
137 | } else { | 138 | } else { |
138 | utf8[0] = 0xf0 | (ucs4 >> 18); | 139 | utf8[0] = 0xf0 | (ucs4 >> 18); |
139 | utf8[1] = 0x80 | ((ucs4 >> 12) & 0x3f); | 140 | utf8[1] = 0x80 | ((ucs4 >> 12) & 0x3f); |
140 | utf8[2] = 0x80 | ((ucs4 >> 6) & 0x3f); | 141 | utf8[2] = 0x80 | ((ucs4 >> 6) & 0x3f); |
141 | utf8[3] = 0x80 | (ucs4 & 0x3f); | 142 | utf8[3] = 0x80 | (ucs4 & 0x3f); |
142 | i = 4; | 143 | i = 4; |
143 | } | 144 | } |
144 | /* copy it */ | 145 | /* copy it */ |
145 | for (c = 0; c < i; ++c) { | 146 | for (c = 0; c < i; ++c) { |
146 | dst += utf8[c]; | 147 | dst += utf8[c]; |
147 | } | 148 | } |
148 | } | 149 | } |
149 | } | 150 | } |
diff --git a/kmicromail/libmailwrapper/mailwrapper.h b/kmicromail/libmailwrapper/mailwrapper.h index cefe64e..2ba908b 100644 --- a/kmicromail/libmailwrapper/mailwrapper.h +++ b/kmicromail/libmailwrapper/mailwrapper.h | |||
@@ -27,102 +27,102 @@ public: | |||
27 | protected: | 27 | protected: |
28 | DocLnk doc; | 28 | DocLnk doc; |
29 | int size; | 29 | int size; |
30 | 30 | ||
31 | }; | 31 | }; |
32 | */ | 32 | */ |
33 | 33 | ||
34 | class Attachment | 34 | class Attachment |
35 | { | 35 | { |
36 | public: | 36 | public: |
37 | Attachment( QString lnk ); | 37 | Attachment( QString lnk ); |
38 | virtual ~Attachment(){} | 38 | virtual ~Attachment(){} |
39 | const QString getFileName()const{ return doc; } | 39 | const QString getFileName()const{ return doc; } |
40 | const QString getName()const{ return QFileInfo( doc ).baseName (); } | 40 | const QString getName()const{ return QFileInfo( doc ).baseName (); } |
41 | const QString getMimeType()const{ return QFileInfo( doc ).extension(false); } | 41 | const QString getMimeType()const{ return QFileInfo( doc ).extension(false); } |
42 | const QPixmap getPixmap()const{ return mPix; } | 42 | const QPixmap getPixmap()const{ return mPix; } |
43 | const int getSize()const { return size; } | 43 | const int getSize()const { return size; } |
44 | QString getDocLnk() { return doc; } | 44 | QString getDocLnk() { return doc; } |
45 | 45 | ||
46 | protected: | 46 | protected: |
47 | QPixmap mPix; | 47 | QPixmap mPix; |
48 | QString doc; | 48 | QString doc; |
49 | int size; | 49 | int size; |
50 | 50 | ||
51 | }; | 51 | }; |
52 | 52 | ||
53 | class Mail:public Opie::Core::ORefCount | 53 | class Mail:public Opie::Core::ORefCount |
54 | { | 54 | { |
55 | public: | 55 | public: |
56 | Mail(); | 56 | Mail(); |
57 | /* Possible that this destructor must not be declared virtual | 57 | /* Possible that this destructor must not be declared virtual |
58 | * 'cause it seems that it will never have some child classes. | 58 | * 'cause it seems that it will never have some child classes. |
59 | * in this case this object will not get a virtual table -> memory and | 59 | * in this case this object will not get a virtual table -> memory and |
60 | * speed will be a little bit better? | 60 | * speed will be a little bit better? |
61 | */ | 61 | */ |
62 | virtual ~Mail(){} | 62 | virtual ~Mail(){} |
63 | void addAttachment( Attachment *att ) { attList.append( att ); } | 63 | void addAttachment( Attachment *att ) { attList.append( att ); } |
64 | const QList<Attachment>& getAttachments()const { return attList; } | 64 | const QList<Attachment>& getAttachments()const { return attList; } |
65 | void removeAttachment( Attachment *att ) { attList.remove( att ); } | 65 | void removeAttachment( Attachment *att ) { attList.remove( att ); } |
66 | const QString&getName()const { return name; } | 66 | const QString&getName()const { return name; } |
67 | void setName( QString s ) { name = s; } | 67 | void setName( QString s ) { name = s; } |
68 | const QString&getMail()const{ return mail; } | 68 | const QString&getMail()const{ return mail; } |
69 | void setMail( const QString&s ) { mail = s; } | 69 | void setMail( const QString&s ) { mail = s; } |
70 | const QString&getTo()const{ return to; } | 70 | const QString&getTo()const{ return to; } |
71 | void setTo( const QString&s ) { to = s; } | 71 | void setTo( const QString&s ) { to = s; } |
72 | const QString&getCC()const{ return cc; } | 72 | const QString&getCC()const{ return cc; } |
73 | void setCC( const QString&s ) { cc = s; } | 73 | void setCC( const QString&s ) { cc = s; } |
74 | const QString&getBCC()const { return bcc; } | 74 | const QString&getBCC()const { return bcc; } |
75 | void setBCC( const QString&s ) { bcc = s; } | 75 | void setBCC( const QString&s ) { bcc = s; } |
76 | const QString&getMessage()const { return message; } | 76 | const QString&getMessage()const { return message; } |
77 | void setMessage( const QString&s ) { message = s; } | 77 | void setMessage( const QString&s ) { message = s; } |
78 | const QString&getSubject()const { return subject; } | 78 | const QString&getSubject()const { return subject; } |
79 | void setSubject( const QString&s ) { subject = s; } | 79 | void setSubject( const QString&s ) { subject = s; } |
80 | const QString&getReply()const{ return reply; } | 80 | const QString&getReply()const{ return reply; } |
81 | void setReply( const QString&a ) { reply = a; } | 81 | void setReply( const QString&a ) { reply = a; } |
82 | void setInreply(const QStringList&list){m_in_reply_to = list;} | 82 | void setInreply(const QStringList&list){m_in_reply_to = list;} |
83 | const QStringList&Inreply()const{return m_in_reply_to;} | 83 | const QStringList&Inreply()const{return m_in_reply_to;} |
84 | 84 | ||
85 | private: | 85 | private: |
86 | QList<Attachment> attList; | 86 | QList<Attachment> attList; |
87 | QString name, mail, to, cc, bcc, reply, subject, message; | 87 | QString name, mail, to, cc, bcc, reply, subject, message; |
88 | QStringList m_in_reply_to; | 88 | QStringList m_in_reply_to; |
89 | }; | 89 | }; |
90 | 90 | ||
91 | class Folder:public Opie::Core::ORefCount | 91 | class Folder:public Opie::Core::ORefCount |
92 | { | 92 | { |
93 | public: | 93 | public: |
94 | Folder( const QString&init_name,const QString&sep ); | 94 | Folder( const QString&init_name,const QString&sep ); |
95 | virtual ~Folder(); | 95 | virtual ~Folder(); |
96 | const QString&getDisplayName()const { return nameDisplay; } | 96 | const QString&getDisplayName()const { return nameDisplay; } |
97 | const QString&getName()const { return name; } | 97 | const QString&getName()const { return name; } |
98 | const QString&getPrefix()const{return prefix; } | 98 | const QString&getPrefix()const{return prefix; } |
99 | virtual bool may_select()const{return true;} | 99 | virtual bool may_select()const{return true;} |
100 | virtual bool no_inferior()const{return true;} | 100 | virtual bool no_inferior()const{return true;} |
101 | const QString&Separator()const; | 101 | const QString&Separator()const; |
102 | 102 | ||
103 | protected: | 103 | protected: |
104 | QString nameDisplay, name, separator,prefix; | 104 | QString nameDisplay, name, separator,prefix; |
105 | }; | 105 | }; |
106 | 106 | ||
107 | typedef Opie::Core::OSmartPointer<Folder> FolderP; | 107 | typedef Opie::Core::OSmartPointer<Folder> FolderP; |
108 | 108 | ||
109 | class MHFolder : public Folder | 109 | class MHFolder : public Folder |
110 | { | 110 | { |
111 | public: | 111 | public: |
112 | MHFolder(const QString&disp_name,const QString&mbox); | 112 | MHFolder(const QString&disp_name,const QString&mbox); |
113 | virtual ~MHFolder(); | 113 | virtual ~MHFolder(); |
114 | }; | 114 | }; |
115 | 115 | ||
116 | class IMAPFolder : public Folder | 116 | class IMAPFolder : public Folder |
117 | { | 117 | { |
118 | public: | 118 | public: |
119 | IMAPFolder(const QString&name, const QString&sep, bool select=true,bool noinf=false,const QString&prefix="" ); | 119 | IMAPFolder(const QString&name, const QString&sep, bool select=true,bool noinf=false,const QString&prefix="" ); |
120 | virtual ~IMAPFolder(); | 120 | virtual ~IMAPFolder(); |
121 | virtual bool may_select()const{return m_MaySelect;} | 121 | virtual bool may_select()const{return m_MaySelect;} |
122 | virtual bool no_inferior()const{return m_NoInferior;} | 122 | virtual bool no_inferior()const{return m_NoInferior;} |
123 | private: | ||
124 | static QString decodeFolderName( const QString &name ); | 123 | static QString decodeFolderName( const QString &name ); |
124 | private: | ||
125 | bool m_MaySelect,m_NoInferior; | 125 | bool m_MaySelect,m_NoInferior; |
126 | }; | 126 | }; |
127 | 127 | ||
128 | #endif | 128 | #endif |