-rw-r--r-- | bin/kdepim/WhatsNew.txt | 3 | ||||
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 5 | ||||
-rw-r--r-- | kaddressbook/kabcore.cpp | 2 | ||||
-rw-r--r-- | kmicromail/composemail.cpp | 14 | ||||
-rw-r--r-- | kmicromail/opiemail.cpp | 33 | ||||
-rw-r--r-- | kmicromail/opiemail.h | 5 | ||||
-rw-r--r-- | korganizer/koeventviewer.cpp | 56 | ||||
-rw-r--r-- | korganizer/koeventviewer.h | 3 | ||||
-rw-r--r-- | libkdepim/externalapphandler.cpp | 1 |
9 files changed, 114 insertions, 8 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 8af7da2..e24ee43 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -2,16 +2,19 @@ Info about the changes in new versions of KDE-Pim/Pi | |||
2 | 2 | ||
3 | ********** VERSION 2.0.3 ************ | 3 | ********** VERSION 2.0.3 ************ |
4 | 4 | ||
5 | KO/Pi: | 5 | KO/Pi: |
6 | Added feature for changing alarm settings for many items at once: | 6 | Added feature for changing alarm settings for many items at once: |
7 | Open list view (or search dialog), select the desired items and choose in | 7 | Open list view (or search dialog), select the desired items and choose in |
8 | the popup menu: Set alarm for selected... | 8 | the popup menu: Set alarm for selected... |
9 | 9 | ||
10 | Added to the event/todo viewer the option to send an email to | ||
11 | all attendees or all selected (with RSVP) attendees. | ||
12 | |||
10 | ********** VERSION 2.0.2 ************ | 13 | ********** VERSION 2.0.2 ************ |
11 | 14 | ||
12 | KO/Pi: | 15 | KO/Pi: |
13 | Fixed the layout problem of the day label buttons | 16 | Fixed the layout problem of the day label buttons |
14 | of the agenda view introduced in version 2.0.1. | 17 | of the agenda view introduced in version 2.0.1. |
15 | 18 | ||
16 | Added WhatsThis support for the todo view and the list view. | 19 | Added WhatsThis support for the todo view and the list view. |
17 | 20 | ||
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index 12b70a0..8c3b1e4 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -1206,15 +1206,20 @@ | |||
1206 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, | 1206 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, |
1207 | { "Default todo done color:","Standard Todo erledigt Farbe" }, | 1207 | { "Default todo done color:","Standard Todo erledigt Farbe" }, |
1208 | { "Select week %1-%2","Selektiere Woche %1-%2" }, | 1208 | { "Select week %1-%2","Selektiere Woche %1-%2" }, |
1209 | { "Select Week","Selektiere Woche" }, | 1209 | { "Select Week","Selektiere Woche" }, |
1210 | { "Set alarm for selected...","Setze Alarm für Selekt..." }, | 1210 | { "Set alarm for selected...","Setze Alarm für Selekt..." }, |
1211 | { "Set reminder offset to:","Setze Alarm Offset auf:" }, | 1211 | { "Set reminder offset to:","Setze Alarm Offset auf:" }, |
1212 | { "Set Alarm!","Setze Alarm!" }, | 1212 | { "Set Alarm!","Setze Alarm!" }, |
1213 | { "Canged alarm for %1 items","Alarm für %1 Items geändert" }, | 1213 | { "Canged alarm for %1 items","Alarm für %1 Items geändert" }, |
1214 | { " and "," und " }, | ||
1215 | { "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, | ||
1216 | { "Mail to selected","Mail an Ausgewählte" }, | ||
1217 | { "Mail to all","Mail an Alle" }, | ||
1218 | { "","" }, | ||
1214 | { "","" }, | 1219 | { "","" }, |
1215 | { "","" }, | 1220 | { "","" }, |
1216 | { "","" }, | 1221 | { "","" }, |
1217 | { "","" }, | 1222 | { "","" }, |
1218 | { "","" }, | 1223 | { "","" }, |
1219 | { "","" }, | 1224 | { "","" }, |
1220 | { "","" }, | 1225 | { "","" }, |
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 702eaa3..a8e4de5 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -2492,17 +2492,17 @@ void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QSt | |||
2492 | KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this); | 2492 | KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this); |
2493 | uint i=0; | 2493 | uint i=0; |
2494 | for (i=0; i < list.count(); i++) | 2494 | for (i=0; i < list.count(); i++) |
2495 | { | 2495 | { |
2496 | nameList.append(list[i].realName()); | 2496 | nameList.append(list[i].realName()); |
2497 | emailList.append(list[i].preferredEmail()); | 2497 | emailList.append(list[i].preferredEmail()); |
2498 | uidList.append(list[i].uid()); | 2498 | uidList.append(list[i].uid()); |
2499 | } | 2499 | } |
2500 | 2500 | //qDebug("%s %s ", sourceChannel.latin1(), uid.latin1()); | |
2501 | bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(sourceChannel, uid, nameList, emailList, uidList); | 2501 | bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(sourceChannel, uid, nameList, emailList, uidList); |
2502 | 2502 | ||
2503 | } | 2503 | } |
2504 | 2504 | ||
2505 | /* this method will be called through the QCop interface from Ko/Pi to select birthdays | 2505 | /* this method will be called through the QCop interface from Ko/Pi to select birthdays |
2506 | * to put them into the calendar. | 2506 | * to put them into the calendar. |
2507 | */ | 2507 | */ |
2508 | void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString& uid) | 2508 | void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString& uid) |
diff --git a/kmicromail/composemail.cpp b/kmicromail/composemail.cpp index ed8a2ee..3231b45 100644 --- a/kmicromail/composemail.cpp +++ b/kmicromail/composemail.cpp | |||
@@ -50,18 +50,19 @@ | |||
50 | //using namespace Opie::Core; | 50 | //using namespace Opie::Core; |
51 | //using namespace Opie::Ui; | 51 | //using namespace Opie::Ui; |
52 | ComposeMail::ComposeMail( Settings *sett, QWidget *parent, const char *name, bool modal ) | 52 | ComposeMail::ComposeMail( Settings *sett, QWidget *parent, const char *name, bool modal ) |
53 | : ComposeMailUI( parent, name, modal ) | 53 | : ComposeMailUI( parent, name, modal ) |
54 | { | 54 | { |
55 | 55 | ||
56 | mPickLineEdit = 0; | 56 | mPickLineEdit = 0; |
57 | mEncoding = KOPrefs::instance()->mCurrentCodeName; | 57 | mEncoding = KOPrefs::instance()->mCurrentCodeName; |
58 | connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)), | 58 | //managed from opiemail now |
59 | this, SLOT(insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&))); | 59 | //connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)), |
60 | // this, SLOT(insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&))); | ||
60 | settings = sett; | 61 | settings = sett; |
61 | m_replyid = ""; | 62 | m_replyid = ""; |
62 | if ( KOPrefs::instance()->mUseKapi) { | 63 | if ( KOPrefs::instance()->mUseKapi) { |
63 | KConfig config( locateLocal("config", "kabcrc") ); | 64 | KConfig config( locateLocal("config", "kabcrc") ); |
64 | config.setGroup( "General" ); | 65 | config.setGroup( "General" ); |
65 | QString whoami_uid = config.readEntry( "WhoAmI" ); | 66 | QString whoami_uid = config.readEntry( "WhoAmI" ); |
66 | 67 | ||
67 | if ( whoami_uid.isEmpty() ) { | 68 | if ( whoami_uid.isEmpty() ) { |
@@ -255,16 +256,23 @@ void ComposeMail::pickAddress( ) | |||
255 | #endif | 256 | #endif |
256 | } | 257 | } |
257 | //the map includes name/email pairs, that comes from Ka/Pi | 258 | //the map includes name/email pairs, that comes from Ka/Pi |
258 | void ComposeMail::insertAttendees(const QString& uid,const QStringList& nameList,const QStringList& emailList,const QStringList& uidList) | 259 | void ComposeMail::insertAttendees(const QString& uid,const QStringList& nameList,const QStringList& emailList,const QStringList& uidList) |
259 | { | 260 | { |
260 | //qDebug("ComposeMail::insertAttendees "); | 261 | //qDebug("ComposeMail::insertAttendees "); |
261 | raise(); | 262 | raise(); |
262 | 263 | ||
264 | QString UID = uid; | ||
265 | if ( uid.left( 18 ) == (this->name() +QString("pick2")) ) { | ||
266 | mPickLineEdit = toLine; | ||
267 | UID = this->name(); | ||
268 | subjectLine->setText( uid.mid( 18 ) ); | ||
269 | } | ||
270 | //qDebug("ccc %s %s ", uid.latin1(), this->name()); | ||
263 | if ( mPickLineEdit == 0 ) { //whoami received | 271 | if ( mPickLineEdit == 0 ) { //whoami received |
264 | QString defmail = uidList[0]; | 272 | QString defmail = uidList[0]; |
265 | if ( emailList.count() == 0 ) | 273 | if ( emailList.count() == 0 ) |
266 | QMessageBox::information( 0, i18n( "Hint" ), | 274 | QMessageBox::information( 0, i18n( "Hint" ), |
267 | i18n( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ), | 275 | i18n( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ), |
268 | i18n( "Ok" ) ); | 276 | i18n( "Ok" ) ); |
269 | if (defmail.length()!=0) { | 277 | if (defmail.length()!=0) { |
270 | fromBox->insertItem(defmail); | 278 | fromBox->insertItem(defmail); |
@@ -276,17 +284,17 @@ void ComposeMail::insertAttendees(const QString& uid,const QStringList& nameLis | |||
276 | continue; | 284 | continue; |
277 | fromBox->insertItem((*sit)); | 285 | fromBox->insertItem((*sit)); |
278 | } | 286 | } |
279 | senderNameEdit->setText(nameList[0]); | 287 | senderNameEdit->setText(nameList[0]); |
280 | return; | 288 | return; |
281 | } | 289 | } |
282 | QString names ; | 290 | QString names ; |
283 | QLineEdit *line = mPickLineEdit; | 291 | QLineEdit *line = mPickLineEdit; |
284 | if (uid == this->name()) | 292 | if (UID == this->name()) |
285 | { | 293 | { |
286 | for ( int i = 0; i < nameList.count(); i++) | 294 | for ( int i = 0; i < nameList.count(); i++) |
287 | { | 295 | { |
288 | QString _name = nameList[i]; | 296 | QString _name = nameList[i]; |
289 | QString _email = emailList[i]; | 297 | QString _email = emailList[i]; |
290 | QString _uid = uidList[i]; | 298 | QString _uid = uidList[i]; |
291 | if ( ! _email.isEmpty() ) { | 299 | if ( ! _email.isEmpty() ) { |
292 | if ( ! names.isEmpty() ) | 300 | if ( ! names.isEmpty() ) |
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp index f56711d..e159b73 100644 --- a/kmicromail/opiemail.cpp +++ b/kmicromail/opiemail.cpp | |||
@@ -41,21 +41,23 @@ | |||
41 | #include <libmailwrapper/abstractmail.h> | 41 | #include <libmailwrapper/abstractmail.h> |
42 | #include "koprefs.h" | 42 | #include "koprefs.h" |
43 | 43 | ||
44 | //using namespace Opie::Core; | 44 | //using namespace Opie::Core; |
45 | 45 | ||
46 | OpieMail::OpieMail( QWidget *parent, const char *name ) | 46 | OpieMail::OpieMail( QWidget *parent, const char *name ) |
47 | : MainWindow( parent, name) //, WStyle_ContextHelp ) | 47 | : MainWindow( parent, name) //, WStyle_ContextHelp ) |
48 | { | 48 | { |
49 | mCurrentComposer = 0; | ||
49 | settings = new Settings(); | 50 | settings = new Settings(); |
50 | tb = 0; | 51 | tb = 0; |
51 | setIcon(SmallIcon( "kmicromail" ) ); | 52 | setIcon(SmallIcon( "kmicromail" ) ); |
52 | folderView->populate( settings->getAccounts() ); | 53 | folderView->populate( settings->getAccounts() ); |
53 | 54 | connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)), | |
55 | this, SLOT(insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&))); | ||
54 | } | 56 | } |
55 | 57 | ||
56 | OpieMail::~OpieMail() | 58 | OpieMail::~OpieMail() |
57 | { | 59 | { |
58 | if (settings) delete settings; | 60 | if (settings) delete settings; |
59 | if ( tb ) | 61 | if ( tb ) |
60 | delete tb; | 62 | delete tb; |
61 | } | 63 | } |
@@ -133,17 +135,19 @@ void OpieMail::slotwriteMail2(const QString& namemail ) | |||
133 | compose.setSubject( to.mid(sub+2) ); | 135 | compose.setSubject( to.mid(sub+2) ); |
134 | } else | 136 | } else |
135 | compose.setTo( to ); | 137 | compose.setTo( to ); |
136 | } | 138 | } |
137 | compose.slotAdjustColumns(); | 139 | compose.slotAdjustColumns(); |
138 | #ifndef DESKTOP_VERSION | 140 | #ifndef DESKTOP_VERSION |
139 | compose.showMaximized(); | 141 | compose.showMaximized(); |
140 | #endif | 142 | #endif |
143 | mCurrentComposer = &compose; | ||
141 | compose.exec(); | 144 | compose.exec(); |
145 | mCurrentComposer = 0; | ||
142 | raise(); | 146 | raise(); |
143 | //qDebug("retttich "); | 147 | //qDebug("retttich "); |
144 | } | 148 | } |
145 | void OpieMail::slotwriteMail(const QString&name,const QString&email) | 149 | void OpieMail::slotwriteMail(const QString&name,const QString&email) |
146 | { | 150 | { |
147 | // qDebug("OpieMail::slotwriteMail "); | 151 | // qDebug("OpieMail::slotwriteMail "); |
148 | ComposeMail compose( settings, this, 0, true ); | 152 | ComposeMail compose( settings, this, 0, true ); |
149 | if (!email.isEmpty()) | 153 | if (!email.isEmpty()) |
@@ -156,17 +160,20 @@ void OpieMail::slotwriteMail(const QString&name,const QString&email) | |||
156 | { | 160 | { |
157 | compose.setTo(email); | 161 | compose.setTo(email); |
158 | } | 162 | } |
159 | } | 163 | } |
160 | compose.slotAdjustColumns(); | 164 | compose.slotAdjustColumns(); |
161 | #ifndef DESKTOP_VERSION | 165 | #ifndef DESKTOP_VERSION |
162 | compose.showMaximized(); | 166 | compose.showMaximized(); |
163 | #endif | 167 | #endif |
168 | |||
169 | mCurrentComposer = &compose; | ||
164 | compose.exec(); | 170 | compose.exec(); |
171 | mCurrentComposer = 0; | ||
165 | raise(); | 172 | raise(); |
166 | } | 173 | } |
167 | 174 | ||
168 | void OpieMail::slotComposeMail() | 175 | void OpieMail::slotComposeMail() |
169 | { | 176 | { |
170 | if ( mPendingEmail == QString::null && mPendingName == QString::null) | 177 | if ( mPendingEmail == QString::null && mPendingName == QString::null) |
171 | slotwriteMail2( QString () ); | 178 | slotwriteMail2( QString () ); |
172 | else { | 179 | else { |
@@ -295,20 +302,23 @@ void OpieMail::replyMail() | |||
295 | composer.setTo( mail->getFrom()); | 302 | composer.setTo( mail->getFrom()); |
296 | } else { | 303 | } else { |
297 | composer.setTo( mail->Replyto()); | 304 | composer.setTo( mail->Replyto()); |
298 | } | 305 | } |
299 | composer.setSubject( prefix + mail->getSubject()); | 306 | composer.setSubject( prefix + mail->getSubject()); |
300 | composer.setMessage( rtext ); | 307 | composer.setMessage( rtext ); |
301 | composer.setInReplyTo( mail->Msgid()); | 308 | composer.setInReplyTo( mail->Msgid()); |
302 | composer.setCharset( body->getCharset() ); | 309 | composer.setCharset( body->getCharset() ); |
310 | |||
311 | mCurrentComposer = &composer; | ||
303 | if ( QDialog::Accepted == KApplication::execDialog( &composer ) ) | 312 | if ( QDialog::Accepted == KApplication::execDialog( &composer ) ) |
304 | { | 313 | { |
305 | mail->Wrapper()->answeredMail(mail); | 314 | mail->Wrapper()->answeredMail(mail); |
306 | } | 315 | } |
316 | mCurrentComposer = 0; | ||
307 | delete settings; | 317 | delete settings; |
308 | 318 | ||
309 | } | 319 | } |
310 | void OpieMail::closeViewMail(ViewMail * vm) | 320 | void OpieMail::closeViewMail(ViewMail * vm) |
311 | { | 321 | { |
312 | vm->hide(); | 322 | vm->hide(); |
313 | } | 323 | } |
314 | 324 | ||
@@ -632,10 +642,31 @@ void OpieMail::reEditMail() | |||
632 | ComposeMail compose( settings, this, 0, true ); | 642 | ComposeMail compose( settings, this, 0, true ); |
633 | compose.reEditMail(((MailListViewItem*)mailView->currentItem() )->data()); | 643 | compose.reEditMail(((MailListViewItem*)mailView->currentItem() )->data()); |
634 | compose.slotAdjustColumns(); | 644 | compose.slotAdjustColumns(); |
635 | #ifndef DESKTOP_VERSION | 645 | #ifndef DESKTOP_VERSION |
636 | compose.showMaximized(); | 646 | compose.showMaximized(); |
637 | #else | 647 | #else |
638 | compose.resize(640,480); | 648 | compose.resize(640,480); |
639 | #endif | 649 | #endif |
650 | mCurrentComposer = &compose; | ||
640 | compose.exec(); | 651 | compose.exec(); |
652 | mCurrentComposer = 0; | ||
653 | } | ||
654 | |||
655 | void OpieMail::insertAttendees(const QString& uid,const QStringList& nameList,const QStringList& emailList,const QStringList& uidList) | ||
656 | { | ||
657 | |||
658 | if ( mCurrentComposer ) { | ||
659 | mCurrentComposer->insertAttendees(uid,nameList,emailList,uidList); | ||
660 | } else { | ||
661 | ComposeMail compose( settings, this, 0, true ); | ||
662 | compose.slotAdjustColumns(); | ||
663 | #ifndef DESKTOP_VERSION | ||
664 | compose.showMaximized(); | ||
665 | #endif | ||
666 | mCurrentComposer = &compose; | ||
667 | mCurrentComposer->insertAttendees(uid,nameList,emailList,uidList); | ||
668 | compose.exec(); | ||
669 | mCurrentComposer = 0; | ||
670 | raise(); | ||
671 | } | ||
641 | } | 672 | } |
diff --git a/kmicromail/opiemail.h b/kmicromail/opiemail.h index b8a527f..4f75b3f 100644 --- a/kmicromail/opiemail.h +++ b/kmicromail/opiemail.h | |||
@@ -3,16 +3,19 @@ | |||
3 | #define OPIEMAIL_H | 3 | #define OPIEMAIL_H |
4 | 4 | ||
5 | #include "mainwindow.h" | 5 | #include "mainwindow.h" |
6 | #include <libmailwrapper/settings.h> | 6 | #include <libmailwrapper/settings.h> |
7 | 7 | ||
8 | #include <opie2/osmartpointer.h> | 8 | #include <opie2/osmartpointer.h> |
9 | #include <libmailwrapper/mailtypes.h> | 9 | #include <libmailwrapper/mailtypes.h> |
10 | #include <viewmail.h> | 10 | #include <viewmail.h> |
11 | #include <qstringlist.h> | ||
12 | |||
13 | class ComposeMail; | ||
11 | 14 | ||
12 | class OpieMail : public MainWindow | 15 | class OpieMail : public MainWindow |
13 | { | 16 | { |
14 | Q_OBJECT | 17 | Q_OBJECT |
15 | 18 | ||
16 | public: | 19 | public: |
17 | OpieMail( QWidget *parent = 0, const char *name = 0 ); | 20 | OpieMail( QWidget *parent = 0, const char *name = 0 ); |
18 | virtual ~OpieMail(); | 21 | virtual ~OpieMail(); |
@@ -20,16 +23,17 @@ public: | |||
20 | 23 | ||
21 | public slots: | 24 | public slots: |
22 | virtual void slotwriteMail(const QString&name,const QString&email); | 25 | virtual void slotwriteMail(const QString&name,const QString&email); |
23 | virtual void slotwriteMail2(const QString&nameemail); | 26 | virtual void slotwriteMail2(const QString&nameemail); |
24 | virtual void slotComposeMail(); | 27 | virtual void slotComposeMail(); |
25 | virtual void slotExtAppHandler(); | 28 | virtual void slotExtAppHandler(); |
26 | virtual void appMessage(const QCString &msg, const QByteArray &data); | 29 | virtual void appMessage(const QCString &msg, const QByteArray &data); |
27 | virtual void message(const QCString &msg, const QByteArray &data); | 30 | virtual void message(const QCString &msg, const QByteArray &data); |
31 | void insertAttendees(const QString&, const QStringList& namelist, const QStringList& emaillist, const QStringList& uidlist); | ||
28 | protected slots: | 32 | protected slots: |
29 | virtual void deleteAndDisplayNextMail(ViewMail * vm); | 33 | virtual void deleteAndDisplayNextMail(ViewMail * vm); |
30 | virtual void displayNextMail(ViewMail * vm); | 34 | virtual void displayNextMail(ViewMail * vm); |
31 | virtual void slotSendQueued(); | 35 | virtual void slotSendQueued(); |
32 | virtual void slotSearchMails(); | 36 | virtual void slotSearchMails(); |
33 | virtual void slotEditSettings(); | 37 | virtual void slotEditSettings(); |
34 | virtual void slotEditAccounts(); | 38 | virtual void slotEditAccounts(); |
35 | virtual void displayMail(); | 39 | virtual void displayMail(); |
@@ -43,16 +47,17 @@ protected slots: | |||
43 | virtual void refreshMailView(const QValueList<RecMailP>&); | 47 | virtual void refreshMailView(const QValueList<RecMailP>&); |
44 | virtual void mailLeftClicked( QListViewItem * ); | 48 | virtual void mailLeftClicked( QListViewItem * ); |
45 | virtual void slotMoveCopyMail(); | 49 | virtual void slotMoveCopyMail(); |
46 | virtual void slotMoveCopyAllMail(); | 50 | virtual void slotMoveCopyAllMail(); |
47 | virtual void reEditMail(); | 51 | virtual void reEditMail(); |
48 | void clearSelection(); | 52 | void clearSelection(); |
49 | void slotDownloadMail(); | 53 | void slotDownloadMail(); |
50 | private: | 54 | private: |
55 | ComposeMail* mCurrentComposer; | ||
51 | void closeViewMail(ViewMail * vm); | 56 | void closeViewMail(ViewMail * vm); |
52 | QString mPendingEmail; | 57 | QString mPendingEmail; |
53 | QString mPendingName; | 58 | QString mPendingName; |
54 | QByteArray mPendingData; | 59 | QByteArray mPendingData; |
55 | QCString mPendingMessage; | 60 | QCString mPendingMessage; |
56 | Settings *settings; | 61 | Settings *settings; |
57 | QTextBrowser * tb; | 62 | QTextBrowser * tb; |
58 | 63 | ||
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index 7dc1880..bf41edb 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp | |||
@@ -121,18 +121,26 @@ void KOEventViewer::setSource(const QString& n) | |||
121 | } | 121 | } |
122 | //requestNameEmailUidListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/); | 122 | //requestNameEmailUidListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/); |
123 | // the result should now arrive through method insertAttendees | 123 | // the result should now arrive through method insertAttendees |
124 | //QString uid = "uid:"+(*it).uid(); | 124 | //QString uid = "uid:"+(*it).uid(); |
125 | #endif | 125 | #endif |
126 | if ( n.left(6) == "mailto" ) { | 126 | if ( n.left(6) == "mailto" ) { |
127 | // qDebug("KOEventViewer::setSource %s ", n.mid(7).latin1()); | 127 | // qDebug("KOEventViewer::setSource %s ", n.mid(7).latin1()); |
128 | #ifndef DESKTOP_VERSION | 128 | #ifndef DESKTOP_VERSION |
129 | if ( n.mid(7,3) == "ALL" ) { | ||
130 | qDebug("all "); | ||
131 | mailToAttendees( true ); | ||
132 | } else if ( n.mid(7,4) == "RSVP" ) { | ||
133 | mailToAttendees( false ); | ||
134 | qDebug("rsvp "); | ||
135 | } else { | ||
129 | QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" ); | 136 | QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" ); |
130 | e << n.mid(7); | 137 | e << n.mid(7); |
138 | } | ||
131 | #endif | 139 | #endif |
132 | 140 | ||
133 | } | 141 | } |
134 | 142 | ||
135 | 143 | ||
136 | #ifndef KORG_NODCOP | 144 | #ifndef KORG_NODCOP |
137 | kdDebug() << "KOEventViewer::setSource(): " << n << endl; | 145 | kdDebug() << "KOEventViewer::setSource(): " << n << endl; |
138 | QString tmpStr; | 146 | QString tmpStr; |
@@ -169,17 +177,36 @@ void KOEventViewer::setSource(const QString& n) | |||
169 | KRun::runCommand(tmpStr,"KAddressBook",iconPath); | 177 | KRun::runCommand(tmpStr,"KAddressBook",iconPath); |
170 | return; | 178 | return; |
171 | } | 179 | } |
172 | } else { | 180 | } else { |
173 | //QTextBrowser::setSource(n); | 181 | //QTextBrowser::setSource(n); |
174 | } | 182 | } |
175 | #endif | 183 | #endif |
176 | } | 184 | } |
185 | void KOEventViewer::mailToAttendees( bool all ) | ||
186 | { | ||
187 | QPtrList<Attendee> attendees = mCurrentIncidence->attendees(); | ||
188 | if (attendees.count() == 0) return; | ||
189 | QStringList nameList; | ||
190 | QStringList emailList; | ||
191 | QStringList uidList; | ||
192 | Attendee* a; | ||
193 | for(a=attendees.first();a;a=attendees.next()) { | ||
194 | if ( !all && !a->RSVP() ) continue; | ||
195 | if (!a->email().isEmpty()) { | ||
196 | nameList.append (a->name() ); | ||
197 | emailList.append (a->email() ); | ||
198 | uidList.append (a->uid() ); | ||
199 | } | ||
200 | } | ||
201 | QString uid = "ComposeMailUIpick2"+mMailSubject; | ||
202 | bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI("QPE/Application/ompi", uid, nameList, emailList, uidList); | ||
177 | 203 | ||
204 | } | ||
178 | void KOEventViewer::addTag(const QString & tag,const QString & text) | 205 | void KOEventViewer::addTag(const QString & tag,const QString & text) |
179 | { | 206 | { |
180 | int number=text.contains("\n"); | 207 | int number=text.contains("\n"); |
181 | QString str = "<" + tag + ">"; | 208 | QString str = "<" + tag + ">"; |
182 | QString tmpText=text; | 209 | QString tmpText=text; |
183 | QString tmpStr=str; | 210 | QString tmpStr=str; |
184 | if(number !=-1) | 211 | if(number !=-1) |
185 | { | 212 | { |
@@ -457,16 +484,19 @@ void KOEventViewer::formatAttendees(Incidence *event) | |||
457 | mText += "<IMG src=\"" + iconPath + "\">"; | 484 | mText += "<IMG src=\"" + iconPath + "\">"; |
458 | mText += "</a>\n"; | 485 | mText += "</a>\n"; |
459 | } | 486 | } |
460 | mText.append("</li></ul>"); | 487 | mText.append("</li></ul>"); |
461 | 488 | ||
462 | addTag("h3",i18n("Attendees")); | 489 | addTag("h3",i18n("Attendees")); |
463 | Attendee *a; | 490 | Attendee *a; |
464 | mText.append("<ul>"); | 491 | mText.append("<ul>"); |
492 | int a_count = 0; | ||
493 | int a_count_nr = 0; | ||
494 | |||
465 | for(a=attendees.first();a;a=attendees.next()) { | 495 | for(a=attendees.first();a;a=attendees.next()) { |
466 | #ifndef KORG_NOKABC | 496 | #ifndef KORG_NOKABC |
467 | #ifdef DESKTOP_VERSION | 497 | #ifdef DESKTOP_VERSION |
468 | if (a->name().isEmpty()) { | 498 | if (a->name().isEmpty()) { |
469 | addressList = add_book->findByEmail(a->email()); | 499 | addressList = add_book->findByEmail(a->email()); |
470 | KABC::Addressee o = addressList.first(); | 500 | KABC::Addressee o = addressList.first(); |
471 | if (!o.isEmpty() && addressList.size()<2) { | 501 | if (!o.isEmpty() && addressList.size()<2) { |
472 | mText += "<a href=\"uid:" + o.uid() + "\">"; | 502 | mText += "<a href=\"uid:" + o.uid() + "\">"; |
@@ -496,29 +526,51 @@ void KOEventViewer::formatAttendees(Incidence *event) | |||
496 | else mText += a->email(); | 526 | else mText += a->email(); |
497 | mText += "</a>\n"; | 527 | mText += "</a>\n"; |
498 | #endif | 528 | #endif |
499 | 529 | ||
500 | 530 | ||
501 | if (!a->email().isEmpty()) { | 531 | if (!a->email().isEmpty()) { |
502 | if (iconPath) { | 532 | if (iconPath) { |
503 | mText += "<a href=\"mailto:" + a->name() +" <" + a->email() + ">:" + mMailSubject + "\">"; | 533 | mText += "<a href=\"mailto:" + a->name() +" <" + a->email() + ">:" + mMailSubject + "\">"; |
504 | if ( a->RSVP() ) | 534 | if ( a->RSVP() ) { |
535 | ++a_count; | ||
505 | mText += "<IMG src=\"" + iconPath + "\">"; | 536 | mText += "<IMG src=\"" + iconPath + "\">"; |
506 | else | 537 | } |
538 | else { | ||
539 | ++a_count_nr; | ||
507 | mText += "<IMG src=\"" + NOiconPath + "\">"; | 540 | mText += "<IMG src=\"" + NOiconPath + "\">"; |
541 | } | ||
508 | mText += "</a>\n"; | 542 | mText += "</a>\n"; |
509 | } | 543 | } |
510 | } | 544 | } |
511 | if (a->status() != Attendee::NeedsAction ) | 545 | if (a->status() != Attendee::NeedsAction ) |
512 | mText +="[" + a->statusStr() + "] "; | 546 | mText +="[" + a->statusStr() + "] "; |
513 | if (a->role() == Attendee::Chair ) | 547 | if (a->role() == Attendee::Chair ) |
514 | mText +="(" + a->roleStr().left(1) + ".)"; | 548 | mText +="(" + a->roleStr().left(1) + ".)"; |
515 | } | 549 | } |
516 | mText.append("</li></ul>"); | 550 | mText.append("</li></ul>"); |
551 | if ( a_count > 1 ) { | ||
552 | mText += "<a href=\"mailto:ALL\">"; | ||
553 | mText += i18n( "Mail to all" ); | ||
554 | mText += "</a> ( "; | ||
555 | mText += "<IMG src=\"" + iconPath + "\">"; | ||
556 | mText += i18n( " and " ); | ||
557 | mText += "<IMG src=\"" + NOiconPath + "\"> )"; | ||
558 | mText += "<br>\n"; | ||
559 | |||
560 | |||
561 | } | ||
562 | if ( a_count_nr > 1 ) { | ||
563 | mText += "<a href=\"mailto:RSVP\">"; | ||
564 | mText += i18n( "Mail to selected" ); | ||
565 | mText += "</a> ( "; | ||
566 | mText += i18n( "<IMG src=\"%1\"> only )").arg ( iconPath ); | ||
567 | mText += "\n"; | ||
568 | } | ||
517 | } | 569 | } |
518 | 570 | ||
519 | } | 571 | } |
520 | void KOEventViewer::appendJournal(Journal *jour, int mode ) | 572 | void KOEventViewer::appendJournal(Journal *jour, int mode ) |
521 | { | 573 | { |
522 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; | 574 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; |
523 | if (mode == 0 ) { | 575 | if (mode == 0 ) { |
524 | addTag("h2",i18n("Journal from: ")); | 576 | addTag("h2",i18n("Journal from: ")); |
diff --git a/korganizer/koeventviewer.h b/korganizer/koeventviewer.h index 0cd3f33..cf44284 100644 --- a/korganizer/koeventviewer.h +++ b/korganizer/koeventviewer.h | |||
@@ -46,29 +46,30 @@ class KOEventViewer : public QTextBrowser { | |||
46 | void appendTodo(Todo *event, int mode = 0 ); | 46 | void appendTodo(Todo *event, int mode = 0 ); |
47 | void appendJournal(Journal *jour, int mode = 0 ); | 47 | void appendJournal(Journal *jour, int mode = 0 ); |
48 | 48 | ||
49 | void clearEvents(bool now=false); | 49 | void clearEvents(bool now=false); |
50 | 50 | ||
51 | void addText(QString text); | 51 | void addText(QString text); |
52 | void setSyncMode( bool ); | 52 | void setSyncMode( bool ); |
53 | void setColorMode( int ); | 53 | void setColorMode( int ); |
54 | void mailToAttendees( bool all ); | ||
54 | 55 | ||
55 | protected: | 56 | protected: |
56 | int mColorMode; | 57 | int mColorMode; |
57 | void addTag(const QString & tag,const QString & text); | 58 | void addTag(const QString & tag,const QString & text); |
58 | 59 | ||
59 | void formatCategories(Incidence *event); | 60 | void formatCategories(Incidence *event); |
60 | void formatAttendees(Incidence *event); | 61 | void formatAttendees(Incidence *event); |
61 | void formatReadOnly(Incidence *event); | 62 | void formatReadOnly(Incidence *event); |
62 | 63 | ||
63 | private: | 64 | private: |
64 | QTextBrowser *mEventTextView; | 65 | QTextBrowser *mEventTextView; |
65 | bool mSyncMode; | 66 | bool mSyncMode; |
66 | 67 | ||
67 | QString mText; | 68 | QString mText; |
68 | QString mMailSubject; | 69 | QString mMailSubject; |
69 | Incidence* mCurrentIncidence; | 70 | Incidence* mCurrentIncidence; |
70 | signals: | 71 | signals: |
71 | void launchaddressbook(QString uid); | 72 | void launchaddressbook(QString uid); |
72 | }; | 73 | }; |
73 | 74 | ||
74 | #endif | 75 | #endif |
diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp index 3079141..7200da9 100644 --- a/libkdepim/externalapphandler.cpp +++ b/libkdepim/externalapphandler.cpp | |||
@@ -1126,16 +1126,17 @@ void ExternalAppHandler::passParameters(QCopEnvelope* e, const QString& paramete | |||
1126 | /************************************************************************** | 1126 | /************************************************************************** |
1127 | * | 1127 | * |
1128 | **************************************************************************/ | 1128 | **************************************************************************/ |
1129 | 1129 | ||
1130 | void ExternalAppHandler::appMessage( const QCString& cmsg, const QByteArray& data ) | 1130 | void ExternalAppHandler::appMessage( const QCString& cmsg, const QByteArray& data ) |
1131 | { | 1131 | { |
1132 | 1132 | ||
1133 | if ( cmsg == "nextView()" ) { | 1133 | if ( cmsg == "nextView()" ) { |
1134 | qDebug("nextView()"); | ||
1134 | emit nextView(); | 1135 | emit nextView(); |
1135 | return; | 1136 | return; |
1136 | } | 1137 | } |
1137 | 1138 | ||
1138 | bool res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data ); | 1139 | bool res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data ); |
1139 | if (!res) | 1140 | if (!res) |
1140 | res = mBirthdayListFromKAPITransfer->appMessage( cmsg, data ); | 1141 | res = mBirthdayListFromKAPITransfer->appMessage( cmsg, data ); |
1141 | 1142 | ||