summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagenda.cpp8
-rw-r--r--korganizer/koagendaview.cpp2
-rw-r--r--korganizer/koeditorgeneraltodo.cpp3
-rw-r--r--korganizer/navigatorbar.cpp6
4 files changed, 18 insertions, 1 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index ed7a443..1a24887 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -448,24 +448,32 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
} else {
startItemAction(viewportPos);
}
}
}
} else { // ---------- viewport()
mPopupItem = 0;
mPopupKind = 2;
selectItem(0);
mActionItem = 0;
mPopupPos = viewport()->mapToGlobal( me->pos() );
if (me->button() == RightButton) {
+ int x,y;
+ viewportToContents(viewportPos.x(),viewportPos.y(),x,y);
+ int gx,gy;
+ contentsToGrid(x,y,gx,gy);
+ mCurrentCellX = gx;
+ mCurrentCellY = gy;
+ mStartCellX = gx;
+ mStartCellY = gy;
popupMenu();
} else if (me->button() == LeftButton) {
setCursor(arrowCursor);
startSelectAction(viewportPos);
}
}
break;
case QEvent::MouseButtonRelease:
if (me->button() == LeftButton ) {
mPopupTimer->stop();
}
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index f6f390b..f452db0 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -723,24 +723,25 @@ void KOAgendaView::createDayLabels()
if ( ! appendLabels ) {
dayLabel = mDayLabelsList.next();
if ( !dayLabel )
appendLabels = true;
}
if ( appendLabels ) {
dayLabel = getNewDaylabel();
}
dayLabel->setMinimumWidth( 1 );
dayLabel->setMaximumWidth( 10240 );
dayLabel->setFont( dlf );
dayLabel->show();
+ dayLabel->setAutoRepeat( false );
dayLabel->setNum( counter );
QString str;
int dW = KOGlobals::self()->calendarSystem()->dayOfWeek(date);
QString dayName = KOGlobals::self()->calendarSystem()->weekDayName( dW, true );
switch ( maxLen ) {
case 2:
str = QString::number( date.day() );
break;
case 3:
str = dayName.left( 1 ) +QString::number( date.day());
@@ -814,24 +815,25 @@ void KOAgendaView::createDayLabels()
appendLabels = true;
}
if ( appendLabels ) {
dayLabel = getNewDaylabel();
}
//dayLabel->hide();//test only
int offset = (mAgenda->width() - mAgenda->verticalScrollBar()->width()-3 ) % mSelectedDates.count() ;
if ( offset < 0 ) offset = 0;
//qDebug("mLayoutDayLabels->addSpacing %d ", mAgenda->verticalScrollBar()->width()+offset+2 );
dayLabel->setText(">");//QString::number ( mSelectedDates.first().month() ) );
dayLabel->setFont( dlf );
+ dayLabel->setAutoRepeat( true );
dayLabel->show();
dayLabel->setNum( -2 );
dayLabel->setFixedWidth( mAgenda->verticalScrollBar()->width()+ offset );
//qDebug("setToFixed %d ", mAgenda->verticalScrollBar()->width()+ offset+2);
//mLayoutDayLabels->addSpacing(mAgenda->verticalScrollBar()->width()+ offset+2);
if ( !appendLabels ) {
dayLabel = mDayLabelsList.next();
while ( dayLabel ) {
//qDebug("!dayLabel %d",dayLabel );
dayLabel->hide();
dayLabel = mDayLabelsList.next();
}
diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp
index a9d1ed3..a03ec52 100644
--- a/korganizer/koeditorgeneraltodo.cpp
+++ b/korganizer/koeditorgeneraltodo.cpp
@@ -206,31 +206,32 @@ void KOEditorGeneralTodo::setDefaults(QDateTime due,bool allDay)
mTimeButton->setChecked( !allDay );
if(mTimeButton->isChecked()) {
mTimeButton->setEnabled(true);
}
else {
mTimeButton->setEnabled(false);
}
enableTimeEdits( !allDay );
if ( due.isValid() ) {
mDueCheck->setChecked(true);
enableDueEdit(true);
+ alarmDisable(false);
} else {
mDueCheck->setChecked(false);
enableDueEdit(false);
due = QDateTime::currentDateTime().addDays(7);
+ alarmDisable(true);
}
- alarmDisable(true);
mStartCheck->setChecked(false);
enableStartEdit(false);
mDueDateEdit->setDate(due.date());
mDueTimeEdit->setTime(due.time());
due = due.addDays(-7);
mStartDateEdit->setDate(due.date());
mStartTimeEdit->setTime(due.time());
mPriorityCombo->setCurrentItem(2);
mCompletedLabel->setText(i18n(" completed"));;
diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp
index eca7c14..49149f2 100644
--- a/korganizer/navigatorbar.cpp
+++ b/korganizer/navigatorbar.cpp
@@ -142,24 +142,30 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam
connect( mPrevWeek, SIGNAL( clicked() ), SIGNAL( goPrevWeek() ) );
connect( mNextWeek, SIGNAL( clicked() ), SIGNAL( goNextWeek() ) );
connect( mNextYear, SIGNAL( clicked() ), SIGNAL( goNextYear() ) );
connect( mSelectMonth, SIGNAL( clicked() ),SLOT( selectMonth() ) );
mPrevYear->setFocusPolicy(NoFocus);
mPrevMonth->setFocusPolicy(NoFocus);
mNextMonth->setFocusPolicy(NoFocus);
mPrevWeek->setFocusPolicy(NoFocus);
mNextWeek->setFocusPolicy(NoFocus);
mNextYear->setFocusPolicy(NoFocus);
mSelectMonth->setFocusPolicy(NoFocus);
setSizePolicy( QSizePolicy ( QSizePolicy::Expanding ,QSizePolicy::Fixed ) );
+ mPrevYear->setAutoRepeat( true );
+ mPrevMonth->setAutoRepeat( true );
+ mNextMonth->setAutoRepeat( true );
+ mPrevWeek->setAutoRepeat( true );
+ mNextWeek->setAutoRepeat( true );
+ mNextYear->setAutoRepeat( true );
}
NavigatorBar::~NavigatorBar()
{
}
QSize NavigatorBar::sizeHint() const
{
int wid = mCurrentMinWid ;
if ( mPrevYear->isVisible() )
wid += mCurrentButtonMinWid;
if ( mPrevMonth->isVisible() )