author | zautrix <zautrix> | 2004-08-09 11:07:44 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-08-09 11:07:44 (UTC) |
commit | 2d3e20244a156485f6001aa82c4494dfce177b8f (patch) (side-by-side diff) | |
tree | c5cc2cc6eaa79b6d6dd1c7dd27f29d3871d6a528 /libkcal/phoneformat.cpp | |
parent | b51c65d86224ee7d77e672fcfba5ea92d55eed0e (diff) | |
download | kdepimpi-2d3e20244a156485f6001aa82c4494dfce177b8f.zip kdepimpi-2d3e20244a156485f6001aa82c4494dfce177b8f.tar.gz kdepimpi-2d3e20244a156485f6001aa82c4494dfce177b8f.tar.bz2 |
minor fixes
-rw-r--r-- | libkcal/phoneformat.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/libkcal/phoneformat.cpp b/libkcal/phoneformat.cpp index 7e1c9cd..94744fb 100644 --- a/libkcal/phoneformat.cpp +++ b/libkcal/phoneformat.cpp @@ -161,26 +161,32 @@ public: QString alarmString = ""; if ( alarm ) { Alarm *alarm; if ( todo->alarms().count() > 0 ) alarm = todo->alarms().first(); else { alarm = new Alarm( todo ); todo->addAlarm( alarm ); } alarm->setType( Alarm::Audio ); alarm->setEnabled( true ); int alarmOffset = alarmDt.secsTo( todo->dtStart() ); - alarm->setStartOffset( alarmOffset ); + alarm->setStartOffset( -alarmOffset ); alarmString = QString::number( alarmOffset ); + } else { + Alarm *alarm; + if ( todo->alarms().count() > 0 ) { + alarm = todo->alarms().first(); + alarm->setEnabled( false ); + } } // csum ***************************************** QStringList attList; uint cSum; if ( todo->hasDueDate() ) attList << dtToString ( todo->dtDue() ); attList << QString::number( id ); attList << todo->summary(); attList << completedString; attList << QString::number( todo->priority() ); attList << alarmString; attList << todo->categoriesStr(); @@ -439,26 +445,32 @@ public: // strange 0 semms to mean: alarm enabled if ( alarm ) { Alarm *alarm; if ( event->alarms().count() > 0 ) alarm = event->alarms().first(); else { alarm = new Alarm( event ); event->addAlarm( alarm ); } alarm->setType( Alarm::Audio ); alarm->setEnabled( true ); int alarmOffset = alarmDt.secsTo( event->dtStart() ); - alarm->setStartOffset( alarmOffset ); + alarm->setStartOffset( -alarmOffset ); alarmString = QString::number( alarmOffset ); + } else { + Alarm *alarm; + if ( event->alarms().count() > 0 ) { + alarm = event->alarms().first(); + alarm->setEnabled( false ); + } } // csum ***************************************** QStringList attList; uint cSum; attList << dtToString ( event->dtStart() ); attList << dtToString ( event->dtEnd() ); attList << QString::number( id ); attList << event->summary(); attList << event->location(); attList << alarmString; attList << recurString; attList << event->categoriesStr(); |