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
@@ -30,187 +30,190 @@ SUBDIRS_QTOPIA_PLUGIN = \
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) \
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 5cd9649..6538295 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -592,97 +592,97 @@ void KABCore::beamVCard()
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}
diff --git a/kalarmd/simplealarmdaemonimpl.cpp b/kalarmd/simplealarmdaemonimpl.cpp
index 18e4299..4ff6861 100644
--- a/kalarmd/simplealarmdaemonimpl.cpp
+++ b/kalarmd/simplealarmdaemonimpl.cpp
@@ -515,93 +515,93 @@ void SimpleAlarmDaemonImpl::confTimer( int time )
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
@@ -156,97 +156,97 @@ void ComposeMail::saveAsDraft()
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{
diff --git a/kmicromail/main.cpp b/kmicromail/main.cpp
index a3e1b86..65de770 100644
--- a/kmicromail/main.cpp
+++ b/kmicromail/main.cpp
@@ -2,60 +2,60 @@
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,130 +1,133 @@
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()