summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-11-08 08:05:08 (UTC)
committer zautrix <zautrix>2004-11-08 08:05:08 (UTC)
commit4481ce9842b3820087b24a8bfce2c194974aae73 (patch) (side-by-side diff)
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
@@ -346,13 +346,13 @@
{ "Alternating Background Color","Abwechselnder Hintergrundfarbe" },
{ "Postal","Post" },
{ "Dr.","Dr." },
{ "Miss","Frl." },
{ "Mr.","Herr" },
{ "Mrs.","Frau" },
-{ "Ms.","Frau" },
+{ "Ms.","Fr." },
{ "Prof.","Prof." },
{ "I","I" },
{ "II","II" },
{ "III","III" },
{ "Jr.","Jr." },
{ "Sr.","Sr." },
@@ -370,13 +370,13 @@
{ "South","Süd" },
{ "East","Ost" },
{ "West","West" },
{ "Undefined","Unbestimmt" },
{ "Edit Address","Bearbeite Adresse" },
{ "Street:","Strasse:" },
-{ "Post office box:","PLZ:" },
+{ "Post office box:","Postfach:" },
{ "Locality:","Stadt:" },
{ "Region:","Region:" },
{ "Postal code:","PLZ:" },
{ "Country:","Staat:" },
{ "This is the preferred address","Dies ist die bevorzugte Adresse" },
{ "New...","Neu..." },
diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp
index 2e1ae6e..66f6977 100644
--- a/korganizer/koeditordetails.cpp
+++ b/korganizer/koeditordetails.cpp
@@ -296,15 +296,21 @@ void KOEditorDetails::insertAttendees(const QString& uid,const QStringList& name
insertAttendee(a);
}
}
}
-
void KOEditorDetails::insertAttendee(Attendee *a)
{
+ AttendeeListItem *first = (AttendeeListItem*) mListView->firstChild();
+ while (first) {
+ if ( first->data()->name() == a->name() && first->data()->email() == a->email() )
+ return;
+ first = (AttendeeListItem*) first->nextSibling();
+ }
+
AttendeeListItem *item = new AttendeeListItem(a,mListView);
mListView->setSelected( item, true );
}
void KOEditorDetails::setDefaults()
{
diff --git a/libkcal/incidencebase.cpp b/libkcal/incidencebase.cpp
index 9aa517c..7525a4a 100644
--- a/libkcal/incidencebase.cpp
+++ b/libkcal/incidencebase.cpp
@@ -210,20 +210,29 @@ void IncidenceBase::setFloats(bool f)
if (mReadOnly) return;
mFloats = f;
updated();
}
-void IncidenceBase::addAttendee(Attendee *a, bool doupdate)
+bool IncidenceBase::addAttendee(Attendee *a, bool doupdate)
{
- if (mReadOnly) return;
+ if (mReadOnly) return false;
if (a->name().left(7).upper() == "MAILTO:")
a->setName(a->name().remove(0,7));
+ QPtrListIterator<Attendee> qli(mAttendees);
+
+ qli.toFirst();
+ while (qli) {
+ if (*qli.current() == *a)
+ return false;
+ ++qli;
+ }
mAttendees.append(a);
if (doupdate) updated();
+ return true;
}
#if 0
void IncidenceBase::removeAttendee(Attendee *a)
{
if (mReadOnly) return;
diff --git a/libkcal/incidencebase.h b/libkcal/incidencebase.h
index e02d03a..f9a6558 100644
--- a/libkcal/incidencebase.h
+++ b/libkcal/incidencebase.h
@@ -97,13 +97,13 @@ class IncidenceBase : public CustomProperties
void setFloats(bool f);
/**
Add Attendee to this incidence. IncidenceBase takes ownership of the
Attendee object.
*/
- void addAttendee(Attendee *a, bool doupdate=true );
+ bool addAttendee(Attendee *a, bool doupdate=true );
// void removeAttendee(Attendee *a);
// void removeAttendee(const char *n);
/** Remove all Attendees. */
void clearAttendees();
/** Return list of attendees. */
QPtrList<Attendee> attendees() const { return mAttendees; };