author | zautrix <zautrix> | 2005-01-30 20:31:35 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-30 20:31:35 (UTC) |
commit | 15c5772f8a54750115f82aea34fea47e5842ff4f (patch) (side-by-side diff) | |
tree | 13c31b5fd3d41058b65a392acf17ee3efd230f33 | |
parent | 23d345c877ae9de6a077af3705026d15bb04d1e3 (diff) | |
download | kdepimpi-15c5772f8a54750115f82aea34fea47e5842ff4f.zip kdepimpi-15c5772f8a54750115f82aea34fea47e5842ff4f.tar.gz kdepimpi-15c5772f8a54750115f82aea34fea47e5842ff4f.tar.bz2 |
fix
-rw-r--r-- | korganizer/koagenda.cpp | 35 | ||||
-rw-r--r-- | korganizer/kodaymatrix.cpp | 7 | ||||
-rw-r--r-- | korganizer/kotodoview.cpp | 4 | ||||
-rw-r--r-- | korganizer/koviewmanager.cpp | 4 | ||||
-rw-r--r-- | korganizer/kowhatsnextview.cpp | 1 |
5 files changed, 29 insertions, 22 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index 0aef929..ffa2678 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp @@ -429,46 +429,52 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) startItemAction(viewportPos); startX = viewportPos.x(); startY = viewportPos.y(); block = true; } } } } else { selectItem(0); mActionItem = 0; if (me->button() == RightButton ) { blockNewEvent = true; - //qDebug("right "); - int x,y; - viewportToContents(viewportPos.x(),viewportPos.y(),x,y); - int gx,gy; - contentsToGrid(x,y,gx,gy); - mStartCellX = gx; - mStartCellY = gy; - mCurrentCellX = gx; - mCurrentCellY = gy; - mNewItemPopup->popup( viewport()->mapToGlobal( me->pos() ) ); - + block = false; } else { blockNewEvent = false; setCursor(arrowCursor); startSelectAction(viewportPos); } } break; case QEvent::MouseButtonRelease: - //qDebug("QEvent::MouseButtonRelease: "); - if (me->button() == RightButton && block ) { + //qDebug("QEvent::MouseButtonRelease: %d",blockNewEvent ); + if (me->button() == RightButton && blockNewEvent && !block) { + int x,y; + viewportToContents(viewportPos.x(),viewportPos.y(),x,y); + int gx,gy; + contentsToGrid(x,y,gx,gy); + if ( mCurrentCellY < mStartCellY +1 ) { + //qDebug("mCurrentCellY %d mStartCellY %d ", mCurrentCellY,mStartCellY); + mCurrentCellX = gx; + mCurrentCellY = gy; + mStartCellX = gx; + mStartCellY = gy; + mNewItemPopup->popup( viewport()->mapToGlobal( me->pos() ) ); + break; + } else { + blockNewEvent = false; + } + } else if (me->button() == RightButton && block ) { if (object != viewport()) { mClickedItem = (KOAgendaItem *)object; if (mActionItem ) { endItemAction(); } if (mClickedItem) { selectItem(mClickedItem); emit showIncidencePopupSignal(mClickedItem->incidence()); } } break; } @@ -480,27 +486,26 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) mScrollUpTimer.stop(); mScrollDownTimer.stop(); mActionItem->resetMove(); placeSubCells( mActionItem ); // emit startDragSignal( mActionItem->incidence() ); setCursor( arrowCursor ); mActionItem = 0; mActionType = NOP; mItemMoved = 0; return true; } endItemAction(); - } else if ( mActionType == SELECT ) { + } else if ( mActionType == SELECT ) { if (me->button() == RightButton ) { - } else { endSelectAction( !blockNewEvent ); } } break; case QEvent::MouseMove: if (object != viewport()) { KOAgendaItem *moveItem = (KOAgendaItem *)object; //qDebug("moveItem %d ",moveItem ); if (!moveItem->incidence()->isReadOnly() /*&& !moveItem->incidence()->recurrence()->doesRecur()*/ ) diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp index 060b4c4..faa2c21 100644 --- a/korganizer/kodaymatrix.cpp +++ b/korganizer/kodaymatrix.cpp @@ -139,26 +139,25 @@ KODayMatrix::~KODayMatrix() delete mToolTip; } /* void KODayMatrix::setStartDate(QDate start) { updateView(start); } */ void KODayMatrix::addSelectedDaysTo(DateList& selDays) { - kdDebug() << "KODayMatrix::addSelectedDaysTo() - " << "mSelStart:" << mSelStart << endl; - + if (mSelStart == NOSELECTION) { return; } //cope with selection being out of matrix limits at top (< 0) int i0 = mSelStart; if (i0 < 0) { for (int i = i0; i < 0; i++) { selDays.append(days[0].addDays(i)); } i0 = 0; } @@ -280,27 +279,27 @@ void KODayMatrix::updateView(QDate actdate) // nested if is required for next X display pushed from a different month - correction required // otherwise, for month forward and backward, it must be avoided if( mSelStart > NUMDAYS || mSelStart < 0 ) mSelStart = mSelStart + tmp; if( mSelEnd > NUMDAYS || mSelEnd < 0 ) mSelEnd = mSelEnd + tmp; } } startdate = actdate; mDayChanged = true; } - qDebug("restart Timer %d", mDayChanged ); + qDebug("restart Timer %d vis: %d", mDayChanged, isVisible() ); static int iii = 0; - if ( iii < 5 ) { + if ( iii < 2 ) { ++iii; updateViewTimed(); } else { if ( !isVisible() ) { mUpdateTimer->start( 2000 ); } else { if ( mDayChanged ) { mUpdateTimer->start( 250 ); } else { mRepaintTimer->start( 250 ); mUpdateTimer->start( 2000 ); } diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 2f5259f..8d8fc2a 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp @@ -744,41 +744,41 @@ void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd, void KOTodoView::editItem(QListViewItem *item ) { // qDebug("editItem(QListViewItem *item ) "); emit editTodoSignal(((KOTodoViewItem *)item)->todo()); } void KOTodoView::showItem(QListViewItem *item,const QPoint &,int) { emit showTodoSignal(((KOTodoViewItem *)item)->todo()); } -void KOTodoView::popupMenu(QListViewItem *item,const QPoint &,int column) +void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column) { pendingSubtodo = 0; mActiveItem = (KOTodoViewItem *)item; if (item) { switch (column){ case 1: mPriorityPopupMenu->popup(QCursor::pos ()); break; case 2: mPercentageCompletedPopupMenu->popup(QCursor::pos ()); break; case 3: moveTodo(); break; case 8: getCategoryPopupMenu((KOTodoViewItem *)item)->popup(QCursor::pos ()); break; default: - mItemPopupMenu->popup(QCursor::pos()); + mItemPopupMenu->popup(QCursor::pos()); } } else mPopupMenu->popup(QCursor::pos()); } void KOTodoView::newTodo() { emit newTodoSignal(); } void KOTodoView::newSubTodo() { if (mActiveItem) { emit newSubTodoSignal(mActiveItem->todo()); diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index 4c03f9a..35774d6 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp @@ -108,27 +108,29 @@ void KOViewManager::showDateView( int view, QDate date) mNewItemPopup->insertItem ( SmallIcon( pathString +"week" ), i18n("Next Week"),4 ); mNewItemPopup->insertItem ( SmallIcon( pathString +"month" ), i18n("Next Two Weeks"),5 ); mNewItemPopup->insertItem ( SmallIcon( pathString +"month" ), i18n("Next Month"),6 ); mNewItemPopup->insertItem ( SmallIcon( pathString +"journal" ), i18n("Journal view"),7 ); #endif if ( view == 3 ) { mMainView->showDay( date ); } else if (view == 4 ) { mMainView->dateNavigator()->selectDates( date, 7 ); } else if (view == 5 ) { mMainView->dateNavigator()->selectDates( date, 14); } else if (view == 6 ) { - showMonthView(); + mMainView->dateNavigator()->blockSignals( true ); mMainView->dateNavigator()->selectMonthByDate( date ); mMainView->dateNavigator()->selectDate( date ); + mMainView->dateNavigator()->blockSignals( false ); + showMonthView(); } else if (view == 7 ) { mMainView->dateNavigator()->selectDate( date ); showJournalView(); } else if (view == 8 ) { globalFlagBlockAgenda = 1; if ( mCurrentAgendaView != 3 ) mCurrentAgendaView = -1; showAgendaView(KOPrefs::instance()->mFullViewMonth); globalFlagBlockAgenda = 2; mMainView->dateNavigator()->selectDates( date , KOPrefs::instance()->mNextXDays ); mFlagShowNextxDays = true; diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp index d7ff9f2..10665f4 100644 --- a/korganizer/kowhatsnextview.cpp +++ b/korganizer/kowhatsnextview.cpp @@ -168,24 +168,25 @@ void KOWhatsNextView::hideEvent ( QHideEvent * e) //qDebug(" KOWhatsNextView::hideEvent"); mTimer->stop(); QWidget::hideEvent ( e ); } void KOWhatsNextView::restartTimer() { //qDebug("KOWhatsNextView::restartTimer() "); mTimer->start( 300000 ); //mTimer->start( 5000 ); } void KOWhatsNextView::updateView() { + //qDebug("KOWhatsNextView::updateView() "); if ( mTimer->isActive() ) restartTimer(); //qDebug("KOWhatsNextView::updateView() "); // mDateLabel->setText(KGlobal::locale()->formatDate(QDate::currentDate())); KIconLoader kil("korganizer"); QString ipath;// = new QString(); // kil.loadIcon("korganizer",KIcon::NoGroup,32,KIcon::DefaultState,&ipath); //<big><big><strong>" + date + "</strong></big></big>\n"; mText = "<table width=\"100%\">\n"; //mText += "<tr bgcolor=\"#3679AD\"><td><h2>"; #ifdef DESKTOP_VERSION mText += "<tr bgcolor=\"#5699CD\"><td align=\"center\"><h1>"; |