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) (show 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
@@ -304,121 +304,121 @@
{ "Business Address Label","Büro Adresse Label" },
{ "Home Phone","Privat Telefon" },
{ "Business Phone","Büro Telefon" },
{ "Mobile Phone","Handy" },
{ "Home Fax","Privat Fax" },
{ "Business Fax","Büro Fax" },
{ "Car Phone","Autotelefon" },
{ "ISDN","ISDN" },
{ "Pager","Pager" },
{ "Mail Client","Mail Client" },
{ "Title","Titel" },
{ "Role","Rolle" },
{ "Note","Notiz" },
{ "URL","URL" },
{ "Resource","Resource" },
{ "SIP","SIP" },
{ "Default Filter","Default Filter" },
{ "The default filter will be activated whenever this view is displayed. This feature allows you to configure views that only interact with certain types of information based on the filter. Once the view is activated, the filter can be changed at anytime.","#The default filter will be activated whenever this view is displayed. This feature allows you to configure views that only interact with certain types of information based on the filter. Once the view is activated, the filter can be changed at anytime." },
{ "No default filter","Kein default Filter" },
{ "Use last active filter","Nutze letzen aktiven Filter" },
{ "Use filter:","Nutze Filter:" },
{ "Look & Feel","Look & Feel" },
{ "Row Separator","Reihen Separator" },
{ "Alternating backgrounds","Abwechselnder Hintergrund" },
{ "Single line","Einzelne Zeile" },
{ "Enable background image:","Hintergrundbild:" },
{ "Enable contact tooltips","Contact Tooltips" },
{ "&Enable custom Colors","Benutzerdef. Farben" },
{ "&Colors","Farben" },
{ "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." },
{ "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." },
{ "&Enable custom fonts","B&enutzerdefinierte Schriften" },
{ "&Text font:","Textschriftart:" },
{ "&Header font:","Titelschriftart:" },
{ "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." },
{ "&Fonts","Schri&ften" },
{ "Background Color","Hintergrundfarbe" },
{ "Text Color","Textfarbe" },
{ "Header Background Color","Titel Hintergrundfarbe" },
{ "Header Text Color","Titel Farbe" },
{ "Highlight Color","Auswahlfarbe" },
{ "Highlighted Text Color","Auswahltextfarbe" },
{ "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." },
{ "Name:","Name:" },
{ "Documents","Dokumente" },
{ "Files","Dateien" },
{ "All Files","Alle Dateien" },
{ "Name","Name" },
{ "Size","Größe" },
{ "Date","Datum" },
{ "Mime Type","Mime Typ" },
{ "Geo Data Input","Geo Dateneingabe" },
{ "Sexagesimal","Sexagesimal" },
{ "North","Nord" },
{ "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..." },
{ "Change Type","Ändere Art" },
{ "Edit Address Type","Ändere Address Art" },
{ "Address Types","Address Art" },
{ "Domestic","Inland" },
{ "International","International" },
{ "Parcel","Paket" },
{ "Edit Contact Name","Ändere Kontakt Name" },
{ "Honorific prefixes:","Namensprefixes:" },
{ "Given name:","Vorname:" },
{ "Additional names:","Mittelnamen:" },
{ "Family names:","Nachname:" },
{ "Honorific suffixes:","Namenssuffixe:" },
{ "Parse name automatically","Setze Namen automatisch" },
{ "Edit Phone Numbers","Bearbeite Telefonnummern" },
{ "Number","Nummer" },
{ "Type","Typ" },
{ "Edit Phone Number","Bearbeite Telefonnummer" },
{ "Number:","Nummer:" },
{ "This is the preferred phone number","Dies ist die bevorzugte Telefonnummer" },
{ "Types","Typen" },
{ "Messenger","Messenger" },
{ "Other","Anderes" },
{ "Video","Video" },
{ "Mailbox","Mailbox" },
{ "Modem","Modem" },
{ "Car","Auto" },
{ "PCS","PCS" },
{ "Category","Kategorie" },
{ "Select Categories","Wähle Kategorien" },
{ " &Deselect All "," &Deselektiere alle " },
{ " &Edit Categories "," B&earbeite Kategorien " },
{ "&OK","&OK" },
{ "&Cancel","Abbre&chen" },
{ "Configure","Konfiguriere" },
{ "Default","Voreinstellungen" },
{ "Addressbook","Adressbuch" },
{ "Details view font","Schriftart Detailansicht" },
{ "phone:123","phone:123" },
{ "Search only after <return> key pressed","Suche nur nach <return> Taste" },
{ "Honor KDE single click","Benutze KDE Einzelklick" },
{ "Automatic name parsing for new addressees","Automa. Name Parsen für neue Einträge" },
{ "Display List and Details at once (restart)","Zeige Liste und Details zusammen(neustart)" },
diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp
index 2e1ae6e..66f6977 100644
--- a/korganizer/koeditordetails.cpp
+++ b/korganizer/koeditordetails.cpp
@@ -254,99 +254,105 @@ void KOEditorDetails::openAddressBook()
#endif
}
void KOEditorDetails::addNewAttendee()
{
#if 0
// this is cool. If they didn't enter an email address,
// try to look it up in the address book and fill it in for them.
if (QString(mEmailEdit->text()).stripWhiteSpace().isEmpty()) {
KabAPI addrBook;
QString name;
std::list<AddressBook::Entry> entries;
name = mNameEdit->text();
if (addrBook.init() == AddressBook::NoError) {
if (addrBook.getEntryByName(name, entries, 1) == AddressBook::NoError) {
kdDebug() << "positive match" << endl;
// take first email address
if (!entries.front().emails.isEmpty() &&
entries.front().emails.first().length()>0)
mEmailEdit->setText(entries.front().emails.first());
}
}
}
#endif
Attendee *a = new Attendee(i18n("(EmptyName)"),i18n("(EmptyEmail)"));
insertAttendee(a);
}
//the map includes name/email pairs, that comes from Ka/Pi
void KOEditorDetails::insertAttendees(const QString& uid,const QStringList& nameList,const QStringList& emailList,const QStringList& uidList)
{
if (uid == this->name())
{
for ( int i = 0; i < nameList.count(); i++)
{
QString _name = nameList[i];
QString _email = emailList[i];
QString _uid = uidList[i];
Attendee *a = new Attendee(_name,_email,false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant, _uid);
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()
{
mRsvpButton->setChecked(true);
mListView->clear();
mdelAttendees.clear();
clearAttendeeInput();
mOrganizerLabel->setText(i18n("Organizer: %1").arg(KOPrefs::instance()->email()));
mNameEdit->setText("");
mUidEdit->setText("");
mEmailEdit->setText("");
mRoleCombo->setCurrentItem( 0 );
mStatusCombo->setCurrentItem( 0 );
}
void KOEditorDetails::readEvent(Incidence *event)
{
setDefaults();
//mListView->clear();
//mdelAttendees.clear();
QPtrList<Attendee> tmpAList = event->attendees();
Attendee *a;
for (a = tmpAList.first(); a; a = tmpAList.next())
insertAttendee(new Attendee(*a));
mListView->setSelected( mListView->firstChild(), true );
mOrganizerLabel->setText(i18n("Organizer: %1").arg(event->organizer()));
}
void KOEditorDetails::writeEvent(Incidence *event)
{
event->clearAttendees();
QListViewItem *item;
AttendeeListItem *a;
for (item = mListView->firstChild(); item;
item = item->nextSibling()) {
a = (AttendeeListItem *)item;
event->addAttendee(new Attendee(*(a->data())));
}
event->setOrganizer(KOPrefs::instance()->email());
}
void KOEditorDetails::cancelAttendeeEvent(Incidence *event)
diff --git a/libkcal/incidencebase.cpp b/libkcal/incidencebase.cpp
index 9aa517c..7525a4a 100644
--- a/libkcal/incidencebase.cpp
+++ b/libkcal/incidencebase.cpp
@@ -168,104 +168,113 @@ QString IncidenceBase::organizer() const
}
void IncidenceBase::setReadOnly( bool readOnly )
{
mReadOnly = readOnly;
}
void IncidenceBase::setDtStart(const QDateTime &dtStart)
{
// if (mReadOnly) return;
mDtStart = getEvenTime(dtStart);
updated();
}
QDateTime IncidenceBase::dtStart() const
{
return mDtStart;
}
QString IncidenceBase::dtStartTimeStr() const
{
return KGlobal::locale()->formatTime(dtStart().time());
}
QString IncidenceBase::dtStartDateStr(bool shortfmt) const
{
return KGlobal::locale()->formatDate(dtStart().date(),shortfmt);
}
QString IncidenceBase::dtStartStr(bool shortfmt) const
{
return KGlobal::locale()->formatDateTime(dtStart(), shortfmt);
}
bool IncidenceBase::doesFloat() const
{
return mFloats;
}
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;
mAttendees.removeRef(a);
updated();
}
void IncidenceBase::removeAttendee(const char *n)
{
Attendee *a;
if (mReadOnly) return;
for (a = mAttendees.first(); a; a = mAttendees.next())
if (a->getName() == n) {
mAttendees.remove();
break;
}
}
#endif
void IncidenceBase::clearAttendees()
{
if (mReadOnly) return;
mAttendees.clear();
}
#if 0
Attendee *IncidenceBase::getAttendee(const char *n) const
{
QPtrListIterator<Attendee> qli(mAttendees);
qli.toFirst();
while (qli) {
if (qli.current()->getName() == n)
return qli.current();
++qli;
}
return 0L;
}
#endif
Attendee *IncidenceBase::attendeeByMail(const QString &email)
{
QPtrListIterator<Attendee> qli(mAttendees);
diff --git a/libkcal/incidencebase.h b/libkcal/incidencebase.h
index e02d03a..f9a6558 100644
--- a/libkcal/incidencebase.h
+++ b/libkcal/incidencebase.h
@@ -55,97 +55,97 @@ class IncidenceBase : public CustomProperties
/** Set the unique id for the event */
void setUid(const QString &);
/** Return the unique id for the event */
QString uid() const;
/** Sets the time the incidence was last modified. */
void setLastModified(const QDateTime &lm);
/** Return the time the incidence was last modified. */
QDateTime lastModified() const;
/** sets the organizer for the event */
void setOrganizer(const QString &o);
QString organizer() const;
/** Set readonly status. */
virtual void setReadOnly( bool );
/** Return if the object is read-only. */
bool isReadOnly() const { return mReadOnly; }
/** for setting the event's starting date/time with a QDateTime. */
virtual void setDtStart(const QDateTime &dtStart);
/** returns an event's starting date/time as a QDateTime. */
QDateTime dtStart() const;
/** returns an event's starting time as a string formatted according to the
users locale settings */
QString dtStartTimeStr() const;
/** returns an event's starting date as a string formatted according to the
users locale settings */
QString dtStartDateStr(bool shortfmt=true) const;
/** returns an event's starting date and time as a string formatted according
to the users locale settings */
QString dtStartStr(bool shortfmt=true) const;
virtual void setDuration(int seconds);
int duration() const;
void setHasDuration(bool);
bool hasDuration() const;
/** Return true or false depending on whether the incidence "floats,"
* i.e. has a date but no time attached to it. */
bool doesFloat() const;
/** Set whether the incidence floats, i.e. has a date but no time attached to it. */
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; };
/** Return number of attendees. */
int attendeeCount() const { return mAttendees.count(); };
/** Return the Attendee with this email */
Attendee* attendeeByMail(const QString &);
/** Return first Attendee with one of this emails */
Attendee* attendeeByMails(const QStringList &, const QString& email = QString::null);
/** pilot syncronization states */
enum { SYNCNONE = 0, SYNCMOD = 1, SYNCDEL = 3 };
/** Set synchronisation satus. */
void setSyncStatus(int stat);
/** Return synchronisation status. */
int syncStatus() const;
/** Set Pilot Id. */
void setPilotId(int id);
/** Return Pilot Id. */
int pilotId() const;
void setTempSyncStat(int id);
int tempSyncStat() const;
void setIDStr( const QString & );
QString IDStr() const;
void setID( const QString &, const QString & );
QString getID( const QString & );
void setCsum( const QString &, const QString & );
QString getCsum( const QString & );
void removeID(const QString &);
void registerObserver( Observer * );
void unRegisterObserver( Observer * );
void updated();
protected:
bool mReadOnly;
QDateTime getEvenTime( QDateTime );
private:
// base components
QDateTime mDtStart;
QString mOrganizer;
QString mUid;