summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-11-08 08:05:08 (UTC)
committer zautrix <zautrix>2004-11-08 08:05:08 (UTC)
commit4481ce9842b3820087b24a8bfce2c194974aae73 (patch) (unidiff)
tree70da30be2b8cd4b6934c1a51c08a9d83aa93d8b6
parent90e33436f6d1c502a5620760ac6592b9881ee4ab (diff)
downloadkdepimpi-4481ce9842b3820087b24a8bfce2c194974aae73.zip
kdepimpi-4481ce9842b3820087b24a8bfce2c194974aae73.tar.gz
kdepimpi-4481ce9842b3820087b24a8bfce2c194974aae73.tar.bz2
some small fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/kaddressbook/germantranslation.txt4
-rw-r--r--korganizer/koeditordetails.cpp8
-rw-r--r--libkcal/incidencebase.cpp13
-rw-r--r--libkcal/incidencebase.h2
4 files changed, 21 insertions, 6 deletions
diff --git a/bin/kdepim/kaddressbook/germantranslation.txt b/bin/kdepim/kaddressbook/germantranslation.txt
index 75df50f..85ca87d 100644
--- a/bin/kdepim/kaddressbook/germantranslation.txt
+++ b/bin/kdepim/kaddressbook/germantranslation.txt
@@ -328,73 +328,73 @@
328{ "Single line","Einzelne Zeile" }, 328{ "Single line","Einzelne Zeile" },
329{ "Enable background image:","Hintergrundbild:" }, 329{ "Enable background image:","Hintergrundbild:" },
330{ "Enable contact tooltips","Contact Tooltips" }, 330{ "Enable contact tooltips","Contact Tooltips" },
331{ "&Enable custom Colors","Benutzerdef. Farben" }, 331{ "&Enable custom Colors","Benutzerdef. Farben" },
332{ "&Colors","Farben" }, 332{ "&Colors","Farben" },
333{ "If custom colors are enabled, you may choose the colors for the view below. Otherwise colors from your current KDE color scheme are used.","#If custom colors are enabled, you may choose the colors for the view below. Otherwise colors from your current KDE color scheme are used." }, 333{ "If custom colors are enabled, you may choose the colors for the view below. Otherwise colors from your current KDE color scheme are used.","#If custom colors are enabled, you may choose the colors for the view below. Otherwise colors from your current KDE color scheme are used." },
334{ "Double click or press RETURN on a item to select a color for the related strings in the view.","#Double click or press RETURN on a item to select a color for the related strings in the view." }, 334{ "Double click or press RETURN on a item to select a color for the related strings in the view.","#Double click or press RETURN on a item to select a color for the related strings in the view." },
335{ "&Enable custom fonts","B&enutzerdefinierte Schriften" }, 335{ "&Enable custom fonts","B&enutzerdefinierte Schriften" },
336{ "&Text font:","Textschriftart:" }, 336{ "&Text font:","Textschriftart:" },
337{ "&Header font:","Titelschriftart:" }, 337{ "&Header font:","Titelschriftart:" },
338{ "If custom fonts are enabled, you may choose which fonts to use for this view below. Otherwise the default KDE font will be used, in bold style for the header and normal style for the data.","#If custom fonts are enabled, you may choose which fonts to use for this view below. Otherwise the default KDE font will be used, in bold style for the header and normal style for the data." }, 338{ "If custom fonts are enabled, you may choose which fonts to use for this view below. Otherwise the default KDE font will be used, in bold style for the header and normal style for the data.","#If custom fonts are enabled, you may choose which fonts to use for this view below. Otherwise the default KDE font will be used, in bold style for the header and normal style for the data." },
339{ "&Fonts","Schri&ften" }, 339{ "&Fonts","Schri&ften" },
340{ "Background Color","Hintergrundfarbe" }, 340{ "Background Color","Hintergrundfarbe" },
341{ "Text Color","Textfarbe" }, 341{ "Text Color","Textfarbe" },
342{ "Header Background Color","Titel Hintergrundfarbe" }, 342{ "Header Background Color","Titel Hintergrundfarbe" },
343{ "Header Text Color","Titel Farbe" }, 343{ "Header Text Color","Titel Farbe" },
344{ "Highlight Color","Auswahlfarbe" }, 344{ "Highlight Color","Auswahlfarbe" },
345{ "Highlighted Text Color","Auswahltextfarbe" }, 345{ "Highlighted Text Color","Auswahltextfarbe" },
346{ "Alternating Background Color","Abwechselnder Hintergrundfarbe" }, 346{ "Alternating Background Color","Abwechselnder Hintergrundfarbe" },
347{ "Postal","Post" }, 347{ "Postal","Post" },
348{ "Dr.","Dr." }, 348{ "Dr.","Dr." },
349{ "Miss","Frl." }, 349{ "Miss","Frl." },
350{ "Mr.","Herr" }, 350{ "Mr.","Herr" },
351{ "Mrs.","Frau" }, 351{ "Mrs.","Frau" },
352{ "Ms.","Frau" }, 352{ "Ms.","Fr." },
353{ "Prof.","Prof." }, 353{ "Prof.","Prof." },
354{ "I","I" }, 354{ "I","I" },
355{ "II","II" }, 355{ "II","II" },
356{ "III","III" }, 356{ "III","III" },
357{ "Jr.","Jr." }, 357{ "Jr.","Jr." },
358{ "Sr.","Sr." }, 358{ "Sr.","Sr." },
359{ "Name:","Name:" }, 359{ "Name:","Name:" },
360{ "Documents","Dokumente" }, 360{ "Documents","Dokumente" },
361{ "Files","Dateien" }, 361{ "Files","Dateien" },
362{ "All Files","Alle Dateien" }, 362{ "All Files","Alle Dateien" },
363{ "Name","Name" }, 363{ "Name","Name" },
364{ "Size","Größe" }, 364{ "Size","Größe" },
365{ "Date","Datum" }, 365{ "Date","Datum" },
366{ "Mime Type","Mime Typ" }, 366{ "Mime Type","Mime Typ" },
367{ "Geo Data Input","Geo Dateneingabe" }, 367{ "Geo Data Input","Geo Dateneingabe" },
368{ "Sexagesimal","Sexagesimal" }, 368{ "Sexagesimal","Sexagesimal" },
369{ "North","Nord" }, 369{ "North","Nord" },
370{ "South","Süd" }, 370{ "South","Süd" },
371{ "East","Ost" }, 371{ "East","Ost" },
372{ "West","West" }, 372{ "West","West" },
373{ "Undefined","Unbestimmt" }, 373{ "Undefined","Unbestimmt" },
374{ "Edit Address","Bearbeite Adresse" }, 374{ "Edit Address","Bearbeite Adresse" },
375{ "Street:","Strasse:" }, 375{ "Street:","Strasse:" },
376{ "Post office box:","PLZ:" }, 376{ "Post office box:","Postfach:" },
377{ "Locality:","Stadt:" }, 377{ "Locality:","Stadt:" },
378{ "Region:","Region:" }, 378{ "Region:","Region:" },
379{ "Postal code:","PLZ:" }, 379{ "Postal code:","PLZ:" },
380{ "Country:","Staat:" }, 380{ "Country:","Staat:" },
381{ "This is the preferred address","Dies ist die bevorzugte Adresse" }, 381{ "This is the preferred address","Dies ist die bevorzugte Adresse" },
382{ "New...","Neu..." }, 382{ "New...","Neu..." },
383{ "Change Type","Ändere Art" }, 383{ "Change Type","Ändere Art" },
384{ "Edit Address Type","Ändere Address Art" }, 384{ "Edit Address Type","Ändere Address Art" },
385{ "Address Types","Address Art" }, 385{ "Address Types","Address Art" },
386{ "Domestic","Inland" }, 386{ "Domestic","Inland" },
387{ "International","International" }, 387{ "International","International" },
388{ "Parcel","Paket" }, 388{ "Parcel","Paket" },
389{ "Edit Contact Name","Ändere Kontakt Name" }, 389{ "Edit Contact Name","Ändere Kontakt Name" },
390{ "Honorific prefixes:","Namensprefixes:" }, 390{ "Honorific prefixes:","Namensprefixes:" },
391{ "Given name:","Vorname:" }, 391{ "Given name:","Vorname:" },
392{ "Additional names:","Mittelnamen:" }, 392{ "Additional names:","Mittelnamen:" },
393{ "Family names:","Nachname:" }, 393{ "Family names:","Nachname:" },
394{ "Honorific suffixes:","Namenssuffixe:" }, 394{ "Honorific suffixes:","Namenssuffixe:" },
395{ "Parse name automatically","Setze Namen automatisch" }, 395{ "Parse name automatically","Setze Namen automatisch" },
396{ "Edit Phone Numbers","Bearbeite Telefonnummern" }, 396{ "Edit Phone Numbers","Bearbeite Telefonnummern" },
397{ "Number","Nummer" }, 397{ "Number","Nummer" },
398{ "Type","Typ" }, 398{ "Type","Typ" },
399{ "Edit Phone Number","Bearbeite Telefonnummer" }, 399{ "Edit Phone Number","Bearbeite Telefonnummer" },
400{ "Number:","Nummer:" }, 400{ "Number:","Nummer:" },
diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp
index 2e1ae6e..66f6977 100644
--- a/korganizer/koeditordetails.cpp
+++ b/korganizer/koeditordetails.cpp
@@ -278,51 +278,57 @@ void KOEditorDetails::addNewAttendee()
278#endif 278#endif
279 279
280 Attendee *a = new Attendee(i18n("(EmptyName)"),i18n("(EmptyEmail)")); 280 Attendee *a = new Attendee(i18n("(EmptyName)"),i18n("(EmptyEmail)"));
281 insertAttendee(a); 281 insertAttendee(a);
282} 282}
283 283
284//the map includes name/email pairs, that comes from Ka/Pi 284//the map includes name/email pairs, that comes from Ka/Pi
285void KOEditorDetails::insertAttendees(const QString& uid,const QStringList& nameList,const QStringList& emailList,const QStringList& uidList) 285void KOEditorDetails::insertAttendees(const QString& uid,const QStringList& nameList,const QStringList& emailList,const QStringList& uidList)
286{ 286{
287 if (uid == this->name()) 287 if (uid == this->name())
288 { 288 {
289 for ( int i = 0; i < nameList.count(); i++) 289 for ( int i = 0; i < nameList.count(); i++)
290 { 290 {
291 QString _name = nameList[i]; 291 QString _name = nameList[i];
292 QString _email = emailList[i]; 292 QString _email = emailList[i];
293 QString _uid = uidList[i]; 293 QString _uid = uidList[i];
294 294
295 Attendee *a = new Attendee(_name,_email,false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant, _uid); 295 Attendee *a = new Attendee(_name,_email,false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant, _uid);
296 insertAttendee(a); 296 insertAttendee(a);
297 } 297 }
298 } 298 }
299 299
300} 300}
301 301
302
303void KOEditorDetails::insertAttendee(Attendee *a) 302void KOEditorDetails::insertAttendee(Attendee *a)
304{ 303{
304 AttendeeListItem *first = (AttendeeListItem*) mListView->firstChild();
305 while (first) {
306 if ( first->data()->name() == a->name() && first->data()->email() == a->email() )
307 return;
308 first = (AttendeeListItem*) first->nextSibling();
309 }
310
305 AttendeeListItem *item = new AttendeeListItem(a,mListView); 311 AttendeeListItem *item = new AttendeeListItem(a,mListView);
306 mListView->setSelected( item, true ); 312 mListView->setSelected( item, true );
307} 313}
308 314
309void KOEditorDetails::setDefaults() 315void KOEditorDetails::setDefaults()
310{ 316{
311 mRsvpButton->setChecked(true); 317 mRsvpButton->setChecked(true);
312 mListView->clear(); 318 mListView->clear();
313 mdelAttendees.clear(); 319 mdelAttendees.clear();
314 clearAttendeeInput(); 320 clearAttendeeInput();
315 mOrganizerLabel->setText(i18n("Organizer: %1").arg(KOPrefs::instance()->email())); 321 mOrganizerLabel->setText(i18n("Organizer: %1").arg(KOPrefs::instance()->email()));
316 322
317 mNameEdit->setText(""); 323 mNameEdit->setText("");
318 mUidEdit->setText(""); 324 mUidEdit->setText("");
319 mEmailEdit->setText(""); 325 mEmailEdit->setText("");
320 mRoleCombo->setCurrentItem( 0 ); 326 mRoleCombo->setCurrentItem( 0 );
321 mStatusCombo->setCurrentItem( 0 ); 327 mStatusCombo->setCurrentItem( 0 );
322 328
323} 329}
324 330
325void KOEditorDetails::readEvent(Incidence *event) 331void KOEditorDetails::readEvent(Incidence *event)
326{ 332{
327 setDefaults(); 333 setDefaults();
328 //mListView->clear(); 334 //mListView->clear();
diff --git a/libkcal/incidencebase.cpp b/libkcal/incidencebase.cpp
index 9aa517c..7525a4a 100644
--- a/libkcal/incidencebase.cpp
+++ b/libkcal/incidencebase.cpp
@@ -192,56 +192,65 @@ QString IncidenceBase::dtStartTimeStr() const
192QString IncidenceBase::dtStartDateStr(bool shortfmt) const 192QString IncidenceBase::dtStartDateStr(bool shortfmt) const
193{ 193{
194 return KGlobal::locale()->formatDate(dtStart().date(),shortfmt); 194 return KGlobal::locale()->formatDate(dtStart().date(),shortfmt);
195} 195}
196 196
197QString IncidenceBase::dtStartStr(bool shortfmt) const 197QString IncidenceBase::dtStartStr(bool shortfmt) const
198{ 198{
199 return KGlobal::locale()->formatDateTime(dtStart(), shortfmt); 199 return KGlobal::locale()->formatDateTime(dtStart(), shortfmt);
200} 200}
201 201
202 202
203bool IncidenceBase::doesFloat() const 203bool IncidenceBase::doesFloat() const
204{ 204{
205 return mFloats; 205 return mFloats;
206} 206}
207 207
208void IncidenceBase::setFloats(bool f) 208void IncidenceBase::setFloats(bool f)
209{ 209{
210 if (mReadOnly) return; 210 if (mReadOnly) return;
211 mFloats = f; 211 mFloats = f;
212 updated(); 212 updated();
213} 213}
214 214
215 215
216void IncidenceBase::addAttendee(Attendee *a, bool doupdate) 216bool IncidenceBase::addAttendee(Attendee *a, bool doupdate)
217{ 217{
218 if (mReadOnly) return; 218 if (mReadOnly) return false;
219 if (a->name().left(7).upper() == "MAILTO:") 219 if (a->name().left(7).upper() == "MAILTO:")
220 a->setName(a->name().remove(0,7)); 220 a->setName(a->name().remove(0,7));
221 221
222 QPtrListIterator<Attendee> qli(mAttendees);
223
224 qli.toFirst();
225 while (qli) {
226 if (*qli.current() == *a)
227 return false;
228 ++qli;
229 }
222 mAttendees.append(a); 230 mAttendees.append(a);
223 if (doupdate) updated(); 231 if (doupdate) updated();
232 return true;
224} 233}
225 234
226#if 0 235#if 0
227void IncidenceBase::removeAttendee(Attendee *a) 236void IncidenceBase::removeAttendee(Attendee *a)
228{ 237{
229 if (mReadOnly) return; 238 if (mReadOnly) return;
230 mAttendees.removeRef(a); 239 mAttendees.removeRef(a);
231 updated(); 240 updated();
232} 241}
233 242
234void IncidenceBase::removeAttendee(const char *n) 243void IncidenceBase::removeAttendee(const char *n)
235{ 244{
236 Attendee *a; 245 Attendee *a;
237 246
238 if (mReadOnly) return; 247 if (mReadOnly) return;
239 for (a = mAttendees.first(); a; a = mAttendees.next()) 248 for (a = mAttendees.first(); a; a = mAttendees.next())
240 if (a->getName() == n) { 249 if (a->getName() == n) {
241 mAttendees.remove(); 250 mAttendees.remove();
242 break; 251 break;
243 } 252 }
244} 253}
245#endif 254#endif
246 255
247void IncidenceBase::clearAttendees() 256void IncidenceBase::clearAttendees()
diff --git a/libkcal/incidencebase.h b/libkcal/incidencebase.h
index e02d03a..f9a6558 100644
--- a/libkcal/incidencebase.h
+++ b/libkcal/incidencebase.h
@@ -79,49 +79,49 @@ class IncidenceBase : public CustomProperties
79 users locale settings */ 79 users locale settings */
80 QString dtStartTimeStr() const; 80 QString dtStartTimeStr() const;
81 /** returns an event's starting date as a string formatted according to the 81 /** returns an event's starting date as a string formatted according to the
82 users locale settings */ 82 users locale settings */
83 QString dtStartDateStr(bool shortfmt=true) const; 83 QString dtStartDateStr(bool shortfmt=true) const;
84 /** returns an event's starting date and time as a string formatted according 84 /** returns an event's starting date and time as a string formatted according
85 to the users locale settings */ 85 to the users locale settings */
86 QString dtStartStr(bool shortfmt=true) const; 86 QString dtStartStr(bool shortfmt=true) const;
87 87
88 virtual void setDuration(int seconds); 88 virtual void setDuration(int seconds);
89 int duration() const; 89 int duration() const;
90 void setHasDuration(bool); 90 void setHasDuration(bool);
91 bool hasDuration() const; 91 bool hasDuration() const;
92 92
93 /** Return true or false depending on whether the incidence "floats," 93 /** Return true or false depending on whether the incidence "floats,"
94 * i.e. has a date but no time attached to it. */ 94 * i.e. has a date but no time attached to it. */
95 bool doesFloat() const; 95 bool doesFloat() const;
96 /** Set whether the incidence floats, i.e. has a date but no time attached to it. */ 96 /** Set whether the incidence floats, i.e. has a date but no time attached to it. */
97 void setFloats(bool f); 97 void setFloats(bool f);
98 98
99 /** 99 /**
100 Add Attendee to this incidence. IncidenceBase takes ownership of the 100 Add Attendee to this incidence. IncidenceBase takes ownership of the
101 Attendee object. 101 Attendee object.
102 */ 102 */
103 void addAttendee(Attendee *a, bool doupdate=true ); 103 bool addAttendee(Attendee *a, bool doupdate=true );
104// void removeAttendee(Attendee *a); 104// void removeAttendee(Attendee *a);
105// void removeAttendee(const char *n); 105// void removeAttendee(const char *n);
106 /** Remove all Attendees. */ 106 /** Remove all Attendees. */
107 void clearAttendees(); 107 void clearAttendees();
108 /** Return list of attendees. */ 108 /** Return list of attendees. */
109 QPtrList<Attendee> attendees() const { return mAttendees; }; 109 QPtrList<Attendee> attendees() const { return mAttendees; };
110 /** Return number of attendees. */ 110 /** Return number of attendees. */
111 int attendeeCount() const { return mAttendees.count(); }; 111 int attendeeCount() const { return mAttendees.count(); };
112 /** Return the Attendee with this email */ 112 /** Return the Attendee with this email */
113 Attendee* attendeeByMail(const QString &); 113 Attendee* attendeeByMail(const QString &);
114 /** Return first Attendee with one of this emails */ 114 /** Return first Attendee with one of this emails */
115 Attendee* attendeeByMails(const QStringList &, const QString& email = QString::null); 115 Attendee* attendeeByMails(const QStringList &, const QString& email = QString::null);
116 116
117 /** pilot syncronization states */ 117 /** pilot syncronization states */
118 enum { SYNCNONE = 0, SYNCMOD = 1, SYNCDEL = 3 }; 118 enum { SYNCNONE = 0, SYNCMOD = 1, SYNCDEL = 3 };
119 /** Set synchronisation satus. */ 119 /** Set synchronisation satus. */
120 void setSyncStatus(int stat); 120 void setSyncStatus(int stat);
121 /** Return synchronisation status. */ 121 /** Return synchronisation status. */
122 int syncStatus() const; 122 int syncStatus() const;
123 123
124 /** Set Pilot Id. */ 124 /** Set Pilot Id. */
125 void setPilotId(int id); 125 void setPilotId(int id);
126 /** Return Pilot Id. */ 126 /** Return Pilot Id. */
127 int pilotId() const; 127 int pilotId() const;