-rw-r--r-- | korganizer/main.cpp | 2 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 8 | ||||
-rw-r--r-- | libkcal/todo.cpp | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/korganizer/main.cpp b/korganizer/main.cpp index 9410c6a..4a0e24f 100644 --- a/korganizer/main.cpp +++ b/korganizer/main.cpp @@ -93,25 +93,25 @@ int main( int argc, char **argv ) a.showMainWidget(&m ); #else a.setMainWidget(&m ); m.show(); //m.resize( 800, 600 ); //QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); #endif if ( argc > 1 ) { QCString command = argv[1]; if ( argc > 2 ) command += argv[2]; m.recieve(command, QByteArray() ); } #ifndef DESKTOP_VERSION - QPEApplication::setTempScreenSaverMode ( QPEApplication::Disable ); + // QPEApplication::setTempScreenSaverMode ( QPEApplication::Disable ); #endif a.exec(); dumpMissing(); KPimGlobalPrefs::instance()->writeConfig(); } qDebug("KO: Bye! "); } diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 05e5087..c597138 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -2043,33 +2043,33 @@ void MainWindow::save() mSaveTimerStart = QDateTime::currentDateTime(); mSaveDelay = msec/1000; return; } } if ( mView->viewManager()->journalView() ) mView->viewManager()->journalView()->checkModified(); if ( !mCalendarModifiedFlag ) { qDebug("KO: Calendar not modified. Nothing saved."); return; } if ( mSyncManager->blockSave() ) { slotModifiedChanged( true ); return; } #ifndef DESKTOP_VERSION - QPEApplication::setTempScreenSaverMode ( QPEApplication::Disable ); + // QPEApplication::setTempScreenSaverMode ( QPEApplication::Disable ); #endif mSaveDelay = 0; mSyncManager->setBlockSave(true); if ( mView->checkAllFileVersions() ) { if ( KPimGlobalPrefs::instance()->mBackupEnabled ){ QDate reference ( 2000,1,1); int daysTo = reference.daysTo ( QDate::currentDate() ); if ( daysTo - KPimGlobalPrefs::instance()->mBackupDayCount >= KOPrefs::instance()->mLastBackupDate ) { backupAllFiles(); } ; // KPimGlobalPrefs::instance()->mLastBackupDate } QTime neededSaveTime; neededSaveTime.start(); if ( !isMinimized () ) setCaption(i18n("KO/Pi:Saving Data to File ..." )); @@ -2078,33 +2078,33 @@ void MainWindow::save() mCalendarModifiedFlag = false; int msNeeded = neededSaveTime.elapsed(); qDebug("KO: Needed %d ms for saving.",msNeeded ); QString savemes; savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 ); if ( !isMinimized () ) setCaption(savemes); else qDebug(savemes); } else { setCaption(i18n("Saving cancelled!")); mCalendarModifiedFlag = false; slotModifiedChanged( true ); } mSyncManager->setBlockSave( false ); #ifndef DESKTOP_VERSION - QPEApplication::setTempScreenSaverMode ( QPEApplication::Enable ); + //QPEApplication::setTempScreenSaverMode ( QPEApplication::Enable ); #endif } void MainWindow::keyReleaseEvent ( QKeyEvent * e) { if ( !e->isAutoRepeat() ) { mFlagKeyPressed = false; } } void MainWindow::keyPressEvent ( QKeyEvent * e ) { qApp->processEvents(); if ( e->isAutoRepeat() && !mFlagKeyPressed ) { e->ignore(); // qDebug(" ignore %d",e->isAutoRepeat() ); return; @@ -2499,38 +2499,38 @@ void MainWindow::configureAgenda( int item ) } void MainWindow::saveCalendar() { QString bupDir = KPimGlobalPrefs::instance()->mBackupDatadir; if ( KPimGlobalPrefs::instance()->mBackupUseDefaultDir) bupDir = KGlobalSettings::backupDataDir(); bupDir = KGlobal::formatMessage ( bupDir, 0 ); QString bupHint; if ( !KPimGlobalPrefs::instance()->mBackupEnabled ) bupHint = i18n("(Hint: You can enable automatic backup in the global settings!)"); if ( KMessageBox::warningContinueCancel( this, i18n("This will <b>backup all calendar files</b> to the directory %1 %2").arg(bupDir).arg(bupHint),i18n("Information") ) != KMessageBox::Continue ) return; bool enabled = KPimGlobalPrefs::instance()->mBackupEnabled; KPimGlobalPrefs::instance()->mBackupEnabled = false; save(); #ifndef DESKTOP_VERSION - QPEApplication::setTempScreenSaverMode ( QPEApplication::Disable ); + //QPEApplication::setTempScreenSaverMode ( QPEApplication::Disable ); #endif KPimGlobalPrefs::instance()->mBackupEnabled = enabled; backupAllFiles(); #ifndef DESKTOP_VERSION - QPEApplication::setTempScreenSaverMode ( QPEApplication::Enable ); + //QPEApplication::setTempScreenSaverMode ( QPEApplication::Enable ); #endif } void MainWindow::loadCalendar() { #if 0 QString fn = KOPrefs::instance()->mLastLoadFile; fn = KFileDialog::getOpenFileName( fn, i18n("Load backup filename"), this ); if ( fn == "" ) return; QFileInfo info; info.setFile( fn ); QString mess; bool loadbup = true; diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index 70a7711..29f725f 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp @@ -142,33 +142,33 @@ void Todo::timerSlotSaveRunningInfoToFile() if ( msecs > ( ( mCurrentTimerDelay * 1000 ) + 50 )) { qDebug("KO Todo::saveTimerTimeout restarting! millisecs %d", msecs - ( ( mCurrentTimerDelay * 1000 ) + 50 ) ); restartSaveTimer( SAVETIMER_TIMEOUT_RETRY_SECONDS ); return; } restartSaveTimer( SAVETIMER_TIMEOUT_SECONDS ); saveRunningInfoToFile( QString::null ); } void Todo::saveRunningInfoToFile() { mRunEnd = QDateTime::currentDateTime(); saveRunningInfoToFile( QString::null ); } void Todo::saveRunningInfoToFile( QString comment ) { #ifndef DESKTOP_VERSION - QPEApplication::setTempScreenSaverMode ( QPEApplication::Disable ); + //QPEApplication::setTempScreenSaverMode ( QPEApplication::Disable ); #endif //qDebug("Todo::saveRunningInfoToFile() %s", summary().latin1()); if ( mRunStart.secsTo ( mRunEnd) < 15 ) { qDebug("Running time < 15 seconds. Skipped. "); return; } QString dir = KGlobalSettings::timeTrackerDir(); //qDebug("%s ", dir.latin1()); QString file = "%1%2%3-%4%5%6-"; file = file.arg( mRunStart.date().year(), 4).arg( mRunStart.date().month(),2 ).arg( mRunStart.date().day(), 2 ).arg( mRunStart.time().hour(),2 ).arg( mRunStart.time().minute(),2 ).arg( mRunStart.time().second(),2 ); file.replace ( QRegExp (" "), "0" ); file += uid(); //qDebug("File %s ",file.latin1() ); CalendarLocal cal; cal.setLocalTime(); Todo * to = (Todo*) clone(); @@ -178,33 +178,33 @@ void Todo::saveRunningInfoToFile( QString comment ) to->setDtDue( mRunEnd ); to->setHasDueDate( true ); to->setUid( file ); if ( !comment.isEmpty() ) { QString des = to->description(); if ( des.isEmpty () ) to->setDescription( "TT-Note: " + comment ); else to->setDescription( "TT-Note: " + comment +"\n" + des ); } cal.addIncidence( to ); ICalFormat format( false ); file = dir +"/" +file +".ics"; format.save( &cal, file ); saveParents(); #ifndef DESKTOP_VERSION - QPEApplication::setTempScreenSaverMode ( QPEApplication::Enable ); + //QPEApplication::setTempScreenSaverMode ( QPEApplication::Enable ); #endif } void Todo::saveParents() { if (!relatedTo() ) return; Incidence * inc = relatedTo(); if ( inc->typeID() != todoID ) return; Todo* to = (Todo*)inc; bool saveTodo = false; QString file = KGlobalSettings::timeTrackerDir() + "/"+ to->uid() + ".ics"; QFileInfo fi ( file ); if ( fi.exists() ) { if ( fi.lastModified () < to->lastModified ()) saveTodo = true; |