-rw-r--r-- | korganizer/koagendaview.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 1b21a71..ef5c4dd 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -77,5 +77,5 @@ extern int globalFlagBlockLabel; | |||
77 | using namespace KOrg; | 77 | using namespace KOrg; |
78 | 78 | ||
79 | #define IDLETIMEOUT 15 | 79 | #define IDLETIMEOUT 45 |
80 | 80 | ||
81 | TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,WFlags f) : | 81 | TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,WFlags f) : |
@@ -574,26 +574,28 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : | |||
574 | connect( mAllDayAgenda, SIGNAL( signalClearSelection() ),mAgenda, SLOT( slotClearSelection()) ); | 574 | connect( mAllDayAgenda, SIGNAL( signalClearSelection() ),mAgenda, SLOT( slotClearSelection()) ); |
575 | connect( mAgenda, SIGNAL( signalClearSelection() ),mAllDayAgenda, SLOT( slotClearSelection()) ); | 575 | connect( mAgenda, SIGNAL( signalClearSelection() ),mAllDayAgenda, SLOT( slotClearSelection()) ); |
576 | #ifndef DESKTOP_VERSION | ||
576 | connect( mAllDayAgenda, SIGNAL( updateViewSignal() ),this, SLOT( fillAgenda()) ); | 577 | connect( mAllDayAgenda, SIGNAL( updateViewSignal() ),this, SLOT( fillAgenda()) ); |
577 | connect( mAgenda, SIGNAL( updateViewSignal() ), this, SLOT( fillAgenda()) ); | 578 | connect( mAgenda, SIGNAL( updateViewSignal() ), this, SLOT( fillAgenda()) ); |
578 | |||
579 | connect( mAllDayAgenda, SIGNAL( sendPing() ),this, SLOT( startIdleTimeout()) ); | 579 | connect( mAllDayAgenda, SIGNAL( sendPing() ),this, SLOT( startIdleTimeout()) ); |
580 | connect( mAgenda, SIGNAL( sendPing() ), this, SLOT( startIdleTimeout()) ); | 580 | connect( mAgenda, SIGNAL( sendPing() ), this, SLOT( startIdleTimeout()) ); |
581 | |||
582 | |||
583 | mIdleTimer = new QTimer ( this );; | 581 | mIdleTimer = new QTimer ( this );; |
584 | connect(mIdleTimer,SIGNAL(timeout()),SLOT(slotIdleTimeout())); | 582 | connect(mIdleTimer,SIGNAL(timeout()),SLOT(slotIdleTimeout())); |
583 | #endif | ||
585 | } | 584 | } |
586 | void KOAgendaView::startIdleTimeout() | 585 | void KOAgendaView::startIdleTimeout() |
587 | { | 586 | { |
587 | #ifndef DESKTOP_VERSION | ||
588 | mIdleStart = QDateTime::currentDateTime(); | 588 | mIdleStart = QDateTime::currentDateTime(); |
589 | mIdleTimer->start( IDLETIMEOUT * 1000 ); | 589 | mIdleTimer->start( IDLETIMEOUT * 1000 ); |
590 | #endif | ||
590 | } | 591 | } |
591 | void KOAgendaView::slotIdleTimeout() | 592 | void KOAgendaView::slotIdleTimeout() |
592 | { | 593 | { |
593 | qDebug("SECS TO %d ",mIdleStart.secsTo( QDateTime::currentDateTime() ) ); | 594 | #ifndef DESKTOP_VERSION |
595 | //qDebug("SECS TO %d ",mIdleStart.secsTo( QDateTime::currentDateTime() ) ); | ||
594 | int secsfromstart = mIdleStart.secsTo( QDateTime::currentDateTime() ); | 596 | int secsfromstart = mIdleStart.secsTo( QDateTime::currentDateTime() ); |
595 | mIdleTimer->stop(); | 597 | mIdleTimer->stop(); |
596 | bool isActice = topLevelWidget()->isActiveWindow(); | 598 | bool isActice = topLevelWidget()->isActiveWindow(); |
597 | qDebug("KO: Active Window %d %d", isActice, isVisible()); | 599 | //qDebug("KO: Active Window %d %d", isActice, isVisible()); |
598 | // we do nothing if we wake up from a suspend | 600 | // we do nothing if we wake up from a suspend |
599 | if ( secsfromstart > IDLETIMEOUT + 30 && isActice ) { | 601 | if ( secsfromstart > IDLETIMEOUT + 30 && isActice ) { |
@@ -607,4 +609,5 @@ void KOAgendaView::slotIdleTimeout() | |||
607 | KOAgendaItem::paintPix()->resize( 20,20); | 609 | KOAgendaItem::paintPix()->resize( 20,20); |
608 | KOAgendaItem::paintPixAllday()->resize( 20,20); | 610 | KOAgendaItem::paintPixAllday()->resize( 20,20); |
611 | #endif | ||
609 | 612 | ||
610 | } | 613 | } |