summaryrefslogtreecommitdiffabout
path: root/korganizer/koeditorgeneral.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/koeditorgeneral.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeditorgeneral.cpp8
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 )
}
kkf = KOPrefs::instance()->mCalendars.next();
}
mCalendarBox->setCurrentItem( std );
if ( KOPrefs::instance()->mCalendars.count() == 1 )
mCalendarBox->hide();
else
mCalendarBox->show();
}
int KOEditorGeneral::getCalendarID()
{
- KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first();
- while ( kkf ) {
- if ( mCalendarBox->currentText() == kkf->mName)
- return kkf->mCalNumber;
- kkf = KOPrefs::instance()->mCalendars.next();
- }
- return 1;
+ return KOPrefs::instance()->getCalendarID( mCalendarBox->currentText() );
}
void KOEditorGeneral::readIncidence(Incidence *event)
{
fillCalCombo( event->calID() );
mAlarmMessage = event->summary();
if ( ! event->location().isEmpty() )
mAlarmMessage += " ("+event->location()+")";
mAlarmIncrCombo->setCurrentItem(0);
mSummaryEdit->setEditText(event->summary());
mLocationEdit->setEditText(event->location());
mDescriptionEdit->setText(event->description());