summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/main.cpp3
-rw-r--r--korganizer/mainwindow.cpp15
-rw-r--r--libkcal/todo.cpp12
3 files changed, 26 insertions, 4 deletions
diff --git a/korganizer/main.cpp b/korganizer/main.cpp
index a96f7c2..9410c6a 100644
--- a/korganizer/main.cpp
+++ b/korganizer/main.cpp
@@ -102,12 +102,15 @@ int main( int argc, char **argv )
if ( argc > 2 )
command += argv[2];
m.recieve(command, QByteArray() );
}
+#ifndef DESKTOP_VERSION
+ 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 d1e369c..05e5087 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -23,13 +23,13 @@
#include <qpe/global.h>
#include <qpe/qpetoolbar.h>
#include <qpe/resource.h>
#include <qpe/qpeapplication.h>
#include <qtopia/alarmserver.h>
#include <qtopia/qcopenvelope_qws.h>
-#include <unistd.h> // for sleep
+//#include <unistd.h> // for sleep
#else
#include <qtoolbar.h>
#include <qapplication.h>
//#include <resource.h>
#endif
@@ -2042,23 +2042,25 @@ void MainWindow::save()
mSaveTimer.start( msec, true );
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 );
+#endif
mSaveDelay = 0;
mSyncManager->setBlockSave(true);
if ( mView->checkAllFileVersions() ) {
if ( KPimGlobalPrefs::instance()->mBackupEnabled ){
QDate reference ( 2000,1,1);
int daysTo = reference.daysTo ( QDate::currentDate() );
@@ -2085,12 +2087,15 @@ void MainWindow::save()
} else {
setCaption(i18n("Saving cancelled!"));
mCalendarModifiedFlag = false;
slotModifiedChanged( true );
}
mSyncManager->setBlockSave( false );
+#ifndef DESKTOP_VERSION
+ QPEApplication::setTempScreenSaverMode ( QPEApplication::Enable );
+#endif
}
void MainWindow::keyReleaseEvent ( QKeyEvent * e)
{
if ( !e->isAutoRepeat() ) {
mFlagKeyPressed = false;
@@ -2503,14 +2508,20 @@ void MainWindow::saveCalendar()
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 );
+#endif
KPimGlobalPrefs::instance()->mBackupEnabled = enabled;
backupAllFiles();
+#ifndef DESKTOP_VERSION
+ QPEApplication::setTempScreenSaverMode ( QPEApplication::Enable );
+#endif
}
void MainWindow::loadCalendar()
{
#if 0
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp
index f7d40ad..70a7711 100644
--- a/libkcal/todo.cpp
+++ b/libkcal/todo.cpp
@@ -26,12 +26,16 @@
#include <qfileinfo.h>
#include "calendarlocal.h"
#include "icalformat.h"
#include "todo.h"
+#ifndef DESKTOP_VERSION
+#include <qpe/qpeapplication.h>
+#endif
+
#define SAVETIMER_TIMEOUT_SECONDS 300
//#define SAVETIMER_TIMEOUT_SECONDS 8
#define SAVETIMER_TIMEOUT_RETRY_SECONDS 5
using namespace KCal;
@@ -136,24 +140,26 @@ void Todo::timerSlotSaveRunningInfoToFile()
}
// qDebug("KO Todo::saveTimerTimeout restarting! millisecs %d", msecs - ( ( mCurrentTimerDelay * 1000 ) + 50 ) );
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 );
+#endif
//qDebug("Todo::saveRunningInfoToFile() %s", summary().latin1());
if ( mRunStart.secsTo ( mRunEnd) < 15 ) {
qDebug("Running time < 15 seconds. Skipped. ");
return;
}
QString dir = KGlobalSettings::timeTrackerDir();
@@ -181,13 +187,15 @@ void Todo::saveRunningInfoToFile( QString comment )
}
cal.addIncidence( to );
ICalFormat format( false );
file = dir +"/" +file +".ics";
format.save( &cal, file );
saveParents();
-
+#ifndef DESKTOP_VERSION
+ QPEApplication::setTempScreenSaverMode ( QPEApplication::Enable );
+#endif
}
void Todo::saveParents()
{
if (!relatedTo() )
return;
Incidence * inc = relatedTo();