summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-04-04 18:24:25 (UTC)
committer zautrix <zautrix>2005-04-04 18:24:25 (UTC)
commitff205358654ed8741f0008eabd64a0e8b0476b61 (patch) (unidiff)
tree52844c5c14286c463fc11b132b6d92cd6d72c96c
parent13fa1e5e1d5e4663bbbc79e0c68caf725ad2e31b (diff)
downloadkdepimpi-ff205358654ed8741f0008eabd64a0e8b0476b61.zip
kdepimpi-ff205358654ed8741f0008eabd64a0e8b0476b61.tar.gz
kdepimpi-ff205358654ed8741f0008eabd64a0e8b0476b61.tar.bz2
fix
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koagenda.cpp1
-rw-r--r--korganizer/koagendaview.cpp3
-rw-r--r--libkcal/calendarlocal.cpp2
3 files changed, 4 insertions, 2 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index de964da..b5d52d2 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -378,24 +378,25 @@ bool KOAgenda::eventFilter ( QObject *object, QEvent *event )
378 return QScrollView::eventFilter(object,event); 378 return QScrollView::eventFilter(object,event);
379 } 379 }
380} 380}
381void KOAgenda::popupMenu() 381void KOAgenda::popupMenu()
382{ 382{
383 mPopupTimer->stop(); 383 mPopupTimer->stop();
384 if ( mPopupKind == 1 ) { 384 if ( mPopupKind == 1 ) {
385 if (mActionItem ) { 385 if (mActionItem ) {
386 endItemAction(); 386 endItemAction();
387 } 387 }
388 mLeftMouseDown = false; // no more leftMouse computation 388 mLeftMouseDown = false; // no more leftMouse computation
389 if (mPopupItem) { 389 if (mPopupItem) {
390 //mClickedItem = mPopupItem;
390 selectItem(mPopupItem); 391 selectItem(mPopupItem);
391 if ( mAllAgendaPopup ) 392 if ( mAllAgendaPopup )
392 mAllAgendaPopup->installEventFilter( this ); 393 mAllAgendaPopup->installEventFilter( this );
393 emit showIncidencePopupSignal(mPopupItem->incidence()); 394 emit showIncidencePopupSignal(mPopupItem->incidence());
394 395
395 } 396 }
396 } else if ( mPopupKind == 2 ) { 397 } else if ( mPopupKind == 2 ) {
397 if ( mLeftMouseDown ) { // we have a simulated right click - clear left mouse action 398 if ( mLeftMouseDown ) { // we have a simulated right click - clear left mouse action
398 endSelectAction( false ); // do not emit new event signal 399 endSelectAction( false ); // do not emit new event signal
399 mLeftMouseDown = false; // no more leftMouse computation 400 mLeftMouseDown = false; // no more leftMouse computation
400 } 401 }
401 mNewItemPopup->installEventFilter( this ); 402 mNewItemPopup->installEventFilter( this );
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index 6d1e6d5..20a5b74 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -455,29 +455,30 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
455 agendaLayout->addWidget(mTimeLabels,2,0); 455 agendaLayout->addWidget(mTimeLabels,2,0);
456 connect(mTimeLabels,SIGNAL( scaleChanged()), 456 connect(mTimeLabels,SIGNAL( scaleChanged()),
457 this,SLOT(updateConfig())); 457 this,SLOT(updateConfig()));
458 458
459 // Create agenda 459 // Create agenda
460 mAgenda = new KOAgenda(1,96,KOPrefs::instance()->mHourSize,agendaFrame); 460 mAgenda = new KOAgenda(1,96,KOPrefs::instance()->mHourSize,agendaFrame);
461 agendaLayout->addMultiCellWidget(mAgenda,2,2,1,2); 461 agendaLayout->addMultiCellWidget(mAgenda,2,2,1,2);
462 agendaLayout->setColStretch(1,1); 462 agendaLayout->setColStretch(1,1);
463 mAgenda->setFocusPolicy(NoFocus); 463 mAgenda->setFocusPolicy(NoFocus);
464 // Create event context menu for agenda 464 // Create event context menu for agenda
465 mAllAgendaPopup = eventPopup(); 465 mAllAgendaPopup = eventPopup();
466 466
467#if 0
467 mAllAgendaPopup->addAdditionalItem(QIconSet(SmallIcon("bell")), 468 mAllAgendaPopup->addAdditionalItem(QIconSet(SmallIcon("bell")),
468 i18n("Toggle Alarm"),mAgenda, 469 i18n("Toggle Alarm"),mAgenda,
469 SLOT(popupAlarm()),true); 470 SLOT(popupAlarm()),true);
470 471
471 472#endif
472 connect(mAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)), 473 connect(mAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)),
473 mAllAgendaPopup,SLOT(showIncidencePopup(Incidence *))); 474 mAllAgendaPopup,SLOT(showIncidencePopup(Incidence *)));
474 475
475 connect(mAllDayAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)), 476 connect(mAllDayAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)),
476 mAllAgendaPopup,SLOT(showIncidencePopup(Incidence *))); 477 mAllAgendaPopup,SLOT(showIncidencePopup(Incidence *)));
477 mAgenda->setPopup( mAllAgendaPopup ); 478 mAgenda->setPopup( mAllAgendaPopup );
478 mAllDayAgenda->setPopup( mAllAgendaPopup ); 479 mAllDayAgenda->setPopup( mAllAgendaPopup );
479 // make connections between dependent widgets 480 // make connections between dependent widgets
480 mTimeLabels->setAgenda(mAgenda); 481 mTimeLabels->setAgenda(mAgenda);
481 482
482 // Update widgets to reflect user preferences 483 // Update widgets to reflect user preferences
483 // updateConfig(); 484 // updateConfig();
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp
index 5c889c3..00a43e5 100644
--- a/libkcal/calendarlocal.cpp
+++ b/libkcal/calendarlocal.cpp
@@ -289,25 +289,24 @@ void CalendarLocal::checkAlarmForIncidence( Incidence * incidence, bool deleted
289{ 289{
290 //mNextAlarmIncidence 290 //mNextAlarmIncidence
291 //mNextAlarmDateTime 291 //mNextAlarmDateTime
292 //return mNextSummary; 292 //return mNextSummary;
293 //return mNextAlarmEventDateTime; 293 //return mNextAlarmEventDateTime;
294 bool newNextAlarm = false; 294 bool newNextAlarm = false;
295 bool computeNextAlarm = false; 295 bool computeNextAlarm = false;
296 bool ok; 296 bool ok;
297 int offset; 297 int offset;
298 QDateTime nextA; 298 QDateTime nextA;
299 // QString nextSum; 299 // QString nextSum;
300 //QDateTime nextEvent; 300 //QDateTime nextEvent;
301 mNextAlarmEventDateTime = QDateTime();
302 if ( mNextAlarmIncidence == 0 || incidence == 0 ) { 301 if ( mNextAlarmIncidence == 0 || incidence == 0 ) {
303 computeNextAlarm = true; 302 computeNextAlarm = true;
304 } else { 303 } else {
305 if ( ! deleted ) { 304 if ( ! deleted ) {
306 nextA = incidence->getNextAlarmDateTime(& ok, &offset ) ; 305 nextA = incidence->getNextAlarmDateTime(& ok, &offset ) ;
307 if ( ok ) { 306 if ( ok ) {
308 if ( nextA < mNextAlarmDateTime ) { 307 if ( nextA < mNextAlarmDateTime ) {
309 deRegisterAlarm(); 308 deRegisterAlarm();
310 mNextAlarmDateTime = nextA; 309 mNextAlarmDateTime = nextA;
311 mNextSummary = incidence->summary(); 310 mNextSummary = incidence->summary();
312 mNextAlarmEventDateTime = nextA.addSecs(offset ) ; 311 mNextAlarmEventDateTime = nextA.addSecs(offset ) ;
313 mNextAlarmEventDateTimeString = KGlobal::locale()->formatDateTime(mNextAlarmEventDateTime); 312 mNextAlarmEventDateTimeString = KGlobal::locale()->formatDateTime(mNextAlarmEventDateTime);
@@ -365,24 +364,25 @@ void CalendarLocal::registerAlarm()
365 emit addAlarm ( mNextAlarmDateTime, mLastAlarmNotificationString ); 364 emit addAlarm ( mNextAlarmDateTime, mLastAlarmNotificationString );
366// #ifndef DESKTOP_VERSION 365// #ifndef DESKTOP_VERSION
367// AlarmServer::addAlarm ( mNextAlarmDateTime,"koalarm", mLastAlarmNotificationString.latin1() ); 366// AlarmServer::addAlarm ( mNextAlarmDateTime,"koalarm", mLastAlarmNotificationString.latin1() );
368// #endif 367// #endif
369} 368}
370void CalendarLocal::deRegisterAlarm() 369void CalendarLocal::deRegisterAlarm()
371{ 370{
372 if ( mLastAlarmNotificationString.isNull() ) 371 if ( mLastAlarmNotificationString.isNull() )
373 return; 372 return;
374 //qDebug("-- deregister Alarm %s ", mLastAlarmNotificationString.latin1() ); 373 //qDebug("-- deregister Alarm %s ", mLastAlarmNotificationString.latin1() );
375 374
376 emit removeAlarm ( mNextAlarmDateTime, mLastAlarmNotificationString ); 375 emit removeAlarm ( mNextAlarmDateTime, mLastAlarmNotificationString );
376 mNextAlarmEventDateTime = QDateTime();
377// #ifndef DESKTOP_VERSION 377// #ifndef DESKTOP_VERSION
378// AlarmServer::deleteAlarm (mNextAlarmDateTime ,"koalarm" ,mLastAlarmNotificationString.latin1() ); 378// AlarmServer::deleteAlarm (mNextAlarmDateTime ,"koalarm" ,mLastAlarmNotificationString.latin1() );
379// #endif 379// #endif
380} 380}
381 381
382QPtrList<Todo> CalendarLocal::todos( const QDate &date ) 382QPtrList<Todo> CalendarLocal::todos( const QDate &date )
383{ 383{
384 QPtrList<Todo> todos; 384 QPtrList<Todo> todos;
385 385
386 Todo *todo; 386 Todo *todo;
387 for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) { 387 for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) {
388 if ( todo->hasDueDate() && todo->dtDue().date() == date ) { 388 if ( todo->hasDueDate() && todo->dtDue().date() == date ) {