summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-08-09 11:07:44 (UTC)
committer zautrix <zautrix>2004-08-09 11:07:44 (UTC)
commit2d3e20244a156485f6001aa82c4494dfce177b8f (patch) (side-by-side diff)
treec5cc2cc6eaa79b6d6dd1c7dd27f29d3871d6a528
parentb51c65d86224ee7d77e672fcfba5ea92d55eed0e (diff)
downloadkdepimpi-2d3e20244a156485f6001aa82c4494dfce177b8f.zip
kdepimpi-2d3e20244a156485f6001aa82c4494dfce177b8f.tar.gz
kdepimpi-2d3e20244a156485f6001aa82c4494dfce177b8f.tar.bz2
minor fixes
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--Makefile2
-rw-r--r--libkcal/phoneformat.cpp16
-rw-r--r--libkcal/sharpformat.cpp8
3 files changed, 23 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index cfaec5a..c1d07e4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,11 @@
#############################################################################
# Makefile for building: kopi-desktop
-# Generated by qmake (1.07a) (Qt 3.3.2) on: Sun Aug 8 12:23:00 2004
+# Generated by qmake (1.07a) (Qt 3.3.3) on: Mon Aug 9 12:10:32 2004
# Project: kopi-desktop.pro
# Template: subdirs
# Command: $(QMAKE) "CONFIG+=thread" "CONFIG+=debug" -o Makefile kopi-desktop.pro
#############################################################################
MAKEFILE = Makefile
QMAKE = qmake
DEL_FILE = rm -f
diff --git a/libkcal/phoneformat.cpp b/libkcal/phoneformat.cpp
index 7e1c9cd..94744fb 100644
--- a/libkcal/phoneformat.cpp
+++ b/libkcal/phoneformat.cpp
@@ -165,18 +165,24 @@ public:
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();
@@ -443,18 +449,24 @@ public:
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();
diff --git a/libkcal/sharpformat.cpp b/libkcal/sharpformat.cpp
index 4e54fdf..f8b066d 100644
--- a/libkcal/sharpformat.cpp
+++ b/libkcal/sharpformat.cpp
@@ -160,16 +160,18 @@ class SharpParser : public QObject
r->addMonthlyPos( pos, days );
} else if ( rtype == "4" ) {
if ( hasEndDate )
r->setYearly( Recurrence::rYearlyMonth, freq, endDate );
else
r->setYearly( Recurrence::rYearlyMonth, freq, -1 );
r->addYearlyNum( startDate.month() );
}
+ } else {
+ event->recurrence()->unsetRecurs();
}
QString categoryList = attList[1] ;
event->setCategories( lookupCategories( categoryList ) );
// strange 0 semms to mean: alarm enabled
if ( attList[8] == "0" ) {
Alarm *alarm;
@@ -178,16 +180,22 @@ class SharpParser : public QObject
else {
alarm = new Alarm( event );
event->addAlarm( alarm );
}
alarm->setType( Alarm::Audio );
alarm->setEnabled( true );
int alarmOffset = attList[9].toInt();
alarm->setStartOffset( alarmOffset * -60 );
+ } else {
+ Alarm *alarm;
+ if ( event->alarms().count() > 0 ) {
+ alarm = event->alarms().first();
+ alarm->setEnabled( false );
+ }
}
mCalendar->addEvent( event);
} else if ( qName == "Todo" ) {
Todo *todo;
todo = existingCalendar->todo( "Sharp_DTM", attList[0] );
if (todo )