-rw-r--r-- | korganizer/calendarview.cpp | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index d51187a..316826a 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -1252,4 +1252,19 @@ void CalendarView::addSuspendAlarm(const QDateTime &qdt, const QString ¬i ) //qDebug("Suspend Alarm timer started with secs: %d ", ms/1000); mSuspendTimer->start( ms , true ); +#ifdef DESKTOP_VERSION + if ( QApplication::desktop()->width() < 1024 ) { + QString mess = qdt.toString( "yyyy-MM-dd hh:mm:ss" ) + "\n" + noti; + //qDebug("nextsuspendalarm = \n%s ",mess.latin1() ); + QString fn = QDir::homeDirPath() + "/.kopi_suspend_alarm"; + QFile file( fn ); + if (!file.open( IO_WriteOnly ) ) { + qDebug("KO: Error writing next suspend alarm file %s\nContent: \n%s ", fn.latin1(), mess.latin1()); + } else { + QTextStream ts( &file ); + ts << mess; + file.close(); + } + } +#endif } @@ -1265,4 +1280,19 @@ void CalendarView::addAlarm(const QDateTime &qdt, const QString ¬i ) return; } +#ifdef DESKTOP_VERSION + if ( QApplication::desktop()->width() < 1024 ) { + QString mess = qdt.toString( "yyyy-MM-dd hh:mm:ss" ) + "\n" + noti; + //qDebug("nextalarm = \n%s ",mess.latin1() ); + QString fn = QDir::homeDirPath() + "/.kopi_next_alarm"; + QFile file( fn ); + if (!file.open( IO_WriteOnly ) ) { + qDebug("KO: Error writing next alarm file %s\nContent: \n%s ", fn.latin1(), mess.latin1()); + } else { + QTextStream ts( &file ); + ts << mess; + file.close(); + } + } +#endif int maxSec; //maxSec = 5; //testing only @@ -1278,5 +1308,5 @@ void CalendarView::addAlarm(const QDateTime &qdt, const QString ¬i ) } //qDebug("Alarm timer started with secs: %d ", sec); - mAlarmTimer->start( sec *1000 , true ); + mAlarmTimer->start( sec * 1000 , true ); } |