summaryrefslogtreecommitdiffabout
path: root/korganizer/koeventviewer.cpp
Unidiff
Diffstat (limited to 'korganizer/koeventviewer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeventviewer.cpp24
1 files changed, 16 insertions, 8 deletions
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index 976ee2c..02b54da 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -12,99 +12,99 @@
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18*/ 18*/
19 19
20#include <qcstring.h> 20#include <qcstring.h>
21#include <qwhatsthis.h> 21#include <qwhatsthis.h>
22#include <qdialog.h> 22#include <qdialog.h>
23#include <qapplication.h> 23#include <qapplication.h>
24#include <qlabel.h> 24#include <qlabel.h>
25#include <qlayout.h> 25#include <qlayout.h>
26 26
27#include <klocale.h> 27#include <klocale.h>
28#include <kapplication.h> 28#include <kapplication.h>
29#include <libkcal/event.h> 29#include <libkcal/event.h>
30#include <libkcal/todo.h> 30#include <libkcal/todo.h>
31#include <kdebug.h> 31#include <kdebug.h>
32#include <kiconloader.h> 32#include <kiconloader.h>
33#include <krun.h> 33#include <krun.h>
34#include <kglobal.h> 34#include <kglobal.h>
35#include <kprocess.h> 35#include <kprocess.h>
36#include "koprefs.h" 36#include "koprefs.h"
37 37
38#include <kabc/stdaddressbook.h> 38#include <kabc/stdaddressbook.h>
39 39
40#ifndef KORG_NODCOP 40#ifndef KORG_NODCOP
41#include <dcopclient.h> 41#include <dcopclient.h>
42#include "korganizer.h" 42#include "korganizer.h"
43#include "koprefs.h" 43#include "koprefs.h"
44#include "actionmanager.h" 44#include "actionmanager.h"
45#endif 45#endif
46 46
47#include "koeventviewer.h" 47#include "koeventviewer.h"
48//#ifndef KORG_NOKABC 48//#ifndef KORG_NOKABC
49//#include <kabc/stdaddressbook.h> 49//#include <kabc/stdaddressbook.h>
50//#define size count 50//#define size count
51//#endif 51//#endif
52 52
53#ifdef DESKTOP_VERSION 53#ifdef DESKTOP_VERSION
54#include <kabc/addresseedialog.h> 54#include <kabc/addresseedialog.h>
55#include <kabc/addresseeview.h> 55#include <kabc/addresseeview.h>
56#include <qprinter.h> 56#include <qprinter.h>
57#include <qpainter.h> 57#include <qpainter.h>
58#include <qpaintdevicemetrics.h> 58#include <qpaintdevicemetrics.h>
59#else //DESKTOP_VERSION 59#else //DESKTOP_VERSION
60#include <externalapphandler.h>
61#include <qtopia/qcopenvelope_qws.h> 60#include <qtopia/qcopenvelope_qws.h>
62#endif //DESKTOP_VERSION 61#endif //DESKTOP_VERSION
62#include <externalapphandler.h>
63 63
64KOEventViewer::KOEventViewer(QWidget *parent,const char *name) 64KOEventViewer::KOEventViewer(QWidget *parent,const char *name)
65 : QTextBrowser(parent,name) 65 : QTextBrowser(parent,name)
66{ 66{
67 mSyncMode = false; 67 mSyncMode = false;
68 mColorMode = 0; 68 mColorMode = 0;
69} 69}
70 70
71KOEventViewer::~KOEventViewer() 71KOEventViewer::~KOEventViewer()
72{ 72{
73} 73}
74 74
75void KOEventViewer::printMe() 75void KOEventViewer::printMe()
76{ 76{
77#ifdef DESKTOP_VERSION 77#ifdef DESKTOP_VERSION
78 78
79 KOPrintPrefs pp ( this ); 79 KOPrintPrefs pp ( this );
80 if (!pp.exec() ) 80 if (!pp.exec() )
81 return; 81 return;
82 int scaleval = pp.printMode() ; 82 int scaleval = pp.printMode() ;
83 83
84 QPrinter printer; 84 QPrinter printer;
85 if (!printer.setup() ) 85 if (!printer.setup() )
86 return; 86 return;
87 QPainter p; 87 QPainter p;
88 p.begin ( &printer ); 88 p.begin ( &printer );
89 QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); 89 QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer );
90 float dx, dy; 90 float dx, dy;
91 int wid = (m.width() * 9)/10; 91 int wid = (m.width() * 9)/10;
92 dx = (float) wid/(float)contentsWidth (); 92 dx = (float) wid/(float)contentsWidth ();
93 dy = (float)(m.height()) / (float)contentsHeight (); 93 dy = (float)(m.height()) / (float)contentsHeight ();
94 float scale; 94 float scale;
95 // scale to fit the width or height of the paper 95 // scale to fit the width or height of the paper
96 if ( dx < dy ) 96 if ( dx < dy )
97 scale = dx; 97 scale = dx;
98 else 98 else
99 scale = dy; 99 scale = dy;
100 100
101 p.translate( m.width()/10,0 ); 101 p.translate( m.width()/10,0 );
102 if ( scaleval == 2 || scaleval == 1 && scale < 1.0 ) { 102 if ( scaleval == 2 || scaleval == 1 && scale < 1.0 ) {
103 p.scale( scale, scale ); 103 p.scale( scale, scale );
104 } 104 }
105 drawContents ( &p, 0,0, contentsWidth (), contentsHeight () ); 105 drawContents ( &p, 0,0, contentsWidth (), contentsHeight () );
106 p.end(); 106 p.end();
107#endif 107#endif
108 108
109} 109}
110void KOEventViewer::setSource(const QString& n) 110void KOEventViewer::setSource(const QString& n)
@@ -128,170 +128,178 @@ void KOEventViewer::setSource(const QString& n)
128 for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { 128 for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) {
129 // LR I do not understand, why the uid string is different on zaurus and desktop 129 // LR I do not understand, why the uid string is different on zaurus and desktop
130 QString uid = "uid://"+(*it).uid(); 130 QString uid = "uid://"+(*it).uid();
131 131
132 //qDebug("for *%s* +%s+ ", n.latin1(), uid.latin1()); 132 //qDebug("for *%s* +%s+ ", n.latin1(), uid.latin1());
133 if (n == uid ) { 133 if (n == uid ) {
134 //qDebug("found %s ",(*it).mobileHomePhone().latin1() ); 134 //qDebug("found %s ",(*it).mobileHomePhone().latin1() );
135 QDialog dia( this,"dia123", true ); 135 QDialog dia( this,"dia123", true );
136 dia.setCaption( i18n("Details of attendee") ); 136 dia.setCaption( i18n("Details of attendee") );
137 QVBoxLayout lay ( &dia ); 137 QVBoxLayout lay ( &dia );
138 KABC::AddresseeView av ( &dia ); 138 KABC::AddresseeView av ( &dia );
139 av.setAddressee( (*it) ); 139 av.setAddressee( (*it) );
140 lay.addWidget( &av ); 140 lay.addWidget( &av );
141 if ( QApplication::desktop()->width() < 480 ) 141 if ( QApplication::desktop()->width() < 480 )
142 dia.resize( 220, 240); 142 dia.resize( 220, 240);
143 else { 143 else {
144 dia.resize( 400,400); 144 dia.resize( 400,400);
145 } 145 }
146 dia.exec(); 146 dia.exec();
147 break; 147 break;
148 } 148 }
149 } 149 }
150 return; 150 return;
151 } 151 }
152#else 152#else
153 { 153 {
154 if ( "uid:organizer" == n ) { 154 if ( "uid:organizer" == n ) {
155 ExternalAppHandler::instance()->requestDetailsFromKAPI("", mCurrentIncidence->organizer(),""); 155 ExternalAppHandler::instance()->requestDetailsFromKAPI("", mCurrentIncidence->organizer(),"");
156 return; 156 return;
157 } 157 }
158 QPtrList<Attendee> attendees = mCurrentIncidence->attendees(); 158 QPtrList<Attendee> attendees = mCurrentIncidence->attendees();
159 if (attendees.count()) { 159 if (attendees.count()) {
160 Attendee *a; 160 Attendee *a;
161 for(a=attendees.first();a;a=attendees.next()) { 161 for(a=attendees.first();a;a=attendees.next()) {
162 if ( "uid:"+a->uid() == n ) { 162 if ( "uid:"+a->uid() == n ) {
163 bool res = ExternalAppHandler::instance()->requestDetailsFromKAPI(a->name(), a->email(), a->uid()); 163 bool res = ExternalAppHandler::instance()->requestDetailsFromKAPI(a->name(), a->email(), a->uid());
164 return; 164 return;
165 } 165 }
166 } 166 }
167 } 167 }
168 return; 168 return;
169 } 169 }
170 //requestNameEmailUidListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/); 170 //requestNameEmailUidListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/);
171 // the result should now arrive through method insertAttendees 171 // the result should now arrive through method insertAttendees
172 //QString uid = "uid:"+(*it).uid(); 172 //QString uid = "uid:"+(*it).uid();
173#endif 173#endif
174 if ( n.left(6) == "mailto" ) { 174 if ( n.left(6) == "mailto" ) {
175 // qDebug("KOEventViewer::setSource %s ", n.mid(7).latin1()); 175 // qDebug("KOEventViewer::setSource %s ", n.mid(7).latin1());
176#ifndef DESKTOP_VERSION 176 //#ifndef DESKTOP_VERSION
177 if ( n.mid(7,3) == "ALL" ) { 177 if ( n.mid(7,3) == "ALL" ) {
178 mailToAttendees( true ); 178 mailToAttendees( true );
179 } else if ( n.mid(7,4) == "RSVP" ) { 179 } else if ( n.mid(7,4) == "RSVP" ) {
180 mailToAttendees( false ); 180 mailToAttendees( false );
181 } else { 181 } else {
182 QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" ); 182 ExternalAppHandler::instance()->mailToOneContact( n.mid(7) );
183 e << n.mid(7); 183 //QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" );
184 //e << n.mid(7);
184 } 185 }
185#endif 186 //#endif
186 187
187 } 188 }
188 189
189 190
190#ifndef KORG_NODCOP 191#ifndef KORG_NODCOP
191 kdDebug() << "KOEventViewer::setSource(): " << n << endl; 192 kdDebug() << "KOEventViewer::setSource(): " << n << endl;
192 QString tmpStr; 193 QString tmpStr;
193 if (n.startsWith("mailto:")) { 194 if (n.startsWith("mailto:")) {
194 KApplication::kApplication()->invokeMailer(n.mid(7),QString::null); 195 KApplication::kApplication()->invokeMailer(n.mid(7),QString::null);
195 //emit showIncidence(n); 196 //emit showIncidence(n);
196 return; 197 return;
197 } else if (n.startsWith("uid:")) { 198 } else if (n.startsWith("uid:")) {
198 DCOPClient *client = KApplication::kApplication()->dcopClient(); 199 DCOPClient *client = KApplication::kApplication()->dcopClient();
199 const QByteArray noParamData; 200 const QByteArray noParamData;
200 const QByteArray paramData; 201 const QByteArray paramData;
201 QByteArray replyData; 202 QByteArray replyData;
202 QCString replyTypeStr; 203 QCString replyTypeStr;
203#define PING_ABBROWSER (client->call("kaddressbook", "KAddressBookIface", "interfaces()", noParamData, replyTypeStr, replyData)) 204#define PING_ABBROWSER (client->call("kaddressbook", "KAddressBookIface", "interfaces()", noParamData, replyTypeStr, replyData))
204 bool foundAbbrowser = PING_ABBROWSER; 205 bool foundAbbrowser = PING_ABBROWSER;
205 206
206 if (foundAbbrowser) { 207 if (foundAbbrowser) {
207 //KAddressbook is already running, so just DCOP to it to bring up the contact editor 208 //KAddressbook is already running, so just DCOP to it to bring up the contact editor
208 //client->send("kaddressbook","KAddressBookIface", 209 //client->send("kaddressbook","KAddressBookIface",
209 QDataStream arg(paramData, IO_WriteOnly); 210 QDataStream arg(paramData, IO_WriteOnly);
210 arg << n.mid(6); 211 arg << n.mid(6);
211 client->send("kaddressbook", "KAddressBookIface", "showContactEditor( QString )", paramData); 212 client->send("kaddressbook", "KAddressBookIface", "showContactEditor( QString )", paramData);
212 return; 213 return;
213 } else { 214 } else {
214 /* 215 /*
215 KaddressBook is not already running. Pass it the UID of the contact via the command line while starting it - its neater. 216 KaddressBook is not already running. Pass it the UID of the contact via the command line while starting it - its neater.
216 We start it without its main interface 217 We start it without its main interface
217 */ 218 */
218 KIconLoader* iconLoader = new KIconLoader(); 219 KIconLoader* iconLoader = new KIconLoader();
219 QString iconPath = iconLoader->iconPath("go",KIcon::Small); 220 QString iconPath = iconLoader->iconPath("go",KIcon::Small);
220 ActionManager::setStartedKAddressBook(true); 221 ActionManager::setStartedKAddressBook(true);
221 tmpStr = "kaddressbook --editor-only --uid "; 222 tmpStr = "kaddressbook --editor-only --uid ";
222 tmpStr += KProcess::quote(n.mid(6)); 223 tmpStr += KProcess::quote(n.mid(6));
223 KRun::runCommand(tmpStr,"KAddressBook",iconPath); 224 KRun::runCommand(tmpStr,"KAddressBook",iconPath);
224 return; 225 return;
225 } 226 }
226 } else { 227 } else {
227 //QTextBrowser::setSource(n); 228 //QTextBrowser::setSource(n);
228 } 229 }
229#endif 230#endif
230} 231}
231void KOEventViewer::mailToAttendees( bool all ) 232void KOEventViewer::mailToAttendees( bool all )
232{ 233{
233 QPtrList<Attendee> attendees = mCurrentIncidence->attendees(); 234 QPtrList<Attendee> attendees = mCurrentIncidence->attendees();
234 if (attendees.count() == 0) return; 235 if (attendees.count() == 0) return;
235 QStringList nameList; 236 QStringList nameList;
236 QStringList emailList; 237 QStringList emailList;
237 QStringList uidList; 238 QStringList uidList;
238 Attendee* a; 239 Attendee* a;
239 for(a=attendees.first();a;a=attendees.next()) { 240 for(a=attendees.first();a;a=attendees.next()) {
240 if ( !all && !a->RSVP() ) continue; 241 if ( !all && !a->RSVP() ) continue;
241 if (!a->email().isEmpty()) { 242 if (!a->email().isEmpty()) {
242 nameList.append (a->name() ); 243#ifndef DESKTOP_VERSION
244 nameList.append (a->realName() );
243 emailList.append (a->email() ); 245 emailList.append (a->email() );
244 uidList.append (a->uid() ); 246 uidList.append (a->uid() );
247#else
248 emailList.append(a->realName() +" <" + a->email() +">");
249#endif
245 } 250 }
246 } 251 }
247 QString uid = "ComposeMailUIpick2"+mMailSubject;
248#ifndef DESKTOP_VERSION 252#ifndef DESKTOP_VERSION
253 QString uid = "ComposeMailUIpick2"+mMailSubject;
249 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI("QPE/Application/ompi", uid, nameList, emailList, uidList); 254 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI("QPE/Application/ompi", uid, nameList, emailList, uidList);
255
256#else
257 ExternalAppHandler::instance()->mailToMultipleContacts( emailList.join(","), mMailSubject );
250#endif 258#endif
251 259
252} 260}
253void KOEventViewer::addTag(const QString & tag,const QString & text) 261void KOEventViewer::addTag(const QString & tag,const QString & text)
254{ 262{
255 int number=text.contains("\n"); 263 int number=text.contains("\n");
256 QString str = "<" + tag + ">"; 264 QString str = "<" + tag + ">";
257 QString tmpText=text; 265 QString tmpText=text;
258 QString tmpStr=str; 266 QString tmpStr=str;
259 if(number !=-1) 267 if(number !=-1)
260 { 268 {
261 if (number > 0) { 269 if (number > 0) {
262 int pos=0; 270 int pos=0;
263 QString tmp; 271 QString tmp;
264 for(int i=0;i<=number;i++) { 272 for(int i=0;i<=number;i++) {
265 pos=tmpText.find("\n"); 273 pos=tmpText.find("\n");
266 tmp=tmpText.left(pos); 274 tmp=tmpText.left(pos);
267 tmpText=tmpText.right(tmpText.length()-pos-1); 275 tmpText=tmpText.right(tmpText.length()-pos-1);
268 tmpStr+=tmp+"<br>"; 276 tmpStr+=tmp+"<br>";
269 } 277 }
270 } 278 }
271 else tmpStr += tmpText; 279 else tmpStr += tmpText;
272 tmpStr+="</" + tag + ">"; 280 tmpStr+="</" + tag + ">";
273 mText.append(tmpStr); 281 mText.append(tmpStr);
274 } 282 }
275 else 283 else
276 { 284 {
277 str += text + "</" + tag + ">"; 285 str += text + "</" + tag + ">";
278 mText.append(str); 286 mText.append(str);
279 } 287 }
280} 288}
281 289
282void KOEventViewer::setColorMode( int m ) 290void KOEventViewer::setColorMode( int m )
283{ 291{
284 mColorMode = m; 292 mColorMode = m;
285} 293}
286void KOEventViewer::appendEvent(Event *event, int mode ) 294void KOEventViewer::appendEvent(Event *event, int mode )
287{ 295{
288 mMailSubject = ""; 296 mMailSubject = "";
289 mCurrentIncidence = event; 297 mCurrentIncidence = event;
290 bool shortDate = KOPrefs::instance()->mShortDateInViewer; 298 bool shortDate = KOPrefs::instance()->mShortDateInViewer;
291 bool wideScreen = ( QApplication::desktop()->width() >= 640 ); 299 bool wideScreen = ( QApplication::desktop()->width() >= 640 );
292 topLevelWidget()->setCaption(i18n("Event Viewer")); 300 topLevelWidget()->setCaption(i18n("Event Viewer"));
293 if ( mode == 0 ) { 301 if ( mode == 0 ) {
294 addTag("h2",deTag(event->summary())); 302 addTag("h2",deTag(event->summary()));
295 formatReadOnly(event); 303 formatReadOnly(event);
296 } 304 }
297 else { 305 else {
@@ -625,97 +633,97 @@ void KOEventViewer::formatAttendees(Incidence *event)
625 mText += "</a>\n"; 633 mText += "</a>\n";
626 } 634 }
627 mText.append("</li></ul>"); 635 mText.append("</li></ul>");
628 636
629 addTag("h3",i18n("Attendees")); 637 addTag("h3",i18n("Attendees"));
630 Attendee *a; 638 Attendee *a;
631 mText.append("<ul>"); 639 mText.append("<ul>");
632 int a_count = 0; 640 int a_count = 0;
633 int a_count_nr = 0; 641 int a_count_nr = 0;
634 642
635 for(a=attendees.first();a;a=attendees.next()) { 643 for(a=attendees.first();a;a=attendees.next()) {
636#ifndef KORG_NOKABC 644#ifndef KORG_NOKABC
637#ifdef DESKTOP_VERSION 645#ifdef DESKTOP_VERSION
638 if (a->name().isEmpty()) { 646 if (a->name().isEmpty()) {
639 addressList = add_book->findByEmail(a->email()); 647 addressList = add_book->findByEmail(a->email());
640 KABC::Addressee o = addressList.first(); 648 KABC::Addressee o = addressList.first();
641 if (!o.isEmpty() && addressList.size()<2) { 649 if (!o.isEmpty() && addressList.size()<2) {
642 mText += "<a href=\"uid:" + o.uid() + "\">"; 650 mText += "<a href=\"uid:" + o.uid() + "\">";
643 mText += o.formattedName(); 651 mText += o.formattedName();
644 mText += "</a>\n"; 652 mText += "</a>\n";
645 } else { 653 } else {
646 mText += "<li>"; 654 mText += "<li>";
647 mText.append(a->email()); 655 mText.append(a->email());
648 mText += "\n"; 656 mText += "\n";
649 } 657 }
650 } else { 658 } else {
651 mText += "<li><a href=\"uid:" + a->uid() + "\">"; 659 mText += "<li><a href=\"uid:" + a->uid() + "\">";
652 if (!a->name().isEmpty()) mText += a->name(); 660 if (!a->name().isEmpty()) mText += a->name();
653 else mText += a->email(); 661 else mText += a->email();
654 mText += "</a>\n"; 662 mText += "</a>\n";
655 } 663 }
656#else //DESKTOP_VERSION 664#else //DESKTOP_VERSION
657 mText += "<li><a href=\"uid:" + a->uid() + "\">"; 665 mText += "<li><a href=\"uid:" + a->uid() + "\">";
658 if (!a->name().isEmpty()) mText += a->name(); 666 if (!a->name().isEmpty()) mText += a->name();
659 else mText += a->email(); 667 else mText += a->email();
660 mText += "</a>\n"; 668 mText += "</a>\n";
661#endif //DESKTOP_VERSION 669#endif //DESKTOP_VERSION
662#else 670#else
663 //qDebug("nokabc "); 671 //qDebug("nokabc ");
664 mText += "<li><a href=\"uid:" + a->uid() + "\">"; 672 mText += "<li><a href=\"uid:" + a->uid() + "\">";
665 if (!a->name().isEmpty()) mText += a->name(); 673 if (!a->name().isEmpty()) mText += a->name();
666 else mText += a->email(); 674 else mText += a->email();
667 mText += "</a>\n"; 675 mText += "</a>\n";
668#endif 676#endif
669 677
670 678
671 if (!a->email().isEmpty()) { 679 if (!a->email().isEmpty()) {
672 if (iconPath) { 680 if (iconPath) {
673 mText += "<a href=\"mailto:" + a->name() +" <" + a->email() + ">:" + mMailSubject + "\">"; 681 mText += "<a href=\"mailto:" + a->realName() +" <" + a->email() + ">:" + mMailSubject + "\">";
674 if ( a->RSVP() ) { 682 if ( a->RSVP() ) {
675 ++a_count_nr; 683 ++a_count_nr;
676 mText += "<IMG src=\"" + iconPath + "\">"; 684 mText += "<IMG src=\"" + iconPath + "\">";
677 } 685 }
678 else { 686 else {
679 ++a_count; 687 ++a_count;
680 mText += "<IMG src=\"" + NOiconPath + "\">"; 688 mText += "<IMG src=\"" + NOiconPath + "\">";
681 } 689 }
682 mText += "</a>\n"; 690 mText += "</a>\n";
683 } 691 }
684 } 692 }
685 if (a->status() != Attendee::NeedsAction ) 693 if (a->status() != Attendee::NeedsAction )
686 mText +="[" + a->statusStr() + "] "; 694 mText +="[" + a->statusStr() + "] ";
687 if (a->role() == Attendee::Chair ) 695 if (a->role() == Attendee::Chair )
688 mText +="(" + a->roleStr().left(1) + ".)"; 696 mText +="(" + a->roleStr().left(1) + ".)";
689 } 697 }
690 mText.append("</li></ul>"); 698 mText.append("</li></ul>");
691 if ( (a_count+a_count_nr) > 1 ) { 699 if ( (a_count+a_count_nr) > 1 ) {
692 mText += "<a href=\"mailto:ALL\">"; 700 mText += "<a href=\"mailto:ALL\">";
693 mText += i18n( "Mail to all" ); 701 mText += i18n( "Mail to all" );
694 mText += "</a> ( "; 702 mText += "</a> ( ";
695 mText += "<IMG src=\"" + iconPath + "\">"; 703 mText += "<IMG src=\"" + iconPath + "\">";
696 mText += i18n( " and " ); 704 mText += i18n( " and " );
697 mText += "<IMG src=\"" + NOiconPath + "\"> )"; 705 mText += "<IMG src=\"" + NOiconPath + "\"> )";
698 mText += "<br>\n"; 706 mText += "<br>\n";
699 707
700 708
701 } 709 }
702 if ( a_count_nr > 1 ) { 710 if ( a_count_nr > 1 ) {
703 mText += "<a href=\"mailto:RSVP\">"; 711 mText += "<a href=\"mailto:RSVP\">";
704 mText += i18n( "Mail to selected" ); 712 mText += i18n( "Mail to selected" );
705 mText += "</a> ( "; 713 mText += "</a> ( ";
706 mText += i18n( "<IMG src=\"%1\"> only )").arg ( iconPath ); 714 mText += i18n( "<IMG src=\"%1\"> only )").arg ( iconPath );
707 mText += "<br>\n"; 715 mText += "<br>\n";
708 } 716 }
709 } 717 }
710 718
711} 719}
712void KOEventViewer::appendJournal(Journal *jour, int mode ) 720void KOEventViewer::appendJournal(Journal *jour, int mode )
713{ 721{
714 bool shortDate = KOPrefs::instance()->mShortDateInViewer; 722 bool shortDate = KOPrefs::instance()->mShortDateInViewer;
715 QString text_d = i18n("Journal from: "); 723 QString text_d = i18n("Journal from: ");
716 if ( !jour->summary().isEmpty() ) 724 if ( !jour->summary().isEmpty() )
717 text_d = jour->summary(); 725 text_d = jour->summary();
718 if (mode == 0 ) { 726 if (mode == 0 ) {
719 addTag("h2", text_d ); 727 addTag("h2", text_d );
720 } 728 }
721 else { 729 else {