summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koagenda.cpp31
-rw-r--r--korganizer/kodaymatrix.cpp5
-rw-r--r--korganizer/kotodoview.cpp2
-rw-r--r--korganizer/koviewmanager.cpp4
-rw-r--r--korganizer/kowhatsnextview.cpp1
5 files changed, 25 insertions, 18 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index 0aef929..ffa2678 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -435,34 +435,40 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
}
} else {
selectItem(0);
mActionItem = 0;
if (me->button() == RightButton ) {
blockNewEvent = true;
- //qDebug("right ");
+ block = false;
+ } else {
+ blockNewEvent = false;
+ setCursor(arrowCursor);
+ startSelectAction(viewportPos);
+ }
+ }
+ break;
+
+ case QEvent::MouseButtonRelease:
+ //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);
- mStartCellX = gx;
- mStartCellY = 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;
- setCursor(arrowCursor);
- startSelectAction(viewportPos);
}
- }
- break;
-
- case QEvent::MouseButtonRelease:
- //qDebug("QEvent::MouseButtonRelease: ");
- if (me->button() == RightButton && block ) {
+ } else if (me->button() == RightButton && block ) {
if (object != viewport()) {
mClickedItem = (KOAgendaItem *)object;
if (mActionItem ) {
endItemAction();
}
if (mClickedItem) {
@@ -488,13 +494,12 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
mItemMoved = 0;
return true;
}
endItemAction();
} else if ( mActionType == SELECT ) {
if (me->button() == RightButton ) {
-
} else {
endSelectAction( !blockNewEvent );
}
}
break;
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index 060b4c4..faa2c21 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -145,13 +145,12 @@ 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)
@@ -286,15 +285,15 @@ void KODayMatrix::updateView(QDate actdate)
}
}
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 {
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 2f5259f..8d8fc2a 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -750,13 +750,13 @@ void KOTodoView::editItem(QListViewItem *item )
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:
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index 4c03f9a..35774d6 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -114,15 +114,17 @@ void KOViewManager::showDateView( int view, QDate date)
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 )
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp
index d7ff9f2..10665f4 100644
--- a/korganizer/kowhatsnextview.cpp
+++ b/korganizer/kowhatsnextview.cpp
@@ -174,12 +174,13 @@ 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();