author | zautrix <zautrix> | 2005-07-04 15:52:09 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-04 15:52:09 (UTC) |
commit | 226171366bc79927988eac10e0bf7fc3f7faea69 (patch) (unidiff) | |
tree | fc2aef43c88d35bb4b59002bdfa25f7c45094f91 /korganizer/koeditorgeneral.cpp | |
parent | 7221ff029af217ae703e8217333bd9b170203181 (diff) | |
download | kdepimpi-226171366bc79927988eac10e0bf7fc3f7faea69.zip kdepimpi-226171366bc79927988eac10e0bf7fc3f7faea69.tar.gz kdepimpi-226171366bc79927988eac10e0bf7fc3f7faea69.tar.bz2 |
fixx
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 | |||
@@ -462,55 +462,49 @@ void KOEditorGeneral::fillCalCombo( int setToID ) | |||
462 | while ( kkf ) { | 462 | while ( kkf ) { |
463 | if ( !kkf->mErrorOnLoad &&! kkf->isReadOnly ) { | 463 | if ( !kkf->mErrorOnLoad &&! kkf->isReadOnly ) { |
464 | if ( setToID ) { | 464 | if ( setToID ) { |
465 | if ( kkf->mCalNumber == setToID ) | 465 | if ( kkf->mCalNumber == setToID ) |
466 | std = count; | 466 | std = count; |
467 | } else { | 467 | } else { |
468 | if ( kkf->isStandard ) { | 468 | if ( kkf->isStandard ) { |
469 | std = count; | 469 | std = count; |
470 | } | 470 | } |
471 | } | 471 | } |
472 | ++count; | 472 | ++count; |
473 | mCalendarBox->insertItem( kkf->mName ); | 473 | mCalendarBox->insertItem( kkf->mName ); |
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()); |
505 | 499 | ||
506 | #if 0 | 500 | #if 0 |
507 | // organizer information | 501 | // organizer information |
508 | mOwnerLabel->setText(i18n("Owner: ") + event->organizer()); | 502 | mOwnerLabel->setText(i18n("Owner: ") + event->organizer()); |
509 | #endif | 503 | #endif |
510 | 504 | ||
511 | enableAlarmEdit( event->isAlarmEnabled() ); | 505 | enableAlarmEdit( event->isAlarmEnabled() ); |
512 | //qDebug("KOEditorGeneral::readIncidence(Incidence *event) "); | 506 | //qDebug("KOEditorGeneral::readIncidence(Incidence *event) "); |
513 | if(!event->isAlarmEnabled()) { | 507 | if(!event->isAlarmEnabled()) { |
514 | // TODO: Implement a KPrefsComboItem to solve this in a clean way. | 508 | // TODO: Implement a KPrefsComboItem to solve this in a clean way. |
515 | int alarmTime; | 509 | int alarmTime; |
516 | int a[] = { 1,5,10,15,30,60,180, 1440 }; | 510 | int a[] = { 1,5,10,15,30,60,180, 1440 }; |