author | zautrix <zautrix> | 2005-04-09 14:00:22 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-09 14:00:22 (UTC) |
commit | 16546abfab89df8dcf3168eaa7c0c346b8e400b4 (patch) (side-by-side diff) | |
tree | c5bad46ec2ee88cb1f6b1035dbfe1e367ee0cb0e /korganizer | |
parent | ab7957df1a71a392d71cb898b59a35c32461ec6a (diff) | |
download | kdepimpi-16546abfab89df8dcf3168eaa7c0c346b8e400b4.zip kdepimpi-16546abfab89df8dcf3168eaa7c0c346b8e400b4.tar.gz kdepimpi-16546abfab89df8dcf3168eaa7c0c346b8e400b4.tar.bz2 |
some fixes
-rw-r--r-- | korganizer/koeditorgeneralevent.cpp | 31 | ||||
-rw-r--r-- | korganizer/koeditorrecurrence.cpp | 6 | ||||
-rw-r--r-- | korganizer/kotodoeditor.cpp | 1 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 3 |
4 files changed, 25 insertions, 16 deletions
diff --git a/korganizer/koeditorgeneralevent.cpp b/korganizer/koeditorgeneralevent.cpp index 2a49528..d4aa78c 100644 --- a/korganizer/koeditorgeneralevent.cpp +++ b/korganizer/koeditorgeneralevent.cpp @@ -373,26 +373,33 @@ void KOEditorGeneralEvent::setDuration() mDurationLabel->setText(tmpStr); } void KOEditorGeneralEvent::emitDateTimeStr() { KLocale *l = KGlobal::locale(); - - QString from,to; - if (mNoTimeButton->isChecked()) { - from = l->formatDate(mCurrStartDateTime.date()); - to = l->formatDate(mCurrEndDateTime.date()); + QString startString = ""; + if ( mCurrStartDateTime.date() < mCurrEndDateTime.date() ) { + if ( mNoTimeButton->isChecked() ) { + startString = i18n("From: ") + l->formatDate(mCurrStartDateTime.date() ); + startString += "\n"+i18n("To: ")+ l->formatDate(mCurrEndDateTime.date()); + + } else { + startString = i18n("From: ") +l->formatDateTime(mCurrStartDateTime, false); + startString += "\n"+i18n("To: ")+l->formatDateTime(mCurrEndDateTime, false); + } } else { - from = l->formatDateTime(mCurrStartDateTime); - to = l->formatDateTime(mCurrEndDateTime); + if ( mNoTimeButton->isChecked() ) { + startString = i18n("On: ") + l->formatDate(mCurrStartDateTime.date() ); + } else { + startString = i18n("From: ") + KGlobal::locale()->formatTime(mCurrStartDateTime.time())+ + "-"+KGlobal::locale()->formatTime(mCurrEndDateTime.time()); + startString += i18n(" on ")+KGlobal::locale()->formatDate( mCurrStartDateTime.date(), true); + } } - - QString str = i18n("From: %1 To: %2 %3").arg(from).arg(to) - .arg(mDurationLabel->text()); - - emit dateTimeStrChanged(str); + startString +="\n"+mDurationLabel->text(); + emit dateTimeStrChanged(startString); } bool KOEditorGeneralEvent::validateInput() { if (!mStartDateEdit->inputIsValid()) { diff --git a/korganizer/koeditorrecurrence.cpp b/korganizer/koeditorrecurrence.cpp index bf81b01..01c5773 100644 --- a/korganizer/koeditorrecurrence.cpp +++ b/korganizer/koeditorrecurrence.cpp @@ -726,13 +726,13 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) : mEnabledCheck = new QCheckBox( i18n("Enable Recurrence"), this ); connect( mEnabledCheck, SIGNAL( toggled( bool ) ), SLOT( setEnabled( bool ) ) ); topLayout->addMultiCellWidget( mEnabledCheck, 0, 0, 0, 1 ); - mTimeGroupBox = new QGroupBox( 1, Horizontal, i18n("Appointment Time "), + mTimeGroupBox = new QGroupBox( 1, Horizontal, i18n("Time"), this ); topLayout->addMultiCellWidget( mTimeGroupBox, 1, 1 , 0 , 1 ); if ( QApplication::desktop()->width() <= 320) { mTimeGroupBox->hide(); } @@ -741,14 +741,14 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) : // QBoxLayout *layoutTimeFrame = new QHBoxLayout( timeFrame ); // layoutTimeFrame->setSpacing( KDialog::spacingHint() ); mDateTimeLabel = new QLabel( mTimeGroupBox ); // mDateTimeLabel = new QLabel( timeFrame ); // layoutTimeFrame->addWidget( mDateTimeLabel ); - - + //mTimeGroupBox->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Maximum ) ); + //mDateTimeLabel->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Maximum) ); mRuleBox = new QGroupBox( 1, Horizontal, i18n("Recurrence Rule"), this ); topLayout->addMultiCellWidget( mRuleBox, 2, 2, 0, 1 ); mRecurrenceChooser = new RecurrenceChooser( mRuleBox ); connect( mRecurrenceChooser, SIGNAL( chosen( int ) ), SLOT( showCurrentRule( int ) ) ); diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp index 51e2524..6a05cc8 100644 --- a/korganizer/kotodoeditor.cpp +++ b/korganizer/kotodoeditor.cpp @@ -69,12 +69,13 @@ KOTodoEditor::~KOTodoEditor() void KOTodoEditor::init() { setupGeneral(); setupAttendeesTab(); setupRecurrence(); connect(mGeneral,SIGNAL(datesChecked()),this ,SLOT(checkRecurrence())); + mRecurrence->setDateTimeStr( i18n("<i>The recurrence is computed from the start datetime!</i>") ); } void KOTodoEditor::setupRecurrence() { QFrame *topFrame = addPage( i18n("Recurrence") ); QBoxLayout *topLayout = new QVBoxLayout( topFrame ); diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 94f4677..ffc4d9a 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -1584,13 +1584,14 @@ void MainWindow::processIncidenceSelection( Incidence *incidence ) } } else { if ( incidence->dtStart().time() != incidence->dtEnd().time() ) startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+ "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); - if ( incidence->categories().contains( i18n("Birthday") ) || incidence->categories().contains( i18n("Anniversary") ) ) { + + if ( incidence->isBirthday() || incidence->isAnniversary() ) { bool ok; QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok ); if ( ok ) { int years = noc.date().year() - incidence->dtStart().date().year(); startString += i18n(" (%1 y.)"). arg( years ); } |