summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt1
-rw-r--r--korganizer/koeventviewer.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 2032420..06d630a 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,134 +1,135 @@
1Info about the changes in new versions of KDE-Pim/Pi 1Info about the changes in new versions of KDE-Pim/Pi
2 2
3********** VERSION 2.1.17 ************ 3********** VERSION 2.1.17 ************
4 4
5KO/Pi: 5KO/Pi:
6Added option to display times in What's Next View on two lines. 6Added option to display times in What's Next View on two lines.
7(Useful for display on the Zaurus with 240x320 screen)
7Removed "Allday" for allday events of one day duration in What's Next View. 8Removed "Allday" for allday events of one day duration in What's Next View.
8Added date range for allday events of more than one day duration in What's Next View. 9Added date range for allday events of more than one day duration in What's Next View.
9 10
10********** VERSION 2.1.16 ************ 11********** VERSION 2.1.16 ************
11 12
12Fixed a problem with the menu bar in KO/Pi and using the "Menu" hardware key on the Zaurus. 13Fixed a problem with the menu bar in KO/Pi and using the "Menu" hardware key on the Zaurus.
13Added columns for datetime in todo view: Last modified, created and last modified subtodo 14Added columns for datetime in todo view: Last modified, created and last modified subtodo
14Fixed a bug in agenda view displaying recurring multiday events which are longer than two days. 15Fixed a bug in agenda view displaying recurring multiday events which are longer than two days.
15Made conflict detection up to 4 times faster. 16Made conflict detection up to 4 times faster.
16 17
17********** VERSION 2.1.15 ************ 18********** VERSION 2.1.15 ************
18 19
19Fixed two layout problems on the Z: 20Fixed two layout problems on the Z:
20Made the with of the newly added buttons on the Quick-Todo smaller. 21Made the with of the newly added buttons on the Quick-Todo smaller.
21Made listweek layout in 2 columns on the Z760 in portait screen and full menubar visible. 22Made listweek layout in 2 columns on the Z760 in portait screen and full menubar visible.
22 23
23 24
24********** VERSION 2.1.14 ************ 25********** VERSION 2.1.14 ************
25 26
26Added some buttons to the KO/Pi Quick-todo line to make it possible to quickly access some todo view layout settings like display all flat/open/close and hide/show running/done. 27Added some buttons to the KO/Pi Quick-todo line to make it possible to quickly access some todo view layout settings like display all flat/open/close and hide/show running/done.
27Added a button to add a subtodo quickly. 28Added a button to add a subtodo quickly.
28 29
29Added a possibility to search for conflicting events. (In the Action menu. Keyboard shortcut "q", shift+q or ctrl +q ). 30Added a possibility to search for conflicting events. (In the Action menu. Keyboard shortcut "q", shift+q or ctrl +q ).
30Added an option to change the layout of the list week to column mode. 31Added an option to change the layout of the list week to column mode.
31 32
32Fixed some usability problems in pi-sync mode by adding some progress information about file transfer. 33Fixed some usability problems in pi-sync mode by adding some progress information about file transfer.
33 34
34Fixed pi-sync problems with the new multi calendar feature. 35Fixed pi-sync problems with the new multi calendar feature.
35Now pi-sync behaviour should be: 36Now pi-sync behaviour should be:
361) Local sends file request ( as usual ) 371) Local sends file request ( as usual )
372) Remote sends file which contains data of all enabled ( the calendar where the "eye" column is checked ) calendars. 382) Remote sends file which contains data of all enabled ( the calendar where the "eye" column is checked ) calendars.
383) Local syncs with data, adds new entries to default calendar and sends file back ( as usual ). 393) Local syncs with data, adds new entries to default calendar and sends file back ( as usual ).
39 If the data which local receives contains entries which are on disabled calendars on local this entries are updated and not added as duplicates to the default calendar. 40 If the data which local receives contains entries which are on disabled calendars on local this entries are updated and not added as duplicates to the default calendar.
404) Remote updates the data and adds new entries to default calendar. Readonly entries are not changed on remote. 414) Remote updates the data and adds new entries to default calendar. Readonly entries are not changed on remote.
41 If the data which remote receives contains entries which are on disabled calendars on remote this entries are updated and not added as duplicates to the default calendar. 42 If the data which remote receives contains entries which are on disabled calendars on remote this entries are updated and not added as duplicates to the default calendar.
42 43
43Summary: 44Summary:
44No new item ( new created after the last sync ) in a disabled calendar is propagated to the sync partner. Readonly items are synced and added/changed on the sync partner if it is not readonly on the sync partner. 45No new item ( new created after the last sync ) in a disabled calendar is propagated to the sync partner. Readonly items are synced and added/changed on the sync partner if it is not readonly on the sync partner.
45If you have different calendars on remote and local and some of them disabled you may get some "strange" bahaviour. 46If you have different calendars on remote and local and some of them disabled you may get some "strange" bahaviour.
46Well, the syncing has become quite complicated ... you should have no problems if you enable all calendars. 47Well, the syncing has become quite complicated ... you should have no problems if you enable all calendars.
47 48
48********** VERSION 2.1.13 ************ 49********** VERSION 2.1.13 ************
49 50
50Fixed a problem in KA/Pi search. 51Fixed a problem in KA/Pi search.
51Fixed some minor problems in KO/Pi. 52Fixed some minor problems in KO/Pi.
52Added calendar selection possibility to the todo view popup and to the event/todo/journal editor. 53Added calendar selection possibility to the todo view popup and to the event/todo/journal editor.
53 54
54Fixed memory usage problems in KA/Pi: 55Fixed memory usage problems in KA/Pi:
55When loading data KA/Pi did load the file data twice. 56When loading data KA/Pi did load the file data twice.
56Example: 57Example:
57 A 600k file did consume 1200k memory during loading process. 58 A 600k file did consume 1200k memory during loading process.
58 This is fixed, it does now consume only 600k during loading process. 59 This is fixed, it does now consume only 600k during loading process.
59When saving data KA/Pi did consume a lot of memory for the data parsing during the save process. 60When saving data KA/Pi did consume a lot of memory for the data parsing during the save process.
60This is fixed. 61This is fixed.
61Example: 62Example:
62 Before saving a 600k file KA/Pi did consume 21.7 Meg of Ram. 63 Before saving a 600k file KA/Pi did consume 21.7 Meg of Ram.
63 When saving KA/Pi did consume 28.6 Meg of Ram. That causes a crash on the Zaurus because there was no memeory left in the system. 64 When saving KA/Pi did consume 28.6 Meg of Ram. That causes a crash on the Zaurus because there was no memeory left in the system.
64 Now KA/Pi is consuming on saving the same data 22.0 Meg of Ram during the save process. 65 Now KA/Pi is consuming on saving the same data 22.0 Meg of Ram during the save process.
65Note: The memory usage of KA/Pi after the data is loaded/saved has not changed. 66Note: The memory usage of KA/Pi after the data is loaded/saved has not changed.
66The saving of data may be a bit slower now. 67The saving of data may be a bit slower now.
67 68
68Fixed memory usage problems in KO/Pi: 69Fixed memory usage problems in KO/Pi:
69When KO/Pi did save the data to file, it did not release the used buffers after saving. 70When KO/Pi did save the data to file, it did not release the used buffers after saving.
70The used buffer was released after saving the next time, but there was new buffer space allocated again on that save operation. 71The used buffer was released after saving the next time, but there was new buffer space allocated again on that save operation.
71This is fixed. 72This is fixed.
72Example: 73Example:
73 When saving a 400k file KO/Pi do now use 400k less memory now. 74 When saving a 400k file KO/Pi do now use 400k less memory now.
74 75
75Optimized memory usage in KO/Pi Agenda view: 76Optimized memory usage in KO/Pi Agenda view:
76KO/Pi is storing some paint information in extra buffers for faster repainting of the agenda view. 77KO/Pi is storing some paint information in extra buffers for faster repainting of the agenda view.
77These buffers were not made smaller (i.e. downsized) because of performance reasons. 78These buffers were not made smaller (i.e. downsized) because of performance reasons.
78The handling of these buffers are now much smarter: 79The handling of these buffers are now much smarter:
79Two (of six) buffers are removed completely. 80Two (of six) buffers are removed completely.
80The remaing four buffers are now downsized after not using the agenda view for 45 seconds. 81The remaing four buffers are now downsized after not using the agenda view for 45 seconds.
81Such that the memory usage of KO/Pi is smaller now in general ( because 2 buffers are removed) and is much smaller when not using the agenda view. That is very important when using fastload for KO/Pi. 82Such that the memory usage of KO/Pi is smaller now in general ( because 2 buffers are removed) and is much smaller when not using the agenda view. That is very important when using fastload for KO/Pi.
82 83
83Worst case example ( for a maximum size agenda content): 84Worst case example ( for a maximum size agenda content):
84 When resizing the agenda content to a large scale, KO/Pi did use 17Meg of mem ( and did not use less memory until it was stopped). Now KO/Pi is using on the same operation only 14.3 Meg of mem and after 45 seconds not using the agenda view it uses only 9.4 Meg of mem. 85 When resizing the agenda content to a large scale, KO/Pi did use 17Meg of mem ( and did not use less memory until it was stopped). Now KO/Pi is using on the same operation only 14.3 Meg of mem and after 45 seconds not using the agenda view it uses only 9.4 Meg of mem.
85 86
86When switching to an unused Agenda view now KO/Pi is upizing the buffers again. This takes less than a second. Such that switching to Agenda view (after not using it for more than 45 seconds) is now a bit slower. 87When switching to an unused Agenda view now KO/Pi is upizing the buffers again. This takes less than a second. Such that switching to Agenda view (after not using it for more than 45 seconds) is now a bit slower.
87 88
88Summary: 89Summary:
89Many memory wasting problems of KA/Pi and KO/Pi fixed such that it is better to use on the Zaurus. 90Many memory wasting problems of KA/Pi and KO/Pi fixed such that it is better to use on the Zaurus.
90 91
91********** VERSION 2.1.12 ************ 92********** VERSION 2.1.12 ************
92 93
93KO/Pi: 94KO/Pi:
94Many small usability fixes, e.g. rearranged the popup menus such that they are better to use on the Zaurus. 95Many small usability fixes, e.g. rearranged the popup menus such that they are better to use on the Zaurus.
95Fixed a problem with the month view when file was saved but KO/Pi was not the active window. 96Fixed a problem with the month view when file was saved but KO/Pi was not the active window.
96Fixed some problems in the resource config dialog (e.g. added a warning if you set all calendars to read-only). 97Fixed some problems in the resource config dialog (e.g. added a warning if you set all calendars to read-only).
97Fixed some other small problems. 98Fixed some other small problems.
98 99
99********** VERSION 2.1.11 ************ 100********** VERSION 2.1.11 ************
100 101
101KO/Pi: 102KO/Pi:
102Because we can have many calendars now in KO/Pi we can have more than one journal entry per day. 103Because we can have many calendars now in KO/Pi we can have more than one journal entry per day.
103Added features to handle (and add ) more than one journal entry per day. 104Added features to handle (and add ) more than one journal entry per day.
104Added option for a journal title. 105Added option for a journal title.
105 106
106Added info about the calendar, the item belongs to, to the event/todo/journal viewer. 107Added info about the calendar, the item belongs to, to the event/todo/journal viewer.
107Fixed a problem of the alarm of completed recurring todos. 108Fixed a problem of the alarm of completed recurring todos.
108Added to the event/todo editor to set quickly the category of an item. 109Added to the event/todo editor to set quickly the category of an item.
109 110
110 111
111Fixed some problems when calling KO/Pi or KA/Pi from the alarm applet. 112Fixed some problems when calling KO/Pi or KA/Pi from the alarm applet.
112 113
113Added KA/Pi multi sync to the multi sync called from the alarm applet. 114Added KA/Pi multi sync to the multi sync called from the alarm applet.
114 115
115********** VERSION 2.1.10 ************ 116********** VERSION 2.1.10 ************
116 117
117KO/Pi: 118KO/Pi:
118Importing Birthdays will now create another file resource "Birthdays" and import the birthday data from KA/Pi into that file. 119Importing Birthdays will now create another file resource "Birthdays" and import the birthday data from KA/Pi into that file.
119When a multidayevent is selected in monthview all occurences of this event in the monthview are now hightlighted. 120When a multidayevent is selected in monthview all occurences of this event in the monthview are now hightlighted.
120Fixed a bug in searching for a small timerange, i.e. one day. 121Fixed a bug in searching for a small timerange, i.e. one day.
121 122
122KA/Pi: 123KA/Pi:
123Fixed two problems in csv export. 124Fixed two problems in csv export.
124Fixed problems when calling the contact selection dialog from KO/Pi or OM/Pi. 125Fixed problems when calling the contact selection dialog from KO/Pi or OM/Pi.
125 126
126********** VERSION 2.1.9 ************ 127********** VERSION 2.1.9 ************
127 128
128KO/Pi: 129KO/Pi:
129Fixed some problems of the new search options in the search dialog. 130Fixed some problems of the new search options in the search dialog.
130Fixed some problems in the new resource config options. 131Fixed some problems in the new resource config options.
131Changed the recurrence edit of events and todos such that the recurrence edit page now is notified about a change of the start date on the first page. 132Changed the recurrence edit of events and todos such that the recurrence edit page now is notified about a change of the start date on the first page.
132Fixed a problem creating new events in the agenda view if at the day/time is already an agenda item shown: 133Fixed a problem creating new events in the agenda view if at the day/time is already an agenda item shown:
133Now you can click on the bottom/top of an allday agenda item or on the left/right side of an agenda item to get the "new todo/new event" popup. 134Now you can click on the bottom/top of an allday agenda item or on the left/right side of an agenda item to get the "new todo/new event" popup.
134 135
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index 2d0bfff..a690ab1 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -1,246 +1,246 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
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> 60#include <externalapphandler.h>
61#include <qtopia/qcopenvelope_qws.h> 61#include <qtopia/qcopenvelope_qws.h>
62#endif //DESKTOP_VERSION 62#endif //DESKTOP_VERSION
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)
111{ 111{
112 112
113 if ( n.left(8) == "todo_uid" ) { 113 if ( n.left(8) == "todo_uid" ) {
114 int midstr = 9; 114 int midstr = 9;
115#ifdef DESKTOP_VERSION 115#ifdef DESKTOP_VERSION
116 midstr = 11; 116 midstr = 11;
117#endif 117#endif
118 qDebug("-%s- ", n.mid(midstr).latin1()); 118 //qDebug("-%s- ", n.mid(midstr).latin1());
119 emit showIncidence( n.mid(midstr) ); 119 emit showIncidence( n.mid(midstr) );
120 return; 120 return;
121 } 121 }
122 122
123 if ( n.left(3) == "uid" ) 123 if ( n.left(3) == "uid" )
124#ifdef DESKTOP_VERSION 124#ifdef DESKTOP_VERSION
125 { 125 {
126 KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); 126 KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true );
127 KABC::AddressBook::Iterator it; 127 KABC::AddressBook::Iterator it;
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 QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" );
183 e << n.mid(7); 183 e << n.mid(7);
184 } 184 }
185#endif 185#endif
186 186
187 } 187 }
188 188
189 189
190#ifndef KORG_NODCOP 190#ifndef KORG_NODCOP
191 kdDebug() << "KOEventViewer::setSource(): " << n << endl; 191 kdDebug() << "KOEventViewer::setSource(): " << n << endl;
192 QString tmpStr; 192 QString tmpStr;
193 if (n.startsWith("mailto:")) { 193 if (n.startsWith("mailto:")) {
194 KApplication::kApplication()->invokeMailer(n.mid(7),QString::null); 194 KApplication::kApplication()->invokeMailer(n.mid(7),QString::null);
195 //emit showIncidence(n); 195 //emit showIncidence(n);
196 return; 196 return;
197 } else if (n.startsWith("uid:")) { 197 } else if (n.startsWith("uid:")) {
198 DCOPClient *client = KApplication::kApplication()->dcopClient(); 198 DCOPClient *client = KApplication::kApplication()->dcopClient();
199 const QByteArray noParamData; 199 const QByteArray noParamData;
200 const QByteArray paramData; 200 const QByteArray paramData;
201 QByteArray replyData; 201 QByteArray replyData;
202 QCString replyTypeStr; 202 QCString replyTypeStr;
203#define PING_ABBROWSER (client->call("kaddressbook", "KAddressBookIface", "interfaces()", noParamData, replyTypeStr, replyData)) 203#define PING_ABBROWSER (client->call("kaddressbook", "KAddressBookIface", "interfaces()", noParamData, replyTypeStr, replyData))
204 bool foundAbbrowser = PING_ABBROWSER; 204 bool foundAbbrowser = PING_ABBROWSER;
205 205
206 if (foundAbbrowser) { 206 if (foundAbbrowser) {
207 //KAddressbook is already running, so just DCOP to it to bring up the contact editor 207 //KAddressbook is already running, so just DCOP to it to bring up the contact editor
208 //client->send("kaddressbook","KAddressBookIface", 208 //client->send("kaddressbook","KAddressBookIface",
209 QDataStream arg(paramData, IO_WriteOnly); 209 QDataStream arg(paramData, IO_WriteOnly);
210 arg << n.mid(6); 210 arg << n.mid(6);
211 client->send("kaddressbook", "KAddressBookIface", "showContactEditor( QString )", paramData); 211 client->send("kaddressbook", "KAddressBookIface", "showContactEditor( QString )", paramData);
212 return; 212 return;
213 } else { 213 } else {
214 /* 214 /*
215 KaddressBook is not already running. Pass it the UID of the contact via the command line while starting it - its neater. 215 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 216 We start it without its main interface
217 */ 217 */
218 KIconLoader* iconLoader = new KIconLoader(); 218 KIconLoader* iconLoader = new KIconLoader();
219 QString iconPath = iconLoader->iconPath("go",KIcon::Small); 219 QString iconPath = iconLoader->iconPath("go",KIcon::Small);
220 ActionManager::setStartedKAddressBook(true); 220 ActionManager::setStartedKAddressBook(true);
221 tmpStr = "kaddressbook --editor-only --uid "; 221 tmpStr = "kaddressbook --editor-only --uid ";
222 tmpStr += KProcess::quote(n.mid(6)); 222 tmpStr += KProcess::quote(n.mid(6));
223 KRun::runCommand(tmpStr,"KAddressBook",iconPath); 223 KRun::runCommand(tmpStr,"KAddressBook",iconPath);
224 return; 224 return;
225 } 225 }
226 } else { 226 } else {
227 //QTextBrowser::setSource(n); 227 //QTextBrowser::setSource(n);
228 } 228 }
229#endif 229#endif
230} 230}
231void KOEventViewer::mailToAttendees( bool all ) 231void KOEventViewer::mailToAttendees( bool all )
232{ 232{
233 QPtrList<Attendee> attendees = mCurrentIncidence->attendees(); 233 QPtrList<Attendee> attendees = mCurrentIncidence->attendees();
234 if (attendees.count() == 0) return; 234 if (attendees.count() == 0) return;
235 QStringList nameList; 235 QStringList nameList;
236 QStringList emailList; 236 QStringList emailList;
237 QStringList uidList; 237 QStringList uidList;
238 Attendee* a; 238 Attendee* a;
239 for(a=attendees.first();a;a=attendees.next()) { 239 for(a=attendees.first();a;a=attendees.next()) {
240 if ( !all && !a->RSVP() ) continue; 240 if ( !all && !a->RSVP() ) continue;
241 if (!a->email().isEmpty()) { 241 if (!a->email().isEmpty()) {
242 nameList.append (a->name() ); 242 nameList.append (a->name() );
243 emailList.append (a->email() ); 243 emailList.append (a->email() );
244 uidList.append (a->uid() ); 244 uidList.append (a->uid() );
245 } 245 }
246 } 246 }