-rw-r--r-- | korganizer/calendarview.cpp | 47 |
1 files changed, 26 insertions, 21 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index fd026fa..70a1d2d 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -784,5 +784,5 @@ void CalendarView::startAlarm( QString mess , QString filename) mAlarmDialog->eventNotification( mess, KOPrefs::instance()->mAlarmPlayBeeps, filename, true,KOPrefs::instance()->mAlarmBeepInterval ,KOPrefs::instance()->mAlarmSuspendCount ); - QTimer::singleShot( 3000, this, SLOT( checkNextTimerAlarm() ) ); + QTimer::singleShot( 2000, this, SLOT( checkNextTimerAlarm() ) ); } @@ -927,10 +927,14 @@ void CalendarView::recheckTimerAlarm() mCalendar->checkAlarmForIncidence( 0, true ); } +#ifndef DESKTOP_VERSION void CalendarView::removeAlarm(const QDateTime &qdt, const QString ¬i ) +#else +void CalendarView::removeAlarm(const QDateTime &, const QString & ) +#endif { //qDebug("-----removeAlarm %s %s ", qdt.toString().latin1() , noti.latin1() ); if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { #ifndef DESKTOP_VERSION - AlarmServer::deleteAlarm (qdt ,"koalarm" ,noti.latin1() ); + AlarmServer::deleteAlarm (qdt ,"koalarm" ,noti.utf8() ); #endif return; @@ -1211,5 +1215,4 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int QString uid; int take; - Event* eventL; Event* eventRSync; Event* eventLSync; @@ -2311,9 +2314,14 @@ void CalendarView::readSettings() } - +void CalendarView::checkSuspendAlarm() +{ + if ( mSuspendTimer->isActive() ) { + KMessageBox::information( this, i18n("<b>WARNING:</b> There is a pending suspended alarm!"), i18n("Pending Suspend Alarm")); + } +} void CalendarView::writeSettings() { // kdDebug() << "CalendarView::writeSettings" << endl; - + KConfig *config = KOGlobals::config(); @@ -2795,6 +2803,5 @@ void CalendarView::removeCategories() QStringList newCatList; Incidence* inc = incList.first(); - int i; - int count = 0; + uint i; while ( inc ) { newCatList.clear(); @@ -2816,5 +2823,5 @@ int CalendarView::addCategories() QStringList catIncList; Incidence* inc = incList.first(); - int i; + uint i; int count = 0; while ( inc ) { @@ -2946,13 +2953,15 @@ void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel ) } } + +#ifndef DESKTOP_VERSION void CalendarView::beamDone( Ir *ir ) { -#ifndef DESKTOP_VERSION delete ir; -#endif topLevelWidget()->setCaption( i18n("KO/Pi: Beaming done.") ); topLevelWidget()->raise(); } - +#else +void CalendarView::beamDone( Ir *){;} +#endif void CalendarView::moveIncidence(Incidence * inc ) { @@ -4308,9 +4317,4 @@ Todo *CalendarView::selectedTodo() } -void CalendarView::dialogClosing(Incidence *in) -{ - // mDialogList.remove(in); -} - void CalendarView::showIncidence() { @@ -4433,8 +4437,5 @@ void CalendarView::purgeCompleted() QPtrList<Todo> rootTodos; //QPtrList<Incidence> rel; - Todo *aTodo;//, *rTodo; - Incidence *rIncidence; - bool childDelete = false; - bool deletedOne = true; + Todo *aTodo; todoCal = calendar()->todos(); for (aTodo = todoCal.first(); aTodo; aTodo = todoCal.next()) { @@ -4464,5 +4465,7 @@ void CalendarView::keyPressEvent ( QKeyEvent *e) bool CalendarView::sync(KSyncManager* manager, QString filename, int mode) { - // mSyncManager = manager; + + if ( manager != mSyncManager) + qDebug("KO: Internal error-1. SyncManager mismatch "); if ( filename == QDir::homeDirPath ()+"/.kdecalendardump.ics" ) { qDebug("KO: SyncKDE request detected!"); @@ -4475,4 +4478,6 @@ bool CalendarView::syncExternal(KSyncManager* manager, QString resource) { //mSyncManager = manager; + if ( manager != mSyncManager) + qDebug("KO: Internal error-2. SyncManager mismatch "); mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice(); mCurrentSyncName = mSyncManager->getCurrentSyncName(); |