-rw-r--r-- | korganizer/calendarview.cpp | 2 | ||||
-rw-r--r-- | korganizer/koeditordetails.cpp | 13 | ||||
-rw-r--r-- | korganizer/koeditordetails.h | 1 | ||||
-rw-r--r-- | korganizer/koeventviewer.cpp | 6 | ||||
-rw-r--r-- | libkcal/dndfactory.h | 9 |
5 files changed, 28 insertions, 3 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 74aefb7..96fb5ca 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -1518,8 +1518,9 @@ void CalendarView::insertBirthdays(const QString& uid, const QStringList& birthd bool CalendarView::addAnniversary( QDate date, QString name, KCal::Attendee* a, bool birthday) { //qDebug("addAnni "); Event * ev = new Event(); + ev->setOrganizer(KOPrefs::instance()->email()); if ( a ) { ev->addAttendee( a ); } QString kind; @@ -1530,9 +1531,8 @@ bool CalendarView::addAnniversary( QDate date, QString name, KCal::Attendee* a else { kind = i18n( "Anniversary" ); ev->setSummary( name + " (" + QString::number(date.year()) +") " + kind ); } - //ev->setOrganizer(a->email()); ev->setCategories( kind ); ev->setDtStart( QDateTime(date) ); ev->setDtEnd( QDateTime(date) ); ev->setFloats( true ); diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp index cf0a458..ef8025b 100644 --- a/korganizer/koeditordetails.cpp +++ b/korganizer/koeditordetails.cpp @@ -89,12 +89,16 @@ KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name) mListView->addColumn(i18n("RSVP"),35); if ( KOPrefs::instance()->mCompactDialogs ) { //mListView->setFixedHeight(78); } - + mListView->setAllColumnsShowFocus (true ); + //mListView->setSingleClick( true ); connect(mListView,SIGNAL(selectionChanged(QListViewItem *)), SLOT(updateAttendeeInput())); + connect(mListView,SIGNAL(executed(QListViewItem * ,const QPoint&, int )), + SLOT(itemClicked(QListViewItem * ,const QPoint& , int ))); + QLabel *attendeeLabel = new QLabel(this); attendeeLabel->setText(i18n("Name:")); attendeeLabel->setFixedSize( attendeeLabel->sizeHint() ); mNameEdit = new QLineEdit(this); @@ -420,8 +424,15 @@ void KOEditorDetails::setEnabledAttendeeInput( bool enabled ) mRemoveButton->setEnabled( enabled ); } +void KOEditorDetails::itemClicked(QListViewItem * item ,const QPoint & pnt, int c ) +{ + if ( item && c == 4 ) { + mRsvpButton->setChecked( !mRsvpButton->isChecked() ); + updateAttendeeItem(); + } +} void KOEditorDetails::updateAttendeeItem() { if (mDisableItemUpdate) return; diff --git a/korganizer/koeditordetails.h b/korganizer/koeditordetails.h index 0cc807f..a33ee82 100644 --- a/korganizer/koeditordetails.h +++ b/korganizer/koeditordetails.h @@ -82,8 +82,9 @@ class KOEditorDetails : public QWidget void openAddressBook(); void updateAttendeeInput(); void clearAttendeeInput(); void fillAttendeeInput(AttendeeListItem *); + void itemClicked(QListViewItem *,const QPoint & pnt, int c); void updateAttendeeItem(); void setEnabledAttendeeInput(bool); private: diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index 5de667e..2f0fa9e 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp @@ -416,8 +416,9 @@ void KOEventViewer::formatAttendees(Incidence *event) if (attendees.count()) { QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small); + QString NOiconPath = KGlobal::iconLoader()->iconPath("nomailappt",KIcon::Small); addTag("h3",i18n("Organizer")); mText.append("<ul><li>"); #ifndef KORG_NOKABC @@ -492,9 +493,12 @@ void KOEventViewer::formatAttendees(Incidence *event) if (!a->email().isEmpty()) { if (iconPath) { mText += "<a href=\"mailto:" + a->name() +" <" + a->email() + ">:" + mMailSubject + "\">"; - mText += "<IMG src=\"" + iconPath + "\">"; + if ( a->RSVP() ) + mText += "<IMG src=\"" + iconPath + "\">"; + else + mText += "<IMG src=\"" + NOiconPath + "\">"; mText += "</a>\n"; } } if (a->status() != Attendee::NeedsAction ) diff --git a/libkcal/dndfactory.h b/libkcal/dndfactory.h index 7e2ca04..2df5259 100644 --- a/libkcal/dndfactory.h +++ b/libkcal/dndfactory.h @@ -20,8 +20,10 @@ the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifdef DESKTOP_VERSION + #ifndef KCAL_DNDFACTORY_H #define KCAL_DNDFACTORY_H //#include "libkcal_export.h" @@ -71,4 +73,11 @@ class LIBKCAL_EXPORT DndFactory } #endif + +#else // dummy implementation for embedded +#include "dndfactory_dummy.h" +#define cutIncidence cutEvent +#define pasteIncidence pasteEvent +#define copyIncidence copyEvent +#endif |