-rw-r--r-- | korganizer/koeventviewer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index 0866939..2f538c4 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp | |||
@@ -64,97 +64,97 @@ KOEventViewer::KOEventViewer(QWidget *parent,const char *name) | |||
64 | mSyncMode = false; | 64 | mSyncMode = false; |
65 | mColorMode = 0; | 65 | mColorMode = 0; |
66 | } | 66 | } |
67 | 67 | ||
68 | KOEventViewer::~KOEventViewer() | 68 | KOEventViewer::~KOEventViewer() |
69 | { | 69 | { |
70 | } | 70 | } |
71 | 71 | ||
72 | void KOEventViewer::setSource(const QString& n) | 72 | void KOEventViewer::setSource(const QString& n) |
73 | { | 73 | { |
74 | 74 | ||
75 | if ( n.left(3) == "uid" ) | 75 | if ( n.left(3) == "uid" ) |
76 | #ifdef DESKTOP_VERSION | 76 | #ifdef DESKTOP_VERSION |
77 | { | 77 | { |
78 | KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); | 78 | KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); |
79 | KABC::AddressBook::Iterator it; | 79 | KABC::AddressBook::Iterator it; |
80 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { | 80 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { |
81 | // LR I do not understand, why the uid string is different on zaurus and desktop | 81 | // LR I do not understand, why the uid string is different on zaurus and desktop |
82 | QString uid = "uid://"+(*it).uid(); | 82 | QString uid = "uid://"+(*it).uid(); |
83 | 83 | ||
84 | //qDebug("for *%s* +%s+ ", n.latin1(), uid.latin1()); | 84 | //qDebug("for *%s* +%s+ ", n.latin1(), uid.latin1()); |
85 | if (n == uid ) { | 85 | if (n == uid ) { |
86 | //qDebug("found %s ",(*it).mobileHomePhone().latin1() ); | 86 | //qDebug("found %s ",(*it).mobileHomePhone().latin1() ); |
87 | QDialog dia( this,"dia123", true ); | 87 | QDialog dia( this,"dia123", true ); |
88 | dia.setCaption( i18n("Details of attendee") ); | 88 | dia.setCaption( i18n("Details of attendee") ); |
89 | QVBoxLayout lay ( &dia ); | 89 | QVBoxLayout lay ( &dia ); |
90 | KPIM::AddresseeView av ( &dia ); | 90 | KPIM::AddresseeView av ( &dia ); |
91 | av.setAddressee( (*it) ); | 91 | av.setAddressee( (*it) ); |
92 | lay.addWidget( &av ); | 92 | lay.addWidget( &av ); |
93 | if ( QApplication::desktop()->width() < 480 ) | 93 | if ( QApplication::desktop()->width() < 480 ) |
94 | dia.resize( 220, 240); | 94 | dia.resize( 220, 240); |
95 | else { | 95 | else { |
96 | dia.resize( 400,400); | 96 | dia.resize( 400,400); |
97 | 97 | ||
98 | } | 98 | } |
99 | dia.exec(); | 99 | dia.exec(); |
100 | break; | 100 | break; |
101 | } | 101 | } |
102 | } | 102 | } |
103 | return; | 103 | return; |
104 | } | 104 | } |
105 | #else | 105 | #else |
106 | { | 106 | { |
107 | QPtrList<Attendee> attendees = mCurrentIncidence->attendees(); | 107 | QPtrList<Attendee> attendees = mCurrentIncidence->attendees(); |
108 | if (attendees.count()) { | 108 | if (attendees.count()) { |
109 | Attendee *a; | 109 | Attendee *a; |
110 | for(a=attendees.first();a;a=attendees.next()) { | 110 | for(a=attendees.first();a;a=attendees.next()) { |
111 | if ( "uid:"+a->uid() == n ) { | 111 | if ( "uid:"+a->uid() == n ) { |
112 | bool res = ExternalAppHandler::instance()->requestDetailsFromKAPI(a->name(), a->email(), ""); | 112 | bool res = ExternalAppHandler::instance()->requestDetailsFromKAPI(a->name(), a->email(), a->uid()); |
113 | return; | 113 | return; |
114 | } | 114 | } |
115 | } | 115 | } |
116 | } | 116 | } |
117 | return; | 117 | return; |
118 | } | 118 | } |
119 | //requestNameEmailUidListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/); | 119 | //requestNameEmailUidListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/); |
120 | // the result should now arrive through method insertAttendees | 120 | // the result should now arrive through method insertAttendees |
121 | //QString uid = "uid:"+(*it).uid(); | 121 | //QString uid = "uid:"+(*it).uid(); |
122 | #endif | 122 | #endif |
123 | if ( n.left(6) == "mailto" ) { | 123 | if ( n.left(6) == "mailto" ) { |
124 | // qDebug("KOEventViewer::setSource %s ", n.mid(7).latin1()); | 124 | // qDebug("KOEventViewer::setSource %s ", n.mid(7).latin1()); |
125 | #ifndef DESKTOP_VERSION | 125 | #ifndef DESKTOP_VERSION |
126 | QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" ); | 126 | QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" ); |
127 | e << n.mid(7); | 127 | e << n.mid(7); |
128 | #endif | 128 | #endif |
129 | 129 | ||
130 | } | 130 | } |
131 | 131 | ||
132 | 132 | ||
133 | #ifndef KORG_NODCOP | 133 | #ifndef KORG_NODCOP |
134 | kdDebug() << "KOEventViewer::setSource(): " << n << endl; | 134 | kdDebug() << "KOEventViewer::setSource(): " << n << endl; |
135 | QString tmpStr; | 135 | QString tmpStr; |
136 | if (n.startsWith("mailto:")) { | 136 | if (n.startsWith("mailto:")) { |
137 | KApplication::kApplication()->invokeMailer(n.mid(7),QString::null); | 137 | KApplication::kApplication()->invokeMailer(n.mid(7),QString::null); |
138 | //emit showIncidence(n); | 138 | //emit showIncidence(n); |
139 | return; | 139 | return; |
140 | } else if (n.startsWith("uid:")) { | 140 | } else if (n.startsWith("uid:")) { |
141 | DCOPClient *client = KApplication::kApplication()->dcopClient(); | 141 | DCOPClient *client = KApplication::kApplication()->dcopClient(); |
142 | const QByteArray noParamData; | 142 | const QByteArray noParamData; |
143 | const QByteArray paramData; | 143 | const QByteArray paramData; |
144 | QByteArray replyData; | 144 | QByteArray replyData; |
145 | QCString replyTypeStr; | 145 | QCString replyTypeStr; |
146 | #define PING_ABBROWSER (client->call("kaddressbook", "KAddressBookIface", "interfaces()", noParamData, replyTypeStr, replyData)) | 146 | #define PING_ABBROWSER (client->call("kaddressbook", "KAddressBookIface", "interfaces()", noParamData, replyTypeStr, replyData)) |
147 | bool foundAbbrowser = PING_ABBROWSER; | 147 | bool foundAbbrowser = PING_ABBROWSER; |
148 | 148 | ||
149 | if (foundAbbrowser) { | 149 | if (foundAbbrowser) { |
150 | //KAddressbook is already running, so just DCOP to it to bring up the contact editor | 150 | //KAddressbook is already running, so just DCOP to it to bring up the contact editor |
151 | //client->send("kaddressbook","KAddressBookIface", | 151 | //client->send("kaddressbook","KAddressBookIface", |
152 | QDataStream arg(paramData, IO_WriteOnly); | 152 | QDataStream arg(paramData, IO_WriteOnly); |
153 | arg << n.mid(6); | 153 | arg << n.mid(6); |
154 | client->send("kaddressbook", "KAddressBookIface", "showContactEditor( QString )", paramData); | 154 | client->send("kaddressbook", "KAddressBookIface", "showContactEditor( QString )", paramData); |
155 | return; | 155 | return; |
156 | } else { | 156 | } else { |
157 | /* | 157 | /* |
158 | KaddressBook is not already running. Pass it the UID of the contact via the command line while starting it - its neater. | 158 | KaddressBook is not already running. Pass it the UID of the contact via the command line while starting it - its neater. |
159 | We start it without its main interface | 159 | We start it without its main interface |
160 | */ | 160 | */ |