Diffstat (limited to 'korganizer/koeventviewerdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koeventviewerdialog.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp index e5ff8af..02f13c7 100644 --- a/korganizer/koeventviewerdialog.cpp +++ b/korganizer/koeventviewerdialog.cpp @@ -119,78 +119,78 @@ void KOEventViewerDialog::setSyncMode( bool b ) void KOEventViewerDialog::setColorMode( int m ) { mEventViewer->setColorMode( m ); } int KOEventViewerDialog::executeS( bool local ) { mSyncResult = 3; if ( local ) findButton( User1 )->setFocus(); else findButton( Ok )->setFocus(); exec(); return mSyncResult; } void KOEventViewerDialog::updateConfig() { mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); } void KOEventViewerDialog::setEvent(Event *event) { mEventViewer->setEvent(event); mIncidence = event; mEventViewer->setFocus(); //findButton( Close )->setFocus(); if ( !mSyncMode ) { findButton( User1 )->setText( i18n("Agenda")); } } void KOEventViewerDialog::setIncidence(Incidence *in ) { - if ( in->type() == "Event" ) + if ( in->typeID() == eventID ) setEvent( (Event*) in ); - else if ( in->type() =="Todo" ) + else if ( in->typeID() == todoID ) setTodo( (Todo*) in ); - else if ( in->type() =="Journal" ) + else if ( in->typeID() == journalID ) setJournal( (Journal*) in ); } void KOEventViewerDialog::addIncidence(Incidence *in) { - if ( in->type() == "Event" ) + if ( in->typeID() == eventID ) addEvent( (Event*) in ); - else if ( in->type() =="Todo" ) + else if ( in->typeID() == todoID ) mEventViewer->setTodo( (Todo*) in, false ); - else if ( in->type() =="Journal" ) + else if ( in->typeID() == journalID ) mEventViewer->setJournal( (Journal*) in, false ); if ( mSyncMode ) { findButton( User1 )->setFocus(); setCaption(i18n("Conflict! Please choose entry")); } } void KOEventViewerDialog::addEvent(Event *event) { mEventViewer->addEvent(event); mIncidence = event; mEventViewer->setFocus(); //findButton( Close )->setFocus(); if ( !mSyncMode ) { findButton( User1 )->setText( i18n("Agenda")); } } void KOEventViewerDialog::setTodo(Todo *event) { mEventViewer->setTodo(event); mIncidence = (Incidence*)event; mEventViewer->setFocus(); //findButton( Close )->setFocus(); if ( !mSyncMode ) { findButton( User1 )->setText( i18n("Set complete")); } } void KOEventViewerDialog::setJournal(Journal *j) { mEventViewer->setJournal(j); mIncidence = (Incidence*)j; |