Diffstat (limited to 'korganizer/koeditorgeneral.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | korganizer/koeditorgeneral.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp index fd50b05..aa55d82 100644 --- a/korganizer/koeditorgeneral.cpp +++ b/korganizer/koeditorgeneral.cpp | |||
@@ -474,31 +474,25 @@ void KOEditorGeneral::fillCalCombo( int setToID ) | |||
474 | } | 474 | } |
475 | kkf = KOPrefs::instance()->mCalendars.next(); | 475 | kkf = KOPrefs::instance()->mCalendars.next(); |
476 | } | 476 | } |
477 | mCalendarBox->setCurrentItem( std ); | 477 | mCalendarBox->setCurrentItem( std ); |
478 | if ( KOPrefs::instance()->mCalendars.count() == 1 ) | 478 | if ( KOPrefs::instance()->mCalendars.count() == 1 ) |
479 | mCalendarBox->hide(); | 479 | mCalendarBox->hide(); |
480 | else | 480 | else |
481 | mCalendarBox->show(); | 481 | mCalendarBox->show(); |
482 | 482 | ||
483 | } | 483 | } |
484 | int KOEditorGeneral::getCalendarID() | 484 | int KOEditorGeneral::getCalendarID() |
485 | { | 485 | { |
486 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); | 486 | return KOPrefs::instance()->getCalendarID( mCalendarBox->currentText() ); |
487 | while ( kkf ) { | ||
488 | if ( mCalendarBox->currentText() == kkf->mName) | ||
489 | return kkf->mCalNumber; | ||
490 | kkf = KOPrefs::instance()->mCalendars.next(); | ||
491 | } | ||
492 | return 1; | ||
493 | } | 487 | } |
494 | 488 | ||
495 | void KOEditorGeneral::readIncidence(Incidence *event) | 489 | void KOEditorGeneral::readIncidence(Incidence *event) |
496 | { | 490 | { |
497 | fillCalCombo( event->calID() ); | 491 | fillCalCombo( event->calID() ); |
498 | mAlarmMessage = event->summary(); | 492 | mAlarmMessage = event->summary(); |
499 | if ( ! event->location().isEmpty() ) | 493 | if ( ! event->location().isEmpty() ) |
500 | mAlarmMessage += " ("+event->location()+")"; | 494 | mAlarmMessage += " ("+event->location()+")"; |
501 | mAlarmIncrCombo->setCurrentItem(0); | 495 | mAlarmIncrCombo->setCurrentItem(0); |
502 | mSummaryEdit->setEditText(event->summary()); | 496 | mSummaryEdit->setEditText(event->summary()); |
503 | mLocationEdit->setEditText(event->location()); | 497 | mLocationEdit->setEditText(event->location()); |
504 | mDescriptionEdit->setText(event->description()); | 498 | mDescriptionEdit->setText(event->description()); |