summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-09-08 02:02:15 (UTC)
committer zautrix <zautrix>2004-09-08 02:02:15 (UTC)
commite5f6ea343bc2b129f81fde3734b100cfa2ed6c83 (patch) (unidiff)
tree8d33b16e52b1d886cf524052418e8dd445689a66
parent199025628054eef739a261437a51a98f5218ab0f (diff)
downloadkdepimpi-e5f6ea343bc2b129f81fde3734b100cfa2ed6c83.zip
kdepimpi-e5f6ea343bc2b129f81fde3734b100cfa2ed6c83.tar.gz
kdepimpi-e5f6ea343bc2b129f81fde3734b100cfa2ed6c83.tar.bz2
Some fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--Makefile13
-rw-r--r--kaddressbook/kabcore.cpp2
-rw-r--r--kalarmd/simplealarmdaemonimpl.cpp2
-rw-r--r--kdepim.control2
-rw-r--r--kmicrokdelibs.control2
-rw-r--r--kmicromail/composemail.cpp2
-rw-r--r--kmicromail/main.cpp2
-rw-r--r--kmicromail/opiemail.cpp11
8 files changed, 21 insertions, 15 deletions
diff --git a/Makefile b/Makefile
index 41976f3..2d0e855 100644
--- a/Makefile
+++ b/Makefile
@@ -1,264 +1,267 @@
1export KDEPIMDIR = $(shell pwd) 1export KDEPIMDIR = $(shell pwd)
2 2
3 3
4ifeq ($(PLATFORM) , zaurus) 4ifeq ($(PLATFORM) , zaurus)
5 BUILD_NO_LDAP_PLUGIN=1 5 BUILD_NO_LDAP_PLUGIN=1
6endif 6endif
7 7
8ifneq ($(PLATFORM) , zaurus) 8ifneq ($(PLATFORM) , zaurus)
9 BUILD_NO_SHARP_PLUGIN=1 9 BUILD_NO_SHARP_PLUGIN=1
10endif 10endif
11 11
12SUBDIRS_MICROKDE = \ 12SUBDIRS_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
27SUBDIRS_QTOPIA_PLUGIN = \ 27SUBDIRS_QTOPIA_PLUGIN = \
28 kabc/plugins/qtopia 28 kabc/plugins/qtopia
29 29
30SUBDIRS_OPIE_PLUGIN = \ 30SUBDIRS_OPIE_PLUGIN = \
31 kabc/plugins/opie 31 kabc/plugins/opie
32 32
33SUBDIRS_SHARP_PLUGIN = \ 33SUBDIRS_SHARP_PLUGIN = \
34 kabc/plugins/sharpdtm 34 kabc/plugins/sharpdtm
35 35
36SUBDIRS_LDAP_PLUGIN = \ 36SUBDIRS_LDAP_PLUGIN = \
37 kabc/plugins/ldap 37 kabc/plugins/ldap
38 38
39SUBDIRS_MICROMAIL = \ 39SUBDIRS_MICROMAIL = \
40 kmicromail/libetpan \ 40 kmicromail/libetpan \
41 kmicromail/libmailwrapper \ 41 kmicromail/libmailwrapper \
42 kmicromail 42 kmicromail
43 43
44SUBDIRS_GAMMU = \ 44SUBDIRS_GAMMU = \
45 gammu/emb/common \ 45 gammu/emb/common \
46 gammu/emb/gammu 46 gammu/emb/gammu
47 47
48SUBDIRS = \ 48SUBDIRS = \
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
57all: build_microkde \ 57all: 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
66build_microkde: variable_test tmake 66build_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
71build_qtopia_plugin: build_microkde 71build_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
76build_opie_plugin: build_microkde 76build_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
85build_sharp_plugin: build_microkde 85build_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
94build_ldap_plugin: build_microkde 94build_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
104build_micromail: build_microkde 104build_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
113build_gammu: variable_test tmake 113build_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
123variable_info: 123variable_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
142variable_test: variable_info 142variable_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
172objects: 175objects:
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
177clean: 180clean:
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
182install: 185install:
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
190dist: 193dist:
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
207tmake: objects \ 210tmake: 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
234qtcompat/Makefile$(PLATFORM): qtcompat/qtcompat.pro 237qtcompat/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
237microkde/Makefile$(PLATFORM): microkde/microkdeE.pro 240microkde/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
240libkcal/Makefile$(PLATFORM): libkcal/libkcalE.pro 243libkcal/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
244libkdepim/Makefile$(PLATFORM): libkdepim/libkdepimE.pro 247libkdepim/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
247kalarmd/Makefile$(PLATFORM): kalarmd/kalarmdE.pro 250kalarmd/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
250korganizer/Makefile$(PLATFORM): korganizer/korganizerE.pro 253korganizer/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
253libical/src/libical/Makefile$(PLATFORM): libical/src/libical/libicalE.pro 256libical/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
256libical/src/libicalss/Makefile$(PLATFORM): libical/src/libicalss/libicalssE.pro 259libical/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
259kabc/Makefile$(PLATFORM): kabc/kabcE.pro 262kabc/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
262kabc/formats/binary/Makefile$(PLATFORM): kabc/formats/binary/kabcformat_binaryE.pro 265kabc/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
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 5cd9649..6538295 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -544,193 +544,193 @@ void KABCore::mailVCard( const QStringList& uids )
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*/
571void KABCore::beamMySelf() 571void 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
587void KABCore::beamVCard() 587void 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
595void KABCore::beamVCard(const QStringList& uids) 595void 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
683void KABCore::beamDone( Ir *ir ) 683void 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
691void KABCore::browse( const QString& url ) 691void 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
700void KABCore::selectAllContacts() 700void KABCore::selectAllContacts()
701{ 701{
702 mViewManager->setSelected( QString::null, true ); 702 mViewManager->setSelected( QString::null, true );
703} 703}
704 704
705void KABCore::deleteContacts() 705void KABCore::deleteContacts()
706{ 706{
707 QStringList uidList = mViewManager->selectedUids(); 707 QStringList uidList = mViewManager->selectedUids();
708 deleteContacts( uidList ); 708 deleteContacts( uidList );
709} 709}
710 710
711void KABCore::deleteContacts( const QStringList &uids ) 711void 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
724void KABCore::copyContacts() 724void 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
736void KABCore::cutContacts() 736void KABCore::cutContacts()
diff --git a/kalarmd/simplealarmdaemonimpl.cpp b/kalarmd/simplealarmdaemonimpl.cpp
index 18e4299..4ff6861 100644
--- a/kalarmd/simplealarmdaemonimpl.cpp
+++ b/kalarmd/simplealarmdaemonimpl.cpp
@@ -467,141 +467,141 @@ void SimpleAlarmDaemonImpl::confTimer( int time )
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
543void SimpleAlarmDaemonImpl::writeFile() 543void SimpleAlarmDaemonImpl::writeFile()
544{ 544{
545 QCopEnvelope e("QPE/Application/kopi", "-writeFile"); 545 QCopEnvelope e("QPE/Application/kopi", "-writeFile");
546} 546}
547void SimpleAlarmDaemonImpl::showWN() 547void SimpleAlarmDaemonImpl::showWN()
548{ 548{
549 QCopEnvelope e("QPE/Application/kopi", "-showWN"); 549 QCopEnvelope e("QPE/Application/kopi", "-showWN");
550} 550}
551void SimpleAlarmDaemonImpl::newTodo() 551void SimpleAlarmDaemonImpl::newTodo()
552{ 552{
553 QCopEnvelope e("QPE/Application/kopi", "-newTodo"); 553 QCopEnvelope e("QPE/Application/kopi", "-newTodo");
554} 554}
555 555
556void SimpleAlarmDaemonImpl::newEvent() 556void SimpleAlarmDaemonImpl::newEvent()
557{ 557{
558 QCopEnvelope e("QPE/Application/kopi", "-newEvent"); 558 QCopEnvelope e("QPE/Application/kopi", "-newEvent");
559 559
560} 560}
561void SimpleAlarmDaemonImpl::newMail() 561void SimpleAlarmDaemonImpl::newMail()
562{ 562{
563 QCopEnvelope e("QPE/Application/kmpi", "newMail()"); 563 QCopEnvelope e("QPE/Application/ompi", "newMail()");
564} 564}
565void SimpleAlarmDaemonImpl::showAdd() 565void SimpleAlarmDaemonImpl::showAdd()
566{ 566{
567 QCopEnvelope e("QPE/Application/kapi", " "); 567 QCopEnvelope e("QPE/Application/kapi", " ");
568} 568}
569void SimpleAlarmDaemonImpl::ringSync() 569void SimpleAlarmDaemonImpl::ringSync()
570{ 570{
571 QCopEnvelope e("QPE/Application/kopi", "-ringSync"); 571 QCopEnvelope e("QPE/Application/kopi", "-ringSync");
572 572
573} 573}
574void SimpleAlarmDaemonImpl::newCountdown() 574void SimpleAlarmDaemonImpl::newCountdown()
575{ 575{
576 //recieve("cal_alarm", 10 ); 576 //recieve("cal_alarm", 10 );
577} 577}
578void SimpleAlarmDaemonImpl::simulate() 578void 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}
585void SimpleAlarmDaemonImpl::showKO() 585void SimpleAlarmDaemonImpl::showKO()
586{ 586{
587 QCopEnvelope e("QPE/Application/kopi", "-showKO"); 587 QCopEnvelope e("QPE/Application/kopi", "-showKO");
588 588
589} 589}
590void SimpleAlarmDaemonImpl::showTodo() 590void SimpleAlarmDaemonImpl::showTodo()
591{ 591{
592 QCopEnvelope e("QPE/Application/kopi", "-showTodo"); 592 QCopEnvelope e("QPE/Application/kopi", "-showTodo");
593 593
594} 594}
595void SimpleAlarmDaemonImpl::writeJournal() 595void SimpleAlarmDaemonImpl::writeJournal()
596{ 596{
597 QCopEnvelope e("QPE/Application/kopi", "-showJournal"); 597 QCopEnvelope e("QPE/Application/kopi", "-showJournal");
598 598
599} 599}
600 600
601void SimpleAlarmDaemonImpl::mousePressEvent( QMouseEvent * ) 601void 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 @@
1Files: bin/kopi bin/db2file bin/kapi apps/Pim/korganizer.desktop apps/Pim/kaddressbook.desktop pics/kdepim/* lib/libmicro* 1Files: bin/kopi bin/db2file bin/kapi apps/Pim/korganizer.desktop apps/Pim/kaddressbook.desktop pics/kdepim/* lib/libmicro*
2 2
3Priority: optional 3Priority: optional
4Section: qpe/pim 4Section: qpe/pim
5Maintainer: Lutz Rogowski <lutz@pi-sync.net> 5Maintainer: Lutz Rogowski <lutz@pi-sync.net>
6Architecture: arm 6Architecture: arm
7Version: 1.9.2a 7Version: 1.9.4
8License: GPL 8License: GPL
9Depends: 9Depends:
10Description: KOrganizer/Pi and Kaddressbook/Pi 10Description: 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 @@
1Files: bin/db2file lib/libmicro* 1Files: bin/db2file lib/libmicro* pics/kdepim/LICENCE.TXT
2 2
3Priority: optional 3Priority: optional
4Section: qpe/pim 4Section: qpe/pim
5Maintainer: Lutz Rogowski <lutz@pi-sync.net> 5Maintainer: Lutz Rogowski <lutz@pi-sync.net>
6Architecture: arm 6Architecture: arm
7Version: 1.9.4 7Version: 1.9.4
8License: GPL 8License: GPL
9Depends: 9Depends:
10Description: KOrganizer/Pi and Kaddressbook/Pi 10Description: 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
@@ -108,193 +108,193 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m
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
119void ComposeMail::saveAsDraft() 119void 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}
156void ComposeMail::clearStatus() 156void ComposeMail::clearStatus()
157{ 157{
158 topLevelWidget()->setCaption( tr("Compose mail") ); 158 topLevelWidget()->setCaption( tr("Compose mail") );
159} 159}
160void ComposeMail::setStatus( QString status ) 160void 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}
165void ComposeMail::pickAddress( ) 165void 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
198void ComposeMail::insertAttendees(const QString& uid,const QStringList& nameList,const QStringList& emailList,const QStringList& uidList) 198void 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
246void ComposeMail::setTo( const QString & to ) 246void ComposeMail::setTo( const QString & to )
247{ 247{
248 toLine->setText( to ); 248 toLine->setText( to );
249} 249}
250 250
251void ComposeMail::setSubject( const QString & subject ) 251void ComposeMail::setSubject( const QString & subject )
252{ 252{
253 subjectLine->setText( subject ); 253 subjectLine->setText( subject );
254} 254}
255 255
256void ComposeMail::setInReplyTo( const QString & messageId ) 256void ComposeMail::setInReplyTo( const QString & messageId )
257{ 257{
258 m_replyid = messageId; 258 m_replyid = messageId;
259} 259}
260 260
261void ComposeMail::setMessage( const QString & text ) 261void ComposeMail::setMessage( const QString & text )
262{ 262{
263 message->setText( text ); 263 message->setText( text );
264} 264}
265 265
266 266
267void ComposeMail::pickAddressTo() 267void ComposeMail::pickAddressTo()
268{ 268{
269 mPickLineEdit = toLine; 269 mPickLineEdit = toLine;
270 pickAddress( ); 270 pickAddress( );
271} 271}
272 272
273void ComposeMail::pickAddressCC() 273void ComposeMail::pickAddressCC()
274{ 274{
275 mPickLineEdit = ccLine; 275 mPickLineEdit = ccLine;
276 pickAddress( ); 276 pickAddress( );
277} 277}
278 278
279void ComposeMail::pickAddressBCC() 279void ComposeMail::pickAddressBCC()
280{ 280{
281 mPickLineEdit = bccLine; 281 mPickLineEdit = bccLine;
282 pickAddress( ); 282 pickAddress( );
283} 283}
284 284
285void ComposeMail::pickAddressReply() 285void ComposeMail::pickAddressReply()
286{ 286{
287 mPickLineEdit = replyLine; 287 mPickLineEdit = replyLine;
288 pickAddress( ); 288 pickAddress( );
289} 289}
290 290
291void ComposeMail::fillValues( int ) 291void 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() ) {
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
22using namespace Opie::Core; 22using namespace Opie::Core;
23int main( int argc, char **argv ) { 23int 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,178 +1,181 @@
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
25using namespace Opie::Core; 26using namespace Opie::Core;
26 27
27OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags ) 28OpieMail::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
36OpieMail::~OpieMail() 37OpieMail::~OpieMail()
37{ 38{
38 if (settings) delete settings; 39 if (settings) delete settings;
39} 40}
40 41
41void OpieMail::appMessage(const QCString &msg, const QByteArray &data) 42void OpieMail::appMessage(const QCString &msg, const QByteArray &data)
42{ 43{
43 44
44} 45}
45#include <stdlib.h> 46#include <stdlib.h>
46void OpieMail::message(const QCString &msg, const QByteArray &data) 47void 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}
84void OpieMail::slotwriteMail2(const QString& namemail ) 87void 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}
110void OpieMail::slotwriteMail(const QString&name,const QString&email) 113void 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
130void OpieMail::slotComposeMail() 133void OpieMail::slotComposeMail()
131{ 134{
132 slotwriteMail2( QString () ); 135 slotwriteMail2( QString () );
133 //slotwriteMail(0l,0l); 136 //slotwriteMail(0l,0l);
134} 137}
135 138
136void OpieMail::slotSendQueued() 139void 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 }